:root {
  --bg: #151a10; --panel: #232a1b; --panel2: #2d3622; --line: #45532f; --text: #f6f3e4; --mute: #b0b096;
  --me: #2f7dff; --foe: #f2413a; --gold: #ffd23f; --violet: #e2741c; --ok: #7bd34f;
  --ink: #141a0c; --scrim: rgba(12,15,8,0.84);
  --st: env(safe-area-inset-top, 0px); --sb: env(safe-area-inset-bottom, 0px);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --tabh: 56px;
  --r-common: #9aa3ad; --r-rare: #4d8ef0; --r-epic: #a05cff; --r-legendary: #ffd23f;
}
html.hud-large { font-size: 112%; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--font); overscroll-behavior: none; }
body { overflow: hidden; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
button { font: inherit; color: inherit; }
a { color: #7fb2ff; text-decoration: none; }
[hidden] { display: none !important; }
#safe { position: fixed; inset: 0; padding-top: var(--st); padding-bottom: var(--sb); pointer-events: none; visibility: hidden; }
#cv { position: fixed; inset: 0; touch-action: none; display: block; }
svg { fill: currentColor; }

/* ---------- start ---------- */
.screen { position: fixed; inset: 0; display: flex; flex-direction: column;
  background: linear-gradient(180deg, rgba(21,26,16,0.62) 0%, rgba(21,26,16,0.22) 38%, rgba(21,26,16,0.5) 70%, rgba(21,26,16,0.9) 100%); }
#bgcv { position: fixed; inset: 0; display: block; opacity: 0.9; pointer-events: none; }
body.ingame #bgcv { visibility: hidden; }
body.ingame .demo-pill { display: none; }
.hub { flex: 1; min-height: 0; width: 100%; max-width: 440px; margin: 0 auto; display: flex; flex-direction: column; padding: calc(var(--st) + 8px) 16px 0; }
.pane { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.pane-scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; display: flex; flex-direction: column; gap: 12px; padding: 4px 0 26px; }
.demo-pill { position: absolute; z-index: 2; left: 4px; top: -16px; font-size: 10px; font-weight: 900; letter-spacing: 0.12em;
  padding: 4px 10px; border-radius: 999px; background: rgba(20,26,12,0.72); color: #e9e4c8; border: 1px solid rgba(255,255,255,0.14); pointer-events: none; }
body.tab-other .demo-pill { display: none; }
body.tab-other .screen { background: radial-gradient(120% 70% at 50% 0%, #2a3420 0%, #151a10 70%); }

/* animaties: alleen transform/opacity */
.rise { opacity: 0; transform: translateY(18px); animation: rise 0.6s cubic-bezier(.2,.8,.2,1) var(--d, 0ms) forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }
.btn.shine { position: relative; overflow: hidden; }
.btn.shine::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 40%; background: linear-gradient(100deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.45) 50%, rgba(255,255,255,0) 100%);
  transform: translateX(-160%); animation: shine 3.4s ease-in-out infinite; will-change: transform; pointer-events: none; }
@keyframes shine { 0%, 55% { transform: translateX(-160%); } 100% { transform: translateX(330%); } }
/* puls: glow in een pseudo-element, alleen opacity animeren */
.pulse { position: relative; }
.pulse::before { content: ""; position: absolute; inset: -6px; border-radius: inherit; box-shadow: 0 0 30px 6px rgba(255,190,40,0.55); opacity: 0; animation: glow 2.6s ease-in-out infinite; pointer-events: none; }
@keyframes glow { 0%, 100% { opacity: 0; } 50% { opacity: 1; } }
.sheet h1 { animation: slam 0.55s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes slam { from { transform: scale(2.2); opacity: 0; } to { transform: none; opacity: 1; } }
.pop { display: inline-block; animation: popin 0.45s cubic-bezier(.2,1.6,.4,1) var(--d, 0ms) both; }
@keyframes popin { from { transform: scale(0); opacity: 0; } to { transform: none; opacity: 1; } }
.spinner i { box-shadow: 0 0 18px rgba(255,210,63,0.3); }

/* ---------- topbalk ---------- */
.topbar { display: flex; align-items: center; gap: 8px; min-height: 52px; flex: none; }
.me { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; min-height: 44px; }
.lvring { --p: 0; position: relative; flex: none; width: 48px; height: 48px; border-radius: 50%; padding: 3px;
  background: conic-gradient(var(--gold) calc(var(--p) * 1turn), rgba(255,255,255,0.14) 0); }
.avatar { width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 19px; color: #fff;
  background: linear-gradient(135deg, #5c9bff, #1b4fb5); box-shadow: inset 0 -3px 0 rgba(0,0,0,0.3); border: 2px solid var(--ink); }
.lvnum { position: absolute; right: -4px; bottom: -4px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px; background: var(--gold); color: #3a2504; font-size: 12px; font-weight: 900; display: grid; place-items: center; border: 2px solid var(--ink); }
.me-txt { display: flex; flex-direction: column; min-width: 0; }
.me-txt b { font-size: 16px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 2px 0 rgba(0,0,0,0.5); }
.me-txt small { font-size: 12px; color: #e3dcb0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lgpill { display: flex; align-items: center; gap: 4px; flex: none; min-height: 44px; padding: 2px 10px 2px 4px; border-radius: 14px; border: 2px solid var(--ink);
  background: linear-gradient(180deg, rgba(52,63,37,0.95), rgba(33,40,24,0.95)); cursor: pointer; }
.lgpill canvas { width: 28px; height: 28px; }
.lgpill span { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.05; }
.lgpill b { color: var(--gold); font-size: 16px; font-weight: 900; font-variant-numeric: tabular-nums; }
.lgpill small { font-size: 11px; color: var(--mute); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 800; }
.medals { display: flex; align-items: center; gap: 4px; flex: none; font-weight: 900; font-size: 14px; padding: 0 4px; }
.medal-ic { width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff3b0, #ffc21a 55%, #b37708); border: 2px solid var(--ink); display: inline-block; }
.gear { width: 44px; height: 44px; flex: none; border-radius: 12px; border: 2px solid var(--ink); background: linear-gradient(180deg, #4f5d39, #343f25); display: grid; place-items: center; cursor: pointer; padding: 0; }
.gear svg { width: 22px; height: 22px; }

/* ---------- arena-kaart ---------- */
.arena-card { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; max-height: 26vh; flex: none; border-radius: 18px; overflow: hidden; padding: 0; cursor: pointer;
  border: 3px solid var(--ink); box-shadow: 0 4px 0 #0e1208; background: #3d5222; }
.arena-card canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.arena-info { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 12px 10px; display: flex; flex-direction: column; gap: 2px; text-align: left;
  background: linear-gradient(180deg, rgba(14,18,8,0) 0%, rgba(14,18,8,0.88) 60%); }
.arena-info b { font-size: 18px; font-weight: 900; text-shadow: 0 2px 0 rgba(0,0,0,0.6); }
.arena-info small { font-size: 12.5px; color: #e9e4c8; font-weight: 700; }
.bar { display: block; height: 8px; border-radius: 4px; background: rgba(0,0,0,0.45); overflow: hidden; margin-top: 4px; border: 1px solid rgba(0,0,0,0.5); }
.bar i { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(var(--w, 0)); background: linear-gradient(90deg, #ffcf3a, #ffe98a); border-radius: 4px; transition: transform 0.6s cubic-bezier(.2,.8,.2,1); }
.bar.xp i { background: linear-gradient(90deg, #4d8ef0, #8fc0ff); }

/* ---------- daily ops ---------- */
.ops { background: linear-gradient(180deg, rgba(45,54,34,0.94), rgba(30,37,22,0.94)); border: 2px solid var(--ink); border-radius: 18px; padding: 10px 12px; flex: none; }
.ops-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.ops-head b { font-size: 14px; font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.ops-head small { margin-left: auto; color: var(--mute); font-size: 11.5px; font-weight: 700; white-space: nowrap; }
@media (max-width: 380px) { .ops-head small .at { display: none; } }
.pips { display: flex; gap: 3px; }
.pips i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.15); }
.pips i.on { background: var(--gold); }
.op { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; padding: 6px 0; border-top: 1px solid rgba(255,255,255,0.07); }
.op:first-child { border-top: 0; }
.op .t { font-size: 13.5px; font-weight: 800; }
.op .r { font-size: 11.5px; color: var(--mute); font-weight: 700; }
.op .bar { grid-column: 1; height: 6px; margin: 0; }
.op .act { grid-row: 1 / span 2; grid-column: 2; display: flex; gap: 6px; align-items: center; }
.op.done .t { color: var(--ok); }
.op.claimed { opacity: 0.55; }
.btn.claim { position: relative; }
.btn.claim::before { content: ""; position: absolute; inset: -4px; border-radius: inherit; box-shadow: 0 0 18px 4px rgba(255,210,63,0.7); opacity: 0; animation: glow 1.6s ease-in-out infinite; pointer-events: none; }
.reroll { width: 44px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel2); cursor: pointer; font-weight: 900; }

/* ---------- dock ---------- */
.dock { flex: none; position: relative; display: flex; flex-direction: column; gap: 8px; padding: 10px 0 8px; }
.fw-chip { position: absolute; top: 0; right: 10px; z-index: 2; background: var(--foe); color: #fff; font-size: 11px; font-weight: 900; letter-spacing: 0.06em; padding: 4px 8px; border-radius: 8px; border: 2px solid var(--ink); transform: rotate(3deg); }
.dock #btnPlay { min-height: 72px; }
.dock-sub { position: absolute; right: 0; top: -40px; z-index: 2; gap: 6px; }
.dock-sub .btn.sm { min-height: 36px; padding: 6px 12px; font-size: 12.5px; background: rgba(20,26,12,0.85); box-shadow: none; border-width: 1px; }
.dock-sub .btn.sm::after { content: ""; position: absolute; inset: -6px 0; }
.dock-sub .btn.sm { position: relative; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }
.row.three .btn { min-height: 52px; padding: 10px 6px; font-size: 14.5px; }
.col { display: flex; flex-direction: column; gap: 10px; }
.foot { display: flex; justify-content: space-between; gap: 6px 10px; font-size: 12px; color: var(--mute); flex-wrap: wrap; padding-top: 2px; }
.foot a { color: #d8d2ae; }
.lfg { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; border-radius: 14px; background: rgba(47,125,255,0.2); border: 2px solid rgba(47,125,255,0.55); font-weight: 800; font-size: 13.5px; flex: none; animation: pop 0.2s ease; }
.lfg span { flex: 1; min-width: 0; }
.invite-chip { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 12px; border-radius: 14px; background: rgba(255,210,63,0.14); border: 2px solid rgba(255,210,63,0.5); font-weight: 800; font-size: 13.5px; flex: none; }
.invite-chip span { flex: 1; min-width: 0; font-variant-numeric: tabular-nums; }

/* ---------- tabbalk ---------- */
.tabbar { flex: none; display: flex; justify-content: center; height: calc(var(--tabh) + var(--sb)); padding-bottom: var(--sb); background: rgba(16,20,10,0.94); border-top: 2px solid var(--ink); position: relative; z-index: 3; }
.tabbar button { position: relative; flex: 1; max-width: 88px; min-height: 44px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; background: none; border: 0; cursor: pointer; color: #9a9c80; font-size: 10.5px; font-weight: 800; letter-spacing: 0.04em; }
.tabbar button svg { width: 24px; height: 24px; }
.tabbar button.on { color: var(--gold); }
.tabbar .dot { position: absolute; top: 6px; right: calc(50% - 18px); width: 10px; height: 10px; border-radius: 50%; background: var(--foe); border: 2px solid var(--ink); }
body.op-mode .tabbar, body.op-mode .arena-card, body.op-mode .ops, body.op-mode #dockRow, body.op-mode #btnPlay, body.op-mode .lgpill, body.op-mode .medals, body.op-mode .fw-chip { display: none !important; }

/* ---------- knoppen ---------- */
.btn { border: 2px solid var(--ink); background: linear-gradient(180deg, #4f5d39, #343f25); border-radius: 14px; padding: 14px 12px; font-weight: 900; font-size: 15px; cursor: pointer; min-height: 44px;
  box-shadow: 0 4px 0 #0e1208, inset 0 1px 0 rgba(255,255,255,0.18); text-shadow: 0 2px 0 rgba(0,0,0,0.45);
  transition: transform 0.08s ease, box-shadow 0.08s; touch-action: manipulation; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #0e1208, inset 0 1px 0 rgba(255,255,255,0.18); }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn.primary { background: linear-gradient(180deg, #ffe27a 0%, #ffc21a 55%, #ef9d0a 100%); border: 2px solid #5a3a04; color: #3a2504; text-shadow: 0 1px 0 rgba(255,255,255,0.5); box-shadow: 0 5px 0 #8a5a06, 0 10px 24px rgba(255,180,30,0.25), inset 0 2px 0 rgba(255,255,255,0.6); }
.btn.primary:active { box-shadow: 0 2px 0 #8a5a06, inset 0 2px 0 rgba(255,255,255,0.6); }
.btn.big { padding: 12px 18px; font-size: 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; letter-spacing: 0.04em; }
.btn.big small { font-size: 12.5px; font-weight: 700; opacity: 0.85; letter-spacing: 0; }
.btn.ghost { background: linear-gradient(180deg, rgba(60,72,42,0.92), rgba(40,48,28,0.92)); }
.btn.sm { padding: 8px 12px; font-size: 13.5px; min-height: 44px; flex: none; }
.btn.danger { color: #ff8a80; }
.btn.offline { background: linear-gradient(180deg, #5a5f52, #3c4036); color: #e2e2d2; border-color: var(--ink); text-shadow: none; box-shadow: 0 4px 0 #0e1208; }
.btn.blue { background: linear-gradient(180deg, #6aa6ff, #2f7dff 60%, #1d58c4); color: #fff; border-color: #0d2a66; box-shadow: 0 5px 0 #0d2a66, inset 0 2px 0 rgba(255,255,255,0.4); }
.linkbtn { background: none; border: 0; color: #d8d2ae; font-weight: 800; text-decoration: underline; cursor: pointer; min-height: 44px; }
.hint { color: var(--mute); font-size: 13px; line-height: 1.45; margin: 8px 0 0; }
.mute { color: var(--mute); }

/* ---------- casino ---------- */
.opbox { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 14px; flex: none; }
.opbal { display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; }
.opbal b { font-size: 22px; color: var(--gold); }
.stakes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 10px; }
.stakes .btn { padding: 14px 8px; }
.stakes .btn b { display: block; font-size: 20px; }
.stakes .btn small { color: var(--mute); font-weight: 600; }
.stakes .btn.primary small { color: rgba(58,37,4,0.85); }

/* ---------- vellen (wachtrij, uitslag) ---------- */
.sheet { position: fixed; inset: 0; display: grid; place-items: center; padding: calc(var(--st) + 16px) 16px calc(var(--sb) + 16px); background: var(--scrim); z-index: 20; overflow-y: auto; }
.sheet-card { width: 100%; max-width: 380px; background: linear-gradient(180deg, #3a4529, #222a18); border: 3px solid #c9951e; box-shadow: 0 0 0 3px #3a2504, 0 20px 60px rgba(0,0,0,0.55);
  border-radius: 24px; padding: 22px 18px 18px; text-align: center; animation: pop 0.22s ease; position: relative; }
.sheet-card.sober { border-color: #8f9a7c; box-shadow: 0 0 0 3px #22281a, 0 20px 60px rgba(0,0,0,0.5); }
@keyframes pop { from { transform: scale(0.94); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet h1 { margin: 0; font-size: 44px; font-weight: 900; letter-spacing: 0.04em; }
.sheet h2 { margin: 12px 0 4px; font-size: 22px; }
.timer { font-size: 30px; font-weight: 900; margin: 8px 0 4px; font-variant-numeric: tabular-nums; }
.spinner { position: relative; width: 64px; height: 64px; margin: 2px auto 0; }
.spinner i { position: absolute; inset: 0; border-radius: 50%; border: 4px solid transparent; border-top-color: var(--gold); animation: spin 1s linear infinite; }
.spinner i + i { inset: 10px; border-top-color: transparent; border-bottom-color: var(--foe); animation-duration: 1.4s; animation-direction: reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn.warm { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 18px; }
.btn.warm small { font-size: 12px; font-weight: 700; opacity: 0.85; }
.stake-amt { font-size: 34px; font-weight: 900; color: var(--gold); margin: 4px 0; }
.win { color: #6fb0ff; text-shadow: 0 3px 0 #0d2a66, 0 0 24px rgba(47,125,255,0.5); }
.loss { color: #ff6b5e; text-shadow: 0 3px 0 #5a0e0a, 0 0 24px rgba(242,65,58,0.4); }
.draw { color: var(--gold); }

/* ---------- uitslag ---------- */
.result .sheet-card { max-width: 400px; padding: 18px 16px 16px; }
.r-stars { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 10px 0 4px; }
.r-side { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.r-side b { font-size: 13px; font-weight: 900; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-side.me b { color: #8fc0ff; } .r-side.foe b { color: #ff9a90; }
.r-vs { color: var(--mute); font-weight: 900; font-size: 15px; }
.stars3 { display: flex; gap: 4px; align-items: flex-end; }
.star { width: 30px; height: 30px; background: rgba(0,0,0,0.4); clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.star.mid { width: 38px; height: 38px; }
.star.on { background: linear-gradient(180deg, #fff3a8, #ffd23f 50%, #e09a0c); animation: starpop 0.42s cubic-bezier(.2,1.7,.4,1) both; animation-delay: var(--d, 0ms); }
.r-side.foe .star.on { background: linear-gradient(180deg, #ffd0c8, #ff7a66 50%, #c8392c); }
@keyframes starpop { 0% { transform: scale(0) rotate(-40deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
.r-story { font-weight: 800; font-size: 15px; margin: 6px 0 2px; color: #fff2c0; min-height: 20px; }
.r-reason { font-size: 13px; color: var(--mute); margin: 0 0 6px; }
.r-rows { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; text-align: left; }
.r-row { background: rgba(10,14,6,0.45); border-radius: 12px; padding: 8px 10px; animation: rise 0.4s ease both; animation-delay: var(--d, 0ms); }
.r-row .h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-weight: 900; font-size: 14px; }
.r-row .h small { color: var(--mute); font-weight: 700; font-size: 12px; }
.r-row .big { font-size: 22px; color: var(--gold); font-variant-numeric: tabular-nums; }
.chip { display: inline-block; padding: 2px 8px; border-radius: 8px; font-size: 12.5px; font-weight: 900; border: 2px solid var(--ink); }
.chip.up { background: #2f7dff; color: #fff; } .chip.down { background: #8c2a24; color: #fff; } .chip.gold { background: var(--gold); color: #3a2504; }
.r-row .mission { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 800; margin-top: 4px; }
.r-row .mission > span:first-child { flex: 1; min-width: 0; }
#rmBtn { padding-left: 44px; padding-right: 44px; }
.stamp { display: inline-block; color: var(--ok); border: 2px solid var(--ok); border-radius: 6px; padding: 0 5px; font-size: 11px; font-weight: 900; transform: rotate(-8deg); animation: stamp 0.35s cubic-bezier(.2,1.8,.4,1) both; animation-delay: var(--d, 0ms); }
@keyframes stamp { from { transform: scale(2.4) rotate(-8deg); opacity: 0; } to { transform: rotate(-8deg); opacity: 1; } }
.levelup { color: var(--gold); font-weight: 900; animation: popin 0.5s cubic-bezier(.2,1.6,.4,1) both; animation-delay: var(--d, 0ms); }
.flame { display: inline-block; width: 16px; height: 22px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: radial-gradient(circle at 50% 70%, #fff3a0 0 20%, #ffb02e 40%, #e8451c 75%); vertical-align: middle; }
.flame.ash { background: radial-gradient(circle at 50% 70%, #9a9a9a 0 30%, #555 70%); }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0; }
.tile { background: rgba(10,14,6,0.45); border-radius: 12px; padding: 8px 6px; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; min-width: 0; }
.tile b { font-size: 18px; font-weight: 900; color: var(--gold); }
.tile small { font-size: 11px; color: var(--mute); font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }
.tile canvas { width: 36px; height: 36px; }
.coach { background: rgba(47,125,255,0.14); border: 1px solid rgba(47,125,255,0.4); border-radius: 12px; padding: 8px 10px; font-size: 13px; text-align: left; margin: 6px 0; }
.coach b { color: #8fc0ff; }
.r-ctas { display: flex; flex-direction: column; gap: 8px; margin: 10px -16px -16px; padding: 10px 16px 16px; position: sticky; bottom: -16px; z-index: 2;
  background: linear-gradient(180deg, rgba(34,42,24,0) 0%, #222a18 18%); border-radius: 0 0 21px 21px; }
.r-ctas .row .btn { padding: 10px 6px; font-size: 13.5px; }
.rm-wrap { position: relative; }
.rm-ring { position: absolute; right: 10px; top: 50%; width: 26px; height: 26px; margin-top: -13px; border-radius: 50%; --p: 1;
  background: conic-gradient(#3a2504 calc(var(--p) * 1turn), rgba(58,37,4,0.18) 0); -webkit-mask: radial-gradient(circle, transparent 7px, #000 8px); mask: radial-gradient(circle, transparent 7px, #000 8px); }
.series { font-weight: 900; color: var(--gold); font-size: 13px; letter-spacing: 0.08em; }
.queued-strip { font-size: 12.5px; color: #e9e4c8; font-weight: 800; margin-top: 8px; }
.result.skip *, .result.skip *::before { animation-duration: 0.01ms !important; animation-delay: 0ms !important; transition-duration: 0.01ms !important; }

/* ---------- nieuwe league ---------- */
.lgup { position: fixed; inset: 0; z-index: 35; background: #0e1208; display: flex; align-items: flex-end; justify-content: center; }
.lgup canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.lgup-ui { position: relative; text-align: center; padding: 0 16px calc(var(--sb) + 28px); width: 100%; max-width: 420px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.lgup-kicker { margin: 0; font-weight: 900; letter-spacing: 0.18em; font-size: 12px; color: #e9e4c8; }
.lgup h1 { margin: 0; font-size: 40px; font-weight: 900; color: var(--gold); text-shadow: 0 3px 0 #3a2504; }
.lgup .btn.primary { width: 100%; }

/* ---------- in het spel ---------- */
#ingame { position: fixed; inset: 0; pointer-events: none; z-index: 10; }
.hud-btn { pointer-events: auto; position: absolute; top: calc(var(--st) + 4px); right: 12px; width: 44px; height: 44px; border-radius: 12px; padding: 0;
  border: 2px solid var(--ink); background: rgba(30,37,22,0.86); cursor: pointer; display: none; place-items: center; color: #f6f3e4; }
.hud-btn svg { width: 22px; height: 22px; }
.replay-ctl { pointer-events: auto; position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(var(--sb) + 8px); display: flex; gap: 6px; }
.replay-ctl .btn { padding: 8px 12px; font-size: 13px; min-width: 44px; }
.replay-end { pointer-events: auto; position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; background: rgba(12,15,8,0.6); }

/* ---------- modaal ---------- */
.modal { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: calc(var(--st) + 16px) 16px calc(var(--sb) + 16px); background: var(--scrim); }
.modal-card { position: relative; width: 100%; max-width: 440px; max-height: calc(100dvh - 32px - var(--st) - var(--sb)); overflow-y: auto; overflow-x: hidden; background: linear-gradient(180deg, #2d3622, #1e2516); border: 2px solid #c9951e; border-radius: 22px; padding: 20px 16px 16px; animation: pop 0.2s ease; -webkit-user-select: text; user-select: text; }
.modal h2 { margin: 0 52px 12px 0; font-size: 22px; }
.modal h3 { margin: 18px 0 8px; font-size: 14px; color: var(--mute); text-transform: uppercase; letter-spacing: 0.08em; }
.modal p, .modal li { line-height: 1.5; color: #e2dfc8; font-size: 14.5px; }
.modal ol, .modal ul { padding-left: 20px; margin: 6px 0; }
.close { position: absolute; top: 8px; right: 8px; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel2); cursor: pointer; font-size: 16px; z-index: 2; }
.field { width: 100%; padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; font-size: 17px; font-weight: 700; margin: 6px 0 12px; -webkit-user-select: text; user-select: text; }
.field.code-in { text-transform: uppercase; letter-spacing: 0.3em; text-align: center; font-size: 26px; font-weight: 900; }
.err { color: #ff8a80; font-size: 13px; min-height: 18px; margin: 0 0 8px; }
.board { list-style: none; padding: 0 !important; margin: 0; }
.board li { display: grid; grid-template-columns: 34px 1fr auto auto; gap: 10px; align-items: center; padding: 6px 6px; border-bottom: 1px solid var(--line); font-size: 14px; min-height: 44px; cursor: pointer; }
.board li.me { background: rgba(255,210,63,0.12); border-radius: 10px; }
.board li.pin { position: sticky; bottom: 0; background: #2d3622; border: 2px solid var(--gold); border-radius: 12px; }
.board .rk { color: var(--mute); font-weight: 800; }
.board .nm { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board .rt { color: var(--gold); font-weight: 900; font-variant-numeric: tabular-nums; }
.board .wl { color: var(--mute); font-size: 12px; }
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.cardinfo { display: flex; gap: 10px; align-items: center; background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.cardinfo canvas { width: 40px; height: 40px; flex: none; }
.cardinfo b { display: block; font-size: 13.5px; }
.cardinfo span { display: block; font-size: 11.5px; color: var(--mute); line-height: 1.35; }
.linkbox { display: flex; gap: 8px; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-weight: 700; word-break: break-all; font-size: 14px; margin: 10px 0; }
.code { font-size: 34px; font-weight: 900; letter-spacing: 0.18em; text-align: center; color: var(--gold); margin: 8px 0; }
.seg { display: flex; background: rgba(0,0,0,0.3); border-radius: 12px; padding: 3px; margin: 0 0 12px; }
.seg button { flex: 1; min-height: 44px; border: 0; border-radius: 10px; background: none; font-weight: 900; cursor: pointer; color: var(--mute); }
.seg button.on { background: var(--panel2); color: var(--text); box-shadow: inset 0 1px 0 rgba(255,255,255,0.12); }
.lvl { display: grid; grid-template-columns: 1fr auto; align-items: center; text-align: left; }
.lvl small { color: inherit; opacity: 0.8; font-weight: 700; }
.lvl .rec { font-size: 11px; font-weight: 900; letter-spacing: 0.06em; }

/* instellingen */
.set { display: flex; align-items: center; gap: 10px; min-height: 48px; border-bottom: 1px solid rgba(255,255,255,0.07); }
.set > span { flex: 1; font-weight: 800; font-size: 14.5px; }
.set > span small { display: block; color: var(--mute); font-weight: 600; font-size: 12px; }
.set input[type=range] { flex: 0 0 46%; accent-color: var(--gold); height: 32px; }
.set select { min-height: 40px; border-radius: 10px; background: var(--bg); color: var(--text); border: 1px solid var(--line); font: inherit; font-weight: 800; padding: 0 8px; }
.tog { position: relative; width: 52px; height: 32px; flex: none; border-radius: 16px; border: 2px solid var(--ink); background: #4a4f40; cursor: pointer; padding: 0; }
.tog::after { content: ""; position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%; background: #e9e4c8; transition: transform 0.15s; }
.tog[aria-checked="true"] { background: #5d9a32; }
.tog[aria-checked="true"]::after { transform: translateX(20px); }
.acct .btn { width: 100%; margin-top: 8px; }
.ver { color: var(--mute); font-size: 12px; margin-top: 14px; text-align: center; }
.recov { font-family: ui-monospace, Menlo, monospace; font-size: 22px; letter-spacing: 0.08em; text-align: center; color: var(--gold); background: var(--bg); border-radius: 12px; padding: 12px; margin: 8px 0; word-break: break-all; -webkit-user-select: all; user-select: all; }

/* ---------- training ---------- */
.tr-head { text-align: center; padding: 4px 0; }
.tr-head h2 { margin: 0; font-size: 22px; font-weight: 900; }
.tr-head p { margin: 2px 0 0; color: var(--mute); font-size: 13px; }
.path { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 8px 0 16px; }
.path::before { content: ""; position: absolute; left: 50%; top: 20px; bottom: 30px; width: 6px; margin-left: -3px; background: repeating-linear-gradient(180deg, rgba(255,255,255,0.25) 0 12px, transparent 12px 22px); border-radius: 3px; }
.node { position: relative; align-self: center; width: min(320px, 100%); display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: linear-gradient(180deg, rgba(52,63,37,0.96), rgba(33,40,24,0.96)); border: 2px solid var(--ink); box-shadow: 0 4px 0 #0e1208; cursor: pointer; text-align: left; min-height: 60px; }
.node:nth-child(odd) { transform: translateX(-18px); } .node:nth-child(even) { transform: translateX(18px); }
.node .num { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; background: var(--panel2); border: 2px solid var(--ink); flex: none; }
.node .nm { flex: 1; min-width: 0; }
.node .nm b { display: block; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.node .nm small { color: var(--mute); font-size: 12px; font-weight: 700; }
.node .ns { display: flex; gap: 2px; }
.node .ns .star { width: 16px; height: 16px; }
.node.next { border-color: var(--gold); }
.node.next .num { background: var(--gold); color: #3a2504; }
.node.locked { opacity: 0.5; }
.node.done .num { background: #5d9a32; }
.pb-card { text-align: center; }
.pb-card .sub { color: var(--gold); font-weight: 900; letter-spacing: 0.04em; }
.pb-card .tip { background: rgba(10,14,6,0.45); border-radius: 12px; padding: 10px; font-size: 13.5px; margin: 10px 0; }

/* ---------- armory / road / profiel ---------- */
.arm-prev { position: relative; height: 200px; border-radius: 18px; overflow: hidden; border: 3px solid var(--ink); background: #3d5222; flex: none; }
.arm-prev canvas { width: 100%; height: 100%; display: block; }
.slots { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; flex: none; scrollbar-width: none; }
.slots::-webkit-scrollbar { display: none; }
.slots button { flex: none; min-height: 40px; padding: 0 12px; border-radius: 10px; border: 2px solid var(--ink); background: var(--panel2); font-weight: 900; font-size: 12.5px; cursor: pointer; color: var(--mute); }
.slots button.on { background: var(--gold); color: #3a2504; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.item { position: relative; border-radius: 14px; padding: 8px 6px; min-height: 92px; background: rgba(10,14,6,0.55); border: 2px solid var(--rc, #9aa3ad); box-shadow: 0 0 12px -2px var(--rc, transparent); display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; text-align: center; min-width: 0; }
.item canvas { width: 48px; height: 48px; }
.item b { font-size: 11.5px; font-weight: 900; line-height: 1.2; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.item small { font-size: 10.5px; color: var(--mute); line-height: 1.2; }
.item.locked { filter: grayscale(1); opacity: 0.55; box-shadow: none; }
.item.eq::after { content: "EQUIPPED"; position: absolute; top: -9px; left: 50%; transform: translateX(-50%); background: var(--ok); color: #142008; font-size: 11px; font-weight: 900; padding: 1px 6px; white-space: nowrap; border-radius: 6px; }
.shop .item .price { color: var(--gold); font-weight: 900; font-size: 12.5px; display: flex; align-items: center; gap: 3px; }
.sec-h { display: flex; justify-content: space-between; align-items: baseline; margin-top: 6px; }
.sec-h b { font-size: 14px; font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase; }
.sec-h small { color: var(--mute); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.road { display: flex; flex-direction: column; gap: 8px; }
.road .rn { display: grid; grid-template-columns: 54px 1fr auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: rgba(10,14,6,0.45); border: 2px solid transparent; min-height: 52px; }
.road .rn.claimable { border-color: var(--gold); box-shadow: 0 0 14px -2px rgba(255,210,63,0.7); }
.road .rn.claimed { opacity: 0.55; }
.road .rn.future { opacity: 0.75; }
.road .rn .at { font-weight: 900; color: var(--gold); font-variant-numeric: tabular-nums; }
.road .rn.gate { background: rgba(255,210,63,0.1); }
.prof-ban { position: relative; height: 96px; border-radius: 16px; overflow: hidden; background: linear-gradient(135deg, #3a4a26, #1e2716); border: 2px solid var(--ink); flex: none; }
.prof-ban canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.prof-id { display: flex; align-items: center; gap: 12px; margin-top: -34px; padding: 0 10px; position: relative; }
.prof-id .lvring { width: 64px; height: 64px; }
.prof-id .nm { min-width: 0; padding-top: 30px; }
.prof-id .nm b { display: block; font-size: 19px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prof-id .nm small { color: #e3dcb0; font-weight: 700; }
.stats4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.hist { list-style: none; padding: 0; margin: 0; }
.hist li { display: grid; grid-template-columns: 26px 1fr auto auto; gap: 8px; align-items: center; min-height: 48px; border-bottom: 1px solid rgba(255,255,255,0.07); font-size: 13.5px; }
.hist .res { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font-weight: 900; font-size: 12px; }
.hist .res.w { background: #2f7dff; } .hist .res.l { background: #8c2a24; } .hist .res.d { background: #6b6b55; }
.hist .nm { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist .when { color: var(--mute); font-size: 12px; }
.banner-note { background: rgba(255,210,63,0.14); border: 2px solid rgba(255,210,63,0.5); border-radius: 14px; padding: 10px 12px; font-size: 13.5px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.banner-note span { flex: 1; }
.empty { color: var(--mute); text-align: center; padding: 30px 10px; font-size: 14px; }
.share-prev { width: 100%; max-width: 260px; border-radius: 12px; display: block; margin: 0 auto 10px; border: 2px solid var(--ink); }

.conn { position: fixed; z-index: 40; top: calc(var(--st) + 8px); left: 50%; transform: translateX(-50%); background: rgba(22,28,14,0.96); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 700; max-width: calc(100vw - 32px); text-align: center; }
.conn.scrim { top: 0; left: 0; right: 0; bottom: 0; transform: none; max-width: none; border-radius: 0; border: 0; background: rgba(12,15,8,0.55); display: grid; place-items: center; font-size: 16px; }
.note { position: fixed; z-index: 45; bottom: calc(var(--sb) + 76px); left: 50%; transform: translateX(-50%); background: rgba(22,28,14,0.97); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; font-size: 14px; font-weight: 700; max-width: calc(100vw - 32px); text-align: center; animation: pop 0.2s ease; }
.note.bad { border-color: var(--foe); color: #ffd6cf; }
.toasts { position: fixed; z-index: 46; top: calc(var(--st) + 60px); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 6px; width: min(360px, calc(100vw - 32px)); pointer-events: none; }
.toast { background: rgba(22,28,14,0.97); border: 2px solid var(--gold); border-radius: 14px; padding: 10px 12px; font-size: 13.5px; font-weight: 800; animation: pop 0.25s ease; display: flex; gap: 8px; align-items: center; }
.toast canvas { width: 32px; height: 32px; flex: none; }
@media (max-width: 420px) { .cards { grid-template-columns: 1fr; } }
@media (max-width: 360px) { .lgpill small { display: none; } .me-txt small { display: none; } .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-height: 700px) { .arena-card { max-height: 22vh; } body:not(.op-mode) .foot { display: none; } }
.sheet-card.sober h1 { animation: none; text-shadow: 0 2px 0 rgba(0,0,0,0.5); font-size: 36px; }

/* minder beweging (systeem of instelling) */
@media (prefers-reduced-motion: reduce) {
  .rise, .btn.shine::after, .pulse::before, .sheet h1, .pop, .star.on, .stamp, .levelup, .r-row, .btn.claim::before, .spinner i { animation: none !important; opacity: 1 !important; transform: none !important; }
  .btn.shine::after { display: none; }
}
html.reduce .rise, html.reduce .btn.shine::after, html.reduce .pulse::before, html.reduce .sheet h1, html.reduce .pop, html.reduce .star.on, html.reduce .stamp, html.reduce .levelup, html.reduce .r-row, html.reduce .btn.claim::before { animation: none !important; opacity: 1 !important; transform: none !important; }
html.reduce .btn.shine::after { display: none; }
