:root{
  --bg:#141517;
  --panel:#1e2023;
  --panel2:#26282c;
  --line:#34373d;
  --gold:#d8a63f;
  --gold-soft:#f0c96a;
  --green:#31c46f;
  --green-dim:#1f7a48;
  --text:#f2ecdf;
  --dim:#a7a294;
  --dimmer:#6f6a5f;
  --amber:#e0a53f;
  --red:#e0654f;
}
*{ box-sizing:border-box; }
html,body{ margin:0; padding:0; }
body{
  background:var(--bg);
  color:var(--text);
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  font-size:16px;
  line-height:1.45;
  -webkit-font-smoothing:antialiased;
}

/* ---------- header ---------- */
.top{
  position:sticky; top:0; z-index:20;
  display:flex; align-items:center; justify-content:space-between;
  padding:10px 14px;
  background:rgba(20,21,23,.92);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line);
}
.brand{ display:flex; align-items:center; gap:10px; }
.mark{
  width:40px; height:40px; border-radius:12px;
  background:linear-gradient(150deg,var(--gold-soft),var(--gold));
  color:#1c1503; font-weight:800; font-size:14px; letter-spacing:.5px;
  display:flex; align-items:center; justify-content:center;
}
.brand h1{ font-size:17px; margin:0; letter-spacing:.2px; }
.brand .sub{ margin:0; font-size:11px; color:var(--dim); }
.head-right{ display:flex; align-items:center; gap:8px; }

