/* Migi Fitness RPG — stijl */
:root {
  --bg: #08080a;
  --bg2: #0e0e11;
  --surface: #141416;
  --surface2: #1b1b1f;
  --surface3: #26262b;
  --line: #2e2b26;
  --text: #f6f3ec;
  --muted: #9c948a;
  --dim: #6b645c;
  --accent: #e8b84b;
  --accent-ink: #14100a;
  --accent-soft: rgba(232, 184, 75, .14);
  --gold: #ffc83d;
  --gold-ink: #221900;
  --hot: #ff5a36;
  --blue: #d9a441;
  --purple: #a77bff;
  --pink: #ff4fa3;
  --danger: #ff4d5e;
  --mm-base: #8e949c;
  --radius: 20px;
  --radius-sm: 14px;
  --font-display: 'Payback', 'Lilita One', 'Arial Rounded MT Bold', 'Trebuchet MS', system-ui, sans-serif;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --side: 256px;
  --tab: 68px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; background: radial-gradient(1200px 600px at 80% -10%, rgba(255, 200, 61, .10), transparent 60%), radial-gradient(900px 500px at -10% 110%, rgba(255, 200, 61, .05), transparent 60%), var(--bg); background-attachment: fixed; }
body.noscroll { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
input, select, textarea { font: inherit; color: var(--text); }
img, svg { max-width: 100%; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; letter-spacing: .01em; line-height: 1.05; margin: 0; }
h1 { font-size: clamp(2rem, 5vw, 2.9rem); }
h2 { font-size: 1.55rem; }
h3 { font-size: 1.2rem; }
p { margin: 0; }
.accent { color: var(--accent); }
.gold-txt { color: var(--gold); }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.eyebrow { font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.grow { flex: 1; min-width: 0; }
.ic { flex: none; display: block; }
.link { color: var(--blue); font-weight: 600; }
.link:hover { text-decoration: underline; }

/* ================= Layout ================= */
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--side); background: rgba(12, 12, 14, .92); backdrop-filter: blur(12px); border-right: 1px solid var(--line); padding: 22px 14px; display: flex; flex-direction: column; gap: 18px; overflow-y: auto; z-index: 20; }
.logo { display: flex; align-items: center; gap: 8px; padding: 0 8px; font-family: var(--font-display); font-size: 1.9rem; line-height: 1; letter-spacing: .02em; }
.logo em { font-style: normal; font-family: var(--font); font-weight: 800; font-size: .66rem; letter-spacing: .08em; background: var(--gold); color: var(--gold-ink); padding: 4px 7px; border-radius: 6px; }

@font-face { font-family: 'Payback'; src: url('../fonts/payback.ttf') format('truetype'); font-display: swap; }

