/* Legend POS. Palette comes from the pool hall: matte charcoal, brass bar light, blue felt, ball colors. */
:root {
  --display: 'Archivo Variable', 'Arial Narrow', sans-serif; --body: 'Albert Sans Variable', system-ui, sans-serif;
  --brass: #E0A526; --brass-ink: #1B1405; --felt: #2E6FBF; --red: #C8402F; --green: #2F8F5B; --purple: #6C4BA6; --orange: #D8741F; --maroon: #7A2E3A; --chalk: #F4EEE2;
  --r-s: 8px; --r-m: 12px; --r-l: 18px; --side: 232px;
}
[data-theme=night] { --bg: #12161C; --surface: #1A2029; --surface-2: #222A35; --surface-3: #2B3542; --line: #313C4B; --text: #F1EADC; --muted: #98A2B1; --accent: var(--brass); --accent-text: #F0BC4A; --shadow: 0 18px 50px rgba(0, 0, 0, .5); --good: #5BC08A; --bad: #F0705E; --warn: #F0BC4A; --info: #6FA8EC; color-scheme: dark; }
[data-theme=day] { --bg: #E9ECF0; --surface: #FFFFFF; --surface-2: #F3F5F8; --surface-3: #E6EAEF; --line: #D3D9E1; --text: #151A21; --muted: #5E6978; --accent: var(--brass); --accent-text: #8A5F00; --shadow: 0 18px 44px rgba(21, 26, 33, .18); --good: #1F7A4A; --bad: #B93424; --warn: #946400; --info: #1F5CA8; color-scheme: light; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--text); font: 500 15px/1.45 var(--body); overflow: hidden; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h6, p { margin: 0; }
h2 { font: 700 24px/1.15 var(--display); font-stretch: 108%; letter-spacing: -.01em; }
h3 { font: 700 17px/1.2 var(--display); font-stretch: 105%; }
h4 { font: 700 14px/1.2 var(--body); color: var(--muted); margin: 18px 0 8px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; touch-action: manipulation; }
a { color: inherit; text-decoration: none; }
small { color: var(--muted); font-size: 12.5px; display: block; font-weight: 500; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.muted { color: var(--muted); } .pad { padding: 18px 0; } .grow { flex: 1; } .neg { color: var(--bad); } .pos { color: var(--good); } b.big { font: 700 18px var(--display); }
.lead { color: var(--muted); margin-bottom: 16px; max-width: 62ch; } .fine { color: var(--muted); font-size: 13px; margin: 10px 0; display: flex; gap: 6px; align-items: center; }
.hint { color: var(--muted); font-size: 15px; vertical-align: -2px; cursor: help; }
.spin { animation: spin 1s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } }
.loading { display: grid; place-items: center; height: 40vh; font-size: 30px; color: var(--muted); }

/* billiard ball: the one recurring mark */
.ball { --b: var(--brass); width: 34px; height: 34px; flex: none; border-radius: 50%; display: inline-grid; place-items: center; background: radial-gradient(circle at 32% 26%, rgba(255, 255, 255, .5), transparent 34%), var(--b); box-shadow: inset 0 -5px 8px rgba(0, 0, 0, .28); color: #14181E; }
.ball b, .ball > i { width: 56%; height: 56%; border-radius: 50%; background: var(--chalk); display: grid; place-items: center; font: 800 12px/1 var(--display); color: #14181E; }
.ball > i { font-size: 13px; }
.ball.stripe { background: radial-gradient(circle at 32% 26%, rgba(255, 255, 255, .5), transparent 34%), linear-gradient(var(--chalk) 0 22%, var(--b) 22% 78%, var(--chalk) 78%); }
.ball.lg { width: 56px; height: 56px; } .ball.lg b { font-size: 20px; }

/* buttons and inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: var(--r-m); background: var(--surface-2); border: 1px solid var(--line); font-weight: 650; white-space: nowrap; transition: background .12s, transform .06s; }
.btn:hover { background: var(--surface-3); } .btn:active { transform: translateY(1px); } .btn:disabled { opacity: .45; cursor: not-allowed; }
.btn i { font-size: 18px; }
.btn.primary { background: var(--brass); border-color: var(--brass); color: var(--brass-ink); } .btn.primary:hover { background: #EDB53C; }
.btn.ghost { background: transparent; } .btn.ghost:hover { background: var(--surface-2); }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); } .btn.danger:not(.ghost) { background: var(--red); border-color: var(--red); color: #fff; }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 13.5px; border-radius: var(--r-s); } .btn.big { min-height: 58px; font: 750 18px var(--display); font-stretch: 104%; padding: 0 22px; } .btn.wide { width: 100%; }
.iconbtn { width: 42px; height: 42px; border-radius: var(--r-m); display: inline-grid; place-items: center; font-size: 20px; color: var(--muted); flex: none; } .iconbtn:hover { background: var(--surface-2); color: var(--text); }
.iconbtn .fi { border-radius: 4px; font-size: 18px; }
.link { color: var(--accent-text); font-weight: 650; display: inline-flex; gap: 6px; align-items: center; padding: 8px 0; }
.chip { min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); } .chip.promo { border-color: var(--brass); color: var(--accent-text); } .chip:disabled { opacity: .4; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: var(--surface-3); color: var(--text); white-space: nowrap; }
.pill.ok { background: color-mix(in srgb, var(--good) 18%, transparent); color: var(--good); } .pill.warn { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.pill.bad { background: color-mix(in srgb, var(--bad) 18%, transparent); color: var(--bad); } .pill.live { background: color-mix(in srgb, var(--info) 20%, transparent); color: var(--info); } .pill.free { background: color-mix(in srgb, var(--purple) 26%, transparent); color: color-mix(in srgb, var(--purple) 50%, var(--text)); }
.count { font-style: normal; background: var(--brass); color: var(--brass-ink); border-radius: 999px; padding: 0 7px; font-size: 12px; font-weight: 800; }
.form { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 6px; flex: 1 1 100%; min-width: 0; } .field.half { flex: 1 1 calc(50% - 7px); } .field.third { flex: 1 1 calc(33.3% - 10px); min-width: 150px; }
.field > span { font-size: 13px; font-weight: 650; color: var(--muted); }
input:not([type=checkbox]), select, textarea { width: 100%; min-height: 46px; padding: 10px 12px; border-radius: var(--r-m); border: 1px solid var(--line); background: var(--bg); font-size: 16px; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--brass); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brass) 25%, transparent); }
.inwrap { display: flex; align-items: center; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--bg); } .inwrap:focus-within { border-color: var(--brass); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brass) 25%, transparent); }
.inwrap input { border: 0; background: transparent; box-shadow: none !important; min-width: 0; } .inwrap em { font-style: normal; color: var(--muted); padding: 0 12px; font-weight: 650; } .inwrap em + input { padding-left: 0; }
.inwrap.big input { font: 750 30px var(--display); min-height: 66px; } .inwrap.big em { font-size: 20px; }
.field.check, .switch { flex-direction: row; align-items: center; gap: 10px; display: flex; min-height: 46px; cursor: pointer; } .field.check > span, .switch span { color: var(--text); font-size: 15px; }
input[type=checkbox] { appearance: none; width: 44px; height: 26px; border-radius: 999px; background: var(--surface-3); position: relative; flex: none; cursor: pointer; transition: background .15s; border: 1px solid var(--line); }
input[type=checkbox]::after { content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--chalk); transition: transform .15s; box-shadow: 0 1px 3px rgba(0, 0, 0, .4); }
input[type=checkbox]:checked { background: var(--green); border-color: var(--green); } input[type=checkbox]:checked::after { transform: translateX(18px); }
.searchbar { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 0 12px; flex: 1 1 220px; max-width: 360px; color: var(--muted); }
.searchbar input { border: 0; background: transparent; box-shadow: none !important; padding-left: 0; color: var(--text); } .searchbar.big { max-width: 560px; } .searchbar.big input { min-height: 56px; font-size: 17px; }
.step { display: inline-flex; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-m); }
.step button { width: 40px; height: 40px; display: grid; place-items: center; font-size: 15px; } .step b { min-width: 26px; text-align: center; font: 700 16px var(--display); }
.step input { width: 70px; border: 0; background: transparent; text-align: center; font: 700 18px var(--display); padding: 0; min-height: 40px; box-shadow: none !important; } .step.lg button { width: 54px; height: 54px; font-size: 18px; } .step.lg input { width: 84px; min-height: 54px; font-size: 22px; }

/* layers */
#layers { position: fixed; inset: 0; pointer-events: none; z-index: 50; } #layers > * { pointer-events: auto; }
.scrim { position: absolute; inset: 0; background: rgba(8, 10, 14, .62); display: grid; place-items: center; padding: 16px; animation: fade .16s; } .scrim.out { opacity: 0; transition: opacity .16s; }
.modal { width: min(560px, 100%); max-height: calc(100dvh - 32px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: var(--shadow); display: flex; flex-direction: column; animation: rise .2s cubic-bezier(.2, .8, .3, 1); }
.modal.sm { width: min(430px, 100%); } .modal.lg { width: min(820px, 100%); } .modal.xl { width: min(1040px, 100%); } .modal.pay { width: min(480px, 100%); }
.modal > header { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 14px 22px; border-bottom: 1px solid var(--line); } .modal > header h2 { font-size: 19px; display: flex; gap: 10px; align-items: center; } .modal > header h2 i { color: var(--accent-text); }
.mbody { padding: 20px 22px; overflow: auto; } .modal > footer { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; align-items: center; }
@keyframes fade { from { opacity: 0; } } @keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.toast { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 999px; display: flex; gap: 8px; align-items: center; font-weight: 650; box-shadow: var(--shadow); animation: rise .2s; max-width: calc(100vw - 32px); z-index: 5; }
.toast i { font-size: 20px; color: var(--green); } .toast.err i { color: var(--red); } .toast.out { opacity: 0; transition: opacity .25s; }
.pinpad { outline: 0; display: grid; gap: 14px; justify-items: center; } .pinpad.shake { animation: shake .35s; } @keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.pindots { height: 30px; display: flex; gap: 10px; align-items: center; color: var(--muted); } .pindots i { width: 14px; height: 14px; border-radius: 50%; background: var(--brass); }
.keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: min(300px, 100%); }
.keys button { height: 64px; border-radius: var(--r-m); background: var(--surface-2); border: 1px solid var(--line); font: 700 24px var(--display); display: grid; place-items: center; } .keys button:active { background: var(--surface-3); transform: scale(.97); } .keys .go { background: var(--brass); color: var(--brass-ink); border-color: var(--brass); }
.osk { position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; background: var(--surface-2); border-top: 1px solid var(--line); padding: 8px; display: grid; gap: 6px; box-shadow: 0 -12px 30px rgba(0, 0, 0, .4); }
.osk div { display: flex; gap: 6px; justify-content: center; } .osk button { flex: 1; max-width: 86px; height: 50px; border-radius: var(--r-s); background: var(--surface); border: 1px solid var(--line); font-weight: 700; font-size: 18px; display: grid; place-items: center; }
.osk.num button { max-width: 130px; height: 56px; } .osk .space { max-width: 420px; } .osk .done { max-width: 260px; background: var(--brass); color: var(--brass-ink); } .osk.up button { text-transform: uppercase; }
#app { height: 100dvh; } body.osk-open #app { height: calc(100dvh - var(--osk-h, 300px)); } body.osk-open #layers { bottom: var(--osk-h, 300px); } body.osk-open .gate-panel { place-items: start center; }
@media (max-height: 690px) { .osk button { height: 40px; } .osk.num button { height: 46px; } .osk { gap: 4px; padding: 6px; } }
.tippy-box[data-theme~=legend] { background: var(--chalk); color: #14181E; font: 600 13px/1.4 var(--body); border-radius: 10px; padding: 3px 4px; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); } .tippy-box[data-theme~=legend] .tippy-arrow { color: var(--chalk); }

/* sign in */
.gate { height: 100%; display: grid; grid-template-columns: 1.1fr 1fr; background: var(--bg); }
.gate-art { position: relative; overflow: hidden; background: radial-gradient(120% 90% at 30% 20%, #3A82D6 0, #1F5CA8 45%, #123E77 100%); display: flex; flex-direction: column; justify-content: flex-end; padding: 48px; color: #fff; }
.gate-art::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(115deg, rgba(255, 255, 255, .03) 0 2px, transparent 2px 5px); pointer-events: none; }
.rack { position: absolute; top: 9%; left: 50%; transform: translateX(-50%) rotate(180deg); display: grid; gap: 2px; justify-items: center; }
.rack div { display: flex; gap: 4px; } .rack .ball { width: clamp(44px, 6.2vw, 78px); height: clamp(44px, 6.2vw, 78px); transform: rotate(180deg); box-shadow: inset 0 -8px 12px rgba(0, 0, 0, .3), 0 10px 18px rgba(0, 0, 0, .35); animation: drop .5s backwards cubic-bezier(.2, .9, .3, 1.2); }
.rack .ball b { font-size: clamp(14px, 1.9vw, 24px); } .rack div:nth-child(2) .ball { animation-delay: .06s; } .rack div:nth-child(3) .ball { animation-delay: .12s; } .rack div:nth-child(4) .ball { animation-delay: .18s; } .rack div:nth-child(5) .ball { animation-delay: .24s; }
@keyframes drop { from { opacity: 0; transform: rotate(180deg) scale(.6); } }
.mark { position: relative; z-index: 1; } .mark h1 { font: italic 850 clamp(56px, 8vw, 112px)/.9 var(--display); font-stretch: 118%; letter-spacing: -.03em; text-shadow: 0 6px 30px rgba(0, 0, 0, .35); }
.mark p { font: 650 18px var(--display); font-stretch: 125%; letter-spacing: .22em; text-transform: uppercase; margin-top: 12px; } .mark small { color: rgba(255, 255, 255, .75); font-size: 14px; margin-top: 6px; }
.gate-panel { display: grid; place-items: center; padding: 24px; overflow: auto; } .gate-card { width: min(420px, 100%); position: relative; } .gate-card h2 { font-size: 30px; margin-bottom: 6px; }
.langs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 22px; }
.langs button { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 26px 14px; display: grid; gap: 14px; justify-items: center; font-size: 18px; transition: border-color .12s, transform .12s; } .langs button:hover { border-color: var(--brass); transform: translateY(-2px); }
.langs .fi { font-size: 54px; border-radius: 8px; box-shadow: 0 4px 14px rgba(0, 0, 0, .3); }
.langswitch { display: inline-flex; gap: 8px; align-items: center; color: var(--muted); font-weight: 650; margin-bottom: 28px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; } .langswitch .fi { border-radius: 3px; }
.who { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 12px; margin: 8px 0 14px; }
.who button { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 18px 10px; display: grid; gap: 8px; justify-items: center; } .who button:hover { border-color: var(--brass); } .who b { font-size: 17px; }
.gate-card [data-step=pin] { display: grid; gap: 16px; } .gate-card [hidden] { display: none !important; } .gate-card .keys { width: 100%; } .gate-card .keys button { height: 68px; } .gate-card .pinpad { justify-items: stretch; } .gate-card .pindots { justify-content: center; }

/* shell */
.shell { height: 100%; display: grid; grid-template-columns: var(--side) 1fr; }
.side { background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.brand { padding: 20px 20px 14px; display: block; } .brand b { font: italic 850 30px/1 var(--display); font-stretch: 116%; letter-spacing: -.02em; display: block; } .brand span { font: 650 10.5px var(--display); font-stretch: 125%; letter-spacing: .2em; text-transform: uppercase; color: var(--accent-text); }
.side nav { flex: 1; overflow: auto; padding: 4px 12px 12px; } .side h6 { font: 650 12.5px var(--body); color: var(--muted); padding: 14px 10px 6px; } .side hr { border: 0; border-top: 1px solid var(--line); margin: 12px 6px; }
.side nav a { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: var(--r-m); font-weight: 600; color: var(--muted); min-height: 44px; } .side nav a i { font-size: 21px; }
.side nav a:hover { background: var(--surface-2); color: var(--text); } .side nav a.on { background: var(--surface-2); color: var(--text); box-shadow: inset 3px 0 0 var(--brass); } .side nav a.on i { color: var(--accent-text); }
.me { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--line); } .me div { flex: 1; min-width: 0; } .me div b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.top { display: flex; align-items: center; gap: 12px; padding: 12px 22px; border-bottom: 1px solid var(--line); background: var(--bg); } .top h1 { font: 750 22px var(--display); font-stretch: 108%; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .top .menu { display: none; }
.tools { display: flex; align-items: center; gap: 4px; }
.shiftpill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); font-weight: 650; font-size: 13.5px; margin-right: 6px; white-space: nowrap; } .shiftpill i { width: 9px; height: 9px; border-radius: 50%; background: var(--warn); }
.shiftpill.open i { background: var(--good); box-shadow: 0 0 0 4px color-mix(in srgb, var(--good) 22%, transparent); } .shiftpill.closed { border-color: color-mix(in srgb, var(--warn) 50%, transparent); color: var(--warn); }
.view { flex: 1; overflow: auto; padding: 22px; min-height: 0; } .view > * + * { margin-top: 18px; }
.dock { display: none; }

/* shared blocks */
.banner { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r-m); border: 1px solid var(--line); background: var(--surface); flex-wrap: wrap; } .banner > i { font-size: 26px; } .banner div { flex: 1 1 240px; } .banner b { display: block; } .banner span { color: var(--muted); font-size: 14px; }
.banner.warn { border-color: color-mix(in srgb, var(--warn) 45%, transparent); } .banner.warn > i { color: var(--warn); } .banner.info > i { color: var(--info); } .banner.ok > i { color: var(--good); } .banner.bad { border-color: color-mix(in srgb, var(--bad) 45%, transparent); } .banner.bad > i { color: var(--bad); }
.empty { text-align: center; padding: 46px 16px; color: var(--muted); display: grid; gap: 8px; justify-items: center; grid-column: 1 / -1; } .empty > i { font-size: 44px; } .empty h3 { color: var(--text); } .empty p { max-width: 44ch; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; } .stats.tight { margin-bottom: 18px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 14px 16px; min-width: 0; } .stat .lab { font-size: 13px; font-weight: 650; color: var(--muted); display: block; }
.stat strong { font: 750 26px/1.25 var(--display); font-stretch: 104%; font-variant-numeric: tabular-nums; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .stat.good strong { color: var(--good); } .stat.alert strong { color: var(--bad); }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .toolbar select { width: auto; }
.range { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; } .dates { display: inline-flex; align-items: center; gap: 8px; } .dates input { min-height: 38px; padding: 4px 10px; width: 150px; font-size: 14px; } .dates i { color: var(--muted); font-style: normal; }
.subtabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; } .subtabs a { padding: 12px 16px; font-weight: 650; color: var(--muted); display: flex; gap: 8px; align-items: center; border-bottom: 3px solid transparent; white-space: nowrap; margin-bottom: -1px; } .subtabs a.on { color: var(--text); border-color: var(--brass); } .subtabs i { font-size: 19px; }
.tablewrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); overflow: auto; }
.tbl { width: 100%; border-collapse: collapse; } .tbl th { text-align: left; font-size: 13px; color: var(--muted); font-weight: 650; padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; background: var(--surface); }
.tbl td { padding: 11px 14px; border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); vertical-align: middle; } .tbl tr:last-child td { border-bottom: 0; } .tbl .num { text-align: right; font-variant-numeric: tabular-nums; } .tbl td.actions { text-align: right; white-space: nowrap; }
.tbl tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 60%, transparent); } .clip { display: block; max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.pname { display: flex; align-items: center; gap: 12px; } .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--b); flex: none; box-shadow: inset 0 -2px 3px rgba(0, 0, 0, .3); }
.thumb { width: 44px; height: 44px; border-radius: 10px; background: color-mix(in srgb, var(--c) 24%, var(--surface-2)); display: grid; place-items: center; font-size: 22px; overflow: hidden; flex: none; color: color-mix(in srgb, var(--c) 60%, var(--text)); } .thumb img { width: 100%; height: 100%; object-fit: contain; }
.block { display: grid; gap: 14px; } .blockhead { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .blockhead h2, .blockhead h3 { margin-right: 4px; } .blockhead p { color: var(--muted); flex: 1 1 260px; font-size: 14px; }
.pagehead { display: grid; gap: 4px; } .pagehead p { color: var(--muted); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 18px; min-width: 0; } .panel > h3 { margin-bottom: 12px; } .panel > h3 ~ h3 { margin-top: 22px; } .panel .tablewrap { border: 0; } .panel .blockhead { margin-bottom: 14px; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; } .cols.wide { grid-template-columns: 1.5fr 1fr; } .cols:empty { display: none; }
.rowitem { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); } .rowitem > div { flex: 1; min-width: 0; } .rowitem:last-of-type { border-bottom: 0; } .rowitem.struck b { text-decoration: line-through; color: var(--muted); } .rowitem > small { white-space: nowrap; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; margin: 14px 0; } .kv span { color: var(--muted); } .kv b { text-align: right; font-variant-numeric: tabular-nums; }
.barrow { display: grid; grid-template-columns: 130px 1fr auto; gap: 12px; align-items: center; padding: 7px 0; } .barrow span { display: flex; gap: 8px; align-items: center; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } .barrow div { height: 10px; border-radius: 999px; background: var(--surface-3); overflow: hidden; } .barrow div i { display: block; height: 100%; background: var(--felt); border-radius: 999px; } .barrow b { font-variant-numeric: tabular-nums; }
.pl { width: 100%; border-collapse: collapse; } .pl td { padding: 8px 0; } .pl td i:first-child:not(.hint) { display: inline-block; width: 16px; } .pl .num { text-align: right; font-variant-numeric: tabular-nums; }
.pl .sub td { border-top: 1px solid var(--line); font-weight: 750; } .pl .tot td { border-top: 2px solid var(--text); font: 800 19px var(--display); padding-top: 12px; } .pl .memo td { color: var(--muted); font-size: 13.5px; }
.todo { display: flex; gap: 14px; align-items: center; padding: 12px; border-radius: var(--r-m); border: 1px solid var(--line); margin-bottom: 8px; } .todo > i { font-size: 26px; } .todo div { flex: 1; min-width: 0; } .todo b { display: block; } .todo span { color: var(--muted); font-size: 13.5px; } .todo em { font-style: normal; font-weight: 700; color: var(--accent-text); white-space: nowrap; display: flex; gap: 4px; align-items: center; }
.todo.bad > i { color: var(--bad); } .todo.warn > i { color: var(--warn); } .todo:hover { background: var(--surface-2); } .allgood { display: grid; justify-items: center; gap: 8px; padding: 30px; color: var(--muted); } .allgood i { font-size: 44px; color: var(--good); }
.roles { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; } .roles article { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 16px; } .roles p { color: var(--muted); font-size: 14px; margin-top: 6px; }
.listgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 24px; } .bigic { font-size: 28px; color: var(--accent-text); }

