/* ============================================================
   tradego.ch
   One typeface: Geist. Near-black ground with film grain and
   one warm ambient light. Machined surfaces: hairline ring +
   inner highlight + soft tinted shadow. One amber accent.
   ============================================================ */

:root {
  --bg: #0b0b0c;
  --surface: #131315;
  --surface-2: #1a1a1d;
  --ring: rgba(255, 255, 255, 0.08);
  --ring-strong: rgba(255, 255, 255, 0.16);
  --highlight: rgba(255, 255, 255, 0.05);
  --text: #f2f2f3;
  --text-2: #a3a3ab;
  --text-3: #74747d;
  --accent: #d9a54e;
  --accent-hover: #e4b464;
  --accent-ink: #171208;
  --accent-dim: rgba(217, 165, 78, 0.14);
  --danger: #e5654d;
  --plate: #f0ede7;
  --plate-2: #e3dfd5;

  --r-mythic: #de6c31;
  --r-rare: #d9a54e;
  --r-uncommon: #9aa3ad;

  --font: "Geist", system-ui, -apple-system, sans-serif;

  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --radius-lg: 16px;
  --radius: 12px;
  --radius-sm: 9px;

  --shadow-soft: 0 24px 48px -24px rgba(0, 0, 0, 0.75);
  --shadow-lift: 0 20px 40px -16px rgba(0, 0, 0, 0.7), 0 4px 12px -6px rgba(0, 0, 0, 0.5);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100dvh;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}
/* film grain: fixed, non-interactive, breaks digital flatness */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.032;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
h1, h2, h3, h4, p { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
::selection { background: var(--accent); color: var(--accent-ink); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }
@media (max-width: 640px) { .wrap { width: calc(100% - 32px); } }

/* scroll reveal (JS adds .in; static without JS) */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- header ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(11, 11, 12, 0.78);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--ring);
  box-shadow: inset 0 1px 0 var(--highlight);
}
.site-head .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 60px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}
.brand svg { display: block; }
.brand .tld { color: var(--text-3); }

.site-nav { display: flex; gap: 2px; margin-left: auto; }
.site-nav a {
  text-decoration: none;
  color: var(--text-2);
  padding: 7px 11px;
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 500;
  transition: color 200ms var(--ease), background-color 200ms var(--ease);
}
.site-nav a:hover { color: var(--text); background: var(--surface-2); }
.site-nav a[aria-current="page"] { color: var(--text); }

.cart-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border: 1px solid var(--ring-strong);
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 500;
  text-decoration: none;
  box-shadow: inset 0 1px 0 var(--highlight);
  transition: border-color 200ms var(--ease), background-color 200ms var(--ease), transform 200ms var(--ease);
}
.cart-btn:hover { border-color: var(--text-3); background: var(--surface-2); }
.cart-btn:active { transform: scale(0.97); }
.cart-btn .count {
  font-size: 0.72rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  min-width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  padding-inline: 4px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  transition: transform 300ms var(--ease);
}
.cart-btn .count.bump { transform: scale(1.22); }
.cart-btn .count:empty { display: none; }

