/* Taverna Tavli v1.0.0 */
@font-face { font-family: 'Cinzel'; src: url(../fonts/cinzel-900.1.0.1.woff2) format('woff2'); font-weight: 400 900; font-display: block; }
@font-face { font-family: 'Nunito'; src: url(../fonts/nunito-800.1.0.1.woff2) format('woff2'); font-weight: 800; font-display: block; }
@font-face { font-family: 'Nunito'; src: url(../fonts/nunito-600.1.0.1.woff2) format('woff2'); font-weight: 600; font-display: block; }
:root {
  --blue: #1a5cb0; --deep: #0d3a78; --navy: #0b2850; --ink: #0a1e3c; --white: #fbf8f2; --gold: #e8b84a; --gold2: #f3cb6a; --sea: #06264A;
  --terra: #C4552B; --olive: #6B7A2A; --bouq: #D6246E; --mint: #2fe39a; --text-scale: 1;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px); --safe-l: env(safe-area-inset-left, 0px); --safe-r: env(safe-area-inset-right, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0a2650; overscroll-behavior: none; }
body { font-family: 'Nunito', system-ui, sans-serif; font-weight: 800; color: var(--navy); -webkit-font-smoothing: antialiased; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: manipulation; font-size: calc(16px * var(--text-scale)); }
#app { position: fixed; inset: 0; height: 100dvh; overflow: hidden; }
canvas { display: block; }
#bg { position: absolute; inset: 0; width: 100%; height: 100%; }
#scrim { position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 45%, rgba(8, 30, 66, .55), rgba(4, 16, 38, .82)); opacity: 0; transition: opacity .5s; pointer-events: none; }
#scrim.on { opacity: 1; }
#boardWrap { position: absolute; opacity: 0; transition: opacity .35s; touch-action: none; }
#boardWrap.on { opacity: 1; }
#boardWrap canvas { width: 100%; height: 100%; touch-action: none; }
#board2d { position: absolute; inset: 0; }

.screen { position: absolute; inset: 0; display: none; padding: calc(12px + var(--safe-t)) calc(12px + var(--safe-r)) calc(12px + var(--safe-b)) calc(12px + var(--safe-l)); overflow: hidden; }
.screen.on { display: block; animation: scrIn .35s ease both; }
@keyframes scrIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.scroll { overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; touch-action: pan-y; }
.hidden { display: none !important; }

/* ---------- cards, buttons, chips ---------- */
.card { background: linear-gradient(180deg, #ffffff, #f3f6fb); border-radius: 18px; box-shadow: 0 10px 26px rgba(2, 14, 36, .45), 0 0 0 1.5px rgba(255, 255, 255, .9) inset, 0 0 0 2px #d9b25a; padding: 12px 14px; }
.card.navy { background: linear-gradient(180deg, #13468e, #0b2c62); color: #fff; box-shadow: 0 14px 34px rgba(2, 10, 30, .55), 0 0 0 2px #e1b24e, 0 0 0 1px rgba(255, 255, 255, .25) inset; }
.keystrip { height: 12px; background: repeating-linear-gradient(90deg, transparent 0 2px, var(--gold) 2px 4px, transparent 4px 6px); opacity: .0; }
.cinzel { font-family: 'Cinzel', Georgia, serif; font-weight: 900; letter-spacing: .4px; }
h1, h2, h3 { font-family: 'Cinzel', Georgia, serif; font-weight: 900; margin: 0; letter-spacing: .4px; }
.sub { font-weight: 800; color: #3d6aa6; font-size: .8em; }
.btn { appearance: none; border: 0; cursor: pointer; font-family: 'Cinzel', Georgia, serif; font-weight: 900; font-size: 17px; letter-spacing: .5px; height: 50px; padding: 0 18px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: transform .08s, filter .15s, opacity .2s; color: var(--navy); background: #fff; box-shadow: 0 0 0 2px var(--deep) inset, 0 4px 0 #0a2a5a; white-space: nowrap; }
.btn:active { transform: translateY(2px); box-shadow: 0 0 0 2px var(--deep) inset, 0 2px 0 #0a2a5a; }
.btn.go { background: linear-gradient(180deg, #3d8ae6 0%, #1a5cb0 55%, #134a94 100%); color: #fff; text-shadow: 0 1.5px 0 #072550; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .5), 0 4px 0 #0a2a5a, 0 0 0 2px #e1b24e; }
.btn.go:active { box-shadow: inset 0 2px 0 rgba(255, 255, 255, .5), 0 2px 0 #0a2a5a, 0 0 0 2px #e1b24e; }
.btn.gold { background: linear-gradient(180deg, #ffe08a, #e8b84a 60%, #c9962c); color: #2a1a04; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .6), 0 4px 0 #7a5410, 0 0 0 2px #fff3c8; }
.btn.small { height: 40px; font-size: 14px; padding: 0 12px; border-radius: 12px; }
.btn.wide { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn.round { width: 44px; height: 44px; padding: 0; border-radius: 50%; font-size: 20px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--deep); color: #fff; border-radius: 999px; padding: 4px 11px; font-weight: 800; font-size: 13px; white-space: nowrap; }
.chip b { color: var(--gold2); }
.chip.light { background: #e9eff8; color: var(--navy); }
.chip.light b { color: var(--deep); }
.dot { width: 13px; height: 13px; border-radius: 50%; flex: none; }
.dot.A { background: radial-gradient(circle at 35% 30%, #fff, #e2d6bb); box-shadow: 0 0 0 1.5px #8a7444; }
.dot.B { background: radial-gradient(circle at 35% 30%, #2a66c0, #0c346e); box-shadow: 0 0 0 1.5px #f3cb6a; }
.portrait { border-radius: 50%; flex: none; background: radial-gradient(circle at 40% 35%, #2c6fc4, #0c346e); }
.medal { width: 56px; height: 56px; border-radius: 50%; flex: none; display: block; }
.av { flex: none; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #fff, #e2d6bb); box-shadow: 0 0 0 3px #fff, 0 0 0 5px #e1b24e, 0 3px 8px rgba(0, 0, 0, .3); display: flex; align-items: center; justify-content: center; font-family: 'Cinzel', Georgia, serif; font-weight: 900; color: var(--navy); }
.say { position: absolute; background: #fff; color: var(--navy); border-radius: 14px; padding: 8px 12px; font-weight: 800; font-size: 14px; box-shadow: 0 6px 16px rgba(2, 14, 36, .35); max-width: 320px; opacity: 0; transform: translateY(-4px) scale(.98); transition: opacity .25s, transform .25s; pointer-events: none; z-index: 5; }
.say.on { opacity: 1; transform: none; }
.say::before { content: ""; position: absolute; width: 14px; height: 14px; background: #fff; transform: rotate(45deg); top: -6px; left: 28px; }
.tag { font-family: 'Cinzel', Georgia, serif; font-weight: 900; color: var(--gold2); letter-spacing: 2px; font-size: 13px; text-shadow: 0 2px 0 #041a3a; }
.mini-dice { display: flex; gap: 6px; }
.md { width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(#fff, #eef1f6); box-shadow: 0 0 0 1.5px var(--deep), 0 3px 0 #0a2a5a; position: relative; transition: opacity .2s; }
.md.used { opacity: .35; }
.md i { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #0b1830; }

/* ---------- title ---------- */
#scr-title { display: none; }
#scr-title.on { display: flex; flex-direction: column; align-items: center; justify-content: space-between; }
.logo { text-align: center; margin-top: 2vh; }
.logo h1 { font-size: clamp(40px, 11vw, 78px); color: #fff; line-height: .95; text-shadow: 0 3px 0 #082a5c, 0 0 0 #000, 0 6px 18px rgba(0, 10, 30, .5); -webkit-text-stroke: 1.5px #0a2650; }
.logo h1 span { display: block; color: var(--gold2); }
.logo .tagline { display: inline-block; color: #fff; font-size: 15px; font-weight: 800; margin-top: 8px; padding: 4px 14px; border-radius: 999px; background: rgba(8, 34, 80, .85); border: 1px solid rgba(232, 196, 104, .7); text-shadow: none; }
.host { display: flex; align-items: flex-end; gap: 10px; }
.host img { width: clamp(96px, 26vw, 150px); height: auto; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .35)); }
.host .say { position: relative; opacity: 1; transform: none; max-width: 220px; }
.host .say::before { top: auto; bottom: 14px; left: -6px; }
.menu-btns { display: flex; flex-direction: column; gap: 12px; width: min(380px, 100%); }
.menu-btns .btn { height: 56px; font-size: 19px; }
.menu-row { display: flex; gap: 10px; }
.menu-row .btn { flex: 1; }
.family { text-align: center; color: #cfe0ff; font-size: 12px; font-weight: 600; line-height: 1.5; }
.family b { color: #fff; font-family: 'Cinzel', Georgia, serif; letter-spacing: 1px; }

/* ---------- generic page ---------- */
.page { display: flex; flex-direction: column; height: 100%; max-width: 760px; margin: 0 auto; gap: 12px; }
.pagehead { display: flex; align-items: center; gap: 10px; color: #fff; }
.pagehead h2 { flex: 1; font-size: 22px; text-shadow: 0 2px 0 #041a3a; }
.pagebody { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 12px; padding: 4px 4px 12px; }
.list { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; align-items: center; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.table-card { display: flex; align-items: center; gap: 12px; padding: 10px 12px; cursor: pointer; position: relative; }
.table-card .medal { width: 64px; height: 64px; }
.table-card.locked { filter: grayscale(.85); opacity: .7; }
.table-card.next { box-shadow: 0 10px 26px rgba(2, 14, 36, .45), 0 0 0 3px #2fe39a, 0 0 22px rgba(47, 227, 154, .35); }
.table-card .tnum { font-family: 'Cinzel', Georgia, serif; font-weight: 900; color: #b8862a; font-size: 12px; letter-spacing: 1.5px; }
.table-card .name { font-family: 'Cinzel', Georgia, serif; font-weight: 900; font-size: 19px; color: var(--navy); }
.badge { font-size: 12px; padding: 3px 9px; border-radius: 99px; background: #e9eff8; color: var(--deep); }
.badge.won { background: #dff7ea; color: #13704a; }
.seg { display: flex; background: #e6edf7; border-radius: 12px; padding: 4px; gap: 4px; flex-wrap: wrap; }
.seg button { flex: 1; min-width: 60px; border: 0; background: transparent; padding: 9px 6px; border-radius: 9px; font: 800 14px 'Nunito', sans-serif; color: var(--deep); cursor: pointer; }
.seg button.on { background: var(--deep); color: #fff; box-shadow: 0 2px 0 #06204a; }
.field-label { font-size: 13px; color: #3d6aa6; margin: 6px 0 4px; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #e3e9f3; }
.toggle:last-child { border-bottom: 0; }
.toggle .lbl { font-size: 15px; }
.toggle .lbl small { display: block; font-weight: 600; color: #5a7aa6; font-size: 12px; }
.sw { width: 52px; height: 30px; border-radius: 99px; background: #c6d2e4; position: relative; flex: none; cursor: pointer; transition: background .2s; border: 0; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, .25); transition: transform .2s; }
.sw.on { background: #1a8a5a; }
.sw.on::after { transform: translateX(22px); }
.sw[disabled] { opacity: .4; }
input[type=range] { width: 160px; accent-color: var(--blue); }
input.text { font: 800 20px 'Nunito', sans-serif; padding: 10px 12px; border-radius: 12px; border: 2px solid var(--deep); width: 100%; color: var(--navy); text-transform: none; user-select: text; -webkit-user-select: text; }
.code-big { font-family: 'Cinzel', Georgia, serif; font-weight: 900; font-size: 44px; letter-spacing: 6px; color: var(--navy); text-align: center; }
.note { font-size: 13px; font-weight: 600; color: #4a6a96; line-height: 1.45; }
.note a { color: var(--blue); }

/* ---------- game HUD ---------- */
#scr-game { padding: 0; pointer-events: none; }
#scr-game > * { pointer-events: auto; }
.pcard { position: absolute; display: flex; align-items: center; gap: 10px; padding: 9px 12px; }
.pcard .medal { width: 54px; height: 54px; }
.pcard .nm { font-family: 'Cinzel', Georgia, serif; font-weight: 900; font-size: 19px; color: var(--navy); line-height: 1.05; }
.pcard .st { font-weight: 800; color: #3d6aa6; font-size: 13px; margin-top: 3px; }
.pcard .chips { display: flex; flex-direction: column; gap: 5px; align-items: flex-end; }
.pcard.turn { box-shadow: 0 10px 26px rgba(2, 14, 36, .45), 0 0 0 1.5px rgba(255, 255, 255, .9) inset, 0 0 0 3px #2fe39a; }
#meCard { flex-direction: column; align-items: stretch; gap: 10px; }
#meCard .top { display: flex; align-items: center; gap: 10px; }
#meCard .acts { display: flex; gap: 10px; }
#meCard .acts .btn { flex: 1; }
#meCard .acts .btn.go { flex: 1.35; }
#btnDouble { flex: 0 0 auto !important; width: 50px; padding: 0; font-size: 15px; }
.gtag { position: absolute; text-align: center; left: 0; right: 0; pointer-events: none !important; }
#btnMenu { position: absolute; z-index: 6; background: rgba(255, 255, 255, .95); }
.emotes { position: absolute; display: flex; gap: 6px; flex-wrap: wrap; z-index: 7; }
.emotes .btn { height: 36px; font-family: 'Nunito', sans-serif; font-size: 14px; }
.float-emote { position: absolute; z-index: 8; background: #fff; border-radius: 14px; padding: 8px 14px; font-size: 18px; box-shadow: 0 8px 20px rgba(0, 0, 0, .35); animation: pop 1.8s ease both; pointer-events: none; }
@keyframes pop { 0% { opacity: 0; transform: scale(.6); } 12% { opacity: 1; transform: scale(1.08); } 20% { transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-14px); } }

/* ---------- modal & toast ---------- */
#modal { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(3, 12, 30, .55); z-index: 20; }
#modal.on { display: flex; animation: fade .25s both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.dlg { width: min(560px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; text-align: center; padding: 22px 18px 18px; animation: dlgIn .35s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes dlgIn { from { transform: scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }
.dlg h2 { font-size: clamp(30px, 8vw, 54px); color: #fff; text-shadow: 0 3px 0 #062250; -webkit-text-stroke: 1px #0a2650; line-height: 1; }
.dlg .kicker { font-family: 'Cinzel', Georgia, serif; font-weight: 900; color: var(--gold2); letter-spacing: 3px; font-size: 14px; margin-bottom: 6px; }
.dlg .medal { width: 120px; height: 120px; margin: 14px auto 6px; }
.dlg .say { position: relative; opacity: 1; transform: none; display: inline-block; margin: 10px 0; max-width: 100%; }
.dlg .say::before { left: 50%; margin-left: -7px; }
.dlg .chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 10px 0 16px; }
.dlg .chips .chip { font-size: 15px; padding: 7px 14px; }
.dlg .acts { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.dlg .acts .btn { flex: 1; min-width: 130px; }
.dlg.light { background: linear-gradient(180deg, #ffffff, #f3f6fb); color: var(--navy); }
.dlg.light h2 { color: var(--navy); -webkit-text-stroke: 0; text-shadow: none; font-size: 26px; }
.rays { position: absolute; inset: -50%; background: repeating-conic-gradient(from 0deg, rgba(243, 203, 106, .10) 0 8deg, transparent 8deg 22deg); animation: spin 30s linear infinite; pointer-events: none; z-index: -1; }
@keyframes spin { to { transform: rotate(360deg); } }
#toast { position: absolute; left: 50%; transform: translateX(-50%); top: calc(10px + var(--safe-t)); width: max-content; max-width: 92vw; z-index: 30; display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; }
.toast { background: rgba(255, 255, 255, .97); color: var(--navy); border-radius: 14px; padding: 9px 16px; box-shadow: 0 8px 22px rgba(0, 0, 0, .35), 0 0 0 2px var(--gold); font-size: 14px; animation: tIn .3s ease both; max-width: 90vw; text-align: center; }
@keyframes tIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.stamp { position: absolute; left: 50%; top: 42%; z-index: 25; font-family: 'Cinzel', Georgia, serif; font-weight: 900; font-size: clamp(54px, 16vw, 120px); color: #fff; -webkit-text-stroke: 3px #9a1a14; text-shadow: 0 6px 0 #9a1a14, 0 12px 30px rgba(0, 0, 0, .5); transform: translate(-50%, -50%) rotate(-8deg); animation: stamp 1.6s cubic-bezier(.2, 1.6, .4, 1) both; pointer-events: none; }
@keyframes stamp { 0% { opacity: 0; transform: translate(-50%, -50%) rotate(-8deg) scale(2.4); } 18% { opacity: 1; transform: translate(-50%, -50%) rotate(-8deg) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -50%) rotate(-8deg) scale(1); } }
#fx { position: absolute; inset: 0; pointer-events: none; z-index: 24; }
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
.trophy { display: flex; align-items: center; gap: 12px; padding: 10px 12px; }
.trophy .ic { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 22px; background: #e9eff8; flex: none; }
.trophy.got .ic { background: radial-gradient(circle at 35% 30%, #fff3c8, #e8b84a); box-shadow: 0 0 0 2px #b8862a; }
.trophy:not(.got) { opacity: .6; }
.lb-row { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-bottom: 1px solid #e3e9f3; }
.lb-row.me { background: #fff6d8; border-radius: 10px; }
.lb-row .rk { width: 34px; text-align: right; font-family: 'Cinzel', Georgia, serif; color: #b8862a; }
.lb-row .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coll-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.coll { padding: 8px; cursor: pointer; text-align: center; position: relative; }
.coll img, .coll canvas { width: 100%; border-radius: 10px; display: block; aspect-ratio: 16/11; object-fit: cover; background: #0d3a78; }
.coll .cn { font-size: 13px; margin-top: 6px; }
.coll.sel { box-shadow: 0 0 0 3px #2fe39a, 0 8px 20px rgba(0, 0, 0, .3); }
.coll.locked { opacity: .55; }
.coll.locked::after { content: "🔒"; position: absolute; top: 12px; right: 14px; font-size: 18px; }
.lesson-box { position: absolute; z-index: 9; left: 50%; transform: translateX(-50%); width: min(520px, calc(100% - 24px)); }
@media (prefers-reduced-motion: reduce) { .screen.on, .dlg, .toast { animation: none; } }
/* title: footer pill and landscape layout */
.family { background: rgba(6, 30, 66, .78); border-radius: 14px; padding: 6px 14px; box-shadow: 0 0 0 1.5px rgba(225, 178, 78, .7); }
@media (orientation: landscape) and (max-height: 600px) {
  #scr-title.on { display: grid; grid-template-columns: 1.1fr 1fr; grid-template-rows: auto 1fr auto; column-gap: 24px; align-items: center; justify-items: center; }
  #scr-title .logo { grid-column: 1; grid-row: 1; margin-top: 0; }
  #scr-title .logo h1 { font-size: clamp(34px, 7.5vh + 2vw, 64px); }
  #scr-title .host { grid-column: 1; grid-row: 2; }
  #scr-title .host img { width: clamp(80px, 24vh, 130px); }
  #scr-title .menu-btns { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  #scr-title .menu-btns .btn { height: 50px; }
  #scr-title .family { grid-column: 1 / span 2; grid-row: 3; }
}
#app.ingame #toast { top: 41%; }
/* landscape game HUD (mock-up 4a): narrow side cards, stacked rows */
#app.land #oppCard { flex-direction: column; align-items: flex-start; gap: 8px; }
#app.land #oppCard > .grow { display: none; }
#app.land #oppCard .ohead { display: flex; align-items: center; gap: 10px; }
#app.land #oppCard .chips { align-items: flex-start; }
#app.land .pcard .medal, #app.land .pcard > .av, #app.land #oppCard .ohead .av { width: 46px !important; height: 46px !important; }
#app.land .pcard .nm { font-size: 17px; }
#app.land .pcard .st { font-size: 12px; }
#app.land #meCard .top { flex-wrap: wrap; row-gap: 8px; }
#app.land #meCard .top .grow { flex: 1 1 calc(100% - 56px); min-width: 0; }
#app.land #meCard .mini-dice { margin-right: auto; }
#app.land #meCard .acts { flex-wrap: wrap; }
#app.land #meCard .acts .btn { height: 46px; font-size: 16px; }
#app.land #meCard .acts .btn.go { flex: 1 1 100%; }
.ohead { display: none; }
#app.land #oppCard > .medal:first-child, #app.land #oppCard > .av:first-child { display: none; }
#app.land #meCard .acts #btnUndo { flex: 1 1 0; min-width: 0; }
#app.land #meCard .acts #btnDouble { flex: 0 0 50px !important; }
/* short landscape screens: keep dialogs compact so the button is never pushed off */
@media (max-height: 520px) {
  .dlg { padding: 12px 16px 12px; }
  .dlg .medal { width: 64px; height: 64px; margin: 2px auto 2px; }
  .dlg h2 { font-size: 28px; }
  .dlg .kicker { margin-bottom: 2px; }
  .dlg ul { margin: 2px 0 6px !important; line-height: 1.35 !important; }
}
/* polish pass 1: segment labels never cut; notes that sit on the background get their own readable panel */
.seg button { flex: 1 1 auto; min-width: max-content; padding: 9px 10px; }
.pagebody > .note, .pagebody > p.note { background: rgba(8, 30, 70, .82); color: #eaf1ff; border-radius: 12px; padding: 10px 14px; border: 1px solid rgba(232, 196, 104, .55); }
.pagebody > .note a, .pagebody > p.note a { color: var(--gold2); }
#scr-quick .coll-grid { grid-template-columns: repeat(auto-fill, minmax(78px, 92px)); }
#scr-quick .coll img.medal { width: 54px; height: 54px; aspect-ratio: 1; margin: 0 auto; background: none; border-radius: 50%; }
#app #toast.over-modal { top: calc(8px + var(--safe-t)); }
/* dialog buttons wrap instead of spilling out on narrow phones */
.dlg .btn { white-space: normal; height: auto; min-height: 50px; padding: 8px 14px; line-height: 1.15; text-align: center; }
.dlg .acts .btn { min-width: 0; flex: 1 1 130px; }
@media (max-width: 400px) { .dlg .btn { font-size: 15px; letter-spacing: 0; } }
