/* Quantum Lab. White sheet, ink type, hairlines; state drawn in black and greys. */

@font-face { font-family: "General Sans"; src: url("/fonts/general-sans-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "General Sans"; src: url("/fonts/general-sans-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "General Sans"; src: url("/fonts/general-sans-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "JB Mono"; src: url("/fonts/jetbrains-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "JB Mono"; src: url("/fonts/jetbrains-mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --bg: #ffffff; --panel: #ffffff; --panel-2: #f6f6f5; --line: #ececeb; --line-2: #dcdcda;
  --ink: #0c0d12; --soft: #5c5e66; --faint: #9a9ca3;
  --indigo: #0c0d12; --indigo-2: #0c0d12; --violet: #6d6f77; --gold: #0c0d12; --gold-2: #0c0d12;
  --accent: #0c0d12;
  --mono: "JB Mono", ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--ink); font-family: "General Sans", system-ui, sans-serif; font-size: 14px; -webkit-font-smoothing: antialiased; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.flex { flex: auto; }
.tl { font-size: 10.5px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--soft); }
.sub { font-size: 12px; color: var(--faint); }

/* ── bar ─────────────────────────────────────────────────── */
.bar { position: sticky; top: 0; z-index: 10; height: 56px; display: flex; align-items: center; gap: 18px; padding: 0 20px; background: rgba(255,255,255,0.88); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: 16px; letter-spacing: -0.04em; }
.logo .wm span { opacity: 0.5; }
.crumb { font-family: var(--mono); font-size: 11px; color: var(--soft); padding-left: 16px; border-left: 1px solid var(--line-2); }
.tabs { display: flex; gap: 2px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 3px; margin-left: 8px; }
.tabs button { height: 30px; padding: 0 14px; border-radius: 7px; font-size: 13px; color: var(--soft); transition: all 0.2s var(--ease); }
.tabs button[aria-selected=true] { background: var(--panel-2); color: var(--ink); box-shadow: 0 0 0 1px var(--line-2) inset; }
.device { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; font-family: var(--mono); font-size: 11.5px; color: var(--soft); max-width: 46vw; }
.device span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.device i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); flex: none; }
.device.on i { background: var(--ink); box-shadow: 0 0 0 3px #0c0d1214; }
.device.cpu i { background: #b0b0b4; }
.back { font-size: 13px; color: var(--soft); }
.back span { opacity: 0.6; }
.back:hover { color: var(--ink); }

/* ── shared ──────────────────────────────────────────────── */
.view { padding: 18px 20px 40px; max-width: 1560px; margin: 0 auto; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; min-width: 0; }
.card-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.ghost { height: 32px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line-2); font-size: 13px; color: var(--soft); }
.ghost:hover { color: var(--ink); border-color: var(--soft); }
.primary { height: 40px; padding: 0 20px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; transition: transform 0.2s var(--ease), opacity 0.2s; }
.primary:hover { transform: translateY(-1px); }
.primary:disabled { opacity: 0.45; cursor: default; transform: none; }

/* ── composer ────────────────────────────────────────────── */
.toolbar { display: flex; align-items: center; gap: 24px; margin-bottom: 14px; flex-wrap: wrap; }
.group { display: flex; align-items: center; gap: 12px; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 9px; height: 32px; }
.stepper button { width: 32px; height: 100%; font-size: 16px; color: var(--soft); }
.stepper button:hover { color: var(--ink); }
.stepper b { min-width: 28px; text-align: center; font-family: var(--mono); font-weight: 500; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips button { height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 12.5px; color: var(--soft); }
.chips button:hover { color: var(--ink); border-color: var(--soft); }

.work { display: grid; grid-template-columns: 236px 1fr; gap: 14px; margin-bottom: 14px; }
.palette { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 4px; align-self: start; }
.palette .pgt { margin: 8px 6px 4px; }
.palette .pgt:first-child { margin-top: 2px; }
.gtiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.gbtn { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 7px 2px 6px; border-radius: 9px; transition: background 0.15s; min-width: 0; }
.gbtn:hover { background: var(--panel-2); }
.gbtn[aria-pressed=true] { background: var(--panel-2); box-shadow: 0 0 0 1px var(--ink) inset; }
.gbtn .nm { font-size: 10px; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.about { margin-top: 10px; padding: 10px 8px 4px; border-top: 1px solid var(--line); }
.about b { font-weight: 500; font-size: 13px; }
.about p { font-size: 12px; color: var(--faint); line-height: 1.45; margin-top: 4px; }
.angles { display: flex; gap: 4px; padding: 6px 2px 2px; flex-wrap: wrap; }
.angles button { height: 24px; padding: 0 8px; border-radius: 6px; border: 1px solid var(--line-2); font-family: var(--mono); font-size: 11px; color: var(--soft); }
.angles button[aria-pressed=true] { color: #fff; border-color: var(--ink); background: var(--ink); }

/* gate glyphs, used in the palette and on the wires */
.gl { flex: none; width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; font-family: var(--mono); font-size: 12.5px; font-weight: 500; position: relative; }
.gl.h { background: var(--ink); color: #fff; }
.gl.p { background: #fff; color: var(--ink); box-shadow: 0 0 0 1px #0c0d1255 inset; }
.gl.ph { background: #f1f1f0; color: var(--ink); box-shadow: 0 0 0 1px var(--line-2) inset; }
.gl.r { background: #fff; color: var(--ink); box-shadow: 0 0 0 1px #0c0d1255 inset; border-radius: 50%; }
.gl.two { background: #fff; color: var(--ink); box-shadow: 0 0 0 1.5px var(--ink) inset; }
.gl small { position: absolute; bottom: -1px; right: 2px; font-size: 8px; opacity: 0.75; }

.circuit-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px 16px; min-width: 0; }
.circuit-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.run { font-family: var(--mono); font-size: 11.5px; color: var(--soft); }
.run b { color: var(--ink); font-weight: 500; }
.circuit { overflow-x: auto; padding-bottom: 4px; }
.grid { position: relative; display: grid; width: max-content; }
.wire-label { font-family: var(--mono); font-size: 12px; color: var(--soft); display: flex; align-items: center; height: 44px; padding-right: 10px; white-space: nowrap; }
.wire-label em { font-style: normal; color: var(--faint); margin-left: 6px; }
.cell { position: relative; width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer; }
.cell::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: var(--line-2); }
.cell:hover::after { content: ""; position: absolute; inset: 6px; border-radius: 8px; border: 1px dashed #0c0d1255; }
.cell.pending::after { content: ""; position: absolute; inset: 5px; border-radius: 9px; border: 1.5px solid var(--ink); }
.cell .gl { z-index: 1; }
.cell .dot { z-index: 1; width: 11px; height: 11px; border-radius: 50%; background: var(--ink); }
.cell .tgt { z-index: 1; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--panel); position: relative; }
.cell .tgt::before, .cell .tgt::after { content: ""; position: absolute; background: var(--ink); }
.cell .tgt::before { left: 50%; top: 3px; bottom: 3px; width: 1.5px; transform: translateX(-50%); }
.cell .tgt::after { top: 50%; left: 3px; right: 3px; height: 1.5px; transform: translateY(-50%); }
.cell .sw { z-index: 1; font-family: var(--mono); font-size: 16px; color: var(--ink); line-height: 1; }
.vlink { position: absolute; width: 1.5px; background: var(--ink); transform: translateX(-50%); pointer-events: none; }
.meter { font-family: var(--mono); font-size: 11px; color: var(--faint); display: flex; align-items: center; gap: 6px; height: 44px; padding-left: 12px; white-space: nowrap; }
.meter i { display: inline-block; width: 46px; height: 5px; border-radius: 3px; background: var(--line); position: relative; overflow: hidden; }
.meter i b { position: absolute; inset: 0 auto 0 0; background: var(--accent); border-radius: inherit; }

.results { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 14px; }
.hist { display: flex; flex-direction: column; gap: 6px; }
.hr { display: grid; grid-template-columns: auto 1fr 54px 48px; align-items: center; gap: 10px; font-family: var(--mono); font-size: 12px; }
.hr .k { color: var(--ink); }
.hr .bar { height: 14px; border-radius: 4px; background: var(--panel-2); position: relative; overflow: hidden; }
.hr .bar i { position: absolute; inset: 0 auto 0 0; background: #c9c9cc; border-radius: inherit; transition: width 0.35s var(--ease); }
.hr .bar s { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--ink); transition: left 0.35s var(--ease); }
.hr .p { text-align: right; color: var(--ink); }
.hr .c { text-align: right; color: var(--faint); }
.legend { display: flex; gap: 16px; margin-top: 10px; font-size: 11.5px; color: var(--faint); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: #c9c9cc; margin-right: 6px; vertical-align: -1px; }
.legend s { display: inline-block; width: 2px; height: 11px; background: var(--gold); margin-right: 6px; vertical-align: -1px; }
.blochs { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.bl { text-align: center; }
.bl svg { width: 100%; max-width: 104px; height: auto; display: block; margin: 0 auto; }
.bl .lb { font-family: var(--mono); font-size: 11px; color: var(--soft); margin-top: 2px; }
.bl .lb em { font-style: normal; color: var(--faint); }
.amps { display: flex; flex-direction: column; }
.ar { display: grid; grid-template-columns: auto 1fr auto 22px; gap: 12px; align-items: center; padding: 5px 0; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 12px; }
.ar:first-child { border-top: 0; }
.ar .v { color: var(--soft); }
.ar .pp { color: var(--ink); }
.empty { color: var(--faint); font-size: 13px; padding: 18px 0; }

/* ── qubit test ──────────────────────────────────────────── */
.test-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 14px; }
.test-intro h1 { font-weight: 500; font-size: 30px; letter-spacing: -0.035em; line-height: 1.1; margin: 12px 0; max-width: 30rem; }
.test-intro p { color: var(--soft); line-height: 1.6; max-width: 40rem; }
.test-actions { display: flex; align-items: center; gap: 16px; margin-top: 20px; flex-wrap: wrap; }
.test-score { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-content: start; }
.score { background: var(--panel-2); border: 1px solid var(--line); border-radius: 11px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.score b { font-weight: 500; font-size: 34px; letter-spacing: -0.04em; }
.score b.small { font-size: 16px; letter-spacing: -0.01em; font-family: var(--mono); }
.score .unit { font-size: 11px; color: var(--faint); }
.ok { color: var(--ink); }
.bad { color: #b4232a; }
.test-chart { grid-column: 1 / -1; }
.ladder { display: flex; align-items: flex-end; gap: 8px; height: 220px; padding-top: 10px; }
.rung { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; min-width: 0; }
.rung .col { width: 100%; max-width: 46px; border-radius: 6px 6px 2px 2px; background: var(--accent); min-height: 3px; transition: height 0.5s var(--ease); }
.rung .col.fail { background: #e9d6d6; }
.rung .t { font-family: var(--mono); font-size: 10.5px; color: var(--soft); white-space: nowrap; }
.rung .n { font-family: var(--mono); font-size: 11px; color: var(--ink); }
.test-submit { grid-column: 1 / -1; }
.submit-row { display: flex; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.submit-row input { flex: 1; min-width: 200px; height: 40px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel-2); padding: 0 14px; outline: none; }
.submit-row input:focus { border-color: var(--indigo); }

/* ── board ───────────────────────────────────────────────── */
.table { display: flex; flex-direction: column; }
.tr { display: grid; grid-template-columns: 44px 1.1fr 1.6fr 90px 120px 130px 110px; gap: 12px; align-items: center; padding: 11px 4px; border-top: 1px solid var(--line); font-size: 13px; }
.tr.head { border-top: 0; font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); }
.tr .mono { font-family: var(--mono); font-size: 12.5px; }
.tr .big { font-size: 18px; letter-spacing: -0.02em; }
.tr .ver { font-family: var(--mono); font-size: 11px; color: var(--soft); }
.tr .muted { color: var(--faint); }

@media (max-width: 1100px) {
  .results { grid-template-columns: 1fr 1fr; }
  .results .card:first-child { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  .bar { gap: 10px; padding: 0 12px; height: auto; min-height: 56px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
  .crumb, .back { display: none; }
  .tabs { order: 3; width: 100%; margin: 0; overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs button { flex: 1 0 auto; padding: 0 11px; font-size: 12.5px; }
  .device { max-width: 60vw; }
  .view { padding: 12px 12px 32px; }
  .work { grid-template-columns: 1fr; }
  .palette { flex-direction: row; flex-wrap: wrap; }
  .palette .pgt, .about { display: none; }
  .gtiles { grid-template-columns: repeat(6, 1fr); width: 100%; }
  .angles { padding: 2px 6px; width: 100%; }
  .results, .test-grid { grid-template-columns: 1fr; }
  .tr { grid-template-columns: 30px 1fr 60px 80px; }
  .tr .c-desc, .tr .c-date, .tr .c-back { display: none; }
}

/* ── wallet + sheet ──────────────────────────────────────── */
.wbtn { height: 32px; padding: 0 14px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 12.5px; font-weight: 500; }
.wbtn.on { background: #fff; color: var(--ink); box-shadow: 0 0 0 1px var(--line-2) inset; font-family: var(--mono); font-size: 11.5px; }
#sheet { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; }
#sheet[hidden] { display: none; }
.sheet-bg { position: absolute; inset: 0; background: rgba(250,250,249,0.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.sheet-card { position: relative; width: min(520px, calc(100% - 24px)); max-height: calc(100vh - 40px); overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 22px; box-shadow: 0 30px 80px -30px #0003; }
.sheet-card h2 { font-weight: 500; font-size: 22px; letter-spacing: -0.03em; margin-bottom: 6px; }
.sheet-x { position: absolute; top: 12px; right: 14px; width: 32px; height: 32px; border-radius: 50%; font-size: 20px; color: var(--soft); }
.sheet-x:hover { background: var(--panel-2); color: var(--ink); }
.wlist { display: flex; flex-direction: column; gap: 6px; margin-top: 16px; }
.wlist button, .wlist a { display: flex; align-items: center; gap: 12px; height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); text-align: left; font-size: 14px; }
.wlist button:hover, .wlist a:hover { border-color: var(--ink); }
.wlist img, .wlist .ph { width: 26px; height: 26px; border-radius: 7px; background: var(--panel-2); }
.wlist small { margin-left: auto; font-size: 11px; color: var(--faint); }

/* ── launchpad ───────────────────────────────────────────── */
.lp { display: grid; grid-template-columns: 1fr; gap: 14px; }
.forge-h { font-weight: 500; font-size: 28px; letter-spacing: -0.035em; line-height: 1.1; margin: 4px 0 10px; }
.forge-p { color: var(--soft); line-height: 1.55; font-size: 13.5px; margin-bottom: 16px; }
.fields { display: grid; grid-template-columns: 1fr 140px; gap: 8px; margin-bottom: 10px; }
.fields label, .launch-form label { display: flex; flex-direction: column; gap: 6px; }
.fields span, .launch-form label > span { font-size: 10.5px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--soft); }
.launch-form label em, .opt em { font-style: normal; text-transform: none; letter-spacing: 0; color: var(--faint); margin-left: 6px; }
.fields input, .launch-form input, .launch-form textarea, .trow input { height: 42px; border-radius: 10px; border: 1px solid var(--line-2); background: #fff; padding: 0 12px; outline: none; font-size: 14px; }
.launch-form textarea { height: auto; padding: 10px 12px; resize: vertical; font-family: inherit; }
.fields input:focus, .launch-form input:focus, .launch-form textarea:focus, .trow input:focus { border-color: var(--ink); }
.tick input { font-family: var(--mono); text-transform: uppercase; }
.primary.wide { width: 100%; height: 46px; }
.birth { display: grid; grid-template-columns: 200px 1fr; gap: 16px; margin: 16px 0 6px; padding-top: 16px; border-top: 1px solid var(--line); }
.seal-wrap { position: relative; border-radius: 14px; overflow: hidden; aspect-ratio: 1; background: var(--panel-2); }
.seal-wrap canvas { width: 100%; height: 100%; display: block; }
.seal-scan { position: absolute; inset: 0; pointer-events: none; opacity: 0; background: linear-gradient(180deg, transparent 0%, rgba(12,13,18,0.10) 48%, rgba(12,13,18,0.22) 50%, rgba(12,13,18,0.10) 52%, transparent 100%); background-size: 100% 220%; }
.birth.scanning .seal-scan { opacity: 1; animation: scan 0.9s linear infinite; }
.birth.scanning canvas { filter: blur(6px) grayscale(1); opacity: 0.6; }
@keyframes scan { from { background-position: 0 100%; } to { background-position: 0 -100%; } }
.birth-info { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.bits { font-family: var(--mono); font-weight: 500; font-size: 17px; letter-spacing: 0.02em; word-break: break-all; }
.bstats { display: grid; gap: 6px; }
.bstats div { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; border-top: 1px solid var(--line); padding-top: 6px; }
.bstats dt { color: var(--faint); }
.bstats dd { text-align: right; }
.bstats .mono, .mono { font-family: var(--mono); }
.birth-info .ghost { align-self: flex-start; margin-top: 4px; }
.launch-form { display: flex; flex-direction: column; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); margin-top: 10px; }
.opt { display: flex; flex-direction: column; gap: 8px; }
.chips button[aria-pressed=true] { background: var(--ink); color: #fff; border-color: var(--ink); }
.chips.small button { height: 26px; padding: 0 10px; font-size: 11.5px; }
.sum { font-size: 13px; color: var(--soft); line-height: 1.55; }
.sum b { color: var(--ink); font-weight: 500; }
.steps-log { list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; }
.steps-log li { position: relative; padding-left: 18px; color: var(--soft); }
.steps-log li::before { content: ""; position: absolute; left: 2px; top: 5px; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--ink); animation: blink 1s infinite; }
.steps-log li.done::before { background: var(--ink); animation: none; }
.steps-log li.ok { color: var(--ink); }
.steps-log li.bad { color: #b4232a; }
.steps-log li.bad::before { border-color: #b4232a; animation: none; }
.steps-log a, .linkish { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; font-size: inherit; }
@keyframes blink { 50% { opacity: 0.25; } }
.grid-born { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.coin { display: flex; flex-direction: column; gap: 6px; text-align: left; border: 1px solid var(--line); border-radius: 14px; padding: 10px; transition: border-color 0.2s, transform 0.3s var(--ease); }
.coin:hover { border-color: var(--ink); transform: translateY(-2px); }
.c-img { position: relative; display: block; }
.coin img { width: 100%; aspect-ratio: 1; border-radius: 10px; object-fit: cover; background: var(--panel-2); display: block; }
.c-img .badge { position: absolute; top: 8px; left: 8px; }
.c-main { display: flex; flex-direction: column; }
.c-main b { font-weight: 600; font-size: 14px; }
.c-main span { font-size: 12px; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-bits { font-family: var(--mono); font-size: 10.5px; color: var(--faint); }
.c-row { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11.5px; }
.c-bar { height: 4px; border-radius: 3px; background: var(--panel-2); overflow: hidden; }
.c-bar i { display: block; height: 100%; background: var(--ink); }
.c-meta { font-size: 11px; color: var(--faint); font-family: var(--mono); }
.coin-h { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.coin-h img { width: 84px; height: 84px; border-radius: 14px; background: var(--panel-2); }
.trade { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.trow { display: flex; align-items: center; gap: 10px; }
.trow input { flex: 1; font-family: var(--mono); }
.trow span { font-family: var(--mono); font-size: 12px; color: var(--soft); }
.links { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 16px; font-size: 12.5px; }
.links a { text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 1000px) { .lp { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .birth { grid-template-columns: 1fr; } .fields { grid-template-columns: 1fr 110px; } }

.grid-born .empty { grid-column: 1 / -1; }

/* ── token page ──────────────────────────────────────────── */
.crumb a { color: var(--soft); }
.crumb a:hover { color: var(--ink); }
.tk-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr) 330px; gap: 14px; align-items: start; }
.tk-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.tk-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.tk-seal { width: 100%; aspect-ratio: 1; border-radius: 14px; background: var(--panel-2); object-fit: cover; display: block; margin-bottom: 14px; }
.tk-name { display: flex; flex-direction: column; margin-bottom: 8px; }
.tk-name h1 { font-weight: 600; font-size: 24px; letter-spacing: -0.03em; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.badges:empty { display: none; }
.badge { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 8px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink); }
.badge.dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.tk-side .bits { display: block; margin: 4px 0 10px; }
.tk-head { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tk-head .score b { font-size: 26px; }
.tk-head .c-bar { margin-top: 2px; }
.tk-chart { height: 360px; position: relative; }
.tk-chart-empty { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 4px; z-index: 2; pointer-events: none; }
.tk-chart-empty[hidden] { display: none; }
.tk-chart-empty b { font-weight: 500; }
.tk-chart-empty span { font-size: 12.5px; color: var(--faint); }
.tk-trades { display: flex; flex-direction: column; }
.ttr { display: grid; grid-template-columns: 54px 1fr 1fr 110px 50px; gap: 10px; align-items: center; padding: 7px 0; border-top: 1px solid var(--line); font-size: 12.5px; }
.ttr:first-child { border-top: 0; }
.ttr .side { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; }
.ttr .side.buy { color: var(--ink); font-weight: 600; }
.ttr .side.sell { color: var(--faint); }
.ttr a { text-align: right; color: var(--soft); }
.hold { display: grid; grid-template-columns: 22px 1fr auto 60px; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); font-size: 12.5px; }
.hold:first-child { border-top: 0; }
.hold .mono:last-child { text-align: right; }
.muted { color: var(--faint); }
.trade-box { display: flex; flex-direction: column; gap: 10px; }
.tpos { min-height: 1.2em; }
.primary.center { display: inline-flex; align-items: center; justify-content: center; }
@media (max-width: 1200px) { .tk-grid { grid-template-columns: 280px minmax(0, 1fr); } .tk-grid > .tk-side:last-child { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .tk-grid { grid-template-columns: 1fr; } .tk-grid > .tk-side:last-child { grid-template-columns: 1fr; } .tk-head { grid-template-columns: 1fr 1fr; } .tk-chart { height: 280px; } .ttr { grid-template-columns: 44px 1fr 90px 40px; } .ttr span:nth-child(3) { display: none; } }

/* ── holder perks, live strip, featured, my tokens ───────── */
.holder { margin: 2px 0 12px; font-size: 12.5px; color: var(--soft); line-height: 1.5; }
.holder:empty { display: none; }
.hold-note b { color: var(--ink); font-weight: 500; }
.hold-toggle { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 10px 12px; border-radius: 10px; background: var(--ink); color: #fff; }
.hold-toggle b { font-weight: 500; }
.hold-toggle input { accent-color: #fff; width: 16px; height: 16px; }
.birth.rare .seal-wrap { box-shadow: 0 0 0 1.5px var(--ink); }
.born-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.live { display: flex; align-items: center; gap: 14px; padding: 12px 16px; overflow: hidden; }
.live-tl { display: inline-flex; align-items: center; gap: 7px; flex: none; }
.live-tl i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink); animation: blink 1.6s infinite; }
.live-track { display: flex; gap: 22px; overflow-x: auto; scrollbar-width: none; white-space: nowrap; mask-image: linear-gradient(90deg, #000 85%, transparent); }
.live-track::-webkit-scrollbar { display: none; }
.lv { font-size: 12.5px; color: var(--soft); }
.lv b { color: var(--ink); font-weight: 600; }
.lv span { color: var(--faint); font-family: var(--mono); font-size: 11px; margin-left: 4px; }
.born-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.born-tools input { height: 30px; width: 240px; border-radius: 999px; border: 1px solid var(--line-2); padding: 0 14px; font-size: 12.5px; outline: none; background: #fff; }
.born-tools input:focus { border-color: var(--ink); }
.mine { display: grid; grid-template-columns: 360px 1fr; gap: 14px; align-items: start; }
.mine-fees { display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 1000px) { .mine { grid-template-columns: 1fr; } .born-tools input { width: 100%; } .born-tools { width: 100%; } }
img.noimg { visibility: hidden; }
.c-img:has(img.noimg), .tk-side .card:has(.tk-seal.noimg) .tk-seal { background: var(--panel-2); }
@media (max-width: 520px) { .grid-born { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .coin { padding: 8px; } .c-bits { display: none; } }
@media (max-width: 760px) { .tk-grid > .tk-side:first-child { order: 1; } .tk-grid > .tk-side:last-child { order: 2; } .tk-grid > .tk-main { order: 3; } }

/* ── launch wizard ───────────────────────────────────────── */
#view-launchpad { display: flex; flex-direction: column; gap: 14px; }
.create { padding: 22px 24px 24px; }
.create-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.create-head .forge-h { font-size: 30px; margin: 6px 0 6px; }
.create-head .forge-p { max-width: 560px; margin: 0; }
.stepper { list-style: none; display: flex; gap: 6px; }
.stepper li { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px 0 6px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--faint); font-size: 13px; cursor: pointer; transition: all .2s var(--ease); }
.stepper li b { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--panel-2); font-family: var(--mono); font-size: 11px; font-weight: 500; color: var(--soft); }
.stepper li.ok { color: var(--ink); }
.stepper li.ok b { background: var(--ink); color: #fff; }
.stepper li.on { border-color: var(--ink); color: var(--ink); box-shadow: 0 0 0 3px #0c0d120f; }
.stepper li.on b { background: var(--ink); color: #fff; }
.create-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.wiz { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.step { display: flex; flex-direction: column; gap: 16px; animation: stepIn .35s var(--ease); }
@keyframes stepIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.step-h { font-weight: 500; font-size: 20px; letter-spacing: -0.02em; }
.step-p { color: var(--soft); font-size: 13.5px; line-height: 1.55; margin-top: -8px; max-width: 620px; }
.fld { display: flex; flex-direction: column; gap: 7px; }
.fld > span { display: flex; justify-content: space-between; font-size: 10.5px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--soft); }
.fld > span em, .opt em { font-style: normal; letter-spacing: 0; text-transform: none; color: var(--faint); font-weight: 400; }
.fld input, .fld textarea, .buy-own input { height: 46px; border-radius: 11px; border: 1px solid var(--line-2); background: #fff; padding: 0 14px; outline: none; font-size: 15px; transition: border-color .2s; }
.fld textarea { height: auto; padding: 12px 14px; resize: vertical; font-family: inherit; line-height: 1.5; }
.fld input:focus, .fld textarea:focus, .buy-own input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px #0c0d120d; }
.tick-row { display: flex; align-items: center; border: 1px solid var(--line-2); border-radius: 11px; overflow: hidden; }
.tick-row:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px #0c0d120d; }
.tick-row b { padding: 0 4px 0 14px; font-family: var(--mono); font-weight: 500; color: var(--faint); }
.tick-row input { border: 0 !important; box-shadow: none !important; flex: 1; font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.04em; padding-left: 2px; }
.hint { font-size: 12.5px; color: var(--faint); line-height: 1.5; }
.hint b { color: var(--ink); font-weight: 500; }
.hint.ok { color: var(--ink); }
.hint.bad, .bad { color: #b4232a; }
.center-t { text-align: center; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ro { height: 46px; border-radius: 11px; background: var(--panel-2); display: flex; align-items: center; justify-content: space-between; padding: 0 14px; font-size: 14px; color: var(--soft); }
.ro small { font-family: var(--mono); font-size: 11.5px; color: var(--faint); }
.buy-own { margin-top: 2px; max-width: 280px; }
.buy-own input { flex: 1; height: 38px; font-family: var(--mono); font-size: 13px; }
.birth { grid-template-columns: 260px 1fr; margin: 0; padding: 0; border: 0; }
.seal-wrap { position: relative; }
.seal-wrap canvas.blank { opacity: 0; }
.seal-empty { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12.5px; color: var(--faint); border: 1px dashed var(--line-2); border-radius: 14px; }
.seal-empty[hidden] { display: none; }
.birth-info .primary.wide { margin-top: 6px; }
.wiz-nav { display: flex; align-items: center; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.wiz-nav[hidden] { display: none; }
.wiz-nav .primary { min-width: 150px; }
.wiz-nav .primary:disabled { opacity: 0.35; }
.cost { width: 100%; border-collapse: collapse; font-size: 14px; }
.cost td { padding: 11px 0; border-top: 1px solid var(--line); vertical-align: top; }
.cost tr:first-child td { border-top: 0; }
.cost td small { display: block; font-size: 11.5px; color: var(--faint); margin-top: 2px; }
.cost td.mono { text-align: right; font-family: var(--mono); font-size: 13px; white-space: nowrap; }
.cost tr.tot td { border-top: 1.5px solid var(--ink); font-weight: 600; padding-top: 12px; }
.walletbox { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; background: var(--panel-2); }
.wb-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; flex-wrap: wrap; }
.wb-row .primary { height: 36px; }
.primary.big { height: 54px; font-size: 13px; }
.done-step { gap: 18px; }
.done-top { display: flex; gap: 16px; align-items: center; }
.done-check { flex: none; width: 52px; height: 52px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; }
.done-check svg { width: 26px; height: 26px; }
.done-top .step-p { margin-top: 4px; }
.ca-box { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.ca-box button { text-align: left; font-family: var(--mono); font-size: 14px; word-break: break-all; }
.ca-box button[data-copied]::after { content: "  copied"; color: var(--faint); }
.done-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.done-actions .primary.wide { grid-column: 1 / -1; height: 48px; }
.ghost.center { display: inline-flex; align-items: center; justify-content: center; height: 42px; }
/* preview */
.pv { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 10px; }
.pv-card { border: 1px solid var(--line); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 20px 50px -34px #0004; background: #fff; }
.pv-seal { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--panel-2); }
.pv-seal canvas { width: 100%; height: 100%; display: block; }
.pv-seal canvas.blank { opacity: 0; }
.pv-empty { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.pv-empty[hidden] { display: none; }
.pv-seal .badge { position: absolute; top: 10px; left: 10px; }
.pv-name { display: flex; flex-direction: column; }
.pv-name b { font-weight: 600; font-size: 18px; letter-spacing: -0.02em; word-break: break-all; }
.pv-name span { font-size: 13px; color: var(--soft); }
.pv-desc { font-size: 12.5px; color: var(--soft); line-height: 1.5; max-height: 4.5em; overflow: hidden; }
.pv-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.pv-tag { font-size: 11px; padding: 4px 8px; border-radius: 999px; background: var(--panel-2); color: var(--soft); }
.pv-links { display: flex; gap: 6px; flex-wrap: wrap; }
.pv-links span { font-size: 11px; padding: 4px 8px; border-radius: 999px; border: 1px solid var(--line-2); }
.pv-where { list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--soft); line-height: 1.45; padding: 2px 4px; }
.pv-where li { padding-left: 14px; position: relative; }
.pv-where li::before { content: ""; position: absolute; left: 0; top: .5em; width: 5px; height: 5px; border-radius: 50%; background: var(--ink); }
.pv-where b { color: var(--ink); font-weight: 500; }
@media (max-width: 1000px) {
  .create-body { grid-template-columns: 1fr; }
  .pv { position: static; order: -1; flex-direction: row; align-items: stretch; }
  .pv > .tl, .pv-where { display: none; }
  .pv-card { flex-direction: row; flex: 1; align-items: center; }
  .pv-seal { width: 76px; flex: none; }
  .pv-desc, .pv-tags, .pv-links { display: none; }
}
@media (max-width: 620px) {
  .create { padding: 16px; }
  .create-head .forge-h { font-size: 23px; }
  .stepper { width: 100%; } .stepper li { flex: 1; justify-content: center; padding: 0 6px; } .stepper li span { display: none; }
  .two, .birth { grid-template-columns: 1fr; }
  .seal-wrap { max-width: 280px; }
  .done-actions { grid-template-columns: 1fr; }
}

/* phones: iOS zooms into any field under 16 px; small print stays readable */
@media (width <= 600px) {
  input:not([type=range]):not([type=checkbox]):not([type=radio]), textarea, select { font-size: 16px !important; }
  .trade-box .sub { font-size: 13px; }
}