@media (max-width: 640px) {
  .site-head .wrap { gap: 8px; }
  .site-nav a { padding: 7px 8px; }
  .cart-btn > span:not(.count) { display: none; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 550;
  font-size: 0.9rem;
  text-decoration: none;
  border-radius: 999px;
  padding: 11px 22px;
  transition: background-color 200ms var(--ease), border-color 200ms var(--ease), color 200ms var(--ease), transform 200ms var(--ease), box-shadow 200ms var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn-gold {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32), 0 8px 24px -10px rgba(217, 165, 78, 0.45);
}
.btn-gold:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-ghost {
  border: 1px solid var(--ring-strong);
  color: var(--text);
  box-shadow: inset 0 1px 0 var(--highlight);
}
.btn-ghost:hover { border-color: var(--text-3); background: var(--surface-2); }
.btn-ink {
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.btn-ink:hover { background: #fff; transform: translateY(-1px); }
.btn-ink[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: 88px 0 104px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 64px;
  align-items: center;
}
/* one warm ambient light source, top right */
.hero::before {
  content: "";
  position: absolute;
  top: -30%;
  right: -12%;
  width: 620px;
  height: 620px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217, 165, 78, 0.13) 0%, rgba(217, 165, 78, 0.04) 42%, transparent 70%);
  pointer-events: none;
}
@media (max-width: 940px) {
  .hero { grid-template-columns: 1fr; padding: 52px 0 64px; gap: 52px; }
  .hero::before { right: -40%; top: -12%; }
}

.hero-copy { position: relative; }
.hero-copy h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.2rem);
  line-height: 1.06;
  letter-spacing: -0.035em;
  font-weight: 650;
  max-width: 19ch;
  text-wrap: balance;
}
.hero-copy h1 em {
  font-style: normal;
  color: var(--accent);
}
.hero-copy p {
  margin-top: 20px;
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--text-2);
  max-width: 46ch;
}
.hero-actions { display: flex; align-items: center; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.hero-notes {
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
  color: var(--text-2);
  font-size: 0.86rem;
}
.hero-notes li { display: flex; gap: 10px; align-items: baseline; }
.hero-notes li::before {
  content: "";
  flex: none;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateY(-2px);
}

.hero-visual {
  position: relative;
  aspect-ratio: 5 / 4;
  min-height: 300px;
}
.hero-visual .fan { position: absolute; inset: 0; }
.hero-visual .fan img {
  position: absolute;
  width: 47%;
  border-radius: 4.6% / 3.4%;
  box-shadow: 0 24px 48px -18px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.07);
  bottom: 5%;
  left: 50%;
  transform-origin: 50% 128%;
  transform: translateX(-50%) rotate(var(--r, 0deg));
  transition: transform 600ms var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .hero-visual:hover .fan img { transform: translateX(-50%) rotate(calc(var(--r, 0deg) * 1.18)); }
}

/* ---------- sections ---------- */
.section { padding: 28px 0 72px; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.section-head h2 {
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.section-head .more {
  color: var(--text-2);
  text-decoration: none;
  font-size: 0.86rem;
  transition: color 200ms var(--ease);
}
.section-head .more:hover { color: var(--accent); }

/* ---------- singles grid ---------- */
.binder { border: 0; padding: 0; background: none; }
.binder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 26px 20px;
}
@media (max-width: 640px) {
  .binder-grid { grid-template-columns: repeat(2, 1fr); gap: 22px 12px; }
}

/* home: featured asymmetric grid, first card leads */
.featured-grid { grid-template-columns: repeat(4, 1fr); }
.featured-grid .pocket:first-child { grid-column: span 2; grid-row: span 2; }
.featured-grid .pocket:first-child .pname { font-size: 1.05rem; }
.featured-grid .pocket:first-child .price { font-size: 1.1rem; }
@media (max-width: 640px) {
  .featured-grid { grid-template-columns: repeat(2, 1fr); }
  .featured-grid .pocket:first-child { grid-column: span 2; grid-row: auto; }
}

.pocket {
  display: flex;
  flex-direction: column;
  gap: 11px;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 600ms var(--ease), transform 600ms var(--ease);
  transition-delay: var(--stagger, 0ms);
}
@starting-style {
  .pocket { opacity: 0; transform: translateY(16px); }
}

.sleeve {
  position: relative;
  border-radius: 4.6% / 3.6%;
  overflow: hidden;
  background: var(--surface);
  aspect-ratio: 488 / 680;
  width: 100%;
  display: block;
  text-align: left;
  box-shadow: 0 0 0 1px var(--ring), 0 12px 28px -16px rgba(0, 0, 0, 0.6);
  transition: box-shadow 300ms var(--ease), transform 300ms var(--ease);
}
.sleeve img { width: 100%; height: 100%; object-fit: cover; }
@media (hover: hover) and (pointer: fine) {
  .sleeve:hover {
    transform: translateY(-4px);
    box-shadow: 0 0 0 1px var(--ring-strong), var(--shadow-lift);
  }
}

.pocket .plate { display: flex; flex-direction: column; gap: 3px; }
.pocket .pname {
  font-weight: 550;
  font-size: 0.9rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pocket .pmeta {
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.pocket .pmeta .r-mythic { color: var(--r-mythic); }
.pocket .pmeta .r-rare { color: var(--r-rare); }
.pocket .pmeta .r-uncommon { color: var(--r-uncommon); }
.pocket .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 5px;
}
.price {
  font-weight: 600;
  font-size: 0.94rem;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.add-btn {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--ring-strong);
  display: grid;
  place-items: center;
  color: var(--text-2);
  box-shadow: inset 0 1px 0 var(--highlight);
  transition: border-color 200ms var(--ease), color 200ms var(--ease), background-color 200ms var(--ease), transform 200ms var(--ease);
}
.add-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }
.add-btn:active { transform: scale(0.9); }
.add-btn svg { display: block; }
.add-btn[disabled] { opacity: 0.35; cursor: not-allowed; }

/* ---------- sealed grid ---------- */
.shelf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
@media (max-width: 640px) { .shelf-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }

/* machined card: outer shell + inner plate (double bezel) */
.pack {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--ring), inset 0 1px 0 var(--highlight), 0 14px 32px -20px rgba(0, 0, 0, 0.6);
  padding: 6px;
  opacity: 1;
  transform: translateY(0);
  transition: box-shadow 300ms var(--ease), transform 300ms var(--ease), opacity 600ms var(--ease);
}
@starting-style {
  .pack { opacity: 0; transform: translateY(16px); }
}
@media (hover: hover) and (pointer: fine) {
  .pack:hover {
    transform: translateY(-4px);
    box-shadow: 0 0 0 1px var(--ring-strong), inset 0 1px 0 var(--highlight), var(--shadow-lift);
  }
}
.pack-art {
  position: relative;
  aspect-ratio: 5 / 3.6;
  display: grid;
  place-items: center;
  border-radius: calc(var(--radius-lg) - 6px);
  overflow: hidden;
  background: linear-gradient(170deg, var(--plate), var(--plate-2));
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06), inset 0 2px 8px rgba(46, 38, 20, 0.1);
}
.pack-art .product-shot {
  width: 74%;
  height: 82%;
  object-fit: contain;
  mix-blend-mode: multiply;
  filter: drop-shadow(0 12px 18px rgba(40, 32, 16, 0.24));
  transition: transform 400ms var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .pack:hover .product-shot { transform: scale(1.045) translateY(-2px); }
}
.pack-art.has-art { background-size: cover; background-position: center; }
.pack-art .set-ico { width: 56px; height: 56px; object-fit: contain; opacity: 0.5; }
.pack-art .set-code,
.pack-art .cat-tag {
  position: absolute;
  bottom: 10px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.94);
  background: rgba(14, 14, 16, 0.78);
  border-radius: 999px;
  padding: 3px 9px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.pack-art .set-code { left: 10px; }