/* register */
.view.v-register { padding: 0; overflow: hidden; }
.reg { display: grid; grid-template-columns: 104px 1fr 372px; height: 100%; min-height: 0; }
.reg-cats { overflow: auto; padding: 14px 8px; display: flex; flex-direction: column; gap: 6px; border-right: 1px solid var(--line); }
.reg-cats button { display: grid; gap: 6px; justify-items: center; padding: 10px 4px; border-radius: var(--r-m); color: var(--muted); font-size: 12.5px; } .reg-cats button b { font-weight: 650; text-align: center; line-height: 1.15; } .reg-cats .ball { width: 44px; height: 44px; } .reg-cats .ball i { font-size: 16px; }
.reg-cats button.on { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.reg-main { overflow: auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; min-width: 0; } .reg-main .searchbar { flex: none; max-width: none; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); gap: 12px; align-content: start; }
.tile { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: grid; grid-template-rows: 84px auto auto; text-align: left; transition: transform .08s, border-color .12s; }
.tile:hover { border-color: color-mix(in srgb, var(--c) 70%, var(--line)); } .tile:active { transform: scale(.97); }
.tile .art { background: linear-gradient(160deg, color-mix(in srgb, var(--c) 34%, var(--surface-2)), color-mix(in srgb, var(--c) 10%, var(--surface-2))); display: grid; place-items: center; font-size: 42px; color: color-mix(in srgb, var(--c) 55%, var(--text)); border-bottom: 3px solid var(--c); } .tile .art img { width: 100%; height: 84px; object-fit: contain; padding: 6px; }
.tile .art:has(img) { background: var(--chalk); } .thumb:has(img) { background: var(--chalk); }
.tile > b { padding: 10px 12px 0; font-size: 15px; line-height: 1.2; } .tile .price { padding: 2px 12px 12px; font: 750 17px var(--display); color: var(--accent-text); font-variant-numeric: tabular-nums; } .tile.noprice { opacity: .55; } .tile.noprice .price { color: var(--muted); font: 600 13px var(--body); }
.flag { position: absolute; top: 8px; right: 8px; font-style: normal; font-size: 11.5px; font-weight: 800; padding: 3px 8px; border-radius: 999px; background: #14181E; color: var(--warn); } .flag.out { color: #FF8A78; }
.ticket { background: var(--surface); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.ticket > header { display: flex; gap: 8px; align-items: center; padding: 14px 16px; border-bottom: 1px dashed var(--line); } .ticket > header div { flex: 1; min-width: 0; } .ticket > header h3 { font-size: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lines { flex: 1; overflow: auto; padding: 6px 16px; } .hintbox { display: grid; justify-items: center; gap: 10px; padding: 36px 10px; color: var(--muted); text-align: center; } .hintbox i { font-size: 40px; }
.line { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent); animation: fade .2s; } .line > div:first-child, .line > i + div { flex: 1; min-width: 0; cursor: pointer; } .line b { display: block; line-height: 1.2; } .line > span { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 68px; text-align: right; }
.line.sent { color: color-mix(in srgb, var(--text) 78%, transparent); } .line.sent > div { cursor: default; } .line.run > i { font-size: 24px; color: var(--info); } .line .iconbtn { width: 36px; height: 36px; font-size: 17px; }
.ticket > footer { padding: 14px 16px 16px; border-top: 1px dashed var(--line); display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; } .ticket footer .acts { display: grid; grid-template-columns: minmax(0, 1fr); } .ticket footer .acts .btn.big { order: -1; } .ticket .row { display: flex; justify-content: space-between; color: var(--muted); } .ticket .row.total { color: var(--text); align-items: baseline; font-weight: 650; } .ticket .row.total strong { font: 800 34px/1 var(--display); font-stretch: 104%; font-variant-numeric: tabular-nums; }
.acts { display: flex; gap: 10px; } .acts .btn { flex: 1; min-width: 0; } .acts .btn.big { flex: 1.5; } .ticket footer .link { justify-content: center; color: var(--muted); } .sheetbar, .sheetx { display: none; }
.bump { animation: bump .25s; } @keyframes bump { 50% { transform: scale(1.12); } }
.qtybig { display: flex; gap: 12px; justify-content: center; align-items: center; } .qtybig button { width: 64px; height: 64px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line); font-size: 22px; display: grid; place-items: center; } .qtybig input { width: 120px; text-align: center; font: 800 38px var(--display); min-height: 70px; }
.paytotal { text-align: center; margin-bottom: 16px; } .paytotal span { color: var(--muted); font-weight: 650; } .paytotal strong { display: block; font: 850 52px/1.05 var(--display); font-stretch: 106%; font-variant-numeric: tabular-nums; }
.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; background: var(--bg); padding: 5px; border-radius: var(--r-m); border: 1px solid var(--line); margin-bottom: 14px; } .seg button { min-height: 48px; border-radius: var(--r-s); font-weight: 650; display: grid; justify-items: center; gap: 2px; font-size: 13px; padding: 6px 2px; } .seg button i { font-size: 20px; } .seg button.on { background: var(--surface-3); box-shadow: inset 0 -3px 0 var(--brass); }
.cashbox { display: grid; gap: 10px; } .given, .change { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 14px; border-radius: var(--r-m); background: var(--bg); border: 1px solid var(--line); } .given strong, .change strong { font: 750 24px var(--display); font-variant-numeric: tabular-nums; } .given i { font: 600 15px var(--body); color: var(--muted); font-style: normal; }
.change strong { color: var(--good); } .change.short strong { color: var(--bad); } .quick { display: flex; gap: 8px; } .quick button { flex: 1; min-height: 44px; border-radius: var(--r-m); border: 1px solid var(--line); background: var(--surface-2); font-weight: 700; font-size: 14px; }
.cashbox .keys { width: 100%; grid-template-columns: repeat(4, 1fr); gap: 8px; } .cashbox .keys button { height: 54px; font-size: 21px; } .modal.pay [data-go] { margin-top: 14px; }
.splitbox { display: grid; gap: 10px; } .remain { font-weight: 700; text-align: center; } .remain.ok { color: var(--good); } .remain.bad { color: var(--bad); }
.paid { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 8px 0; } .paid > i { font-size: 72px; color: var(--good); animation: rise .3s; } .paid > i.warnc { color: var(--warn); } .paid > strong { font: 850 54px/1 var(--display); color: var(--accent-text); } .paid .acts { width: 100%; margin-top: 14px; } .paid .kv { width: 100%; }

