/* Šipky: the taproom. Dark pub palette, amber lamp light, chalkboard score cards. Own shell (no shared retro chrome). */
:root {
    --bg: #0b0805; --ink: #f6ead2; --muted: #b9a88a; --line: rgba(255, 214, 150, .16); --panel: rgba(24, 16, 10, .86); --panel2: rgba(38, 26, 16, .9);
    --amber: #e8a838; --amber2: #ffd070; --good: #7cf08a; --bad: #ff6b5a; --focus: #ffe08a; --chalk: #f3eddc; --board: #20150d;
    --ui-scale: 1;
    color-scheme: dark;
}
* { box-sizing: border-box; }
html { font-size: calc(16px * var(--ui-scale)); }
html, body { margin: 0; height: 100%; }
body.dr-page { background: var(--bg); color: var(--ink); font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif; overflow-x: hidden; -webkit-tap-highlight-color: transparent; }
body.has-modal { overflow: hidden; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
#drScene { position: fixed; inset: 0; z-index: 0; width: 100vw; height: 100vh; }
#drApp { position: relative; z-index: 1; min-height: 100vh; }
#drFx { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
#drScreens { min-height: 100vh; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: .01em; }
p { margin: 0 0 .7em; line-height: 1.5; }
a { color: var(--amber2); }
.ic { width: 1.25em; height: 1.25em; flex: none; vertical-align: -0.25em; }
.ic.coin { color: var(--amber2); }
.hint { color: var(--muted); font-size: .9rem; }
.empty { color: var(--muted); padding: 24px 0; }
kbd { display: inline-block; padding: 2px 8px; border-radius: 6px; border: 1px solid var(--line); background: rgba(0, 0, 0, .4); font: inherit; font-size: .86rem; }

/* buttons, chips, tabs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 8px 16px; border-radius: 12px; border: 1px solid var(--line); background: linear-gradient(#3b2a1a, #2a1d12); color: var(--ink); font-weight: 700; transition: transform .12s, border-color .12s, background .12s; text-decoration: none; }
.btn:hover:not(:disabled) { border-color: var(--amber); transform: translateY(-1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn.primary { background: linear-gradient(#f0b546, #c8861c); color: #2a1706; border-color: #ffd070; text-shadow: 0 1px 0 rgba(255, 255, 255, .3); }
.btn.ghost { background: rgba(20, 13, 8, .55); }
.btn.danger { color: #ffb4a8; }
.btn.big { min-height: 54px; padding: 12px 30px; font-size: 1.1rem; }
.btn.small { min-height: 32px; padding: 4px 10px; font-size: .85rem; border-radius: 9px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; } .actions.center { justify-content: center; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); background: rgba(20, 13, 8, .75); color: var(--ink); font-weight: 700; }
.chip.icon { width: 40px; padding: 0; justify-content: center; } .chip.profile { padding-left: 4px; text-align: left; }
.chip.profile .who { display: flex; flex-direction: column; line-height: 1.15; max-width: 160px; } .chip.profile small { color: var(--muted); font-weight: 600; }
.chip.awardchip { background: rgba(232, 168, 56, .2); border-color: var(--amber); margin: 3px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; overflow: hidden; display: inline-grid; place-items: center; background: #3a2c1e; flex: none; border: 2px solid var(--amber); } .avatar svg { width: 100%; height: 100%; display: block; } .avatar.fallback { color: var(--muted); }
.nameframe { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.nameframe[data-framed] { position: relative; padding: 1px 10px; border: 2px solid var(--fp, #d2a24b); border-left-width: 5px; border-radius: 8px; background: linear-gradient(135deg, color-mix(in srgb, var(--fa, #f7ead1) 80%, #fff), color-mix(in srgb, var(--fp, #d2a24b) 22%, #fff)); color: var(--ft, #2f2216); }
.nameframe[data-anim]::after { content: ""; position: absolute; top: -40%; bottom: -40%; width: 36%; left: -40%; background: rgba(255, 255, 255, .4); transform: skewX(-18deg); animation: sweep 2.6s linear infinite; }
@keyframes sweep { to { left: 120%; } }
.syncchip { display: inline-flex; align-items: center; gap: 7px; font-size: .78rem; padding: 6px 12px; border-radius: 999px; background: rgba(20, 13, 8, .8); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.syncchip i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); } .syncchip.cloud { color: var(--good); } .syncchip.cloud i { background: var(--good); }
.syncchip.saving i { background: var(--amber); animation: blink 1s infinite; } .syncchip.error { color: var(--bad); } .syncchip.error i { background: var(--bad); } .syncchip.guest i { background: var(--amber); }
@keyframes blink { 50% { opacity: .3; } }
.tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; } .tabs.scrolltabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.tab { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: rgba(20, 13, 8, .6); white-space: nowrap; font-weight: 700; }
.tab.on { background: var(--amber); color: #2a1706; border-color: var(--amber2); }

/* title */
.title { min-height: 100vh; display: flex; flex-direction: column; padding: 14px clamp(14px, 3vw, 40px) 16px; gap: 6px; }
.title-top { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; } .title-top .chips { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.title-main { flex: 1; padding-top: 8px; display: grid; grid-template-columns: minmax(320px, 520px) 1fr; gap: clamp(16px, 4vw, 60px); align-items: center; max-width: 1400px; margin: 0 auto; width: 100%; }
.logo { margin-bottom: 10px; } .logo-k { display: block; margin-top: 4px; color: var(--amber2); text-transform: uppercase; letter-spacing: .24em; font-size: .75rem; font-weight: 800; }
.logo h1 { font-size: clamp(2.8rem, min(9vw, 11vh), 6rem); line-height: .95; letter-spacing: .06em; color: var(--chalk); text-shadow: 0 3px 0 #7a2a20, 0 8px 24px rgba(0, 0, 0, .7); }
.logo p { color: var(--muted); max-width: 40ch; margin-top: 8px; }
.menu { display: grid; gap: clamp(5px, 1vh, 9px); }
.menu-btn { display: flex; align-items: center; gap: 14px; text-align: left; padding: clamp(7px, 1.3vh, 12px) 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); text-decoration: none; color: var(--ink); transition: transform .14s, border-color .14s, background .14s; backdrop-filter: blur(4px); }
.menu-btn .ic { width: 28px; height: 28px; color: var(--amber2); }
.menu-btn b { display: block; font-size: 1.08rem; } .menu-btn small { display: block; color: var(--muted); font-size: .84rem; }
.menu-btn:hover { transform: translateX(5px); border-color: var(--amber); background: var(--panel2); }
.menu-btn.primary { background: linear-gradient(135deg, rgba(232, 168, 56, .92), rgba(160, 90, 20, .92)); color: #1e1004; border-color: #ffd070; } .menu-btn.primary .ic { color: #1e1004; } .menu-btn.primary small { color: #4a2c0e; }
.menu-small { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.menu-small .btn { min-height: 38px; padding: 6px 12px; }
.title-foot { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: .86rem; margin-top: 10px; flex-wrap: wrap; }
.title-right { display: grid; place-items: center; } .demo-wrap { width: min(100%, 640px, 70vh); aspect-ratio: 1; display: grid; place-items: center; filter: drop-shadow(0 20px 40px rgba(0, 0, 0, .6)); }

/* panels */
.panel { max-width: 1120px; margin: 0 auto; padding: 14px clamp(12px, 3vw, 28px) 40px; }
.panel-head { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; margin-bottom: 18px; padding: 12px 16px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(4px); }
.panel-title h1 { font-size: clamp(1.4rem, 3.4vw, 2rem); } .panel-title p { margin: 2px 0 0; color: var(--muted); font-size: .92rem; }
.panel-chips { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; } .back span { display: inline; }
.panel-body { padding: 18px clamp(12px, 2.4vw, 26px); border-radius: 18px; background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(4px); }
.banner { padding: 10px 14px; border-radius: 12px; background: rgba(232, 168, 56, .14); border: 1px solid var(--line); } .banner.warn { background: rgba(255, 107, 90, .14); }
.syncnote { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 12px; background: rgba(232, 168, 56, .12); margin-bottom: 14px; } .syncnote.cloud { background: rgba(124, 240, 138, .12); }
.field { display: grid; gap: 6px; margin-bottom: 12px; } .field span { color: var(--muted); font-size: .9rem; }
input[type=text], input:not([type]), select, textarea { padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(0, 0, 0, .4); width: 100%; }
textarea.code { font-family: ui-monospace, monospace; font-size: .8rem; word-break: break-all; }
input[type=range] { width: 100%; accent-color: var(--amber); }
.switch { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 12px; } .switch input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--amber); flex: none; } .switch small { display: block; color: var(--muted); }

/* setup */
.optgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-bottom: 12px; } .optgrid.inline { display: flex; flex-wrap: wrap; } .optgrid.modes { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.opt { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(20, 13, 8, .6); text-align: left; } .opt small { display: block; color: var(--muted); font-weight: 400; }
.opt.on { border-color: var(--amber2); background: rgba(232, 168, 56, .22); box-shadow: inset 0 0 0 1px var(--amber2); } .opt.small { padding: 6px 12px; }
.opt.opp { flex-direction: column; align-items: flex-start; } .opt.opp img { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--amber); }
.setup h3 { margin: 16px 0 8px; font-size: 1rem; color: var(--amber2); } .setup-row { display: flex; flex-wrap: wrap; gap: 24px; }

/* tour */
.venue { margin-bottom: 24px; } .venue header { margin-bottom: 8px; } .venue h2 { color: var(--amber2); } .venue header p { color: var(--muted); margin: 0; }
.stage { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 12px; margin-bottom: 8px; border-radius: 16px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); }
.stage.locked { opacity: .55; } .stage.done { border-color: rgba(124, 240, 138, .4); }
.stage .face { width: 76px; height: 76px; border-radius: 50%; border: 3px solid var(--amber); object-fit: cover; }
.stage h3 { font-size: 1.1rem; } .stage .role { color: var(--amber2); margin: 0; font-size: .86rem; } .stage .stage-mode { margin: 2px 0; font-weight: 700; } .stage .bio { color: var(--muted); font-size: .86rem; margin: 0; }
.stage-side { display: grid; gap: 6px; justify-items: end; text-align: right; } .stars { display: flex; gap: 2px; } .stars i { color: #4b3a28; } .stars i.on { color: var(--amber2); } .stars .ic { width: 22px; height: 22px; fill: currentColor; } .lock { color: var(--muted); }

/* slots, ledger, awards, settings */
.slotgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.slotcard { padding: 16px; border-radius: 16px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); } .slotcard.active { border-color: var(--amber2); } .slotcard.empty { border-style: dashed; }
.slotcard header { display: flex; justify-content: space-between; align-items: center; } .tag { padding: 2px 10px; border-radius: 999px; background: var(--amber); color: #2a1706; font-size: .76rem; font-weight: 800; } .tag.off { background: rgba(255, 255, 255, .08); color: var(--muted); }
.slotcard dl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; } .slotcard dt { color: var(--muted); font-size: .76rem; } .slotcard dd { margin: 0; font-weight: 800; font-size: 1.1rem; } .slotcard .note { color: var(--amber2); }
.statgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; } .statgrid.small { grid-template-columns: repeat(4, 1fr); }
.stat { padding: 10px 12px; border-radius: 12px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); } .stat span { display: block; color: var(--muted); font-size: .78rem; } .stat strong { font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.rec { width: 100%; border-collapse: collapse; } .rec th, .rec td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); } .rec th { color: var(--muted); font-size: .8rem; }
.recent { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; } .recent li { padding: 8px 12px; border-radius: 10px; background: rgba(0, 0, 0, .3); border-left: 4px solid var(--muted); } .recent li.win { border-color: var(--good); } .recent li.loss { border-color: var(--bad); }
.hubcard { display: flex; gap: 18px; align-items: center; margin-bottom: 18px; padding: 16px; border-radius: 18px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); } .hubcard .avatar { width: 72px; height: 72px; } .hubcard .coins { margin-left: auto; font-size: 1.3rem; }
.awardgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.award { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px; border-radius: 14px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); opacity: .6; } .award.on { opacity: 1; border-color: var(--amber); background: rgba(232, 168, 56, .12); }
.award .aicon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .06); color: var(--amber2); } .award .aicon .ic { width: 24px; height: 24px; } .award h3 { font-size: 1rem; } .award p { margin: 2px 0 0; color: var(--muted); font-size: .84rem; }
.setgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; } .setbox { padding: 16px; border-radius: 16px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); } .setbox h2 { font-size: 1.1rem; margin-bottom: 12px; color: var(--amber2); }
.howgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; } .howgrid h2 { color: var(--amber2); font-size: 1.1rem; margin-bottom: 8px; } .keys { display: grid; gap: 8px; margin: 0; } .keys div { display: flex; gap: 10px; align-items: baseline; } .keys dd { margin: 0; color: var(--muted); }
.newsitem h3 small { color: var(--muted); font-weight: 400; }
.puzzles { display: grid; gap: 10px; margin: 14px 0; } .puzzle { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 12px 16px; border-radius: 14px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); } .puzzle.ok { border-color: var(--good); } .puzzle.fail { border-color: var(--bad); }
.puzzle .pn { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--amber); color: #2a1706; font-weight: 800; } .puzzle .prem { font-size: 2rem; font-variant-numeric: tabular-nums; } .puzzle small { display: block; color: var(--muted); }

