/* meath design system v2: dark-first, restrained, consistent. */
:root{--bg:#06071a;--bg2:#0b0d2a;--s1:#0f1139;--s2:#171a4d;--line:#ffffff14;--line2:#ffffff26;--ink:#f4f5ff;--mute:#a3a8d8;--ind:#b2a6ff;--brand:#7c5cff;--brand2:#2fa4ff;--blu:#2fa4ff;--vio:#8b7bff;--gold:#ffc933;--good:#2fd9a0;--mint:#48e2c0;--mint-soft:#48e2c01f;--bad:#ff6b81;--lav:#1a1e5c;--card:#0f1139;--navy:#06072a;color-scheme:dark;box-sizing:border-box;padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px)}
:root[data-theme="light"]{--bg:#f1f2fb;--bg2:#fff;--s1:#fff;--s2:#f5f6ff;--line:#14185a1a;--line2:#14185a38;--ink:#0e1030;--mute:#585d92;--ind:#5a44de;--mint:#087f6b;--mint-soft:#d8f5ee;--lav:#ebe8ff;--card:#fff;--good:#0c9a6b;--bad:#d1304a;color-scheme:light}
*{box-sizing:border-box}html{scroll-padding-top:84px;scroll-behavior:smooth}
body{margin:0;background:radial-gradient(900px 520px at 88% -10%,#4a35d855,transparent),radial-gradient(760px 420px at -8% 8%,#1f6bff2e,transparent),var(--bg);background-attachment:fixed;color:var(--ink);font:400 16px/1.6 Inter,system-ui,-apple-system,"Segoe UI",sans-serif;-webkit-font-smoothing:antialiased}
:root[data-theme="light"] body{background:radial-gradient(900px 520px at 90% -10%,#cfc8ff88,transparent),var(--bg)}
h1,h2,h3,h4{margin:0 0 .5em;line-height:1.1;font-weight:800}
h1,h2{font-family:Sora,Inter,sans-serif;letter-spacing:-.025em}h2{font-size:clamp(1.6rem,3.4vw,2.3rem)}
.in h3,.in h4,.onb h4{font-family:'Barlow Condensed',Inter,sans-serif;text-transform:uppercase;letter-spacing:.08em;font-weight:700}.in h3{font-size:1.35rem}.in h4{font-size:1rem;color:var(--mute);margin:18px 0 8px}
a{color:var(--ind)}:focus-visible{outline:2px solid var(--brand2);outline-offset:2px}
.ico{display:inline-block;width:1.2em;height:1.2em;vertical-align:-.22em;flex:none}.ico svg{width:100%;height:100%;display:block}
.ico[data-i=coin],.ico[data-i=star],.ico[data-i=trophy]{color:var(--gold)}.ico[data-i=flame]{color:#ff8a3d}.ico[data-i=zap]{color:#ffd23f}.ico[data-i=sprout]{color:var(--good)}.ico[data-i=check]{color:var(--good)}.ico[data-i=x]{color:var(--bad)}
.av{display:inline-grid;place-items:center;width:1.9em;height:1.9em;border-radius:50%;background:linear-gradient(135deg,#2b30a0,#5a3fc9);font-size:.95em;vertical-align:middle;box-shadow:0 0 0 1px var(--line2)}
/* buttons */
button{font:600 .92rem Inter,sans-serif;color:var(--ink);background:#ffffff0d;border:1px solid var(--line2);border-radius:12px;padding:9px 16px;cursor:pointer;transition:transform .15s,background .15s,border-color .15s,box-shadow .15s}
:root[data-theme="light"] button{background:#fff}
button:hover:not(:disabled){border-color:var(--brand);background:#7c5cff1f}button:active:not(:disabled){transform:translateY(1px)}button:disabled{opacity:.45;cursor:not-allowed}
.pri{color:#fff;border:0;background:linear-gradient(135deg,var(--brand),var(--brand2));box-shadow:0 10px 26px -10px #7c5cffcc,inset 0 1px 0 #ffffff55}.pri:hover:not(:disabled){background:linear-gradient(135deg,#8b6dff,#47b0ff);box-shadow:0 14px 30px -10px #7c5cff,inset 0 1px 0 #ffffff66}
input,select,textarea{font:inherit;width:100%;color:var(--ink);background:#ffffff0a;border:1px solid var(--line2);border-radius:12px;padding:11px 13px}:root[data-theme="light"] input,:root[data-theme="light"] select,:root[data-theme="light"] textarea{background:#fff}
input:focus,select:focus,textarea:focus{outline:none;border-color:var(--brand);box-shadow:0 0 0 3px #7c5cff33}select option{color:#111;background:#fff}
label{display:block;font-weight:600;font-size:.88rem;color:var(--mute);margin:12px 0 5px}input[type=checkbox],input[type=radio]{width:auto}
/* header */
header{position:sticky;top:0;z-index:30;display:flex;align-items:center;gap:14px;padding:10px 22px;padding-top:calc(10px + env(safe-area-inset-top,0px));background:#06072acc;backdrop-filter:blur(16px) saturate(1.4);border-bottom:1px solid var(--line);color:#fff}
header img{width:40px;height:40px;border-radius:11px;display:block;box-shadow:0 0 0 1px #ffffff26}
header nav{margin-left:auto;display:flex;gap:4px}header nav a{color:#c9ccf5;text-decoration:none;font-weight:600;font-size:.92rem;padding:7px 12px;border-radius:10px}header nav a:hover{background:#ffffff14;color:#fff}
header button{padding:7px 14px}#th{width:38px;padding:7px;display:grid;place-items:center}
.chips{display:flex;gap:8px;flex-wrap:nowrap}.chip2{display:inline-flex;align-items:center;gap:6px;background:#ffffff0f;border:1px solid var(--line2);border-radius:999px;padding:5px 12px;font-weight:700;font-size:.9rem;color:#fff}
/* cards */
.card{padding:20px;border-radius:22px;border:1px solid var(--line);background:linear-gradient(180deg,var(--s2),var(--s1));box-shadow:inset 0 1px 0 #ffffff0d,0 24px 48px -28px #000a}:root[data-theme="light"] .card{background:var(--s1);box-shadow:0 12px 32px -20px #1a1f6a55}
.wrap{overflow-x:auto}.tag{display:inline-flex;align-items:center;gap:4px;font-size:.74rem;font-weight:700;letter-spacing:.02em;padding:3px 10px;border-radius:999px;background:#7c5cff26;color:var(--ind);border:1px solid #7c5cff40}
.tag.live{background:#2fd9a01f;color:var(--good);border-color:#2fd9a055}.tag.soon{background:#ffc9331f;color:var(--gold);border-color:#ffc93355}
.demo{display:inline-block;background:#ffc9331f;color:var(--gold);border:1px solid #ffc93355;font-size:.74rem;font-weight:700;padding:3px 11px;border-radius:999px}
.ok{color:var(--good)}.no{color:var(--bad)}.wait{color:var(--gold)}.sub{color:var(--mute);margin:-4px 0 18px}
.bar{height:8px;border-radius:99px;background:#ffffff14;overflow:hidden}.bar i{display:block;height:100%;border-radius:99px;background:linear-gradient(90deg,var(--brand),var(--brand2));transition:width .4s}
.kp{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:12px}.kp>div{background:#ffffff08;border:1px solid var(--line);border-radius:16px;padding:14px;color:var(--mute);font-size:.85rem}.kp b{display:block;font:800 1.7rem Sora,sans-serif;color:var(--ink);letter-spacing:-.02em}
table{width:100%;border-collapse:collapse}th{font-size:.72rem;letter-spacing:.1em;text-transform:uppercase;color:var(--mute);font-weight:700;text-align:left;padding:10px}td{padding:12px 10px;border-top:1px solid var(--line);text-align:left}tr.me td{background:#7c5cff26;font-weight:700}tr.me td:first-child{border-radius:12px 0 0 12px}tr.me td:last-child{border-radius:0 12px 12px 0}
.rv{border-top:1px solid var(--line);padding:12px 0}
/* Clash tiles and modes */
.modes{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:14px}
.mode{position:relative;overflow:hidden;border-radius:22px;padding:18px;border:1px solid var(--line);background:linear-gradient(160deg,#1c2066,#0c0e38 70%)}.mode::after{content:"";position:absolute;right:-30px;top:-30px;width:140px;height:140px;border-radius:50%;background:radial-gradient(circle,#7c5cff55,transparent 70%)}
.mode>*{position:relative;z-index:1}.mode .ic{display:grid;place-items:center;width:46px;height:46px;border-radius:14px;margin-bottom:12px;background:linear-gradient(135deg,#7c5cff,#2fa4ff);color:#fff;box-shadow:0 10px 24px -10px #7c5cff}.mode .ic .ico{width:24px;height:24px;color:#fff!important}
.mode b{display:block;font:800 1.08rem Sora,sans-serif;margin-bottom:4px}.mode p{margin:0 0 12px;color:var(--mute);font-size:.9rem}
.tiles{display:flex;gap:10px;flex-wrap:wrap;margin:6px 0 18px}.tile{display:flex;flex-direction:column;align-items:center;gap:8px;min-width:96px;padding:14px 16px;border-radius:18px;background:var(--s1);border:1px solid var(--line);font-weight:700;color:var(--ink)}
.tile>span{display:grid;place-items:center;width:44px;height:44px;border-radius:14px;background:#ffffff0f}.tile .ico{width:24px;height:24px}.tile.on{background:var(--gold);border-color:var(--gold);color:#1a1400;box-shadow:0 12px 28px -12px #ffc933}.tile.on>span{background:#00000018}.tile.on .ico{color:#1a1400!important}
.tcard{border:1px solid var(--line);border-radius:18px;padding:16px;background:linear-gradient(180deg,var(--s2),var(--s1));transition:transform .2s,border-color .2s,box-shadow .2s}.tcard:hover{transform:translateY(-3px);border-color:#7c5cff80;box-shadow:0 18px 34px -20px #7c5cff}.tcard.done{border-color:#2fd9a066}
.tests{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:12px;margin-top:10px}
.quest{display:flex;gap:12px;align-items:center;padding:12px 14px;border-radius:16px;background:#ffffff08;border:1px solid var(--line);margin-bottom:8px}.quest .bar{height:6px}
/* app shell */
main{max-width:1100px;margin:auto;padding:0 22px}main>section:not(#app){padding:56px 0}
#app{display:flex;flex-direction:column;gap:14px}body:not(.in) #right{order:-1}body:not(.in) #chips{display:none}body:not(.in) #quests{display:none}
.in main{max-width:1320px}.in .hero,.in #clash,.onb .hero,.onb #clash{display:none}.in section#app{padding-top:22px}
.in #app{display:grid;grid-template-columns:230px minmax(0,1fr) 320px;gap:26px;align-items:start}.in #side{position:sticky;top:84px}
.in .tabs{display:flex;flex-direction:column;gap:4px;margin:0}
.in .tabs button{display:flex;align-items:center;gap:12px;text-align:left;background:transparent;border:1px solid transparent;border-radius:14px;padding:12px 14px;font:700 1rem 'Barlow Condensed',Inter,sans-serif;letter-spacing:.09em;text-transform:uppercase;color:var(--mute)}
.in .tabs button .ico{width:22px;height:22px;color:inherit!important}.in .tabs button:hover{background:#ffffff0d;color:var(--ink)}
.in .tabs button.on{color:#fff;background:linear-gradient(90deg,#7c5cff40,#7c5cff10);border-color:#7c5cff80;box-shadow:0 0 28px -8px #7c5cff}
/* hero */
.hero{position:relative;overflow:hidden;background:radial-gradient(circle at 78% 30%,#4a35e0 0,#171a78 34%,#06071e 72%);color:#fff}
.hero::before{content:"";position:absolute;inset:0;background-image:linear-gradient(#ffffff0a 1px,transparent 1px),linear-gradient(90deg,#ffffff0a 1px,transparent 1px);background-size:44px 44px;mask-image:radial-gradient(circle at 70% 40%,#000,transparent 70%)}
.hin{position:relative;max-width:1180px;margin:auto;padding:84px 22px 96px;display:grid;grid-template-columns:1.1fr .9fr;gap:44px;align-items:center}
.hero h1{font-size:clamp(2.5rem,5.6vw,4.4rem);font-weight:800;margin-bottom:.4em}.hero h1 em{font-style:normal;background:linear-gradient(90deg,#c1b6ff,#6fc8ff);-webkit-background-clip:text;background-clip:text;color:transparent}
.hero p{color:#cfd2fb;max-width:52ch;font-size:1.1rem}.cta{display:flex;gap:12px;flex-wrap:wrap;margin:26px 0}.cta button{padding:14px 24px;font-size:1rem;border-radius:14px}.cta .ghost{background:#ffffff14;border-color:#ffffff40;color:#fff}
.stats{display:flex;gap:30px;flex-wrap:wrap;color:#bfc3f3;font-size:.9rem}.stats b{display:block;font:800 1.5rem Sora,sans-serif;color:#fff}
.art{position:relative;max-width:420px;width:100%;justify-self:center;padding:22px;border-radius:32px;background:linear-gradient(160deg,#ffffff1f,#ffffff08);border:1px solid #ffffff2e;box-shadow:0 40px 80px -30px #000c,0 0 80px -20px #7c5cff99;backdrop-filter:blur(8px)}.art svg{width:100%;height:auto;display:block}
/* quiz engine */
.ex{display:grid;grid-template-columns:1fr 240px;gap:20px}.qtxt{font-size:1.2rem;line-height:1.7}
.opt{display:flex;gap:12px;align-items:center;padding:14px 16px;border:1px solid var(--line2);border-radius:14px;margin:9px 0;cursor:pointer;background:#ffffff08;font-weight:500;transition:border-color .15s,background .15s}.opt:hover{border-color:var(--brand)}.opt:has(input:checked){border-color:var(--brand);background:#7c5cff29}
.pal{display:grid;grid-template-columns:repeat(5,1fr);gap:7px}.pal button{padding:9px 0}.s-a{background:var(--good)!important;color:#04251b!important;border-color:transparent!important}.s-r{background:#8b5cf6!important;color:#fff!important}.s-v{background:var(--gold)!important;color:#241b00!important}.cur{outline:2px solid var(--brand2)}
.timer{font:800 1.5rem Sora,sans-serif;color:var(--ind)}.live{background:#7c5cff1f;border:1px solid #7c5cff40;border-radius:14px;padding:12px;margin-top:12px;font-size:.9rem}.dot{display:inline-block;width:9px;height:9px;border-radius:50%;background:#ff4d6d;margin-right:6px}
#dopts{display:grid;grid-template-columns:1fr 1fr;gap:10px}#dopts .opt{margin:0;justify-content:center;text-align:center;padding:20px 12px;font-size:1.15rem;font-weight:700}
dialog{border:1px solid var(--line2);border-radius:26px;padding:24px;width:min(940px,96vw);max-height:92vh;color:var(--ink);background:linear-gradient(180deg,#14175a,#0a0c33);box-shadow:0 40px 100px -20px #000}:root[data-theme="light"] dialog{background:#fff}dialog::backdrop{background:#03041acc;backdrop-filter:blur(6px)}
.sk{height:84px;border-radius:20px;margin-bottom:12px;background:linear-gradient(90deg,#ffffff0a,#ffffff22,#ffffff0a);background-size:200% 100%;animation:shim 1.3s infinite}@keyframes shim{to{background-position:-200% 0}}
.ladder{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.ladder span{background:#ffffff0f;border:1px solid var(--line2);border-radius:999px;padding:7px 16px;font-weight:700}.ladder i{color:var(--mute);font-style:normal}
footer{margin-top:40px;padding:36px 22px;text-align:center;color:var(--mute);border-top:1px solid var(--line);background:#04051acc}footer img{width:46px;border-radius:12px}footer a{color:var(--ind);text-decoration:none;margin:0 6px}
@media(max-width:1000px){.in #app{grid-template-columns:1fr}.in #right{order:-1}.in #side{position:static}.hin{grid-template-columns:1fr;padding:56px 22px 64px}header nav{display:none}.chips{margin-left:auto}}
@media(max-width:780px){.ex{grid-template-columns:1fr}.in .tabs{position:fixed;left:0;right:0;bottom:0;z-index:40;flex-direction:row;overflow-x:auto;gap:2px;padding:8px 8px calc(8px + env(safe-area-inset-bottom,0px));background:#06072af2;backdrop-filter:blur(16px);border-top:1px solid var(--line2)}.in .tabs button{flex:0 0 auto;flex-direction:column;gap:3px;padding:8px 12px;font-size:.72rem;letter-spacing:.04em}.in main{padding-bottom:92px}#dopts{grid-template-columns:1fr}header{padding:8px 14px}.chip2{padding:4px 9px;font-size:.8rem}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
.planner-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin:0 0 18px}.planner-head h2{margin:10px 0}.planner-head .sub{margin:0;max-width:60ch}.planner-stats{display:flex;flex-wrap:wrap;gap:8px}.planner-stats>div{min-width:92px;padding:10px 13px;border:1px solid var(--line);border-radius:14px;background:#ffffff08;color:var(--mute);font-size:.78rem}.planner-stats b{display:block;color:var(--ink);font:700 1.15rem Sora,sans-serif}.planner-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-bottom:26px}.planner-form h3{margin-bottom:10px}.planner-form textarea{resize:vertical}.planner-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}.planner-section-title{margin:24px 0 10px}.planner-list{display:grid;gap:9px}.planner-row{display:flex;align-items:flex-start;gap:12px;padding:14px;border:1px solid var(--line);border-radius:16px;background:linear-gradient(180deg,var(--s2),var(--s1))}.planner-check{flex:none;min-width:40px;padding:7px;color:var(--good);font-size:1.15rem}.planner-task-copy{flex:1;min-width:0}.planner-task-copy b{display:block}.planner-task-copy small{color:var(--mute)}.planner-task-copy p{margin:7px 0 0;color:var(--mute);font-size:.9rem}.planner-row.is-done .planner-task-copy b{text-decoration:line-through;color:var(--mute)}.planner-delete{color:var(--bad)}.planner-notes{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:12px}.planner-note>div:first-child{display:flex;justify-content:space-between;gap:8px;align-items:center}.planner-note>div:first-child small{color:var(--mute)}.planner-note h4{margin:12px 0 6px}.planner-note p{color:var(--mute);white-space:normal;overflow-wrap:anywhere}.planner-note>div:last-child{margin-top:12px}
@media(max-width:780px){.planner-head{display:block}.planner-stats{margin-top:12px}.planner-grid{grid-template-columns:1fr}.planner-fields{grid-template-columns:1fr 1fr}.planner-row{gap:8px;padding:11px}.planner-delete{padding:7px 10px}}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.manjil-head{display:flex;align-items:center;gap:18px;margin-bottom:12px;background:radial-gradient(circle at 5% 10%,#7c5cff38,transparent 42%),linear-gradient(135deg,var(--s2),var(--s1))}.manjil-head h2{margin:8px 0 4px}.manjil-head p{color:var(--mute);margin:0;max-width:55ch}.manjil-avatar{width:92px;height:92px;flex:none;filter:drop-shadow(0 10px 20px #674fff55)}
.manjil-report{border:1px solid #7c5cff55;border-radius:20px;padding:16px 18px;margin:12px 0;background:linear-gradient(110deg,#7c5cff1c,#2fa4ff0b)}.manjil-report-head{display:flex;justify-content:space-between;align-items:center;gap:10px}.manjil-report-head button{font-size:.8rem;padding:6px 10px}.manjil-report p{margin:10px 0 0;color:var(--mute);font-size:.9rem}.manjil-stats{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}.manjil-stats span{padding:7px 11px;border:1px solid var(--line);border-radius:12px;color:var(--mute);font-size:.78rem;background:#ffffff08}.manjil-stats b{color:var(--ink);margin-right:4px}
.manjil-shortcuts{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}.manjil-shortcuts button{font-size:.82rem}.manjil-chat{padding:14px}.manjil-messages{display:flex;flex-direction:column;gap:10px;max-height:420px;overflow:auto;padding:4px 2px 12px;scroll-behavior:smooth}.manjil-msg{max-width:min(88%,680px);padding:11px 14px;border:1px solid var(--line);border-radius:17px;background:#ffffff08;overflow-wrap:anywhere}.manjil-msg b{display:block;font-size:.78rem;color:var(--ind);margin-bottom:3px}.manjil-msg.user{align-self:flex-end;background:#7c5cff25;border-color:#7c5cff45}.manjil-msg.user b{color:#8fd0ff}.manjil-msg.mentor{align-self:flex-start}.manjil-prompts{display:flex;gap:7px;flex-wrap:wrap;margin:4px 0 10px}.manjil-prompts button{font-size:.78rem;padding:7px 10px}.manjil-compose{display:flex;gap:9px;align-items:flex-end}.manjil-compose textarea{resize:vertical;min-height:48px;max-height:150px}.manjil-compose button{min-height:46px}.manjil-note{display:block;color:var(--mute);margin-top:8px;font-size:.75rem}
@media(max-width:600px){.manjil-head{align-items:flex-start;padding:15px}.manjil-avatar{width:68px;height:68px}.manjil-msg{max-width:96%}.manjil-compose{align-items:stretch}.manjil-compose button{padding-inline:12px}}
.material-form{max-width:720px}.material-form textarea{resize:vertical}.material-form input[type=file]{margin:4px 0 8px}.material-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:12px}.material-card h3{margin:8px 0}.material-card p{color:var(--mute);overflow-wrap:anywhere}.material-card small{color:var(--mute);display:inline-block;margin:4px 0 10px}
.profile-layout{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(320px,.95fr);gap:16px;align-items:start}.profile-editor{max-width:100%}.profile-heading,.profile-person{display:flex;align-items:center;gap:14px}.profile-heading h2,.profile-person h2{margin:0 0 4px}.profile-heading p,.profile-person p{margin:4px 0;color:var(--mute)}.profile-avatar{width:68px;height:68px;display:grid;place-items:center;flex:0 0 auto;border-radius:22px;background:linear-gradient(145deg,#7c5cff55,#2f7bff33);border:1px solid var(--line2)}.profile-avatar .av{font-size:2rem}.profile-handle{display:flex;align-items:center;border:1px solid var(--line2);border-radius:12px;padding-left:13px;background:#ffffff08}.profile-handle span{color:var(--mute);font-weight:800}.profile-handle input{border:0;background:transparent}.profile-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}.profile-public-toggle{display:flex;align-items:flex-start;gap:11px;padding:14px;margin:18px 0;border:1px solid var(--line2);border-radius:15px;background:#ffffff08}.profile-public-toggle input{width:auto;margin:5px 0 0}.profile-public-toggle span{display:grid;gap:5px}.profile-public-toggle small,.profile-editor>small{color:var(--mute);line-height:1.55}.profile-preview{position:sticky;top:14px}.profile-public-card{padding:0;overflow:hidden}.profile-cover{min-height:94px;padding:17px 20px;display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap;background:radial-gradient(ellipse at 80% 0,#7160ff99,transparent 50%),linear-gradient(120deg,#171c61,#312697);font:700 .8rem 'Barlow Condensed',sans-serif;letter-spacing:.12em;color:#e1ddff}.profile-person{padding:0 22px;margin-top:-28px;position:relative}.profile-person h2{font:800 1.5rem Sora,sans-serif}.profile-username{color:var(--ind);font-size:.9rem}.profile-person p{line-height:1.55;overflow-wrap:anywhere}.profile-schools{display:flex;gap:8px;flex-wrap:wrap;padding:14px 22px 0}.profile-schools span,.profile-badge{border:1px solid var(--line2);border-radius:999px;background:#ffffff09;padding:7px 11px;font-size:.84rem}.profile-stat-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:9px;padding:18px 22px}.profile-stat-grid>div{display:grid;gap:3px;padding:13px;border-radius:14px;background:#ffffff0a;border:1px solid var(--line2)}.profile-stat-grid b{font:800 1.2rem Sora,sans-serif}.profile-stat-grid small{color:var(--mute)}.profile-section{padding:4px 22px 16px}.profile-section h3{margin:8px 0}.profile-section>p{color:var(--mute);font-size:.88rem;line-height:1.5}.subject-rating{margin:13px 0}.subject-rating>div:first-child{display:flex;justify-content:space-between;gap:10px;font-size:.9rem}.subject-rating span{color:var(--mute)}.subject-rating .bar{margin:7px 0 0}.profile-badges{display:flex;flex-wrap:wrap;gap:7px}.profile-count{font:600 .85rem Inter,sans-serif;color:var(--mute)}.profile-joined{padding:15px 22px;border-top:1px solid var(--line2);color:var(--mute);font-size:.85rem}.profile-preview-actions{padding:0 22px 20px}.profile-public-wrap{max-width:720px;margin:12px auto}.profile-public-wrap>.profile-public-card{margin-bottom:14px}.profile-back{display:inline-block;margin:0 4px;color:var(--mute)}
@media(max-width:820px){.profile-layout{grid-template-columns:1fr}.profile-preview{position:static}.profile-editor,.profile-public-card{min-width:0}}
@media(max-width:520px){.profile-fields{grid-template-columns:1fr}.profile-cover{min-height:85px}.profile-stat-grid{padding-inline:14px}.profile-section{padding-inline:16px}.profile-person{padding-inline:16px;align-items:flex-start}.profile-person .profile-avatar{width:58px;height:58px}.profile-schools{padding-inline:16px}}
.friend-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0 14px}.friend-tabs button{border:1px solid var(--line2);border-radius:999px;padding:10px 16px;background:#ffffff08;color:var(--ink)}.friend-tabs button.on{background:linear-gradient(120deg,#7c5cff,#2f7bff);color:white;border-color:transparent}.friend-tab-panel h2{margin:8px 0}.friend-search{display:flex;gap:8px;align-items:center;margin:12px 0}.friend-search input{flex:1;min-width:0}.friend-results,.friend-list{display:grid;gap:10px;margin-top:14px}.friend-card{display:flex;align-items:center;gap:12px;padding:14px;border:1px solid var(--line2);border-radius:16px;background:#ffffff08}.friend-id{display:grid;gap:3px;min-width:0;flex:1}.friend-id b,.friend-id span,.friend-id small{overflow-wrap:anywhere}.friend-id span,.friend-id small{color:var(--mute);font-size:.86rem}.friend-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}.friend-actions button{padding:8px 11px;font-size:.86rem}.friend-loading{color:var(--ind);animation:friendpulse 1.1s ease-in-out infinite alternate}@keyframes friendpulse{to{opacity:.5}}.friend-code-value{font:800 1.7rem Sora,sans-serif;letter-spacing:.12em;margin:8px 0}.friend-code{margin:12px 0}.blocked-list .rv{padding:10px 0;border-top:1px solid var(--line2)}
@media(max-width:600px){.friend-card{align-items:flex-start;flex-wrap:wrap}.friend-card>.av{flex:0 0 auto}.friend-actions{width:100%;justify-content:flex-start}.friend-search{align-items:stretch}.friend-search input{width:100%}}

/* premium learner workspace: deep ink, electric violet, and a new mint accent */
header{padding-inline:clamp(14px,2.4vw,32px);background:linear-gradient(100deg,#080a25f2,#100d38ed 70%,#08192cf2);border-bottom-color:#a99dff22;box-shadow:0 10px 34px #02031355}
header img{box-shadow:0 0 0 1px #ffffff32,0 0 24px #7c5cff48}
.in main{max-width:1560px;padding-inline:clamp(16px,2.3vw,34px)}
.in #app{grid-template-columns:minmax(188px,222px) minmax(0,1fr) minmax(265px,302px);gap:0;align-items:stretch}
.in #side{position:sticky;top:78px;align-self:start;min-height:calc(100vh - 92px);padding:18px 16px 24px 0}
.in #side::after{content:"";position:absolute;right:0;top:14px;bottom:20px;width:1px;background:linear-gradient(180deg,transparent,var(--mint) 15%,#6a7cff 55%,var(--mint) 85%,transparent);box-shadow:0 0 10px var(--mint),0 0 22px #4c83ff66;opacity:.72}
.in #center{position:relative;min-width:0;padding:18px clamp(16px,2vw,28px) 28px}
.in #right{position:relative;min-width:0;padding:18px 0 28px 20px}
.in #right::before{content:"";position:absolute;left:0;top:14px;bottom:20px;width:1px;background:linear-gradient(180deg,transparent,var(--mint) 15%,#6a7cff 55%,var(--mint) 85%,transparent);box-shadow:0 0 10px var(--mint),0 0 22px #4c83ff66;opacity:.72}
.in .tabs{gap:6px;padding-right:12px}
.in .tabs button{min-height:46px;padding:10px 12px;letter-spacing:.075em;color:#b7bce9;transition:background .2s,color .2s,transform .2s,box-shadow .2s}
.in .tabs button:hover{transform:translateX(2px);background:linear-gradient(90deg,#ffffff0d,transparent);color:var(--ink)}
.in .tabs button.on{color:#fff;background:linear-gradient(100deg,#7258ff3b,#48e2c014 135%);border-color:#8d7cff72;box-shadow:inset 3px 0 0 var(--mint),0 8px 25px #080a2540,0 0 22px -12px var(--mint)}
.in .tabs button.on .ico{color:var(--mint)!important}
.in #center #view{min-width:0}
.clash-dashboard{display:grid;gap:21px}
.clash-hero{position:relative;overflow:hidden;isolation:isolate;display:flex;align-items:center;justify-content:space-between;gap:22px;min-height:184px;padding:26px clamp(20px,3vw,38px);border:1px solid #9f91ff38;border-radius:26px;background:radial-gradient(ellipse at 83% 10%,#48e2c02a,transparent 37%),radial-gradient(ellipse at 100% 100%,#745dff42,transparent 52%),linear-gradient(122deg,#171b4c 4%,#10132f 70%,#0e1d39);box-shadow:inset 0 1px 0 #ffffff1c,0 28px 60px -42px #000;}
.clash-hero>div:first-child{position:relative;z-index:1;max-width:590px}.clash-hero h2{font-size:clamp(1.75rem,3vw,2.5rem);margin:11px 0 8px}.clash-hero p{color:#c2c7ed;margin:0 0 15px;max-width:58ch}.clash-hero>.pri{position:relative;z-index:2;white-space:nowrap;padding:12px 18px}
.clash-orbit{position:absolute;z-index:-1;width:195px;height:195px;right:8%;top:50%;transform:translate(0,-50%);border:1px solid #65e7ce30;border-radius:50%;box-shadow:0 0 0 23px #7c5cff0b,0 0 0 48px #48e2c00a,0 0 60px #48e2c015}
.clash-orbit::before,.clash-orbit::after{content:"";position:absolute;border-radius:50%;background:var(--mint);box-shadow:0 0 15px var(--mint)}.clash-orbit::before{width:8px;height:8px;right:23px;top:30px}.clash-orbit::after{width:5px;height:5px;left:21px;bottom:27px;background:#b7a6ff;box-shadow:0 0 15px #b7a6ff}
.clash-meta{display:flex;flex-wrap:wrap;gap:8px}.clash-meta span{padding:5px 10px;border:1px solid #ffffff17;border-radius:999px;background:#ffffff08;color:#d4d8f7;font-size:.76rem;font-weight:650}
.clash-subject-panel{padding:17px 0 3px;border-bottom:1px solid #48e2c02a}.clash-section-title{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:12px}.clash-section-title h3{font:800 1.14rem Sora,sans-serif;margin:3px 0}.clash-section-title p{margin:0;color:var(--mute);font-size:.86rem}.eyebrow,.mode-kicker{display:block;color:var(--mint);font:700 .69rem 'Barlow Condensed',Inter,sans-serif;letter-spacing:.15em;text-transform:uppercase}.clash-subject-panel .tiles{gap:9px;margin:13px 0 12px}.clash-subject-panel .tile{min-width:78px;flex-direction:row;justify-content:center;padding:9px 14px;border-radius:999px;background:#ffffff08}.clash-subject-panel .tile>span{width:25px;height:25px;border-radius:50%;background:#ffffff0b}.clash-subject-panel .tile.on{background:linear-gradient(105deg,#48e2c0,#8af3d8);color:#071a24;border-color:transparent;box-shadow:0 8px 22px -12px #48e2c0}.clash-subject-panel .tile.on>span{background:#071a241a}
.clash-mode-title{margin:2px 0 -3px}.rating-pill{flex:none;display:flex;align-items:center;gap:7px;padding:7px 11px;border:1px solid #48e2c044;border-radius:12px;color:var(--mint);background:#48e2c012;font-weight:800}.rating-pill small{font:700 .62rem Inter,sans-serif;letter-spacing:.1em;color:var(--mute)}
.clash-modes{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.clash-mode-card{min-height:194px;display:flex;flex-direction:column;align-items:flex-start;padding:17px 18px;border-color:#ffffff17;background:radial-gradient(ellipse at 100% 0,#48e2c014,transparent 52%),linear-gradient(145deg,#191d53,#0e1231 83%);box-shadow:inset 0 1px 0 #ffffff10,0 16px 36px -26px #000;transition:transform .2s,border-color .2s,box-shadow .2s}.clash-mode-card:hover{transform:translateY(-3px);border-color:#48e2c066;box-shadow:0 20px 42px -28px #48e2c055}.clash-mode-card .ic{width:40px;height:40px;margin:0 0 9px;border-radius:13px}.clash-mode-card .mode-kicker{font-size:.62rem;margin-bottom:4px}.clash-mode-card>b{font:800 1.07rem Sora,sans-serif}.clash-mode-card>p{font-size:.83rem;line-height:1.5;margin:5px 0 13px;max-width:36ch}.clash-mode-card>.pri{margin-top:auto}.clash-button-row{display:flex;gap:7px;margin-top:auto}.clash-button-row button{padding:7px 12px}.clash-coming{background:linear-gradient(145deg,#171a3b,#101126);border-style:dashed}.clash-courses{padding-top:5px;scroll-margin-top:84px}.clash-courses .clash-section-title{margin-bottom:14px}.subtle-action{border-color:#48e2c033;color:var(--mint);background:#48e2c00a}
.clash-squad{display:flex;align-items:center;justify-content:space-between;gap:14px;border-color:#48e2c033;background:linear-gradient(110deg,#48e2c010,#7c5cff13)}.clash-squad h3{font:800 1rem Sora,sans-serif;margin:4px 0}.clash-squad p{margin:0;color:var(--mute);font-size:.86rem}.clash-squad button{flex:none}
:root[data-theme="light"] .clash-hero{background:radial-gradient(ellipse at 83% 10%,#48e2c038,transparent 38%),linear-gradient(120deg,#fff,#eeedff 75%,#e1faf4);border-color:#6e61d844}:root[data-theme="light"] .clash-mode-card{background:linear-gradient(145deg,#fff,#f2f4ff)}:root[data-theme="light"] .clash-coming{background:linear-gradient(145deg,#f6f6fb,#eeeff7)}
.next-gift{padding:19px 21px;border-color:#48e2c044;background:radial-gradient(ellipse at 100% 0,#48e2c020,transparent 42%),linear-gradient(130deg,var(--s2),var(--s1))}.next-gift-top{display:flex;align-items:center;justify-content:space-between;gap:15px}.next-gift h2{font-size:clamp(1.35rem,2.4vw,1.8rem);margin:6px 0}.next-gift p{color:var(--mute);margin:0}.gift-coins{display:grid;text-align:right;flex:none}.gift-coins b{font:800 1.7rem Sora,sans-serif;color:var(--gold)}.gift-coins span,.gift-progress-label{font-size:.78rem;color:var(--mute)}.gift-progress{height:10px;margin-top:16px;background:var(--line2)}.gift-progress i{background:linear-gradient(90deg,var(--mint),var(--brand2),var(--gold))}.gift-progress-label{display:flex;justify-content:space-between;margin-top:5px}
.subject-tiles{margin:12px 0 4px!important}.subject-tiles .tile{min-width:82px;padding:9px 13px;flex-direction:row;gap:7px;border-radius:14px}.subject-tiles .tile>span{width:25px;height:25px;border-radius:50%}.clash-subject-panel{padding:17px 0 3px;border-bottom:1px solid #48e2c02a}.clash-section-title{margin-bottom:12px}.clash-section-title h3{font:800 1.14rem Sora,sans-serif;text-transform:none;letter-spacing:-.01em;color:var(--ink)}.clash-section-title .tag{flex:none}
.online-section{padding:6px 0 0}.online-player-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.online-player{display:flex;align-items:center;gap:10px;min-width:0;padding:11px;border:1px solid var(--line);border-radius:16px;background:linear-gradient(145deg,var(--s2),var(--s1));transition:border-color .2s,transform .2s}.online-player:hover{transform:translateY(-1px);border-color:#48e2c077}.online-player>.av{flex:none}.online-player-id{display:grid;gap:1px;min-width:0;flex:1}.online-player-id b,.online-player-id small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.online-player-id small{font-size:.72rem;color:var(--mute)}.online-player-actions{display:flex;flex:none;gap:5px;flex-wrap:wrap;justify-content:flex-end}.online-player-actions button{padding:6px 8px;font-size:.72rem}.online-empty{grid-column:1/-1;padding:19px;text-align:center;color:var(--mute);border:1px dashed var(--line2);border-radius:16px;background:#ffffff05}.invite-note{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0 0 10px;padding:10px 12px;border:1px solid #48e2c055;border-radius:14px;background:#48e2c010;color:var(--ink);font-size:.86rem}.invite-note b{margin-right:auto}
#coinTasks h3{font:800 1.08rem Sora,sans-serif;text-transform:none;letter-spacing:-.01em;margin:0 0 4px;color:var(--ink)}.coin-task-note{font-size:.78rem;color:var(--mute);margin:0 0 9px}.coin-task{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 0 7px;padding:9px 10px;border:1px solid var(--line);border-radius:13px;background:var(--s1)}.coin-task>div{display:grid;min-width:0}.coin-task b{font-size:.78rem}.coin-task small{font-size:.68rem;color:var(--mute)}.coin-task button{padding:6px 9px;font-size:.73rem;flex:none}.coin-task-foot{display:block;color:var(--mute);font-size:.69rem;line-height:1.4;margin-top:8px}.upgrade-panel{max-width:650px;margin:20px auto}.upgrade-panel h2{margin:12px 0}.upgrade-panel p{color:var(--mute)}.upgrade-current{padding:12px;border:1px solid var(--line);border-radius:14px;background:var(--s1)}
@media(max-width:1120px){.in #app{grid-template-columns:minmax(170px,195px) minmax(0,1fr) minmax(240px,265px)}.in #center{padding-inline:17px}.in #right{padding-left:16px}.in .tabs button{font-size:.92rem}.online-player-list{grid-template-columns:1fr}.online-player{flex-wrap:wrap}.online-player-actions{width:100%;justify-content:flex-start}}
@media(max-width:1000px){.in #app{grid-template-columns:1fr;gap:0}.in #side{min-height:0;padding:0}.in #side::after,.in #right::before{display:none}.in #center{padding:18px 0}.in #right{order:-1;padding:14px 0 0;display:grid;grid-template-columns:1fr 1fr;gap:12px;align-items:start}.in #quests{margin-top:0!important}.in .tabs{padding-right:0}.in .tabs button.on{box-shadow:inset 3px 0 0 var(--mint),0 0 20px -12px var(--mint)}}
@media(max-width:780px){.in #right{grid-template-columns:1fr}.in #side{z-index:40}.in #center{padding-top:13px}.clash-hero{align-items:flex-start;flex-direction:column;min-height:0;padding:22px}.clash-orbit{right:-54px;top:44%;width:150px;height:150px}.clash-hero>.pri{padding:10px 14px}.clash-modes{grid-template-columns:1fr 1fr}.clash-mode-card{min-height:205px;padding:14px}.clash-section-title{align-items:flex-start}.clash-squad{align-items:flex-start;flex-direction:column}.clash-meta span{font-size:.68rem}}
@media(max-width:520px){.clash-dashboard{gap:16px}.clash-modes{grid-template-columns:1fr}.clash-mode-card{min-height:0}.clash-mode-card>p{max-width:unset}.clash-section-title p{font-size:.8rem}.clash-subject-panel .tile{min-width:0;padding:8px 11px;font-size:.85rem}.clash-subject-panel .tiles{gap:6px}.clash-hero h2{font-size:1.8rem}.rating-pill{padding:6px 8px}}
.coin-task{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 0;border-bottom:1px solid var(--line)}.coin-task>div{display:grid;gap:4px}.coin-task>div small{color:var(--mute)}.coin-task-link{display:inline-flex;align-items:center;justify-content:center;min-height:38px;padding:8px 13px;border:1px solid var(--line);border-radius:12px;color:var(--text);font-weight:700;text-decoration:none;white-space:nowrap}.coin-task-foot,.coin-task-note{display:block;margin-top:10px;color:var(--mute);font-size:.88rem}.mistake-history{display:grid;gap:16px}.mistake-history .kp{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:10px}.mistake-entry{display:grid;gap:10px;padding:16px 0;border-bottom:1px solid var(--line)}.mistake-entry-head{display:flex;align-items:center;flex-wrap:wrap;gap:8px}.mistake-context{color:var(--mute);font-size:.88rem}.incorrect-tag{border-color:#ff7184;color:#ff8796}.ai-question-builder{margin-bottom:16px}.ai-question-builder .ai-draft{padding:14px 0;border-top:1px solid var(--line)}.ai-question-builder .ai-draft ol{padding-left:24px}.ai-question-builder .ai-draft li{margin:5px 0}.coin-task-admin{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:10px 0}.coin-task-admin a{overflow-wrap:anywhere}.coin-task-admin button{margin:3px}@media(max-width:600px){.coin-task,.coin-task-admin{align-items:flex-start;flex-direction:column}.mistake-entry-head{align-items:flex-start}}

/* Premium live matchmaking search */
.match-search{text-align:center;padding:26px 18px 20px;display:grid;justify-items:center;gap:10px}
.match-search .eyebrow{color:var(--mint);font-size:.72rem;font-weight:800;letter-spacing:.16em}
.match-search h3{margin:2px 0;font-size:clamp(1.35rem,3vw,1.8rem)}
.match-search p{margin:0;color:var(--mute)}
.match-radar{width:184px;aspect-ratio:1;border-radius:50%;position:relative;display:grid;place-items:center;margin:4px auto 12px;isolation:isolate;background-image:linear-gradient(90deg,transparent 49.7%,var(--line) 50%,transparent 50.3%),linear-gradient(0deg,transparent 49.7%,var(--line) 50%,transparent 50.3%),radial-gradient(circle,transparent 31%,color-mix(in srgb,var(--mint) 22%,transparent) 31.5%,transparent 32.5%,transparent 57%,color-mix(in srgb,var(--mint) 16%,transparent) 57.5%,transparent 58.5%,transparent 82%,color-mix(in srgb,var(--mint) 12%,transparent) 82.5%,transparent 83.5%)}
.match-radar:before{content:"";position:absolute;inset:0;border-radius:50%;background:conic-gradient(from 0deg,transparent 0 72%,color-mix(in srgb,var(--mint) 34%,transparent) 89%,transparent 100%);animation:match-sweep 3.2s linear infinite;z-index:-1}
.match-radar span{position:absolute;inset:14%;border:1px solid color-mix(in srgb,var(--mint) 50%,transparent);border-radius:50%;animation:match-pulse 2.4s ease-out infinite}
.match-radar span:nth-child(2){animation-delay:.8s}.match-radar span:nth-child(3){animation-delay:1.6s}
.match-radar b{display:grid;place-items:center;width:58px;height:58px;border-radius:20px;background:linear-gradient(145deg,var(--mint),#70a8ff);color:#10152a;font-size:1.5rem;box-shadow:0 0 34px color-mix(in srgb,var(--mint) 35%,transparent)}
.match-search-progress{width:min(340px,90%);height:5px;border-radius:99px;overflow:hidden;background:var(--line);margin-top:5px}
.match-search-progress i{display:block;height:100%;width:38%;border-radius:inherit;background:linear-gradient(90deg,var(--mint),#7890ff);animation:match-progress 1.7s ease-in-out infinite alternate}
.match-cancel{display:block;margin:0 auto 20px;min-width:140px}
@keyframes match-sweep{to{transform:rotate(360deg)}}
@keyframes match-pulse{0%{transform:scale(.55);opacity:.8}100%{transform:scale(1.25);opacity:0}}
@keyframes match-progress{from{transform:translateX(-15%)}to{transform:translateX(175%)}}
@media(prefers-reduced-motion:reduce){.match-radar:before,.match-radar span,.match-search-progress i{animation:none}}:root[data-theme="light"] .in .tabs button{color:#485171}:root[data-theme="light"] .in .tabs button.on{color:#131735;background:linear-gradient(100deg,#6953de20,#10a88a16);border-color:#6953de55;box-shadow:inset 3px 0 0 #14a889,0 8px 22px #5746bd14}:root[data-theme="light"] .in .tabs button.on .ico{color:#087b69}.in .tabs button .ico{display:inline-grid;place-items:center;flex:none;width:34px;height:34px;padding:6px;border-radius:10px;background:#7c5cff1a}.in .tabs button:hover:not(.on) .ico{background:#7c5cff30}.in .tabs button .tab-label{min-width:0}@media(max-width:780px){:root[data-theme="light"] .in .tabs{background:#f4f4fcee}.in .tabs button .ico{width:28px;height:28px;padding:5px}.in .tabs button .tab-label{font-size:.69rem}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}}

.profile-photo { width:100%; height:100%; object-fit:cover; border-radius:inherit; display:block; }
.profile-avatar { overflow:hidden; background:var(--card,#252054); }
.profile-initial { font-size:1.55rem; font-weight:800; }
.av .profile-photo { width:1.6rem; height:1.6rem; border-radius:50%; }
.profile-cover { min-height:120px; }
.profile-person { align-items:end; }
.profile-preview-actions { display:flex; gap:10px; align-items:center; flex-wrap:wrap; padding-top:14px; }
.profile-tabs { display:flex; gap:8px; padding:0 22px 14px; }
.profile-tabs button[aria-pressed=true] { border-color:var(--ind); box-shadow:inset 0 -2px var(--ind); }
.profile-public-card [hidden] { display:none; }
.profile-section .profile-stat-grid,.profile-section .profile-schools { padding:0; }
.profile-activity { list-style:none; margin:0; padding:0; }
.profile-activity li { display:flex; flex-wrap:wrap; gap:8px 14px; align-items:center; padding:10px 0; border-bottom:1px solid var(--line2); }
.profile-activity small { margin-left:auto; color:var(--mute); }
.profile-home,.profile-public-wrap,.profile-data { max-width:760px; margin-inline:auto; }
.profile-public-card .profile-cover { position:relative; isolation:isolate; min-height:clamp(145px,30vw,210px); background:linear-gradient(155deg,#ff9d31,#a8581b); color:#241409; }
.profile-stars { position:absolute; inset:0; z-index:-1; overflow:hidden; pointer-events:none; }
.profile-stars i { position:absolute; display:block; width:94px; aspect-ratio:1; background:#ffe267; opacity:.72; clip-path:polygon(50% 0,61% 33%,86% 14%,70% 40%,100% 50%,70% 60%,86% 86%,61% 67%,50% 100%,39% 67%,14% 86%,30% 60%,0 50%,30% 40%,14% 14%,39% 33%); }
.profile-stars i:nth-child(1) { left:12%; top:-25px; }
.profile-stars i:nth-child(2) { right:27%; bottom:6px; transform:rotate(14deg); }
.profile-stars i:nth-child(3) { right:2%; top:-30px; transform:rotate(-17deg); }
.profile-public-card .profile-person { display:grid; justify-items:start; gap:12px; margin-top:-34px; }
.profile-public-card .profile-avatar { width:76px; height:76px; border-radius:50%; border:3px solid var(--bg,#151623); }
.profile-public-card .profile-preview-actions { padding-bottom:24px; }
.profile-find-friends { flex-basis:100%; border-color:var(--ind); }
.profile-public-card .profile-tabs { padding:0; gap:0; border-bottom:1px solid var(--line2); }
.profile-public-card .profile-tabs button { flex:1; border:0; border-radius:0; background:transparent; }
.profile-public-card .profile-section { padding-block:22px; }
.profile-public-card .profile-stat-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
.profile-public-card .profile-stat-grid > div { text-align:center; align-content:center; min-height:72px; overflow-wrap:anywhere; }
dialog.profile-editor { box-sizing:border-box; width:min(560px,calc(100% - 28px)); max-height:calc(100dvh - 32px); overflow:auto; }
dialog.profile-editor:not([open]) { display:none; }
.profile-data { margin-top:14px; }
@media(max-width:520px) {
  .profile-public-card .profile-stat-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
.profile-home,.profile-public-wrap,.profile-data { max-width:660px; }
.profile-public-card .profile-cover {
  min-height:0;
  aspect-ratio:3.3;
  align-items:center;
  padding:14px clamp(16px,4vw,30px);
  color:#fff;
  background:
    repeating-linear-gradient(125deg,transparent 0 34px,#ffffff12 35px 36px,transparent 37px 62px),
    radial-gradient(ellipse at 84% 50%,var(--league-accent),transparent 48%),
    linear-gradient(120deg,#15182a,var(--league-shade));
}
.profile-league-label { display:grid; gap:5px; }
.profile-league-label small { color:var(--league-accent); font-weight:800; }
.profile-league-label strong { font:800 clamp(1.25rem,4vw,2rem)/1.1 Sora,sans-serif; letter-spacing:0; }
.profile-league-label span { color:#fff; letter-spacing:0; }
.profile-league-emblem { width:clamp(46px,12vw,104px); aspect-ratio:1; margin-right:5%; color:#fff; filter:drop-shadow(0 4px 10px #121327); }
.profile-public-card .profile-person { margin-top:-24px; gap:7px; }
.profile-public-card .profile-avatar { width:60px; height:60px; }
.profile-stream { display:block; margin-top:5px; color:var(--mute); }
.profile-public-card .profile-preview-actions { padding-block:12px 16px; }
.profile-public-card .profile-section { padding-block:15px; }
.profile-subject-icon { display:block; font-size:1.1rem; }
.profile-activity .profile-match { display:block; margin-top:10px; padding:9px 12px; border:1px solid var(--line2); border-radius:12px; background:#ffffff09; }
.profile-match header { position:static; display:flex; justify-content:space-between; gap:8px; padding:0 0 5px; color:var(--mute); font-size:.76rem; background:none; border:0; }
.profile-match-player { display:grid; grid-template-columns:25px minmax(0,1fr) auto; gap:8px; align-items:center; padding:3px 0; overflow-wrap:anywhere; }
.profile-match-avatar { display:grid; place-items:center; width:24px; height:24px; border-radius:50%; overflow:hidden; background:var(--line2); }
.profile-match-avatar .profile-initial { font-size:.72rem; }
.profile-match .match-won { color:#34d399; }
.profile-match .match-lost { color:#fb7185; }

/* Meath brand palette and lettering. */
:root:not([data-theme="light"]) {
  --bg:#090b85;
  --bg2:#101397;
  --s1:#151984;
  --s2:#222795;
  --card:#151984;
  --navy:#080a70;
  --ink:#fff;
  --mute:#d3d8ff;
  --ind:#d1c8ff;
  --mint:#69f2d5;
  --line:#d4dcff2e;
  --line2:#d4dcff50;
}
:root:not([data-theme="light"]) body {
  background:radial-gradient(ellipse at 85% 0%,#5148d859,transparent 52%),var(--bg);
}
body > header {
  background:linear-gradient(110deg,#080a74,#181b94);
  border-bottom-color:#bfc7ff50;
}
body > header .brand-wordmark {
  display:inline-flex;
  align-items:center;
  flex:0 0 auto;
  padding:5px 2px;
}
body > header .brand-wordmark img {
  width:clamp(68px,15vw,112px);
  height:auto;
  border-radius:0;
  box-shadow:none;
}
body > header .brand-wordmark:focus-visible { outline:2px solid #69f2d5; outline-offset:4px; }
:root:not([data-theme="light"]) .clash-mode-card {
  background:radial-gradient(ellipse at 100% 0,#69f2d52b,transparent 52%),linear-gradient(145deg,var(--s2),var(--s1));
  border-color:var(--line);
}
:root:not([data-theme="light"]) .in .tabs button.on {
  color:#fff;
  border-color:var(--mint);
  background:#69f2d524;
}
@media(max-width:780px){
  :root:not([data-theme="light"]) .in .tabs { background:#0c0e81f7; }
}
@media(max-width:420px){
  body > header { gap:6px; padding-inline:8px; }
  body > header > button { padding-inline:7px; }
}

/* Shared control states, with warm ivory surfaces in light mode. */
:root {
  --action:#2725b5;
  --action-hover:#3432c9;
  --action-line:#aeb7ff;
}
:root[data-theme="light"] {
  --bg:#fff6d9;
  --bg2:#fffdf4;
  --s1:#fffcf0;
  --s2:#fff4d4;
  --card:#fffcf0;
  --ink:#17194e;
  --mute:#484d70;
  --ind:#2225a0;
  --brand:#2625ad;
  --brand2:#3734bc;
  --line:#c9c2a9;
  --line2:#8985aa;
  --lav:#eeedff;
  --mint:#006859;
  --mint-soft:#e0f5ed;
  --good:#076447;
  --bad:#a32344;
  --gold:#754600;
  --action-line:#2625ad;
}
:root[data-theme="light"] body {
  background:radial-gradient(ellipse at 90% 0%,#fffdf3,transparent 62%),var(--bg);
}
:root[data-theme="light"] :is(.mode,.clash-hero,.clash-mode-card,.clash-coming,dialog) {
  background:linear-gradient(145deg,var(--s1),var(--s2));
  color:var(--ink);
}
:root[data-theme="light"] .hero { background:linear-gradient(135deg,var(--bg),var(--s1)); color:var(--ink); }
:root[data-theme="light"] .hero h1 em { background:none; color:var(--ind); }
:root[data-theme="light"] .hero p { color:var(--mute); }
:root[data-theme="light"] .cta .ghost { color:var(--ind); background:var(--s1); border-color:var(--line2); }
:root[data-theme="light"] footer { background:var(--s2); }
:root[data-theme="light"] footer a { color:var(--ind); }
:root[data-theme="light"] :is(input,textarea)::placeholder { color:var(--mute); opacity:1; }
:root[data-theme="light"] .bar { background:#d9d5eb; }
:root[data-theme="light"] .profile-match .match-won { color:var(--good); }
:root[data-theme="light"] .profile-match .match-lost { color:var(--bad); }
:root[data-theme="light"] .hero .demo { color:var(--gold); }
:root :is(button,a).pri { color:#fff; background:var(--action); border:1px solid var(--action-line); }
:root :is(button,a).pri:hover:not(:disabled) { background:var(--action-hover); }
:root :is(button,a,input,select,textarea,summary):focus-visible { outline:2px solid var(--mint); outline-offset:3px; }
:root button:disabled { opacity:.7; }
@media(max-width:780px){
  :root[data-theme="light"] .in .tabs { background:var(--s1); }
}

/* Dashboard surfaces and action hierarchy. */
:root:not([data-theme="light"]) {
  --bg:#151a3e;
  --s1:#222953;
  --s2:#29315e;
  --card:#222953;
  --workspace-nav:#101432;
  --workspace-rail:#181e43;
  --line:#aeb7ff36;
  --line2:#aeb7ff61;
  --mute:#d3d8f1;
}
:root[data-theme="light"] {
  --bg:#fbf6e8;
  --s1:#fffef8;
  --s2:#f8f2e3;
  --card:#fffef8;
  --workspace-nav:#f1ead8;
  --workspace-rail:#f5efdf;
}
:root:not([data-theme="light"]) body { background:var(--bg); }
.in #side { background:var(--workspace-nav); border-radius:18px; }
.in #right { background:var(--workspace-rail); border-radius:18px; }
.in #side::after,.in #right::before { background:var(--line); box-shadow:none; }
.in #side .tabs { padding-inline:10px; }
.in #right { padding-inline:14px; }
.clash-dashboard { gap:16px; }
.clash-dashboard .next-gift {
  padding:12px 16px;
  border-radius:16px;
  background:var(--s1);
  border:1px solid var(--line);
  border-inline-start:3px solid var(--gold);
}
.clash-dashboard .next-gift h2 { font-size:clamp(1rem,2vw,1.35rem); margin:2px 0; }
.clash-dashboard .next-gift p { margin:3px 0; font-size:.84rem; }
.clash-dashboard .next-gift .eyebrow { color:var(--gold); }
.clash-dashboard .gift-coins b { font-size:1.35rem; }
.clash-dashboard .gift-progress { height:6px; margin:8px 0 2px; }
.clash-dashboard .gift-progress-label { font-size:.72rem; }
.clash-dashboard .clash-subject-panel { padding-top:4px; }
.clash-dashboard .clash-mode-card {
  background:var(--s1);
  border:1px solid var(--line);
  border-radius:17px;
}
.clash-dashboard .clash-mode-card::after { display:none; }
.clash-dashboard .clash-mode-card:hover { border-color:var(--mint); }
.clash-dashboard .clash-mode-card:first-child .ic { background:#9af5df; }
.clash-dashboard .clash-mode-card:nth-child(2) .ic { background:#cfccff; }
.clash-dashboard .clash-mode-card:is(:first-child,:nth-child(2)) .ic .ico { color:#222650!important; }
:root:not([data-theme="light"]) .clash-dashboard button.pri {
  background:#69f2d5;
  color:#101b36;
  border-color:#69f2d5;
}
:root:not([data-theme="light"]) .clash-dashboard button.pri:hover:not(:disabled) { background:#9af5df; }
:root[data-theme="light"] .clash-dashboard .tile.on {
  background:#e0f5ed;
  color:#006859;
  border-color:#006859;
}
#quests .quest { background:var(--s1); padding:9px 10px; border-radius:11px; gap:8px; }
#quests .quest b { font-size:.88rem; }
#quests .quest button { font-size:.78rem; padding:6px 9px; }
@media(max-width:1000px) {
  .in #right { padding-inline:10px; }
}
@media(max-width:780px) {
  .in #side .tabs { padding-inline:8px; }
}

/* Meath brand palette and unified navigation. */
:root {
  --header-bg:#1c2242;
  --header-control:#272e51;
  --header-divider:#424b73;
  --nav-selected:#243b51;
  --panel-shadow:0 12px 28px -22px #080a20;
  --mode-emblem:#9af5df;
  --speed-emblem:#cfccff;
}
:root:not([data-theme="light"]) {
  --bg:#151a36;
  --s1:#22294a;
  --s2:#2a3459;
  --card:var(--s1);
  --workspace-nav:#191f3c;
  --workspace-rail:#1c2242;
  --ink:#f7f8ff;
  --mute:#c6cde8;
  --mint:#69f2d5;
}
:root[data-theme="light"] {
  --bg:#faf6ea;
  --s1:#fffdf6;
  --s2:#f3efe4;
  --card:var(--s1);
  --workspace-nav:#f4efe3;
  --workspace-rail:#f7f2e7;
  --ink:#171a3b;
  --mute:#4b526f;
  --action:#181b94;
  --action-hover:#272ab1;
  --action-line:var(--action);
  --header-bg:var(--s1);
  --header-control:#f2eee6;
  --header-divider:#d4cce2;
  --nav-selected:#e0f5ed;
  --panel-shadow:0 12px 28px -22px #32286480;
}
:root body > header {
  gap:12px;
  padding:calc(9px + env(safe-area-inset-top,0px)) max(clamp(16px,2.3vw,34px),calc((100% - 1492px) / 2)) 9px;
  background:var(--header-bg);
  color:var(--ink);
  border-color:var(--header-divider);
  box-shadow:var(--panel-shadow);
}
body > header .brand-wordmark { position:relative; }
body > header .brand-wordmark img { width:clamp(72px,18vw,96px); }
:root[data-theme="light"] body > header .brand-wordmark img { opacity:0; }
:root[data-theme="light"] body > header .brand-wordmark::after {
  content:"";
  position:absolute;
  inset:0 2px;
  background:var(--action);
  mask:url("meath-wordmark.svg") center / contain no-repeat;
}
body > header nav { margin:0; }
body > header nav a {
  color:var(--mute);
  border-inline-start:1px solid var(--header-divider);
  border-radius:0 8px 8px 0;
}
body > header nav a:hover { color:var(--ink); background:var(--header-control); }
body > header #chips {
  margin-inline-start:auto;
  gap:0;
  background:var(--header-control);
  border:1px solid var(--header-divider);
  border-radius:10px;
}
body > header .chip2 {
  background:none;
  border:0;
  border-radius:0;
  color:var(--ink);
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
}
body > header .chip2 + .chip2 { border-inline-start:1px solid var(--header-divider); }
:root body > header > button {
  background:var(--header-control);
  color:var(--ink);
  border:1px solid var(--header-divider);
  border-radius:10px;
  min-height:38px;
  white-space:nowrap;
}
:root body > header > button:hover { border-color:var(--mint); }
body:not(.in) > header #th { margin-inline-start:auto; }
:root .in .tabs button.on { background:var(--nav-selected); color:var(--ink); }
:root .clash-dashboard .clash-mode-card {
  background:var(--s1);
  box-shadow:var(--panel-shadow);
}
.clash-dashboard .clash-mode-card:first-child .ic { background:var(--mode-emblem); }
.clash-dashboard .clash-mode-card:nth-child(2) .ic { background:var(--speed-emblem); }
.clash-dashboard .clash-mode-card > p { color:var(--mute); }
@media(max-width:780px) {
  :root:not([data-theme="light"]) .in .tabs { background:var(--workspace-nav); }
  :root body > header { gap:7px; padding-inline:12px; }
}
@media(max-width:400px) {
  :root body > header { flex-wrap:wrap; }
  .in > header #th { margin-inline-start:auto; }
  .in > header #chips { order:1; margin:0; flex:1 0 100%; justify-content:center; }
}
@media(prefers-reduced-motion:reduce) {
  .clash-mode-card { transition:none; }
  .clash-mode-card:hover { transform:none; }
}

/* Clash entry and match recap */
.clash-intro {
  padding:clamp(16px,3vw,26px);
  border:1px solid var(--line);
  border-radius:18px;
  background:radial-gradient(ellipse at 100% 0%,color-mix(in srgb,var(--ind) 18%,transparent),transparent 70%),var(--s1);
}
.clash-intro h2 { margin:3px 0; font-size:clamp(1.7rem,4vw,2.4rem); }
.clash-intro p,.duel-recap small,#duelStats { color:var(--mute); }
.clash-intro p { margin:4px 0 0; }
.clash-dashboard .clash-mode-title { margin-bottom:0; }
.clash-dashboard .clash-mode-card:first-child { border-color:color-mix(in srgb,var(--mint) 50%,var(--line)); }
.clash-dashboard .next-gift { border-inline-start-width:2px; }
.match-search .duel-count {
  color:var(--mint);
  font-size:clamp(3rem,12vw,5rem);
  font-weight:800;
  line-height:1.05;
  font-variant-numeric:tabular-nums;
}
.duel-recap { display:grid; gap:14px; max-width:600px; margin:auto; }
.duel-recap-heading {
  padding:18px;
  text-align:center;
  border-radius:16px;
  background:var(--s2);
  border:1px solid var(--line);
}
.duel-recap[data-outcome="win"] .duel-recap-heading { border-color:var(--mint); }
.duel-recap-heading h3 { margin:4px 0 0; font-size:clamp(2rem,7vw,3.2rem); }
.duel-score,.duel-metrics { display:grid; gap:8px; align-items:stretch; text-align:center; }
.duel-score { grid-template-columns:minmax(0,1fr) auto minmax(0,1fr); align-items:center; }
.duel-metrics { grid-template-columns:repeat(3,minmax(0,1fr)); }
.duel-score div,.duel-metrics div,.duel-rating {
  background:var(--s1);
  border:1px solid var(--line);
  border-radius:12px;
  padding:10px 8px;
  overflow-wrap:anywhere;
}
.duel-score b,.duel-metrics b { display:block; color:var(--ink); font-variant-numeric:tabular-nums; }
.duel-score b { font-size:clamp(1.4rem,6vw,2.4rem); }
.duel-score > span { color:var(--mute); font-size:.75rem; }
.duel-rating { display:flex; justify-content:space-between; gap:8px; padding-inline:14px; }
.duel-actions { display:flex; gap:8px; flex-wrap:wrap; justify-content:center; }