/* ---------- pills & badges ---------- */
.pill{
  display:inline-block; padding:3px 9px; border-radius:999px;
  font-size:10.5px; font-weight:800; letter-spacing:.8px; text-transform:uppercase;
  border:1px solid transparent; vertical-align:middle;
}
.pill.sample{ background:rgba(216,166,63,.16); color:var(--gold-soft); border-color:rgba(216,166,63,.45); }
.pill.live{ background:rgba(49,196,111,.14); color:var(--green); border-color:rgba(49,196,111,.4); }
.pill.team{ background:rgba(240,201,106,.14); color:var(--gold-soft); border-color:rgba(216,166,63,.4); }
.pill.t-gold{ background:rgba(216,166,63,.18); color:var(--gold-soft); border-color:rgba(216,166,63,.5); }
.pill.t-green{ background:rgba(49,196,111,.16); color:var(--green); border-color:rgba(49,196,111,.45); }
.pill.t-dim{ background:#2b2d31; color:var(--dim); border-color:var(--line); }

/* ---------- layout ---------- */
main#view{ padding:14px 14px 96px; max-width:680px; margin:0 auto; }
.panel{
  background:var(--panel); border:1px solid var(--line); border-radius:18px;
  padding:16px; margin:14px 0;
}
.panel.narrow{ max-width:420px; margin:24px auto; }
.panel h3{ margin:0 0 8px; font-size:16px; }
.panel h4{ margin:14px 0 6px; font-size:13px; color:var(--gold-soft); text-transform:uppercase; letter-spacing:.7px; }
.panel p{ margin:6px 0; }
.dim{ color:var(--dim); font-size:13.5px; }
.small{ font-size:12px; }
h2.page{ font-size:22px; margin:8px 0 2px; }
p.page-sub{ color:var(--dim); margin:0 0 10px; font-size:14px; }

/* ---------- stale note & stamp ---------- */
.stale{
  border:1px solid rgba(224,165,63,.55); background:rgba(224,165,63,.10);
  color:#f0d9a6; border-radius:14px; padding:10px 14px; margin:10px 0;
  font-size:13.5px;
}
.stamp{ color:var(--dimmer); font-size:12px; margin:8px 0 2px; display:flex; align-items:center; gap:8px; }

/* ---------- cards ---------- */
.rail{ display:flex; gap:12px; overflow-x:auto; padding:6px 2px 14px; scroll-snap-type:x mandatory; }
.rail-head{ display:flex; align-items:baseline; justify-content:space-between; margin:14px 2px 0; }
.rail-head h2{ margin:0; font-size:18px; }
.rail-head .hint{ color:var(--dimmer); font-size:12px; }
.rail .card{ min-width:238px; max-width:238px; scroll-snap-align:start; }
.grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(158px,1fr)); gap:12px; margin-top:12px; }
.card{
  display:block; text-decoration:none; color:var(--text);
  background:linear-gradient(160deg,#242528,#1a1b1e);
  border:1px solid #3a3d43; border-radius:20px; padding:14px 12px 16px;
  position:relative; overflow:hidden;
}
.card::before{
  content:""; position:absolute; top:0; left:0; right:0; height:3px;
  background:linear-gradient(90deg,var(--gold),rgba(216,166,63,0));
}
.card:active{ transform:scale(.985); }
.card-tags{ display:flex; gap:6px; flex-wrap:wrap; min-height:20px; margin-bottom:8px; }
.portrait{
  width:64px; height:64px; border-radius:50%;
  background:radial-gradient(circle at 30% 25%,#313338,#1d1e21);
  border:2px solid var(--gold); box-shadow:0 0 0 3px rgba(216,166,63,.15);
  display:flex; align-items:center; justify-content:center;
  font-size:30px; margin:4px 0 10px; overflow:hidden;
}
.portrait img{ width:100%; height:100%; object-fit:cover; }
.portrait.big{ width:88px; height:88px; font-size:44px; }
.cname{ margin:0; font-size:16px; font-weight:700; }
.card .spec,.hero .spec{ margin:1px 0 0; color:var(--dim); font-size:12.5px; }
.card .grade{ margin:4px 0 0; font-size:12px; color:var(--dim); }
.stars{ color:var(--gold-soft); font-weight:700; }
.card .price,.hero .price{
  margin:10px 0 0; color:var(--green); font-weight:800; font-size:20px; letter-spacing:.2px;
}
.hero .price{ font-size:34px; }
.card .ver{ margin-top:8px; color:var(--green); font-size:11.5px; font-weight:600; }
.count{ color:var(--dimmer); font-size:12.5px; margin-top:14px; }
.empty{
  border:1px dashed var(--line); border-radius:16px; padding:26px 16px;
  text-align:center; color:var(--dim); margin-top:12px;
}

/* ---------- controls ---------- */
.controls{ margin-top:12px; display:flex; flex-direction:column; gap:8px; }
.ctrl-row{ display:flex; gap:8px; }
.ctrl-row .inp{ flex:1; min-width:0; }
.inp{
  background:var(--panel2); border:1px solid var(--line); color:var(--text);
  border-radius:12px; padding:10px 12px; font-size:14px; width:100%;
  -webkit-appearance:none; appearance:none;
}
select.inp{ background-image:none; }
textarea.inp{ min-height:150px; font-family:ui-monospace,Menlo,monospace; font-size:12px; }
.inp:focus{ outline:none; border-color:var(--gold); }

/* ---------- buttons ---------- */
.btn,.btn-mini,.btn.green,.btn.gold{
  display:inline-block; border-radius:12px; border:none; cursor:pointer;
  font-weight:700; font-size:14px; text-decoration:none; text-align:center;
  padding:11px 16px;
}
.btn{ background:var(--gold); color:#1c1503; }
.btn.green{ background:var(--green); color:#04170c; }
.btn-mini{
  background:var(--panel2); color:var(--text); border:1px solid var(--line);
  padding:7px 11px; font-size:12px; border-radius:10px;
}
.btn-mini.danger{ color:#ffb2a4; border-color:rgba(224,101,79,.5); }
.buyrow{ display:flex; flex-wrap:wrap; gap:10px; margin:10px 0; }
.back{ display:inline-block; color:var(--dim); text-decoration:none; font-size:13.5px; margin:6px 0 10px; }

/* ---------- product page ---------- */
.hero{ background:var(--panel); border:1px solid var(--line); border-radius:22px; padding:18px; margin-top:6px; }
.hero-top{ display:flex; gap:8px; margin-bottom:12px; }
.hero-main{ display:flex; gap:14px; align-items:center; }
.hero-main h2{ margin:0; font-size:24px; }
.hero-main .grade{ color:var(--dim); font-size:13.5px; margin:4px 0 0; }
.hero-price{ margin-top:14px; display:flex; align-items:baseline; gap:10px; flex-wrap:wrap; }
.cur-note{ color:var(--dimmer); font-size:12px; }
.hero-stats{ display:flex; flex-wrap:wrap; gap:8px; margin-top:14px; }
.hero-stats span{
  background:var(--panel2); border:1px solid var(--line); border-radius:999px;
  padding:5px 11px; font-size:12px; color:var(--dim);
}
.hero-stats .ok{ color:var(--green); border-color:rgba(49,196,111,.35); }
.badges{ display:flex; flex-wrap:wrap; gap:8px; }
.badge{
  border:1px solid rgba(216,166,63,.5); color:var(--gold-soft); background:rgba(216,166,63,.1);
  border-radius:999px; padding:5px 12px; font-size:12.5px; font-weight:600;
}
.badge.skill{ border-color:var(--line); color:var(--dim); background:var(--panel2); }
.byok{
  border:1px solid rgba(49,196,111,.4); background:rgba(49,196,111,.08);
  color:#c9f2d8; border-radius:12px; padding:10px 13px; font-size:13.5px; margin-top:10px;
}
ul.incl{ margin:6px 0 0; padding-left:20px; }
ul.incl li{ margin:6px 0; font-size:14px; }
ul.roster{ margin:6px 0 0; padding-left:18px; }
ul.roster li{ margin:6px 0; font-size:14.5px; }
.record{ color:var(--green); font-weight:700; font-size:13.5px; margin-top:10px; }

/* samples */
details.sample{ border:1px solid var(--line); border-radius:14px; padding:10px 14px; margin:8px 0; background:var(--panel2); }
details.sample summary{ cursor:pointer; font-weight:700; font-size:14.5px; }
details.sample p{ color:var(--dim); font-size:13.5px; }

/* kit */
.kit h4{ margin-top:16px; }
.kit pre,pre.feedex{
  background:#101113; border:1px solid var(--line); border-radius:12px;
  padding:12px; overflow-x:auto; white-space:pre-wrap; word-break:break-word;
  font-family:ui-monospace,Menlo,monospace; font-size:12px; color:#d9d3c4; margin:6px 0;
}
.kit .mk{ margin-bottom:6px; }
.shareimg{ width:100%; max-width:320px; border-radius:14px; border:1px solid var(--line); display:block; margin:8px 0; }

/* ---------- settings ---------- */
.linkrow{ border:1px solid var(--line); border-radius:14px; padding:12px; margin:10px 0; background:var(--panel2); }
.linkrow h4{ margin:0 0 8px; }
.fld{ display:block; font-size:11.5px; color:var(--dim); margin:8px 0; }
.fld .inp{ margin-top:3px; }
.report{ border:1px solid var(--line); border-radius:14px; padding:12px 14px; background:#101113; margin-top:10px; font-size:13px; }
.report ul{ margin:6px 0 0; padding-left:18px; }
.report .stripped{ color:#f0c96a; }
.report .skip{ color:#ffb2a4; }
.rowbtns{ display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.featrow{ display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid var(--line); padding:9px 2px; }
.featrow:last-child{ border-bottom:none; }
.prefrow{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin:10px 0; }
.prefrow .inp{ max-width:130px; }

/* ---------- trust / doc ---------- */
.article h3{ color:var(--gold-soft); margin-top:20px; font-size:16px; }
.article p{ font-size:14.5px; color:#ddd6c6; }
.gradetable{ width:100%; border-collapse:collapse; margin-top:8px; font-size:13.5px; }
.gradetable td{ border-top:1px solid var(--line); padding:8px 4px; vertical-align:top; }
.gradetable td:first-child{ color:var(--gold-soft); font-weight:700; white-space:nowrap; }
.gradetable td:last-child{ color:var(--dim); }

/* ---------- tabbar ---------- */
.tabbar{
  position:fixed; bottom:0; left:0; right:0; z-index:30;
  display:flex; background:rgba(20,21,23,.95); backdrop-filter:blur(10px);
  border-top:1px solid var(--line);
  padding-bottom:env(safe-area-inset-bottom);
}
.tabbar a{
  flex:1; text-align:center; padding:13px 4px; color:var(--dimmer);
  text-decoration:none; font-size:12.5px; font-weight:700; letter-spacing:.3px;
  border-top:2px solid transparent;
}
.tabbar a.active{ color:var(--gold-soft); border-top-color:var(--gold); }

/* ---------- toast ---------- */
#toast{
  position:fixed; left:50%; bottom:96px; transform:translateX(-50%) translateY(16px);
  background:#2b2d31; color:var(--text); border:1px solid var(--gold);
  border-radius:999px; padding:9px 18px; font-size:13.5px; font-weight:600;
  opacity:0; pointer-events:none; transition:all .25s ease; z-index:50; max-width:88vw; text-align:center;
}
#toast.show{ opacity:1; transform:translateX(-50%) translateY(0); }

/* ---------- V2 additions ---------- */
.curselect{
  background:var(--panel2); color:var(--text); border:1px solid var(--line);
  border-radius:10px; padding:7px 8px; font-size:12px; font-weight:700;
  -webkit-appearance:none; appearance:none;
}
.curselect:focus{ outline:none; border-color:var(--gold); }

.chips{ display:flex; flex-wrap:wrap; gap:8px; margin:8px 0; }
.chip{
  background:var(--panel2); border:1px solid rgba(216,166,63,.45); color:var(--gold-soft);
  border-radius:999px; padding:8px 13px; font-size:12.5px; font-weight:600; cursor:pointer;
}
.chip:active{ transform:scale(.97); }
.tryans{
  border:1px solid rgba(49,196,111,.4); background:rgba(49,196,111,.07);
  border-radius:14px; padding:12px 14px; margin:10px 0;
}
.tryans p{ margin:6px 0; font-size:14px; color:#ddd6c6; }
.tryans b{ color:var(--gold-soft); }
.tryfree{ display:flex; gap:8px; margin-top:8px; }
.tryfree .inp{ flex:1; min-width:0; }

.reviewitem{ border-top:1px solid var(--line); padding:11px 0; }
.reviewitem:first-of-type{ border-top:none; }
.rvtop{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; font-size:13.5px; }
.rvstars{ color:var(--gold-soft); letter-spacing:2px; }
.reviewitem p{ margin:6px 0 0; font-size:14px; color:#ddd6c6; }

.cmptable{ width:100%; border-collapse:collapse; margin-top:8px; font-size:13.5px; }.cmptable th, .cmptable td{ border-top:1px solid var(--line); padding:8px 6px; text-align:left; vertical-align:top; }
.cmptable tr:first-child th{ border-top:none; }
.cmptable td:first-child{ color:var(--dim); white-space:nowrap; }
.cmptable th a{ color:var(--gold-soft); text-decoration:none; }
.cmpzone{ font-size:13.5px; }

.cmpwrap{ display:flex; flex-direction:column; gap:4px; }
.cmpbtn.on{ border-color:var(--green); color:var(--green); }

.buylist{ display:flex; flex-direction:column; gap:10px; margin:10px 0; }
.buyitem{ display:flex; flex-direction:column; gap:2px; }
.buyitem .btn{ text-align:center; }
.buyhost{ color:var(--dimmer); font-size:11.5px; }

.teaser .promise{ margin:6px 0 10px; color:var(--dim); font-size:12.5px; }
.card .notify{ margin-top:2px; text-align:center; text-decoration:none; border-color:rgba(216,166,63,.45); color:var(--gold-soft); }
.homed .price{ display:none; }

/* ---------- V3 additions ---------- */
.proofline{ margin-top:6px; color:var(--gold-soft); font-size:12.5px; font-weight:600; }
.hero .proofline{ font-size:14px; }
.soldline{ margin-top:2px; color:var(--dim); font-size:11.5px; }
.saveline{ margin-top:6px; color:var(--green); font-weight:700; font-size:13px; }
.hero .saveline{ margin-top:8px; font-size:15px; }

.portability .ptline{ margin:8px 0 4px; font-size:14.5px; font-weight:600; }
.ptline.strong{ color:#c9f2d8; border-left:3px solid var(--green); padding-left:10px; }
.ptline.narrow{ color:var(--gold-soft); border-left:3px solid var(--gold); padding-left:10px; }
.ptpers{ margin:8px 0 4px; font-size:14px; color:#ddd6c6; }

.labels{ display:flex; flex-direction:column; gap:10px; }
.label{ border:1px solid var(--line); border-radius:14px; padding:10px 12px; background:var(--panel2); }
.label p{ margin:6px 0 0; font-size:13px; color:#ddd6c6; }

.bump{
  display:flex; gap:10px; align-items:flex-start;
  border:1px dashed rgba(49,196,111,.5); border-radius:12px;
  padding:10px 12px; margin:10px 0; font-size:13.5px; cursor:pointer;
}
.bump input{ margin-top:3px; }
.kitrev{ color:var(--dimmer); font-size:11px; font-weight:400; text-transform:none; letter-spacing:0; margin-left:6px; }
.fedprice{ font-size:13.5px; color:#ddd6c6; }
.nextsteps{ margin:6px 0 0; padding-left:20px; }
.nextsteps li{ margin:7px 0; font-size:14px; }

#printzone{ display:none; }
@media print{
  body > *:not(#printzone){ display:none !important; }
  #printzone{ display:block !important; color:#111; background:#fff; font-size:12pt; line-height:1.5; }
  .printcard{ max-width:700px; margin:0 auto; }
  .printcard h1{ font-size:20pt; margin:6pt 0 2pt; }
  .printcard h2{ font-size:13pt; margin:12pt 0 4pt; border-bottom:1px solid #bbb; padding-bottom:2pt; }
  .printcard p, .printcard li{ font-size:11pt; }
  .printcard .pc-brand{ font-size:9pt; letter-spacing:2px; color:#666; }
  .printcard .pc-price{ font-weight:700; font-size:14pt; }
  .printcard .pc-foot{ font-size:9pt; color:#666; margin-top:14pt; border-top:1px solid #bbb; padding-top:6pt; }
}
h2:focus{ outline:none; }
.empty b{ font-size:16px; }

/* ---------- V4 additions ---------- */
.promise-line{
  margin:12px 0 4px; padding:10px 14px;
  border:1px solid rgba(216,166,63,.5); border-radius:12px;
  background:rgba(216,166,63,.08); color:var(--gold-soft);
  font-size:14.5px; font-weight:700; letter-spacing:.2px;
}
.dectable{ width:100%; border-collapse:collapse; margin-top:6px; font-size:13.5px; }
.dectable td{ border-top:1px solid var(--line); padding:9px 6px; vertical-align:top; }
.dectable tr:first-child td{ border-top:none; }
.dectable td:first-child{ color:var(--dim); white-space:nowrap; width:38%; font-size:12px; text-transform:uppercase; letter-spacing:.5px; }
.dectlist{ margin:0; padding-left:16px; }
.dectlist li{ margin:3px 0; font-size:13px; }
.regtable td{ font-size:13px; }
.regtable .btn-mini{ margin-top:6px; }
.buyitem .pill{ margin-right:4px; }

/* ---------- V4 visual polish: standout pass ---------- */
.card{
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(216,166,63,.10), rgba(216,166,63,0) 55%),
    linear-gradient(160deg,#26272b,#191a1d);
  box-shadow:0 6px 18px rgba(0,0,0,.35);
}
.card::after{
  content:""; position:absolute; right:-24px; top:-24px; width:96px; height:96px;
  background:radial-gradient(circle, rgba(216,166,63,.16), rgba(216,166,63,0) 70%);
  pointer-events:none;
}
.card .portrait{ box-shadow:0 0 0 3px rgba(216,166,63,.15), 0 4px 14px rgba(0,0,0,.4); }
.card .price{
  display:inline-block; background:rgba(49,196,111,.10); border:1px solid rgba(49,196,111,.35);
  border-radius:10px; padding:3px 9px; font-size:17px;
}
.hero{
  background:
    radial-gradient(90% 60% at 15% 0%, rgba(216,166,63,.12), rgba(216,166,63,0) 60%),
    linear-gradient(165deg,#232428,#1b1c1f);
  box-shadow:0 10px 26px rgba(0,0,0,.4);
}
.hero .price{ text-shadow:0 0 24px rgba(49,196,111,.35); }
.mark{
  box-shadow:0 2px 10px rgba(216,166,63,.35);
}
.btn{ box-shadow:0 3px 12px rgba(216,166,63,.25); }
.btn.green{ box-shadow:0 3px 12px rgba(49,196,111,.25); }
.tabbar a{ font-size:12px; }
.tabbar a.active{ text-shadow:0 0 14px rgba(240,201,106,.45); }
.rail-head h2{ border-left:3px solid var(--gold); padding-left:10px; }
.panel h3::before{ content:"◆ "; color:var(--gold); font-size:11px; vertical-align:2px; }
.stale{
  display:flex; gap:8px; align-items:flex-start;
  background:linear-gradient(90deg, rgba(224,165,63,.14), rgba(224,165,63,.06));
}
.badge{ box-shadow:0 2px 8px rgba(0,0,0,.3); }
.byok{ box-shadow:inset 0 0 24px rgba(49,196,111,.06); }
label.badge{ text-decoration:none; }

/* ---------- V5 additions ---------- */
.flagship-hero{ border:1px solid rgba(216,166,63,.55); box-shadow:0 0 34px rgba(216,166,63,.12); }
.flagtagrow{ display:flex; gap:8px; align-items:center; margin-bottom:10px; flex-wrap:wrap; }
.flink{ color:var(--text); text-decoration:none; }
.faqitem{ border-top:1px solid var(--line); padding:10px 0; }
.faqitem:first-of-type{ border-top:none; }
.faqitem b{ color:var(--gold-soft); }
.faqitem p{ margin:5px 0 0; font-size:14px; color:#ddd6c6; }
.costblock{
  border:1px solid rgba(49,196,111,.4); border-radius:12px;
  background:rgba(49,196,111,.06); padding:10px 13px; margin:10px 0;
  font-size:13.5px; color:#ddd6c6;
}
.costblock > div{ margin:4px 0; }
.cl{
  display:inline-block; min-width:118px; color:var(--gold-soft);
  font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.6px;
}
.receipt{ border:1px solid rgba(216,166,63,.4); }
.receipt .cl{ min-width:118px; }
.receipt > div{ margin:5px 0; font-size:14px; }
.launchboard td:first-child{ font-size:13px; text-transform:none; letter-spacing:0; color:var(--text); }
body.season-on{ --gold:#cf8f3a; --gold-soft:#eec277; }
#seasonlabel{ background:rgba(216,166,63,.16); color:var(--gold-soft); border-color:rgba(216,166,63,.45); }
.anatomy li{ color:#ddd6c6; }
.card-tags2{ display:flex; flex-wrap:wrap; gap:5px; margin-bottom:8px; }
.launchlegs .linkrow{ margin:8px 0; }
.checkcards .linkrow{ margin:10px 0; }
.featrow .inp{ flex:0 0 auto; min-width:118px; }
.howstrip{ margin:6px 0 0; padding-left:20px; }
.howstrip li{ margin:8px 0; font-size:14px; }
.ksline{
  border:1px solid rgba(216,166,63,.5); border-radius:12px;
  background:rgba(216,166,63,.08); color:var(--gold-soft);
  padding:10px 13px; font-size:13.5px; font-weight:600; margin:10px 0;
}
#intake .fld{ margin:10px 0; }
.panel a, .article a, .dim a{ color:var(--gold-soft); text-decoration:underline; text-underline-offset:2px; }
a.btn, a.btn.green, a.btn.gold{ color:#1c1503 !important; text-decoration:none; }
.panel a.flink{ color:var(--text); text-decoration:none; }
.price, .hero-price, .card .price{ font-style:normal; }
select.inp{
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' stroke='%23d8a63f' stroke-width='1.6' fill='none' stroke-linecap='round'/></svg>");
  background-repeat:no-repeat; background-position:right 12px center; padding-right:30px;
}
.tabbar a:focus{ outline:none; }
.tabbar a:focus-visible{ outline:2px solid var(--gold-soft); outline-offset:-4px; border-radius:10px; }
.rail{ scrollbar-width:thin; scrollbar-color:var(--gold) transparent; }
.rail::-webkit-scrollbar{ height:4px; }
.rail::-webkit-scrollbar-thumb{ background:var(--gold); border-radius:2px; }
.rail::-webkit-scrollbar-track{ background:transparent; }

/* ---------- merged-V5 fixes: readable cards, no header overlap, failure states ---------- */
.checkcards .linkrow{ margin:10px 0; }
.rail-head{ display:flex; align-items:baseline; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.rail-head h2{ margin:0; max-width:60%; }
.rail-head .hint{ text-align:right; max-width:38%; }
.twrap{ overflow-x:auto; -webkit-overflow-scrolling:touch; }
html{ scroll-padding-bottom:110px; scroll-padding-top:70px; }
.cmptable{ min-width:520px; }
.gradetable{ min-width:0; }
.gradetable td:last-child{ overflow-wrap:anywhere; }
.costblock .cl{ display:block; min-width:0; margin-bottom:2px; }


/* ---------- V10 paperwork pack ---------- */
.tally{ font-size:14px; margin:10px 0 4px; }
.docsheet{ position:relative; overflow:hidden; border:1px solid var(--line); border-radius:16px; background:var(--panel); padding:16px; margin:10px 0; }
.watermark{ position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:64px; font-weight:900; letter-spacing:8px; color:rgba(216,166,63,.10); transform:rotate(-24deg); pointer-events:none; user-select:none; }
.dochead{ position:relative; font-size:13px; color:var(--dim); border-bottom:1px solid var(--line); padding-bottom:8px; margin-bottom:10px; }
.docfoot{ position:relative; font-size:11px; color:var(--dimmer); border-top:1px solid var(--line); padding-top:8px; margin-top:14px; }
.docline{ position:relative; font-size:14px; margin:10px 0; color:#ddd6c6; }
.docrow{ position:relative; display:flex; gap:10px; border-top:1px solid var(--line); padding:8px 0; }
.docrow span{ flex:0 0 42%; color:var(--dim); font-size:12px; }
.docrow b{ font-weight:600; overflow-wrap:anywhere; }
.docreport{ position:relative; white-space:pre-wrap; border-left:3px solid var(--gold); padding-left:10px; }
.voidbanner{ position:relative; border:2px solid #e0654f; color:#ffb2a4; border-radius:10px; padding:8px 10px; margin-bottom:10px; font-weight:600; }
.docprint, .docprint .docsheet{ background:#fff; color:#111; border-color:#bbb; }
.docprint .docrow span, .docprint .dochead, .docprint .docfoot{ color:#444; }
.docprint .docrow{ border-color:#bbb; }
.docprint .watermark{ color:rgba(0,0,0,.05); }
.docprint .voidbanner{ color:#8a1d12; }
.docprint h4{ color:#111; }
@media (max-width:360px){ .docrow{ flex-direction:column; gap:2px; } .docrow span{ flex:0 0 auto; } }


/* keep every control inside its card — long-text entry must never pan the page sideways */
main#view, .panel, .docsheet, .linkrow, .checkcards, .article{ min-width:0; }
.inp, textarea.inp, select.inp{ min-width:0; max-width:100%; }
textarea.inp, .docreport, pre{ box-sizing:border-box; width:100%; resize:vertical; overflow-wrap:anywhere; }
.buyitem, .costblock, .dectable, .docrow{ min-width:0; }
.buyitem .buyhost, .costblock > div, .docrow b{ overflow-wrap:anywhere; }


/* ---------- V11: sale-mode blocks ---------- */
.bidmin{ display:inline-block; background:rgba(216,166,63,.12); border:1px solid rgba(216,166,63,.5); color:var(--gold-soft); border-radius:999px; padding:6px 12px; font-size:13px; font-weight:700; }
.auction .cl{ color:var(--gold-soft); }
