/* Koryqen — ported directly from the provided design mockup (structure,
   class names, and component patterns kept as close to the original as
   possible), wired to real data instead of demo arrays. Fonts self-hosted
   — see assets/fonts/fonts.css, linked from index.php. */

*{box-sizing:border-box;margin:0;padding:0;}
*:focus{outline:none;}
html,body{min-height:100%;}
:root{
  --bg:#080a0f; --panel:#10141c; --panel2:#141a24; --panel3:#0c1017;
  --text:#f8fafc; --muted:#94a3b8; --dim:#64748b; --soft:#1e293b;
  --accent:#5084de; --accent2:#376bc2;
  --good:#38d996; --bad:#ff6b74; --warn:#f5b846; --violet:#8d7cff; --cyan:#31c3d8;
  --radius:8px;
  --content-pad:14px;
  --overlay-rgb:255,255,255;
  --shadow:0 24px 70px rgba(0,0,0,.32); --shadow2:0 8px 26px rgba(0,0,0,.22);
  --font:'Inter',-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  --font-display:'Manrope',var(--font);
}
body.light{
  --bg:#f4f6fa; --panel:#fff; --panel2:#f8fafc; --panel3:#eef2f7;
  --text:#111827; --muted:#64748b; --dim:#71809a; --soft:#e2e8f0;
  --shadow:0 24px 70px rgba(15,23,42,.12); --shadow2:0 8px 26px rgba(15,23,42,.08);
  --overlay-rgb:15,23,42;
  --border-light:1px solid rgba(15,23,42,.14);
}
/* The same low-opacity overlay formula that reads clearly in dark mode
   (light tint on near-black) doesn't carry over to light mode (dark tint
   on near-white barely registers) — surfaces looked washed out and hard
   to tell apart. Key structural components get an explicit, more opaque
   fill plus a real border for definition instead of relying purely on
   translucency. Text/icon colors are untouched — only surface fills. */
body.light .card:not([style*="background"]),
body.light .miniStat,
body.light .kpi,
body.light .mode,
body.light .character,
body.light .switchRow,
body.light .planDay,
body.light .leaderItem,
body.light .achievement,
body.light .eventCard,
body.light .comparison,
body.light .msg.ai,
body.light .typingDots,
body.light .choice,
body.light .radar,
body.light .lineChart {
  background: var(--panel) !important;
  border: var(--border-light);
}
/* Cards with their own inline gradient (ULTIMA badge, certification-earned,
   coach challenge, paywall) keep their accent color, just lightened to
   read correctly against a light page instead of vanishing into it. */
body.light .card[style*="background"] {
  border: var(--border-light);
  filter: saturate(1.15);
}
body.light .card.flat { background: var(--panel3) !important; border: var(--border-light); }
body.light .btn,
body.light .tag,
body.light .chip,
body.light .composerIconBtn,
body.light .scoreMini div,
body.light .input, body.light select, body.light textarea,
body.light .composer input {
  background: var(--panel3) !important;
  border: var(--border-light);
}
body.light .choice.active { background: rgba(80,132,222,.12) !important; border: 1px solid rgba(80,132,222,.35); color: var(--accent); }

