/* SWARDBOW base.css: design tokens, self-hosted fonts, type, chrome (nav, drawer, phone strip, preview bar, footer), components.
   Bright meadow / paper theatre, light only. Pirata One for display, Figtree for everything else (tabular numbers on scoreboards).
   Owner: APP. LANDING imports it read-only; request changes in BRIEF.md "Change log". */

@font-face { font-family: 'Pirata One'; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/pirata-one-latin-400.woff2) format('woff2'); }
@font-face { font-family: 'Figtree'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/assets/fonts/figtree-latin.woff2) format('woff2'); }

:root {
  color-scheme: light;
  /* brief tokens */
  --meadow: #B9E26B;
  --meadow-2: #D7EE9F;
  --chalk: #FBF8EE;
  --wood: #8A5A2B;
  --wood-2: #C9956A;
  --ink: #1E2A16;
  --dim: #5C6B4A;
  --sky: #CFE7F6;
  --bounty: #D7263D;
  --gold: #E8B931;
  --ok: #2E8B57;
  --bad: #D7263D;
  /* derived (contrast-checked: text colours are >= 4.5:1 on --chalk and --meadow-2) */
  --muted: #4F5D3F;          /* secondary text */
  --ok-ink: #1F6B40;         /* green text */
  --bad-ink: #B21E31;        /* red text */
  --wood-ink: #6B4420;       /* darker wood: borders, hover, text on chalk */
  --wood-3: #5E3B18;         /* sign shadow */
  --chalk-2: #F3EEDC;        /* table stripes, sunk panels */
  --chalk-3: #EAE3CC;        /* stronger paper */
  --line: rgba(30, 42, 22, .16);
  --line-2: rgba(30, 42, 22, .32);
  --gold-wash: #FBF0C9;
  --bounty-wash: #FBE3E6;
  --ok-wash: #DFF3E6;
  --sky-wash: #E9F4FB;
  --meadow-ink: #3E6B1E;     /* green text on chalk */

  --display: 'Pirata One', 'Figtree', Georgia, serif;
  --body: 'Figtree', 'Helvetica Neue', Arial, sans-serif;

  --r: 14px;
  --r-sm: 8px;
  --shadow: 0 1px 0 rgba(30, 42, 22, .06), 0 10px 24px -14px rgba(30, 42, 22, .35);
  --shadow-sm: 0 1px 0 rgba(30, 42, 22, .06), 0 4px 10px -6px rgba(30, 42, 22, .3);
  --nav-h: 64px;
  --mbar-h: 0px;
  --banner-h: 0px;
  --wrap: 1200px;
  --gutter: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--nav-h) + var(--banner-h) + 16px); }
body {
  margin: 0; min-height: 100vh;
  background: var(--meadow-2);
  color: var(--ink);
  font: 400 17px/1.5 var(--body);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body.has-mbar { padding-bottom: var(--mbar-h); }
img, svg, video, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--wood); text-decoration-thickness: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--gold); color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