.pack-art .cat-tag { right: 10px; }

.pack-body { padding: 15px 12px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.pack-body h3 { font-size: 0.97rem; font-weight: 600; line-height: 1.35; letter-spacing: -0.015em; }
.pack-body .desc { color: var(--text-2); font-size: 0.84rem; line-height: 1.55; flex: 1; }
.pack-body .row { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.stock-note {
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.stock-note.low { color: var(--r-mythic); }
.pack-body .btn { border-radius: var(--radius-sm); }

/* ---------- how ordering works ---------- */
.receipt {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: 0 0 0 1px var(--ring), inset 0 1px 0 var(--highlight);
  padding: clamp(26px, 3.6vw, 44px);
}
.receipt h2 { font-size: 1.3rem; font-weight: 600; letter-spacing: -0.02em; }
.receipt ol {
  list-style: none;
  counter-reset: step;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
}
@media (max-width: 800px) { .receipt ol { grid-template-columns: 1fr; gap: 22px; } }
.receipt li { counter-increment: step; position: relative; padding-top: 18px; }
.receipt li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--ring-strong), var(--ring) 60%, transparent);
}
.receipt li h3 { font-size: 0.95rem; font-weight: 600; display: flex; gap: 11px; align-items: baseline; }
.receipt li h3::after {
  content: counter(step, decimal-leading-zero);
  margin-left: auto;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.receipt li p { margin-top: 9px; color: var(--text-2); font-size: 0.87rem; line-height: 1.6; }
.receipt .fineprint {
  margin-top: 30px;
  padding-top: 16px;
  border-top: 1px solid var(--ring);
  font-size: 0.8rem;
  color: var(--text-3);
}

/* ---------- why swiss ---------- */
.duo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: start;
}
@media (max-width: 860px) { .duo { grid-template-columns: 1fr; } }
.duo h2 {
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.2;
  max-width: 20ch;
  text-wrap: balance;
}
.duo .lede { color: var(--text-2); margin-top: 16px; max-width: 54ch; font-size: 0.95rem; line-height: 1.7; }
.ledger { display: flex; flex-direction: column; margin: 0; }
.ledger > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 18px;
  padding: 14px 2px;
  border-bottom: 1px solid var(--ring);
}
.ledger > div:first-child { border-top: 1px solid var(--ring); }
.ledger dt { font-weight: 550; font-size: 0.9rem; }
.ledger dd { margin: 0; color: var(--text-2); font-size: 0.86rem; text-align: right; max-width: 30ch; }
.ledger .val { color: var(--accent); font-weight: 550; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- footer ---------- */
.site-foot {
  border-top: 1px solid var(--ring);
  margin-top: 48px;
  padding: 48px 0 60px;
  color: var(--text-2);
  font-size: 0.86rem;
}
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 36px; }
@media (max-width: 800px) { .foot-grid { grid-template-columns: 1fr; gap: 24px; } }
.site-foot h3 { font-size: 0.86rem; color: var(--text); margin-bottom: 10px; font-weight: 600; }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.site-foot a { color: var(--text-2); text-decoration: none; transition: color 200ms var(--ease); }
.site-foot a:hover { color: var(--text); }
.disclaimer {
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px solid var(--ring);
  font-size: 0.75rem;
  color: var(--text-3);
  max-width: 90ch;
  line-height: 1.6;
}

