/* 山石集 / Sense Collection — storefront styles */
:root {
  --bg: #f7f5f1;
  --bg-soft: #efece6;
  --paper: #ffffff;
  --ink: #1c1b19;
  --ink-muted: #6b6560;
  --line: #e2ddd4;
  --accent: #3d4a3a;
  --accent-soft: #5a6b55;
  --sold: #9a6b5c;
  --self: #4a6b5c;
  --curated: #8a6a3f;
  --value: #3f6a7a;
  --gold: #be9663;
  --gold-soft: #d8b87c;
  /* Theme tokens (overridden per style in js/themes.js) */
  --accent-deep: #2f3a2d;
  --on-accent: #ffffff;
  --hero-grad: linear-gradient(145deg, #d9d3c8, #b8c0b4 45%, #8a9588);
  --ph-grad: linear-gradient(160deg, #cfc8bc, #9aa391 55%, #6f7a6c);
  --highlight-grad: linear-gradient(135deg, #a8b5a4, #d6d0c4 60%, #ece7df);
  --curated-grad: linear-gradient(135deg, #c9b38f, #e3d8c6 60%, #f1ece3);
  --tint: #eef2ec;
  --tint-line: #d5ddd2;
  --header-bg: rgba(247, 245, 241, 0.92);
  --header-solid: var(--bg);
  --header-ink: var(--ink);
  --header-muted: var(--ink-muted);
  --header-line: var(--line);
  --header-paper: var(--paper);
  --header-pop: var(--accent);
  --header-pop-ink: var(--on-accent);
  --footer-bg: transparent;
  --footer-ink: var(--ink-muted);
  --footer-line: var(--line);
  --mark-plate: transparent;
  --mark-pad: 0px;
  --radius: 12px;
  --shadow: 0 8px 28px rgba(28, 27, 25, 0.06);
  --font-sans: "Noto Sans TC", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-serif: "Noto Serif TC", "Iowan Old Style", Georgia, serif;
  --max: 1120px;
  --header-h: 92px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.25;
  margin: 0 0 0.5em;
}
p { margin: 0 0 1em; }
.muted { color: var(--ink-muted); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: var(--header-bg);
  color: var(--header-ink);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--header-line);
}
.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
}
.brand {
  display: flex; align-items: center; gap: 0.65rem;
  min-width: 0;
}
.brand-mark {
  width: auto; height: 76px; flex: none;
  padding: var(--mark-pad); background: var(--mark-plate); border-radius: 9px;
}
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-zh { font-family: var(--font-serif); font-size: 1.45rem; letter-spacing: 0.08em; line-height: 1.3; }
.brand-en { font-size: 0.86rem; color: var(--header-muted); letter-spacing: 0.04em; }
.nav {
  display: flex; flex-wrap: wrap; gap: 0.35rem 1rem;
  align-items: center;
  font-size: 1.05rem;
}
.nav a { color: var(--header-muted); transition: color .15s; }
.nav a:hover, .nav a.active { color: var(--header-ink); }
.header-actions { display: flex; align-items: center; gap: 0.6rem; }
.lang-switch {
  display: inline-flex;
  border: 1px solid var(--header-line);
  border-radius: 999px;
  overflow: hidden;
  background: var(--header-paper);
}
.lang-switch button {
  border: 0; background: transparent;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  color: var(--header-muted);
  font-size: 0.88rem;
}
.lang-switch button.active {
  background: var(--header-pop);
  color: var(--header-pop-ink);
}
.cart-link {
  position: relative;
  font-size: 1rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--header-line);
  border-radius: 999px;
  background: var(--header-paper);
}
.cart-count {
  display: inline-flex;
  min-width: 1.2em;
  justify-content: center;
  margin-left: 0.25em;
  font-size: 0.75rem;
  color: var(--header-pop);
  font-weight: 600;
}
.nav-toggle {
  display: none;
  border: 1px solid var(--header-line);
  background: var(--header-paper);
  color: var(--header-ink);
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
}
.nav-extras { display: none; }

/* Phone, tablet & small-laptop header: brand · cart icon · menu. 我的訂單 and 中文/EN move into the menu. */
@media (max-width: 1180px) {
  .nav-toggle { display: inline-flex; }
  .header-inner { position: relative; }
  .nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    background: var(--header-solid);
    border-bottom: 1px solid var(--header-line);
    padding: 1rem 1.25rem;
    flex-direction: column;
    align-items: flex-start;
  }
  .nav.open { display: flex; }
  .header-inner { gap: 0.5rem; }
  .brand { order: 1; flex: 1; }
  .brand-zh, .brand-en { white-space: nowrap; }
  .brand-zh { font-size: 1.4rem; }
  .brand-en { font-size: 0.82rem; }
  .header-actions { order: 2; gap: 0.5rem; }
  .nav-toggle { order: 3; }
  .header-actions .lang-switch,
  .header-actions .account-link { display: none; }

  .cart-link {
    width: 44px; height: 44px; padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
  }
  .cart-link > [data-i18n] {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
  }
  .cart-link::before {
    content: "";
    width: 20px; height: 20px;
    background: var(--header-ink);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 8h14l-1.2 12H6.2z'/%3E%3Cpath d='M9 8V6.5a3 3 0 0 1 6 0V8'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 8h14l-1.2 12H6.2z'/%3E%3Cpath d='M9 8V6.5a3 3 0 0 1 6 0V8'/%3E%3C/svg%3E") center / contain no-repeat;
  }
  .cart-count {
    position: absolute; top: -2px; right: -2px;
    min-width: 18px; height: 18px; margin: 0; padding: 0 4px;
    border-radius: 999px;
    background: var(--header-pop); color: var(--header-pop-ink);
    font-size: 0.68rem; line-height: 18px;
  }
  .cart-count[hidden] { display: none; }

  .nav-toggle {
    width: 44px; height: 44px; padding: 0;
    align-items: center; justify-content: center;
    border-radius: 999px;
    font-size: 1.1rem; color: var(--header-ink);
  }
  .nav.open { gap: 0; padding-top: 0.5rem; padding-bottom: 1rem; box-shadow: 0 12px 24px rgba(28, 27, 25, 0.06); }
  .nav.open > a { width: 100%; padding: 0.7rem 0; font-size: 1rem; border-bottom: 1px solid var(--header-line); }
  .nav-extras {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    width: 100%; padding-top: 1rem;
  }
  .nav-extras .nav-orders {
    display: inline-flex; align-items: center; min-height: 44px; padding: 0 1rem;
    border: 1px solid var(--header-line); border-radius: 999px; background: var(--header-paper);
    color: var(--header-ink); font-size: 0.95rem;
  }
  .nav-extras .lang-switch button { min-height: 44px; padding: 0 1rem; font-size: 0.9rem; }
}