/* floor */
.tables { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.ptable { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; display: grid; } .ptable.busy { border-color: var(--brass); box-shadow: 0 0 0 1px var(--brass), 0 10px 30px color-mix(in srgb, var(--brass) 14%, transparent); }
.felt { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: linear-gradient(135deg, #2F78CC, #1C4F92); color: #fff; position: relative; } .felt::after { content: ''; position: absolute; inset: 5px; border: 1px solid rgba(255, 255, 255, .22); border-radius: 12px; pointer-events: none; }
.felt div { flex: 1; } .felt small { color: rgba(255, 255, 255, .8); } .felt .ball { width: 44px; height: 44px; } .felt .ball b { font-size: 15px; } .felt .pill { background: rgba(10, 16, 24, .55); color: #fff; }
.clock { padding: 16px 16px 4px; } .clock strong { font: 800 40px/1 var(--display); font-variant-numeric: tabular-nums; display: block; } .clock span { color: var(--accent-text); font-weight: 700; } .clock.idle strong { color: var(--surface-3); } .clock.idle span { color: var(--muted); font-weight: 500; }
.ptable .who { display: flex; grid-template-columns: none; gap: 6px; align-items: center; color: var(--muted); padding: 0 16px; margin: 4px 0 0; font-size: 13.5px; } .ptable .acts { padding: 14px 16px 16px; flex-wrap: wrap; } .ptable .acts .btn { flex: 1 1 100%; }
.tabs { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; } .tabcard { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--brass); border-radius: var(--r-m); padding: 14px 14px 14px 16px; text-align: left; } .tabcard div { flex: 1; min-width: 0; } .tabcard b { font-size: 16px; } .tabcard small { display: flex; gap: 5px; align-items: center; } .tabcard strong { font: 750 20px var(--display); font-variant-numeric: tabular-nums; } .tabcard:hover { background: var(--surface-2); }

/* stock count, purchases, cash */
.countsheet { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 4px 18px 12px; max-width: 760px; } .crow { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent); } .crow > div:first-child { flex: 1; } .crow b { font-size: 16px; }
.stickybar { position: sticky; bottom: -22px; background: var(--bg); border-top: 1px solid var(--line); padding: 12px 0; display: flex; gap: 10px; align-items: center; justify-content: flex-end; max-width: 760px; } .stickybar span { flex: 1; color: var(--muted); font-weight: 650; }
.plines { display: grid; gap: 10px; margin: 18px 0 12px; } .pline { display: grid; grid-template-columns: 2fr .8fr 1.1fr 1.1fr 1.2fr auto; gap: 10px; align-items: end; padding: 12px; background: var(--surface-2); border-radius: var(--r-m); } .pline .lt { text-align: right; padding-bottom: 4px; min-width: 110px; } .pline .lt b { font: 750 17px var(--display); }
.ptotal { flex: 1; display: flex; gap: 12px; align-items: baseline; } .ptotal span { color: var(--muted); font-weight: 650; } .ptotal strong { font: 800 26px var(--display); font-variant-numeric: tabular-nums; }
.opencard { display: grid; grid-template-columns: 180px 1fr; gap: 26px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 28px; max-width: 760px; align-items: center; } .opencard .art { aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 32% 26%, rgba(255, 255, 255, .5), transparent 34%), var(--brass); display: grid; place-items: center; font-size: 76px; color: var(--brass-ink); box-shadow: inset 0 -14px 22px rgba(0, 0, 0, .25); }
.opencard p { color: var(--muted); margin: 8px 0 18px; max-width: 46ch; } .opencard .form { max-width: 340px; } .opencard .btn { width: 100%; }
.denoms { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 8px 22px; margin-bottom: 18px; } .den { display: grid; grid-template-columns: 96px auto 1fr; gap: 12px; align-items: center; } .den b { font: 750 17px var(--display); } .den span { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; } .den .step button { width: 46px; height: 46px; } .den .step input { min-height: 46px; }
.filebtn { cursor: pointer; margin-right: auto; }

/* help */
.helphead { display: grid; gap: 12px; } .guides { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; align-items: start; }
details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); } details + details { margin-top: 8px; } .guides details + details { margin-top: 0; }
summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; min-height: 56px; } summary::-webkit-details-marker { display: none; } summary > i:first-child { font-size: 26px; color: var(--accent-text); } summary div, summary > b { flex: 1; } .car { transition: transform .15s; color: var(--muted); } details[open] .car { transform: rotate(180deg); }
details ol { margin: 0; padding: 4px 18px 18px 46px; display: grid; gap: 8px; } details ol li::marker { font: 800 15px var(--display); color: var(--accent-text); } details > p { padding: 0 18px 16px; color: var(--muted); max-width: 76ch; }
.terms { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; } .term { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-m); padding: 14px 16px; } .term p { color: var(--muted); font-size: 14px; margin-top: 4px; }