/* ---------- shop page ---------- */
.shop-head { padding: 44px 0 14px; }
.shop-head h1 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); font-weight: 650; letter-spacing: -0.03em; }
.shop-head p { color: var(--text-2); margin-top: 10px; max-width: 60ch; font-size: 0.93rem; }

.toolbar {
  position: sticky;
  top: 60px;
  z-index: 30;
  background: rgba(11, 11, 12, 0.82);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  padding: 12px 0;
  border-bottom: 1px solid var(--ring);
  margin-bottom: 28px;
}
.toolbar-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.seg {
  display: inline-flex;
  border: 1px solid var(--ring-strong);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
  box-shadow: inset 0 1px 0 var(--highlight);
}
.seg button {
  padding: 6px 15px;
  border-radius: 999px;
  color: var(--text-2);
  font-size: 0.86rem;
  font-weight: 500;
  transition: color 200ms var(--ease), background-color 250ms var(--ease);
}
.seg button[aria-pressed="true"] { background: var(--surface-2); color: var(--text); box-shadow: inset 0 1px 0 var(--highlight); }
.seg button:not([aria-pressed="true"]):hover { color: var(--text); }

.search {
  flex: 1 1 200px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--ring-strong);
  border-radius: 999px;
  padding: 8px 15px;
  box-shadow: inset 0 1px 0 var(--highlight);
  transition: border-color 200ms var(--ease);
}
.search:focus-within { border-color: var(--accent); }
.search input {
  background: none;
  border: 0;
  outline: 0;
  color: var(--text);
  font: inherit;
  font-size: 0.89rem;
  width: 100%;
}
.search input::placeholder { color: var(--text-3); }
.search svg { flex: none; opacity: 0.5; }

.mana-filter { display: inline-flex; gap: 4px; align-items: center; }
.mana-filter button {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  opacity: 0.4;
  filter: saturate(0.7);
  transition: opacity 200ms var(--ease), border-color 200ms var(--ease), filter 200ms var(--ease), transform 200ms var(--ease);
}
.mana-filter button img { width: 20px; height: 20px; }
.mana-filter button:hover { opacity: 0.85; }
.mana-filter button:active { transform: scale(0.92); }
.mana-filter button[aria-pressed="true"] { opacity: 1; filter: none; border-color: var(--accent); background: var(--accent-dim); }

select.sort {
  appearance: none;
  background-color: transparent;
  border: 1px solid var(--ring-strong);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 32px 8px 15px;
  font: inherit;
  font-size: 0.86rem;
  cursor: pointer;
  box-shadow: inset 0 1px 0 var(--highlight);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2374747d' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
}

.result-note { color: var(--text-3); font-size: 0.79rem; font-variant-numeric: tabular-nums; }

.empty-state { text-align: center; padding: 90px 20px; color: var(--text-2); }
.empty-state h3 { font-size: 1.15rem; font-weight: 600; color: var(--text); letter-spacing: -0.015em; }
.empty-state p { margin-top: 6px; font-size: 0.9rem; }
.empty-state button { margin-top: 18px; }

