/* ScaleProof · "Opaline" design system
   Iridescent scales on a night-forest background. One theme, tuned for phones first. */

@font-face { font-family: "Fraunces"; src: url("/fonts/fraunces.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("/fonts/fraunces-italic.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "JB Mono"; src: url("/fonts/mono.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #07100d;
  --bg-2: #0b1713;
  --glass: rgba(255, 255, 255, 0.045);
  --glass-2: rgba(255, 255, 255, 0.075);
  --glass-3: rgba(255, 255, 255, 0.11);
  --line: rgba(220, 255, 240, 0.09);
  --line-2: rgba(220, 255, 240, 0.16);
  --ink: #eef5f0;
  --ink-2: #a9bab1;
  --ink-3: #6f8178;
  --mint: #5eead4;
  --mint-2: #2dd4bf;
  --violet: #b4a1ff;
  --gold: #f6cf86;
  --good: #8af0b0;
  --good-bg: rgba(74, 222, 128, 0.12);
  --warn: #fbd476;
  --warn-bg: rgba(251, 191, 36, 0.12);
  --bad: #ff9b9b;
  --bad-bg: rgba(248, 113, 113, 0.13);
  --info: #9cc7ff;
  --info-bg: rgba(96, 165, 250, 0.13);
  --iri: linear-gradient(115deg, #5eead4 0%, #8ab4ff 32%, #b4a1ff 55%, #f6cf86 88%);
  --iri-soft: linear-gradient(115deg, rgba(94, 234, 212, 0.18), rgba(180, 161, 255, 0.16) 55%, rgba(246, 207, 134, 0.16));
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 20px 60px -24px rgba(0, 0, 0, 0.7), 0 2px 0 rgba(255, 255, 255, 0.03) inset;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JB Mono", ui-monospace, Consolas, monospace;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--bg); overflow-x: hidden; }

/* Aurora + scale texture behind everything */
body::before {
  content: ""; position: fixed; inset: -20vh -20vw; z-index: -2; pointer-events: none;
  background:
    radial-gradient(40vw 32vw at 12% 8%, rgba(45, 212, 191, 0.20), transparent 60%),
    radial-gradient(38vw 30vw at 88% 14%, rgba(180, 161, 255, 0.17), transparent 62%),
    radial-gradient(46vw 34vw at 60% 96%, rgba(246, 207, 134, 0.10), transparent 60%),
    linear-gradient(180deg, #07100d, #081410 60%, #06100c);
  animation: aurora 28s var(--ease) infinite alternate;
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.55;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='48' viewBox='0 0 56 48'%3E%3Cpath d='M14 0 L28 8 L28 24 L14 32 L0 24 L0 8 Z M42 16 L56 24 L56 40 L42 48 L28 40 L28 24 Z' fill='none' stroke='%23c8ffe9' stroke-opacity='0.045' stroke-width='1'/%3E%3C/svg%3E");
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 75%);
}
@keyframes aurora { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(-3vw, 2vh, 0) scale(1.06); } }

a { color: var(--mint); text-decoration: none; transition: color 0.2s; }
a:hover { color: #9ff5e5; }
h1, h2, h3 { font-family: var(--display); font-weight: 560; letter-spacing: -0.01em; margin: 0 0 6px; font-variation-settings: "SOFT" 60, "opsz" 72; }
h1 { font-size: clamp(26px, 4.2vw, 36px); line-height: 1.1; }
h2 { font-size: 20px; line-height: 1.25; }
h3 { font-size: 15.5px; font-family: var(--sans); font-weight: 650; letter-spacing: 0; }
p { margin: 0; line-height: 1.55; }
::selection { background: rgba(94, 234, 212, 0.3); }
.ic-svg { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.18em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--ink-2); font-size: 14px; }
.tiny { color: var(--ink-3); font-size: 12.5px; }
.iri-text { background: var(--iri); -webkit-background-clip: text; background-clip: text; color: transparent; background-size: 200% 100%; animation: sheen 8s linear infinite; }
@keyframes sheen { to { background-position: -200% 0; } }

/* ---------- top bar ---------- */
.top {
  position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px;
  padding: 12px clamp(14px, 3vw, 28px);
  background: rgba(7, 16, 13, 0.72); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-family: var(--display); font-size: 21px; font-weight: 620; letter-spacing: -0.02em; font-variation-settings: "SOFT" 100, "WONK" 1; }
.brand:hover { color: var(--ink); }
.brand svg { width: 30px; height: 30px; filter: drop-shadow(0 0 14px rgba(94, 234, 212, 0.45)); transition: transform 0.6s var(--ease); }
.brand:hover svg { transform: rotate(-12deg) scale(1.06); }
.nav { display: flex; gap: 4px; flex: 1; font-size: 14px; overflow-x: auto; scrollbar-width: none; }
.nav a { color: var(--ink-2); padding: 7px 12px; border-radius: 999px; white-space: nowrap; transition: background 0.2s, color 0.2s; }
.nav a:hover { color: var(--ink); background: var(--glass); }
.nav a.on { color: var(--ink); background: var(--glass-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.acct { font-size: 14px; font-weight: 600; color: var(--ink); padding: 7px 14px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); }
.acct:hover { color: var(--ink); background: var(--glass-2); }
.who select { font-size: 12.5px; padding: 6px 8px; max-width: 170px; }

/* ---------- layout ---------- */
.view { max-width: 1120px; margin: 0 auto; padding: clamp(16px, 3vw, 32px) clamp(14px, 3vw, 28px) 80px; display: grid; gap: 18px; animation: rise 0.5s var(--ease) both; }
@keyframes rise { from { transform: translateY(10px); } to { transform: none; } }
.card {
  position: relative; background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 18px 20px; box-shadow: var(--shadow); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
a.card { color: inherit; transition: transform 0.35s var(--ease), border-color 0.25s, background 0.25s; }
a.card:hover { transform: translateY(-2px); border-color: var(--line-2); background: var(--glass-2); color: inherit; }
.grid2 { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 880px) { .grid2 { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); } }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.between { justify-content: space-between; }
.stack { display: grid; gap: 12px; align-content: start; }
.list { display: grid; gap: 12px; }
.narrow { max-width: 460px; width: 100%; justify-self: center; }
.empty { color: var(--ink-2); font-size: 14px; padding: 6px 0; }

/* ---------- chips & seals ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 550; padding: 4px 11px; border-radius: 999px;
  background: var(--glass-2); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; line-height: 1.4;
}
.chip svg { width: 14px; height: 14px; flex: none; }
.chip.good { background: var(--good-bg); color: var(--good); border-color: rgba(138, 240, 176, 0.22); }
.chip.warn { background: var(--warn-bg); color: var(--warn); border-color: rgba(251, 212, 118, 0.22); }
.chip.bad { background: var(--bad-bg); color: var(--bad); border-color: rgba(255, 155, 155, 0.24); }
.chip.info { background: var(--info-bg); color: var(--info); border-color: rgba(156, 199, 255, 0.24); }
.chip.live {
  color: #08130f; font-weight: 750; border: none; background: var(--iri); background-size: 200% 100%; animation: sheen 4s linear infinite;
  box-shadow: 0 0 22px rgba(94, 234, 212, 0.45);
}
.chip.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #08130f; animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: 0.25; } }
.chip.dna { background: linear-gradient(var(--bg-2), var(--bg-2)) padding-box, var(--iri) border-box; border: 1px solid transparent; color: var(--ink); }
.chip.dna svg { color: var(--mint); }

/* ---------- controls ---------- */
button, .btn {
  font: inherit; font-size: 14.5px; font-weight: 600; padding: 10px 16px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--glass-2); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
  transition: transform 0.2s var(--ease), background 0.2s, border-color 0.2s, box-shadow 0.3s;
}
button:hover, .btn:hover { background: var(--glass-3); border-color: rgba(220, 255, 240, 0.26); color: var(--ink); }
button:active, .btn:active { transform: scale(0.97); }
button:focus-visible, .btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }
button.primary, .btn.primary {
  color: #06120e; border: none; background: var(--iri); background-size: 180% 100%; background-position: 0 0;
  box-shadow: 0 8px 28px -10px rgba(94, 234, 212, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
button.primary:hover, .btn.primary:hover { background-position: 100% 0; color: #06120e; box-shadow: 0 10px 36px -8px rgba(180, 161, 255, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.5); }
button.big { font-size: 18px; padding: 14px 26px; border-radius: 16px; }
button:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
button.link { border: none; background: none; padding: 0; color: var(--mint); font-weight: 550; font-size: inherit; box-shadow: none; }
button.link:hover { background: none; text-decoration: underline; }
input, select, textarea {
  font: inherit; font-size: 15px; padding: 10px 12px; border-radius: 12px; min-width: 0; color: var(--ink);
  background: rgba(0, 0, 0, 0.28); border: 1px solid var(--line-2); transition: border-color 0.2s, box-shadow 0.2s;
}
input::placeholder, textarea::placeholder { color: var(--ink-3); }
input:focus, select:focus, textarea:focus { border-color: rgba(94, 234, 212, 0.55); box-shadow: 0 0 0 4px rgba(94, 234, 212, 0.12); outline: none; }
select option { background: #0d1a16; color: var(--ink); }
textarea { width: 100%; min-height: 70px; resize: vertical; }
input[type=checkbox] { accent-color: var(--mint-2); }
input[type=date] { color-scheme: dark; }
label.field { display: grid; gap: 6px; font-size: 13px; color: var(--ink-2); font-weight: 550; }
form.stack > button { justify-self: start; }

/* ---------- hero (home) ---------- */
.hero { position: relative; padding: clamp(28px, 6vw, 72px) 0 clamp(8px, 2vw, 18px); display: grid; gap: 22px; }
.hero .eyebrow { display: inline-flex; align-items: center; gap: 8px; width: fit-content; font-size: 12.5px; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); padding: 6px 12px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); }
.hero h1 { font-size: clamp(38px, 7.6vw, 78px); line-height: 1.0; font-weight: 520; letter-spacing: -0.035em; font-variation-settings: "SOFT" 100, "WONK" 1, "opsz" 144; max-width: 14ch; }
.hero .lede { font-size: clamp(16px, 2vw, 19px); color: var(--ink-2); max-width: 54ch; line-height: 1.6; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-art { position: absolute; right: -6%; top: 6%; width: min(46vw, 520px); aspect-ratio: 1; pointer-events: none; opacity: 0.9; z-index: -1; }
.hero-art svg { width: 100%; height: 100%; animation: float 14s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-14px) rotate(4deg); } }
@media (min-width: 1000px) { .hero { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); column-gap: 30px; } .hero > :not(.hero-art) { grid-column: 1; } .hero-art { position: relative; right: auto; top: auto; width: 100%; grid-column: 2; grid-row: 1 / span 4; align-self: center; z-index: 0; } }
@media (max-width: 999px) { .hero-art { position: relative; right: auto; top: auto; width: min(64%, 340px); justify-self: center; margin: -6px 0 -14px; opacity: 0.9; order: -1; z-index: 0; } }
.pillars { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.pillar { padding: 18px; border-radius: var(--radius-lg); background: var(--glass); border: 1px solid var(--line); display: grid; gap: 8px; }
.pillar .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--iri-soft); border: 1px solid var(--line-2); color: var(--mint); }
.pillar .ic svg { width: 22px; height: 22px; }
.pillar b { font-family: var(--display); font-weight: 580; font-size: 18px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 8px; }

/* ---------- show cards ---------- */
.show-card { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; }
.show-card .thumb { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; background: var(--iri-soft); border: 1px solid var(--line-2); }
.show-card .thumb svg { width: 34px; height: 34px; }
.show-card.is-live { background: linear-gradient(var(--bg-2), var(--bg-2)) padding-box, var(--iri) border-box; border: 1px solid transparent; box-shadow: 0 0 0 1px rgba(94, 234, 212, 0.1), 0 24px 70px -30px rgba(94, 234, 212, 0.55); }
.trust { color: var(--good); font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }
.trust svg { width: 14px; height: 14px; }
.trust-ring { --p: 80; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-weight: 750; font-size: 15px; background: conic-gradient(var(--mint) calc(var(--p) * 1%), rgba(255, 255, 255, 0.08) 0); position: relative; }
.trust-ring::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--bg-2); }
.trust-ring span { position: relative; z-index: 1; }
@media (max-width: 560px) { .show-card { grid-template-columns: auto 1fr; } .show-card .trust-ring { display: none; } }