/* Layout */
.container { max-width: var(--max); margin: 0 auto; padding: 2rem 1.25rem 4rem; }
.section { margin-bottom: 3.5rem; }
.section-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 1rem; margin-bottom: 1.25rem;
}
.section-head h2 { margin: 0; font-size: 1.55rem; }
.link-more { font-size: 0.9rem; color: var(--accent-soft); border-bottom: 1px solid transparent; }
.link-more:hover { border-color: var(--accent-soft); }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
  padding: 2.5rem 0 1rem;
}
.hero-copy h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 0.6em;
}
.hero-copy .lede { font-size: 1.05rem; color: var(--ink-muted); max-width: 32ch; }
.hero-visual {
  aspect-ratio: 4/5;
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  background: var(--hero-grad);
  box-shadow: var(--shadow);
  position: relative;
}
.hero-visual::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,.35), transparent 45%),
    radial-gradient(circle at 70% 70%, rgba(40,50,35,.2), transparent 50%);
}
.hero-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero-visual.has-photo::after { display: none; }
.hero-caption {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
  display: flex; align-items: center; gap: 0.75rem;
  padding: 1rem;
}
.hero-visual.has-photo .hero-caption,
.hero-visual.has-caption .hero-caption {
  padding-top: 3.5rem;
  background: linear-gradient(to top, rgba(18, 18, 16, 0.72), rgba(18, 18, 16, 0.38) 55%, rgba(18, 18, 16, 0));
}
.hero-caption-text {
  margin: 0; min-width: 0;
  color: #f7f5f1;
  font-size: 0.92rem; line-height: 1.5; letter-spacing: 0.03em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hero-visual .label {
  flex: none;
  background: rgba(255,255,255,.85);
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.7rem 1.25rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, opacity .15s;
  font-size: 0.92rem;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover:not(:disabled) { background: var(--accent-deep); }
.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn-ghost:hover:not(:disabled) { border-color: var(--ink-muted); }
.btn-danger { background: #fff; border-color: #e0c4bc; color: var(--sold); }

/* Cards / grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
  display: flex; flex-direction: column;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card-media {
  aspect-ratio: 1;
  background: var(--bg-soft);
  position: relative;
  overflow: hidden;
}
.card-media img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.ph-mineral {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,.5), transparent 40%),
    var(--ph-grad);
  color: rgba(255,255,255,.85);
  font-family: var(--font-serif);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}
.badge {
  position: absolute; top: 0.7rem; left: 0.7rem;
  font-size: 0.7rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  letter-spacing: 0.04em;
}
.badge-sold { color: var(--sold); }
.badge-held { color: #8a5a2a; background: #f6ecdf; }
.badge-self { color: var(--self); }
.badge-curated { color: var(--curated); }
.badge-value { color: var(--value); }
.card-body { padding: 1rem 1.05rem 1.2rem; flex: 1; display: flex; flex-direction: column; gap: 0.35rem; }
.card-title { font-family: var(--font-serif); font-size: 1.05rem; margin: 0; }
.card-meta { font-size: 0.82rem; color: var(--ink-muted); }
.card-price { margin-top: auto; font-weight: 600; font-size: 0.95rem; padding-top: 0.5rem; }
.price-usd { font-weight: 400; font-size: 0.8rem; color: var(--ink-muted); margin-left: 0.35rem; }
.price-sold { color: var(--sold); font-weight: 500; }
.price-sold s { color: var(--ink-muted); font-weight: 400; margin-right: 0.35rem; }
.badge-inline { font-size: 0.78rem; letter-spacing: 0.04em; }
.card-sold { opacity: 0.92; }
.card-media .badge + .badge { top: 2.35rem; }

/* Highlight band */
.highlight {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  padding: 2rem;
  align-items: center;
}
.highlight-visual {
  aspect-ratio: 5/4;
  border-radius: var(--radius);
  background: var(--highlight-grad);
}

/* Type chips */
.chips { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.chip {
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 0.88rem;
  color: var(--ink-muted);
  transition: all .15s;
}
.chip:hover, .chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Filters */
.filters {
  display: flex; flex-wrap: wrap; gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.filters label {
  display: flex; flex-direction: column; gap: 0.25rem;
  font-size: 0.75rem; color: var(--ink-muted);
}
.filters select, .filters input[type="search"] {
  min-width: 140px;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
}
.result-count { font-size: 0.85rem; color: var(--ink-muted); margin-bottom: 1rem; }

/* Shop search / filter / sort (catalog + sold) */
.shop-tools { margin: 1.25rem 0 1.5rem; }
.tools-bar { display: flex; gap: 0.75rem; align-items: flex-end; margin-bottom: 0.75rem; }
.search-field { position: relative; flex: 1; min-width: 0; }
.search-field input {
  width: 100%;
  height: 46px;
  padding: 0 1rem 0 2.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  transition: border-color .15s;
}
.search-field input:focus { outline: none; border-color: var(--accent-soft); box-shadow: 0 0 0 3px rgba(61, 74, 58, 0.08); }
.search-icon {
  position: absolute; left: 1rem; top: 50%; width: 18px; height: 18px; transform: translateY(-50%);
  fill: none; stroke: var(--ink-muted); stroke-width: 1.6; stroke-linecap: round; pointer-events: none;
}
.sort-field { display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.75rem; color: var(--ink-muted); }
.sort-field select, .filter-group select {
  height: 46px;
  min-width: 160px;
  padding: 0 2rem 0 0.9rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
}
.filter-toggle {
  display: none;
  align-items: center; justify-content: center; gap: 0.4rem;
  height: 46px; padding: 0 1rem;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--paper); color: var(--ink); cursor: pointer;
}
.filter-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.filter-badge {
  min-width: 1.35rem; height: 1.35rem; padding: 0 0.35rem;
  border-radius: 999px; background: var(--accent); color: #fff;
  font-size: 0.75rem; line-height: 1.35rem; text-align: center;
}
.filter-badge[hidden] { display: none; }

.filter-panel {
  padding: 1.1rem 1.25rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.sheet-head, .sheet-foot, .filter-backdrop { display: none; }
.filter-body { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: flex-start; }
.filter-selects { display: flex; flex-wrap: wrap; gap: 1rem; }
.filter-group { display: flex; flex-direction: column; gap: 0.4rem; border: 0; margin: 0; padding: 0; min-width: 0; }
.filter-group legend, .filter-legend {
  padding: 0; margin-bottom: 0.4rem;
  font-size: 0.75rem; letter-spacing: 0.08em; color: var(--ink-muted);
}
.filter-legend { margin-bottom: 0; }
.f-chips { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.f-chip {
  display: inline-flex; align-items: baseline; gap: 0.35rem;
  min-height: 40px; padding: 0.45rem 0.95rem;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--bg); color: var(--ink);
  font-size: 0.86rem; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.f-chip small { font-size: 0.72rem; color: var(--ink-muted); }
.f-chip:hover { border-color: var(--ink-muted); }
.f-chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.f-chip[aria-pressed="true"] small { color: rgba(255, 255, 255, 0.75); }
.f-chip:focus-visible, .filter-toggle:focus-visible, .active-chip:focus-visible, .sheet-close:focus-visible {
  outline: 2px solid var(--accent-soft); outline-offset: 2px;
}

.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 0.9rem; min-height: 1.6rem; }
.result-count-inline { font-size: 0.85rem; color: var(--ink-muted); margin-right: 0.35rem; }
.active-chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.25rem 0.5rem 0.25rem 0.75rem;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--bg-soft); color: var(--ink);
  font-size: 0.8rem; cursor: pointer;
}
.active-chip span { font-size: 1rem; line-height: 1; color: var(--ink-muted); }
.active-chip:hover { border-color: var(--ink-muted); }
.link-clear {
  border: 0; background: none; padding: 0.25rem; cursor: pointer;
  font-size: 0.8rem; color: var(--accent-soft);
  text-decoration: underline; text-underline-offset: 3px;
}
body.no-scroll { overflow: hidden; }

@media (max-width: 860px) {
  .tools-bar { flex-wrap: wrap; align-items: stretch; gap: 0.6rem; }
  .search-field { flex: 1 0 100%; }
  .filter-toggle { display: inline-flex; flex: 1; }
  .sort-field { flex: 1; }
  .sort-field > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .sort-field select { width: 100%; min-width: 0; border-radius: 999px; }
  .search-field input, .sort-field select { font-size: 16px; } /* no iOS zoom on focus */

  .filter-panel {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    max-height: 85vh; max-height: 85dvh;
    display: flex; flex-direction: column;
    padding: 0;
    border-radius: 18px 18px 0 0; border-bottom: 0;
    box-shadow: 0 -12px 40px rgba(28, 27, 25, 0.12);
    transform: translateY(105%);
    visibility: hidden;
    transition: transform .25s ease, visibility 0s linear .25s;
  }
  .sheet-open .filter-panel { transform: none; visibility: visible; transition: transform .25s ease; }
  .filter-backdrop {
    display: block; position: fixed; inset: 0; z-index: 55;
    background: rgba(28, 27, 25, 0.32);
  }
  .filter-backdrop[hidden] { display: none; }
  .sheet-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.9rem 1.25rem 0.6rem;
    border-bottom: 1px solid var(--line);
  }
  .sheet-head::before {
    content: ""; position: absolute; top: 6px; left: 50%; width: 36px; height: 4px;
    margin-left: -18px; border-radius: 4px; background: var(--line);
  }
  .sheet-head h2 { margin: 0; font-size: 1.1rem; }
  .sheet-close {
    width: 44px; height: 44px; margin-right: -0.6rem;
    border: 0; background: none; font-size: 1.6rem; line-height: 1; color: var(--ink-muted); cursor: pointer;
  }
  .filter-body {
    flex: 1; overflow-y: auto; overscroll-behavior: contain;
    flex-direction: column; flex-wrap: nowrap; gap: 1.4rem;
    padding: 1.1rem 1.25rem 1.4rem;
  }
  .filter-selects { flex-direction: column; width: 100%; }
  .filter-group { width: 100%; }
  .filter-group select { width: 100%; min-width: 0; font-size: 16px; }
  .f-chip { min-height: 44px; }
  .sheet-foot {
    display: flex; gap: 0.75rem;
    padding: 0.8rem 1.25rem calc(0.8rem + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: var(--paper);
  }
  .sheet-foot .btn { min-height: 46px; }
  .sheet-foot .btn-primary { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .filter-panel, .sheet-open .filter-panel { transition: none; }
}

/* Product detail */
.product-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
  align-items: start;
}
.gallery-main {
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-soft);
  border: 1px solid var(--line);
}
.gallery-main { position: relative; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; display: block; }
.gallery-open { all: unset; display: block; width: 100%; height: 100%; cursor: zoom-in; position: relative; }
.gallery-open:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; }
.gallery-zoom {
  position: absolute; right: 0.6rem; bottom: 0.6rem;
  width: 2.2rem; height: 2.2rem; border-radius: 999px; display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.88); color: var(--ink); font-size: 1rem; box-shadow: var(--shadow);
}
.photo-notice {
  margin: 0.9rem 0 0;
  padding: 0.7rem 0.85rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 0.76rem;
  line-height: 1.75;
  letter-spacing: 0.02em;
  color: var(--ink-muted);
}
.specs .spec-full { grid-column: 1 / -1; }
.specs .spec-strong { font-weight: 500; letter-spacing: 0.01em; }
.ig-inquiry {
  margin-top: 1.5rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  font-size: 0.86rem;
  color: var(--ink-muted);
}
.ig-inquiry p { margin: 0 0 0.4rem; }
.gallery-thumbs {
  display: flex; gap: 0.5rem; margin-top: 0.75rem; flex-wrap: wrap;
}
.gallery-thumbs button {
  width: 64px; height: 64px; padding: 0;
  border: 2px solid transparent;
  border-radius: 8px; overflow: hidden;
  cursor: pointer; background: var(--bg-soft);
}
.gallery-thumbs button.active { border-color: var(--accent); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1rem;
  margin: 1.25rem 0;
  padding: 1rem;
  background: var(--bg-soft);
  border-radius: var(--radius);
  font-size: 0.9rem;
}
.specs dt { color: var(--ink-muted); font-size: 0.75rem; }
.specs dd { margin: 0.1rem 0 0; }
.product-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.25rem; }
.sold-banner {
  display: inline-block;
  margin: 0.5rem 0 1rem;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  background: #f3e6e1;
  color: var(--sold);
  font-size: 0.88rem;
}

