:root {
  --bg: #101a24;
  --panel: #1a2836;
  --panel2: #223548;
  --text: #eef3f8;
  --muted: #9fb1c3;
  --gold: #ffd54a;
  --accent: #ffb300;
  --danger: #ff6b6b;
  --ok: #4cd97b;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 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; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; overscroll-behavior: none; }
body { min-height: 100dvh; }
button, input { font: inherit; color: inherit; }
h1, h2 { margin: 0; }

/* Startscherm */
.screen { min-height: 100dvh; display: flex; align-items: flex-start; justify-content: center; padding: 20px 16px; background: radial-gradient(circle at 50% 0%, #25465f, var(--bg) 60%); }
.start-card { margin: auto; width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 14px; text-align: center; }
.logo { align-self: center; border-radius: 20px; }
.start-card h1 { font-size: 2rem; letter-spacing: .5px; color: var(--gold); }
.lead { margin: 0; color: var(--text); line-height: 1.45; }
.consent { background: var(--panel); border-radius: 12px; padding: 12px 14px; text-align: left; font-size: .9rem; color: var(--muted); line-height: 1.4; }
.consent p { margin: 0 0 8px; }
.consent p:last-child { margin: 0; }
.consent strong { color: var(--text); }
.safety { background: #3a2a10; border: 1px solid var(--accent); color: #ffe3a3; border-radius: 12px; padding: 10px 14px; font-weight: 600; font-size: .95rem; }
.field { display: flex; flex-direction: column; gap: 6px; text-align: left; font-size: .85rem; color: var(--muted); }
.field input { background: var(--panel); border: 1px solid #35506a; border-radius: 10px; padding: 12px; font-size: 1.05rem; color: var(--text); }
.field input:focus { outline: 2px solid var(--gold); }
.error { margin: 0; color: var(--danger); font-size: .92rem; line-height: 1.4; }
.link { background: none; border: 0; color: #8cc4ff; text-decoration: underline; padding: 10px; cursor: pointer; }

.btn { background: var(--panel2); border: 1px solid #3d5a76; border-radius: 12px; padding: 12px 18px; cursor: pointer; font-weight: 600; min-height: 44px; }
.btn.primary { background: linear-gradient(#ffd54a, #f0a800); color: #3a2600; border-color: #b87f00; }
.btn.big { font-size: 1.15rem; padding: 14px; }
.btn.small { padding: 8px 12px; min-height: 40px; font-size: .9rem; }
.btn.danger { background: #4a2020; border-color: #8c3b3b; color: #ffbcbc; }
.btn.ghost { background: transparent; }
.btn:active { transform: translateY(1px); }

/* Hoofdlayout */
#app { position: fixed; top: 0; left: 0; right: 0; height: 100vh; height: var(--app-h, 100dvh); display: flex; flex-direction: column; overflow: hidden; }
#topbar { display: flex; align-items: center; gap: 8px; padding: calc(6px + var(--safe-t)) calc(10px + var(--safe-r)) 6px calc(10px + var(--safe-l)); flex: 0 0 auto; background: var(--panel); z-index: 20; }
.status { display: flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--muted); flex: 1; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); }
.status.online .dot { background: var(--ok); box-shadow: 0 0 6px var(--ok); }
.badge { background: #3b2e63; color: #d6c7ff; border-radius: 999px; padding: 2px 10px; font-size: .75rem; }
.icon-btn { background: none; border: 0; font-size: 1.5rem; padding: 4px 8px; cursor: pointer; min-width: 44px; min-height: 40px; }
#banners { z-index: 19; }
.banner { background: #5a3a00; color: #ffe3a3; padding: 8px 14px; font-size: .88rem; line-height: 1.35; }

#views { position: relative; flex: 1; min-height: 0; }
.view { position: absolute; inset: 0; }
#map { position: absolute; inset: 0; background: #cfe3d1; }
#arWrap { position: absolute; inset: 0; background: #000; overflow: hidden; touch-action: none; }
.cam-msg { position: absolute; left: 16px; right: 16px; top: 40%; background: rgba(16, 26, 36, .92); padding: 16px; border-radius: 12px; text-align: center; }

#tabbar { flex: 0 0 auto; padding-left: var(--safe-l); padding-right: var(--safe-r); display: flex; background: var(--panel); border-top: 1px solid #2c4258; padding-bottom: var(--safe-b); z-index: 20; }
.tab { flex: 1; background: none; border: 0; padding: 8px 4px 6px; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--muted); font-size: .8rem; cursor: pointer; min-height: 56px; }
.tab .ti { font-size: 1.4rem; line-height: 1; }
.tab.active { color: var(--gold); }

/* Doelkaart op de kaart */
.goal-card { position: absolute; top: 10px; left: 10px; right: 10px; z-index: 500; background: rgba(16, 26, 36, .93); border: 1px solid #35506a; border-radius: 14px; padding: 8px 12px; display: flex; align-items: center; gap: 10px; box-shadow: 0 2px 10px rgba(0, 0, 0, .35); }
.goal-arrow { font-size: 1.7rem; color: var(--gold); width: 36px; text-align: center; transition: transform .3s linear; }
.goal-text { flex: 1; min-width: 0; }
.goal-dist { font-weight: 700; }
.goal-hint { font-size: .8rem; color: var(--muted); }
.fab { position: absolute; right: 10px; bottom: 28px; z-index: 500; background: rgba(16, 26, 36, .93); border: 1px solid #35506a; border-radius: 999px; padding: 10px 16px; cursor: pointer; min-height: 44px; }
.fab.attn { border-color: var(--gold); color: var(--gold); }

/* Kaart-iconen */
.leaflet-container { font-family: inherit; }
.chest-icon, .me-icon, .player-icon { background: none; border: 0; }
.chest-wrap { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .45)); }
.chest-wrap.mine { filter: drop-shadow(0 0 6px #ffd54a) drop-shadow(0 2px 2px rgba(0, 0, 0, .45)); }
.chest-wrap.in-range svg { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.25); } }
.me-wrap { position: relative; width: 44px; height: 44px; }
.me-dot { position: absolute; left: 14px; top: 14px; width: 16px; height: 16px; background: #3b82f6; border: 3px solid #fff; border-radius: 50%; box-shadow: 0 0 4px rgba(0, 0, 0, .5); }
.me-cone { position: absolute; inset: 0; display: none; transform-origin: 50% 50%; }
.me-cone::before { content: ""; position: absolute; left: 12px; top: -6px; width: 0; height: 0; border-left: 10px solid transparent; border-right: 10px solid transparent; border-bottom: 22px solid rgba(59, 130, 246, .55); }
.player-icon { transition: transform 1s linear; }
.player-wrap { width: 60px; display: flex; flex-direction: column; align-items: center; }
.player-name { background: rgba(16, 26, 36, .85); color: #fff; font-size: 11px; line-height: 1.2; padding: 1px 6px; border-radius: 8px; max-width: 76px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-dot { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; margin-top: 2px; box-shadow: 0 1px 4px rgba(0, 0, 0, .5); }

/* Rugzak */
#view-bag { overflow-y: auto; padding: 14px 14px 20px; background: var(--bg); }
.bag-head { margin-bottom: 12px; }
.bag-summary { color: var(--muted); font-size: .9rem; margin-top: 2px; }
.bag-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.bag-card { position: relative; background: var(--panel); border: 2px solid var(--rar, #888); border-radius: 14px; padding: 12px 8px; text-align: center; }
.bag-emoji { font-size: 2.4rem; line-height: 1.2; }
.bag-name { font-weight: 700; margin-top: 4px; }
.bag-rarity { font-size: .78rem; color: var(--rar, #aaa); margin-top: 2px; }
.bag-count { position: absolute; top: 6px; right: 8px; background: var(--rar, #888); color: #10161c; font-weight: 800; border-radius: 999px; padding: 0 8px; font-size: .85rem; }
.bag-card.unknown { border-style: dashed; border-color: #3b4f63; opacity: .8; }
.bag-card.unknown .bag-emoji { filter: brightness(0); opacity: .35; }
.bag-card.unknown .bag-name, .bag-card.unknown .bag-rarity { color: var(--muted); }

/* Simulatie-bediening */
#simControls { position: absolute; left: 0; right: 0; bottom: 0; height: 0; z-index: 600; pointer-events: none; }
.joy { position: absolute; left: 18px; bottom: 28px; width: 110px; height: 110px; border-radius: 50%; background: rgba(16, 26, 36, .55); border: 2px solid rgba(255, 255, 255, .5); touch-action: none; pointer-events: auto; display: flex; align-items: center; justify-content: center; }
.joy-knob { width: 46px; height: 46px; border-radius: 50%; background: rgba(255, 213, 74, .9); border: 2px solid #7a5200; }
.turn { position: absolute; left: 140px; bottom: 28px; display: flex; gap: 8px; pointer-events: auto; }
.turn button { width: 46px; height: 46px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .5); background: rgba(16, 26, 36, .65); font-size: 1.4rem; cursor: pointer; touch-action: none; }
.sim-help { position: absolute; left: 18px; bottom: 6px; font-size: .7rem; color: #fff; background: rgba(0, 0, 0, .45); border-radius: 6px; padding: 1px 6px; }

/* Overlays */
#toast { position: fixed; left: 50%; top: calc(70px + var(--safe-t)); transform: translateX(-50%); max-width: 90vw; background: rgba(16, 26, 36, .96); border: 1px solid var(--gold); border-radius: 12px; padding: 10px 16px; z-index: 2000; text-align: center; font-weight: 600; box-shadow: 0 4px 16px rgba(0, 0, 0, .5); }
.overlay { position: fixed; inset: 0; z-index: 1500; background: rgba(5, 10, 16, .78); display: flex; align-items: center; justify-content: center; padding: 16px; }
.panel { background: var(--panel); border: 1px solid #35506a; border-radius: 16px; padding: 18px; width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 12px; }
.panel p { margin: 0; line-height: 1.4; }
.row { display: flex; gap: 10px; }
.row .btn { flex: 1; }
.check { display: flex; gap: 10px; align-items: center; font-size: .95rem; }
.check input { width: 22px; height: 22px; }
.fine { font-size: .8rem; color: var(--muted); }
hr { border: 0; border-top: 1px solid #2c4258; width: 100%; }
.spinner { width: 40px; height: 40px; border: 4px solid #35506a; border-top-color: var(--gold); border-radius: 50%; animation: spin 1s linear infinite; align-self: center; }
@keyframes spin { to { transform: rotate(360deg); } }
.reward-panel { text-align: center; align-items: center; }
.reward-emoji { font-size: 5rem; animation: pop .5s ease-out; }
.reward-name { font-size: 1.4rem; font-weight: 800; color: var(--gold); }
.reward-rarity { font-weight: 700; letter-spacing: 1px; text-transform: uppercase; font-size: .85rem; }
.reward-text { color: var(--muted); }
@keyframes pop { 0% { transform: scale(.3); opacity: 0; } 70% { transform: scale(1.2); } 100% { transform: scale(1); opacity: 1; } }

@media (min-width: 700px) {
  #app { max-width: 560px; margin: 0 auto; border-left: 1px solid #2c4258; border-right: 1px solid #2c4258; }
  .bag-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Mobiel: weergave-wissel, radar, zwevende wisselknop */
body { touch-action: manipulation; }
.status { min-width: 0; }
#statusText { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seg { display: flex; background: #0e1721; border: 1px solid #35506a; border-radius: 999px; padding: 3px; flex: 0 0 auto; }
.seg-btn { background: none; border: 0; color: var(--muted); padding: 8px 12px; border-radius: 999px; font-weight: 700; font-size: .9rem; cursor: pointer; min-height: 40px; white-space: nowrap; }
.seg-btn.active { background: linear-gradient(#ffd54a, #f0a800); color: #3a2600; }
.flip { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(18px + var(--safe-b) * 0); z-index: 700; background: linear-gradient(#ffd54a, #f0a800); color: #3a2600; border: 2px solid #b87f00; border-radius: 999px; padding: 12px 22px; font-weight: 800; font-size: 1.05rem; min-height: 52px; box-shadow: 0 4px 14px rgba(0,0,0,.5); cursor: pointer; white-space: nowrap; }
.flip:active { transform: translateX(-50%) translateY(1px); }
.radar { position: absolute; left: 10px; top: 10px; width: 112px; height: 112px; border-radius: 50%; z-index: 40; box-shadow: 0 2px 10px rgba(0,0,0,.5); touch-action: manipulation; }
.cam-goal { position: absolute; top: 10px; left: 132px; right: 10px; z-index: 40; background: rgba(16,26,36,.85); border: 1px solid #35506a; border-radius: 14px; padding: 8px 12px; font-weight: 700; text-align: left; line-height: 1.3; }
.cam-goal small { display: block; font-weight: 500; color: var(--muted); }
.goal-card { flex-wrap: wrap; left: calc(10px + var(--safe-l)); right: calc(10px + var(--safe-r)); }
.goal-card .btn { flex: 1 1 auto; }
.fab { right: calc(10px + var(--safe-r)); bottom: 84px; }
.joy { left: calc(18px + var(--safe-l)); }
@media (max-width: 400px) {
  #statusText { display: none; }
  .seg-btn { padding: 8px 9px; font-size: .85rem; }
  .goal-hint { display: none; }
  .tab { min-height: 52px; }
  .cam-goal { left: 126px; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .tab { min-height: 44px; flex-direction: row; justify-content: center; gap: 8px; }
  #topbar { padding-top: calc(3px + var(--safe-t)); padding-bottom: 3px; }
  .flip { bottom: 10px; padding: 8px 16px; min-height: 44px; }
  .fab { bottom: 64px; }
  .radar { width: 88px; height: 88px; }
  .cam-goal { left: 108px; }
}

/* simulatie: draaiknoppen rechtsonder, zodat de wisselknop vrij blijft */
.turn { left: auto; right: calc(18px + var(--safe-r)); bottom: 28px; }

#view-cam.playing .radar, #view-cam.playing .cam-goal { display: none; }

/* Kompas */
.chip { background: #0e1721; border: 1px solid #35506a; border-radius: 999px; padding: 6px 10px; font-weight: 700; font-size: .85rem; cursor: pointer; min-height: 36px; white-space: nowrap; }
.chip.warn { border-color: var(--accent); color: #ffe3a3; }
.cam-compass { position: absolute; left: 50%; transform: translateX(-50%); top: 50%; z-index: 45; background: linear-gradient(#ffd54a, #f0a800); color: #3a2600; border: 2px solid #b87f00; border-radius: 999px; padding: 12px 20px; font-weight: 800; font-size: 1rem; min-height: 48px; box-shadow: 0 4px 14px rgba(0,0,0,.5); cursor: pointer; }
.dbg { margin: 0; background: #0e1721; border: 1px solid #2c4258; border-radius: 8px; padding: 8px; font-size: .75rem; color: var(--muted); white-space: pre-wrap; word-break: break-word; }
#view-cam.playing .cam-compass { display: none; }

/* Village Experience: vaste schatten */
.chest-wrap { position: relative; }
.chest-wrap .nr { position: absolute; right: -2px; top: -4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: #7c5cff; color: #fff; font-size: 11px; line-height: 18px; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,.5); }
.chest-wrap.done .nr { background: #4cd97b; color: #10161c; }
.chest-wrap.done svg { opacity: .7; }
.chest-wrap.fixed { filter: drop-shadow(0 0 6px #8f74ff) drop-shadow(0 2px 2px rgba(0, 0, 0, .45)); }
.exp-box { background: var(--panel); border: 1px solid #3d5a76; border-radius: 14px; padding: 12px 14px; margin: 0 0 14px; }
.exp-box h3 { margin: 0 0 4px; font-size: 1.05rem; color: var(--gold); }
.exp-box .fine { margin: 0 0 8px; }
.exp-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.exp-item { display: grid; grid-template-columns: 28px 1fr; gap: 8px; align-items: start; font-size: .92rem; }
.exp-item .dot2 { width: 24px; height: 24px; border-radius: 50%; background: #35506a; color: #fff; text-align: center; line-height: 24px; font-weight: 800; font-size: .8rem; }
.exp-item.done .dot2 { background: var(--ok); color: #10161c; }
.exp-item .nm { font-weight: 700; }
.exp-item .tx { color: var(--muted); font-size: .85rem; line-height: 1.35; }
.progress { height: 10px; background: #0e1721; border: 1px solid #35506a; border-radius: 999px; overflow: hidden; width: 100%; }
.progress .bar { height: 100%; width: 0; background: linear-gradient(90deg, #8f74ff, #ffd54a); transition: width .6s; }
.story-panel { text-align: center; align-items: center; }
.story-badge { font-size: .8rem; letter-spacing: 1px; text-transform: uppercase; color: #c9bbff; font-weight: 700; }
.story-item { background: var(--panel2); border-radius: 12px; padding: 8px 14px; font-weight: 700; }
.story-panel p { text-align: left; }

/* doelkaart: tekst niet in een smalle kolom persen */
.goal-text { flex: 1 1 120px; min-width: 100px; }
.goal-card .btn { flex: 0 1 auto; }


/* ===== Avontuur-modus (adventure.js) ===== */
.adv-bar { background: linear-gradient(#24344a, #1c2a3b); border-bottom: 1px solid #35506a; padding: 6px calc(10px + var(--safe-r)) 7px calc(10px + var(--safe-l)); }
.adv-bar-top { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.adv-title { font-weight: 800; color: var(--gold); font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.adv-log-btn { min-height: 44px; flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; }
.adv-log-btn b { color: var(--gold); }
.adv-dot { font-size: 1rem; }
.adv-goal { display: flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--text); min-height: 22px; margin-top: -4px; }
.adv-goal span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.adv-goal-arrow { color: var(--gold); font-size: 1.15rem; width: 22px; text-align: center; flex: 0 0 22px; transition: transform .3s linear; }

/* kaart-iconen */
.adv-icon { background: none; border: 0; }
.adv-wrap { position: relative; width: 100%; height: 100%; border-radius: 50%; background: #fff; border: 3px solid #ffb300; box-shadow: 0 2px 6px rgba(0, 0, 0, .5); display: flex; align-items: center; justify-content: center; }
.adv-emo { font-size: 24px; line-height: 1; }
.adv-wrap.t-karakter { border-color: #3b82f6; background: #e8f1ff; }
.adv-wrap.t-spawn { border-color: #4cb860; background: #eaf9ee; }
.adv-wrap.t-spawn .adv-emo { font-size: 18px; }
.adv-wrap.t-beeld { border-radius: 8px; border-color: #8f8672; background: #e9e3d3; }
.adv-wrap.s-wacht { border-color: #8a929b; background: #cfd3d8; }
.adv-wrap.s-wacht .adv-emo { filter: grayscale(1); opacity: .55; }
.adv-wrap.in-range { animation: advpulse 1s ease-in-out infinite; }
@keyframes advpulse { 50% { transform: scale(1.18); } }
.adv-badge { position: absolute; right: -6px; top: -8px; min-width: 20px; height: 20px; border-radius: 999px; background: #ffd54a; color: #10161c; font-size: 13px; line-height: 20px; text-align: center; border: 2px solid #10161c; font-weight: 900; padding: 0 3px; }
.adv-badge.b-klaar { background: #4cd97b; }
.adv-badge.b-bezig { background: #9fb1c3; }
.adv-nm { position: absolute; left: 50%; top: 100%; transform: translateX(-50%); margin-top: 2px; background: rgba(16, 26, 36, .88); color: #fff; font-size: 11px; line-height: 1.2; padding: 1px 6px; border-radius: 8px; white-space: nowrap; max-width: 110px; overflow: hidden; text-overflow: ellipsis; }

/* infokaartje op de kaart (geen acties) */
.adv-info { position: absolute; top: 10px; left: calc(10px + var(--safe-l)); right: calc(10px + var(--safe-r)); z-index: 560; background: rgba(16, 26, 36, .96); border: 1px solid #35506a; border-radius: 14px; padding: 8px 6px 8px 12px; display: flex; align-items: center; gap: 10px; box-shadow: 0 2px 10px rgba(0, 0, 0, .4); }
.adv-info-e { font-size: 2rem; line-height: 1; }
.adv-info-t { flex: 1; min-width: 0; }
.adv-info-n { font-weight: 800; }
.adv-info-s { font-size: .82rem; color: var(--muted); }
.adv-info-h { font-size: .8rem; color: #ffe3a3; }
.adv-info-h:empty { display: none; }

/* vliegend item naar de rugzak */
.adv-fly { position: fixed; z-index: 3000; font-size: 44px; line-height: 1; pointer-events: none; transform: translate(-50%, -50%); filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .6)); }
.tab.bump .ti { animation: advbump .5s ease-out; }
@keyframes advbump { 30% { transform: scale(1.5) rotate(-8deg); } 100% { transform: scale(1); } }

/* onderste overlays (dialoog, logboek, item) */
.overlay.sheet { align-items: flex-end; padding: 10px 10px calc(10px + var(--safe-b)); }
.overlay.sheet .panel { max-height: 84dvh; overflow-y: auto; max-width: 440px; }
.adv-dlg-head { display: flex; align-items: center; gap: 12px; }
.adv-dlg-head h2 { font-size: 1.2rem; color: var(--gold); }
.adv-dlg-e { font-size: 2.6rem; line-height: 1; }
.adv-bubble { background: var(--panel2); border-radius: 12px; padding: 10px 12px; }
.adv-quest { background: #14212e; border: 1px solid #35506a; border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.adv-q-title { font-weight: 800; }
.adv-q-text { color: var(--muted); font-size: .92rem; }
.adv-q-h { font-size: .74rem; letter-spacing: .8px; text-transform: uppercase; color: #8cc4ff; margin-top: 4px; }
.adv-row, .adv-statue-row { display: flex; align-items: center; gap: 10px; min-height: 36px; }
.adv-row-e { font-size: 1.5rem; width: 32px; text-align: center; }
.adv-row-t { flex: 1; min-width: 0; }
.adv-row.ok .adv-row-t { color: var(--ok); }
.adv-row.ok .adv-row-t::before { content: "\2713 "; }
.adv-row.nee .adv-row-t { color: #ffb3b3; }
.adv-row.nee .adv-row-t::before { content: "\2717 "; }
.adv-row.get .adv-row-t { color: var(--gold); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* logboek */
.adv-log-body { display: flex; flex-direction: column; gap: 10px; }
.adv-log-sum { background: #14212e; border: 1px solid #35506a; border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.adv-log-big { font-weight: 800; }
.adv-log-badge { font-size: .92rem; color: var(--muted); }
.adv-log-badge.got { color: var(--gold); font-weight: 700; }
.adv-spoor { background: var(--panel2); border-radius: 12px; padding: 9px 12px; display: flex; flex-direction: column; gap: 6px; }
.adv-spoor.done { border: 1px solid var(--ok); }
.adv-spoor-top { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; }
.adv-spoor-t { color: var(--muted); white-space: nowrap; }
.adv-spoor-t.got { color: var(--gold); }
.progress.small { height: 7px; }

/* rugzak */
.adv-bag { margin: 0 0 12px; }
.adv-bag-h { margin: 0 0 6px; font-size: 1.05rem; color: var(--gold); }
.adv-bag-h.loose { margin-top: 18px; }
.adv-bag-g { margin: 12px 0 6px; font-size: .78rem; letter-spacing: .8px; text-transform: uppercase; color: #8cc4ff; }
.adv-card-item { font: inherit; color: inherit; width: 100%; }
button.adv-card-item.tap { cursor: pointer; min-height: 44px; }
.adv-statue-row { background: var(--panel); border-radius: 12px; padding: 6px 10px; margin-top: 6px; }

/* eindfeest */
.adv-confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.adv-party-panel { position: relative; z-index: 2; border-color: var(--gold); box-shadow: 0 0 40px rgba(255, 213, 74, .35); }
.adv-party-panel .reward-emoji { font-size: 6rem; }

@media (max-width: 400px) {
  .adv-title { font-size: .85rem; }
  .adv-log-btn { padding: 6px 8px; }
}

body.adv-on #toast { top: calc(128px + var(--safe-t)); }

/* plaatjes i.p.v. emoji (items/<id>.png, chars/<id>.png) */
.adv-ico { height: 1em; width: auto; max-width: 1.5em; object-fit: contain; vertical-align: -.12em; filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); }
.adv-ico-s { display: inline-block; font-size: 1.15em; line-height: 1; }
.adv-dlg-e.has-char { width: 56px; height: 56px; overflow: hidden; border-radius: 50%; background: #243246; border: 2px solid #5aa9ff; flex: none; }
.adv-dlg-e.has-char .adv-ico-char { width: 98px; height: auto; max-width: none; margin: 2px 0 0 -21px; border-radius: 0; filter: none; vertical-align: top; }
.bag-emoji .adv-ico { height: 1.15em; }
.adv-row-e .adv-ico { height: 1.15em; }
.reward-emoji .adv-ico { height: 1em; max-width: 1.2em; }

/* kaartmarkers met plaatje */
.adv-wrap .adv-mimg { width: 26px; height: 26px; object-fit: contain; display: block; margin: 0 auto; }
.adv-wrap .adv-mimg.char { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: 50% 0; transform: scale(2.3); transform-origin: 50% 8%; }
.adv-wrap .adv-emo { overflow: hidden; border-radius: 50%; }
.adv-wrap.t-karakter .adv-emo { width: 100%; height: 100%; }
#accBox { display: flex; flex-direction: column; gap: 10px; }
