:root{
  --bg:#0E1F17; --surface:#16311F; --surface-2:#1E3D28; --felt:#1F5B38;
  --text:#F4EFE3; --text-2:#B9C4B4; --accent:#D9A441; --accent-on:#1A130A;
  --border:#2C4A36; --danger:#C4453D; --danger-text:#F0958C; --success:#6FAE7F; --cushion:#6B4A2F;
}
*{box-sizing:border-box;margin:0;padding:0}
body{font-family:Rubik,system-ui,sans-serif;background:#081209;color:var(--text);line-height:1.55;font-size:16px;display:flex;justify-content:center;min-height:100dvh}
.phone{width:100%;max-width:430px;background:var(--bg);min-height:100dvh;display:flex;flex-direction:column;position:relative}
header.app{padding:18px 20px 10px;display:flex;align-items:center;gap:10px;justify-content:space-between}
header.app .brand{display:flex;align-items:center;gap:10px;font-weight:700;font-size:18px}
select#lang{background:var(--surface);color:var(--text);border:1px solid var(--border);border-radius:8px;padding:4px 8px;font:inherit;font-size:13px}
main{flex:1;overflow-y:auto;padding:4px 16px 96px}
h2{font-size:22px;font-weight:600;margin:18px 4px 10px}
h3{font-size:17px;font-weight:600;margin:12px 0 6px}
.card{background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:16px;margin-bottom:12px}
.muted{color:var(--text-2);font-size:14px}
.row{display:flex;align-items:center;gap:12px}
.spread{justify-content:space-between}
.ball{min-width:40px;width:40px;height:40px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-weight:700;font-size:17px}
.pill{font:inherit;font-weight:600;background:var(--accent);color:var(--accent-on);border:0;border-radius:999px;padding:11px 24px;cursor:pointer;width:100%;margin-top:10px}
.pill:disabled{opacity:.45;cursor:not-allowed}
.pill:active{transform:scale(.98)}
.pill.danger{background:var(--danger);color:#fff}
.ghost{font:inherit;background:transparent;color:var(--text);border:1px solid var(--border);border-radius:999px;padding:9px 20px;cursor:pointer}
.ghost:hover{border-color:var(--accent);color:var(--accent)}
.bar{height:8px;background:var(--surface-2);border-radius:999px;overflow:hidden;margin:8px 0 4px}
.bar>div{height:100%;background:var(--accent);border-radius:999px}
nav.bottom{position:fixed;bottom:0;width:100%;max-width:430px;background:var(--surface);border-top:1px solid var(--border);display:flex;z-index:10}
nav.bottom button{flex:1;background:none;border:0;color:var(--text-2);font:inherit;font-size:11.5px;padding:10px 0 12px;cursor:pointer;display:flex;flex-direction:column;align-items:center;gap:3px}
nav.bottom button.on{color:var(--accent)}
nav.bottom svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}
.unit{display:flex;gap:12px;align-items:center;padding:12px;border:1px solid var(--border);border-radius:12px;margin-bottom:8px;cursor:pointer;background:var(--surface)}
.unit:hover{border-color:var(--accent)}
.unit .n{min-width:34px;height:34px;border-radius:50%;background:var(--surface-2);display:flex;align-items:center;justify-content:center;font-weight:600;font-size:14px;font-variant-numeric:tabular-nums}
.unit.done .n{background:var(--success);color:#0E1F17}
.num{font-variant-numeric:tabular-nums;direction:ltr;unicode-bidi:isolate}
.tablewrap{background:var(--cushion);border-radius:14px;padding:10px;touch-action:none}
svg.snooker{display:block;width:100%;border-radius:8px;background:var(--felt)}
.notice{font-size:12.5px;color:var(--text-2);border:1px dashed var(--border);border-radius:10px;padding:8px 12px;margin:10px 0}
.tag{font-size:12px;border:1px solid var(--border);border-radius:999px;padding:2px 10px;color:var(--text-2)}
.tag.draft{border-color:var(--text-2)}
.seg{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0}
.seg button{font:inherit;font-size:14px;background:var(--surface-2);border:1px solid var(--border);color:var(--text);border-radius:999px;padding:7px 16px;cursor:pointer}
.seg button.on{background:var(--accent);color:var(--accent-on);border-color:var(--accent);font-weight:600}
.stepper{display:flex;align-items:center;gap:16px;justify-content:center;margin:10px 0}
.stepper button{width:44px;height:44px;border-radius:50%;border:1px solid var(--border);background:var(--surface-2);color:var(--text);font-size:22px;cursor:pointer}
.stepper b{font-size:28px;min-width:72px;text-align:center}
.back{background:none;border:0;color:var(--accent);font:inherit;cursor:pointer;padding:6px 0;font-weight:500}
.modal-bg{position:fixed;inset:0;background:rgba(0,0,0,.55);display:flex;align-items:center;justify-content:center;z-index:50;padding:20px}
.modal{background:var(--surface);border:1px solid var(--border);border-radius:14px;padding:20px;max-width:360px;width:100%}
.principle-full{display:flex;flex-direction:column;justify-content:center;min-height:55dvh;text-align:center;padding:24px}
.principle-full .t{font-size:26px;font-weight:700;margin-bottom:12px}
.principle-full .b{font-size:18px;color:var(--text-2)}
table.simple{width:100%;border-collapse:collapse;font-size:14px}
table.simple td,table.simple th{padding:8px 10px;border-bottom:1px solid var(--border);text-align:start}
table.simple th{color:var(--text-2);font-weight:500}
.palette{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0}
.palette button{width:34px;height:34px;border-radius:50%;border:2px solid transparent;cursor:pointer}
.palette button.on{border-color:var(--accent)}
.toolbar{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
.toolbar .ghost{flex:1;min-width:110px}
@media (prefers-reduced-motion: reduce){*{transition:none!important}}
/* tap targets: at least 44px (Q2 finding, 13.11) */
.ghost,.back,.seg button,select#lang{min-height:44px;min-width:44px}
.palette button{width:44px;height:44px}
/* a11y (13.11): visible keyboard focus; brand is the page h1 */
:focus-visible{outline:3px solid var(--accent);outline-offset:2px;border-radius:6px}
header.app h1.brand{margin:0;line-height:1.2}
/* S4 (13.11): admin screen on desktop widths. Phone layout is unchanged below 1024px. */
@media (min-width:1024px){
 body.admin-wide .phone{max-width:1180px}
 body.admin-wide nav.bottom{max-width:1180px}
 body.admin-wide .admin-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;align-items:start}
 body.admin-wide .admin-grid .card{margin-bottom:0}
 body.admin-wide .admin-grid .admin-main{grid-row:span 2}
 body.admin-wide main{padding-inline:32px}
}

/* payments (13.11) */
.shop .pkg{position:relative}
.shop .pkg.best{border-color:var(--accent)}
.shop .price{font-size:28px;font-weight:700;margin:6px 0 2px;color:var(--text)}
.best-tag{border-color:var(--accent);color:var(--accent)}
.ok-tag{border-color:var(--success);color:var(--success)}
.pay-err{color:var(--danger-text);border:1px solid var(--danger);border-radius:10px;padding:8px 12px;margin:12px 0 0;font-size:14px}
.pay-done{text-align:center}
.pay-done .big-check{width:64px;height:64px;border-radius:50%;background:var(--success);color:#0E1F17;font-size:34px;font-weight:700;display:flex;align-items:center;justify-content:center;margin:4px auto 12px}
@media (min-width:600px){.shop{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.shop .card{margin-bottom:0}}
