:root {
  --paper: #eef1ed;
  --paper-deep: #e2e7e2;
  --ink: #192421;
  --muted: #65716d;
  --line: #d0d8d2;
  --white: #ffffff;
  --slate: #536972;
  --teal: #1e6654;
  --amber: #c9a45b;
  --red: #a94852;
  --shadow: 0 18px 55px rgba(32, 41, 44, 0.11);
  --radius: 6px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.topbar {
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 5vw;
  border-bottom: 1px solid var(--line);
  background: rgba(244, 241, 235, 0.95);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
  white-space: nowrap;
}
.brand-mark {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  font-size: 10px;
  letter-spacing: 0;
}
.topbar-gallery {
  border-bottom-color: #31594f;
  background: rgba(23, 58, 51, .97);
  color: var(--white);
}
.topbar-gallery .brand-mark { border-color: var(--amber); color: var(--amber); }
.topbar-gallery .brand { letter-spacing: 0; }
.topbar-gallery .nav-link { color: var(--white); }
.topbar-gallery .nav-link:hover { border-color: rgba(255, 255, 255, .32); background: rgba(255, 255, 255, .08); }
.topbar-gallery .nav-contact { border-color: var(--amber); background: var(--amber); color: var(--ink); }
.nav {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-link, .button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  transition: border-color .2s ease, background .2s ease, color .2s ease, transform .2s ease;
}
.nav-label {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 0 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.nav-label.active { color: var(--ink); }
.nav-link:hover, .button:hover { transform: translateY(-1px); }
.nav-link.active { background: var(--ink); color: var(--white); }
.button-outline { border-color: var(--line); background: rgba(255, 253, 248, .58); }
.button-outline:hover { border-color: var(--slate); }
.button-dark { background: var(--ink); color: var(--white); }
.button-teal { background: var(--teal); color: var(--white); }
.button-quiet { border-color: var(--line); color: var(--slate); }
.button-danger { border-color: rgba(160, 77, 65, .28); color: var(--red); }
.button-icon { width: 38px; padding: 0; font-size: 18px; }
.button:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.page-shell { min-height: calc(100vh - 74px); }
.gallery-shell { max-width: 1440px; margin: 0 auto; padding: 24px 5vw 0; }
.gallery-hero {
  position: relative;
  height: 520px;
  min-height: 480px;
  overflow: hidden;
  border-bottom: 4px solid var(--amber);
  background: #cbd2cc;
}
.hero-copy {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  width: min(680px, 66%);
  padding: 36px 42px 32px;
  background: rgba(23, 58, 51, .94);
  color: var(--white);
}
.eyebrow {
  color: var(--teal);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .17em;
  text-transform: uppercase;
}
.hero-copy h1 {
  max-width: 600px;
  margin: 12px 0 14px;
  font-family: "Noto Serif SC", "Songti SC", STSong, serif;
  font-size: 52px;
  line-height: 1.05;
  letter-spacing: 0;
  font-weight: 700;
}
.hero-copy h1 span { display: block; margin-top: 3px; color: var(--amber); font-size: 34px; }
.gallery-hero .eyebrow { color: #eed69e; letter-spacing: 0; }
.hero-intro { max-width: 520px; margin: 0; color: rgba(255, 255, 255, .86); font-size: 17px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 9px 20px; margin-top: 18px; color: #eed69e; font-size: 12px; font-weight: 700; }
.hero-points span { white-space: nowrap; }
.hero-contact {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 23px;
  padding-top: 17px;
  border-top: 1px solid rgba(255, 255, 255, .22);
}
.hero-contact > a,
.hero-contact > div { position: relative; min-width: 0; }
.hero-contact small { display: block; margin-bottom: 2px; color: rgba(255, 255, 255, .62); font-size: 10px; }
.hero-contact strong { color: var(--white); font-size: 15px; letter-spacing: 0; }
.hero-contact button,
.footer-contact button {
  margin-left: 7px;
  padding: 2px 6px;
  border: 1px solid currentColor;
  border-radius: 2px;
  background: transparent;
  color: var(--amber);
  font-size: 10px;
}
.hero-media { position: absolute; inset: 0; overflow: hidden; background: var(--paper-deep); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 68% center; }
.hero-label {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  display: grid;
  gap: 2px;
  padding: 9px 11px;
  background: var(--amber);
  color: var(--ink);
  font-size: 11px;
  letter-spacing: 0;
}
.hero-label span { font-size: 9px; opacity: .72; }
.hero-label strong { font-weight: 800; }

.collection-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 50px 0 24px; scroll-margin-top: 94px; }
.section-kicker { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.collection-head h2 { margin: 7px 0 0; font-family: "Noto Serif SC", "Songti SC", STSong, serif; font-size: 31px; line-height: 1.1; letter-spacing: 0; }
.collection-tools { display: flex; align-items: center; gap: 10px; }
.search { width: 220px; height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 4px; background: var(--white); color: var(--ink); outline: none; }
.search:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(31, 107, 109, .12); }
.category-row { display: flex; gap: 8px; overflow-x: auto; padding: 0 0 24px; scrollbar-width: thin; }
.category-chip { flex: 0 0 auto; min-height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 2px; background: transparent; color: var(--muted); font-size: 12px; }
.category-chip:hover { color: var(--ink); border-color: var(--slate); }
.category-chip.active { border-color: var(--teal); border-bottom-color: var(--amber); background: var(--teal); color: var(--white); }
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.product-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-top: 3px solid var(--teal); border-radius: 4px; background: var(--white); box-shadow: 0 8px 24px rgba(25, 36, 33, .07); cursor: pointer; transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.product-card:hover { border-top-color: var(--amber); box-shadow: 0 13px 28px rgba(25, 36, 33, .12); transform: translateY(-2px); }
.product-card-media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--white); cursor: pointer; }
.product-card-media img { width: 100%; height: 100%; padding: 8px; object-fit: contain; transition: transform .35s ease; }
.product-card:hover .product-card-media img { transform: scale(1.02); }
.product-index { position: absolute; top: 9px; left: 9px; padding: 3px 5px; background: rgba(23, 58, 51, .88); color: var(--white); font-size: 10px; font-weight: 750; }
.product-card-info { display: flex; justify-content: space-between; gap: 12px; padding: 13px 14px 15px; border-top: 1px solid var(--line); }
.product-card-info h3 { margin: 0; font-size: 15px; font-weight: 720; }
.product-card-info p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.empty-state { grid-column: 1 / -1; padding: 80px 0; border-top: 1px solid var(--line); color: var(--muted); text-align: center; }
.load-more-row { grid-column: 1 / -1; display: flex; justify-content: center; padding: 24px 0 4px; }
.load-more-row .button { min-width: 150px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px; background: rgba(24, 31, 33, .66); }
.modal { width: min(1080px, 100%); max-height: calc(100vh - 48px); overflow: auto; background: var(--white); box-shadow: var(--shadow); }
.modal-detail { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(280px, .95fr); }
.modal-gallery { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; padding: 14px; background: var(--paper-deep); }
.modal-main-image { aspect-ratio: 1 / 1.1; overflow: hidden; background: var(--white); }
.modal-main-image img { width: 100%; height: 100%; object-fit: contain; }
.modal-thumbs { display: flex; flex-direction: column; gap: 8px; }
.modal-thumb { padding: 0; aspect-ratio: 1; border: 1px solid transparent; background: transparent; overflow: hidden; }
.modal-thumb.active { border-color: var(--teal); }
.modal-thumb img { width: 100%; height: 100%; object-fit: contain; background: var(--white); }

.gallery-footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin: 64px -5vw 0;
  padding: 38px 5vw 42px;
  background: var(--ink);
  color: var(--white);
}
.gallery-footer > div:first-child > strong { display: block; margin-top: 8px; font-family: "Noto Serif SC", "Songti SC", STSong, serif; font-size: 23px; letter-spacing: 0; }
.gallery-footer p { margin: 6px 0 0; color: rgba(255, 255, 255, .62); font-size: 13px; }
.gallery-footer .section-kicker { color: var(--amber); letter-spacing: 0; }
.footer-contact { display: grid; grid-template-columns: repeat(2, minmax(150px, 1fr)); gap: 24px; }
.footer-contact > a,
.footer-contact > div { min-width: 0; }
.footer-contact small { display: block; color: rgba(255, 255, 255, .56); font-size: 10px; }
.footer-contact strong { display: inline-block; margin-top: 3px; color: var(--white); font-size: 14px; letter-spacing: 0; }
.modal-info { position: relative; display: flex; flex-direction: column; justify-content: center; padding: 46px 42px; }
.modal-close { position: absolute; top: 14px; right: 14px; }
.modal-info h2 { margin: 8px 0 14px; font-size: 38px; line-height: 1.02; letter-spacing: -.045em; }
.modal-info p { max-width: 350px; margin: 0; color: var(--muted); }
.modal-spec { display: flex; gap: 30px; margin-top: 34px; padding-top: 18px; border-top: 1px solid var(--line); }
.modal-spec span { display: block; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }
.modal-spec strong { display: block; margin-top: 4px; font-size: 13px; }