/* print */
#print { display: none; }
.receipt { width: 72mm; font: 12px/1.35 'Courier New', monospace; color: #000; } .receipt h1 { font: 800 20px Arial, sans-serif; text-align: center; margin: 0 0 2px; } .receipt p { text-align: center; margin: 4px 0; } .receipt table { width: 100%; border-collapse: collapse; } .receipt td:last-child { text-align: right; white-space: nowrap; } .receipt hr { border: 0; border-top: 1px dashed #000; } .receipt .tot td { font-weight: 800; font-size: 15px; }
@media print {
  body { overflow: visible; background: #fff; color: #000; } #layers, .side, .top, .dock, .toolbar { display: none !important; }
  body:has(#print:not(:empty)) #app { display: none; } #print:not(:empty) { display: block; } .shell { display: block; height: auto; } .view { overflow: visible; }
  [data-theme] { --bg: #fff; --surface: #fff; --surface-2: #fff; --surface-3: #eee; --line: #bbb; --text: #000; --muted: #444; --good: #000; --bad: #000; --accent-text: #000; }
}

/* tablet and touch PC */
@media (max-width: 1180px) { :root { --side: 76px; } .side .brand span, .side nav a span, .side h6, .me div { display: none; } .brand b { font-size: 0; } .brand b::first-letter { font-size: 30px; } .side nav a { justify-content: center; } .me { flex-direction: column; } .reg { grid-template-columns: 92px 1fr 330px; } .cols.wide { grid-template-columns: 1fr; } .pline { grid-template-columns: 1fr 1fr 1fr; } }
/* phone */
@media (max-width: 760px) {
  body { font-size: 15px; } .shell { grid-template-columns: 1fr; grid-template-rows: 1fr auto; } :root { --side: 264px; }
  .side { position: fixed; inset: 0 auto 0 0; width: var(--side); z-index: 40; transform: translateX(-102%); transition: transform .2s; box-shadow: var(--shadow); } .shell.menu-open .side { transform: none; } .shell.menu-open::before { content: ''; position: fixed; inset: 0; background: rgba(8, 10, 14, .6); z-index: 39; }
  .side .brand span, .side nav a span, .side h6, .me div { display: block; } .brand b { font-size: 30px; } .side nav a { justify-content: flex-start; } .me { flex-direction: row; }
  .top { padding: 10px 12px; } .top .menu { display: none; } .top h1 { font-size: 19px; } .shiftpill { font-size: 0; padding: 10px; gap: 0; margin: 0; } .tools a[href="#help"] { display: none; } .view { padding: 14px; }
  .dock { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); } .dock a, .dock button { display: grid; justify-items: center; gap: 2px; padding: 8px 2px; font-size: 11.5px; font-weight: 650; color: var(--muted); } .dock i { font-size: 23px; } .dock .on { color: var(--accent-text); }
  .gate { grid-template-columns: 1fr; grid-template-rows: 190px 1fr; } .gate-art { padding: 20px; } .rack { display: none; } .mark h1 { font-size: 54px; } .mark p { font-size: 12px; margin-top: 6px; } .gate-panel { place-items: start center; }
  .reg { grid-template-columns: 1fr; grid-template-rows: auto 1fr; } .reg-cats { flex-direction: row; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px; } .reg-cats button { min-width: 72px; padding: 6px 4px; } .reg-cats .ball { width: 36px; height: 36px; }
  .reg-main { padding: 12px 12px 86px; } .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } .tile { grid-template-rows: 70px auto auto; } .tile .art { font-size: 32px; } .tile .art img { height: 70px; }
  .ticket { position: fixed; left: 0; right: 0; bottom: 57px; z-index: 30; border-left: 0; border-top: 1px solid var(--line); border-radius: 18px 18px 0 0; max-height: 82dvh; box-shadow: 0 -14px 40px rgba(0, 0, 0, .45); } .ticket > header, .ticket .lines, .ticket > footer { display: none; }
  .ticket.up > header { display: flex; } .ticket.up .lines { display: block; } .ticket.up > footer { display: grid; } .ticket.up .sheetbar { display: none; } .ticket.up .sheetx { display: inline-grid; }
  .sheetbar { display: flex; width: 100%; align-items: center; gap: 12px; padding: 16px 18px; font-weight: 650; } .sheetbar strong { font: 800 24px var(--display); margin-left: auto; color: var(--accent-text); }
  .stats { grid-template-columns: 1fr 1fr; gap: 8px; } .stat strong { font-size: 21px; } .field.half, .field.third { flex-basis: 100%; }
  .tbl.cards thead { display: none; } .tbl.cards, .tbl.cards tbody, .tbl.cards tr, .tbl.cards td { display: block; } .tbl.cards tr { padding: 12px 14px; border-bottom: 1px solid var(--line); } .tbl.cards td { border: 0; padding: 3px 0; text-align: left !important; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
  .tbl.cards td[data-label]:not([data-label=""])::before { content: attr(data-label); color: var(--muted); font-size: 13px; font-weight: 600; flex: none; } .tbl.cards td:first-child::before { display: none; } .tbl.cards td small { text-align: right; } .tbl.cards td:first-child small { text-align: left; } .tbl.cards td.actions { justify-content: flex-end; padding-top: 8px; }
  .modal { max-height: calc(100dvh - 16px); } .scrim { padding: 8px; align-items: end; } .mbody { padding: 16px; } .pline { grid-template-columns: 1fr 1fr; } .opencard { grid-template-columns: 1fr; padding: 20px; } .opencard .art { width: 110px; font-size: 48px; } .den { grid-template-columns: 80px auto 1fr; } .denoms { grid-template-columns: 1fr; }
  .dates input { width: 132px; } .barrow { grid-template-columns: 96px 1fr auto; } .paytotal strong { font-size: 42px; } .toast { bottom: 76px; }
}
@media (max-height: 690px) { .cashbox .keys button { height: 42px; font-size: 18px; } .paytotal { margin-bottom: 8px; } .paytotal strong { font-size: 36px; } .keys button { height: 52px; } .gate-card .keys button { height: 54px; } .mbody { padding-top: 14px; padding-bottom: 14px; } .seg { margin-bottom: 8px; } .seg button { min-height: 42px; } .given strong, .change strong { font-size: 20px; } .given, .change { padding: 6px 14px; } .cashbox { gap: 7px; } .modal.pay [data-go] { margin-top: 8px; min-height: 50px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
body.osk-open .rack { display: none; }

.photogrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; min-height: 160px; } .photogrid button { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-m); padding: 8px; display: grid; gap: 4px; text-align: left; } .photogrid button:hover { border-color: var(--brass); } .photogrid img { width: 100%; height: 120px; object-fit: contain; background: var(--chalk); border-radius: 8px; } .photogrid b { font-size: 13px; line-height: 1.2; }
