/* Kumori's warm "paper / sun / ink" palette and type, so a Lab experiment looks like the Lab.
   Token names and values are copied from kumori/static/css/main.css (section 1-variables), 2026-10-11. */

/* === tokens === */
:root {
  --paper: #f5f5f4; --paper-2: #fafaf9; --surface: #ffffff;
  --ink: #1b1b1a; --ink-2: #595855; --ink-3: #6c6b66;
  --line: #e7e7e5; --line-2: #efefed;
  --sun: #e8a33a; --sun-soft: #f6e6c8; --sun-deep: #b9791f; --sun-text: #8a5a12;
  --text-inv: #2a1c08;
  --shadow: 0 1px 2px rgba(40,33,22,.05), 0 8px 24px rgba(40,33,22,.06);
  --shadow-lg: 0 2px 6px rgba(40,33,22,.07), 0 22px 48px rgba(40,33,22,.10);
  --focus-ring: 0 0 0 3px rgba(232,163,58,.28);
  --r: 18px;
  --serif: "Fraunces", Georgia, 'Times New Roman', serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}
[data-theme="dark"] {
  --paper: #16171a; --paper-2: #1c1d21; --surface: #1f2125;
  --ink: #ededea; --ink-2: #a9a8a4; --ink-3: #8f8e84;
  --line: #2c2e33; --line-2: #232529;
  --sun: #e9ab4e; --sun-soft: #39301d; --sun-deep: #f0bd6e; --sun-text: #f0bd6e;
  --text-inv: #16181b;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px rgba(0,0,0,.35);
  --shadow-lg: 0 2px 8px rgba(0,0,0,.4), 0 26px 60px rgba(0,0,0,.5);
}

/* === base === */
* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.55 var(--sans); overflow-x: hidden; }
a { color: var(--sun-text); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; line-height: 1.2; margin: 0; color: var(--ink); }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.15rem; }
h2 small, h3 small { font-family: var(--sans); font-size: .85rem; font-weight: 400; letter-spacing: 0; color: var(--ink-3); margin-left: .5rem; }
.mono { font-family: var(--mono); font-size: .82rem; font-variant-numeric: tabular-nums; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 22px; }
:focus-visible { outline: 3px solid var(--sun-text); outline-offset: 3px; }
.theme-icon-dark, [data-theme="dark"] .theme-icon-light { display: none; }
[data-theme="dark"] .theme-icon-dark { display: inline; }