/* ---------- live room ---------- */
.stage { position: relative; aspect-ratio: 16 / 9; min-height: 210px; border-radius: var(--radius-lg); overflow: hidden; color: var(--ink-3); font-size: 13.5px; background: radial-gradient(120% 90% at 30% 10%, #12261f, #070e0b 70%); border: 1px solid var(--line); box-shadow: var(--shadow); }
.stage::before { content: ""; position: absolute; inset: 0; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='48' viewBox='0 0 56 48'%3E%3Cpath d='M14 0 L28 8 L28 24 L14 32 L0 24 L0 8 Z M42 16 L56 24 L56 40 L42 48 L28 40 L28 24 Z' fill='none' stroke='%235eead4' stroke-opacity='0.07' stroke-width='1'/%3E%3C/svg%3E"); }
.video-box { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; display: none; }
.video-box.has-video .video { display: block; }
.video-msg { position: relative; padding: 0 26px; text-align: center; max-width: 360px; color: var(--ink-2); }
.video-box.has-video .video-msg:empty { display: none; }
.video-box.has-video .video-msg { position: absolute; top: 52px; left: 12px; right: 12px; margin: 0 auto; color: #fff; background: rgba(0, 0, 0, 0.5); border-radius: 10px; padding: 5px 12px; font-size: 12.5px; width: fit-content; backdrop-filter: blur(8px); }
.video-controls { position: absolute; top: 12px; right: 12px; display: flex; gap: 6px; z-index: 3; }
.video-controls button { font-size: 12.5px; padding: 7px 12px; background: rgba(0, 0, 0, 0.45); backdrop-filter: blur(10px); }
.video-controls button.primary { background: var(--iri); }
.overlay { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.overlay .tl { position: absolute; top: 12px; left: 12px; pointer-events: auto; }
.overlay .bl { position: absolute; bottom: 12px; left: 12px; right: 12px; display: flex; align-items: center; gap: 10px; pointer-events: auto; }
.avatar { width: 38px; height: 38px; border-radius: 12px; background: var(--iri); color: #06120e; font-size: 13px; font-weight: 800; display: grid; place-items: center; flex: none; box-shadow: 0 0 18px rgba(94, 234, 212, 0.4); }
.who-plate { background: rgba(5, 12, 10, 0.62); border: 1px solid var(--line); border-radius: 12px; padding: 5px 11px; backdrop-filter: blur(10px); }
.who-plate p { font-size: 13.5px; }
.lot-head h2 { font-size: clamp(22px, 3vw, 28px); }
.bidbar > div:first-child { flex: 1; min-width: 0; }
.bidbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; padding: 16px; border-radius: 18px; background: rgba(0, 0, 0, 0.25); border: 1px solid var(--line); }
.price { font-family: var(--display); font-size: clamp(38px, 6vw, 52px); font-weight: 600; line-height: 1; letter-spacing: -0.03em; font-variation-settings: "opsz" 144, "SOFT" 50; }
.price.bump { animation: bump 0.7s var(--ease); }
@keyframes bump { 0% { transform: scale(1); text-shadow: none; } 30% { transform: scale(1.12); text-shadow: 0 0 30px rgba(94, 234, 212, 0.9); color: #b9fff1; } 100% { transform: scale(1); } }
.clock { font-variant-numeric: tabular-nums; font-weight: 650; color: var(--ink-2); }
.clock.hurry { color: var(--bad); animation: blink 0.8s infinite; }
.timebar { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.07); overflow: hidden; margin-top: 8px; }
.timebar > i { display: block; height: 100%; background: var(--iri); transition: width 0.12s linear; }
.timebar.hurry > i { background: linear-gradient(90deg, #ff9b9b, #f6cf86); }
.bidbtn { position: relative; overflow: hidden; }
.bidbtn::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%); transform: translateX(-120%); animation: glint 2.8s ease-in-out infinite; }
@keyframes glint { 60%, 100% { transform: translateX(120%); } }
.custom { display: flex; gap: 8px; }
.custom input { width: 130px; }
.blocked { background: var(--bad-bg); color: var(--bad); border: 1px solid rgba(255, 155, 155, 0.24); border-radius: 14px; padding: 12px 14px; font-size: 14px; }
.won { background: linear-gradient(var(--bg-2), var(--bg-2)) padding-box, var(--iri) border-box; border: 1.5px solid transparent; }
.won h2 { font-size: 24px; }
.bids p { display: flex; justify-content: space-between; font-size: 14px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.bids p:last-child { border-bottom: none; }
.bids p.you { color: var(--mint); font-weight: 650; }

.lots { display: grid; gap: 8px; }
.lot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 14px; font-size: 14px; background: rgba(0, 0, 0, 0.18); color: var(--ink); transition: border-color 0.2s, background 0.2s; }
a.lot:hover { border-color: var(--line-2); background: var(--glass); color: var(--ink); }
.lot.open { border-color: rgba(94, 234, 212, 0.45); background: rgba(94, 234, 212, 0.08); box-shadow: 0 0 24px -8px rgba(94, 234, 212, 0.5); }
.chat { display: grid; gap: 6px; max-height: 220px; overflow-y: auto; font-size: 14px; padding-right: 4px; }
.chat p { padding: 6px 10px; border-radius: 12px; background: rgba(0, 0, 0, 0.2); width: fit-content; max-width: 100%; }
.chat b { color: var(--mint); font-weight: 650; }

/* win celebration: iridescent scales burst */
.burst { position: fixed; inset: 0; pointer-events: none; z-index: 50; overflow: hidden; }
.burst i { position: absolute; left: 50%; top: 45%; width: 14px; height: 16px; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: var(--iri); opacity: 0; animation: fly 1.6s var(--ease) forwards; }
@keyframes fly { 0% { opacity: 1; transform: translate(-50%, -50%) scale(0.4) rotate(0); } 100% { opacity: 0; transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(1.2) rotate(var(--r)); } }

/* ---------- records ---------- */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stat { background: rgba(0, 0, 0, 0.22); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.stat b { display: block; font-size: 16px; font-weight: 650; margin-top: 2px; }
.stat span { font-size: 12px; color: var(--ink-3); font-weight: 550; text-transform: uppercase; letter-spacing: 0.05em; }
.spark { width: 100%; height: 56px; display: block; margin-top: 4px; }
.spark rect { fill: rgba(94, 234, 212, 0.28); }
.spark rect.last { fill: url(#iri); }
.seal { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 650; color: var(--good); padding: 5px 11px 5px 7px; border-radius: 999px; background: var(--good-bg); border: 1px solid rgba(138, 240, 176, 0.22); }
.seal svg { width: 16px; height: 16px; }
.seal.broken { color: var(--bad); background: var(--bad-bg); border-color: rgba(255, 155, 155, 0.25); }
.timeline { position: relative; display: grid; gap: 0; font-size: 14px; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(180deg, var(--mint), rgba(180, 161, 255, 0.6), rgba(246, 207, 134, 0.2)); border-radius: 2px; opacity: 0.5; }
.ev { position: relative; display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.ev::before { content: ""; position: absolute; left: -25px; top: 15px; width: 10px; height: 10px; border-radius: 3px; transform: rotate(45deg); background: var(--bg-2); border: 2px solid var(--ink-3); }
.ev.sys::before { border-color: var(--mint); background: var(--mint); box-shadow: 0 0 10px var(--mint); }
.ev.dna::before { border: none; background: var(--iri); box-shadow: 0 0 12px rgba(180, 161, 255, 0.8); }
.ev .when { color: var(--ink-3); font-size: 12.5px; padding-top: 1px; }
.ev.sys { color: var(--ink); }
.hash { font-family: var(--mono); font-size: 11px; color: var(--ink-3); word-break: break-all; margin-top: 2px; }

.coach { position: relative; border-radius: var(--radius-lg); padding: 18px 20px; display: grid; gap: 9px; align-content: start; font-size: 14.5px; background: linear-gradient(160deg, rgba(94, 234, 212, 0.10), rgba(180, 161, 255, 0.08) 60%, rgba(246, 207, 134, 0.06)); border: 1px solid rgba(94, 234, 212, 0.22); }
.coach h3 { display: flex; align-items: center; gap: 8px; }
.coach h3 svg { width: 18px; height: 18px; color: var(--mint); }
.coach .flag, .flag { color: var(--bad); }
.ask { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px; }
.ai-answer { background: rgba(0, 0, 0, 0.28); border: 1px solid var(--line-2); border-radius: 14px; padding: 12px 14px; display: grid; gap: 7px; }
.ai-answer.shadow { border-style: dashed; border-color: rgba(156, 199, 255, 0.4); }

/* ---------- seller hub ---------- */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 880px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tile { display: grid; gap: 4px; background: var(--glass); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; color: var(--ink); transition: transform 0.3s var(--ease), border-color 0.2s; }
.tile:hover { transform: translateY(-2px); border-color: var(--line-2); color: var(--ink); }
.tile span { font-size: 12px; color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.tile b { font-family: var(--display); font-size: 30px; font-weight: 560; letter-spacing: -0.02em; }
.tile.warn { background: linear-gradient(160deg, rgba(251, 191, 36, 0.14), rgba(251, 191, 36, 0.04)); border-color: rgba(251, 212, 118, 0.3); }
.tile.warn b { color: var(--warn); }
.bad-text { color: var(--bad); }
.filters { gap: 6px; }
.filters .chip { font-size: 13px; padding: 6px 13px; }
.filters .chip:hover { color: var(--ink); }
.bulkbar { position: sticky; top: 64px; z-index: 5; background: rgba(11, 23, 19, 0.88); backdrop-filter: blur(16px); }
.bulkbar input { width: 160px; }
.inv label.row { gap: 10px; cursor: pointer; }
.inv input[type=checkbox] { width: 20px; height: 20px; }
.inv form.row input { width: 150px; }
.tub button.big { width: 100%; }
.tub input { width: 100%; }
.handoff { justify-items: center; text-align: center; }
.handoff img { border-radius: 18px; background: #fff; padding: 12px; box-shadow: 0 0 60px -10px rgba(94, 234, 212, 0.6); }
.cam { border-radius: 14px; padding: 11px 14px; font-size: 14px; margin: 0; border: 1px solid transparent; }
.cam-live { background: var(--good-bg); color: var(--good); border-color: rgba(138, 240, 176, 0.22); }
.cam-wait { background: var(--info-bg); color: var(--info); border-color: rgba(156, 199, 255, 0.22); }
.cam-off { background: var(--bad-bg); color: var(--bad); border-color: rgba(255, 155, 155, 0.22); }
.sample-code { background: var(--iri-soft); border: 1px solid var(--line-2); border-radius: 16px; padding: 14px; text-align: center; }
.sample-code .code { font-family: var(--mono); font-size: 30px; font-weight: 700; letter-spacing: 3px; margin: 6px 0; }
.result-row input { width: 150px; }
.lab-key { font-family: var(--mono); font-size: 12px; word-break: break-all; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px; }
.lot.review-row { display: grid; justify-content: stretch; gap: 8px; }
.review-row .row textarea { flex: 1; min-width: 160px; min-height: 40px; width: auto; }
.import-preview { max-height: 240px; overflow: auto; font-size: 13px; border: 1px solid var(--line); border-radius: 12px; }
.import-preview table { width: 100%; border-collapse: collapse; }
.import-preview td, .import-preview th { padding: 6px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.import-preview th { color: var(--ink-3); font-weight: 600; position: sticky; top: 0; background: #0d1a16; }

/* ---------- labels: always printed on white ---------- */
.labels { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.label { display: flex; gap: 12px; align-items: center; background: #fff; color: #10201a; border-radius: 12px; padding: 12px; break-inside: avoid; }
.label p { margin: 0; font-size: 13px; color: #10201a; }
.label .tiny { color: #4b5d55; }
.label .label-name { font-family: var(--display); font-size: 18px; font-weight: 650; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 16px); background: rgba(14, 28, 23, 0.94); color: var(--ink); border: 1px solid var(--line-2); padding: 12px 18px; border-radius: 14px; font-size: 14px; font-weight: 550; opacity: 0; pointer-events: none; transition: opacity 0.3s, transform 0.4s var(--ease); z-index: 60; max-width: calc(100% - 32px); box-shadow: 0 20px 50px -18px rgba(0, 0, 0, 0.8); backdrop-filter: blur(14px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { border-color: rgba(255, 155, 155, 0.4); color: #ffd1d1; }

/* ---------- footer ---------- */
.foot { max-width: 1120px; margin: 0 auto; padding: 26px clamp(14px, 3vw, 28px) 40px; display: flex; flex-wrap: wrap; gap: 14px 22px; justify-content: space-between; color: var(--ink-3); font-size: 13px; border-top: 1px solid var(--line); }
.foot a { color: var(--ink-2); }
.legal { max-width: 760px; }
.legal h2 { margin-top: 18px; }
.legal p, .legal li { color: var(--ink-2); line-height: 1.7; }
.draft-note { background: var(--warn-bg); color: var(--warn); border: 1px solid rgba(251, 212, 118, 0.25); border-radius: 12px; padding: 10px 14px; font-size: 14px; }

@media print {
  body::before, body::after, .top, .toast, .noprint, .foot { display: none !important; }
  body, .view { background: #fff; color: #000; padding: 0; max-width: none; animation: none; }
  .labels { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .label { border: 1px dashed #999; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