body{
  font-family:var(--font); background:radial-gradient(900px 520px at 72% -120px, rgba(80,132,222,.13), transparent 58%), linear-gradient(180deg, var(--bg) 0%, #090c12 100%);
  color:var(--text); overflow:hidden; -webkit-font-smoothing:antialiased;
}
body.light{background:radial-gradient(900px 520px at 72% -120px, rgba(80,132,222,.16), transparent 58%), linear-gradient(180deg, #e9edf5 0%, #dde4ef 100%);}
button,input,select,textarea{font-family:inherit;}
button{cursor:pointer; border:0;}
::-webkit-scrollbar{width:4px; height:4px;}
::-webkit-scrollbar-thumb{background:#263244; border-radius:var(--radius);}
::-webkit-scrollbar-track{background:transparent;}

.phone{width:100%; max-width:430px; height:var(--app-height, 100dvh); margin:0 auto; background:rgba(8,10,15,.84); position:relative; overflow:hidden; box-shadow:0 0 0 1px rgba(255,255,255,.03), 0 30px 90px rgba(0,0,0,.38);}
body.light .phone{background:rgba(247,249,252,.92); box-shadow:0 0 0 1px rgba(15,23,42,.05), 0 30px 90px rgba(15,23,42,.16);}
.app{height:100%; display:grid; grid-template-rows:auto 1fr auto;}

.top{padding:14px 14px 10px; display:grid; grid-template-columns:1fr auto; gap:10px; align-items:start; background:linear-gradient(180deg, rgba(8,10,15,.96), rgba(8,10,15,.72)); backdrop-filter:blur(18px); z-index:5;}
body.light .top{background:linear-gradient(180deg, rgba(247,249,252,.96), rgba(247,249,252,.72));}
.userLine{display:grid; grid-template-columns:42px 1fr; gap:10px; align-items:center; min-width:0; cursor:pointer;}
.ava{width:42px; height:42px; border-radius:var(--radius); background:linear-gradient(135deg,#263244,#172033); background-size:cover; background-position:center; display:grid; place-items:center; color:#dce9ff; font-weight:800; overflow:hidden;}
.ava img{width:100%; height:100%; object-fit:cover;}
.ava.small{width:32px; height:32px;} .ava.tiny{width:26px; height:26px;} .ava.lg{width:64px; height:64px;}
.identity{min-width:0;}
.identity b{font-size:14px; letter-spacing:-.03em; display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.identity p{font-size:11px; color:var(--muted); margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.topStats{display:flex; gap:6px; align-items:center;}
.miniStat{height:32px; border-radius:var(--radius); background:rgba(var(--overlay-rgb),.055); display:flex; align-items:center; gap:6px; padding:0 8px; font-size:11px; color:var(--muted); font-weight:700;}
.miniStat svg{width:14px; height:14px; stroke:currentColor; fill:none; stroke-width:2;}

.pageTitle{padding:0 14px 8px; background:rgba(8,10,15,.72); display:none;}
body.light .pageTitle{background:rgba(247,249,252,.72);}
.pageTitle.active{display:block;}
.pageTitle h1{font-family:var(--font-display); font-size:22px; letter-spacing:-.06em; line-height:1.05;}
.pageTitle p{font-size:12px; color:var(--muted); margin-top:5px; line-height:1.35;}

.content{overflow-y:auto; min-height:0; padding:0 var(--content-pad) 92px; -webkit-overflow-scrolling:touch;}
.page{display:none; animation:fade .16s ease;}
.page.active{display:block;}
@keyframes fade{from{opacity:0; transform:translateY(8px);} to{opacity:1; transform:none;}}

.card{background:linear-gradient(180deg, rgba(var(--overlay-rgb),.052), rgba(var(--overlay-rgb),.032)); border-radius:var(--radius); box-shadow:var(--shadow2); padding:14px; margin-bottom:10px;}
.card.flat{box-shadow:none; background:rgba(var(--overlay-rgb),.04);}
body.light .card{background:rgba(255,255,255,.88);}
.hero{min-height:152px; position:relative; overflow:hidden; background:linear-gradient(135deg, rgba(80,132,222,.20), rgba(var(--overlay-rgb),.035) 46%, rgba(49,195,216,.08));}
.hero::after{content:''; position:absolute; right:-18px; top:-18px; width:118px; height:118px; border-radius:var(--radius); background:rgba(80,132,222,.10); transform:rotate(18deg);}
.heroTop{display:flex; justify-content:space-between; gap:10px; position:relative; z-index:1;}
.label{font-size:10px; color:var(--dim); font-weight:800; text-transform:uppercase; letter-spacing:.1em;}
.hero h2{font-family:var(--font-display); font-size:24px; letter-spacing:-.07em; line-height:1.03; margin-top:14px; position:relative; z-index:1;}
.hero p{font-size:12px; color:var(--muted); line-height:1.45; margin-top:8px; max-width:280px; position:relative; z-index:1;}

.row{display:flex; align-items:center; gap:8px;}
.between{display:flex; align-items:center; justify-content:space-between; gap:10px;}
.btn{height:38px; border-radius:var(--radius); background:rgba(var(--overlay-rgb),.06); color:var(--text); padding:0 12px; font-size:12px; font-weight:750; display:inline-flex; align-items:center; justify-content:center; gap:7px; transition:.14s; white-space:nowrap;}
.btn:active{transform:scale(.98);}
.btn.primary{background:linear-gradient(135deg, var(--accent), var(--accent2)); color:#fff; box-shadow:0 14px 30px rgba(80,132,222,.22);}
.btn.good{background:rgba(56,217,150,.15); color:#9ff2c9;}
.btn.warn{background:rgba(245,184,70,.14); color:#ffd386;}
.btn.bad{background:rgba(255,107,116,.14); color:#ffadb3;}
.btn.full{width:100%;}
.btn.small{height:30px; padding:0 10px; font-size:11px;}
.btn svg{width:15px; height:15px; stroke:currentColor; fill:none; stroke-width:2;}
.btn:disabled{opacity:.5; pointer-events:none;}

.grid{display:grid; gap:8px;}
.cols2{grid-template-columns:1fr 1fr;} .cols3{grid-template-columns:repeat(3,1fr);}
.kpis{display:grid; grid-template-columns:repeat(4,1fr); gap:6px; margin:10px 0;}
.kpi{background:rgba(var(--overlay-rgb),.045); border-radius:var(--radius); padding:10px 7px; min-width:0;}
.kpi b{font-family:var(--font-display); font-size:16px; letter-spacing:-.05em; display:block; font-variant-numeric:tabular-nums;}
.kpi span{font-size:9px; color:var(--dim); font-weight:800; text-transform:uppercase; letter-spacing:.08em; margin-top:3px; display:block;}

.sectionHead{display:flex; justify-content:space-between; align-items:end; gap:10px; margin:16px 0 8px;}
.sectionHead h3{font-family:var(--font-display); font-size:15px; letter-spacing:-.04em;}
.sectionHead p{font-size:11px; color:var(--muted); margin-top:2px;}
.link{color:#9fc0ff; background:transparent; font-size:12px; font-weight:750;}

.scenarioCard{display:grid; grid-template-columns:40px 1fr auto; gap:10px; align-items:center; cursor:pointer;}
.ico{width:40px; height:40px; border-radius:var(--radius); background:rgba(80,132,222,.13); display:grid; place-items:center; color:#9fc0ff; flex:0 0 auto;}
.ico svg{width:19px; height:19px; stroke:currentColor; fill:none; stroke-width:2;}
.scenarioCard h4,.contentCard h4,.character h4{font-size:14px; letter-spacing:-.03em; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; line-height:1.28;}
.meta{font-size:11px; color:var(--muted); margin-top:3px; line-height:1.35; overflow-wrap:break-word;}
/* Grid children holding text need min-width:0 — without it a CSS Grid
   item won't shrink below its content's natural width and can overflow
   its track into neighboring columns or the card edge. */
.scenarioCard > div, .charTop > div, .leaderItem > div, .planDay > div,
.comparison > span, .statLine > span, .kpi, .achievement > div, .eventCard{min-width:0;}
.tag{display:inline-flex; align-items:center; height:22px; border-radius:var(--radius); padding:0 8px; font-size:10px; font-weight:800; background:rgba(var(--overlay-rgb),.06); color:var(--muted); white-space:nowrap; flex-shrink:0;}
.tag.blue{background:rgba(80,132,222,.14); color:#afd0ff;}
.tag.good{background:rgba(56,217,150,.13); color:#9ff2c9;}
.tag.warn{background:rgba(245,184,70,.13); color:#ffd386;}
.tag.bad{background:rgba(255,107,116,.13); color:#ffadb3;}
.tag.violet{background:rgba(141,124,255,.14); color:#c8c0ff;}

.hScroll{display:flex; gap:8px; overflow:auto; padding:1px 0 4px; scrollbar-width:none;}
.hScroll::-webkit-scrollbar{display:none;}
.mode{min-width:132px; border-radius:var(--radius); background:rgba(var(--overlay-rgb),.045); padding:12px; cursor:pointer;}
.mode .ico{width:34px; height:34px; margin-bottom:10px;}
.mode b{font-size:13px;} .mode p{font-size:11px; color:var(--muted); line-height:1.35; margin-top:4px;}

.character{padding:12px; background:rgba(var(--overlay-rgb),.045); border-radius:var(--radius); display:grid; gap:10px; cursor:pointer;}
.charTop{display:grid; grid-template-columns:auto 1fr auto; gap:10px; align-items:center;}
.charAva{width:48px; height:48px; border-radius:var(--radius); background-size:cover; background-position:center; background-color:#1a2435; overflow:hidden; display:grid; place-items:center; color:#dce9ff; font-weight:800;}
.charAva img{width:100%; height:100%; object-fit:cover;}
.statsList{display:grid; gap:7px;}
.statLine{display:grid; grid-template-columns:84px 1fr 34px; gap:8px; align-items:center;}
.statLine span{font-size:10px; color:var(--muted); font-weight:750;}
.statLine b{font-size:11px; text-align:right;}
.progress{height:6px; border-radius:var(--radius); background:#172032; overflow:hidden;}
.progress .fill{height:100%; border-radius:var(--radius); background:linear-gradient(90deg, var(--accent), #7aa6ef);}
body.light .progress{background:#e2e8f0;}
.chips{display:flex; gap:5px; flex-wrap:wrap;}
.chip{height:26px; display:inline-flex; align-items:center; border-radius:var(--radius); background:rgba(var(--overlay-rgb),.055); color:var(--muted); font-size:11px; font-weight:700; padding:0 9px; cursor:pointer;}
.chip.active{background:rgba(80,132,222,.15); color:#b9d4ff;}
.chip.good{background:rgba(56,217,150,.13); color:#a6f3cd;}

.sheet{position:absolute; left:0; right:0; bottom:0; z-index:40; display:none; background:linear-gradient(180deg, rgba(16,20,28,.98), rgba(12,16,23,.98)); border-radius:8px 8px 0 0; max-height:88dvh; overflow:auto; padding:14px; box-shadow:0 -30px 80px rgba(0,0,0,.45);}
body.light .sheet{background:rgba(255,255,255,.98);}
.sheet.open{display:block; animation:slideUp .18s ease;}
@keyframes slideUp{from{transform:translateY(30px); opacity:.5;} to{transform:none; opacity:1;}}
.overlay{position:absolute; inset:0; background:rgba(0,0,0,.52); backdrop-filter:blur(6px); z-index:35; display:none;}
.overlay.open{display:block;}
.handle{width:46px; height:5px; border-radius:var(--radius); background:rgba(var(--overlay-rgb),.12); margin:0 auto 12px;}

.field{display:flex; flex-direction:column; gap:6px; margin-bottom:10px;}
.field label{font-size:10px; color:var(--dim); font-weight:850; text-transform:uppercase; letter-spacing:.09em;}
.input,select,textarea{width:100%; border:0; border-radius:var(--radius); background:rgba(var(--overlay-rgb),.055); color:var(--text); height:38px; padding:0 11px; font-size:13px;}
textarea{height:82px; resize:none; padding:10px 11px; line-height:1.45;}
.input::placeholder,textarea::placeholder{color:#526074;}
select{appearance:none; background-image:linear-gradient(45deg,transparent 50%,var(--dim) 50%),linear-gradient(135deg,var(--dim) 50%,transparent 50%); background-position:calc(100% - 15px) 16px,calc(100% - 10px) 16px; background-size:5px 5px,5px 5px; background-repeat:no-repeat;}
.choiceGrid{display:grid; grid-template-columns:repeat(3,1fr); gap:6px;}
.choice{min-height:40px; border-radius:var(--radius); background:rgba(var(--overlay-rgb),.052); display:flex; align-items:center; justify-content:center; text-align:center; padding:8px; font-size:12px; color:var(--muted); font-weight:750; cursor:pointer;}
.choice.active{background:rgba(80,132,222,.15); color:#cfe0ff;}
.choice.locked{opacity:.5;}
.rangePair{display:grid; grid-template-columns:1fr 1fr; gap:8px;}
.switchRow{height:44px; border-radius:var(--radius); background:rgba(var(--overlay-rgb),.045); display:flex; align-items:center; justify-content:space-between; padding:0 10px; margin-bottom:6px;}
.switchRow span{font-size:12px; font-weight:700;}
.switch{width:38px; height:22px; border-radius:var(--radius); background:rgba(var(--overlay-rgb),.07); position:relative; flex-shrink:0;}
.switch::after{content:''; width:16px; height:16px; border-radius:var(--radius); background:#fff; position:absolute; top:3px; left:3px; transition:.15s;}
.switch.on{background:var(--accent);}
.switch.on::after{left:19px;}

.dialogHead{position:sticky; top:0; z-index:3; background:var(--bg); box-shadow:0 12px 20px -4px rgba(0,0,0,.35); padding:8px 0 10px;}
.messages{display:flex; flex-direction:column; gap:8px; padding:8px 0 12px;}
.msg{max-width:86%; border-radius:var(--radius); padding:10px 11px; font-size:13px; line-height:1.48;}
.msg.ai{align-self:flex-start; background:rgba(var(--overlay-rgb),.055);}
.msg.me{align-self:flex-end; background:linear-gradient(135deg, var(--accent), var(--accent2)); color:#fff;}
.msg.hint{align-self:center; background:rgba(var(--overlay-rgb),.04); color:var(--muted); font-style:italic; font-size:12px; max-width:92%;}
.msg.event{align-self:center; background:rgba(245,184,70,.1); color:#e8c27a; font-style:italic; font-size:12px; max-width:92%; border:1px solid rgba(245,184,70,.18);}
.typingDots{align-self:flex-start; background:rgba(var(--overlay-rgb),.055); border-radius:var(--radius); padding:12px 16px; display:flex; gap:4px; align-items:center;}
.typingDots span{width:6px; height:6px; border-radius:var(--radius); background:var(--muted); animation:typingBounce 1.1s infinite ease-in-out;}
.typingDots span:nth-child(2){animation-delay:.15s;}
.typingDots span:nth-child(3){animation-delay:.3s;}
@keyframes typingBounce{0%,60%,100%{transform:translateY(0); opacity:.5;} 30%{transform:translateY(-4px); opacity:1;}}
.msg.typed::after{content:'▍'; display:inline-block; color:var(--accent); animation:caretBlink .8s steps(1) infinite; margin-left:1px;}
@keyframes caretBlink{50%{opacity:0;}}
.speedBtn{height:28px; padding:0 10px; border-radius:var(--radius); background:rgba(80,132,222,.14); color:#b9d4ff; font-size:10px; font-weight:800;}
.scoreMini{display:grid; grid-template-columns:repeat(3,1fr); gap:6px; margin-top:8px;}
.scoreMini div{background:rgba(var(--overlay-rgb),.06); border-radius:var(--radius); padding:7px;}
.scoreMini b{font-size:13px; font-variant-numeric:tabular-nums;}
.scoreMini span{font-size:9px; color:var(--muted); display:block; text-transform:uppercase; font-weight:800; letter-spacing:.06em;}
.composer{position:sticky; bottom:0; left:0; right:0; padding:10px 0 calc(10px + env(safe-area-inset-bottom)); margin:0 calc(-1 * var(--content-pad)); padding-left:var(--content-pad); padding-right:var(--content-pad); background:var(--bg); box-shadow:0 -12px 20px -4px rgba(0,0,0,.35); display:none; align-items:center; gap:6px; z-index:10;}
.composer.active{display:flex;}
.composer input{flex:1; min-width:0; height:40px; border:0; border-radius:var(--radius); background:rgba(var(--overlay-rgb),.075); color:var(--text); padding:0 11px;}
.composerIconBtn{width:38px; height:38px; border-radius:var(--radius); background:rgba(var(--overlay-rgb),.06); color:var(--muted); display:grid; place-items:center; flex-shrink:0;}
.composerIconBtn svg{width:17px; height:17px; stroke:currentColor; fill:none; stroke-width:2;}
.composerIconBtn.recording{background:rgba(240,97,109,.16); color:#F0616D; animation:micPulse 1.1s infinite ease-in-out;}
@keyframes micPulse{0%,100%{box-shadow:0 0 0 0 rgba(240,97,109,.35);} 50%{box-shadow:0 0 0 6px rgba(240,97,109,0);}}
.composerSendBtn{width:40px; height:40px; border-radius:var(--radius); background:linear-gradient(135deg, var(--accent), var(--accent2)); color:#fff; display:grid; place-items:center; flex-shrink:0;}
.composerSendBtn svg{width:18px; height:18px; stroke:currentColor; fill:none; stroke-width:2;}
.app.chat-mode .bottomNav{display:none;}
.app.chat-mode .content{padding-bottom:0;}

.resultScore{font-family:var(--font-display); font-size:58px; line-height:.95; letter-spacing:-.09em; font-weight:900;}
.radar{height:210px; border-radius:var(--radius); background:rgba(var(--overlay-rgb),.035); display:grid; place-items:center; margin:10px 0;}
.radar svg{width:190px; height:190px;}
.planDay{display:grid; grid-template-columns:30px 1fr auto; gap:9px; align-items:center; padding:10px; background:rgba(var(--overlay-rgb),.045); border-radius:var(--radius); margin-bottom:6px;}
.planDay .num{width:30px; height:30px; border-radius:var(--radius); background:rgba(80,132,222,.14); color:#b9d4ff; display:grid; place-items:center; font-weight:850;}
.leaderItem{display:grid; grid-template-columns:34px 38px 1fr auto; gap:8px; align-items:center; padding:10px; background:rgba(var(--overlay-rgb),.045); border-radius:var(--radius); margin-bottom:6px; cursor:pointer;}
.rank{font-weight:900; color:var(--dim); text-align:center;}
.rank.top{color:#ffd386;}

.podium{display:grid; grid-template-columns:1fr 1fr 1fr; align-items:end; gap:8px; margin:6px 0 18px; padding:0 2px;}
.podiumSlot{display:flex; flex-direction:column; align-items:center; text-align:center; cursor:pointer; border-radius:var(--radius); padding:14px 6px 12px; position:relative; background:linear-gradient(180deg, rgba(var(--overlay-rgb),.05), rgba(var(--overlay-rgb),.02)); transition:.15s;}
.podiumSlot:active{transform:scale(.97);}
.podiumSlot[data-rank="1"]{order:2; padding-top:6px; background:linear-gradient(180deg, rgba(255,211,134,.14), rgba(var(--overlay-rgb),.02));}
.podiumSlot[data-rank="2"]{order:1;}
.podiumSlot[data-rank="3"]{order:3;}
.podiumAva{position:relative; border-radius:50%; overflow:hidden; display:flex; align-items:center; justify-content:center; font-weight:800; background:var(--panel2); color:var(--text); margin-bottom:8px;}
.podiumAva img{width:100%; height:100%; object-fit:cover;}
.podiumSlot[data-rank="1"] .podiumAva{width:72px; height:72px; font-size:26px; box-shadow:0 0 0 3px #ffd386, 0 8px 22px rgba(255,211,134,.35);}
.podiumSlot[data-rank="2"] .podiumAva{width:58px; height:58px; font-size:21px; box-shadow:0 0 0 3px #c9d3e0, 0 6px 16px rgba(200,208,220,.22);}
.podiumSlot[data-rank="3"] .podiumAva{width:58px; height:58px; font-size:21px; box-shadow:0 0 0 3px #d99a6c, 0 6px 16px rgba(217,154,108,.22);}
.podiumMedal{position:absolute; bottom:-4px; left:50%; transform:translateX(-50%); width:22px; height:22px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:900; color:#1a1206; border:2px solid var(--bg);}
.podiumSlot[data-rank="1"] .podiumMedal{background:linear-gradient(135deg,#ffe6ac,#e8ab3f);}
.podiumSlot[data-rank="2"] .podiumMedal{background:linear-gradient(135deg,#eef2f7,#b6c0cc); color:#26313f;}
.podiumSlot[data-rank="3"] .podiumMedal{background:linear-gradient(135deg,#e8b78c,#b96f3e); color:#3a1f0c;}
.podiumName{font-size:12px; font-weight:800; margin-top:6px; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.podiumValue{font-size:14px; font-weight:900; color:var(--violet); margin-top:2px;}
.podiumSlot[data-rank="1"] .podiumValue{color:#ffd386; font-size:16px;}
.profileHero{display:grid; grid-template-columns:64px 1fr; gap:12px; align-items:center;}
.profileHero .ava{width:64px; height:64px;}
.chart{min-height:156px; display:flex; align-items:stretch; gap:4px; padding-top:8px;}
.bar{flex:1; min-width:10px; background:linear-gradient(180deg, rgba(80,132,222,.95), rgba(80,132,222,.18)); border-radius:8px 8px 3px 3px;}
.lineChart{height:158px; border-radius:var(--radius); background:rgba(var(--overlay-rgb),.035); position:relative; overflow:hidden;}
.lineChart svg{position:absolute; inset:0; width:100%; height:100%;}
.achievement{display:grid; grid-template-columns:42px 1fr auto; gap:10px; align-items:center; background:rgba(var(--overlay-rgb),.045); border-radius:var(--radius); padding:10px; margin-bottom:6px;}
.lock{opacity:.45;}
.shopPlan{background:linear-gradient(135deg, rgba(80,132,222,.19), rgba(var(--overlay-rgb),.04)); padding:14px; border-radius:var(--radius); margin-bottom:8px;}
.price{font-family:var(--font-display); font-size:24px; font-weight:900; letter-spacing:-.06em;}
.comparison{display:grid; grid-template-columns:1fr auto auto; gap:8px; align-items:center; font-size:12px; padding:9px; background:rgba(var(--overlay-rgb),.04); border-radius:var(--radius); margin-bottom:5px;}
.markcheck{color:var(--good); font-weight:900;}
.markcross{color:var(--bad); font-weight:900;}
.eventCard{background:rgba(var(--overlay-rgb),.045); border-radius:var(--radius); padding:12px; margin-bottom:8px; position:relative; overflow:hidden;}
.eventCard::after{content:''; position:absolute; right:-18px; top:-18px; width:80px; height:80px; border-radius:var(--radius); background:rgba(80,132,222,.08); transform:rotate(16deg);}

.bottomNav{height:62px; background:rgba(12,16,23,.96); display:grid; grid-template-columns:repeat(5,1fr); gap:4px; padding:6px 7px 8px; z-index:20; box-shadow:0 -18px 50px rgba(0,0,0,.26);}
body.light .bottomNav{background:rgba(255,255,255,.95);}
.nav{border-radius:var(--radius); background:transparent; color:var(--dim); display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; font-size:9px; font-weight:800; letter-spacing:.02em;}
.nav svg{width:19px; height:19px; stroke:currentColor; fill:none; stroke-width:2;}
.nav.active{background:rgba(80,132,222,.14); color:#b9d4ff;}
.nav.create{background:linear-gradient(135deg, var(--accent), var(--accent2)); color:#fff;}

.toast{position:absolute; left:14px; right:14px; top:78px; background:rgba(16,20,28,.98); border-radius:var(--radius); padding:12px; box-shadow:var(--shadow); z-index:60; display:none;}
body.light .toast{background:rgba(255,255,255,.98);}
.toast.show{display:block; animation:fade .18s ease;}
.toast b{font-size:13px;} .toast p{font-size:12px; color:var(--muted); margin-top:3px;}

.paywall{background:linear-gradient(135deg, rgba(80,132,222,.20), rgba(var(--overlay-rgb),.04)); position:relative; overflow:hidden;}
.paywall::after{content:''; position:absolute; right:-22px; bottom:-22px; width:120px; height:120px; border-radius:var(--radius); background:rgba(80,132,222,.10); transform:rotate(18deg);}

/* ---------- Splash (pre-boot loading screen) ---------- */
.splash{position:fixed; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:16px; background:var(--bg); overflow:hidden;}
.splash-logo{font-family:var(--font-display); font-weight:800; font-size:32px; letter-spacing:-.03em; color:var(--text);}
.splash-tagline{color:var(--muted); font-size:13px;}
.splash-progress{width:120px; height:2px; border-radius:var(--radius); background:rgba(var(--overlay-rgb),.08); overflow:hidden; margin-top:6px;}
.splash-progress-bar{width:40%; height:100%; background:var(--accent); border-radius:var(--radius); animation:splashMove 1.1s ease-in-out infinite;}
@keyframes splashMove{0%{transform:translateX(-120%);} 100%{transform:translateX(340%);}}

.hidden{display:none!important;}
@media(max-width:360px){
  :root{--content-pad:10px;}
  .choiceGrid{grid-template-columns:1fr 1fr;} .kpis{grid-template-columns:1fr 1fr;} .topStats{display:none;}
  .hero h2{font-size:21px;} .top{padding-left:var(--content-pad); padding-right:var(--content-pad);}
  .bottomNav{height:60px;} .cols2,.cols3{grid-template-columns:1fr;}
}