/* === nav and footer === */
.site-nav { position: sticky; top: 0; z-index: 10; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
.site-nav-inner { display: flex; align-items: center; gap: 14px; max-width: 1040px; margin: 0 auto; padding: 10px 22px; }
.site-nav-brand { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; letter-spacing: -.01em; color: var(--ink); }
.site-nav-brand:hover { text-decoration: none; }
.site-nav-note { flex: 1; color: var(--ink-2); font-size: .875rem; }
.site-nav-theme { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  color: var(--ink); font-size: 1rem; cursor: pointer; }
.site-nav-theme:hover { border-color: var(--sun); }
.footer { display: flex; flex-wrap: wrap; gap: 6px 18px; padding-top: 34px; padding-bottom: 48px; color: var(--ink-3); font-size: .82rem; }

/* === band (the dark hero, as on Kumori's Lab pages) === */
.band { background: radial-gradient(1100px 620px at 82% 10%, #4a3517 0%, #1b1b1a 62%); color: #f5f5f4; padding: 48px 0 40px; }
.kicker { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: #c9a56a; margin: 0 0 10px; }
.kicker b { color: #f0bd6e; font-weight: 700; }
.band h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); line-height: 1.05; letter-spacing: -.025em; color: #fff; }
.lede { color: #e6e1d8; font-size: 1.08rem; margin: 14px 0 0; }
.band a { color: #f0bd6e; }
.band .mono { color: #e6e1d8; overflow-wrap: anywhere; }
.search { display: flex; gap: 8px; margin-top: 22px; }
.search input, .wallet-form input { flex: 1; min-width: 0; padding: 13px 18px; font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 999px; }
.search input:focus, .wallet-form input:focus { outline: none; border-color: var(--sun); box-shadow: var(--focus-ring); }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 11px 22px; font: inherit; font-size: .95rem; font-weight: 600;
  color: var(--text-inv); background: var(--sun); border: 1px solid var(--sun); border-radius: 999px; cursor: pointer; }
.btn:hover { background: var(--sun-deep); border-color: var(--sun-deep); }
[data-theme="dark"] .btn:hover { color: var(--text-inv); }

/* === numbers === */
.numbers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: -22px; }
.number { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; box-shadow: var(--shadow); min-width: 0; }
.number strong { display: block; font-family: var(--serif); font-size: clamp(1.4rem, 2.5vw, 2rem); color: var(--sun-text); line-height: 1.1; }
.number span { display: block; margin-top: 6px; font-size: .82rem; color: var(--ink-2); line-height: 1.45; }
.note { color: var(--ink-2); font-size: .88rem; margin: .5rem 0 1rem; }
.status { color: var(--ink-2); }

/* === board === */
section { margin-top: 40px; }
.section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tabs a { padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-2); font-size: .86rem; font-weight: 600; }
.tabs a:hover { border-color: var(--sun); text-decoration: none; }
.tabs a[aria-current] { background: var(--sun); border-color: var(--sun); color: var(--text-inv); font-weight: 700; }
.tabs a[aria-current]::before { content: '● '; font-size: .6em; vertical-align: middle; }
.board { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.card-row { display: flex; align-items: center; gap: 16px; padding: 12px 18px; border-top: 1px solid var(--line-2); }
.card-row:first-child { border-top: 0; }
.card-row:hover { background: var(--paper-2); }
.thumb { width: 52px; height: 72px; object-fit: contain; flex: none; border-radius: 6px; background: var(--paper); }
.thumb-empty { border: 1px dashed var(--line); }
.card-main { flex: 1; min-width: 0; }
.card-open { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--ink); text-align: left; cursor: pointer; }
.card-open:hover { color: var(--sun-text); }
.card-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 4px; color: var(--ink-2); font-size: .85rem; }
.chip { font-family: var(--mono); font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase; font-weight: 700; color: var(--sun-text);
  background: var(--sun-soft); border-radius: 999px; padding: 3px 9px; }
.card-nums { display: flex; gap: 22px; margin: 0; text-align: right; flex: none; }
.card-nums dt { color: var(--ink-3); font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-family: var(--sans); }
.card-nums dd { margin: 0; color: var(--ink); }

/* === panels === */
.panels { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; box-shadow: var(--shadow); }
.panel h2 { font-size: 1.3rem; }
.panel p { color: var(--ink-2); margin: .5rem 0 0; }
.wallet-form { display: flex; gap: 8px; margin-top: .9rem; }

/* === slab dialog === */
:root { color-scheme: light; }
[data-theme="dark"] { color-scheme: dark; }
.slab-dialog { width: min(940px, calc(100vw - 24px)); max-height: calc(100vh - 32px); padding: 28px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-lg);
  scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.slab-dialog::backdrop, .photo-dialog::backdrop { background: rgba(0, 0, 0, .68); }
.slab-dialog .kicker { color: var(--ink-3); }
.slab-dialog .kicker b { color: var(--sun-text); }
.slab-dialog h3 { margin: 1.8rem 0 .6rem; }
.slab-close { float: right; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  color: var(--ink); font-size: 1rem; cursor: pointer; }
.slab-close:hover { border-color: var(--sun); }
.slab-name { margin: 0 48px 1.1rem 0; font-size: 1.8rem; }
.slab-top { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.slab-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.slab-photo { padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); overflow: hidden; cursor: zoom-in; }
.slab-photo:hover { border-color: var(--sun); }
.slab-photo img { display: block; width: 100%; height: auto; }
.slab-nophoto { grid-column: 1 / -1; margin: 0; padding: 38px 18px; text-align: center; color: var(--ink-3); font-size: .9rem;
  border: 1px dashed var(--line); border-radius: 10px; }
.slab-keys { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.slab-key { background: var(--paper-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.slab-key span { display: block; font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.slab-key strong { display: block; margin-top: 4px; font-size: 1.05rem; overflow-wrap: anywhere; }
.slab-chain, .slab-keys .note { grid-column: 1 / -1; margin: 0; }
.slab-chain:hover { text-decoration: none; }
.slab-sections { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 24px; }
.slab-attrs { margin: 0; font-size: .92rem; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; }
.slab-attrs div { display: flex; justify-content: space-between; gap: 16px; padding: 8px 14px; }
.slab-attrs div:nth-child(odd), .slab-list li:nth-child(odd) { background: var(--paper-2); }
.slab-attrs dt { color: var(--ink-2); flex: none; }
.slab-attrs dd { margin: 0; text-align: right; font-weight: 500; overflow-wrap: anywhere; }
.slab-list { list-style: none; margin: 0; padding: 0; font-size: .92rem; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; }
.slab-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; padding: 8px 14px; }
.slab-list li > :first-child { flex: none; min-width: 9ch; }
.slab-list li > :nth-child(2) { flex: 1; }
.slab-list .chip { flex: none !important; }
.slab-list .chip + .mono { flex: 1; text-align: right; }
.copies { font-size: .9rem; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; max-height: 330px; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.copies-head, .copy-row { display: grid; grid-template-columns: 1.3fr 1.1fr 1.3fr 1fr .8fr auto; gap: 12px; align-items: center; padding: 8px 14px; text-align: left; }
.copies-head { position: sticky; top: 0; background: var(--surface); border-bottom: 1px solid var(--line); font-size: .68rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.copy-row { width: 100%; border: 0; font: inherit; color: var(--ink); background: none; cursor: pointer; }
.copy-row:nth-child(even) { background: var(--paper-2); }
.copy-row:hover { background: var(--sun-soft); }
.copy-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy-go { color: var(--sun-text); font-weight: 600; }
.photo-dialog { padding: 0; border: 0; background: none; max-width: 96vw; max-height: 96vh; cursor: zoom-out; }
.photo-dialog img { display: block; max-width: 96vw; max-height: 94vh; border-radius: 10px; box-shadow: var(--shadow-lg); }

/* === collection (a collector's own cards, rendered clean) === */
.numbers-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.gain-up { color: #2e7d46 !important; }
.gain-down { color: #c0492f !important; }
[data-theme="dark"] .gain-up { color: #7bd49a !important; }
[data-theme="dark"] .gain-down { color: #f0937d !important; }

.next { margin-top: 22px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--sun);
  border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.next > summary { display: flex; align-items: center; gap: 10px; padding: 15px 20px; cursor: pointer; font-weight: 600;
  color: var(--ink); list-style: none; }
.next > summary::-webkit-details-marker { display: none; }
.next > summary::after { content: '▸'; margin-left: auto; color: var(--ink-3); transition: transform .15s; }
.next[open] > summary::after { transform: rotate(90deg); }
.next-tag { font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; font-weight: 700;
  color: var(--text-inv); background: var(--sun); border-radius: 999px; padding: 3px 9px; }
.next-hint { font-family: var(--sans); font-size: .78rem; font-weight: 400; color: var(--ink-3); }
.next-body { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 28px; padding: 4px 22px 22px; border-top: 1px solid var(--line-2); }
.next-col h3 { margin: 16px 0 8px; font-size: 1rem; color: var(--sun-text); }
.next-col ul { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: .9rem; }
.next-col li { margin: 5px 0; }
.next-col em { color: var(--ink); font-style: italic; }

.trend .trend-now { color: var(--ink-2); }
.spark { margin-top: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 12px; }
.spark svg { display: block; width: 100%; height: 160px; }

.wall { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.wall-open { position: relative; display: block; width: 100%; padding: 0; border: 1px solid var(--line); border-radius: 12px;
  background: var(--paper); cursor: pointer; overflow: hidden; aspect-ratio: 5 / 7; }
.wall-open:hover { border-color: var(--sun); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.wall-open { transition: transform .12s, box-shadow .12s, border-color .12s; }
.wall-open img { display: block; width: 100%; height: 100%; object-fit: contain; }
.wall-empty { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: var(--ink-3); font-size: .8rem; }
.wall-val { position: absolute; left: 8px; bottom: 8px; font-family: var(--mono); font-size: .8rem; font-weight: 700; color: var(--text-inv);
  background: var(--sun); border-radius: 999px; padding: 3px 9px; box-shadow: var(--shadow); }
.wall-meta { margin-top: 8px; display: flex; flex-direction: column; gap: 2px; }
.wall-meta b { font-size: .9rem; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.wall-meta .mono { font-size: .72rem; color: var(--ink-3); }

.chip-chain { color: var(--text-inv); background: var(--sun); }
[data-theme="dark"] .chip-chain { color: var(--text-inv); }
.wall-chain { background: var(--ink); color: var(--paper); }
[data-theme="dark"] .wall-chain { background: var(--sun); color: var(--text-inv); }
.slab-key-chain strong { color: var(--sun-text); }
.onchain .section-head { align-items: baseline; }
.oc-copies { max-height: 360px; }
.oc-row { cursor: default; }
.oc-row:hover { background: var(--paper-2); }
.oc-row .chip { font-size: 9.5px; padding: 2px 7px; }
.oc-links { white-space: nowrap; }
.oc-links a { color: var(--sun-text); font-weight: 600; }
.oc-links a:hover { text-decoration: underline; }

.movers-list { list-style: none; margin: 12px 0 0; padding: 0; }
.movers-list li { display: grid; grid-template-columns: 1fr auto auto; align-items: baseline; gap: 10px 14px; padding: 6px 0; border-top: 1px solid var(--line-2); }
.movers-list li:first-child { border-top: 0; }
.mv-name { font-size: .9rem; color: var(--ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mv-name em { font-style: normal; color: var(--ink-3); font-size: .78rem; margin-left: 7px; }
.mv-was { font-size: .76rem; color: var(--ink-3); }
.mv-delta { font-size: .86rem; font-weight: 700; }
.mv-up { color: #2e7d46; }
.mv-down { color: #c0492f; }
[data-theme="dark"] .mv-up { color: #7bd49a; }
[data-theme="dark"] .mv-down { color: #f0937d; }

.costnudge { margin: 14px 0 0; padding: 11px 16px; font-size: .88rem; color: var(--sun-text);
  background: var(--sun-soft); border: 1px solid var(--sun); border-radius: 12px; }

/* on-chain population grid in the card modal */
.pop { display: grid; gap: 1px; margin: .3rem 0 0; background: var(--line-2); border: 1px solid var(--line-2);
  border-radius: 12px; overflow: hidden; font-variant-numeric: tabular-nums; }
.pop > span { background: var(--surface); padding: 7px 4px; text-align: center; font-size: .85rem; }
.pop-corner { background: var(--paper-2) !important; }
.pop-grade { background: var(--paper-2) !important; font-size: .68rem !important; font-weight: 700; letter-spacing: .02em;
  text-transform: uppercase; color: var(--ink-3); font-family: var(--mono); }
.pop-grader { background: var(--paper-2) !important; font-weight: 700; font-size: .78rem !important; color: var(--ink-2); text-align: left !important; padding-left: 10px !important; }
.pop-cell { color: var(--ink); font-weight: 600; }
.pop-zero { color: var(--line); font-weight: 400; }
.pop-rowtot { color: var(--sun-text); }

.search-inline { margin-top: 0; max-width: 360px; }
.card-nums div { min-width: 64px; }

.breakdowns { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.bars { list-style: none; margin: 14px 0 0; padding: 0; }
.bars li { display: grid; grid-template-columns: 7.5rem 1fr auto; align-items: center; gap: 12px; padding: 5px 0; }
.bar-name { font-size: .88rem; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 9px; background: var(--paper-2); border-radius: 999px; overflow: hidden; }
.bar-fill { display: block; height: 100%; background: var(--sun); border-radius: 999px; }
.bar-val { font-size: .82rem; color: var(--ink); }

.pop-wrap { overflow-x: auto; scrollbar-width: thin; }

/* app-style bottom nav: mobile only */
.botnav { display: none; }

/* === mobile === */
@media (max-width: 780px) {
  .numbers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .numbers-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .next-body { grid-template-columns: 1fr; }
  .breakdowns { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .site-nav-note { visibility: hidden; }
  .band { padding: 34px 0 36px; }
  .card-row { flex-wrap: wrap; }
  .card-nums { width: 100%; text-align: left; padding-left: 68px; }
  .panels, .slab-top { grid-template-columns: 1fr; }
  .copies-head, .copy-row { grid-template-columns: 1.2fr 1fr auto; }
  .copies-head span:nth-child(n+3):not(:last-child), .copy-row > span:nth-child(n+3):not(:last-child) { display: none; }
  .search, .wallet-form { flex-direction: column; }
  .pop { min-width: 30rem; }                         /* scrolls inside .pop-wrap */
  .slab-dialog { padding: 20px 16px; }
  main.wrap { padding-bottom: 74px; }                /* clear the fixed bottom nav */
  [id^="s-"] { scroll-margin-top: 62px; }            /* clear sticky top nav on jump */

  .botnav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    background: var(--surface); border-top: 1px solid var(--line);
    box-shadow: 0 -2px 14px rgba(40, 33, 22, .1); padding: 6px 2px calc(6px + env(safe-area-inset-bottom)); }
  .botnav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 4px 1px; font-size: .62rem; font-weight: 700; letter-spacing: .01em;
    color: var(--ink-2); text-decoration: none; }
  .botnav a span { font-size: 1.15rem; line-height: 1; color: var(--ink-3); }
  .botnav a:active, .botnav a:active span { color: var(--sun-text); }
}