/* Cart */
.cart-table { width: 100%; border-collapse: collapse; background: var(--paper); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.cart-table th, .cart-table td { padding: 0.9rem 1rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cart-table th { font-size: 0.75rem; color: var(--ink-muted); font-weight: 500; background: var(--bg-soft); }
.cart-item-info { display: flex; gap: 0.85rem; align-items: center; }
.cart-item-info .thumb {
  width: 56px; height: 56px; border-radius: 8px; overflow: hidden; background: var(--bg-soft); flex-shrink: 0;
}
.cart-item-info .thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-summary {
  margin-top: 1.5rem;
  max-width: 360px;
  margin-left: auto;
  padding: 1.25rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.cart-summary .row { display: flex; justify-content: space-between; margin-bottom: 0.5rem; }
.checkout-form {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 0.85rem;
  max-width: 520px;
}
.checkout-form label { display: grid; gap: 0.3rem; font-size: 0.85rem; color: var(--ink-muted); }
.checkout-form label[hidden] { display: none; }
.checkout-form input, .checkout-form textarea, .checkout-form select {
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
}
.toast {
  position: fixed; bottom: 1.25rem; left: 50%; transform: translateX(-50%) translateY(120%);
  background: var(--ink); color: #fff;
  padding: 0.75rem 1.25rem; border-radius: 999px;
  font-size: 0.9rem; z-index: 100;
  transition: transform .25s ease;
  box-shadow: var(--shadow);
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* Field notes */
.note-list { display: grid; gap: 1.25rem; }
.note-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.note-card time { font-size: 0.8rem; color: var(--ink-muted); }
.note-card h3 { margin: 0.35rem 0 0.75rem; font-size: 1.25rem; }

/* About */
.prose { max-width: 62ch; }
.prose h2 { margin-top: 2rem; }
.prose .panel {
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  white-space: pre-line;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--footer-line);
  background: var(--footer-bg);
  padding: 2rem 1.25rem;
  text-align: center;
  color: var(--footer-ink);
  font-size: 0.85rem;
}
.site-footer a { text-decoration: underline; text-underline-offset: 2px; }
.site-footer::before {
  content: "";
  display: block;
  width: 48px; height: 1px;
  margin: 0 auto 1.5rem;
  background: var(--gold);
}
.footer-mark {
  width: auto; height: 160px; margin: 0 auto 1rem; display: block;
  padding: calc(var(--mark-pad) * 2); background: var(--mark-plate); border-radius: 14px;
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--ink-muted);
  background: var(--paper);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

/* Admin listing guide (storefront mock page) */
.steps { counter-reset: step; display: grid; gap: 1rem; }
.step {
  counter-increment: step;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  padding: 1.15rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.step::before {
  content: counter(step);
  width: 2rem; height: 2rem;
  border-radius: 50%;
  background: var(--accent); color: #fff;
  display: grid; place-items: center;
  font-size: 0.85rem;
}
.admin-form-mock {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 0.85rem;
  opacity: 0.92;
  pointer-events: none;
}
.admin-form-mock label { display: grid; gap: 0.3rem; font-size: 0.85rem; color: var(--ink-muted); }
.admin-form-mock input, .admin-form-mock textarea, .admin-form-mock select {
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
}
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; }
.callout {
  padding: 1rem 1.15rem;
  background: var(--tint);
  border-radius: var(--radius);
  border: 1px solid var(--tint-line);
  margin: 1rem 0 1.5rem;
}
.callout a { color: var(--accent); text-decoration: underline; }
.callout a.btn { text-decoration: none; }
.callout a.btn-primary { color: var(--on-accent); }

@media (max-width: 860px) {
  .hero, .highlight, .product-layout { grid-template-columns: 1fr; }
  :root { --header-h: 80px; }
  .brand-mark { height: 64px; }
  .specs { grid-template-columns: 1fr; }
  .form-row-2 { grid-template-columns: 1fr; }
  .cart-table thead { display: none; }
  .cart-table tr { display: block; padding: 0.75rem 0; }
  .cart-table td { display: block; border: 0; padding: 0.25rem 1rem; }
}

/* Curated highlight */
.highlight-curated .highlight-visual {
  background: var(--curated-grad);
}
.highlight h2 small.jp-accent {
  font-size: 0.8rem; font-weight: 400; color: var(--ink-muted);
  margin-left: 0.6rem; letter-spacing: 0.12em; vertical-align: middle;
}
.hl-actions { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin-top: 1rem; }
.jp-eyebrow { font-size: 0.8rem; letter-spacing: 0.2em; color: var(--ink-muted); margin: 0 0 0.4rem; }
.site-footer .jp-accent { opacity: 0.7; }
/* Japanese accents: zh UI only */
html[data-lang="en"] .jp-accent { display: none; }

/* Owner-only style preview (?theme=…) */
.theme-preview-bar {
  position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%);
  z-index: 120;
  display: flex; align-items: center; gap: 0.9rem;
  width: max-content; max-width: calc(100% - 2rem);
  padding: 0.55rem 0.6rem 0.55rem 1rem;
  border-radius: 16px;
  background: var(--ink); color: var(--bg);
  font-size: 0.85rem;
  box-shadow: 0 10px 30px rgba(28, 27, 25, 0.25);
}
.theme-preview-bar span { display: grid; min-width: 0; line-height: 1.35; }
.theme-preview-bar small { font-size: 0.72rem; opacity: 0.75; }
.theme-preview-bar a {
  flex: none;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: var(--bg); color: var(--ink);
}

/* Notes: cards, pager, article */
.note-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.25rem; }
.note-tile {
  display: flex; flex-direction: column;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .2s, box-shadow .2s;
}
.note-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.note-tile-media { aspect-ratio: 4 / 3; background: var(--ph-grad); overflow: hidden; }
.note-tile-media img { width: 100%; height: 100%; object-fit: cover; }
.note-tile-ph {
  width: 100%; height: 100%; display: grid; place-items: center; padding: 1rem; text-align: center;
  color: rgba(255, 255, 255, 0.9); font-family: var(--font-serif); letter-spacing: 0.06em;
}
.note-tile-body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; gap: 0.35rem; flex: 1; }
.note-tile-body time { font-size: 0.8rem; color: var(--ink-muted); }
.note-tile-body h3 { margin: 0; font-size: 1.15rem; }
.note-tile-body p {
  margin: 0; color: var(--ink-muted); font-size: 0.9rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.note-tile-more { margin-top: auto; padding-top: 0.4rem; font-size: 0.85rem; color: var(--accent-soft); }
.pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.4rem; margin: 2rem 0 0.5rem; }
.pager a, .pager .gap {
  min-width: 40px; height: 40px; padding: 0 0.8rem; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; font-size: 0.9rem;
}
.pager a { border: 1px solid var(--line); background: var(--paper); }
.pager a.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.pager .gap { color: var(--ink-muted); }
.note-article { max-width: 720px; margin: 1rem auto 0; }
.note-article time { font-size: 0.85rem; color: var(--ink-muted); }
.note-article h1 { margin: 0.3rem 0 1.5rem; font-size: clamp(1.7rem, 3.5vw, 2.4rem); }
.note-body p { font-size: 1.02rem; line-height: 1.9; white-space: pre-line; }
.note-body figure { margin: 1.75rem auto; max-width: 72%; }
.note-body figure.size-small { max-width: 46%; }
.note-body figure.size-large { max-width: 100%; }
.note-body figure img {
  display: block; margin: 0 auto;
  max-width: 100%; max-height: 72vh; width: auto; height: auto;
  border-radius: var(--radius);
}
@media (max-width: 700px) {
  .note-body figure { max-width: 100%; }
  .note-body figure.size-small { max-width: 72%; }
}
.note-body figcaption { margin-top: 0.5rem; font-size: 0.85rem; color: var(--ink-muted); text-align: center; }
.note-products, .related-notes { max-width: var(--max); }
.related-notes h2, .note-products h2 { font-size: 1.35rem; }

