

@font-face{font-family:'Barlow';font-style:normal;font-weight:100;font-display:swap;src:url(fonts/barlow-100-6b1183d1e4.woff) format("woff");unicode-range:U+0020-005A, U+00A0, U+00D7, U+2009, U+202F, U+2212}
@font-face{font-family:'Barlow';font-style:normal;font-weight:300;font-display:swap;src:url(fonts/barlow-300-c027fdbf8c.woff) format("woff");unicode-range:U+0020-007E, U+00A0-00FF, U+2009-200A, U+202F, U+2190-2193, U+2212, U+2215}
@font-face{font-family:'D-DIN';font-style:normal;font-weight:400;font-display:swap;src:url(fonts/d-din-400-e9172b71c5.woff) format("woff");unicode-range:U+0020-007E, U+00A0-00FF, U+2009-200A, U+202F, U+2190-2193, U+2212, U+2215}
@font-face{font-family:'JetBrains Mono';font-style:normal;font-weight:400;font-display:swap;src:url(fonts/jetbrainsmono-400-bd7b287e02.woff) format("woff");unicode-range:U+0020-007E, U+00A0, U+00D7, U+2009, U+202F}

:root {
  --bg: #FFFFFF; --ink: #171718; --line: #B1BFC4; --panel: #FFFFFF; --soft: #F5F7FA; --plate: #F2F4F7;
  --green: #21CE99; --greenHi: #1AE9AA; --label: #040D14; --focus: #040D14; --gap: #FFFFFF;
  --d: 'D-DIN', 'DIN Alternate', 'Arial Narrow', sans-serif;
  --n: 'Barlow', 'D-DIN', sans-serif;
  --m: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
  --pad: 8px; --side: 10px;
  --safeT: env(safe-area-inset-top, 0px); --safeB: env(safe-area-inset-bottom, 0px);
  --safeL: env(safe-area-inset-left, 0px); --safeR: env(safe-area-inset-right, 0px);
}
body.night { --bg: #1B1B1D; --ink: #FFFFFF; --line: #30363A; --panel: #171718; --soft: #171718; --plate: #171718; --focus: #FFFFFF; --gap: #1B1B1D; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none; }
body { background: var(--bg); color: var(--ink); font: 13px/1.25 var(--d); -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%; transition: background-color 1.2s, color 1.2s; }
body.still, body.still * { transition: none !important; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; }
a { color: inherit; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; box-shadow: 0 0 0 2px var(--gap); border-radius: 3px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

canvas#grid, canvas#fx { position: fixed; left: 0; top: 0; display: block; }
canvas#grid { z-index: 1; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
canvas#fx { pointer-events: none; z-index: 5; }
#ui { position: fixed; inset: 0; pointer-events: none; z-index: 3; }
#ui .top, #ui .bottom { position: absolute; left: calc(var(--side) + var(--safeL)); right: calc(var(--side) + var(--safeR)); }
#ui .top > *, #ui .bottom > * { pointer-events: auto; }
#ui .fadeable { transition: opacity 0.12s; }
body.scrub #ui .fadeable, body.scrub .plate { opacity: 0; pointer-events: none; }



.top { top: var(--topY, calc(var(--pad) + var(--safeT))); }
.caps { height: 18px; display: flex; align-items: center; gap: 0.85em; font-size: 13px; letter-spacing: 0.12em;
  text-transform: uppercase; white-space: nowrap; }
.caps .drop { font-feature-settings: 'tnum'; }
.links { position: absolute; right: 0; top: -7px; height: 32px; display: flex; align-items: center; gap: 8px; }
.link { font-family: var(--d); font-size: 13px; letter-spacing: 0.04em; text-decoration: none; padding: 0 2px; height: 32px;
  display: inline-flex; align-items: center; white-space: nowrap; border-bottom: 0; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.chip { font-family: var(--m); font-size: 12px; letter-spacing: 0; }
.big { height: 56px; display: flex; align-items: center; }
.count { font-family: var(--n); font-weight: 100; font-size: 52px; line-height: 1; font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: -0.01em; white-space: nowrap; display: inline-flex; align-items: baseline; }
.count .dg { display: inline-block; height: 1em; overflow: hidden; vertical-align: top; position: relative; }
.count .dg > span { display: block; transition: transform 0.3s cubic-bezier(.2, .7, .2, 1); }
.count .dg > span > i { display: block; height: 1em; font-style: normal; }
.count .rest { white-space: pre; }
.count .roll { display: inline-flex; align-items: baseline; }
.plate { position: fixed; width: 56px; height: 56px; padding: 0; border: 0; border-radius: 4px; background: var(--bg); transition: background-color 1.2s; pointer-events: auto; --st: 4px; }
.plate img { position: relative; z-index: 1; width: 100%; height: 100%; display: block; border-radius: 3px; background: var(--bg); }

.plate.many img { width: calc(100% - 2 * var(--st)); height: calc(100% - 2 * var(--st)); margin-top: calc(2 * var(--st)); }
.plate .stack { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.plate .stack::before, .plate .stack::after { content: ''; position: absolute; border: 1px solid var(--line); border-radius: 4px; background: var(--bg); }
.plate .stack::before { left: var(--st); top: var(--st); right: var(--st); bottom: var(--st); z-index: 2; }
.plate .stack::after { left: calc(2 * var(--st)); top: 0; right: 0; bottom: calc(2 * var(--st)); z-index: 1; }
.plate:not(.many) .stack { display: none; }
.line { margin: 0; height: 20px; display: flex; align-items: center; gap: 7px; font-size: 14px; white-space: nowrap; overflow: hidden; }
.line .mark { width: 10px; height: 7px; flex: none; display: inline-block; }
.line .mark svg { display: block; }
.line .mark:empty { display: none; }
.lt { overflow: hidden; text-overflow: clip; }


.nb { font-family: var(--n); font-weight: 300; font-variant-numeric: tabular-nums lining-nums; letter-spacing: 0; }



.bottom { top: var(--botY, auto); }
.pot { margin: 0; min-height: 32px; font-size: 12px; line-height: 16px; display: flex; align-items: flex-end; }
.pot > span { display: block; max-width: 100%; }
.act { position: relative; display: flex; align-items: center; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.pill { flex: 1 1 auto; min-width: 0; height: 56px; border-radius: 28px; background: var(--green); color: var(--label);
  display: flex; flex-direction: column; justify-content: center; padding: 0 22px; text-align: left; transition: background-color 0.15s; }
.pill:hover:not([disabled]):not([aria-disabled='true']) { background: var(--greenHi); }
.pill[disabled], .pill[aria-disabled='true'] { cursor: default; background: #E6F9F3; }
body.night .pill[disabled] { background: #182B27; color: #FFFFFF; }
.pill .l1 { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 16px; font-weight: 400; letter-spacing: 0.03em; white-space: nowrap; }
.pill .amt { font-family: var(--n); font-weight: 300; font-variant-numeric: tabular-nums lining-nums; }
.pill .l2 { font-size: 11px; line-height: 14px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: 0.01em; }
.pill .l2:empty { display: none; }
.pill:focus-visible { outline-offset: 2px; border-radius: 28px; }
.stepper { order: -1; flex: none; width: 108px; height: 56px; display: flex; align-items: center; justify-content: space-between; }
.stepper[hidden] { display: none; }
.step { width: 40px; height: 56px; position: relative; border-radius: 20px; }
.step i { position: absolute; left: 50%; top: 50%; width: 12px; height: 1.5px; margin: -0.75px 0 0 -6px; background: var(--ink); }
.step.plus i + i { transform: rotate(90deg); }
.step:hover { background: var(--soft); }
.step[disabled] { opacity: 0.35; cursor: default; background: none; }
.qty { width: 28px; text-align: center; font-family: var(--n); font-weight: 300; font-size: 20px; font-variant-numeric: tabular-nums; }
.or { flex: 1 0 100%; margin: 0; height: 18px; display: flex; align-items: center; gap: 0; font-size: 13px; white-space: nowrap; }
.or button { font-size: 13px; height: 32px; padding: 0 1px; margin: -7px 0; }
.or button:hover { text-decoration: underline; text-underline-offset: 3px; }
.or .sep { white-space: pre; }
.fine { margin: 0; height: 16px; font-size: 12px; line-height: 16px; white-space: nowrap; }
.indep { margin: 0; font-size: 11px; line-height: 14px; min-height: 28px; display: flex; align-items: flex-end; }



body.desk { --side: 0px; }
body.desk #ui .top, body.desk #ui .bottom { left: var(--gx); right: auto; width: var(--gw); }
body.desk .caps { font-size: 14px; }
body.desk .links { top: -7px; }
body.desk .big { height: 76px; }
body.desk .count { font-size: 72px; }
body.desk .line { font-size: 16px; height: 22px; }
body.desk .line .mark { width: 14px; height: 10px; }
body.desk .plate { width: 112px; height: 112px; --st: 5px; }
body.desk .pot { font-size: 14px; line-height: 20px; min-height: 20px; }
body.desk .act { flex-wrap: nowrap; margin-top: 10px; }
body.desk .pill { flex: 0 0 360px; }
body.desk .or { flex: 0 1 auto; margin-left: 14px; }
body.desk .tail { display: flex; justify-content: space-between; gap: 24px; margin-top: 12px; }
body.desk .fine, body.desk .indep { font-size: 12px; line-height: 16px; height: auto; min-height: 0; }
body.desk .indep { text-align: right; }



body.land .top { display: grid; grid-template-columns: auto auto 1fr; align-items: center; column-gap: 18px; height: 56px; }
body.land .caps { grid-column: 1; }
body.land .big { grid-column: 2; height: 40px; }
body.land .count { font-size: 36px; }
body.land .line { grid-column: 3; padding-right: 230px; }
body.land .plate { width: 48px; height: 48px; --st: 3px; }
body.land .links { top: 12px; }
body.land .bottom { display: grid; grid-template-columns: auto 1fr; column-gap: 16px; align-items: end; }
body.land .pot { grid-column: 1 / 3; min-height: 16px; white-space: nowrap; }
body.land .act { grid-column: 1; flex-wrap: nowrap; }
body.land .pill { flex: 0 0 300px; }
body.land .or { flex: 0 1 auto; }
body.land .tail { grid-column: 2; }
body.land .fine, body.land .indep { font-size: 11px; line-height: 14px; height: auto; min-height: 0; white-space: normal; }



.lupa { position: fixed; inset: 0; pointer-events: none; z-index: 6; }
.lupa .hair { position: absolute; top: 0; width: 1px; background: var(--ink); opacity: 0.3; }
.lupa .tie { position: absolute; width: 1px; background: var(--ink); opacity: 0.6; }
.lupa .card { position: absolute; width: 120px; height: 120px; }
.lupa .card img, .lupa .card .ph { position: absolute; inset: 0; width: 100%; height: 100%; display: block; border-radius: 4px; }
.lupa .card .ph { background: var(--plate); }
.lupa .cap { position: absolute; margin: 0; font-family: var(--m); font-size: 11px; line-height: 14px; white-space: nowrap; letter-spacing: 0; }
body.desk .lupa .card { width: 168px; height: 168px; }



.sheet { position: fixed; inset: 0; z-index: 10; }
.sheet[hidden] { display: none; }
.sheet .scrim { position: absolute; inset: 0; background: rgba(23, 23, 24, 0.42); }
body.night .sheet .scrim { background: rgba(0, 0, 0, 0.55); }
.sheet .panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--panel); border-top: 1px solid var(--line); border-radius: 14px 14px 0 0;
  padding: 10px calc(16px + var(--safeR)) calc(16px + var(--safeB)) calc(16px + var(--safeL)); }
.sheet .panel:focus, .sheet .panel:focus-visible { outline: none; box-shadow: none; }
.sheet .grip { display: block; width: 36px; height: 4px; border-radius: 2px; background: var(--line); margin: 0 auto 10px; }
.sheet .cardwrap { display: flex; justify-content: center; }
.sheet .card { width: min(358px, 100%); aspect-ratio: 1; display: block; border-radius: 6px; }
.sheet .status { font-size: 16px; margin: 14px 0 10px; letter-spacing: 0.01em; }
.traits { margin: 0; display: grid; grid-template-columns: max-content 1fr; column-gap: 18px; row-gap: 3px;
  font-family: var(--m); font-size: 12px; line-height: 16px; }
.traits dt { text-transform: uppercase; letter-spacing: 0.04em; }
.traits dd { margin: 0; overflow-wrap: anywhere; }
.extra { margin: 12px 0 0; font-size: 14px; }
.extra:empty { display: none; }
.sheetact { margin-top: 14px; }
.sheetact .pill { width: 100%; }
.sheetact .or { margin-top: 6px; }
.sheet .row { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 12px 0 6px; }
.sheet .row .link { font-size: 14px; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.strip { display: flex; gap: 8px; overflow-x: auto; padding: 6px 0 10px; }
.strip button { flex: none; width: 56px; height: 56px; border-radius: 4px; }
.strip button.on { outline: 1.5px solid var(--ink); outline-offset: 2px; }
.strip img { width: 100%; height: 100%; display: block; border-radius: 3px; }
.sheet .indep { margin-top: 10px; min-height: 0; display: block; }
body.desk .sheet .panel { left: 50%; right: auto; bottom: auto; top: 50%; transform: translate(-50%, -50%); width: 520px;
  max-height: 92vh; border: 1px solid var(--line); border-radius: 10px; padding: 22px 26px 20px; }
body.desk .sheet .grip { display: none; }
body.desk .sheet .card { width: 400px; }

.log .panel { max-height: 85dvh; }
.log h2 { font-size: 13px; font-weight: 400; text-transform: uppercase; letter-spacing: 0.12em; margin: 14px 0 6px; }
.log h2:first-of-type { margin-top: 2px; }
.rows { list-style: none; margin: 0; padding: 0; font-family: var(--m); font-size: 12px; line-height: 18px; }
.rows li { white-space: pre; overflow: hidden; text-overflow: ellipsis; }
.rows li.mine { outline: 1px solid var(--ink); outline-offset: -1px; border-radius: 2px; }
.rows li button { font: inherit; white-space: pre; text-align: left; width: 100%; }
.rows li button:hover { text-decoration: underline; text-underline-offset: 3px; }
.log .note { font-family: var(--m); font-size: 12px; margin: 4px 0 0; }
.records { margin: 0; display: grid; grid-template-columns: max-content 1fr; column-gap: 16px; row-gap: 4px; font-size: 12px; }
.records dt { font-family: var(--d); font-size: 13px; }
.records dd { margin: 0; font-family: var(--m); white-space: pre; }
.mosaic { margin: 8px 0; }
.mosaic canvas { width: 100%; height: auto; display: block; border: 1px solid var(--line); border-radius: 4px; }
.mosaic .link { font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
body.desk .log .panel { left: auto; right: 0; top: 0; bottom: 0; transform: none; width: 400px; max-height: none; height: 100%;
  border-radius: 0; border: 0; border-left: 1px solid var(--line); padding: 26px 24px; }

.wallets { position: fixed; z-index: 12; right: 10px; top: 40px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  padding: 6px; display: flex; flex-direction: column; min-width: 180px; }
.wallets[hidden] { display: none; }
.wallets button { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 10px; border-radius: 6px; font-size: 14px; text-align: left; }
.wallets button:hover { background: var(--soft); }
.wallets img { width: 20px; height: 20px; }

@media (prefers-reduced-motion: reduce) {
  body, .count .dg > span, #ui .fadeable, .pill { transition: none !important; }
}