.admin-shell { max-width: 1440px; margin: 0 auto; padding: 34px 5vw 74px; }
.admin-header { display: flex; justify-content: space-between; align-items: end; gap: 24px; padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.admin-header h1 { margin: 7px 0 0; font-size: 38px; letter-spacing: -.05em; line-height: 1; }
.admin-actions { display: flex; gap: 8px; }
.admin-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 24px 0 34px; border-bottom: 1px solid var(--line); }
.stat { min-height: 86px; padding-right: 20px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat-label { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; }
.stat-value { margin-top: 8px; font-size: 29px; font-weight: 730; letter-spacing: -.04em; }
.admin-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 42px; padding-top: 36px; }
.admin-rail { border-right: 1px solid var(--line); padding-right: 28px; }
.rail-title { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.rail-list { display: grid; gap: 4px; margin-top: 16px; }
.rail-item { display: flex; justify-content: space-between; gap: 8px; padding: 9px 10px; border: 0; border-radius: 3px; background: transparent; color: var(--muted); text-align: left; font-size: 13px; }
.rail-item:hover, .rail-item.active { background: var(--paper-deep); color: var(--ink); }
.rail-item small { color: inherit; font-size: 11px; }
.category-admin-row {
  align-items: center;
  padding: 5px 5px 5px calc(8px + var(--category-depth, 0) * 14px);
}
.category-admin-select {
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 4px 2px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}
.category-admin-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.category-admin-toggle,
.category-admin-toggle-spacer {
  width: 20px;
  height: 24px;
  display: grid;
  flex: 0 0 20px;
  place-items: center;
}
.category-admin-toggle {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--slate);
  font-size: 19px;
  line-height: 1;
}
.category-admin-toggle:hover { background: var(--white); color: var(--teal); }
.category-admin-actions { display: flex; flex: 0 0 auto; opacity: 0; transition: opacity .18s ease; }
.category-admin-row:hover .category-admin-actions,
.category-admin-row:focus-within .category-admin-actions { opacity: 1; }
.category-admin-action {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--slate);
  font-size: 14px;
}
.category-admin-action:hover { background: var(--white); color: var(--ink); }
.category-admin-action.danger:hover { color: var(--red); }
.product-list-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 14px; }
.product-list-head h2 { margin: 0; font-size: 19px; letter-spacing: -.025em; }
.product-list { border-top: 1px solid var(--line); }
.admin-product-row { display: grid; grid-template-columns: 72px minmax(0, 1fr) 150px 130px 194px; align-items: center; gap: 18px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.admin-cover { width: 72px; aspect-ratio: 1; overflow: hidden; background: var(--paper-deep); }
.admin-cover img { width: 100%; height: 100%; object-fit: cover; }
.admin-product-name { min-width: 0; }
.admin-product-name strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.admin-product-name span, .admin-cell { color: var(--muted); font-size: 12px; }
.admin-row-actions { display: flex; justify-content: end; gap: 6px; }
.admin-row-actions .button { min-height: 32px; padding: 0 9px; font-size: 11px; }
.admin-load-more { padding: 22px 0; border-bottom: 1px solid var(--line); }
.admin-settings { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 44px; margin-top: 44px; padding-top: 36px; border-top: 1px solid var(--line); }
.settings-block h2 { margin: 0 0 6px; font-size: 19px; letter-spacing: -.03em; }
.settings-block > p { margin: 0 0 20px; color: var(--muted); font-size: 13px; }
.field { display: grid; gap: 7px; margin-bottom: 16px; }
.field label { color: var(--muted); font-size: 12px; font-weight: 700; }
.field input, .field textarea, .field select { min-height: 40px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 3px; background: var(--white); color: var(--ink); outline: none; }
.field textarea { min-height: 90px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(31, 107, 109, .12); }
.watermark-text-field { margin-top: 18px; }
.watermark-controls { margin: 4px 0 20px; padding: 16px 0 6px; border-top: 1px solid var(--line); }
.range-field {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 50px;
  align-items: center;
  gap: 11px;
  min-width: 0;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.range-field input { width: 100%; min-width: 0; accent-color: var(--teal); }
.range-field output { color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
.toggle-row { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.toggle-copy strong { display: block; font-size: 13px; }
.toggle-copy span { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.toggle { position: relative; width: 44px; height: 25px; flex: 0 0 auto; }
.toggle input { position: absolute; opacity: 0; }
.toggle-ui { position: absolute; inset: 0; border-radius: 100px; background: #c4c7c2; transition: background .2s ease; }
.toggle-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 19px; height: 19px; border-radius: 50%; background: var(--white); transition: transform .2s ease; box-shadow: 0 1px 3px rgba(0,0,0,.22); }
.toggle input:checked + .toggle-ui { background: var(--teal); }
.toggle input:checked + .toggle-ui::after { transform: translateX(19px); }
.share-box { display: flex; gap: 8px; align-items: center; padding: 14px; border: 1px solid var(--line); background: var(--paper-deep); }
.share-box input { min-width: 0; flex: 1; height: 36px; padding: 0 9px; border: 1px solid var(--line); background: var(--white); color: var(--muted); font-size: 12px; }
.share-box .button { flex: 0 0 auto; min-height: 36px; font-size: 12px; }
.background-settings { grid-column: 1 / -1; padding-top: 30px; border-top: 1px solid var(--line); }
.background-panel { display: grid; grid-template-columns: minmax(300px, .9fr) minmax(0, 1.1fr); gap: 24px; align-items: center; }
.background-preview { display: grid; aspect-ratio: 16 / 6; overflow: hidden; place-items: center; border: 1px solid var(--line); background: var(--paper-deep); color: var(--muted); font-size: 12px; }
.background-preview img { width: 100%; height: 100%; object-fit: cover; }
.background-copy { min-width: 0; }
.background-copy strong { display: block; font-size: 14px; }
.background-copy > span { display: block; max-width: 520px; margin-top: 5px; color: var(--muted); font-size: 12px; }
.background-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.upload-card { position: relative; }
.upload-picker { min-height: 150px; display: grid; place-items: center; gap: 5px; margin: 22px 0 14px; padding: 24px; border: 1px dashed var(--slate); background: var(--paper-deep); color: var(--ink); text-align: center; cursor: pointer; }
.upload-picker:hover { border-color: var(--teal); background: #e3ece9; }
.upload-picker-icon { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid var(--teal); border-radius: 50%; color: var(--teal); font-size: 22px; }
.upload-picker strong { font-size: 14px; }
.upload-picker span:last-child { color: var(--muted); font-size: 12px; }
.upload-file-list { min-height: 38px; margin-bottom: 16px; padding: 10px 11px; border: 1px solid var(--line); color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.upload-file-list.error { border-color: rgba(169, 72, 82, .55); color: var(--red); }
.auth-card.product-form-card { width: min(640px, 100%); padding: 34px; }
.product-image-field { padding-top: 4px; }
.product-image-field .upload-picker { min-height: 118px; margin: 4px 0 12px; }
.auth-card.image-manager-card { width: min(760px, 100%); padding: 34px; }
.image-order-status { min-height: 18px; margin-top: -12px; color: var(--muted); font-size: 11px; }
.image-manager-list { display: grid; gap: 8px; max-height: 330px; margin: 8px 0 22px; overflow-y: auto; overscroll-behavior: contain; }
.image-manager-row {
  display: grid;
  grid-template-columns: 40px 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 9px;
  border: 1px solid var(--line);
  background: var(--paper);
  transition: border-color .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.image-manager-row.is-cover { border-color: rgba(198, 161, 91, .68); }
.image-drag-handle { display: grid; width: 40px; height: 44px; padding: 0; place-items: center; border: 0; background: transparent; color: var(--muted); cursor: grab; touch-action: none; }
.image-drag-handle span { font-size: 18px; line-height: 1; letter-spacing: 0; transform: rotate(90deg); }
.image-drag-handle:hover { color: var(--teal); }
.image-drag-handle:active { cursor: grabbing; }
.image-drag-handle.is-disabled { cursor: default; opacity: .42; pointer-events: none; }
.image-manager-list.is-static-order .image-drag-handle,
.image-manager-list.is-static-order .image-order-button { display: none; }
.image-manager-list.is-static-order .image-manager-row { grid-template-columns: 72px minmax(0, 1fr) auto; }
.image-manager-ghost { opacity: .3; }
.image-manager-chosen { border-color: var(--teal); box-shadow: 0 7px 20px rgba(23, 58, 51, .14); }
.image-manager-preview { width: 72px; height: 72px; object-fit: cover; background: var(--paper-deep); }
.image-manager-meta { min-width: 0; }
.image-manager-meta strong { display: block; font-size: 13px; }
.image-manager-meta span { display: block; margin-top: 4px; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.image-manager-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.auth-card .image-manager-actions .button { width: auto; min-height: 32px; padding: 0 10px; font-size: 11px; }
.auth-card .image-manager-actions .image-order-button { width: 32px; padding: 0; font-size: 15px; }
.image-manager-actions [data-delete-image] { color: var(--red); }
.image-manager-empty { padding: 34px 18px; border: 1px dashed var(--line); color: var(--muted); text-align: center; }
.image-manager-append { padding-top: 18px; border-top: 1px solid var(--line); }
.image-manager-append .upload-picker { min-height: 112px; margin-top: 0; }

.auth-shell { min-height: calc(100vh - 74px); display: grid; place-items: center; padding: 30px; }
.auth-card { width: min(420px, 100%); padding: 36px; border: 1px solid var(--line); background: var(--white); box-shadow: var(--shadow); }
.auth-card h1 { margin: 8px 0 10px; font-size: 32px; letter-spacing: -.05em; }
.auth-card p { margin: 0 0 26px; color: var(--muted); font-size: 13px; }
.auth-card .button { width: 100%; }
.auth-card .button-icon { width: 38px; }
.auth-note { margin-top: 13px; color: var(--muted); font-size: 11px; }

.loading { min-height: 360px; display: grid; place-items: center; color: var(--muted); }
.spinner { width: 22px; height: 22px; border: 2px solid var(--line); border-top-color: var(--teal); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 80; max-width: 320px; padding: 11px 14px; border: 1px solid rgba(31, 41, 44, .12); background: var(--ink); color: var(--white); font-size: 13px; opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { background: var(--red); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 1000px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero-copy { width: 74%; }
  .admin-product-row { grid-template-columns: 60px minmax(0, 1fr) 120px 194px; }
  .admin-cell:nth-of-type(2) { display: none; }
}
@media (max-width: 760px) {
  .topbar { height: 64px; padding: 0 18px; }
  .nav-link, .nav-label { padding: 0 8px; font-size: 12px; }
  .brand { font-size: 10px; letter-spacing: .11em; }
  .brand-mark { width: 23px; height: 23px; }
  .topbar-gallery .nav-link:first-child { display: none; }
  .topbar-gallery .nav-contact { min-height: 34px; padding: 0 10px; }
  .gallery-shell { padding: 12px 18px 0; }
  .admin-shell { padding: 22px 18px 54px; }
  .gallery-hero { height: min(520px, calc(100svh - 112px)); min-height: 460px; margin: -12px -18px 0; }
  .hero-media img { object-position: center top; }
  .hero-copy { width: 100%; padding: 22px 18px 20px; }
  .hero-copy h1 { margin: 8px 0 10px; font-size: 36px; }
  .hero-copy h1 span { font-size: 26px; }
  .hero-intro { font-size: 14px; }
  .hero-points { gap: 6px 12px; margin-top: 12px; font-size: 10px; }
  .hero-contact { gap: 12px; margin-top: 15px; padding-top: 12px; }
  .hero-contact strong { font-size: 13px; }
  .hero-label { top: 12px; right: 12px; }
  .collection-head { align-items: start; flex-direction: column; padding-top: 34px; }
  .collection-tools { width: 100%; }
  .search { width: 100%; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .product-card-info { display: block; }
  .modal-backdrop { padding: 0; }
  .modal { max-height: 100vh; }
  .modal-detail { display: block; }
  .modal-gallery { grid-template-columns: 1fr; }
  .modal-thumbs { flex-direction: row; order: 2; overflow-x: auto; }
  .modal-thumb { width: 64px; flex: 0 0 64px; }
  .modal-info { padding: 30px 24px 36px; }
  .modal-info h2 { font-size: 32px; }
  .admin-header { align-items: start; flex-direction: column; }
  .admin-header h1 { font-size: 34px; }
  .admin-stats { gap: 8px; }
  .stat { padding-right: 10px; }
  .stat-value { font-size: 23px; }
  .admin-layout { display: block; padding-top: 24px; }
  .admin-rail { border-right: 0; border-bottom: 1px solid var(--line); padding: 0 0 16px; margin-bottom: 24px; }
  .rail-list { display: flex; overflow-x: auto; }
  .rail-item { flex: 0 0 auto; }
  .category-admin-row { padding-left: 7px; }
  .category-admin-actions { opacity: 1; }
  .admin-product-row { grid-template-columns: 54px minmax(0, 1fr) 76px; gap: 10px; }
  .admin-cover { width: 54px; }
  .admin-cell { display: none !important; }
  .admin-row-actions { justify-content: end; flex-wrap: wrap; }
  .admin-row-actions .button { min-height: 30px; padding: 0 7px; }
  .admin-settings { display: block; margin-top: 34px; padding-top: 28px; }
  .settings-block + .settings-block { margin-top: 34px; }
  .background-settings { padding-top: 28px; }
  .background-panel { grid-template-columns: 1fr; gap: 16px; }
  .background-preview { aspect-ratio: 16 / 8; }
  .share-box { align-items: stretch; flex-direction: column; }
  .share-box input { width: 100%; }
  .auth-card.product-form-card { width: 100%; max-height: 100dvh; padding: 28px 20px; }
  .auth-card.image-manager-card { padding: 28px 20px; }
  .image-manager-row { grid-template-columns: 40px 58px minmax(0, 1fr); gap: 10px; }
  .image-manager-list.is-static-order .image-manager-row { grid-template-columns: 58px minmax(0, 1fr); }
  .image-manager-preview { width: 58px; height: 58px; }
  .image-manager-actions { grid-column: 2 / -1; }
  .image-manager-list.is-static-order .image-manager-actions { grid-column: 1 / -1; }
  .gallery-footer { align-items: start; flex-direction: column; margin: 48px -18px 0; padding: 30px 18px 34px; }
  .footer-contact { width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
}

@media (max-width: 380px) {
  .gallery-hero { height: 430px; min-height: 430px; }
  .brand { font-size: 9px; }
}