/* ---------- Merk: Migi Beast Workout ---------- */
.brand-link { display: block; padding: 0 6px; align-self: center; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-badge { flex: none; width: 48px; height: 48px; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 2px rgba(255, 200, 61, .3), 0 6px 18px rgba(255, 200, 61, .22); transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
.brand-badge img { width: 100%; height: 100%; display: block; }
.brand-link:hover .brand-badge { transform: rotate(-10deg) scale(1.06); }
.brand-text { display: flex; flex-direction: column; line-height: .95; text-align: left; }
.brand-text small { font-size: .56rem; font-weight: 900; letter-spacing: .34em; color: var(--gold); }
.brand-text b { font-family: var(--font-display); font-weight: 400; font-size: 1.42rem; letter-spacing: .02em; color: var(--text); white-space: nowrap; }
.brand-text em { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; font-style: normal; font-size: .58rem; font-weight: 900; letter-spacing: .18em; background: var(--gold); color: var(--gold-ink); padding: 2px 7px 2px 6px; border-radius: 5px; }
.brand-md .brand-badge { width: 60px; height: 60px; }
.brand-md .brand-text b { font-size: 1.8rem; }
.brand-hero { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.brand-hero-badge { position: relative; width: min(220px, 55vw); aspect-ratio: 1; }
.brand-hero-badge img { position: relative; width: 100%; height: 100%; display: block; border-radius: 50%; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .5)); animation: bob 3.2s ease-in-out infinite; }
.brand-ring { position: absolute; inset: -12px; border-radius: 50%; background: conic-gradient(from 0deg, transparent, rgba(255, 200, 61, .95), transparent 35%, rgba(255, 233, 170, .85), transparent 70%); filter: blur(7px); animation: spin 4s linear infinite; }
.brand-hero-text { position: relative; display: flex; flex-direction: column; align-items: center; line-height: .9; }
.brand-hero-text .brand-ms { position: absolute; width: 140px; top: -30px; left: 50%; margin-left: -70px; opacity: .2; transform: rotate(-8deg); pointer-events: none; }
.brand-hero-text small { position: relative; font-size: .8rem; font-weight: 900; letter-spacing: .5em; color: var(--gold); margin-left: .5em; }
.brand-hero-text b { position: relative; font-family: var(--font-display); font-weight: 400; font-size: clamp(2.6rem, 11vw, 3.5rem); text-shadow: 0 4px 0 rgba(0, 0, 0, .45); }
.brand-hero-text em { position: relative; margin-top: 8px; display: inline-flex; align-items: center; gap: 6px; font-style: normal; font-weight: 900; font-size: .8rem; letter-spacing: .25em; background: var(--gold); color: var(--gold-ink); padding: 5px 12px; border-radius: 8px; box-shadow: 0 3px 0 #b98a14; }
.welcome-brand { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); z-index: 2; }
.welcome-art:not(.is-brand) { padding-top: 96px; }
.auth-mascot img { width: 180px; display: block; margin: 0 auto -8px; -webkit-mask-image: linear-gradient(#000 72%, transparent); mask-image: linear-gradient(#000 72%, transparent); filter: drop-shadow(0 12px 20px rgba(0, 0, 0, .4)); animation: bob 3s ease-in-out infinite; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.side-user:hover { border-color: var(--dim); }
.side-user .avatar-svg { width: 48px; flex: none; }
.side-user .grow { display: flex; flex-direction: column; gap: 3px; }
.side-user small { font-size: .74rem; font-weight: 700; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 12px; color: var(--muted); font-weight: 600; transition: background .15s, color .15s; }
.side-nav a:hover { background: var(--surface); color: var(--text); }
.side-nav a.active { background: var(--accent-soft); color: var(--accent); }
.side-nav .sep { height: 1px; background: var(--line); margin: 8px; }
.view { margin-left: var(--side); padding: 32px clamp(16px, 4vw, 48px) 140px; }
.page { max-width: 1080px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.tabbar { display: none; }
.is-bare .sidebar, .is-bare .tabbar { display: none !important; }
.is-bare .view { margin-left: 0; padding: 0; }

@media (max-width: 860px) {
  .sidebar { display: none; }
  .view { margin-left: 0; padding: 20px 16px calc(var(--tab) + 120px); }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--tab) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: rgba(12, 12, 14, .95); backdrop-filter: blur(14px); border-top: 1px solid var(--line); z-index: 30; }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: .68rem; font-weight: 700; color: var(--muted); }
  .tabbar a.active { color: var(--accent); }
  .tabbar a.center .tab-ic { background: var(--gold); color: var(--gold-ink); width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; margin-top: -20px; box-shadow: 0 6px 22px rgba(255, 200, 61, .3); }
  .tabbar a.center { color: var(--text); }
}

/* ================= Basis ================= */
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.row.center { justify-content: center; }
.row.wrap { flex-wrap: wrap; }
.row.top { align-items: flex-start; }
.row.gap-lg { gap: 22px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-sm { display: flex; flex-direction: column; gap: 6px; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.g3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); }
.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border-radius: 14px; font-weight: 800; background: var(--surface3); border: 1px solid transparent; white-space: nowrap; transition: transform .1s, filter .15s, background .15s, box-shadow .2s; }
.btn:hover { filter: brightness(1.1); }
.btn:active { transform: scale(.97); }
.btn.gold { background: var(--gold); color: var(--gold-ink); box-shadow: 0 4px 0 #b98a14; }
.btn.gold:active { box-shadow: 0 1px 0 #b98a14; transform: translateY(3px); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; border-color: var(--line); }
.btn.ghost:hover { background: var(--surface2); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.danger.ghost { background: transparent; color: var(--danger); border-color: rgba(255, 77, 94, .35); }
.btn.sm { padding: 7px 12px; font-size: .84rem; border-radius: 11px; }
.btn.sm.gold { box-shadow: 0 3px 0 #b98a14; }
.btn.big { padding: 13px 22px; font-size: 1rem; }
.btn.xl { padding: 17px 24px; font-size: 1.1rem; letter-spacing: .04em; font-family: var(--font-display); font-weight: 400; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.icon-btn { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: var(--muted); }
.icon-btn:hover { background: var(--surface3); color: var(--text); }
.icon-btn.on { color: var(--gold); }
.icon-btn.danger:hover { color: var(--danger); }
.icon-btn:disabled { opacity: .3; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 700; font-size: .9rem; align-self: flex-start; }
.back:hover { color: var(--text); }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips.center { justify-content: center; }
.chips.scroll-x { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips.scroll-x::-webkit-scrollbar { display: none; }
.chips.mini { gap: 4px; margin-top: 4px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; background: var(--surface2); border: 1px solid var(--line); font-size: .84rem; font-weight: 700; white-space: nowrap; color: var(--muted); }
.chip:hover { color: var(--text); }
.chip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chip.xs { padding: 2px 8px; font-size: .68rem; color: hsl(var(--h, 200) 85% 70%); background: hsl(var(--h, 200) 60% 50% / .12); border: 0; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; font-weight: 800; padding: 4px 9px; border-radius: 999px; background: var(--surface3); color: var(--muted); letter-spacing: .02em; }
.tag.lime { background: var(--accent-soft); color: var(--accent); }
.tag.gold { background: rgba(255, 200, 61, .14); color: var(--gold); }
.tag.solid { background: rgba(0, 0, 0, .35); color: #fff; }

.bar { height: 8px; background: var(--surface3); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 99px; transition: width 1.2s cubic-bezier(.2, .8, .2, 1); }
.bar.thin { height: 5px; }
.bar.big { height: 14px; }
.bar.xp i { background: linear-gradient(90deg, var(--gold), #ffe27a, var(--gold)); background-size: 200% 100%; animation: shimmer 2.5s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span, .field > label { font-size: .78rem; font-weight: 800; color: var(--muted); letter-spacing: .03em; }
.field input, .field select, .field textarea, .input { width: 100%; background: var(--surface2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 13px; outline: none; transition: border-color .15s, box-shadow .15s; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(217, 164, 65, .22); }
.field.sm input { padding: 9px 10px; }
textarea { resize: vertical; }
.check-line { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.check-line input, .toggle input { width: 18px; height: 18px; accent-color: var(--gold); }
.toggle { display: flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
.seg { display: inline-flex; background: var(--surface2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; align-self: flex-start; }
.seg button { display: inline-flex; align-items: center; gap: 4px; padding: 7px 16px; border-radius: 9px; font-weight: 800; color: var(--muted); }
.seg button.on { background: var(--gold); color: var(--gold-ink); }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line); }
.swatch.on { box-shadow: 0 0 0 3px var(--gold); }
.search { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 0 14px; color: var(--muted); }
.search:focus-within { border-color: var(--blue); }
.search input { flex: 1; background: none; border: 0; outline: none; padding: 13px 0; min-width: 0; }
.empty { text-align: center; padding: 34px 18px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty .ic { color: var(--dim); }
.page-head { display: flex; flex-direction: column; gap: 8px; }
.page-head.row { flex-direction: row; align-items: flex-end; }
.page-head p.muted { max-width: 64ch; }
.note, .tip { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; border-radius: 14px; padding: 12px 14px; }
.note { color: var(--muted); background: var(--surface); border: 1px dashed var(--line); }
.note .ic { color: var(--blue); margin-top: 2px; }
.tip { background: var(--surface2); }
.tip .ic { color: var(--gold); margin-top: 2px; }

.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; min-width: 0; position: relative; }
.tile small { color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.tile b { font-family: var(--font-display); font-weight: 400; font-size: 1.75rem; line-height: 1.05; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile b.sm { font-size: 1.15rem; white-space: normal; }
.tile.icon-tile { padding-left: 16px; }
.tile-ic { position: absolute; top: 12px; right: 12px; color: var(--dim); }
a.tile:hover { border-color: var(--dim); }

.list { display: flex; flex-direction: column; gap: 8px; }
.list-item { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
a.list-item:hover { border-color: var(--dim); }
.list-item .grow { display: flex; flex-direction: column; gap: 2px; }
.list-item small { color: var(--muted); font-size: .8rem; }
.list-item > .ic:last-child { color: var(--dim); }
.list-item > .ic:first-child { color: var(--gold); }
.hist-date { width: 48px; flex: none; text-align: center; background: var(--surface2); border-radius: 12px; padding: 6px 0; display: flex; flex-direction: column; }
.hist-date b { font-family: var(--font-display); font-weight: 400; font-size: 1.45rem; line-height: 1; }
.hist-date small { font-size: .64rem !important; text-transform: uppercase; font-weight: 800; }
.rec-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.rec-row:last-child { border-bottom: 0; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: .75rem; font-weight: 700; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.hbars { display: flex; flex-direction: column; gap: 10px; }
.hbar { display: grid; grid-template-columns: 110px 1fr 36px; gap: 10px; align-items: center; font-size: .86rem; font-weight: 700; }
.hbar .bar { height: 10px; }
.hbar span:last-child { text-align: right; color: var(--muted); }

/* ================= Grafieken ================= */
.ring { position: relative; flex: none; }
.ring svg { width: 100%; height: 100%; display: block; }
.ring-bg { fill: none; stroke: var(--surface3); }
.ring-fg { fill: none; stroke-linecap: round; transition: stroke-dashoffset 1.3s cubic-bezier(.2, .8, .2, 1); }
.ring-inner { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; line-height: 1.05; }
.ring-inner b { font-family: var(--font-display); font-weight: 400; font-size: 1.35rem; }
.ring-inner small { font-size: .62rem; color: var(--muted); font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { font-family: var(--font); fill: var(--muted); font-size: 15px; font-weight: 700; }
.chart .val { fill: var(--text); font-size: 14px; }
.chart .grid-line { stroke: var(--line); stroke-dasharray: 4 6; }
.grow-bar { transform-box: fill-box; transform-origin: bottom; animation: growY .8s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes growY { from { transform: scaleY(0); } }
.draw-line { stroke-dasharray: 3000; stroke-dashoffset: 3000; animation: draw 1.4s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.radar { width: 100%; max-width: 380px; margin: 0 auto; display: block; }
.radar-grid { fill: none; stroke: var(--line); stroke-width: 1.5; }
.radar-data { fill: rgba(255, 200, 61, .22); stroke: var(--gold); stroke-width: 3; stroke-linejoin: round; animation: fade .8s ease; }
.radar-label { font-family: var(--font); font-size: 13px; font-weight: 800; fill: var(--muted); }

/* ================= Welkom & auth ================= */
.welcome, .auth { min-height: 100vh; display: flex; flex-direction: column; max-width: 520px; margin: 0 auto; }
.welcome-art { flex: 1; min-height: 46vh; display: grid; place-items: center; padding: 30px 20px; position: relative; overflow: hidden; }
.welcome-sheet, .auth-sheet { position: relative; background: var(--surface); border: 1px solid var(--line); border-bottom: 0; border-radius: 28px 28px 0 0; padding: 26px 22px calc(26px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 16px; animation: slideUp .45s cubic-bezier(.2, .8, .2, 1); }
.welcome-sheet { text-align: center; }
.welcome-sheet h1 { font-size: 2rem; }
.welcome-sheet p { color: var(--muted); }
@keyframes slideUp { from { transform: translateY(40px); opacity: 0; } }
.grabber { width: 54px; height: 5px; border-radius: 5px; background: var(--blue); align-self: center; margin-top: -8px; }
.dots { display: flex; justify-content: center; gap: 8px; }
.dots button { width: 9px; height: 9px; border-radius: 9px; background: var(--surface3); transition: width .25s, background .25s; }
.dots button.on { width: 26px; background: var(--gold); }
.art { width: 100%; max-width: 380px; display: grid; place-items: center; position: relative; animation: pop .5s cubic-bezier(.2, .8, .2, 1); }
.art-avatar .avatar-svg { width: min(250px, 60vw); position: relative; animation: bob 3s ease-in-out infinite; }
.art-glow { position: absolute; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 79, 163, .45), transparent 65%); animation: pulseGlow 3s ease-in-out infinite; }
.art-xp { min-height: 260px; }
.art-xp-card { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.art-xp-card b { font-family: var(--font-display); font-weight: 400; font-size: 1.3rem; }
.fill-loop { animation: fillLoop 3s ease-in-out infinite; }
@keyframes fillLoop { 0% { width: 20%; } 70%, 100% { width: 100%; } }
.xp-float { position: absolute; font-family: var(--font-display); font-size: 2rem; color: var(--gold); top: 8%; left: 10%; animation: floatUp 3s ease-in-out infinite; text-shadow: 0 4px 20px rgba(255, 200, 61, .5); }
.xp-float.f2 { font-size: 1.2rem; color: var(--hot); left: auto; right: 6%; top: 22%; animation-delay: .8s; }
.xp-float.f3 { font-size: 1.1rem; color: var(--pink); top: 72%; left: 60%; animation-delay: 1.6s; }
@keyframes floatUp { 0%, 100% { transform: translateY(10px); opacity: .4; } 50% { transform: translateY(-10px); opacity: 1; } }
.art-map { max-height: 340px; overflow: hidden; border-radius: 20px; box-shadow: 0 20px 50px rgba(0, 0, 0, .5); align-items: start; }
.art-avatar.duo { display: flex; justify-content: center; align-items: flex-end; }
.art-avatar.duo .avatar-svg { width: min(190px, 42vw); }
.art-avatar.duo { gap: 12px; }
/* Getekende helden */
.hero-pic { display: block; position: relative; overflow: hidden; background: var(--surface2); border: 2px solid var(--rc, var(--line)); }
.hero-pic svg { display: block; width: 100%; height: 100%; }
.av-tabs { display: flex; gap: 4px; background: var(--surface2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
.av-tabs button { padding: 7px 12px; border-radius: 9px; font-weight: 800; font-size: .84rem; color: var(--muted); white-space: nowrap; }
.av-tabs button.on { background: var(--gold); color: var(--gold-ink); }
.av-pane { animation: fade .25s ease; }
/* Held van eigen foto */
.photo-upload { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 22px 16px; border: 2px dashed var(--line); border-radius: 18px; background: var(--surface2); }
.photo-upload .big-ic { color: var(--gold); }
.photo-upload h3 { margin: 0; }
.photo-upload small { display: inline-flex; align-items: center; gap: 5px; }
.photo-hero { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; background: var(--surface2); border: 1px solid var(--line); border-radius: 16px; padding: 12px; }
.photo-hero img { width: 76px; aspect-ratio: 332 / 400; object-fit: cover; border-radius: 50%; border: 3px solid var(--gold); flex: none; }
.cropper { display: grid; grid-template-columns: 280px 1fr; gap: 18px; align-items: start; }
@media (max-width: 600px) { .cropper { grid-template-columns: 1fr; } }
.cropper-stage { position: relative; width: 100%; max-width: 280px; margin: 0 auto; border-radius: 18px; overflow: hidden; background: #000; }
.cropper-stage canvas { display: block; width: 100%; height: auto; touch-action: none; cursor: grab; }
.cropper-stage canvas:active { cursor: grabbing; }
.crop-oval { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse closest-side, transparent 97%, rgba(255, 200, 61, .95) 97.5%, rgba(255, 200, 61, .95) 99%, rgba(4, 7, 14, .6) 99.5%); }
.evo-step .avatar-svg { width: 100%; border-radius: 12px; box-shadow: none; }
.evo-step .hero-rank { display: none; }
.hero-pic img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; user-select: none; }
.hero-pic.is-full { aspect-ratio: 600 / 1066; border-radius: 22px; box-shadow: 0 16px 40px rgba(0, 0, 0, .45); }
.hero-pic.is-face { aspect-ratio: 1; border-radius: 14px; }
.hero-pic.tier-0 { border-color: var(--line); }
.hero-pic.tier-6, .hero-pic.tier-7 { box-shadow: 0 0 0 2px var(--rc), 0 0 34px color-mix(in srgb, var(--rc) 60%, transparent); }
.hero-rank { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); white-space: nowrap; padding: 3px 10px; border-radius: 99px; background: var(--rc); color: #0a0c0f; font-family: var(--font-display); font-size: .82rem; box-shadow: 0 4px 12px rgba(0, 0, 0, .4); }
.hero-picker .hero-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.hero-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px 6px 8px; border-radius: 16px; background: var(--surface2); border: 2px solid var(--line); transition: border-color .2s, transform .15s; }
.hero-card img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 11px; }
.hero-card b { font-family: var(--font-display); font-weight: 400; font-size: 1.05rem; }
.hero-card:hover { border-color: var(--dim); }
.hero-card.on { border-color: var(--gold); transform: scale(1.03); background: rgba(255, 200, 61, .08); }
.evo { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.evo-step { flex: 1 0 72px; max-width: 110px; display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; position: relative; }
.evo-step.on .hero-pic { border-color: var(--gold); }
.evo-step b { font-size: .8rem; }
.evo-step small { font-size: .72rem; color: var(--muted); }
.evo-step + .evo-step::before { content: '›'; position: absolute; left: -9px; top: 28%; color: var(--gold); font-weight: 900; }
.art-medals { height: 280px; }
.pile { position: absolute; animation: drop .6s cubic-bezier(.2, .8, .2, 1) both; }
.pile .medal { filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .45)); }
.p0 { left: 6%; top: 40%; transform: rotate(-14deg); animation-delay: .05s; } .p1 { left: 26%; top: 20%; transform: rotate(8deg); animation-delay: .12s; }
.p2 { left: 46%; top: 42%; transform: rotate(-6deg); animation-delay: .19s; } .p3 { left: 64%; top: 16%; transform: rotate(16deg); animation-delay: .26s; }
.p4 { left: 76%; top: 46%; transform: rotate(-10deg); animation-delay: .33s; } .p5 { left: 16%; top: 62%; transform: rotate(12deg); animation-delay: .4s; }
.p6 { left: 38%; top: 64%; transform: rotate(-18deg); animation-delay: .47s; } .p7 { left: 58%; top: 66%; transform: rotate(6deg); animation-delay: .54s; }
.p8 { left: 36%; top: 0%; transform: rotate(-4deg); animation-delay: .61s; }
@keyframes drop { from { opacity: 0; translate: 0 -60px; } }
.auth-top { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 26px 20px 30px; background: radial-gradient(circle at 50% 60%, rgba(255, 200, 61, .32), transparent 65%); }
.auth-top .logo { margin-bottom: 6px; }
.auth-top h1 { font-size: 2.1rem; }
.auth-top p { color: var(--muted); font-weight: 600; }
.auth-mascot .avatar-svg { width: 130px; animation: bob 3s ease-in-out infinite; filter: drop-shadow(0 12px 20px rgba(0, 0, 0, .4)); }
.pw { position: relative; }
.pw input { padding-right: 46px; }
.pw .icon-btn { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); }
.form-error { color: var(--danger); background: rgba(255, 77, 94, .1); border-radius: 10px; padding: 10px 12px; font-weight: 600; font-size: .9rem; }
.shake { animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-8px); } 50% { transform: translateX(8px); } 75% { transform: translateX(-4px); } }
.divider { display: flex; align-items: center; gap: 10px; color: var(--dim); font-size: .8rem; font-weight: 700; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.social { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.social-btn { background: var(--surface2); border: 1px solid var(--line); }
.soc { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: .8rem; }
.soc.g { background: #fff; color: #4285f4; }
.soc.a { background: #000; color: #fff; }
.pw-meter { height: 5px; border-radius: 5px; background: var(--surface3); overflow: hidden; margin-top: -6px; }
.pw-meter i { display: block; height: 100%; width: 0; transition: width .3s, background .3s; }
.pw-hint { margin-top: -8px; }
.big-ic { width: 70px; height: 70px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 200, 61, .15); color: var(--gold); align-self: center; }
.code { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 1.8rem; font-weight: 800; letter-spacing: .15em; background: var(--surface2); border: 2px dashed var(--gold); border-radius: 14px; padding: 14px; color: var(--gold); }

/* ================= Onboarding ================= */
.onboard { min-height: 100vh; display: flex; flex-direction: column; max-width: 900px; margin: 0 auto; padding: 20px 16px 0; }
.ob-head { display: flex; flex-direction: column; gap: 18px; align-items: center; }
.ob-steps { display: flex; gap: 6px; width: 100%; max-width: 560px; }
.ob-steps span { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--dim); font-weight: 700; font-size: .7rem; position: relative; }
.ob-steps i { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface2); border: 2px solid var(--line); font-style: normal; font-weight: 800; transition: all .3s; }
.ob-steps span.on { color: var(--text); }
.ob-steps span.on i { border-color: var(--gold); color: var(--gold); transform: scale(1.12); }
.ob-steps span.done i { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
@media (max-width: 500px) { .ob-steps small { display: none; } }
.ob-body { flex: 1; padding: 26px 0; display: flex; flex-direction: column; gap: 14px; animation: fade .35s ease; }
.ob-grid { display: grid; grid-template-columns: 280px 1fr; gap: 26px; align-items: start; }
@media (max-width: 720px) { .ob-grid { grid-template-columns: 1fr; } }
.ob-preview { position: sticky; top: 16px; background: radial-gradient(circle at 50% 40%, rgba(255, 200, 61, .18), transparent 65%), var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 20px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; }
@media (max-width: 720px) { .ob-preview { position: static; } }
.ob-avatar .avatar-svg { width: 190px; }
.ob-foot { position: sticky; bottom: 0; display: flex; justify-content: space-between; gap: 10px; padding: 14px 0 calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 30%); }
.choice-list { display: flex; flex-direction: column; gap: 10px; }
.choice { display: flex; align-items: center; gap: 14px; text-align: left; background: var(--surface); border: 2px solid var(--line); border-radius: 18px; padding: 14px 16px; transition: border-color .2s, transform .15s, background .2s; }
.choice:hover { border-color: var(--dim); }
.choice.on { border-color: var(--gold); background: rgba(255, 200, 61, .06); transform: scale(1.01); }
.choice .grow { display: flex; flex-direction: column; gap: 3px; }
.choice b { font-family: var(--font-display); font-weight: 400; font-size: 1.25rem; }
.choice small { color: var(--muted); }
.choice-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--surface2); color: var(--gold); flex: none; }
.radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--dim); flex: none; position: relative; }
.choice.on .radio { border-color: var(--gold); }
.choice.on .radio::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--gold); }
.choice.on .radio.check::after { border-radius: 4px; }
.choice.locked { opacity: .7; }
.level-card { padding: 10px 10px 10px 18px; }
.level-art { width: 96px; height: 110px; flex: none; background: var(--surface2); border-radius: 14px; display: grid; place-items: center; overflow: hidden; }
.level-art .avatar-svg { width: 100%; height: 100%; aspect-ratio: auto; border: 0; border-radius: 0; box-shadow: none; }
.level-art .hero-rank { display: none; }
.stepper { display: flex; align-items: center; justify-content: space-between; background: var(--surface2); border: 1px solid var(--line); border-radius: 14px; padding: 4px; }
.stepper button { width: 40px; height: 40px; border-radius: 10px; font-size: 1.3rem; font-weight: 800; }
.stepper button:hover { background: var(--surface3); }
.stepper span { font-weight: 800; font-variant-numeric: tabular-nums; }
.stepper.big { max-width: 260px; }
.stepper.big b { font-family: var(--font-display); font-weight: 400; font-size: 1.6rem; color: var(--gold); }
.av-editor { display: flex; flex-direction: column; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 14px; }
.seg.small-seg { align-self: center; margin-top: 8px; }
.seg.small-seg button { padding: 5px 10px; font-size: .76rem; }

/* ================= World ================= */
.hero-bar { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; background: linear-gradient(135deg, rgba(255, 200, 61, .16), rgba(180, 130, 30, .08)), var(--surface); border: 1px solid var(--line); border-radius: 26px; padding: 16px 20px; }
.hero-bar-avatar { width: 104px; flex: none; background: radial-gradient(circle at 50% 55%, rgba(255, 200, 61, .25), transparent 70%); border-radius: 20px; }
.hero-bar-avatar .avatar-svg { width: 100%; animation: bob 3.2s ease-in-out infinite; }
.hero-bar .grow { min-width: 220px; }
.lvl-title { font-size: 2.3rem; }
.rank-pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 12px; border-radius: 999px; font-weight: 800; font-size: .78rem; color: var(--rc, var(--text)); background: color-mix(in srgb, var(--rc, #fff) 16%, transparent); border: 1px solid color-mix(in srgb, var(--rc, #fff) 40%, transparent); }
.rank-pill.gold { --rc: var(--gold); }
.hero-bar-rings { display: flex; align-items: center; gap: 14px; }
.streak-box { display: flex; flex-direction: column; align-items: center; color: var(--hot); min-width: 70px; }
.streak-box .ic { animation: flicker 1.5s ease-in-out infinite; }
.streak-box b { font-family: var(--font-display); font-weight: 400; font-size: 1.8rem; line-height: 1; color: var(--text); }
.streak-box small { font-size: .64rem; font-weight: 800; text-transform: uppercase; color: var(--muted); }
@keyframes flicker { 50% { transform: scale(1.12) rotate(-4deg); } }
.resume-card { display: flex; align-items: center; gap: 12px; background: var(--accent); color: var(--accent-ink); border: 0; }
.resume-card .eyebrow { color: rgba(15, 12, 6, .6); }
.resume-card b { font-family: var(--font-display); font-weight: 400; font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: currentColor; animation: blink 1.4s infinite; flex: none; }
@keyframes blink { 50% { opacity: .25; } }
.quests { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.quest { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 20px; background: linear-gradient(135deg, hsl(var(--h) 70% 50% / .22), transparent 70%), var(--surface); border: 1px solid hsl(var(--h) 70% 55% / .45); transition: transform .15s; }
.quest:hover { transform: translateY(-2px); }
.quest-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font-size: 1.6rem; background: hsl(var(--h) 80% 55%); color: #0f0c06; flex: none; }
.quest .grow { display: flex; flex-direction: column; }
.quest small { color: var(--muted); font-weight: 700; font-size: .72rem; }
.quest b { font-family: var(--font-display); font-weight: 400; font-size: 1.3rem; }
.quest-go { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: var(--gold-ink); flex: none; box-shadow: 0 3px 0 #b98a14; }
.cta { display: flex; align-items: center; gap: 14px; }
.cta:hover { border-color: var(--gold); }
.cta > .ic:first-child { color: var(--gold); }
.world-wrap { border-radius: 26px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(0, 0, 0, .35); }
.world-scroll { max-width: 560px; width: 100%; margin: 0 auto; height: min(760px, 78vh); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
/* ---------- Fitness World Map: 100 levels ---------- */
.lvl-map { position: relative; width: 100%; background: #171310 url(../img/map-tile.jpg) top center / 100% auto repeat-y; container-type: inline-size; }
.map-stage-bar { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; background: #ffd23f; color: #15181f; box-shadow: 0 4px 14px rgba(0, 0, 0, .3); }
.map-stage-bar b { font-family: var(--font-display); font-weight: 400; font-size: 1.5rem; }
.map-stage-bar span { font-weight: 800; }
.map-stage-bar p { font-weight: 600; font-size: .84rem; opacity: .8; }
.map-stage-bar .icon-btn { color: #15181f; }
.map-stage-bar .icon-btn:hover { background: rgba(0, 0, 0, .1); color: #15181f; }
.lvl-plate { position: absolute; transform: translate(-50%, -50%); aspect-ratio: 1; padding: 0; border-radius: 50%; transition: transform .2s; }
.lvl-plate svg { width: 100%; height: 100%; display: block; overflow: visible; }
.lvl-plate:hover, .lvl-plate:focus-visible { transform: translate(-50%, -50%) scale(1.06); outline: none; }
.lvl-plate.locked { cursor: not-allowed; }
.lvl-plate.current::before { content: ''; position: absolute; inset: -4%; border-radius: 50%; border: 4px solid #ffc83d; animation: lvlPulse 1.8s ease-out infinite; }
@keyframes lvlPulse { from { transform: scale(.92); opacity: 1; } to { transform: scale(1.3); opacity: 0; } }
.lp-arc { font-family: var(--font); font-size: 15px; font-weight: 900; letter-spacing: 3px; }
.lp-side { font-family: var(--font); font-size: 12px; font-weight: 900; letter-spacing: 1px; }
.lp-num { font-family: var(--font-display); }
.lvl-tag { position: absolute; left: 0; width: 23.4%; aspect-ratio: 220 / 77; display: flex; align-items: center; padding-left: 3.2cqw; background: #ffd23f; color: #15181f; font-family: var(--font-display); font-size: 3.5cqw; border-radius: 0 1.8cqw 1.8cqw 0; box-shadow: 0 .6cqw 1.2cqw rgba(0, 0, 0, .25); white-space: nowrap; }
.lvl-stage-sep { position: absolute; left: 50%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 6px; padding: 1.2cqw 3cqw; border-radius: 999px; background: #15181f; color: #ffd23f; border: 2px solid #ffd23f; font-weight: 900; font-size: 2.8cqw; white-space: nowrap; box-shadow: 0 .8cqw 2cqw rgba(0, 0, 0, .4); }
.art-map .lvl-map { border-radius: 20px; }
.lvl-mini { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); background: #45494f; border: 3px solid #8d939c; }
.lvl-mini.done { border-color: var(--gold); background: #6b4f00; }
.lvl-mini.current { border-color: #29b6f6; background: #0e4a60; }
.level-quest.boss .lq-num { border-color: #e2433b; }
.level-hero.boss { border-color: #e2433b; }
.rule-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; color: var(--muted); }
.rule-list b { color: var(--text); }
.zone-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.zone-card { display: flex; flex-direction: column; align-items: stretch; gap: 0; text-align: center; padding: 0; overflow: hidden; background: var(--surface); }
.zone-card b, .zone-card small { padding: 0 10px; }
.zone-card b { margin-top: 10px; }
.zone-card small:last-child { padding-bottom: 12px; }
.zone-card:hover { border-color: var(--gold); }
.zone-card-art { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; border-bottom: 1px solid var(--line); }
.zone-card small { color: var(--muted); font-weight: 700; font-size: .74rem; display: inline-flex; align-items: center; gap: 4px; }
.zone-card.locked .zone-card-art, .zone-card.premium .zone-card-art { filter: grayscale(1) brightness(.5); }
.wo-ex.waiting { opacity: .55; }
.strict-req { display: flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 800; color: var(--gold); }
.strict-wait { font-size: .82rem; font-weight: 800; color: #f3d489; background: rgba(255, 200, 61, .12); border-radius: 10px; padding: 7px 10px; }
.strict-wait.ready { color: var(--accent); background: var(--accent-soft); }
.check.locked { opacity: .45; }
.strict-note { border-color: var(--gold); border-style: solid; }
.strict-note .ic { color: var(--gold); }
.level-quest { display: flex; align-items: center; gap: 14px; background: linear-gradient(90deg, hsl(var(--h, 45) 75% 50% / .18), transparent 70%), var(--surface); border-color: hsl(var(--h, 45) 70% 55% / .45); }
.level-quest:hover { border-color: var(--gold); }
.level-quest.ready { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset, 0 0 26px rgba(255, 200, 61, .18); }
.level-quest b { font-family: var(--font-display); font-weight: 400; font-size: 1.35rem; }
.level-quest > .ic { color: var(--muted); }
.lq-num { width: 56px; height: 56px; flex: none; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-size: 1.8rem; color: #fff; background: #2a2e36; border: 6px solid #29b6f6; box-shadow: 0 4px 12px rgba(0, 0, 0, .35); }
.level-quest.ready .lq-num { border-color: var(--gold); }
.world { display: block; width: 100%; height: auto; }
.world .belt { animation: belt .5s linear infinite; }
@keyframes belt { to { transform: translateY(10px); } }
.world .screen { animation: blink 2.4s ease-in-out infinite; }
.world .rope { animation: rope 1.1s ease-in-out infinite; transform-box: fill-box; transform-origin: right center; }
.world .rope.r2 { animation-delay: .55s; }
@keyframes rope { 50% { transform: scaleY(-1); } }
.world .zzz { animation: floatUp 3s ease-in-out infinite; }
.world .gym-sign { font-family: var(--font-display); font-size: 27px; letter-spacing: .14em; }
.world .bar-sign { font-family: var(--font); font-size: 11px; font-weight: 900; fill: #2b313b; letter-spacing: .14em; }
.world .neon { animation: neon 4s ease-in-out infinite; filter: drop-shadow(0 0 8px var(--neon)); }
@keyframes neon { 0%, 16%, 20%, 100% { opacity: 1; } 18% { opacity: .45; } }
.world .spot { animation: pulseGlow 5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.world .beam { transform-box: view-box; animation: beam 8s ease-in-out infinite; }
@keyframes beam { 0%, 100% { transform: rotate(-12deg); } 50% { transform: rotate(12deg); } }
.world.era-7 .zone-name, .world.era-7 .era-txt { fill: #fff; }
.road { fill: none; stroke-width: 9; stroke-linecap: round; stroke-dasharray: 2 18; opacity: .9; }
.road.on { stroke-dasharray: 16 12; animation: march 2s linear infinite; }
@keyframes march { to { stroke-dashoffset: -56; } }
.zone { cursor: pointer; outline: none; }
.zone-art { transform-box: fill-box; transform-origin: 50% 90%; transition: transform .25s; }
.zone:not(.locked) .zone-art { animation: bob 3.5s ease-in-out infinite; }
.zone:hover .zone-art, .zone:focus-visible .zone-art { transform: scale(1.12); }
.zone:focus-visible .zone-pad { stroke: #fff; stroke-width: 3; }
.zone.locked .zone-art { filter: grayscale(1) brightness(.45); }
.zone.locked { cursor: not-allowed; }
.zone-name { font-family: var(--font); font-size: 15px; font-weight: 800; fill: #fff; }
.zone-new circle { animation: pulseDot 1.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.zone-new text { font-family: var(--font); font-weight: 900; font-size: 16px; fill: #231a00; }
.lock-txt { font-family: var(--font); font-size: 12px; font-weight: 900; fill: #fff; letter-spacing: .08em; }
.era-txt { font-family: var(--font); font-size: 13px; font-weight: 900; fill: #fff; letter-spacing: .1em; }
.zone.fresh .zone-art { animation: unlockPop 1.2s cubic-bezier(.2, .8, .2, 1) both, bob 3.5s 1.2s ease-in-out infinite; }
.zone-burst { transform-box: fill-box; transform-origin: center; animation: burst 1.6s ease-out 3; }
@keyframes unlockPop { 0% { transform: scale(0) rotate(-20deg); } 60% { transform: scale(1.3); } 100% { transform: scale(1); } }
@keyframes burst { from { transform: scale(.3); opacity: 1; } to { transform: scale(1.8); opacity: 0; } }
.glow-dot { animation: pulseDot 2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.flame { animation: flicker 1s ease-in-out infinite; transform-box: fill-box; transform-origin: bottom; }
.flag { animation: wave 1.6s ease-in-out infinite; transform-box: fill-box; transform-origin: left center; }
.bubble { animation: bubble 2s ease-in infinite; }
.bubble.b2 { animation-delay: .9s; }
.palm { animation: sway 4s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 40%; }
@keyframes pulseDot { 50% { transform: scale(1.3); } }
@keyframes wave { 50% { transform: skewY(8deg) scaleX(.85); } }
@keyframes bubble { from { transform: translateY(0); opacity: 1; } to { transform: translateY(-26px); opacity: 0; } }
@keyframes sway { 50% { transform: rotate(4deg); } }
@keyframes bob { 50% { transform: translateY(-5px); } }
@keyframes pulseGlow { 50% { transform: scale(1.12); opacity: .7; } }
.mini-ch { display: flex; flex-direction: column; gap: 6px; }

.zone-hero { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; background: linear-gradient(135deg, hsl(var(--h) 75% 50% / .3), transparent 70%), var(--surface); border: 1px solid hsl(var(--h) 70% 55% / .4); border-radius: 26px; padding: 18px 22px; }
.zone-hero-art { width: min(260px, 40%); flex: none; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 16px; border: 1px solid var(--line); }
.zone-hero > div { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 6px; }
.locked-zone { align-items: center; padding: 34px; }
.locked-zone > .ic { color: var(--dim); }
.stat-hero { display: flex; align-items: center; gap: 14px; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 14%, transparent), transparent 60%), var(--surface); }
.stat-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--c, var(--gold)) 16%, transparent); color: var(--c, var(--gold)); }
.stat-line { display: flex; gap: 12px; align-items: flex-start; padding: 6px 0; }
.stat-line .grow { display: flex; flex-direction: column; gap: 5px; }
.action { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; text-align: left; transition: border-color .2s, transform .15s; }
.action:hover:not(:disabled) { border-color: var(--purple); transform: translateY(-2px); }
.action small { color: var(--muted); }
.action-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: rgba(255, 200, 61, .14); color: var(--gold); }
.action.done { opacity: .7; }
.action.done .action-ic { background: var(--accent-soft); color: var(--accent); }
.challenge { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.challenge.done:not(.claimed) { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset, 0 0 30px rgba(255, 200, 61, .12); }
.challenge.claimed { opacity: .75; }
.challenge.locked { opacity: .65; }
.challenge .grow { min-width: 200px; }
.pulse-btn { animation: pulseBtn 1.4s ease-in-out infinite; }
@keyframes pulseBtn { 50% { transform: scale(1.06); } }
.meal h3 { margin: 4px 0; }
.medal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 12px; }
.medal-tile { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 12px 6px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); transition: transform .2s; }
.medal-tile:hover { transform: translateY(-3px); }
.medal-tile b { font-size: .84rem; line-height: 1.2; }
.medal-tile small { color: var(--muted); font-size: .72rem; }
.medal-tile.locked b { color: var(--muted); }
.medal-tile.pop { animation: medalPop .7s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes medalPop { 0% { transform: scale(0) rotate(-30deg); opacity: 0; } 70% { transform: scale(1.15) rotate(4deg); opacity: 1; } 100% { transform: scale(1); } }
.medal { display: block; }
.medal.locked { filter: grayscale(1) brightness(.4); }
.medal-big { display: grid; place-items: center; }
.medal-big.shine .medal { animation: medalShine 2.5s ease-in-out infinite; }
@keyframes medalShine { 50% { filter: drop-shadow(0 0 22px rgba(255, 200, 61, .7)); transform: rotate(-4deg) scale(1.04); } }
.medal-toast { display: flex; align-items: center; gap: 10px; text-align: left; }
.medal-toast small { display: block; color: var(--gold); font-size: .72rem; font-weight: 800; text-transform: uppercase; }
.coach-tip { display: flex; align-items: center; gap: 14px; }
.coach-tip:hover { border-color: var(--c); }
.paywall { position: relative; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 26px 20px; border-radius: 24px; background: linear-gradient(160deg, #1b7fd1, #3a4bd8 55%, #6a3ad8); color: #fff; overflow: hidden; }
.paywall::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(-45deg, rgba(255, 255, 255, .05) 0 12px, transparent 12px 26px); }
.paywall > * { position: relative; }
.paywall p { opacity: .85; max-width: 44ch; }
.pw-art { width: 110px; position: relative; }
.pw-art .avatar-svg { width: 100%; filter: saturate(.8); }
.pw-lock { position: absolute; right: 0; bottom: 14px; width: 40px; height: 40px; border-radius: 50%; background: var(--gold); color: var(--gold-ink); display: grid; place-items: center; box-shadow: 0 4px 12px rgba(0, 0, 0, .3); }

/* ================= Programma's ================= */
.prog-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(160px, 190px); gap: 14px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.prog-tile { display: flex; flex-direction: column; gap: 6px; scroll-snap-align: start; }
.prog-tile .cover { transition: transform .2s; }
.prog-tile:hover .cover { transform: translateY(-4px) rotate(-1deg); }
.prog-tile b { font-weight: 800; line-height: 1.2; }
.prog-tile small { color: var(--muted); font-size: .76rem; }
.tile-progress { margin-top: -2px; }
.cover { position: relative; aspect-ratio: 1; max-width: 100%; border-radius: 22px; overflow: hidden; padding: 14px; display: flex; align-items: flex-end; color: #fff; box-shadow: 0 10px 24px rgba(0, 0, 0, .35); background: linear-gradient(145deg, hsl(var(--h) 90% 58%), hsl(calc(var(--h) + 35) 75% 30%)); }
.cover::before { content: ''; position: absolute; inset: 0; }
.cover-0::before { background: repeating-linear-gradient(-45deg, rgba(0, 0, 0, .12) 0 10px, transparent 10px 22px); }
.cover-1::before { background: radial-gradient(circle, rgba(255, 255, 255, .18) 2px, transparent 2.5px) 0 0 / 16px 16px; }
.cover-2::before { background: repeating-conic-gradient(from 0deg at 80% 20%, rgba(255, 255, 255, .1) 0 10deg, transparent 10deg 20deg); }
.cover-3::before { background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .12) 0 6px, transparent 6px 16px); }
.cover-glyph { position: absolute; right: -8px; top: -14px; font-size: 6rem; line-height: 1; opacity: .28; font-family: 'Segoe UI Symbol', 'Noto Sans Symbols 2', sans-serif; transform: rotate(12deg); }
.cover-title { position: relative; display: flex; flex-direction: column; font-family: var(--font-display); line-height: .92; font-size: 1.55rem; text-shadow: 0 3px 0 rgba(0, 0, 0, .3); text-transform: uppercase; }
.cover-badge { position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; font-size: .64rem; font-weight: 900; background: var(--gold); color: var(--gold-ink); }
.cover-badge.locked { background: rgba(0, 0, 0, .55); color: #fff; }
.cover.small { width: 92px; border-radius: 16px; padding: 8px; }
.cover.small .cover-title { font-size: .8rem; }
.cover.small .cover-glyph { font-size: 3.4rem; }
.cover.small .cover-badge { display: none; }
.cover.mini { width: 70px; border-radius: 14px; padding: 6px; flex: none; }
.cover.mini .cover-title { font-size: .62rem; }
.cover.mini .cover-glyph { font-size: 2.6rem; }
.cover.mini .cover-badge { display: none; }
.cover.large { width: 220px; flex: none; }
.cover.large .cover-title { font-size: 2.1rem; }
.active-prog { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; background: linear-gradient(90deg, hsl(var(--h) 70% 50% / .12), transparent 60%), var(--surface); }
.active-prog .grow { min-width: 220px; }
.prog-head { display: flex; gap: 24px; align-items: flex-end; flex-wrap: wrap; }
.prog-head > .stack { flex: 1; min-width: 260px; }
@media (max-width: 600px) { .cover.large { width: 100%; aspect-ratio: 16/9; } }
.tabs { display: flex; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 5px; overflow-x: auto; }
.tabs a { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 12px; border-radius: 11px; font-weight: 800; color: var(--muted); white-space: nowrap; }
.tabs a.on { background: var(--gold); color: var(--gold-ink); }

.stage { border-radius: 26px; overflow: hidden; border: 1px solid hsl(var(--h) 60% 50% / .45); background: var(--surface); }
.stage-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; background: hsl(var(--h) 85% 58%); color: #0f0c06; }
.stage-head b { font-family: var(--font-display); font-weight: 400; font-size: 1.4rem; }
.stage-head span { font-weight: 700; }
.stage-head p { font-weight: 600; font-size: .84rem; opacity: .8; }
.stage-head .icon-btn { color: #0f0c06; }
.stage-floor { background: repeating-linear-gradient(90deg, rgba(0, 0, 0, .12) 0 2px, transparent 2px 64px), repeating-linear-gradient(0deg, rgba(255, 255, 255, .04) 0 2px, transparent 2px 22px), linear-gradient(180deg, #7a4a28, #5e3920); padding: 10px 0 24px; }
.stage-svg { display: block; width: 100%; max-width: 440px; margin: 0 auto; overflow: visible; }
.stage-path { fill: none; stroke: rgba(255, 255, 255, .45); stroke-width: 6; stroke-dasharray: 2 14; stroke-linecap: round; }
.week-tag { fill: var(--gold); }
.week-tag-txt { font-family: var(--font); font-weight: 900; font-size: 13px; fill: #231a00; }
.node { cursor: pointer; outline: none; transform-box: fill-box; transform-origin: center; transition: transform .2s; }
.node:hover, .node:focus-visible { transform: scale(1.1); }
.node-shadow { fill: rgba(0, 0, 0, .35); }
.plate { fill: #3d4556; stroke: #1b2030; stroke-width: 4; }
.plate-ring { fill: none; stroke: rgba(255, 255, 255, .22); stroke-width: 3; }
.plate-brand, .plate-kg { font-family: var(--font); font-weight: 900; font-size: 8px; fill: rgba(255, 255, 255, .6); letter-spacing: .15em; }
.plate-n { font-family: var(--font-display); font-size: 30px; fill: #fff; }
.node.done .plate { fill: hsl(var(--h) 70% 42%); }
.node.next .plate { fill: #1f8fd6; stroke: #7fd0ff; stroke-width: 5; }
.node-pulse { fill: none; stroke: #7fd0ff; stroke-width: 4; transform-box: fill-box; transform-origin: center; animation: nodePulse 1.8s ease-out infinite; }
@keyframes nodePulse { from { transform: scale(.85); opacity: 1; } to { transform: scale(1.35); opacity: 0; } }
.stage-done { padding: 10px 18px; font-weight: 800; color: var(--accent); display: flex; align-items: center; gap: 8px; }
.week-sched { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.week-sched > div { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px; border-radius: 12px; text-align: center; min-width: 0; }
.week-sched .train { background: hsl(var(--h, 45) 70% 50% / .16); border: 1px solid hsl(var(--h, 45) 70% 55% / .4); }
.week-sched .rest { background: var(--surface2); color: var(--dim); }
.week-sched small { font-size: .66rem; font-weight: 800; color: var(--muted); }
.week-sched b { font-family: var(--font-display); font-weight: 400; font-size: 1.1rem; }
.week-sched span { font-size: .62rem; font-weight: 700; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.day-block { background: var(--surface2); border-radius: 14px; padding: 12px 14px; }
.ex-mini { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-direction: column; }
.ex-mini li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); font-size: .88rem; }
.ex-mini li:last-child { border-bottom: 0; }
.ex-mini a:hover { color: var(--gold); }
.ex-mini span:last-child { color: var(--muted); white-space: nowrap; font-weight: 700; }
.phase-acc summary { display: flex; align-items: center; gap: 12px; cursor: pointer; list-style: none; }
.phase-acc summary::-webkit-details-marker { display: none; }
.phase-acc summary .grow { display: flex; flex-direction: column; }
.phase-acc[open] summary .ic { transform: rotate(180deg); }
.phase-acc[open] summary { margin-bottom: 14px; }
.phase-dot { width: 14px; height: 14px; border-radius: 50%; flex: none; }

/* ================= Preview & workout ================= */
.preview-hero { padding: 22px; border-radius: 26px; background: linear-gradient(135deg, hsl(var(--h) 80% 55% / .35), transparent 70%), var(--surface); border: 1px solid hsl(var(--h) 70% 55% / .45); display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.preview-hero h1 { font-size: clamp(2.2rem, 6vw, 3.2rem); }
.preview-hero h2 { color: hsl(var(--h) 90% 72%); font-size: 1.6rem; }
.preview-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.side-sticky { position: sticky; top: 16px; }
.start-bar { display: none; }
@media (max-width: 900px) {
  .preview-grid { grid-template-columns: 1fr; }
  .side-sticky { position: static; }
  .start-box { display: none; }
  .start-bar { display: flex; flex-direction: column; gap: 8px; position: sticky; bottom: calc(var(--tab) + 10px); z-index: 12; padding: 10px; border-radius: 20px; background: rgba(19, 26, 42, .92); backdrop-filter: blur(10px); border: 1px solid var(--line); }
}
.prev-ex { display: flex; flex-direction: column; gap: 12px; }
.prev-n { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--surface3); font-family: var(--font-display); font-size: 1.1rem; flex: none; }
.prev-data { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.prev-data > div { background: var(--surface2); border-radius: 12px; padding: 9px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.prev-data small { font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.prev-data b { font-size: .88rem; }
.prev-data.compact > div { padding: 7px 10px; }
.advice { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; font-size: .86rem; font-weight: 600; background: rgba(255, 200, 61, .12); color: #f3d489; }
.advice .ic { color: var(--blue); }
.advice.up { background: var(--accent-soft); color: #e6ffb0; }
.advice.up .ic { color: var(--accent); }
.advice.new { background: rgba(255, 200, 61, .1); color: #ffe8ad; }
.advice.new .ic { color: var(--gold); }
.action-card { display: flex; flex-direction: column; gap: 8px; text-align: left; align-items: flex-start; transition: border-color .2s, transform .15s; }
.action-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.action-card > .ic { color: var(--gold); }
.quest-card { background: linear-gradient(135deg, hsl(var(--h) 70% 50% / .2), transparent 70%), var(--surface); border-color: hsl(var(--h) 70% 55% / .5); }

.wo-head { position: sticky; top: 0; z-index: 10; background: rgba(8, 8, 10, .92); backdrop-filter: blur(12px); margin: -32px calc(-1 * clamp(16px, 4vw, 48px)) 0; padding: 16px clamp(16px, 4vw, 48px) 0; border-bottom: 1px solid var(--line); }
@media (max-width: 860px) { .wo-head { margin-top: -20px; } }
.wo-head .bar { margin: 12px -2px 0; border-radius: 0; }
.wo-head-inner { max-width: 1080px; margin: 0 auto; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.wo-title { flex: 1; min-width: 180px; }
.wo-title input { background: none; border: 0; outline: none; font-family: var(--font-display); font-size: 1.8rem; width: 100%; padding: 0; line-height: 1.1; }
.wo-meta { display: flex; gap: 12px; align-items: center; color: var(--muted); font-size: .84rem; font-weight: 700; flex-wrap: wrap; }
.wo-meta .clock { color: var(--gold); font-variant-numeric: tabular-nums; }
.wo-ex { display: flex; flex-direction: column; gap: 10px; transition: border-color .3s; }
.wo-ex.complete { border-color: rgba(200, 255, 46, .4); }
.wo-ex-head { display: flex; align-items: flex-start; gap: 10px; }
.wo-ex-head a:hover h3 { color: var(--gold); }
.wo-ex-head small { color: var(--muted); font-size: .8rem; }
.set-grid { display: flex; flex-direction: column; gap: 6px; }
.set-row { display: grid; gap: 7px; align-items: center; }
.set-row.cols-3 { grid-template-columns: 28px minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, .75fr) 42px; }
.set-row.cols-2 { grid-template-columns: 28px minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1fr) 42px; }
.set-row.head { font-size: .66rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); text-align: center; }
.set-row .n { text-align: center; font-weight: 900; color: var(--muted); }
.set-row .prev { text-align: center; color: var(--dim); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.set-row input { width: 100%; min-width: 0; background: var(--surface2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 4px; text-align: center; font-weight: 800; outline: none; font-variant-numeric: tabular-nums; }
.set-row input:focus { border-color: var(--blue); }
.set-row input::placeholder { color: var(--dim); font-weight: 600; }
.set-row input.f-rpe { color: var(--purple); }
.set-row.done input { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.set-row.done .n { color: var(--accent); }
.check { width: 42px; height: 40px; border-radius: 11px; background: var(--surface3); display: grid; place-items: center; color: var(--dim); transition: background .2s, transform .15s; }
.check:hover { color: var(--text); }
.done .check { background: var(--accent); color: var(--accent-ink); animation: checkPop .35s ease; }
@keyframes checkPop { 50% { transform: scale(1.18); } }
@media (max-width: 440px) {
  .set-row .prev { display: none; }
  .set-row.cols-3 { grid-template-columns: 24px minmax(0, 1fr) minmax(0, 1fr) minmax(0, .8fr) 40px; }
  .set-row.cols-2 { grid-template-columns: 24px minmax(0, 1fr) minmax(0, 1fr) 40px; }
}
.wo-ex-foot { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.rest-in { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; color: var(--muted); font-weight: 700; font-size: .84rem; }
.rest-in input { width: 58px; background: var(--surface2); border: 1px solid var(--line); border-radius: 9px; padding: 6px; text-align: center; font-weight: 800; outline: none; }
.ex-note { width: 100%; background: var(--surface2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; outline: none; }
.wo-footer { display: flex; gap: 10px; flex-wrap: wrap; }
.wo-footer .btn { flex: 1; }

/* ================= Workout voltooid ================= */
.complete-head { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 10px; }
.burst { width: 80px; height: 80px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; box-shadow: 0 0 0 12px var(--accent-soft), 0 0 0 26px rgba(200, 255, 46, .05); margin-bottom: 16px; animation: medalPop .6s cubic-bezier(.2, .8, .2, 1); }
.summary-top { display: grid; grid-template-columns: repeat(3, 1fr); border-radius: 24px; overflow: hidden; background: linear-gradient(135deg, #1b8fe0, #2a5fd8); box-shadow: 0 14px 40px rgba(27, 143, 224, .25); }
.summary-top > div { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 16px 8px; color: #fff; text-align: center; }
.summary-top > div + div { border-left: 1px solid rgba(255, 255, 255, .18); }
.summary-top span { color: var(--gold); }
.summary-top small { font-size: .74rem; font-weight: 800; opacity: .9; }
.summary-top b { font-family: var(--font-display); font-weight: 400; font-size: clamp(1.5rem, 5vw, 2.2rem); line-height: 1.1; font-variant-numeric: tabular-nums; }
.summary-top em { font-style: normal; font-size: .75rem; opacity: .8; font-weight: 700; }
.best-table { width: 100%; border-collapse: collapse; }
.best-table th { text-align: left; font-family: var(--font-display); font-weight: 400; font-size: 1.15rem; color: var(--blue); padding-bottom: 8px; }
.best-table th .ic { display: inline; vertical-align: -3px; margin-right: 4px; }
.best-table th:last-child, .best-table td:last-child { text-align: right; }
.best-table td { padding: 5px 0; color: var(--muted); font-weight: 600; font-size: .9rem; }
.xp-total { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.xp-total b { font-family: var(--font-display); font-weight: 400; font-size: 2.2rem; }
.xp-items { display: flex; flex-direction: column; gap: 6px; }
.xp-item { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: 10px; background: var(--surface2); font-weight: 600; animation: slideIn .45s cubic-bezier(.2, .8, .2, 1) both; }
.xp-item b { color: var(--gold); }
.xp-item.pr { background: rgba(255, 200, 61, .12); }
@keyframes slideIn { from { opacity: 0; transform: translateX(-20px); } }
.stat-ups { display: flex; flex-wrap: wrap; gap: 8px; }
.stat-up { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; font-weight: 900; font-size: .86rem; color: var(--c); background: color-mix(in srgb, var(--c) 15%, transparent); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); animation: medalPop .6s cubic-bezier(.2, .8, .2, 1) both; }
.pr-card { border-color: rgba(255, 200, 61, .45); background: linear-gradient(135deg, rgba(255, 200, 61, .1), transparent 60%), var(--surface); }
.pr-line { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.pr-line:last-child { border-bottom: 0; }
.pr-line .grow { display: flex; flex-direction: column; min-width: 150px; }
.pr-badge { font-size: .64rem; font-weight: 900; letter-spacing: .08em; padding: 5px 9px; border-radius: 8px; background: var(--gold); color: var(--gold-ink); animation: pulseBtn 1.6s ease-in-out infinite; }
.pr-reward { display: flex; flex-direction: column; align-items: flex-end; }
.pr-reward small { color: var(--muted); font-size: .72rem; font-weight: 700; }
.banner { display: flex; align-items: center; gap: 14px; background: linear-gradient(135deg, hsl(var(--h, 90) 70% 50% / .22), transparent 70%), var(--surface); }
.banner > .ic { color: var(--gold); }
.gold-banner { border-color: var(--gold); }

/* ================= Oefeningen ================= */
.ex-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 8px; }
.list.compact { max-height: 420px; overflow-y: auto; }
.ex-row { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 9px 12px; text-align: left; width: 100%; }
.ex-row:hover { border-color: hsl(var(--h) 70% 55%); }
.ex-row > .ic { color: var(--gold); }
.ex-ic { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; font-family: var(--font-display); font-size: 1.05rem; color: hsl(var(--h) 95% 72%); background: hsl(var(--h) 60% 50% / .15); }
.ex-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ex-txt b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ex-txt small { color: var(--muted); font-size: .78rem; }
.seen { color: var(--purple); }
.ex-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; padding: 20px; border-radius: 24px; background: linear-gradient(135deg, hsl(var(--h) 70% 50% / .25), transparent 70%), var(--surface); border: 1px solid var(--line); }
.ex-hero .en { color: hsl(var(--h) 90% 72%); font-weight: 700; margin-top: 4px; }
.lvl-dots { display: flex; gap: 4px; align-items: center; font-size: .8rem; color: var(--muted); font-weight: 700; }
.lvl-dots i { width: 22px; height: 6px; border-radius: 3px; background: var(--surface3); }
.lvl-dots i.on { background: hsl(var(--h) 90% 60%); }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 14px 0; display: flex; flex-direction: column; gap: 12px; }
.steps li { counter-increment: s; display: flex; gap: 12px; }
.steps li::before { content: counter(s); flex: none; width: 28px; height: 28px; border-radius: 9px; background: rgba(255, 200, 61, .14); color: var(--gold); display: grid; place-items: center; font-weight: 900; font-size: .85rem; }
.steps + .tip { margin-bottom: 14px; }
.picker-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; min-height: 0; }
.share-text { width: 100%; min-height: 160px; background: var(--surface2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.sets-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: .9rem; }
.sets-table td { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.sets-table td:first-child { color: var(--muted); width: 64px; font-weight: 700; }
.sets-table td:last-child { text-align: right; font-size: .8rem; }
.sets-table tr:last-child td { border-bottom: 0; }

/* ================= Muscle map ================= */
.muscle-map { width: 100%; max-width: 420px; margin: 0 auto; display: block; }
.mm-part { fill: #8e949c; stroke: #4b5158; stroke-width: 1.5; stroke-linejoin: round; }
.mm-muscle { stroke: #4b5158; stroke-width: 1.5; stroke-linejoin: round; transition: fill .5s; }
.mm-muscle:hover { filter: brightness(1.2); }
.mm-lines path { fill: none; stroke: #5d636b; stroke-width: 1.4; opacity: .9; }
.mm-label { font-family: var(--font); font-size: 11px; font-weight: 900; fill: var(--muted); letter-spacing: .12em; }

/* ================= Stats & profiel ================= */
.level-card { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.level-card .grow { min-width: 220px; }
.level-card h2 { font-size: 2rem; }
.profile-hero { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; background: radial-gradient(circle at 15% 50%, color-mix(in srgb, var(--rc) 25%, transparent), transparent 55%), var(--surface); }
.profile-avatar { width: min(200px, 50vw); flex: none; }
.profile-avatar .avatar-svg { width: 100%; animation: bob 3.2s ease-in-out infinite; }
.profile-hero .grow { min-width: 240px; }
.rank-ladder { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(130px, 1fr); gap: 10px; overflow-x: auto; padding-bottom: 8px; }
.rank-step { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 12px 8px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); opacity: .55; }
.rank-step.reached { opacity: 1; }
.rank-step.current { border-color: var(--rc); box-shadow: 0 0 0 1px var(--rc) inset, 0 0 24px color-mix(in srgb, var(--rc) 25%, transparent); }
.rank-step b { color: var(--rc); font-family: var(--font-display); font-weight: 400; font-size: 1.05rem; }
.rank-step small { font-size: .7rem; line-height: 1.25; }
.rank-av { width: 90px; height: 108px; display: grid; place-items: center; }
.rank-av .avatar-svg { height: 108px; width: auto; border-radius: 12px; }
.rank-av .hero-rank { display: none; }
.rank-lock { color: var(--dim); }
.eggs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.egg { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 14px; background: var(--surface2); border: 1px dashed var(--line); }
.egg.on { border-style: solid; border-color: rgba(255, 200, 61, .45); background: linear-gradient(135deg, rgba(255, 200, 61, .14), transparent), var(--surface2); }
.egg small { font-size: .7rem; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; color: var(--purple); }
.egg b { font-family: var(--font-display); font-weight: 400; font-size: 1.5rem; }
.avatar-edit { display: grid; grid-template-columns: 180px 1fr; gap: 18px; align-items: start; }
@media (max-width: 560px) { .avatar-edit { grid-template-columns: 1fr; } .avatar-edit .ob-avatar { max-width: 160px; margin: 0 auto; } }
.premium-hero { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 26px 16px; border-radius: 28px; background: radial-gradient(circle at 50% 0%, rgba(255, 200, 61, .25), transparent 60%), var(--surface); border: 1px solid rgba(255, 200, 61, .3); }
.premium-hero p { color: var(--muted); max-width: 50ch; }
.crown-big { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: var(--gold-ink); box-shadow: 0 0 40px rgba(255, 200, 61, .45); animation: bob 3s ease-in-out infinite; }
.plan { position: relative; }
.plan ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.plan li { display: flex; gap: 8px; align-items: flex-start; font-size: .9rem; }
.plan li .ic { color: var(--accent); margin-top: 2px; }
.plan li.off { color: var(--dim); }
.plan li.off .ic { color: var(--dim); }
.plan.premium { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.price { font-family: var(--font-display); font-size: 2.4rem; }
.price small { font-family: var(--font); font-size: .9rem; color: var(--muted); }
.ribbon { position: absolute; top: 16px; right: 16px; background: var(--gold); color: var(--gold-ink); font-weight: 900; font-size: .7rem; padding: 4px 10px; border-radius: 999px; }
.it-display { text-align: center; border-radius: 20px; padding: 26px 16px; background: var(--surface2); margin: 14px 0; transition: background .3s; }
.it-display p { font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.it-display b { display: block; font-family: var(--font-display); font-weight: 400; font-size: clamp(4.5rem, 20vw, 7.5rem); line-height: 1; font-variant-numeric: tabular-nums; margin: 6px 0; }
.it-display.phase-work { background: var(--accent); color: var(--accent-ink); }
.it-display.phase-work p { color: rgba(15, 12, 6, .7); }
.it-display.phase-rest { background: rgba(255, 200, 61, .2); }
.it-display.phase-prep { background: rgba(255, 159, 28, .2); }
.it-display.phase-done { background: rgba(255, 200, 61, .18); }
.more-item { display: flex; align-items: center; gap: 14px; font-weight: 800; width: 100%; text-align: left; }
.more-item > .ic:first-child { color: var(--gold); }
.more-item b { flex: 1; }
.more-item:hover { border-color: var(--dim); }

/* ================= Personage ================= */
.avatar-svg { display: block; overflow: visible; }
.avatar-svg .aura { animation: pulseGlow 3s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.avatar-svg .rays { animation: spin 20s linear infinite; transform-origin: 100px 125px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ================= Overlays ================= */
.resume, .rest { position: fixed; left: calc(50% + var(--side) / 2); transform: translateX(-50%); width: min(460px, calc(100% - 32px)); z-index: 40; border-radius: 20px; box-shadow: 0 16px 44px rgba(0, 0, 0, .5); }
.is-bare .resume, .is-bare .rest { left: 50%; }
.resume { bottom: 22px; display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--accent); color: var(--accent-ink); }
.resume .resume-txt { flex: 1; display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.resume small { opacity: .7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.resume-time { font-family: var(--font-display); font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.rest { bottom: 22px; background: var(--surface2); border: 1px solid var(--line); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; animation: slideUp .3s ease; }
.rest-top { display: flex; justify-content: space-between; align-items: baseline; }
.rest-label { font-weight: 900; color: var(--muted); text-transform: uppercase; font-size: .74rem; letter-spacing: .12em; }
.rest-time { font-family: var(--font-display); font-weight: 400; font-size: 2.5rem; line-height: 1; font-variant-numeric: tabular-nums; }
.rest-bar { height: 6px; background: var(--surface3); border-radius: 99px; overflow: hidden; }
.rest-bar i { display: block; height: 100%; width: 0; background: var(--gold); transition: width .25s linear; }
.rest-actions { display: flex; gap: 8px; }
.rest-actions .btn { flex: 1; }
.rest.finished { border-color: var(--accent); }
.rest.finished .rest-time { color: var(--accent); }
@media (max-width: 860px) { .resume, .rest { left: 50%; bottom: calc(var(--tab) + 12px + env(safe-area-inset-bottom)); } }

.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; }
.modal-back { position: absolute; inset: 0; background: rgba(4, 7, 14, .7); backdrop-filter: blur(5px); }
.modal-card { position: relative; width: min(540px, 100%); max-height: 88vh; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 20px; display: flex; flex-direction: column; gap: 14px; animation: pop .25s cubic-bezier(.2, .8, .2, 1); }
.modal-card.wide { width: min(760px, 100%); }
.modal-card.tall { height: min(720px, 88vh); }
.modal-card p { color: var(--muted); }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.97); } }
@media (max-width: 600px) {
  .modal { place-items: end center; padding: 0; }
  .modal-card, .modal-card.wide { width: 100%; border-radius: 26px 26px 0 0; max-height: 92vh; padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
  .modal-card.tall { height: 92vh; }
}
.toasts { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(440px, calc(100% - 32px)); }
.toast { background: var(--surface3); border: 1px solid var(--line); color: var(--text); padding: 11px 16px; border-radius: 16px; font-weight: 600; box-shadow: 0 12px 30px rgba(0, 0, 0, .45); animation: toastIn .35s cubic-bezier(.2, .8, .2, 1); transition: opacity .4s, transform .4s; }
.toast .ic { display: inline-block; vertical-align: -3px; margin-right: 6px; }
.toast.out { opacity: 0; transform: translateY(-10px); }
.toast.xp { background: linear-gradient(135deg, #2a2208, var(--surface3)); border-color: var(--gold); }
.toast.xp b { color: var(--gold); }
.toast.medal { border-color: var(--gold); }
.toast.error { border-color: var(--danger); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-20px) scale(.95); } }
.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 250; }

.levelup-overlay { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px; background: rgba(4, 7, 14, .82); backdrop-filter: blur(6px); animation: fade .3s ease; overflow: hidden; }
.levelup-overlay.out { opacity: 0; transition: opacity .3s; }
.lu-rays { position: absolute; width: 160vmax; height: 160vmax; background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--rc) 22%, transparent) 0 10deg, transparent 10deg 20deg); animation: spin 26s linear infinite; mask-image: radial-gradient(circle, #000 10%, transparent 45%); -webkit-mask-image: radial-gradient(circle, #000 10%, transparent 45%); }
.lu-card { position: relative; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; max-width: 420px; animation: luPop .7s cubic-bezier(.2, .8, .2, 1); }
.lu-card .eyebrow { color: var(--gold); font-size: .9rem; }
.lu-avatar { width: 190px; }
.lu-avatar .avatar-svg { width: 100%; animation: bob 2.5s ease-in-out infinite; filter: drop-shadow(0 0 30px rgba(255, 200, 61, .4)); }
.lu-level { display: flex; flex-direction: column; align-items: center; line-height: .9; }
.lu-level small { font-size: 1.3rem; color: var(--muted); letter-spacing: .2em; }
.lu-level b { font-weight: 400; font-size: 6rem; color: var(--gold); text-shadow: 0 6px 0 #b98a14, 0 0 40px rgba(255, 200, 61, .5); animation: levelNum 1s cubic-bezier(.2, .8, .2, 1) .2s both; }
.lu-rank { font-family: var(--font-display); font-size: 1.6rem; }
.lu-card .btn { margin-top: 10px; }
@keyframes luPop { from { transform: scale(.6); opacity: 0; } }
@keyframes levelNum { 0% { transform: scale(3); opacity: 0; } 60% { transform: scale(.9); opacity: 1; } 100% { transform: scale(1); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Laden bij het opstarten (cloud-sessie) */
.boot { min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--muted); }
.boot-spin { width: 38px; height: 38px; border-radius: 50%; border: 4px solid var(--surface3); border-top-color: var(--gold); animation: spin 1s linear infinite; }
.cloud-line { display: flex; align-items: center; gap: 8px; }
.cloud-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex: none; }
.cloud-dot.warn { background: var(--gold); }
.cloud-dot.err { background: #ff4d5e; }

/* Titellettertype Payback: merk en alle kopteksten (zie --font-display) */
.brand-hero-text b { font-size: clamp(2.3rem, 9.5vw, 3.1rem); }

/* Zachte overgang tussen de herhaalde vloertegels van de wereldkaart */
.lvl-map::after { content: ''; position: absolute; inset: 0; pointer-events: none; background-size: 100% 1%; background-image: repeating-linear-gradient(to bottom, rgba(0, 0, 0, .55) 0, rgba(0, 0, 0, .12) 14%, rgba(0, 0, 0, 0) 34%, rgba(0, 0, 0, 0) 66%, rgba(0, 0, 0, .12) 86%, rgba(0, 0, 0, .55) 100%); }
.lvl-plate, .lvl-tag, .lvl-stage-sep { z-index: 2; }
