/* Kruimelrace: eigen stijl (speelgoed-helder: donkerblauw, geel, rood; dikke randen) */
:root { --bg: #14213d; --bg2: #1f2f55; --panel: #26386a; --panel2: #2f4480; --line: #44599a; --text: #f4f1e8; --muted: #b7c0da; --yellow: #ffd23f; --red: #ff5a5f; --green: #3ddc84; --blue: #4cc9f0; --purple: #b388ff; --orange: #ff9f1c; --radius: 14px; --shadow: 0 6px 0 rgba(0,0,0,.25); }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body { touch-action: manipulation; }   /* geen dubbeltik-zoom op iOS/Android */
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 16px/1.4 "Segoe UI", Roboto, Helvetica, Arial, sans-serif; overflow-x: hidden; }
body { background: radial-gradient(ellipse at top, #203766 0%, var(--bg) 60%); min-height: 100%; }
a { color: var(--blue); }
button { font: inherit; cursor: pointer; border: 0; border-radius: var(--radius); padding: 10px 16px; background: var(--panel2); color: var(--text); box-shadow: var(--shadow); transition: transform .08s; }
button:active { transform: translateY(3px); box-shadow: 0 3px 0 rgba(0,0,0,.25); }
button.primary { background: var(--yellow); color: #1a1a1a; font-weight: 700; }
button.danger { background: var(--red); color: #fff; }
button.ghost { background: transparent; box-shadow: none; border: 2px solid var(--line); }
button.small { padding: 6px 10px; font-size: 14px; }
button:disabled { opacity: .5; cursor: default; transform: none; }
.hidden { display: none !important; }
.muted { color: var(--muted); } .small { font-size: 13px; }
#app { max-width: 1100px; margin: 0 auto; padding: 0 12px 90px; }
#top { display: flex; align-items: center; gap: 12px; padding: 10px 0; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text); font-weight: 800; font-size: 22px; letter-spacing: .5px; }
.brand .flag { width: 26px; height: 20px; background: repeating-conic-gradient(#fff 0 25%, #111 0 50%) 0 0 / 10px 10px; border-radius: 4px; box-shadow: 0 2px 0 rgba(0,0,0,.4); }
#wallet { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
#wallet span { background: rgba(0,0,0,.25); border-radius: 20px; padding: 4px 12px; font-weight: 700; white-space: nowrap; cursor: pointer; }
#acct { display: flex; align-items: center; gap: 8px; }
#acct img { width: 32px; height: 32px; border-radius: 50%; }
#nav { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 14px; }
#nav button { padding: 8px 14px; background: var(--panel); display: flex; align-items: center; gap: 6px; }
#nav button.on { background: var(--yellow); color: #1a1a1a; }
#nav button .dot, .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--red); box-shadow: 0 0 6px var(--red); }
#foot { margin-top: 30px; font-size: 13px; color: var(--muted); text-align: center; }
#foot a { color: var(--muted); }
h1, h2, h3 { margin: 0 0 8px; } h2 { font-size: 24px; } h3 { font-size: 18px; }
.panel { background: var(--panel); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; box-shadow: var(--shadow); }
.notice { background: rgba(255,210,63,.15); border: 2px dashed var(--yellow); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 14px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.spread { justify-content: space-between; }
.card { background: var(--panel2); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); position: relative; display: flex; flex-direction: column; gap: 8px; }
.card.locked { opacity: .75; }
.card.selected { outline: 3px solid var(--yellow); }
.card .pic { height: 110px; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle, rgba(255,255,255,.12), transparent 70%); border-radius: 10px; }
.card .pic img { max-height: 100px; max-width: 100%; image-rendering: auto; filter: drop-shadow(0 6px 4px rgba(0,0,0,.4)); }
.card .pic canvas { max-height: 100px; }
.card .name { font-weight: 800; font-size: 18px; }
.rar { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 10px; display: inline-block; }
.rar.common { background: #8d99ae; color: #111; } .rar.rare { background: var(--blue); color: #111; } .rar.epic { background: var(--purple); color: #111; } .rar.legendary { background: var(--yellow); color: #111; } .rar.mythic { background: linear-gradient(90deg, #ff5a5f, #b388ff, #4cc9f0); color: #111; }
.stat { display: grid; grid-template-columns: 70px 1fr; gap: 6px; align-items: center; font-size: 13px; }
.stat .bar { height: 8px; background: rgba(0,0,0,.3); border-radius: 4px; overflow: hidden; } .stat .bar i { display: block; height: 100%; background: var(--green); }
.pill { background: rgba(0,0,0,.25); border-radius: 20px; padding: 3px 10px; font-size: 13px; white-space: nowrap; }
.modes { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.mode { background: var(--panel2); border-radius: var(--radius); padding: 14px; cursor: pointer; border: 3px solid transparent; }
.mode.on { border-color: var(--yellow); }
.mode .mname { font-weight: 800; font-size: 18px; }
.tracks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.track { background: var(--panel2); border-radius: var(--radius); padding: 10px; cursor: pointer; border: 3px solid transparent; }
.track.on { border-color: var(--yellow); } .track.locked { opacity: .55; cursor: default; }
.track .thumb { height: 70px; border-radius: 8px; margin-bottom: 6px; background-size: cover; background-position: center; }
.playbar { position: sticky; bottom: 10px; display: flex; gap: 10px; align-items: center; background: var(--panel); padding: 10px 14px; border-radius: var(--radius); box-shadow: 0 8px 20px rgba(0,0,0,.4); z-index: 5; flex-wrap: wrap; }
.playbar .big { font-size: 20px; padding: 14px 28px; flex: 1; }
.tiers { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.tier { background: var(--panel2); border-radius: 10px; padding: 8px; font-size: 13px; text-align: center; }
.tier.reached { outline: 2px solid var(--green); } .tier .lbl { font-weight: 800; }
.road { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; }
.road .m { min-width: 110px; background: var(--panel2); border-radius: 10px; padding: 8px; text-align: center; font-size: 13px; }
.road .m.reached { outline: 2px solid var(--green); } .road .m.claimed { opacity: .6; }
.quest { display: flex; align-items: center; gap: 10px; background: var(--panel2); border-radius: 10px; padding: 10px; margin-bottom: 8px; }
.quest .bar { flex: 1; height: 10px; background: rgba(0,0,0,.3); border-radius: 5px; overflow: hidden; } .quest .bar i { display: block; height: 100%; background: var(--blue); }
table.board { width: 100%; border-collapse: collapse; } table.board td, table.board th { padding: 6px 8px; text-align: left; border-bottom: 1px solid var(--line); } table.board tr.me { background: rgba(255,210,63,.15); font-weight: 700; }
.tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; } .tabs button { background: var(--panel); } .tabs button.on { background: var(--yellow); color: #111; }
.chest-big { text-align: center; padding: 20px; }
.chest-big .chestpic { filter: drop-shadow(0 10px 8px rgba(0,0,0,.5)); animation: wobble 1.2s ease-in-out infinite; }   /* alleen het kistje zelf; pictogrammen in de kansen blijven klein */
@keyframes wobble { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
.loot { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.loot .it { background: var(--panel2); border-radius: 10px; padding: 10px 14px; animation: pop .4s ease-out both; font-weight: 700; }
@keyframes pop { from { transform: scale(0); } 70% { transform: scale(1.15); } to { transform: scale(1); } }
.form { display: flex; flex-direction: column; gap: 10px; }
input, select { font: inherit; padding: 10px 12px; border-radius: 10px; border: 2px solid var(--line); background: rgba(0,0,0,.25); color: var(--text); }
.err { color: var(--red); min-height: 1.2em; font-size: 14px; }
#modal { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 12px; padding-top: max(12px, env(safe-area-inset-top)); padding-bottom: max(12px, env(safe-area-inset-bottom)); overflow: auto; }
#modal-box { background: var(--panel); border-radius: var(--radius); padding: 20px; max-width: 560px; width: 100%; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); overflow: auto; box-shadow: 0 20px 40px rgba(0,0,0,.5); -webkit-overflow-scrolling: touch; }
@media (max-height: 700px), (max-width: 720px) { #modal { align-items: flex-start; } #modal-box { padding: 14px; margin: auto 0; } }   /* kleine schermen: venster bovenaan uitlijnen, nooit afsnijden; scrollt binnenin */
#modal-box .foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; }
#toasts { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 6px; pointer-events: none; }
.toast { background: #111; color: #fff; padding: 10px 16px; border-radius: 20px; box-shadow: 0 6px 16px rgba(0,0,0,.4); animation: pop .3s ease-out; max-width: 90vw; }
.toast.good { background: var(--green); color: #111; } .toast.bad { background: var(--red); } .toast.gold { background: var(--yellow); color: #111; }
.result h2 { font-size: 30px; } .result .rw { display: flex; gap: 8px; flex-wrap: wrap; } .result .rw span { background: var(--panel2); padding: 6px 12px; border-radius: 20px; font-weight: 700; }
.icon-img { height: 22px; vertical-align: middle; }
.nico { height: 26px; }
.skinrow { display: flex; gap: 6px; flex-wrap: wrap; } .skinrow button { padding: 6px 10px; font-size: 13px; } .skinrow button.on { outline: 2px solid var(--yellow); }
.help ol { padding-left: 20px; } .help li { margin-bottom: 6px; }
.lang button { padding: 6px 10px; } .lang button.on { background: var(--yellow); color: #111; }

/* ---- het spel ---- */
#game { position: fixed; inset: 0; background: #0b1022; z-index: 20; touch-action: none; overflow: hidden; user-select: none; }
#canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: crosshair; }
#hud { position: absolute; inset: 0; pointer-events: none; font-weight: 700; text-shadow: 0 2px 2px rgba(0,0,0,.7); }
.hud-top { position: absolute; top: max(8px, env(safe-area-inset-top)); left: 10px; right: 10px; display: flex; gap: 8px; align-items: center; }
.hud-box { background: rgba(0,0,0,.45); border-radius: 20px; padding: 4px 12px; font-size: 15px; }
#hud-pause { pointer-events: auto; margin-left: auto; padding: 4px 10px; font-size: 16px; background: rgba(0,0,0,.45); box-shadow: none; }
#minimap { position: absolute; top: 46px; right: 10px; background: rgba(0,0,0,.4); border-radius: 8px; width: 150px; height: 100px; }
.hud-bottom { position: absolute; bottom: max(14px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: min(360px, 60vw); }
.bars .bar { height: 14px; background: rgba(0,0,0,.5); border-radius: 7px; overflow: hidden; margin-top: 6px; position: relative; }
.bars .bar .fill { height: 100%; background: var(--green); transition: width .1s linear; }
.bars .bar.sup .fill { background: var(--yellow); } .bars .bar.sup span { position: absolute; inset: 0; text-align: center; font-size: 11px; line-height: 14px; color: #111; }
.bars .bar.sup.ready { box-shadow: 0 0 12px var(--yellow); }
#hud-msg { position: absolute; top: 28%; left: 0; right: 0; text-align: center; font-size: clamp(22px, 5vw, 44px); color: var(--yellow); pointer-events: none; }
#hud-msg.sub { font-size: clamp(16px, 3vw, 24px); color: #fff; }
#touch { position: absolute; inset: 0; pointer-events: none; }
#stick { position: absolute; left: 0; top: 0; bottom: 0; width: 55%; pointer-events: auto; }
/* rechtshandig: sturen met de rechterhand (joystick rechts), schieten en turbo links; linkshandig andersom */
#touch.hand-right #stick { left: auto; right: 0; }
#touch.hand-right .tbtn { right: auto; left: 22px; }
#touch.hand-right #btn-super { left: 32px; }
#stick-base { position: absolute; width: 130px; height: 130px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.18), rgba(255,255,255,.06)); border: 3px solid rgba(255,255,255,.45); box-shadow: 0 4px 14px rgba(0,0,0,.4); left: 50px; bottom: max(40px, env(safe-area-inset-bottom)); display: block; }
#stick-base.active { border-color: var(--yellow); background: radial-gradient(circle, rgba(255,210,63,.25), rgba(255,255,255,.08)); }
#touch.hand-right #stick-base { left: auto; right: 50px; }
#stick-knob { position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #fff, #b8c4e6); box-shadow: 0 3px 6px rgba(0,0,0,.5); transform: translate(-50%, -50%); }
.tbtn { position: absolute; right: 22px; width: 84px; height: 84px; border-radius: 50%; pointer-events: auto; background: rgba(255,90,95,.75); box-shadow: 0 4px 0 rgba(0,0,0,.4); font-size: 34px; padding: 0; }
#btn-fire { bottom: max(26px, env(safe-area-inset-bottom)); }
#btn-super { bottom: calc(max(26px, env(safe-area-inset-bottom)) + 104px); width: 66px; height: 66px; right: 32px; background: rgba(255,210,63,.35); font-size: 26px; }
#btn-super.ready { background: rgba(255,210,63,.9); color: #111; animation: wobble 1s infinite; }
#overlay { position: absolute; inset: 0; background: rgba(0,0,0,.7); display: flex; align-items: center; justify-content: center; padding: 12px; }
#overlay .box { background: var(--panel); border-radius: var(--radius); padding: 20px; max-width: 520px; width: 100%; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); overflow: auto; }
.count { font-size: 90px; font-weight: 900; color: var(--yellow); text-shadow: 0 6px 0 rgba(0,0,0,.5); animation: pop .4s; }

@media (max-width: 720px) {
  #app { padding-bottom: 80px; }
  #top { padding: 8px 0; } .brand { font-size: 18px; } #wallet span { padding: 3px 9px; font-size: 14px; }
  #nav { position: fixed; bottom: 0; left: 0; right: 0; margin: 0; background: var(--bg2); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); z-index: 10; justify-content: space-around; gap: 2px; flex-wrap: nowrap; overflow-x: auto; }
  #nav button { flex-direction: column; gap: 2px; padding: 6px 2px; font-size: 10px; background: transparent; box-shadow: none; min-width: 0; flex: 1 1 0; overflow: hidden; } #nav button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }   /* zeven tabs passen op 360 px */ #nav button.on { background: transparent; color: var(--yellow); }
  .playbar { bottom: 70px; }
  .card .pic { height: 90px; }
  .hud-box { font-size: 13px; padding: 3px 8px; }
  #minimap { width: 100px; height: 66px; top: 40px; }
  .hud-bottom { width: 46vw; left: 10px; transform: none; top: 50px; bottom: auto; }   /* op mobiel bovenin, weg van joystick en knoppen */
}

/* ---- flitsende interface (2026-11-06): kunst op de achtergrond, hero, banners, zeldzaamheidskaarten ---- */
body { background: #0b1022 url('/assets/race/bg_menu.jpg') center top / cover fixed no-repeat; }
body::before { content: ''; position: fixed; inset: 0; background: linear-gradient(180deg, rgba(8,12,30,.78), rgba(8,12,30,.92) 60%, #0b1022); z-index: -1; }
.hero { position: relative; height: clamp(170px, 32vw, 320px); border-radius: 18px; background-size: cover; background-position: center 35%; margin-bottom: 14px; box-shadow: 0 14px 40px rgba(0,0,0,.6), inset 0 0 0 3px rgba(255,255,255,.12); overflow: hidden; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,14,40,.85) 0%, rgba(10,14,40,.35) 50%, transparent 100%); }
.hero .ht { position: absolute; left: 22px; bottom: 18px; z-index: 1; }
.hero h1 { font-size: clamp(30px, 6vw, 58px); margin: 0; font-weight: 900; letter-spacing: 1px; color: var(--yellow); text-shadow: 0 4px 0 #8a5a00, 0 8px 22px rgba(0,0,0,.7); font-style: italic; }
.hero p { margin: 4px 0 0; font-size: clamp(14px, 2vw, 20px); font-weight: 700; text-shadow: 0 2px 6px rgba(0,0,0,.8); }
.banner { position: relative; height: clamp(120px, 22vw, 200px); border-radius: 18px; background: var(--panel) center / cover no-repeat; margin-bottom: 14px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,.5), inset 0 0 0 3px rgba(255,255,255,.1); }
.banner::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 20%, rgba(8,12,30,.9)); }
.banner .bt { position: absolute; left: 18px; right: 18px; bottom: 12px; z-index: 1; }
.banner h2 { font-size: clamp(24px, 4vw, 36px); margin: 0; font-weight: 900; text-shadow: 0 3px 10px rgba(0,0,0,.9); color: #fff; }
.banner p { margin: 2px 0 0; font-size: 14px; color: var(--muted); text-shadow: 0 2px 6px rgba(0,0,0,.9); }
.card { background: linear-gradient(160deg, #35508f, #22335f); border: 2px solid rgba(255,255,255,.08); }
.card.r-common { box-shadow: var(--shadow), 0 0 0 2px rgba(141,153,174,.35); }
.card.r-rare { box-shadow: var(--shadow), 0 0 0 2px rgba(76,201,240,.5), 0 0 18px rgba(76,201,240,.25); background: linear-gradient(160deg, #2d5c84, #1d2f5a); }
.card.r-epic { box-shadow: var(--shadow), 0 0 0 2px rgba(179,136,255,.55), 0 0 20px rgba(179,136,255,.3); background: linear-gradient(160deg, #52418f, #27255c); }
.card.r-mythic { box-shadow: var(--shadow), 0 0 0 2px rgba(255,255,255,.6), 0 0 28px rgba(179,136,255,.7); background: linear-gradient(160deg, #6a2a8a, #1d2f5a 60%, #0d3b4a); }
.rw-card.r-mythic { background: linear-gradient(160deg, #6a2a8a, #1d2f5a 60%, #0d3b4a); box-shadow: var(--shadow), 0 0 26px rgba(179,136,255,.7); }
.hidden-car .qmark { font-size: 90px; font-weight: 900; color: rgba(255,255,255,.25); }
.card.r-legendary { box-shadow: var(--shadow), 0 0 0 2px rgba(255,210,63,.7), 0 0 24px rgba(255,210,63,.35); background: linear-gradient(160deg, #8a6420, #3b2a12); }
.card .pic.big { height: 160px; background: radial-gradient(ellipse at 50% 70%, rgba(255,255,255,.22), transparent 65%); }
.card .pic.big img { max-height: 150px; }
.portrait { filter: drop-shadow(0 10px 8px rgba(0,0,0,.55)); transition: transform .15s; }
.card:hover .portrait { transform: scale(1.06) rotate(-2deg); }
.drivecard .pic.big { height: 190px; }
.mode { display: flex; gap: 12px; align-items: center; background: linear-gradient(160deg, #35508f, #22335f); border: 3px solid rgba(255,255,255,.08); box-shadow: var(--shadow); }
.mode.on { border-color: var(--yellow); box-shadow: var(--shadow), 0 0 18px rgba(255,210,63,.35); }
.mico { height: 54px; width: 54px; flex: none; font-size: 36px; display: flex; align-items: center; justify-content: center; filter: drop-shadow(0 4px 4px rgba(0,0,0,.5)); }
img.mico { object-fit: contain; }
.track { padding: 0; overflow: hidden; background: linear-gradient(160deg, #35508f, #22335f); }
.track .thumb { height: 92px; margin: 0; border-radius: 0; position: relative; }
.track .thumb .lock { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 32px; background: rgba(0,0,0,.45); }
.track > b, .track > .small { display: block; padding: 0 10px; } .track > b { padding-top: 8px; font-size: 15px; } .track > .small:last-child { padding-bottom: 10px; }
.chestpic { height: 120px; filter: drop-shadow(0 10px 8px rgba(0,0,0,.5)); }
.chestpic.glow { height: 170px; animation: wobble 1.2s ease-in-out infinite, glow 1.6s ease-in-out infinite alternate; }
@keyframes glow { from { filter: drop-shadow(0 10px 8px rgba(0,0,0,.5)) drop-shadow(0 0 6px rgba(255,210,63,.3)); } to { filter: drop-shadow(0 10px 8px rgba(0,0,0,.5)) drop-shadow(0 0 22px rgba(255,210,63,.9)); } }
.chest-big { background: radial-gradient(ellipse at 50% 40%, rgba(255,210,63,.18), transparent 60%); }
button.primary { background: linear-gradient(180deg, #ffe066, #ffc21a); box-shadow: 0 6px 0 #9a6a00, 0 10px 20px rgba(0,0,0,.35); text-shadow: 0 1px 0 rgba(255,255,255,.5); }
button.primary:active { box-shadow: 0 3px 0 #9a6a00; }
.playbar .big { font-size: 24px; letter-spacing: 1px; }
.panel { background: linear-gradient(160deg, rgba(53,80,143,.85), rgba(34,51,95,.9)); border: 2px solid rgba(255,255,255,.08); backdrop-filter: blur(4px); }
#nav button { background: linear-gradient(180deg, #2f4480, #26386a); }
#nav button.on { background: linear-gradient(180deg, #ffe066, #ffc21a); }
.rar { text-transform: uppercase; letter-spacing: .5px; }
.tier.reached, .road .m.reached { background: linear-gradient(160deg, #2f6b57, #22335f); }
@media (max-width: 720px) { .hero { height: 46vw; } .hero .ht { left: 14px; bottom: 12px; } .banner { height: 30vw; } .card .pic.big { height: 130px; } .drivecard .pic.big { height: 150px; } #nav button.on { background: transparent; } #nav button { background: transparent; } }

#overlay .pausebox { text-align: center; } #overlay .pausebox .row { justify-content: center; margin-top: 12px; } #overlay .pausebox .warn { color: var(--yellow); font-weight: 700; font-size: 18px; } #overlay .pausebox h2 { font-size: 34px; }

/* ---- kopbalk en navigatie (v6) ---- */
.brand .logo { height: 44px; width: 44px; filter: drop-shadow(0 3px 3px rgba(0,0,0,.5)); }
.brand .bname { font-size: 26px; font-style: italic; letter-spacing: 1px; color: var(--yellow); text-shadow: 0 2px 0 #8a5a00, 0 4px 10px rgba(0,0,0,.6); }
#wallet span { background: linear-gradient(180deg, rgba(20,30,60,.85), rgba(10,15,35,.9)); border: 2px solid rgba(255,255,255,.14); box-shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 3px 8px rgba(0,0,0,.4); padding: 4px 12px 4px 6px; display: inline-flex; align-items: center; gap: 6px; font-size: 16px; }
#wallet span img { height: 26px; }
#nav { gap: 8px; }
#nav button { padding: 8px 16px 8px 10px; border-radius: 16px; background: linear-gradient(180deg, #3a5497, #22335f); border: 2px solid rgba(255,255,255,.12); box-shadow: inset 0 2px 0 rgba(255,255,255,.18), 0 5px 0 #121b36, 0 8px 14px rgba(0,0,0,.35); font-weight: 700; font-size: 16px; }
#nav button:hover { filter: brightness(1.12); }
#nav button .nico { height: 34px; filter: drop-shadow(0 2px 2px rgba(0,0,0,.5)); }
#nav button.on { background: linear-gradient(180deg, #ffe66d, #ffb703); color: #1a1a1a; box-shadow: inset 0 2px 0 rgba(255,255,255,.6), 0 5px 0 #9a6a00, 0 0 18px rgba(255,210,63,.55); transform: translateY(-2px); }
#nav button.on:active { transform: translateY(2px); box-shadow: inset 0 2px 0 rgba(255,255,255,.6), 0 2px 0 #9a6a00; }
.party .pconf { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
@media (max-width: 720px) { #nav button { padding: 6px 6px; border-radius: 12px; box-shadow: none; border: 0; font-size: 11px; } #nav button.on { transform: none; box-shadow: none; background: transparent; color: var(--yellow); } #nav button .nico { height: 28px; } .brand .logo { height: 34px; width: 34px; } .brand .bname { font-size: 20px; } }

/* ---- beloningskaarten en kistfeest ---- */
.rw-card { position: relative; width: 132px; border-radius: 14px; padding: 10px 8px; text-align: center; background: linear-gradient(160deg, #35508f, #22335f); border: 2px solid rgba(255,255,255,.15); box-shadow: var(--shadow); animation: pop .45s cubic-bezier(.2,1.4,.4,1) both; }
.rw-card.small { width: 104px; padding: 8px 6px; }
.rw-card .rw-pic { height: 80px; display: flex; align-items: center; justify-content: center; } .rw-card.small .rw-pic { height: 56px; }
.rw-card .rw-ico { height: 72px; width: auto; filter: drop-shadow(0 6px 5px rgba(0,0,0,.5)); } .rw-card.small .rw-ico { height: 50px; } .rw-card .rw-ico.wide { height: 60px; border-radius: 8px; } .rw-card .portrait { height: 76px; } .rw-card.small .portrait { height: 48px; }
.rw-card .rw-n { font-weight: 900; font-size: 20px; margin-top: 4px; text-shadow: 0 2px 4px rgba(0,0,0,.6); } .rw-card.small .rw-n { font-size: 16px; }
.rw-card .rw-lbl { font-size: 12px; color: var(--muted); }
.rw-card.r-rare { background: linear-gradient(160deg, #2d5c84, #1d2f5a); box-shadow: var(--shadow), 0 0 14px rgba(76,201,240,.35); }
.rw-card.r-epic { background: linear-gradient(160deg, #52418f, #27255c); box-shadow: var(--shadow), 0 0 16px rgba(179,136,255,.4); }
.rw-card.r-legendary { background: linear-gradient(160deg, #8a6420, #3b2a12); box-shadow: var(--shadow), 0 0 22px rgba(255,210,63,.5); }
.loot.small { gap: 8px; }
.icon-img.wide { height: 22px; width: 44px; object-fit: cover; border-radius: 4px; }
.party { position: relative; text-align: center; overflow: hidden; min-height: 320px; }
.party .rays { position: absolute; left: 50%; top: 150px; width: 900px; height: 900px; margin: -450px 0 0 -450px; background: repeating-conic-gradient(rgba(255,210,63,.22) 0 8deg, transparent 8deg 20deg); opacity: 0; transition: opacity .4s; animation: spin 14s linear infinite; pointer-events: none; }
.party.burst .rays { opacity: 1; }
@keyframes spin { to { transform: rotate(360deg); } }
.party .stage { position: relative; height: 220px; display: flex; align-items: flex-end; justify-content: center; }
.party .chest { animation: shake .9s ease-in-out; transform-origin: 50% 90%; } .party .chest .chestpic { height: 180px; }
@keyframes shake { 0%, 100% { transform: rotate(0); } 10%, 50%, 90% { transform: rotate(-6deg) translateY(-4px); } 30%, 70% { transform: rotate(6deg) translateY(-4px); } 80% { transform: scale(1.08); } }
.party.burst .chest { animation: hop .5s ease-out both; }
@keyframes hop { 0% { transform: translateY(0) scale(1); } 40% { transform: translateY(-40px) scale(1.15); } 100% { transform: translateY(0) scale(1.05); } }
.party .conf { position: absolute; left: 50%; top: 40%; width: 0; height: 0; opacity: 0; pointer-events: none; transform: translate(-50%, -50%); }
.party.burst .conf { animation: confburst 1.3s ease-out both; }
.party.burst .conf.c1 { animation-delay: .15s; } .party.burst .conf.c2 { animation-delay: .3s; }
@keyframes confburst { 0% { width: 60px; height: 60px; opacity: 1; } 70% { opacity: 1; } 100% { width: 420px; height: 420px; opacity: 0; } }
.party .ptitle { font-size: 30px; margin: 6px 0 10px; text-shadow: 0 3px 8px rgba(0,0,0,.6); }
.party-loot { position: relative; z-index: 1; min-height: 150px; }
#modal-box:has(.party) { background: radial-gradient(ellipse at 50% 30%, #3b4f8e, #141c3a 70%); max-width: 640px; }

/* ---- hud en touch-knoppen met eigen kunst ---- */
.tbtn.art { background-color: transparent !important; background-size: contain; background-repeat: no-repeat; background-position: center; box-shadow: none; filter: drop-shadow(0 4px 4px rgba(0,0,0,.5)); }
.tbtn.art span { display: none; }
#btn-super.art.ready { animation: wobble 1s infinite; filter: drop-shadow(0 0 14px rgba(255,210,63,.9)); }
#hud-pause.art { background-color: transparent; background-size: contain; background-repeat: no-repeat; background-position: center; width: 40px; height: 40px; color: transparent; }
.bars { display: grid; grid-template-columns: 24px 1fr; gap: 4px 8px; align-items: center; }
.bars img { width: 24px; height: 24px; filter: drop-shadow(0 2px 2px rgba(0,0,0,.6)); }
.bars .bar { margin-top: 0; }

#audiobtns { display: flex; gap: 6px; } .abtn { padding: 2px; width: 40px; height: 40px; border-radius: 50%; background: transparent; box-shadow: none; font-size: 20px; } .abtn img { width: 36px; height: 36px; filter: drop-shadow(0 2px 2px rgba(0,0,0,.5)); } .abtn.off { opacity: .6; }
@media (max-width: 720px) { .abtn { width: 34px; height: 34px; } .abtn img { width: 30px; height: 30px; } }

.avcar { display: inline-flex; width: 40px; height: 40px; border-radius: 50%; background: radial-gradient(circle, #4a66b0, #22335f); border: 2px solid rgba(255,255,255,.25); align-items: center; justify-content: center; overflow: hidden; } .avcar img { height: 34px !important; }

.chest-tap { cursor: pointer; display: inline-block; } .chest-tap:active .chestpic { transform: scale(.95); }
.chest-big .primary.big { margin: 8px 0 10px; }
.tabs button { position: relative; } .tabs button .dot { position: absolute; top: -4px; right: -4px; width: 12px; height: 12px; }
@media (max-width: 720px) { .chestpic.glow { height: 130px; } .chest-big { padding: 10px; } }

#game.touch .hud-bottom { width: min(360px, 46vw); left: 10px; transform: none; top: 50px; bottom: auto; }   /* elk aanraakscherm, ook tablet en liggend */
@media (max-height: 520px) { #game.touch .hud-bottom { left: 50%; transform: translateX(-50%); width: min(300px, 36vw); } }   /* telefoon liggend: knoppen vullen de linkerkolom, balken bovenin het midden */
/* ---------- speciaal wapen (gadget) ---------- */
#btn-gadget { bottom: calc(max(26px, env(safe-area-inset-bottom)) + 186px); width: 58px; height: 58px; right: 36px; background: rgba(255,140,40,.35); font-size: 22px; }
#btn-gadget.ready { background: rgba(255,140,40,.9); }
#btn-gadget.empty { opacity: .35; }
#btn-gadget.art.ready { filter: drop-shadow(0 0 12px rgba(255,150,40,.9)); }
#btn-gadget.art.empty { filter: grayscale(1); opacity: .4; }
#touch.hand-right #btn-gadget { left: 36px; }
.bars .gad { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.bars .gad img { height: 28px; width: 28px; object-fit: contain; filter: drop-shadow(0 2px 2px rgba(0,0,0,.6)); }
.bars .gad span { font-weight: 800; font-size: 14px; color: #fff; text-shadow: 0 1px 2px #000; }
.bars .gad.empty { opacity: .45; }
.gpic { max-width: 100%; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0,0,0,.5)); }
.gchip { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); border-radius: 12px; padding: 3px 10px 3px 4px; font-size: 13px; }
.gchip img { height: 30px; width: 30px; object-fit: contain; }
.gpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; max-height: 60vh; overflow: auto; }
.gpick .card { padding: 8px; text-align: center; cursor: pointer; }
.gpick .card.selected { outline: 3px solid var(--yellow); }

/* kistjes: elk wachtend kistje apart te openen */
.chestrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; align-items: start; }
.chestrow .chest-big { padding: 12px 8px; border-radius: var(--radius); background: var(--panel); }
.chestrow .chest-big:not(.first) .chestpic.glow { height: 110px; animation: wobble 1.6s ease-in-out infinite; }
.chestrow .chest-big .primary { margin: 6px 0 8px; }
@media (max-width: 720px) { .chestrow { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); } .party { min-height: 0; } .party .stage { height: 170px; } .party .chest .chestpic { height: 140px; } .party .ptitle { font-size: 24px; } }
@media (max-height: 520px) { .party { min-height: 0; } .party .stage { height: 140px; } .party .chest .chestpic { height: 115px; } .party .ptitle { font-size: 22px; margin: 2px 0 6px; } .party-loot { min-height: 0; } }   /* liggende telefoon: kistfeest past of scrolt binnen het venster */
/* saldo-strook (munten, onderdelen, bekers, edelstenen) blijft in beeld bij scrollen: zweeft boven de inhoud */
#wallet { position: sticky; top: 0; z-index: 15; margin: 0 -12px 8px; padding: 6px 12px; justify-content: center; background: rgba(20,33,61,.88); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 4px 14px rgba(0,0,0,.35); }
#audiobtns { margin-left: auto; }
@media (max-width: 720px) { #wallet { gap: 6px; padding: 5px 8px; } #wallet span { font-size: 13px; padding: 3px 8px 3px 5px; } #wallet span img { height: 22px; } }

/* ---------- spelen: solo/online, wachtrij, accountmenu, groep ---------- */
.playchoice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 0; }
.playchoice button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 10px; font-size: 20px; border-radius: 16px; }
.playchoice button .small { font-weight: 500; font-size: 12px; opacity: .9; text-transform: none; }
.playchoice button.gold { background: linear-gradient(180deg, #ffd23f, #ff9f1c); color: #111; box-shadow: 0 4px 0 #8a5a00; }
.playchoice button:disabled { opacity: .45; filter: grayscale(.6); }
@media (max-width: 480px) { .playchoice { grid-template-columns: 1fr; } }
.queue { text-align: center; } .queue .members { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin: 8px 0; }
.spinner { width: 46px; height: 46px; border-radius: 50%; border: 5px solid rgba(255,255,255,.2); border-top-color: var(--yellow); animation: spin 1s linear infinite; margin: 6px auto 10px; }
.spinner.small { width: 22px; height: 22px; border-width: 3px; margin: 4px 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.acctbtn { display: inline-flex; align-items: center; gap: 6px; background: rgba(0,0,0,.25); border: 1px solid rgba(255,255,255,.15); border-radius: 20px; padding: 2px 8px 2px 2px; box-shadow: none; font-size: 14px; }
.pill.lvl { background: var(--yellow); color: #111; font-weight: 800; }
.pill.gold { background: linear-gradient(180deg, #ffd23f, #ff9f1c); color: #111; font-weight: 800; }
.pill.muted { opacity: .5; }
.code { font-family: ui-monospace, Consolas, monospace; letter-spacing: 3px; font-size: 18px; background: rgba(0,0,0,.3); border-radius: 8px; padding: 4px 8px; border: 1px solid rgba(255,255,255,.2); color: #fff; width: 120px; text-transform: uppercase; }
input.code.link { width: 100%; font-size: 13px; letter-spacing: 0; text-transform: none; }
.sharebtns { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0; align-items: center; } .sharebtns input.code.link { flex: 1 1 180px; min-width: 0; } .sharebtns button { min-width: 100px; }
button.snap { background: #fffc00; color: #111; }
button.wa { background: #25d366; color: #111; } button.tt { background: #111; color: #fff; border: 1px solid rgba(255,255,255,.35); }
.row.lang button.on, .row [data-hand].on { background: var(--yellow); color: #111; }

.radios { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 8px; } .radios label { display: flex; align-items: center; gap: 8px; }
.acctbtn .caret { opacity: .7; font-size: 12px; }

/* ---------- vrienden ---------- */
#friendsbtn { display: flex; } .fbtn { position: relative; font-size: 22px; }
.fbtn .badge { position: absolute; top: -2px; right: -4px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--green); color: #111; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; padding: 0 4px; }
.friends { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow: auto; margin: 6px 0; }
.friend { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--panel2); border-radius: 10px; padding: 8px 10px; }
.friend .dot { width: 10px; height: 10px; border-radius: 50%; background: #666; flex: none; } .friend.on .dot { background: var(--green); box-shadow: 0 0 8px var(--green); }
.friend .fname { font-weight: 800; flex: 1 1 auto; } .friend button { margin-left: auto; }
.toast.action { display: flex; align-items: center; gap: 10px; }
.row [data-ctrl].on { background: var(--yellow); color: #111; }
/* randen (outline) in scrollende lijsten: binnen de kaart tekenen en wat ruimte, anders knipt de scrollcontainer de bovenrand af */
.road { padding: 4px 3px 8px; } .road .m.reached, .tier.reached { outline-offset: -2px; }
.gpick { padding: 4px; } .gpick .card.selected, .card.selected { outline-offset: -3px; }
.skinrow button.on { outline-offset: -2px; } .friends { padding: 2px; }

#hud-coins { display: inline-flex; align-items: center; gap: 4px; color: var(--yellow); font-weight: 800; } #hud-coins img { width: 20px; height: 20px; }
#hud-coins.bump { animation: coinbump .35s ease-out; } @keyframes coinbump { 0% { transform: scale(1.35); } 100% { transform: scale(1); } }