/* ---------- product dialog ---------- */
dialog.card-dialog {
  border: 0;
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text);
  padding: 0;
  max-width: min(820px, calc(100vw - 32px));
  width: 100%;
  box-shadow: 0 0 0 1px var(--ring-strong), inset 0 1px 0 var(--highlight), 0 40px 80px -32px rgba(0, 0, 0, 0.85);
  opacity: 1;
  transform: scale(1) translateY(0);
  transition: opacity 250ms var(--ease), transform 250ms var(--ease), overlay 250ms allow-discrete, display 250ms allow-discrete;
}
@starting-style {
  dialog.card-dialog[open] { opacity: 0; transform: scale(0.97) translateY(8px); }
}
dialog.card-dialog::backdrop { background: rgba(5, 5, 6, 0.7); backdrop-filter: blur(3px); }
.dialog-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
@media (max-width: 720px) { .dialog-grid { grid-template-columns: 1fr; } }
.dialog-img {
  padding: 28px;
  display: grid;
  place-items: center;
  background: var(--bg);
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  border-right: 1px solid var(--ring);
}
@media (max-width: 720px) {
  .dialog-img { border-right: 0; border-bottom: 1px solid var(--ring); border-radius: var(--radius-lg) var(--radius-lg) 0 0; padding: 22px 22px 18px; }
}
.dialog-img img {
  width: min(280px, 100%);
  border-radius: 4.6% / 3.4%;
  box-shadow: 0 24px 48px -18px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.dialog-body { padding: 28px; display: flex; flex-direction: column; gap: 8px; }
.dialog-body h2 { font-size: 1.25rem; font-weight: 650; letter-spacing: -0.02em; line-height: 1.25; padding-right: 40px; }
.dialog-body .meta { font-size: 0.78rem; font-weight: 500; color: var(--text-3); font-variant-numeric: tabular-nums; }
.dialog-body .type { color: var(--text-2); font-size: 0.89rem; }
.dialog-body .price { font-size: 1.35rem; margin-top: 8px; }
.dialog-body .cond { color: var(--text-3); font-size: 0.83rem; }
.dialog-actions { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 18px; }
.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--ring-strong);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 1px 0 var(--highlight);
}
.qty button {
  width: 36px;
  height: 38px;
  display: grid;
  place-items: center;
  color: var(--text-2);
  transition: background-color 200ms var(--ease), color 200ms var(--ease);
}
.qty button:hover { background: var(--surface-2); color: var(--text); }
.qty output { min-width: 30px; text-align: center; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--text-2);
  border: 1px solid transparent;
  transition: border-color 200ms var(--ease), color 200ms var(--ease);
}
.dialog-close:hover { color: var(--text); border-color: var(--ring-strong); }

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(150%);
  background: var(--surface-2);
  color: var(--text);
  border-radius: 999px;
  padding: 11px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.87rem;
  font-weight: 500;
  box-shadow: 0 0 0 1px var(--ring-strong), inset 0 1px 0 var(--highlight), 0 16px 40px -12px rgba(0, 0, 0, 0.7);
  transition: transform 450ms var(--ease);
  z-index: 80;
  max-width: calc(100vw - 40px);
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast .t-price { color: var(--accent); font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- cart page ---------- */
.cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
  padding-bottom: 80px;
}
@media (max-width: 900px) { .cart-layout { grid-template-columns: 1fr; } }

.cart-lines { display: flex; flex-direction: column; }
.cart-line {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--ring);
}
.cart-line:first-child { border-top: 1px solid var(--ring); }
.cart-line img, .cart-line .thumb-pack {
  width: 56px;
  border-radius: 7px;
  aspect-ratio: 488 / 680;
  object-fit: cover;
  box-shadow: 0 0 0 1px var(--ring);
}
.cart-line img.thumb-product {
  object-fit: contain;
  background: linear-gradient(170deg, var(--plate), var(--plate-2));
  padding: 4px;
}
.cart-line .thumb-pack {
  display: grid;
  place-items: center;
  background: var(--surface-2);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-2);
}
.cart-line .info { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.cart-line .info .qty { align-self: flex-start; margin-top: 7px; }
.cart-line .info .qty button { height: 32px; width: 32px; }
.cart-line .info .n { font-weight: 550; font-size: 0.91rem; line-height: 1.35; letter-spacing: -0.01em; }
.cart-line .info .m { font-size: 0.74rem; font-weight: 500; color: var(--text-3); font-variant-numeric: tabular-nums; }
.cart-line .side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.line-remove { color: var(--text-3); font-size: 0.79rem; transition: color 200ms var(--ease); }
.line-remove:hover { color: var(--danger); }

.summary-card {
  position: sticky;
  top: 92px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: 0 0 0 1px var(--ring), inset 0 1px 0 var(--highlight), var(--shadow-soft);
  padding: 0;
}
.summary-card .frame-title { padding: 20px 22px 0; }
.summary-card .frame-title h2 { font-size: 1.05rem !important; font-weight: 600; letter-spacing: -0.015em; }
.summary-card .frame-textbox { padding: 14px 22px 22px; display: flex; flex-direction: column; }

.sum-row { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; font-size: 0.89rem; color: var(--text-2); }
.sum-row .price { color: var(--text); }
.sum-row.total {
  border-top: 1px solid var(--ring-strong);
  margin-top: 8px;
  padding-top: 14px;
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--text);
}