/* wardrobe */
.wallet { margin-bottom: 10px; } .coins { font-size: 1.1rem; }
.wstage { display: grid; grid-template-columns: minmax(200px, 300px) 1fr; gap: 18px; align-items: center; margin-bottom: 18px; padding: 14px; border-radius: 16px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); } .wstage canvas { width: 100%; height: auto; }
.wgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.witem { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 16px; background: rgba(0, 0, 0, .3); border: 1px solid var(--line); border-top: 3px solid var(--rc); } .witem.equipped { box-shadow: 0 0 0 2px var(--good); }
.witem h3 { font-size: 1rem; } .witem p { color: var(--muted); font-size: .85rem; flex: 1; margin: 0; } .wprev { position: relative; min-height: 96px; display: grid; place-items: center; background: radial-gradient(circle at 50% 30%, rgba(255, 220, 150, .1), rgba(0, 0, 0, .35)); border-radius: 12px; padding: 6px; }
.wprev .thumb { max-width: 100%; height: auto; } .wprev .tryfx { position: absolute; right: 6px; bottom: 6px; } .fxprev .ic { width: 44px; height: 44px; color: var(--amber2); }
.wmeta { display: flex; justify-content: space-between; align-items: center; font-size: .82rem; } .rar { color: var(--rc); font-weight: 800; text-transform: uppercase; letter-spacing: .06em; } .own { color: var(--good); }
.bubble { position: absolute; left: 50%; bottom: calc(100% - 4px); transform: translate(-50%, 8px); opacity: 0; pointer-events: none; padding: 6px 12px; border-radius: 12px; background: var(--chalk); color: #2a1a0e; font-weight: 800; font-size: .85rem; white-space: nowrap; z-index: 5; transition: opacity .2s, transform .2s; } .bubble.show { opacity: 1; transform: translate(-50%, 0); }
.bubble.static { position: static; opacity: 1; transform: none; }
.chatlist { display: grid; gap: 8px; margin: 12px 0; }

/* play */
.play { height: 100vh; height: 100dvh; display: flex; flex-direction: column; padding: 8px clamp(8px, 2vw, 22px) 10px; gap: 8px; }
.ptop { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; }
.ptitle { text-align: center; font-weight: 800; color: var(--amber2); text-shadow: 0 2px 8px #000; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pchips { display: flex; gap: 8px; align-items: center; }
.pmain { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(190px, 270px) 1fr minmax(190px, 270px); gap: clamp(8px, 1.6vw, 22px); align-items: stretch; }
.play.drill .pmain { grid-template-columns: minmax(190px, 270px) 1fr; }
.pcard { position: relative; align-self: center; padding: 14px; border-radius: 18px; background: linear-gradient(160deg, rgba(34, 46, 36, .94), rgba(14, 22, 16, .94)); border: 3px solid #5a3a1c; box-shadow: 0 8px 22px rgba(0, 0, 0, .5), inset 0 0 30px rgba(0, 0, 0, .5); color: var(--chalk); transition: border-color .2s, transform .2s, box-shadow .2s; }
.pcard.on { border-color: var(--amber2); box-shadow: 0 0 0 2px rgba(255, 208, 112, .35), 0 8px 26px rgba(0, 0, 0, .55), inset 0 0 30px rgba(0, 0, 0, .5); transform: scale(1.02); }
.phead { display: flex; align-items: center; gap: 10px; min-width: 0; } .phead .face, .phead img.face { width: 46px; height: 46px; border-radius: 50%; flex: none; overflow: hidden; border: 2px solid var(--amber); background: #3a2c1e; display: grid; place-items: center; object-fit: cover; } .phead .face .avatar { width: 100%; height: 100%; border: 0; }
.phead .who { min-width: 0; display: grid; gap: 4px; } .phead .nm { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pips { display: inline-flex; gap: 4px; } .pips i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--amber); } .pips i.on { background: var(--amber2); }
.pcard .big { font-size: clamp(2.6rem, 5.6vw, 4.4rem); font-weight: 800; line-height: 1; text-align: center; margin: 10px 0 6px; font-variant-numeric: tabular-nums; font-family: "Courier New", ui-monospace, monospace; text-shadow: 0 0 14px rgba(255, 255, 255, .2); }
.pcard .big small { display: block; font-size: .9rem; opacity: .7; font-family: inherit; }
.pcard .sub { display: flex; justify-content: space-between; gap: 8px; color: #cfc6ae; font-size: .82rem; } .pcard .sub b { color: var(--chalk); }
.pcard .route:empty { visibility: hidden; }
.pcard .route { margin-top: 8px; padding: 5px 8px; border-radius: 8px; background: rgba(124, 240, 138, .14); color: var(--good); font-weight: 800; font-size: .86rem; text-align: center; min-height: 28px; }
.marks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 6px 0; } .mk { display: grid; justify-items: center; font-weight: 800; font-size: .82rem; } .mk i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #607060; position: relative; } .mk.m1 i::after, .mk.m2 i::after, .mk.m3 i::after { content: ""; position: absolute; inset: 2px; background: linear-gradient(135deg, transparent 44%, var(--chalk) 44%, var(--chalk) 56%, transparent 56%); } .mk.m2 i::before, .mk.m3 i::before { content: ""; position: absolute; inset: 2px; background: linear-gradient(45deg, transparent 44%, var(--chalk) 44%, var(--chalk) 56%, transparent 56%); } .mk.m3 i { border-color: var(--good); }
.bar { height: 8px; border-radius: 6px; background: rgba(255, 255, 255, .12); margin: 8px 0; overflow: hidden; } .bar i { display: block; height: 100%; background: var(--amber2); }
.pboard { position: relative; min-height: 0; min-width: 0; } .pboard canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; user-select: none; -webkit-user-select: none; }
.pboard .status { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; font-weight: 700; color: var(--chalk); text-shadow: 0 2px 6px #000; pointer-events: none; padding: 0 8px; font-size: .95rem; }
.callout { position: absolute; left: 50%; top: 14%; transform: translate(-50%, 0) scale(.6); opacity: 0; font-weight: 900; font-size: clamp(1.6rem, 5vw, 3.4rem); color: var(--amber2); text-shadow: 0 3px 0 #7a2a20, 0 6px 20px rgba(0, 0, 0, .8); white-space: nowrap; pointer-events: none; letter-spacing: .02em; text-transform: uppercase; }
.callout.show { animation: callout .45s cubic-bezier(.2, 1.4, .4, 1) forwards; } .callout.huge { font-size: clamp(2rem, 7vw, 5rem); color: #ffe9a0; } .callout.bad { color: var(--bad); } .callout.small { font-size: clamp(1.1rem, 3vw, 1.8rem); }
@keyframes callout { to { opacity: 1; transform: translate(-50%, 0) scale(1); } }
.btn.throw { min-width: 190px; min-height: 52px; font-size: 1.05rem; user-select: none; touch-action: none; background: linear-gradient(#f0b546, #c8861c); color: #2a1706; border-color: #ffd070; } .btn.throw.held { transform: scale(.96); filter: brightness(1.15); }

/* modals, toasts, tooltips */
.modal-wrap { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 14px; } .scrim { position: absolute; inset: 0; background: rgba(5, 3, 1, .72); backdrop-filter: blur(3px); }
.modal { position: relative; width: min(560px, 100%); max-height: 92vh; overflow: auto; padding: 22px; border-radius: 20px; background: #22170e; border: 1px solid var(--amber); box-shadow: 0 24px 60px rgba(0, 0, 0, .7); animation: pop .18s ease-out; } .modal h2 { margin-bottom: 10px; } .stack { display: grid; gap: 10px; }
@keyframes pop { from { transform: scale(.94); opacity: 0; } }
.result { text-align: center; } .result h2 { font-size: 1.9rem; color: var(--amber2); } .result.lose h2 { color: var(--bad); } .resscore { font-size: 3rem; font-weight: 900; display: flex; justify-content: center; gap: 18px; align-items: baseline; } .resscore span { opacity: .4; }
.resstars { display: flex; justify-content: center; gap: 8px; margin: 8px 0; } .resstars i { color: #4b3a28; transition: color .3s, transform .3s; } .resstars i.on { color: var(--amber2); transform: scale(1.25); } .resstars .ic { width: 42px; height: 42px; fill: currentColor; }
.resaw { margin: 10px 0; } .newbest { color: var(--good); font-weight: 800; }
#drToasts { position: fixed; left: 50%; top: 12px; transform: translateX(-50%); z-index: 90; display: grid; gap: 8px; width: min(420px, calc(100vw - 24px)); pointer-events: none; }
.toast { padding: 10px 16px; border-radius: 12px; background: #2a1b0f; border: 1px solid var(--amber); opacity: 0; transform: translateY(-10px); transition: all .3s; } .toast.in { opacity: 1; transform: none; } .toast.warn { border-color: var(--bad); } .toast.good { border-color: var(--good); } .toast.award { border-color: var(--amber2); }
.drtip { position: fixed; z-index: 100; pointer-events: none; max-width: 280px; padding: 7px 11px; border-radius: 8px; background: #120c07; border: 1px solid var(--amber); color: var(--ink); font-size: .82rem; line-height: 1.35; opacity: 0; transition: opacity .1s; } .drtip.on { opacity: 1; }

/* responsive */
@media (max-width: 900px) {
    .title-main { grid-template-columns: 1fr; } .title-right { order: -1; max-height: 34vh; } .demo-wrap { width: min(60vw, 34vh); }
    .stage { grid-template-columns: auto 1fr; } .stage-side { grid-column: 1 / -1; grid-auto-flow: column; justify-content: space-between; align-items: center; text-align: left; }
    .wstage { grid-template-columns: 1fr; } .wstage canvas { max-width: 260px; margin: 0 auto; }
    .panel-head { grid-template-columns: auto 1fr; } .panel-chips { grid-column: 1 / -1; justify-content: flex-start; }
}
@media (max-width: 760px) {
    .play { padding: 6px 8px 8px; gap: 6px; }
    .pmain { grid-template-columns: 1fr 1fr; grid-template-rows: auto 1fr; } .play.drill .pmain { grid-template-columns: 1fr; }
    .pmain .p0 { grid-column: 1; grid-row: 1; } .pmain .p1 { grid-column: 2; grid-row: 1; } .pmain .pboard { grid-column: 1 / -1; grid-row: 2; }
    .pcard { padding: 8px; align-self: stretch; } .pcard .big { font-size: 2.2rem; margin: 4px 0; } .phead .face, .phead img.face { width: 34px; height: 34px; } .phead .nm { font-size: .88rem; } .pcard .sub { font-size: .72rem; } .pcard .route:empty { visibility: hidden; }
.pcard .route { font-size: .74rem; padding: 3px 4px; min-height: 22px; margin-top: 4px; }
    .nameframe[data-framed] { padding: 0 6px; border-left-width: 3px; font-size: .8rem; }
    .ptop .lbl { display: none; } .js-profile.compact .who small, .ptop .chip.profile .who { display: none; }
    .statgrid.small { grid-template-columns: repeat(2, 1fr); } .callout { top: 6%; }
    .menu-small .btn span { display: none; } .menu-small .btn { padding: 8px 12px; }
}
@media (max-height: 560px) and (orientation: landscape) { .logo h1 { font-size: 2.6rem; } .menu-btn { padding: 7px 12px; } .menu-btn small { display: none; } .pcard .big { font-size: 2rem; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
:root[data-motion="reduce"] *, :root[data-motion="reduce"] *::before, :root[data-motion="reduce"] *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }

/* ======================================================================================================
   Mobile and touch. The play screen is one grid whose areas change with the orientation:
   desktop: scores left and right of the board, tray and throw button under it;
   portrait: a compact scores strip on top, the board large, targets and the throw area at the bottom;
   landscape on a phone: scores at the sides, the board in the middle, the throw button under the right score.
   ====================================================================================================== */
html { overscroll-behavior: none; touch-action: manipulation; }
body.dr-page { overscroll-behavior: none; -webkit-text-size-adjust: 100%; }
body[data-screen="play"] { position: fixed; inset: 0; width: 100%; overflow: hidden; }
.play { height: 100vh; height: 100dvh; padding: max(8px, env(safe-area-inset-top)) max(clamp(8px, 2vw, 22px), env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(clamp(8px, 2vw, 22px), env(safe-area-inset-left)); user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.title { padding-left: max(clamp(14px, 3vw, 40px), env(safe-area-inset-left)); padding-right: max(clamp(14px, 3vw, 40px), env(safe-area-inset-right)); padding-top: max(14px, env(safe-area-inset-top)); padding-bottom: max(16px, env(safe-area-inset-bottom)); }
.panel { padding-left: max(clamp(12px, 3vw, 28px), env(safe-area-inset-left)); padding-right: max(clamp(12px, 3vw, 28px), env(safe-area-inset-right)); padding-top: max(14px, env(safe-area-inset-top)); padding-bottom: max(40px, env(safe-area-inset-bottom)); }
#drToasts { top: max(12px, env(safe-area-inset-top)); }
.pboard canvas { touch-action: none; -webkit-touch-callout: none; }

.pmain { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(190px, 270px) minmax(0, 1fr) minmax(190px, 270px); grid-template-rows: minmax(0, 1fr) auto auto; gap: 8px clamp(8px, 1.6vw, 22px); align-items: stretch; }
.play.drill .pmain { grid-template-columns: minmax(190px, 270px) minmax(0, 1fr); }
.pmain .p0 { grid-column: 1; grid-row: 1; } .pmain .p1 { grid-column: 3; grid-row: 1; } .pmain .pboard { grid-column: 2; grid-row: 1; }
.pmain .targets { grid-column: 2; grid-row: 2; }
.pmain .tray { grid-column: 1; grid-row: 3; align-self: center; display: flex; gap: 8px; }
.pmain .btn.throw { grid-column: 2; grid-row: 3; justify-self: center; min-width: 190px; min-height: calc(52px * var(--ctl, 1)); font-size: calc(1.05rem * var(--ctl, 1)); user-select: none; touch-action: none; background: linear-gradient(#f0b546, #c8861c); color: #2a1706; border-color: #ffd070; } .pmain .btn.throw.held { transform: scale(.96); filter: brightness(1.15); }
.dchip { min-width: 52px; height: 40px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; border: 2px dashed rgba(255, 255, 255, .2); color: var(--muted); font-weight: 800; background: rgba(0, 0, 0, .35); } .dchip.thrown { border-style: solid; color: var(--chalk); border-color: var(--amber); } .dchip.t, .dchip.ib { background: rgba(232, 168, 56, .3); } .dchip.d { background: rgba(200, 53, 45, .35); } .dchip.miss { color: var(--muted); border-color: #555; }

.tools { position: absolute; right: 0; top: 50%; transform: translateY(-50%); display: grid; gap: 8px; z-index: 3; }
.dr-lefty .tools { right: auto; left: 0; }
.tool { width: calc(46px * var(--ctl, 1)); height: calc(46px * var(--ctl, 1)); min-width: 44px; min-height: 44px; display: grid; place-items: center; border-radius: 14px; border: 1px solid var(--line); background: rgba(22, 14, 8, .82); color: var(--ink); backdrop-filter: blur(3px); }
.tool:disabled { opacity: .35; } .tool:not(:disabled):active { background: var(--amber); color: #2a1706; } .tool .ic { width: 22px; height: 22px; }

.targets { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px; border-radius: 14px; background: rgba(20, 13, 8, .88); border: 1px solid var(--line); }
.targets[hidden] { display: none; }
.ringsel { display: flex; gap: 6px; flex: 1 1 100%; } .rb { flex: 1; min-height: 44px; border-radius: 10px; border: 1px solid var(--line); background: rgba(0, 0, 0, .4); font-weight: 800; } .rb.on { background: var(--amber); color: #2a1706; border-color: var(--amber2); }
.numrow { display: flex; gap: 6px; flex: 1 1 100%; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; touch-action: pan-x; } .numrow::-webkit-scrollbar { display: none; }
.nb { flex: none; min-width: 48px; min-height: 48px; border-radius: 12px; border: 1px solid var(--line); background: rgba(60, 42, 24, .9); font-weight: 800; font-size: 1.05rem; } .nb.on { background: var(--amber); color: #2a1706; border-color: var(--amber2); }
.targets.big .numrow { overflow: visible; } .targets.big .nb { flex: 1; min-height: 56px; font-size: 1.2rem; padding: 0 4px; min-width: 0; }

@media (pointer: coarse) {
    .btn, .tab, .opt, .menu-btn, .rb, .menu-small .btn { min-height: 44px; } .chip { min-height: 44px; } .chip.icon { width: 44px; } .btn.small { min-height: 44px; }
    .switch input { width: 26px; height: 26px; } input[type=range] { height: 34px; } select, input[type=text], input:not([type]) { min-height: 44px; font-size: 16px; }
}

/* portrait phones and tablets: scores strip, large board, throw area at the bottom */
@media (orientation: portrait) and (max-width: 1100px) {
    .pmain { grid-template-columns: 1fr 1fr; grid-template-rows: auto minmax(0, 1fr) auto auto; gap: 6px 8px; }
    .play.drill .pmain { grid-template-columns: 1fr 1fr; }
    .pmain .p0 { grid-column: 1; grid-row: 1; } .pmain .p1 { grid-column: 2; grid-row: 1; } .play.drill .p0 { grid-column: 1 / -1; }
    .pmain .pboard { grid-column: 1 / -1; grid-row: 2; } .pmain .targets { grid-column: 1 / -1; grid-row: 3; }
    .pmain .tray { grid-column: 1; grid-row: 4; justify-self: start; } .pmain .btn.throw { grid-column: 2; grid-row: 4; justify-self: stretch; min-width: 0; }
    .dr-lefty .pmain .tray { grid-column: 2; justify-self: end; } .dr-lefty .pmain .btn.throw { grid-column: 1; }
    .pcard { padding: 8px 10px; align-self: stretch; } .pcard .big { font-size: clamp(2.1rem, 9vw, 3.4rem); margin: 4px 0; } .phead .face, .phead img.face { width: 36px; height: 36px; } .phead .nm { font-size: .9rem; }
    .pcard .sub { font-size: .76rem; } .pcard .route { font-size: .76rem; padding: 3px 4px; min-height: 22px; margin-top: 4px; } .pcard.on { transform: none; }
    .nameframe[data-framed] { padding: 0 6px; border-left-width: 3px; font-size: .8rem; }
    .ptop .lbl, .ptop .chip.profile .who { display: none; } .ptop .chip.profile { padding-right: 4px; }
    .tools { top: 0; right: 0; left: 0; bottom: auto; transform: none; display: flex; justify-content: center; gap: 12px; }
    .callout { top: 8%; } .dchip { min-width: 46px; height: 44px; padding: 0 8px; }
    .pboard .status { font-size: .85rem; }
}
/* phones on their side: scores at the sides, the board in the middle */
@media (orientation: landscape) and (max-height: 520px) {
    .play { gap: 4px; padding-top: max(4px, env(safe-area-inset-top)); padding-bottom: max(6px, env(safe-area-inset-bottom)); }
    .ptop .ptitle { font-size: .85rem; } .ptop .lbl, .ptop .chip.profile .who { display: none; }
    .pmain { grid-template-columns: minmax(120px, 23vw) minmax(0, 1fr) minmax(120px, 23vw); grid-template-rows: minmax(0, 1fr) auto auto; gap: 4px 8px; }
    .play.drill .pmain { grid-template-columns: minmax(120px, 23vw) minmax(0, 1fr); }
    .pmain .pboard { grid-column: 2; grid-row: 1 / span 3; } .pmain[data-aim="buttons"] .pboard { grid-row: 1 / span 2; } .pmain .targets { grid-column: 2; grid-row: 3; }
    .pmain .p0 { grid-column: 1; grid-row: 1 / span 2; align-self: start; } .pmain .p1 { grid-column: 3; grid-row: 1 / span 2; align-self: start; }
    .pmain .tray { grid-column: 1; grid-row: 3; justify-self: stretch; } .pmain .btn.throw { grid-column: 3; grid-row: 3; justify-self: stretch; min-width: 0; }
    .dr-lefty .pmain .tray { grid-column: 3; } .dr-lefty .pmain .btn.throw { grid-column: 1; }
    .pmain .tray .dchip { flex: 1; min-width: 0; height: 44px; }
    .pcard { padding: 6px 8px; } .pcard .big { font-size: clamp(1.9rem, 6.2vh, 2.6rem); margin: 2px 0; } .phead .face, .phead img.face { width: 30px; height: 30px; } .phead .nm { font-size: .82rem; } .pcard .sub { font-size: .7rem; flex-direction: column; gap: 0; }
    .pcard .route { font-size: .7rem; margin-top: 2px; min-height: 18px; padding: 2px; } .pcard.on { transform: none; } .pips i { width: 10px; height: 10px; }
    .nameframe[data-framed] { padding: 0 5px; font-size: .74rem; border-left-width: 3px; }
    .callout { top: 4%; font-size: clamp(1.3rem, 6vh, 2.4rem); } .pboard .status { font-size: .78rem; }
    .marks { gap: 2px; } .mk i { width: 16px; height: 16px; } .mk { font-size: .7rem; }
    .targets { padding: 4px; flex-wrap: nowrap; } .ringsel { flex: 0 0 auto; width: 36%; } .numrow { flex: 1 1 0; min-width: 0; } .targets.big .ringsel { width: 30%; } .tools { gap: 6px; }
}
/* small screens: modals become bottom sheets */
@media (max-width: 760px), (max-height: 520px) {
    .modal-wrap { place-items: end center; padding: 0; }
    .modal { width: min(640px, 100%); max-height: 88vh; max-height: 88dvh; border-radius: 22px 22px 0 0; padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); animation: sheet .22s ease-out; }
    .modal::before { content: ""; display: block; width: 44px; height: 4px; border-radius: 4px; background: var(--line); margin: -8px auto 12px; }
    .panel-head { position: sticky; top: 0; z-index: 6; } .actions .btn { flex: 1 1 140px; }
    .wgrid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
}
@keyframes sheet { from { transform: translateY(60px); opacity: 0; } }
@media (max-width: 400px) { .logo h1 { font-size: 2.6rem; } .menu-btn { padding: 8px 12px; } .menu-btn small { font-size: .78rem; } .stage .face { width: 56px; height: 56px; } }

@media (orientation: portrait) and (max-height: 700px) {
    .pcard .sub, .pcard .route { display: none; } .pcard .big { font-size: 2rem; margin: 2px 0; } .pcard { padding: 6px 8px; } .phead .face, .phead img.face { width: 30px; height: 30px; }
    .targets { padding: 4px; gap: 4px; } .nb { min-height: 44px; } .tools { gap: 8px; }
}

/* Performance: on the play screen the board canvas repaints every frame; a backdrop blur over it is re-sampled every frame.
   Slightly denser plain panels instead (menus keep the blur). */
body[data-screen="play"] .tool, body[data-screen="play"] .panel-head, body[data-screen="play"] .panel-body, body[data-screen="play"] .menu-btn { backdrop-filter: none; -webkit-backdrop-filter: none; }
body[data-screen="play"] .tool { background: rgba(22, 14, 8, .9); }
body[data-screen="play"] .scrim { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(5, 3, 1, .84); }