.product-kicker { font-size: 0.85rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.75rem; }
.product-id {
  font-size: 0.78rem; letter-spacing: 0.04em; color: var(--ink-muted);
  padding: 0.1rem 0.55rem; border: 1px solid var(--line); border-radius: 999px; background: var(--paper);
  font-variant-numeric: tabular-nums;
}

/* Sale prices, badge and sitewide strip */
.price-was { color: var(--ink-muted); font-weight: 400; text-decoration-thickness: 1px; margin-right: 0.15em; }
.price-now { color: var(--sold); font-weight: 600; }
.badge-sale { color: #fff; background: var(--sold); }
.badge-sale-inline { color: #fff; background: var(--sold); border-radius: 999px; padding: 0.15rem 0.6rem; font-size: 0.75rem; font-weight: 500; vertical-align: middle; }
.product-price { font-size: 1.35rem; font-weight: 600; margin: 0.75rem 0; }
.product-price .price-was { font-size: 1rem; }
.sale-strip {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.25rem 1rem;
  padding: 0.55rem 1.25rem; background: var(--sold); color: #fff; font-size: 0.9rem; text-align: center;
}
.sale-strip a { text-decoration: underline; text-underline-offset: 3px; }

/* Checkout: payment methods */
.pay-methods { border: 1px solid var(--line); border-radius: var(--radius); padding: 0.75rem 0.9rem; margin: 0; display: grid; gap: 0.5rem; background: var(--paper); }
.pay-methods legend { padding: 0 0.35rem; font-weight: 600; font-size: 0.95rem; }
.pay-method { display: flex !important; flex-direction: row !important; align-items: flex-start; gap: 0.65rem; padding: 0.65rem 0.7rem; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.pay-method:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.pay-method input { width: auto; margin: 0.3rem 0 0; padding: 0; flex: none; accent-color: var(--accent); }
.pay-method span { display: grid; gap: 0.15rem; }
.pay-method small { color: var(--ink-muted); font-size: 0.85rem; line-height: 1.5; }
.pay-method.is-off { opacity: 0.55; cursor: not-allowed; }
.ship-fields { display: grid; gap: inherit; }
.ship-fields[hidden] { display: none; }
.checkout-total { font-size: 1.1rem; margin: 0.5rem 0; }

/* Photo viewer */
.photo-viewer {
  position: fixed; inset: 0; z-index: 200;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center;
  background: rgba(14, 14, 12, 0.92);
}
.photo-viewer[hidden] { display: none; }
.pv-stage { margin: 0; height: 100vh; display: grid; place-items: center; grid-template-rows: 1fr auto; padding: 3.5rem 0.5rem 1rem; min-width: 0; }
.pv-stage img { max-width: 100%; max-height: calc(100vh - 6rem); object-fit: contain; }
.pv-stage figcaption { color: rgba(255, 255, 255, 0.75); font-size: 0.85rem; padding-top: 0.5rem; }
.pv-close, .pv-nav { border: 0; background: rgba(255, 255, 255, 0.12); color: #fff; cursor: pointer; border-radius: 999px; }
.pv-close { position: absolute; top: 0.8rem; right: 0.8rem; width: 44px; height: 44px; font-size: 1.6rem; line-height: 1; }
.pv-nav { width: 48px; height: 48px; margin: 0 0.6rem; font-size: 1.8rem; line-height: 1; }
.pv-nav[hidden] { visibility: hidden; display: block; }
@media (max-width: 700px) {
  .photo-viewer { grid-template-columns: 1fr; }
  .pv-nav { position: absolute; bottom: 1rem; }
  .pv-prev { left: 1rem; }
  .pv-next { right: 1rem; }
}
body.no-scroll { overflow: hidden; }

/* Contact channels */
.header-contact { display: flex; gap: 0.25rem; }
.contact-link { display: inline-flex; align-items: center; gap: 0.4rem; color: inherit; }
.contact-link svg { width: 20px; height: 20px; flex: none; }
.header-contact .contact-link {
  width: 36px; height: 36px; justify-content: center; border-radius: 999px;
  border: 1px solid var(--header-line); background: var(--header-paper); color: var(--header-ink);
}
.nav-contact { display: flex; flex-wrap: wrap; gap: 0.5rem; width: 100%; }
.nav-contact .contact-link {
  min-height: 44px; padding: 0 1rem; border-radius: 999px;
  border: 1px solid var(--header-line); background: var(--header-paper); color: var(--header-ink);
}
.footer-contact { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.4rem 1.1rem; }
.footer-contact .contact-link { text-decoration: none; }
.footer-contact .contact-link span { text-decoration: underline; text-underline-offset: 2px; }
.footer-contact-title { width: 100%; font-size: 0.8rem; letter-spacing: 0.08em; }
/* The header row is fixed at the page width and already full: contact links live in the ☰ menu and the footer. */
.header-actions .header-contact { display: none; }

/* 404 */
.notfound { padding: 4rem 0 3rem; max-width: 36rem; }
.notfound h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.notfound-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }

/* English labels are longer: tighten the desktop header so it stays on one line. */
@media (min-width: 1181px) {
  .header-inner { max-width: 1280px; }
  html[data-lang="en"] .nav { font-size: 0.88rem; gap: 0.35rem 0.7rem; }
  html[data-lang="en"] .brand-en, .nav a, .header-actions a, .header-actions button { white-space: nowrap; }
  html[data-lang="en"] .header-inner { gap: 0.8rem; }
  html[data-lang="en"] .header-actions { gap: 0.45rem; }
  html[data-lang="en"] .cart-link { font-size: 0.92rem; padding: 0.4rem 0.65rem; }
}