.ship-opts { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 4px; }
.ship-opts label {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid var(--ring);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.86rem;
  transition: border-color 200ms var(--ease), background-color 200ms var(--ease);
}
.ship-opts label:has(input:checked) { border-color: var(--accent); background: var(--accent-dim); }
.ship-opts label input { accent-color: var(--accent); }
.ship-opts .s-price { margin-left: auto; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ship-opts .s-sub { display: block; color: var(--text-3); font-size: 0.77rem; margin-top: 2px; }
.ship-opts label.disabled { opacity: 0.45; cursor: not-allowed; }

.checkout-form { display: grid; gap: 13px; margin-top: 16px; min-width: 0; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field label { font-size: 0.81rem; font-weight: 550; color: var(--text-2); }
.field input, .field textarea {
  width: 100%;
  min-width: 0;
  font: inherit;
  font-size: 0.9rem;
  background: var(--bg);
  border: 1px solid var(--ring-strong);
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  color: var(--text);
  transition: border-color 200ms var(--ease), box-shadow 200ms var(--ease);
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.field input.invalid { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(229, 101, 77, 0.12); }
.field .err { color: var(--danger); font-size: 0.77rem; display: none; }
.field.show-err .err { display: block; }
.field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; } }

.pay-opts { display: grid; gap: 8px; }
.pay-opts label {
  display: flex;
  gap: 10px;
  align-items: baseline;
  border: 1px solid var(--ring);
  border-radius: var(--radius);
  padding: 11px 13px;
  cursor: pointer;
  font-size: 0.86rem;
  transition: border-color 200ms var(--ease), background-color 200ms var(--ease);
}
.pay-opts label:has(input:checked) { border-color: var(--accent); background: var(--accent-dim); }
.pay-opts label input { accent-color: var(--accent); }
.pay-opts .p-sub { display: block; color: var(--text-3); font-size: 0.77rem; margin-top: 2px; }

.order-done { text-align: center; padding: 20px 6px; }
.order-done h2 { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.015em; }
.order-done .onum {
  font-size: 1.1rem;
  color: var(--accent);
  font-weight: 650;
  letter-spacing: 0.02em;
  margin: 10px 0;
  display: block;
  font-variant-numeric: tabular-nums;
}
.order-done p { color: var(--text-2); font-size: 0.86rem; max-width: 44ch; margin: 8px auto 0; }
.order-done .btn { margin-top: 16px; }

.cart-empty { text-align: center; padding: 80px 0 100px; }
.cart-empty h1 { font-size: clamp(1.5rem, 3vw, 1.9rem); font-weight: 650; letter-spacing: -0.025em; }
.cart-empty p { color: var(--text-2); margin-top: 10px; }
.cart-empty .btn { margin-top: 24px; }

/* ---------- legal page ---------- */
.legal { max-width: 74ch; padding: 48px 0 90px; }
.legal h1 { font-size: clamp(1.6rem, 3.2vw, 2.1rem); font-weight: 650; letter-spacing: -0.03em; margin-bottom: 6px; }
.legal .updated { color: var(--text-3); font-size: 0.79rem; }
.legal h2 {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 40px 0 12px;
  padding-top: 24px;
  border-top: 1px solid var(--ring);
}
.legal p, .legal li { color: var(--text-2); font-size: 0.91rem; line-height: 1.7; }
.legal p + p { margin-top: 12px; }
.legal a { color: var(--text); }
.legal .placeholder {
  background: var(--accent-dim);
  border: 1px dashed rgba(217, 165, 78, 0.45);
  color: var(--accent);
  border-radius: 6px;
  padding: 1px 7px;
  font-size: 0.85em;
  white-space: nowrap;
}

/* ---------- utilities ---------- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 10px 16px;
  border-radius: 0 0 10px 10px;
  font-weight: 600;
  text-decoration: none;
  z-index: 1000;
  transition: top 200ms var(--ease);
}
.skip-link:focus { top: 0; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
