:root {
  --ink: #17211f;
  --muted: #5d6b68;
  --line: #e3e8e6;
  --paper: #f6f7f6;
  --card: #ffffff;
  --accent: #0e6b62;
  --accent-ink: #f4fffd;
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
}

body {
  font-family: "Avenir Next", "Segoe UI", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  min-height: 100vh;
  letter-spacing: 0;
}

main, footer {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.bar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(246, 247, 246, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.bar-inner {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
  min-height: 64px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.account {
  margin: 0 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.menu-toggle {
  display: none;
  width: 40px;
  height: 36px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}

.menu-toggle span {
  display: block;
  height: 1px;
  background: var(--ink);
}

.account button {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 6px 12px;
  font: inherit;
  cursor: pointer;
}

.mark {
  margin: 0;
  font-weight: 650;
  letter-spacing: 0.02em;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  color: inherit;
  text-decoration: none;
}

.mark img {
  height: 28px;
  width: auto;
  display: block;
}

h1 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.lede, .status, footer p, .stall, .meta {
  color: var(--muted);
}

.lede { margin: 4px 0 0; max-width: 36rem; line-height: 1.45; font-size: 0.92rem; }

main { padding: 20px 0 48px; }

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
  margin-bottom: 18px;
}

.status { min-height: 1.4em; margin: 0; white-space: nowrap; }

.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  box-shadow: 0 1px 2px rgba(23, 33, 31, 0.04);
}

.shot {
  position: relative;
  aspect-ratio: 1;
  background: #ebe4d8;
  overflow: hidden;
}

.heart {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(23, 33, 31, 0.16);
}

.heart svg, .save svg { width: 18px; height: 18px; display: block; }

.heart[aria-pressed="true"],
.save[data-kind="style"][aria-pressed="true"] { color: #c23b3b; }

.card-link { color: inherit; text-decoration: none; }
.shot > .card-link { display: block; width: 100%; height: 100%; }

.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.shot .empty-shot {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.body { padding: 14px 14px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }

.stall {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
}

h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.35;
}

.meta { margin: 0; font-variant-numeric: tabular-nums; }

.price-line {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.finder {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  flex: 1 1 280px;
  max-width: 440px;
  padding: 4px 4px 4px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(23, 33, 31, 0.04);
}

.finder-icon, .finder button svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--muted);
}

.finder input[type="search"] {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  font: inherit;
  padding: 8px 0;
  color: var(--ink);
}

.finder input[type="search"]:focus { outline: none; }

.finder button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
}

.finder button:hover { background: #e7eeec; }

.finder input[type="file"] { display: none; }

.ask {
  margin-top: auto;
  align-self: flex-start;
  background: var(--accent);
  color: var(--accent-ink);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.88rem;
}

.ask:hover { background: #094843; }

.actions {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.actions .ask {
  flex: 1 1 0;
  margin-top: 0;
  align-self: auto;
  text-align: center;
  white-space: nowrap;
}

footer {
  padding: 8px 0 36px;
  border-top: 1px solid var(--line);
}

footer p { margin: 16px 0 0; font-size: 0.88rem; line-height: 1.45; max-width: 40rem; }

.mark a { color: inherit; text-decoration: none; }

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  align-items: center;
  margin: 0;
  flex: 0 0 auto;
}

.nav a, .nav button {
  color: var(--ink);
  background: transparent;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
}

.nav a[aria-current="page"] { color: var(--accent); font-weight: 650; }
.nav button:hover, .nav a:hover { color: var(--accent); }

.nav input[type="file"] { display: none; }

body.sheet-open { overflow: hidden; }

.sheet {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(28, 25, 21, 0.45);
  display: grid;
  place-items: end center;
}

.sheet[hidden] { display: none; }

.sheet-card {
  width: 100%;
  max-height: 92dvh;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 16px 40px rgba(23, 33, 31, 0.16);
  overflow: hidden;
}

.sheet-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.sheet-bar h2 { font-size: 1rem; }

.sheet-bar button {
  background: transparent;
  border: 0;
  font: inherit;
  cursor: pointer;
}

.sheet-scroll { overflow: auto; }

.sheet-top { display: grid; }

.sheet-side { padding: 16px; display: grid; gap: 12px; align-content: start; }

.gallery { background: #ebe4d8; }

.stage {
  position: relative;
  aspect-ratio: 1;
  background: #ebe4d8;
}

.stage > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.gal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: 0;
  background: rgba(255, 252, 247, 0.9);
  color: var(--ink);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.gal-prev { left: 8px; }
.gal-next { right: 8px; }

.lens {
  position: absolute;
  width: 240px;
  height: 240px;
  margin: -120px 0 0 -120px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 8px 24px rgba(23, 33, 31, 0.28);
  pointer-events: none;
  background-repeat: no-repeat;
  z-index: 2;
}

.lens[hidden] { display: none; }

.thumbs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px;
}

.thumbs button {
  flex: 0 0 auto;
  padding: 0;
  border: 2px solid transparent;
  background: transparent;
  cursor: pointer;
}

.thumbs button[aria-current="true"] { border-color: var(--accent); }

.thumbs img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  display: block;
}

.sku-colors {
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.sku-colors button {
  flex: 0 0 auto;
  display: grid;
  gap: 4px;
  justify-items: center;
  width: 72px;
  padding: 4px;
  border: 2px solid transparent;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.sku-colors button[aria-current="true"] { border-color: var(--accent); }

.sku-colors img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  display: block;
  background: #ebe4d8;
}

.sku-colors span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.75rem;
}

.sku-sizes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.sku-sizes div {
  border: 1px solid var(--line);
  padding: 8px 6px;
  display: grid;
  gap: 2px;
  font-variant-numeric: tabular-nums;
}

.sku-sizes span:last-child { color: var(--muted); font-size: 0.78rem; }

.detail-page { width: min(1080px, calc(100% - 32px)); margin: 24px auto 48px; }

.detail-stage { display: grid; gap: 16px; margin-top: 16px; }

.detail-page h1 { font-size: 1.35rem; margin: 0 0 8px; }

.detail-root {
  border-top: 1px solid var(--line);
  padding: 16px 16px 28px;
}

.detail-root h3 { margin: 0 0 12px; font-size: 1rem; }

.detail-copy { margin-bottom: 12px; line-height: 1.5; }

.detail-copy img,
.detail-shot {
  width: 100%;
  height: auto;
  display: block;
  margin: 0;
}

.essentials {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 4px;
}

.essentials div {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.essentials dt {
  color: var(--muted);
  font-size: 0.78rem;
}

.essentials dd {
  margin: 4px 0 0;
  font-variant-numeric: tabular-nums;
}

.creds {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.creds h3 {
  margin: 0;
  font-size: 0.95rem;
}

.cred {
  display: grid;
  gap: 6px;
}

.cred p { margin: 0; }

.cred-shots { display: flex; gap: 6px; margin-top: 8px; }

.cred-shots img { width: 72px; height: 72px; object-fit: cover; display: block; background: #ebe4d8; }

.badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }

.badges span {
  font-size: 0.72rem;
  border: 1px solid #c9e4df;
  border-radius: 999px;
  padding: 2px 8px;
  color: var(--accent);
  background: #f3faf8;
}

.trust {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 22px;
}

.trust article {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}

.trust h2 { font-size: 0.92rem; margin: 0; }

.trust p { margin: 4px 0 0; color: var(--muted); font-size: 0.82rem; line-height: 1.45; }

.site-foot { padding: 28px 0 36px; }

.site-foot .foot-name { margin: 0; color: var(--ink); font-weight: 650; }

.site-foot p { max-width: 42rem; }

.foot-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.foot-legal a { color: inherit; }

.facts {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 6px 12px;
  margin: 0 0 16px;
}

.facts dt { color: var(--muted); }

button.ask { border: 0; cursor: pointer; font: inherit; }

.sea-chat {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: min(380px, calc(100vw - 24px));
  height: min(560px, calc(100vh - 32px));
  background: var(--card);
  border: 1px solid var(--line);
  z-index: 40;
  display: flex;
  flex-direction: column;
}

.sea-chat[hidden] { display: none; }

.sea-chat-bar, .desk aside header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.sea-chat-bar button, .desk aside header button, .sea-who button {
  background: transparent;
  border: 0;
  font: inherit;
  cursor: pointer;
  color: var(--accent);
}

.desk aside header button[aria-current="true"] {
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.save {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--ink);
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.saves { display: flex; gap: 16px; align-items: center; }

.sea-chat-body, #desk-chat { display: flex; flex-direction: column; min-height: 0; flex: 1; padding: 12px 14px 14px; }

.sea-login, .sea-compose { display: grid; gap: 10px; }

.sea-login label { display: grid; gap: 4px; font-size: 0.88rem; }

.sea-login input, .sea-compose textarea {
  font: inherit;
  border: 1px solid var(--line);
  background: #fff;
  padding: 8px 10px;
}

.sea-login button, .sea-compose button {
  justify-self: start;
  background: var(--accent);
  color: var(--accent-ink);
  border: 0;
  padding: 8px 12px;
  font: inherit;
  cursor: pointer;
}

.sea-auth-switch {
  display: flex;
  gap: 6px;
  padding: 4px;
  background: #e7eeec;
  border-radius: 999px;
  width: max-content;
}

.sea-auth-switch button {
  background: transparent;
  color: var(--ink);
  border-radius: 999px;
  padding: 6px 12px;
}

.sea-auth-switch button[aria-selected="true"] {
  background: #fff;
  box-shadow: 0 1px 2px rgba(23, 33, 31, 0.12);
}

.sea-pass span {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  background: #fff;
}

.sea-pass input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
}

.sea-eye {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: transparent !important;
  color: var(--muted);
}

.sea-eye svg { width: 18px; height: 18px; }

.sea-eye[aria-pressed="true"] { color: var(--ink); }

.sea-error { color: #8a2b2b; min-height: 1.2em; margin: 0; }

.sea-who, .sea-peer { margin: 0 0 8px; color: var(--muted); font-size: 0.88rem; }

.sea-notice {
  margin: 0 0 10px;
  padding: 8px 10px;
  background: #f3f7f6;
  border-radius: 10px;
  color: var(--ink);
  font-size: 0.82rem;
  line-height: 1.45;
}

.sea-tr {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
}

.sea-log {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  overflow: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 180px;
}

.sea-log li { max-width: 85%; padding: 8px 10px; white-space: pre-wrap; }

.sea-log .mine { align-self: flex-end; background: var(--accent); color: var(--accent-ink); }

.sea-log .theirs { align-self: flex-start; background: #efe8dc; }

.desk {
  display: grid;
  grid-template-columns: minmax(220px, 300px) 1fr;
  min-height: 62vh;
  background: var(--card);
  border: 1px solid var(--line);
}

.desk aside header p { margin: 0; }

.desk aside ol { list-style: none; margin: 0; padding: 0; }

.desk aside li {
  display: flex;
  gap: 8px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 10px 14px;
}

.desk aside li a { color: inherit; text-decoration: none; flex: 1 1 auto; }

.desk aside li button {
  text-align: left;
  background: transparent;
  border: 0;
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.desk aside li > button:only-child { flex: 1 1 auto; }

.desk section { display: flex; min-width: 0; }

@media (max-width: 680px) {
  .bar-inner { flex-wrap: wrap; width: min(1120px, calc(100% - 28px)); min-height: 56px; gap: 10px 12px; padding: 8px 0; }
  .finder { order: 5; flex: 1 1 100%; max-width: none; }
  .menu-toggle { display: inline-flex; }
  .nav { display: none; order: 6; width: 100%; flex-direction: column; align-items: flex-start; padding: 4px 0 8px; }
  .nav.is-open { display: flex; }
  .trust { grid-template-columns: 1fr 1fr; }
  .page-head { align-items: flex-start; flex-direction: column; gap: 8px; }
  .status { white-space: normal; }
  main, footer { width: min(1120px, calc(100% - 28px)); }
  .desk { grid-template-columns: 1fr; }
  .essentials { grid-template-columns: 1fr; }
}

@media (min-width: 800px) {
  .sheet { place-items: center; padding: 24px; }
  .sheet-card { width: min(1040px, 100%); max-height: 90vh; border-radius: 20px; overflow: hidden; }
  .detail-stage { grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr); align-items: start; }
  .sheet-top { grid-template-columns: minmax(0, 1.05fr) minmax(260px, 0.95fr); }
  .sheet-side { padding: 20px 22px 24px; }
  .detail-root { padding: 20px 22px 32px; }
}