/* ── type ─────────────────────────────────────────────── */
h1, h2, h3, h4 { margin: 0; color: var(--ink); font-weight: 700; line-height: 1.15; letter-spacing: 0; }
h1, h2, .display { font-family: var(--display); font-weight: 400; line-height: 1; letter-spacing: .005em; }
h1 { font-size: clamp(42px, 6.6vw, 80px); }
h2 { font-size: clamp(28px, 3.4vw, 40px); }
h3 { font-size: 19px; }
p { margin: 0 0 1em; }
small, .small { font-size: 15px; }
.tiny { font-size: 13px; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.num, .tbl td, .kv dd, .stat .v { font-variant-numeric: tabular-nums lining-nums; }
.break { word-break: break-all; overflow-wrap: anywhere; }
.nowrap { white-space: nowrap; }
.label, .kicker {
  font-family: var(--body); font-weight: 700; font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.kicker { display: inline-flex; align-items: center; gap: 8px; }
.kicker::before { content: ''; width: 20px; height: 4px; border-radius: 2px; background: var(--gold); }
.lead { font-size: clamp(18px, 2vw, 21px); line-height: 1.45; color: var(--ink); max-width: 62ch; }
em, i { font-style: italic; }
code, kbd {
  font-family: var(--body); font-weight: 500; font-size: .92em; font-variant-numeric: tabular-nums;
  background: var(--chalk-2); border: 1px solid var(--line); border-radius: 6px; padding: .05em .35em;
}
hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
.ok-t { color: var(--ok-ink); }
.bad-t { color: var(--bad-ink); }
.wood-t { color: var(--wood-ink); }
.gold-t { color: #8A6A10; }

/* ── buttons: wooden signs ────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: 9px;
  border: 1.5px solid var(--wood-ink); background: var(--chalk); color: var(--ink);
  font: 600 16px/1 var(--body); text-decoration: none; cursor: pointer; white-space: nowrap;
  box-shadow: 0 2px 0 var(--wood-ink);
  transition: background .15s, color .15s, transform .12s, box-shadow .12s;
}
.btn:hover { background: var(--gold-wash); text-decoration: none; }
.btn:active { transform: translateY(2px); box-shadow: 0 0 0 var(--wood-ink); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary {
  background: linear-gradient(180deg, #96652F, var(--wood) 55%, #7D4F23); color: var(--chalk); border-color: var(--wood-3);
  box-shadow: 0 3px 0 var(--wood-3), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.btn-primary:hover { background: linear-gradient(180deg, #A2703A, #946230 55%, #86562A); color: #fff; }
.btn-primary:active { box-shadow: 0 0 0 var(--wood-3); transform: translateY(3px); }
.btn-ghost { border-color: transparent; background: transparent; box-shadow: none; }
.btn-ghost:hover { background: var(--chalk-2); }
.btn-bad { border-color: var(--bad-ink); color: var(--bad-ink); box-shadow: 0 2px 0 var(--bad-ink); }
.btn-bad:hover { background: var(--bounty-wash); }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: 15px; }
.btn-lg { min-height: 54px; padding: 0 28px; font-size: 18px; border-radius: 11px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; flex: none;
  border: 1.5px solid var(--line-2); background: var(--chalk); color: var(--ink); cursor: pointer; text-decoration: none;
}
.icon-btn:hover { background: var(--gold-wash); border-color: var(--wood); }
.icon-btn svg { width: 18px; height: 18px; }

/* ── chips, tags, dots ────────────────────────────────── */
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 12px; border-radius: 9px;
  border: 1.5px solid var(--line-2); background: var(--chalk); color: var(--ink); font: 500 15px/1 var(--body); cursor: pointer;
}
.chip:hover { border-color: var(--wood); background: var(--gold-wash); }
.chip svg { width: 15px; height: 15px; }
.tag {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 6px;
  font: 700 12px/1 var(--body); letter-spacing: .07em; text-transform: uppercase; color: var(--ink);
  background: var(--chalk-2); border: 1px solid var(--line); white-space: nowrap;
}
.tag-bot { background: var(--chalk); border: 1.5px dashed var(--line-2); color: var(--muted); }
.tag-gold { background: var(--gold); border-color: #C99B1E; }
.tag-bounty { background: var(--bounty); color: #fff; border-color: #A81C2F; }
.tag-wood { background: var(--wood); color: var(--chalk); border-color: var(--wood-3); }
.tag-sky { background: var(--sky); border-color: #A9CDE3; }
.tag-meadow { background: var(--meadow); border-color: #93BE45; }
.tag-ok { background: var(--ok-wash); color: var(--ok-ink); border-color: #A9D9BC; }
.tag-bad { background: var(--bounty-wash); color: var(--bad-ink); border-color: #F0B9C0; }
.tag-line { background: transparent; border-color: var(--line-2); color: var(--muted); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); flex: none; vertical-align: middle; }
.dot.on { background: var(--ok); box-shadow: 0 0 0 3px rgba(46, 139, 87, .2); }
.dot.live { background: var(--bounty); box-shadow: 0 0 0 3px rgba(215, 38, 61, .18); }
.dot.bad { background: var(--bad); box-shadow: 0 0 0 3px rgba(215, 38, 61, .18); }
.dot.wait { background: var(--gold); box-shadow: 0 0 0 3px rgba(232, 185, 49, .35); }
.dot.blink { animation: sw-blink 1.6s ease-in-out infinite; }
@keyframes sw-blink { 50% { opacity: .35; } }

/* marks: small gold coins */
.marks { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.marks .coin { width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #F7D86A, var(--gold) 60%, #B9891A); box-shadow: inset 0 0 0 1px rgba(30, 42, 22, .35); flex: none; }
.marks.leader { color: var(--bad-ink); }
.marks.leader .coin { box-shadow: 0 0 0 2px var(--bounty), inset 0 0 0 1px rgba(30, 42, 22, .35); }

/* ── panels: chalk cards ──────────────────────────────── */
.card { background: var(--chalk); border: 1.5px solid var(--line-2); border-radius: var(--r); box-shadow: var(--shadow); min-width: 0; }
.card-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1.5px solid var(--line); }
.card-h h2, .card-h h3 { font-size: 19px; }
.card-h h2.display, .card-h h3.display { font-size: 26px; }
.card-h .meta { margin-left: auto; }
.card-b { padding: 18px; }
.sunk { background: var(--chalk-2); border: 1px solid var(--line); border-radius: var(--r-sm); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.stat { background: var(--chalk); border: 1.5px solid var(--line-2); border-radius: 12px; padding: 14px 16px; display: grid; gap: 4px; align-content: start; min-width: 0; box-shadow: inset 0 4px 0 var(--wood-2); }
.stat .v { font-size: 25px; font-weight: 700; line-height: 1.15; overflow-wrap: anywhere; }
.stat .sub { font-size: 14px; color: var(--muted); }
.stat.accent-gold { box-shadow: inset 0 4px 0 var(--gold); }
.stat.accent-bounty { box-shadow: inset 0 4px 0 var(--bounty); }
.stat.accent-meadow { box-shadow: inset 0 4px 0 var(--meadow); }
.stat.accent-sky { box-shadow: inset 0 4px 0 var(--sky); }
.stat.accent-ok { box-shadow: inset 0 4px 0 var(--ok); }

.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; font-size: 16px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* scoreboard tables */
.tbl-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1.5px solid var(--line-2); border-radius: 12px; background: var(--chalk); }
.tbl { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.tbl th {
  text-align: left; font-weight: 700; font-size: 12px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted);
  padding: 10px 12px; border-bottom: 1.5px solid var(--line-2); background: var(--meadow-2); white-space: nowrap; position: sticky; top: 0;
}
.tbl td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:nth-child(even) td { background: var(--chalk-2); }
.tbl .r, .tbl th.r { text-align: right; }
.tbl td.r, .tbl td.num, .tbl .ext, .tbl .tag { white-space: nowrap; }
.tbl a { text-decoration-color: var(--line-2); }
.tbl .empty-row td { color: var(--muted); text-align: center; padding: 22px; font-style: italic; }
.tbl tr.is-leader td:first-child { box-shadow: inset 4px 0 0 var(--bounty); }
.tbl tr.is-me td { background: var(--gold-wash) !important; }
.tbl tr.is-out td { color: var(--muted); }
.tbl .nm { font-family: var(--display); font-size: 19px; letter-spacing: .01em; }

/* forms */
.input {
  width: 100%; min-height: 46px; padding: 0 14px; border-radius: 10px; border: 1.5px solid var(--line-2); background: var(--chalk);
  font: 400 16px/1 var(--body); color: var(--ink);
}
.input::placeholder { color: var(--dim); }
.input:focus { outline: none; border-color: var(--wood); box-shadow: 0 0 0 3px var(--gold-wash); }
select.input { padding-right: 34px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.field { display: grid; gap: 6px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* notices */
.banner {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; border-radius: 12px;
  background: var(--sky-wash); border: 1.5px solid var(--sky); font-size: 16px;
}
.banner.warn { background: var(--gold-wash); border-color: var(--gold); }
.banner.bad { background: var(--bounty-wash); border-color: #F0B9C0; }
.banner.ok { background: var(--ok-wash); border-color: #A9D9BC; }
.note { padding: 12px 16px; border-left: 4px solid var(--wood); background: var(--chalk-2); border-radius: 0 10px 10px 0; font-size: 16px; }
.err-box { padding: 12px 16px; border-radius: 10px; background: var(--bounty-wash); color: var(--bad-ink); border: 1px solid #F0B9C0; }
.empty { padding: 26px; text-align: center; color: var(--muted); font-style: italic; }
.skel {
  display: inline-block; min-width: 80px; height: 1em; border-radius: 6px; vertical-align: middle;
  background: linear-gradient(90deg, var(--chalk-2) 0%, #FFFDF5 50%, var(--chalk-2) 100%); background-size: 200% 100%;
  animation: sw-shimmer 1.3s linear infinite;
}
@keyframes sw-shimmer { to { background-position: -200% 0; } }
.bar { height: 12px; border-radius: 999px; background: var(--chalk-2); border: 1px solid var(--line-2); overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--gold); box-shadow: inset 0 0 0 1px rgba(30, 42, 22, .18); transition: width .6s ease; }

/* ── nav ──────────────────────────────────────────────── */
.sw-skiplink { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: 10px; background: var(--ink); color: var(--chalk); }
.sw-skiplink:focus { top: 10px; }
.sw-nav {
  position: sticky; top: 0; z-index: 40; height: var(--nav-h);
  background: rgba(251, 248, 238, .9); -webkit-backdrop-filter: saturate(1.3) blur(14px); backdrop-filter: saturate(1.3) blur(14px);
  border-bottom: 2px solid var(--wood);
}
.sw-nav.overlay { position: fixed; left: 0; right: 0; background: rgba(251, 248, 238, .78); }
.sw-nav > .wrap { height: 100%; display: flex; align-items: center; gap: 20px; }
.sw-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: none; }
.sw-logo:hover { text-decoration: none; }
.sw-logo svg { width: 32px; height: 32px; }
.sw-word { font: 400 27px/1 var(--display); letter-spacing: .02em; transform: translateY(1px); }
.sw-links { display: flex; align-items: center; gap: 2px; }
.sw-links a { padding: 8px 12px; border-radius: 8px; text-decoration: none; font-weight: 600; font-size: 16px; color: var(--ink); }
.sw-links a:hover { background: var(--gold-wash); }
.sw-links a[aria-current="page"] { background: var(--chalk); box-shadow: inset 0 0 0 1.5px var(--line-2), inset 0 -3px 0 var(--gold); }
.sw-nav-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.sw-ca-chip { white-space: nowrap; flex-shrink: 0; }
.sw-ca-chip .sw-ca-k { font-weight: 700; font-size: 12px; letter-spacing: .08em; color: var(--muted); }
.sw-burger { display: none; }
.sw-sound { transition: color .2s, background .2s; }
.sw-sound.is-off { color: var(--dim); }
.sw-drawer {
  display: none; position: fixed; z-index: 39; left: 0; right: 0; top: var(--nav-h);
  background: var(--chalk); border-bottom: 2px solid var(--wood); box-shadow: var(--shadow); padding: 8px var(--gutter) 16px;
  max-height: calc(100vh - var(--nav-h)); overflow-y: auto;
}
.sw-drawer.open { display: block; }
.sw-dl { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; min-height: 52px; padding: 12px 4px; border-bottom: 1px solid var(--line); text-decoration: none; font-size: 20px; font-weight: 600; }
.sw-dl .label { font-size: 12px; }
.sw-dl[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 3px; }
.sw-drawer-row { display: flex; align-items: center; gap: 10px; padding-top: 14px; flex-wrap: wrap; }

/* countdown */
.sw-countdown { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.sw-countdown .soon { font-style: italic; color: var(--muted); }
.sw-countdown .live { font-weight: 700; color: var(--ok-ink); }
.sw-countdown .c { display: inline-flex; align-items: baseline; gap: 1px; }
.sw-countdown .c b { font-weight: 700; }
.sw-countdown .c small { font-size: 11px; color: var(--muted); }
.sw-countdown .when { color: var(--muted); font-size: 13px; }
.sw-countdown.big { font-size: 22px; gap: 12px; flex-wrap: wrap; white-space: normal; }
.sw-countdown.big .c b { font: 400 38px/1 var(--display); }

/* CA strip */
.sw-ca { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.sw-ca-tag { font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.sw-ca-addr { font-size: 15px; overflow-wrap: anywhere; min-width: 0; }
.sw-ca-addr.pending { color: var(--muted); font-style: italic; }

/* preview bar (full-width, under the nav) */
.sw-preview {
  position: relative; z-index: 38; display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
  padding: 8px var(--gutter); background: var(--gold-wash); border-bottom: 1px solid var(--gold); font-size: 15px; text-align: center;
}
.sw-preview .tag { background: var(--gold); border-color: #C99B1E; }
.sw-preview.fixed { position: fixed; left: 0; right: 0; top: var(--nav-h); }

/* phone bottom strip */
.sw-mbar { display: none; }

/* footer */
.sw-foot { margin-top: 72px; background: var(--meadow); border-top: 2px solid var(--wood); padding: 44px 0 28px; }
.sw-foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 28px; }
.sw-foot h2 { font: 700 13px/1.2 var(--body); letter-spacing: .09em; text-transform: uppercase; color: var(--ink); margin-bottom: 10px; }
.sw-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.sw-foot ul a { display: inline-block; padding: 4px 0; text-decoration: none; }
.sw-foot ul a:hover { text-decoration: underline; }
.sw-foot-about { max-width: 52ch; margin: 14px 0; color: var(--ink); }
.sw-foot-social { display: flex; gap: 8px; }
.sw-foot-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 30px; padding-top: 18px; border-top: 1px solid rgba(30, 42, 22, .25); }
.sw-legal { margin: 18px 0 0; font-size: 14px; line-height: 1.55; color: var(--ink); max-width: 110ch; }
.sw-legal b { font-weight: 700; }

/* toast + dialog */
.sw-toast {
  position: fixed; z-index: 90; left: 50%; top: calc(var(--nav-h) + var(--banner-h) + 12px); transform: translate(-50%, -8px);
  max-width: min(520px, calc(100vw - 32px)); padding: 12px 18px; border-radius: 12px; background: var(--ink); color: var(--chalk);
  font-size: 16px; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.sw-toast.show { opacity: 1; transform: translate(-50%, 0); }
.sw-toast.ok { background: var(--ok-ink); }
.sw-toast.err { background: var(--bad-ink); }
.sw-dialog { border: 1.5px solid var(--wood); border-radius: 16px; padding: 0; width: min(440px, calc(100vw - 32px)); background: var(--chalk); color: var(--ink); box-shadow: var(--shadow); }
.sw-dialog::backdrop { background: rgba(30, 42, 22, .4); }
.sw-dialog header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px 20px; border-bottom: 1px solid var(--line); }
.sw-dialog h3 { font-size: 20px; }
.sw-dialog .body { padding: 16px 20px; }
.sw-dialog .actions { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 20px 18px; }
.sw-wallets { display: grid; gap: 8px; }
.sw-wallets button { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 14px; border-radius: 10px; border: 1.5px solid var(--line-2); background: var(--chalk); cursor: pointer; font-weight: 600; text-align: left; }
.sw-wallets button:hover { background: var(--gold-wash); border-color: var(--wood); }
.sw-wallets img { width: 28px; height: 28px; border-radius: 6px; }
.sw-connect.wrong { border-color: var(--bad-ink); color: var(--bad-ink); }

/* ── shared content bits (also usable by the 3D pages) ── */
.ext { display: inline-flex; align-items: center; gap: 3px; }
.ext svg { width: 13px; height: 13px; opacity: .7; flex: none; }
.ext-i { display: inline-flex; }

/* feed / log */
.log { list-style: none; margin: 0; padding: 0; }
.log li { display: grid; grid-template-columns: 92px 1fr auto; gap: 12px; align-items: baseline; padding: 9px 2px; border-bottom: 1px solid var(--line); font-size: 15.5px; }
.log li:last-child { border-bottom: 0; }
.log .t { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.log li.new { animation: sw-flash 1.6s ease-out; }
@keyframes sw-flash { from { background: var(--gold-wash); } to { background: transparent; } }

/* ── responsive ───────────────────────────────────────── */
/* Nav fit (no horizontal scroll from 320 to 1920): the nav countdown only shows >= 1500 px, where the nav row gets a wider wrap.
   Links + X/TG collapse into the burger <= 1100 px, or <= 1279 px when the page puts Connect in the bar (.sw-nav.has-wallet).
   CA chip, Buy and the sound toggle stay in the bar down to 861 px; below that CA + Buy move to the phone strip. */
@media (min-width: 1500px) { .sw-nav > .wrap { max-width: 1480px; } }
@media (max-width: 1499px) { .sw-hide-xl { display: none !important; } }
@media (max-width: 1100px) {
  .sw-hide-md { display: none !important; }
  .sw-nav .sw-links, .sw-nav .sw-social { display: none !important; }
  .sw-burger { display: inline-grid; }
}
@media (max-width: 1279px) {
  .sw-nav.has-wallet .sw-links, .sw-nav.has-wallet .sw-social { display: none !important; }
  .sw-nav.has-wallet .sw-burger { display: inline-grid; }
}
@media (min-width: 1101px) { .sw-nav:not(.has-wallet) ~ .sw-drawer { display: none !important; } }
@media (min-width: 1280px) { .sw-nav ~ .sw-drawer { display: none !important; } }
@media (max-width: 860px) {
  :root { --nav-h: 60px; --gutter: 16px; }
  .sw-links, .sw-hide-sm, .sw-nav .sw-social { display: none !important; }
  .sw-burger { display: inline-grid; width: 44px; height: 44px; }
  .sw-nav > .wrap { gap: 12px; }
  .sw-nav-right { gap: 6px; }
  .sw-drawer .icon-btn { width: 44px; height: 44px; }
  body.has-mbar { --mbar-h: 64px; }
  .sw-mbar {
    display: flex; align-items: center; gap: 8px; position: fixed; z-index: 41; left: 0; right: 0; bottom: 0;
    height: calc(var(--mbar-h) + env(safe-area-inset-bottom, 0px)); padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(251, 248, 238, .95); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-top: 2px solid var(--wood);
  }
  .sw-mbar .chip, .sw-mbar .btn { min-height: 44px; }
  .sw-mbar .chip { flex: 1; justify-content: center; min-width: 0; }
  .sw-mbar .btn { flex: 1; }
  .sw-foot-grid { grid-template-columns: 1fr 1fr; }
  .sw-foot-grid > :first-child { grid-column: 1 / -1; }
  .sw-foot ul a { padding: 10px 0; }
  .btn-sm, .chip { min-height: 44px; }
  .icon-btn { width: 44px; height: 44px; }
  .log li { grid-template-columns: 1fr auto; }
  .log li .t { grid-column: 1 / -1; }
  .sw-toast { top: auto; bottom: calc(var(--mbar-h) + 14px); }
}
@media (max-width: 600px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stat { padding: 11px 12px; }
  .stat .v { font-size: 19px; }
  .stat .sub { font-size: 13px; line-height: 1.35; }
  .stat .label { font-size: 11.5px; letter-spacing: .06em; }
  /* .tbl-stack: each row becomes a small card of "label / value" lines (labels from td[data-l]); the first cell is the row title */
  .tbl-scroll:has(> .tbl-stack) { overflow-x: visible; }
  .tbl-stack thead { display: none; }
  .tbl-stack, .tbl-stack tbody, .tbl-stack tr, .tbl-stack td { display: block; width: 100%; }
  .tbl-stack tr { padding: 10px 14px; border-bottom: 1px solid var(--line); }
  .tbl-stack tbody tr:nth-child(even) { background: var(--chalk-2); }
  .tbl-stack tbody tr:nth-child(even) td { background: transparent; }
  .tbl-stack tr:last-child { border-bottom: 0; }
  .tbl-stack td { display: flow-root; padding: 3px 0; border: 0; text-align: right; min-width: 0; white-space: normal; overflow-wrap: anywhere; }
  .tbl-stack td::before { content: attr(data-l); float: left; margin-right: 12px; text-align: left; font-size: 12px; line-height: 1.9; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
  .tbl-stack td:not([data-l])::before, .tbl-stack td[data-l=""]::before { content: none; }
  .tbl-stack td:first-child { display: block; text-align: left; padding-bottom: 4px; }
  .tbl-stack td.r, .tbl-stack td.num { white-space: nowrap; }
  .tbl-stack td[data-l=""] { text-align: left; }
  .tbl-stack .empty-row td { display: block; text-align: center; }
  .tbl-stack tr.is-leader td:first-child { box-shadow: none; }
  .tbl-stack tr.is-leader { box-shadow: inset 4px 0 0 var(--bounty); }
}
@media (max-width: 420px) {
  .sw-word { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
