/* ===== New layout layer (loaded after style.css) ===== */
@keyframes ring{from{stroke-dashoffset:100}}
@keyframes draw{from{stroke-dashoffset:1}}
@keyframes grow{from{transform:scaleX(0)}}
@keyframes pop{0%{transform:translate(-50%,-50%) scale(.4);opacity:0}70%{transform:translate(-50%,-50%) scale(1.08)}100%{transform:translate(-50%,-50%);opacity:1}}
@keyframes popin{0%{transform:scale(.6);opacity:0}70%{transform:scale(1.05)}100%{transform:none;opacity:1}}
@keyframes rise{from{opacity:0;transform:translateY(14px)}}
@keyframes ping{0%{transform:scale(1);opacity:.7}100%{transform:scale(2.1);opacity:0}}
@keyframes glow{0%,100%{box-shadow:0 0 0 0 transparent}50%{box-shadow:0 0 0 6px var(--accent-soft)}}
@keyframes bob{0%,100%{transform:translate(-50%,-50%)}50%{transform:translate(-50%,calc(-50% - 6px))}}
@keyframes zoomin{from{opacity:0;transform:scale(.85)}}
@keyframes zoomback{from{opacity:0;transform:scale(1.1)}}
@media (prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}

.ic{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none}
.h2{font:800 1.35rem var(--f-display);letter-spacing:-.02em}
.h3{font:800 1.08rem var(--f-display)}
h1,h2{letter-spacing:-.02em}
.card{background:var(--surface);border-radius:22px;padding:20px 22px;-webkit-backdrop-filter:blur(16px) saturate(140%);backdrop-filter:blur(16px) saturate(140%);box-shadow:inset 0 1px 0 var(--edge),0 18px 40px -22px var(--shadow);animation:rise .45s cubic-bezier(.2,.8,.2,1) both}
.btn{border-radius:14px;transition:transform .15s,filter .15s}
.btn:not(.ghost){background-image:linear-gradient(135deg,var(--accent),color-mix(in srgb,var(--accent) 55%,var(--violet)));box-shadow:0 10px 24px -12px var(--accent)}
.btn:hover{filter:brightness(1.06)}.btn:active{transform:scale(.97)}
.btn.small{padding:6px 14px;font-size:.9rem;min-height:0}
.link{background:none;border:0;color:var(--accent);font:700 .92rem var(--f-body);cursor:pointer;padding:4px 2px}
.link:hover{text-decoration:underline}

/* top bar */
.topbar{position:sticky;top:0;z-index:20;background:var(--nav);-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px);border-bottom:1px solid var(--line2)}
.tbin{max-width:1240px;margin:0 auto;height:66px;padding:0 24px;display:flex;align-items:center;gap:22px}
.brand{background:none;border:0;color:var(--ink);font:800 1.3rem var(--f-display);letter-spacing:-.02em;cursor:pointer;padding:0;white-space:nowrap;display:inline-flex;align-items:center;gap:.45em;direction:ltr}
.brandmark{height:1.05em;width:auto;flex:none}
.brand span{color:var(--accent)}
.topbar nav{border:0;gap:4px;flex:1;overflow-x:auto;scrollbar-width:none}
.topbar nav button{height:66px;padding:0 12px;border-bottom:3px solid transparent;font-weight:700;color:var(--muted)}
.topbar nav button[aria-selected="true"]{color:var(--ink);border-bottom-color:var(--accent)}
.topbar nav button.alldone::after{content:" ✓";color:var(--good)}
.tbright{display:flex;align-items:center;gap:10px}
.pill{display:flex;align-items:center;gap:6px;font-weight:800;font-variant-numeric:tabular-nums;white-space:nowrap}
.pill .ic{width:18px;height:18px}
.streakpill{color:var(--pen)}.streakpill .ic{fill:var(--pen);stroke:none}
.xppill{color:var(--gold)}
.iconbtn{width:40px;height:40px;border-radius:12px;border:1px solid var(--line);background:transparent;color:var(--muted);display:grid;place-items:center;cursor:pointer;padding:0}
.iconbtn:hover{color:var(--ink);border-color:var(--accent)}
.iconbtn.sm{width:34px;height:34px;border-radius:50%}.iconbtn.sm .ic{width:18px;height:18px}
.iconbtn:disabled{opacity:.35;cursor:default}
.avatar{width:40px;height:40px;border-radius:50%;border:0;background:linear-gradient(135deg,var(--accent),var(--violet));color:var(--accent-ink);font:800 1rem var(--f-display);cursor:pointer}
.pagehead{display:flex;align-items:baseline;gap:14px;flex-wrap:wrap}
.pagehead h1{font-size:2.1rem}

/* goal strip */
.goalcard.strip{display:grid;grid-template-columns:64px minmax(0,1fr) 320px auto;gap:20px;align-items:center;padding:20px 24px}

.flag{display:block;overflow:visible;filter:drop-shadow(0 3px 4px var(--shadow))}
.flag .pole{stroke:color-mix(in srgb,var(--ink) 75%,transparent);stroke-width:3;stroke-linecap:round}
.flag .knob{fill:#e0a63a}
.flag .c1{stop-color:#ffd978}.flag .c2{stop-color:#e0a63a}          /* the same warm gold in both themes */
.gbadge{position:relative;width:64px;height:64px;border-radius:50%;display:grid;place-items:center;
  background:conic-gradient(var(--gold) calc(var(--p,0) * 1%),color-mix(in srgb,var(--gold) 16%,transparent) 0)}
.gbadge::before{content:"";position:absolute;inset:5px;border-radius:50%;background:var(--gold-soft)}
.gbadge .flag{position:relative;margin-left:6px}
.gtext{display:flex;flex-direction:column;gap:2px;min-width:0}
.eyebrow{font-size:.74rem;letter-spacing:.12em;text-transform:uppercase;color:var(--muted);font-weight:800}
.gtitle{font:800 1.6rem/1.15 var(--f-display);letter-spacing:-.02em}
.gbar{display:flex;flex-direction:column;gap:8px}
.gmeta2{display:flex;align-items:center;gap:10px;font-size:.9rem}
.gmeta2 .hint{margin-left:auto}
.track{font-size:.78rem;font-weight:800;padding:2px 10px;border-radius:999px;background:var(--good-bg);color:var(--good)}
.track.warn{background:var(--pen-bg);color:var(--pen)}.track.bad{background:var(--bad-bg);color:var(--bad)}
.bar12{height:12px;border-radius:6px;background:var(--raised);overflow:hidden}
.bar12 i{display:block;height:100%;border-radius:6px;background:linear-gradient(90deg,var(--good),var(--accent));transform-origin:left;animation:grow 1s cubic-bezier(.2,.8,.2,1) .3s both}

/* today + calendar */
.dgrid{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:20px;align-items:stretch}
.todaycard{display:grid;grid-template-columns:160px minmax(0,1fr);gap:22px;align-items:center}
.tring{display:flex;flex-direction:column;align-items:center;gap:6px}
.ring2 .rbg{fill:none;stroke:var(--raised);stroke-width:14}
.ring2 .rfg{fill:none;stroke:var(--good);stroke-width:14;stroke-linecap:round;stroke-dashoffset:var(--off);animation:ring 1.2s cubic-bezier(.2,.8,.2,1) both}
.ring2 .rbig{text-anchor:middle;fill:var(--ink);font:800 36px var(--f-display)}
.ring2 .rsmall{text-anchor:middle;fill:var(--muted);font-size:14px}
.tbody{display:flex;flex-direction:column;gap:12px;min-width:0}
.tophead{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.topic{font-size:1rem}
.tiles{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}
.tile{position:relative;font:inherit;color:var(--ink);border-radius:18px;padding:14px 8px;display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;cursor:pointer;background:var(--bg);border:1px solid var(--line2);animation:popin .5s cubic-bezier(.3,1.6,.5,1) both;transition:transform .15s}
.tile:hover{transform:translateY(-3px)}
.tile b{font-size:.92rem}
.tic{width:46px;height:46px;border-radius:14px;display:grid;place-items:center;background:var(--raised);color:var(--muted)}
.tile.done .tic{background:var(--good-bg);color:var(--good)}
.tile.next{background:var(--accent-soft);border:2px solid var(--accent);animation:popin .5s cubic-bezier(.3,1.6,.5,1) both,glow 2s ease-in-out 1s infinite}
.tile.next .tic{background:var(--accent);color:var(--accent-ink)}
.chip2{font-size:.75rem;font-weight:800;border-radius:999px;padding:2px 10px;color:var(--muted)}
.tile.done .chip2,.chip2.ok{color:var(--good)}
.tile.next .chip2{background:var(--accent);color:var(--accent-ink)}
.req{position:absolute;top:8px;right:8px;width:7px;height:7px;border-radius:50%;background:var(--pen)}
.mission{display:flex;align-items:center;gap:12px;border:1px dashed var(--pen);border-radius:14px;padding:8px 12px}
.mission .mic2{width:32px;height:32px;border-radius:50%;background:var(--pen-bg);color:var(--pen);display:grid;place-items:center}
.mission .mic2 .ic{width:18px;height:18px}
.mission .mtext{flex:1;font-size:.95rem}.mission .mxp{color:var(--pen)}
.mission.done{border-style:solid;border-color:var(--good);opacity:.8}.mission.done .mxp{color:var(--good)}
#topicPick{border:1px solid var(--line);border-radius:16px;padding:12px;background:var(--bg)}
.calcard{gap:10px}
.calhead{display:flex;align-items:center;gap:8px}
.calhead b{font:800 1.15rem var(--f-display);flex:1;text-align:center}
.streak2{display:flex;align-items:center;gap:4px;font-weight:800;color:var(--pen)}.streak2 .ic{width:16px;height:16px;fill:var(--pen);stroke:none}
.cal2{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px}
.cal2 .wd{font-size:.7rem;color:var(--muted);text-align:center;font-weight:800}
.cd{height:34px;border-radius:9px;display:grid;place-items:center;font-size:.8rem;background:var(--bg);color:var(--muted);font-variant-numeric:tabular-nums;animation:popin .4s both}
.cd.future,.cd.before{background:transparent;color:var(--faint)}
.cd.full{background:var(--good);color:var(--accent-ink);font-weight:800}
.cd.min{background:var(--good-bg);color:var(--good);font-weight:800;box-shadow:inset 0 0 0 1.5px var(--good)}
.cd.miss{background:var(--bad-bg);color:var(--bad)}
.cd.now{box-shadow:0 0 0 2px var(--solid),0 0 0 4px var(--accent);color:var(--ink);font-weight:800}
.legend{display:flex;gap:12px;font-size:.78rem;color:var(--muted);flex-wrap:wrap}
.legend span{display:flex;align-items:center;gap:5px}
.legend i{width:11px;height:11px;border-radius:3px;display:inline-block}
.legend i.full{background:var(--good)}.legend i.min{background:var(--good-bg);box-shadow:inset 0 0 0 1.5px var(--good)}.legend i.miss{background:var(--bad-bg)}

/* roadmap */
.roadcard{gap:14px}
.rhead{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap}
.mapwrap{overflow-x:auto;border-radius:20px}
.map{position:relative;min-width:860px;aspect-ratio:1148/360;border-radius:20px;overflow:hidden;background:var(--map)}
.map.zoomin{animation:zoomin .55s cubic-bezier(.2,.8,.2,1) both}
.map.zoomback{animation:zoomback .5s cubic-bezier(.2,.8,.2,1) both}
.zone{position:absolute;top:0;bottom:0}
.roadsvg{position:absolute;inset:0;width:100%;height:100%}
.roadsvg path{fill:none;stroke-linecap:round;vector-effect:non-scaling-stroke}
.redge{stroke:var(--roadedge);stroke-width:32}.rroad{stroke:var(--road);stroke-width:24}.rdash{stroke:var(--roaddash);stroke-width:2;stroke-dasharray:10 12}
.redge.thick{stroke-width:40}.rroad.thick{stroke-width:30}
.rdone{stroke:var(--accent);stroke-width:8;stroke-dasharray:1;vector-effect:none!important}
.draw{animation:draw 1.6s cubic-bezier(.4,0,.2,1) .2s both}
.station{position:absolute;transform:translate(-50%,-50%);width:52px;height:52px}
.station.big{width:64px;height:64px}
.station>*{animation:popin .5s cubic-bezier(.3,1.6,.5,1) both;animation-delay:inherit}
.station .slabel{position:absolute;left:50%;margin-left:-52px;width:104px;top:calc(100% + 6px)}
.station.up .slabel{top:auto;bottom:calc(100% + 6px)}
.station.big .slabel{margin-left:-70px;width:140px}
.slabel{display:flex;flex-direction:column;align-items:center;text-align:center;font-size:.76rem;line-height:1.2;color:var(--ink2);gap:1px}
.slabel b{font-size:.78rem}
.slabel.wide{font-size:.82rem}.slabel.wide b{font-size:.88rem;color:var(--ink)}
.sdot{position:relative;width:52px;height:52px;border-radius:50%;display:grid;place-items:center;background:var(--solid);border:3px solid var(--c);color:var(--c);box-shadow:0 8px 18px -8px var(--shadow);cursor:pointer;padding:0;transition:transform .15s}
button.sdot:hover{transform:scale(1.12)}
.sdot.done{background:var(--good);border-color:var(--good);color:var(--accent-ink)}
.sdot.now{border-width:4px;border-color:var(--accent);color:var(--accent)}
.sdot.lg{width:64px;height:64px;cursor:default}.sdot.lg .ic{width:28px;height:28px}
.sdot.lg.done{background:var(--solid);border-color:var(--good);color:var(--good)}
.sdot.lg.miss{opacity:.55;border-style:dashed}
.sdot.lg.today{background:var(--accent);border-color:var(--accent);color:var(--accent-ink);cursor:pointer}
.sdot.lg.sun{border-color:var(--gold);color:var(--gold);background:var(--gold-soft)}
.sdot .ping{position:absolute;inset:-3px;border-radius:50%;border:3px solid var(--accent);animation:ping 1.8s ease-out infinite;pointer-events:none}
.sdot em.full{position:absolute;right:-5px;top:-5px;width:22px;height:22px;border-radius:50%;background:var(--good);color:var(--accent-ink);font:800 .7rem var(--f-body);display:grid;place-items:center;font-style:normal}
.mepin{position:absolute;transform:translate(-50%,-50%);display:flex;flex-direction:column;align-items:center;animation:bob 1.8s ease-in-out infinite;pointer-events:none}
.mepin span{width:34px;height:34px;border-radius:50%;background:var(--accent);color:var(--accent-ink);display:grid;place-items:center;font-weight:800;border:3px solid var(--solid);box-shadow:0 6px 16px var(--shadow)}
.mepin i{width:0;height:0;border-left:7px solid transparent;border-right:7px solid transparent;border-top:9px solid var(--accent);margin-top:-2px}
.finish{position:absolute;width:0;height:0;z-index:2}
.finish .fbase{position:absolute;left:0;top:0;width:30px;height:30px;transform:translate(-50%,-50%);border-radius:50%;
  border:3px solid var(--gold);box-shadow:0 0 0 4px color-mix(in srgb,var(--gold) 22%,transparent),0 6px 14px var(--shadow);
  background:repeating-conic-gradient(color-mix(in srgb,var(--ink) 85%,transparent) 0 25%,var(--surface) 0 50%) 50%/12px 12px}
.finish .fpost{position:absolute;left:0;bottom:6px;transform:translateX(-10px)}
.finish b{position:absolute;left:0;top:22px;transform:translateX(-50%);font:800 .82rem var(--f-display);color:var(--gold);letter-spacing:.02em;white-space:nowrap}
.wnav{display:flex;align-items:center;gap:8px}
.pillbtn{height:38px;border-radius:999px;border:1px solid var(--line);background:var(--solid);color:var(--ink);font:700 .9rem var(--f-body);padding:0 14px;cursor:pointer}
.wtitle{display:flex;flex-direction:column;margin-left:8px}
.targets{display:flex;gap:8px}
.targets span{background:var(--bg);border:1px solid var(--line2);border-radius:12px;padding:6px 12px;display:flex;flex-direction:column;align-items:center}
.targets b{font:800 1.05rem var(--f-display)}.targets small{font-size:.72rem;color:var(--muted)}
.miles2{display:flex;flex-wrap:wrap;gap:8px}
.mchip{position:relative;overflow:hidden;display:flex;align-items:center;gap:8px;font-size:.82rem;border:1px solid var(--line);border-radius:999px;padding:5px 12px;background:var(--bg)}
.mchip i{position:absolute;left:0;top:0;bottom:0;width:var(--p);background:var(--accent-soft);z-index:0;transform-origin:left;animation:grow .9s .3s both}
.mchip>:not(i){position:relative}.mchip b{color:var(--muted)}
.mchip.done{border-color:var(--good);color:var(--good)}.mchip.done i{background:var(--good-bg)}

/* practice */
.prac{gap:16px}
.stepbar{display:flex;align-items:center;gap:0;background:var(--surface);border-radius:999px;padding:6px;box-shadow:inset 0 1px 0 var(--edge),0 12px 30px -20px var(--shadow);overflow-x:auto}
.sp{display:flex;align-items:center;gap:8px;border:0;background:transparent;color:var(--muted);font:700 .92rem var(--f-body);padding:6px 14px 6px 6px;border-radius:999px;cursor:pointer;white-space:nowrap}
.spi{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:var(--raised)}
.spi .ic{width:18px;height:18px}
.sp.done{color:var(--good)}.sp.done .spi{background:var(--good-bg)}
.sp.cur{background:var(--accent-soft);color:var(--ink)}.sp.cur .spi{background:var(--accent);color:var(--accent-ink)}
.spl{flex:1;min-width:14px;height:2px;background:var(--line)}
.sthead{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-top:6px}
.sthead h1{font-size:1.9rem;margin:0}
.sthead .ok{color:var(--good);font-size:1.2rem}
.howto{max-width:420px;font-size:.92rem}
.howto summary{cursor:pointer;color:var(--accent);font-weight:700;text-align:right;list-style:none}
.howto summary::-webkit-details-marker{display:none}
.howto[open]{background:var(--surface);border-radius:16px;padding:10px 14px}
.pgrid{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:20px;align-items:start}
.pmain{display:flex;flex-direction:column;gap:14px;min-width:0}
.ptoday{position:sticky;top:84px}
.tcol{gap:12px}
.tchead{display:flex;justify-content:space-between;align-items:center}
.tstats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.tstats span{background:var(--bg);border-radius:14px;padding:8px;display:flex;flex-direction:column;align-items:center}
.tstats b{font:800 1.25rem var(--f-display)}.tstats small{font-size:.72rem;color:var(--muted)}
.tlist{display:flex;flex-direction:column;gap:6px;max-height:52vh;overflow:auto}
.trow{display:flex;align-items:center;gap:10px;padding:8px;border-radius:12px;background:transparent;border:0;color:var(--ink);font:inherit;text-align:left;width:100%}
button.trow{cursor:pointer}.trow:hover{background:var(--bg)}
.tdot{width:32px;height:32px;border-radius:10px;display:grid;place-items:center;background:var(--raised);color:var(--muted);flex:none}
.tdot .ic{width:16px;height:16px}.tdot.ok{background:var(--good-bg);color:var(--good)}
.tt{flex:1;min-width:0;display:flex;flex-direction:column}
.tt b{font-size:.86rem;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tt small{font-size:.74rem;color:var(--muted)}
.ts{font:800 .95rem var(--f-display)}
.playmini{width:28px;height:28px;border-radius:50%;border:1px solid var(--line);background:var(--solid);color:var(--accent);cursor:pointer;font-size:.7rem}
.lvlchip{display:inline-block;font-weight:800;font-size:.8rem;border-radius:999px;padding:2px 10px;background:var(--accent-soft);color:var(--accent)}
.lvlchip.easy{background:var(--good-bg);color:var(--good)}.lvlchip.hard{background:var(--pen-bg);color:var(--pen)}
#history .conv .chat,#rpPastView .chat{max-height:none}
#hView{min-height:420px}

/* progress */
.kpis{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:14px}
.kpi{padding:16px 18px;gap:2px}
.kpi b{font:800 1.8rem var(--f-display);font-variant-numeric:tabular-nums}
.kpi span{font-size:.82rem;color:var(--muted)}
.kpi .delta{font-size:.78rem;font-weight:800;color:var(--good)}.kpi .delta.down{color:var(--bad)}
.cgrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
.chartc{gap:10px}
.chartc .chead{display:flex;justify-content:space-between;align-items:baseline;gap:10px}
.chartc svg{width:100%;height:auto;display:block;overflow:visible}
.chartc .grid line{stroke:var(--line2)}
.chartc .axis text{fill:var(--muted);font-size:11px}
.chartc .area{opacity:.18;animation:rise .8s .3s both}
.chartc .line{fill:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1;animation:draw 1.4s cubic-bezier(.4,0,.2,1) .2s both}
.chartc .band{opacity:.12}
.chartc .bar{transform-origin:bottom;transform-box:fill-box;animation:growy .8s cubic-bezier(.2,.8,.2,1) both}
@keyframes growy{from{transform:scaleY(0)}}
.chartc .dot{stroke:var(--solid);stroke-width:2}
.chartc .empty{padding:40px 0;text-align:center}
.donut circle{fill:none;stroke-width:18}
.donut .seg{stroke-dasharray:var(--len) 100;stroke-dashoffset:var(--off);animation:ring 1.2s cubic-bezier(.2,.8,.2,1) both}
.dlegend{display:flex;flex-direction:column;gap:8px;font-size:.9rem}
.dlegend span{display:flex;align-items:center;gap:8px}.dlegend i{width:12px;height:12px;border-radius:4px}

@media (max-width:1000px){
  .dgrid,.pgrid,.cgrid{grid-template-columns:1fr}
  .goalcard.strip{grid-template-columns:52px minmax(0,1fr)}
  .goalcard.strip .gbar{grid-column:1/-1}
  .kpis{grid-template-columns:repeat(3,minmax(0,1fr))}
  .ptoday{position:static}
}
@media (max-width:640px){
  .tbin{padding:0 12px;gap:10px;height:auto;min-height:60px;flex-wrap:wrap}
  .topbar nav{order:3;flex-basis:100%}.topbar nav button{height:44px}
  .wrap{padding:16px 16px 60px}
  .todaycard{grid-template-columns:1fr}
  .tiles{grid-template-columns:repeat(3,minmax(0,1fr))}
  .kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .sthead{flex-direction:column}
  .targets{display:none}
}

/* stickers */
@keyframes stickin{0%{transform:scale(.3) rotate(-25deg);opacity:0}70%{transform:scale(1.08) rotate(4deg)}100%{transform:rotate(var(--tilt,0deg));opacity:1}}
@keyframes shim{0%{transform:translateX(-120px) skewX(-20deg)}55%,100%{transform:translateX(320px) skewX(-20deg)}}
@keyframes twinkle{0%,100%{opacity:.25;transform:scale(.6)}50%{opacity:1;transform:scale(1.15)}}
@keyframes spin{to{transform:rotate(360deg)}}
.stk{overflow:visible;transform:rotate(var(--tilt,0deg));filter:drop-shadow(0 8px 12px rgba(0,0,0,.28));transition:transform .2s}
.stk.anim{animation:stickin .6s cubic-bezier(.3,1.5,.5,1) both}
.stk:hover{transform:rotate(0) scale(1.06)}
.stk.gold{filter:drop-shadow(0 0 14px rgba(255,196,60,.55)) drop-shadow(0 8px 12px rgba(0,0,0,.3))}
.stk.locked{filter:none;opacity:.72}.stk.locked .body{filter:saturate(.35) brightness(.72)}
.stk .shim{animation:shim 3.2s ease-in-out infinite}
.stk .tw{transform-box:fill-box;transform-origin:center;animation:twinkle 2.4s ease-in-out infinite}
.stk .tw2{animation-delay:.8s}.stk .tw3{animation-delay:1.6s}
.stk .rays{transform-origin:100px 90px;animation:spin 40s linear infinite}
.stkhead{justify-content:space-between;align-items:center}
.stkcount{display:flex;gap:16px;color:var(--muted);font-size:.95rem}
.stkcount span{display:flex;align-items:center;gap:6px}.stkcount b{color:var(--ink)}
.dotc,.dotg{width:10px;height:10px;border-radius:50%;background:var(--accent)}.dotg{background:linear-gradient(135deg,#fff1b0,#d39a0c)}
.seg2{display:flex;padding:5px;gap:4px;border-radius:16px;background:var(--raised);border:1px solid var(--line)}
.seg2 button{height:40px;border:0;border-radius:12px;padding:0 20px;font:800 .95rem var(--f-body);cursor:pointer;background:transparent;color:var(--muted)}
.seg2 button[aria-selected="true"]{background:var(--solid);color:var(--ink);box-shadow:0 4px 14px -6px var(--shadow)}
.goldnote{display:flex;align-items:center;gap:14px;padding:14px 20px;border-radius:20px;background:linear-gradient(110deg,rgba(255,214,90,.20),rgba(211,154,12,.06));border:1px solid rgba(242,201,76,.45);font-size:1rem}
.stkgroup .chead{display:flex;justify-content:space-between;align-items:baseline}
.stkgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:12px}
.stkcell{display:flex;flex-direction:column;align-items:center;gap:6px;padding:8px 4px 12px;border-radius:18px;text-align:center}
.stkcell.got{background:var(--good-bg)}
.stkcell.gotg{background:rgba(242,201,76,.14);box-shadow:inset 0 0 0 1px rgba(242,201,76,.4)}
.gotx{font-size:.78rem;color:var(--good)}.gotg .gotx{color:var(--gold)}
.pbar{width:110px;height:6px;border-radius:3px;background:var(--raised);overflow:hidden}
.pbar i{display:block;height:100%;border-radius:3px;background:var(--accent);transform-origin:left;animation:grow 1s .4s both}
.pbar.g i{background:linear-gradient(90deg,#fff1b0,#d39a0c)}
#printSheet{display:none}
@media print{
  @page{size:A4;margin:0}
  body.printing{background:#fff!important}
  body.printing>*:not(#printSheet){display:none!important}
  body.printing #printSheet{display:block;width:210mm;min-height:297mm;box-sizing:border-box;padding:12mm 12mm;color:#132131;font-family:var(--f-body)}
  .pshead{display:flex;flex-direction:column;gap:2px;border-bottom:1px solid #e1e6ec;padding-bottom:4mm;margin-bottom:6mm}
  .pshead b{font:800 20pt var(--f-display)}.pshead b span{color:#1f6fae}.pshead small{font-size:9pt;color:#5a6878}
  .psgrid{display:grid;grid-template-columns:repeat(4,1fr);gap:4mm 5mm;justify-items:center}
  .psgrid .stk{width:40mm;height:42mm;filter:none!important;transform:none!important}
  .psgrid .stk *{animation:none!important}
}

/* profile + settings */
.profhead{display:grid;grid-template-columns:96px minmax(0,1fr) auto;gap:22px;align-items:center}
.bigav{width:96px;height:96px;border-radius:50%;display:grid;place-items:center;font:800 2.6rem var(--f-display);color:var(--accent-ink);background:linear-gradient(135deg,var(--accent),var(--violet));box-shadow:0 14px 30px -14px var(--accent)}
.pinfo{display:flex;flex-direction:column;gap:6px}.pinfo h1{margin:0;font-size:2rem}
#profile .kpis{grid-template-columns:repeat(6,minmax(0,1fr))}
.chead{display:flex;justify-content:space-between;align-items:center;gap:10px}
.profstk{display:flex;align-items:center;gap:24px;flex-wrap:wrap}
.profstk .got{display:flex;gap:10px;padding-inline-end:24px;border-inline-end:1px solid var(--line)}
.profstk .next{display:flex;gap:14px;flex-wrap:wrap}
.setgrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
.setgrid>.card:last-child{grid-column:1/-1}
.field{display:flex;flex-direction:column;gap:6px;font-size:.88rem;color:var(--muted);font-weight:700}
.field input,.field select,.pin,#spAmt,#rRate{font:inherit;font-weight:400;color:var(--ink);background:var(--bg);border:1px solid var(--line);border-radius:12px;padding:10px 12px;min-width:0}
.field2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.field3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.switch{display:flex;align-items:center;gap:10px;cursor:pointer}
.switch input{width:20px;height:20px;accent-color:var(--accent)}
.seg2.wrapx{flex-wrap:wrap}
.field .seg2{align-self:flex-start}
code{background:var(--raised);border-radius:6px;padding:1px 6px;font-size:.85em}

/* wallet */
.wgrid{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:20px}
.whero{background:linear-gradient(135deg,color-mix(in srgb,var(--good) 22%,var(--surface)),var(--surface));gap:6px}
.wbig{font:800 3rem/1 var(--f-display);letter-spacing:-.02em;color:var(--good)}
.wbig.sm{font-size:2rem}
.wnext{margin-top:12px;display:flex;flex-direction:column;gap:6px}
.wstats{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.wgrid2{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);gap:20px}
.stepper{display:flex;align-items:center;gap:12px}
.stepper button{width:40px;height:40px;border-radius:50%;border:1px solid var(--line);background:var(--solid);color:var(--ink);font-size:1.3rem;cursor:pointer}
.stepper b{font:800 1.6rem var(--f-display);min-width:2ch;text-align:center;color:var(--ink)}
.ledger{display:flex;flex-direction:column;gap:4px;max-height:420px;overflow:auto}
.lrow{display:flex;align-items:center;gap:10px;padding:8px;border-radius:12px}
.lrow:hover{background:var(--bg)}
.lk{width:32px;height:32px;border-radius:10px;display:grid;place-items:center;background:var(--accent-soft);color:var(--accent);font-weight:800}
.lrow.deposit .lk{background:var(--good-bg);color:var(--good)}
.lst{font-size:.72rem;font-weight:800;border-radius:999px;padding:2px 8px;background:var(--raised);color:var(--muted);text-transform:uppercase}
.lst.paid,.lst.done{background:var(--good-bg);color:var(--good)}.lst.pending{background:var(--pen-bg);color:var(--pen)}.lst.rejected{background:var(--bad-bg);color:var(--bad)}
.sponsor summary{cursor:pointer;list-style:none;display:flex;gap:10px;align-items:baseline}
.sponsor summary::-webkit-details-marker{display:none}
.sponsor[open]{gap:14px}
.spgrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin-top:10px}
.spcol{display:flex;flex-direction:column;gap:10px;background:var(--bg);border-radius:16px;padding:14px}
.spreq{display:flex;flex-direction:column;gap:8px;border:1px solid var(--line);border-radius:12px;padding:10px;background:var(--solid)}
.spref{font:inherit;background:var(--bg);border:1px solid var(--line);border-radius:10px;padding:8px;color:var(--ink)}
.wsetup{gap:16px}
.wsteps{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
.wsteps div{display:flex;flex-direction:column;gap:4px;background:var(--bg);border-radius:16px;padding:14px}
.wsteps i{width:30px;height:30px;border-radius:50%;background:var(--accent);color:var(--accent-ink);display:grid;place-items:center;font-style:normal;font-weight:800}
.chip[aria-pressed="true"]{background:var(--accent);color:var(--accent-ink)}

/* juniors (Persian, RTL) */
#junior{font-family:var(--f-fa);font-size:18px}
#junior .h3,#junior .jtitle,#junior b{font-family:var(--f-fa)}
#junior [dir="ltr"]{font-family:var(--f-body)}
.junior-mode .topbar{font-family:var(--f-fa)}
.jtop{display:flex;align-items:center;gap:16px}
.jtop .link{margin-inline-start:auto}
.jcoin{font-weight:800;color:var(--gold)}.jstreak{font-weight:800;color:var(--pen)}
.jgoal{display:grid;grid-template-columns:64px minmax(0,1fr) 280px;gap:18px;align-items:center}
.jflag{font-size:2.4rem;width:64px;height:64px;border-radius:20px;background:var(--gold-soft);display:grid;place-items:center}
.jgoal>div{display:flex;flex-direction:column;gap:4px}
.jtitle{font:900 1.5rem/1.3 var(--f-fa)}
.jsay{color:var(--muted);font-size:.95rem}
.jgbar{display:flex;flex-direction:column;gap:6px}
.jgrid{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:20px}
.jtoday{gap:14px}
.jtopic{font-size:1.05rem}
.jsteps{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.jstep{font:inherit;color:var(--ink);border-radius:22px;padding:16px 10px;display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center;cursor:pointer;background:var(--bg);border:1px solid var(--line2);animation:popin .5s cubic-bezier(.3,1.6,.5,1) both;transition:transform .15s}
.jstep:hover{transform:translateY(-4px) rotate(-1deg)}
.jstep small{color:var(--muted);font-size:.85rem}
.jsi{width:58px;height:58px;border-radius:18px;display:grid;place-items:center;background:var(--raised);color:var(--muted);font-size:1.5rem;font-weight:800}
.jsi .ic{width:28px;height:28px}
.jstep.done .jsi{background:var(--good-bg);color:var(--good)}
.jstep.next{background:var(--accent-soft);border:2px solid var(--accent);animation:popin .5s cubic-bezier(.3,1.6,.5,1) both,glow 2s ease-in-out 1s infinite}
.jstep.next .jsi{background:var(--accent);color:var(--accent-ink)}
.jstep.next .chip2{background:var(--accent);color:var(--accent-ink)}
.jstep.done .chip2{color:var(--good)}
.jgo{align-self:center;font-family:var(--f-fa)}
.jyay{font-size:1.3rem;font-weight:800;text-align:center;color:var(--good)}
.jdays{display:grid;grid-template-columns:repeat(7,1fr);gap:6px}
.jd{display:flex;flex-direction:column;align-items:center;gap:2px;border-radius:14px;padding:8px 0;background:var(--bg)}
.jd small{color:var(--muted);font-size:.75rem}
.jd.ok{background:var(--gold-soft)}.jd.now{box-shadow:inset 0 0 0 2px var(--accent)}.jd.miss{opacity:.55}.jd.f{background:transparent;color:var(--faint)}
.jpath{display:flex;align-items:center;gap:0;overflow-x:auto;padding:10px 4px 6px}
.jline{flex:1;min-width:18px;height:6px;border-radius:3px;background:var(--road)}
.jw{position:relative;font:inherit;color:var(--ink);display:flex;flex-direction:column;align-items:center;gap:4px;background:none;border:0;cursor:pointer;animation:popin .5s cubic-bezier(.3,1.6,.5,1) both;min-width:84px}
.jwi{width:64px;height:64px;border-radius:50%;display:grid;place-items:center;font-size:1.7rem;background:var(--solid);border:3px solid var(--violet);box-shadow:0 8px 18px -8px var(--shadow);transition:transform .15s}
.jw:hover .jwi{transform:scale(1.1)}
.jw.done .jwi{background:var(--good);border-color:var(--good);color:var(--accent-ink);font-weight:800}
.jw.now .jwi{border-color:var(--accent);border-width:4px;box-shadow:0 0 0 6px var(--accent-soft)}
.jw.open .jwi{transform:scale(1.12)}
.jw small{color:var(--muted);font-size:.8rem}
.jw em{position:absolute;top:-8px;inset-inline-end:2px;font-style:normal}
.jwdetail{display:flex;flex-direction:column;gap:10px;background:var(--bg);border-radius:18px;padding:14px;animation:zoomin .4s both}
.jchips{display:flex;flex-wrap:wrap;gap:10px}
.jchip{display:flex;align-items:center;gap:8px;background:var(--solid);border-radius:999px;padding:6px 14px;border:1px solid var(--line)}
.jchip i{font-style:normal;font-size:1.3rem}.jchip small{color:var(--muted)}
.jback{align-self:flex-start;font-family:var(--f-fa)}
.jlesson{gap:16px;max-width:760px;width:100%;margin:0 auto}
.jprog{display:flex;gap:6px}.jprog i{flex:1;height:8px;border-radius:4px;background:var(--raised)}.jprog i.ok{background:var(--good)}.jprog i.now{background:var(--accent)}
.jcard{display:flex;flex-direction:column;align-items:center;gap:10px;padding:18px;border-radius:24px;background:var(--bg)}
.jemoji{font-size:6rem;line-height:1;animation:popin .6s cubic-bezier(.3,1.6,.5,1) both}
.jword{display:flex;align-items:center;gap:12px}.jword b{font:800 3rem var(--f-display)!important;letter-spacing:-.02em}
.jplay{width:46px;height:46px;border-radius:50%;border:0;background:var(--accent);color:var(--accent-ink);font-size:1rem;cursor:pointer;box-shadow:0 8px 18px -8px var(--accent)}
.jplay.sm{width:32px;height:32px;font-size:.75rem}
.jex{font-size:1.15rem;margin:0}
.jturn{display:flex;flex-direction:column;align-items:center;gap:10px;text-align:center}
.jframe{font:700 1.3rem var(--f-body);background:var(--accent-soft);color:var(--ink);border-radius:14px;padding:8px 16px}
.jframe.big{font-size:1.6rem;align-self:center}
.jok{font-size:1.3rem;font-weight:800;color:var(--good);margin:0}.jtry{font-size:1.1rem;font-weight:700;color:var(--pen);margin:0}
.jnav{justify-content:space-between}
.jlines{display:flex;flex-direction:column;gap:10px}
.jline2{display:flex;align-items:center;gap:12px;background:var(--bg);border-radius:16px;padding:10px 14px}
.jline2 .jtext{flex:1;font-size:1.1rem}
.jline2.ok{box-shadow:inset 0 0 0 2px var(--good)}
.jsc{min-width:3ch;color:var(--good)}
#junior .fa-t{font-family:var(--f-fa)}
@media (max-width:1000px){.jgrid,.wgrid,.wgrid2,.spgrid,.setgrid{grid-template-columns:1fr}.jgoal{grid-template-columns:56px 1fr}.jgoal .jgbar{grid-column:1/-1}#profile .kpis{grid-template-columns:repeat(3,1fr)}}
@media (max-width:640px){.jsteps{grid-template-columns:1fr}.field3,.wsteps{grid-template-columns:1fr}.profhead{grid-template-columns:64px 1fr}.bigav{width:64px;height:64px;font-size:1.8rem}}
.topbar svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.topbar .streakpill svg{fill:var(--pen);stroke:none}
.topbar nav button[data-tab="history"]{margin-left:0}
.card.todaycard,.card.goalcard{border:0}
.chartc svg.donut{width:150px;flex:none}
.donutrow{display:flex;align-items:center;gap:28px;padding:6px 0}
.ugrid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}
.ubox{background:var(--bg);border-radius:16px;padding:12px 14px;display:flex;flex-direction:column}
.ubox b{font:800 1.4rem var(--f-display);font-variant-numeric:tabular-nums}.ubox span{font-size:.82rem;color:var(--muted)}.ubox small{font-size:.74rem;color:var(--faint)}
.utables{display:grid;grid-template-columns:1fr 1fr;gap:20px}
.utable{width:100%;border-collapse:collapse;font-size:.88rem}
.utable caption{text-align:start;font-weight:800;padding-bottom:6px}
.utable th{text-align:start;color:var(--muted);font-weight:700;font-size:.78rem;border-bottom:1px solid var(--line);padding:6px 4px}
.utable td{padding:7px 4px;border-bottom:1px solid var(--line2);font-variant-numeric:tabular-nums}
@media (max-width:1000px){.ugrid{grid-template-columns:repeat(2,1fr)}.utables{grid-template-columns:1fr}}
.stkpop{position:fixed;right:24px;bottom:24px;z-index:50;display:flex;flex-direction:column;align-items:center;gap:6px;background:var(--solid);border-radius:24px;padding:18px 22px;box-shadow:0 24px 60px -20px var(--shadow),0 0 0 1px var(--line);animation:popin .5s cubic-bezier(.3,1.6,.5,1) both;transition:opacity .5s,transform .5s}
.stkpop.out{opacity:0;transform:translateY(20px)}
.stkpop b{font:800 1.2rem var(--f-display)}.stkpop span{color:var(--muted)}
@media (max-width:640px){.gtitle{font-size:1.15rem}.jtitle{font-size:1.15rem}.sthead h1,.pagehead h1{font-size:1.6rem}.ugrid{grid-template-columns:1fr 1fr}}

/* ---- week road: day details card (hover / focus / tap) ---- */
.station.big .sdot{cursor:pointer}
.station.big .sdot:hover,.station.big .sdot:focus-visible{transform:scale(1.1)}
.station.big .sdot:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
.daytip{position:fixed;z-index:60;width:320px;max-width:calc(100vw - 24px);background:var(--raised);color:var(--ink);border:1px solid var(--line);border-radius:18px;
  box-shadow:0 22px 50px -18px var(--shadow),0 2px 6px var(--shadow);padding:14px 14px 12px;display:flex;flex-direction:column;gap:10px;font-size:.9rem;
  opacity:0;transform:translateY(6px) scale(.98);transition:opacity .16s,transform .16s;pointer-events:auto}
.daytip.below{transform:translateY(-6px) scale(.98)}
.daytip.on{opacity:1;transform:none}
.daytip::after{content:"";position:absolute;left:var(--ax,50%);bottom:-7px;width:14px;height:14px;margin-left:-7px;background:var(--raised);border:1px solid var(--line);border-top:0;border-left:0;transform:rotate(45deg)}
.daytip.below::after{bottom:auto;top:-7px;transform:rotate(225deg)}
.dt-head{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}
.dt-head>div{display:flex;flex-direction:column;gap:1px;min-width:0}
.dt-head b{font:700 1rem var(--f-display)}
.dt-head span{color:var(--muted);font-size:.82rem}
.dchip{flex:none;font-size:.72rem!important;font-weight:800;border-radius:999px;padding:3px 10px;background:var(--line);color:var(--ink2)!important;white-space:nowrap}
.dchip.now{background:var(--accent);color:var(--accent-ink)!important}
.dchip.good{background:var(--good-bg);color:var(--good)!important}
.dchip.part{background:var(--pen-bg);color:var(--pen)!important}
.dchip.bad{background:var(--bad-bg);color:var(--bad)!important}
.dchip.next{background:var(--accent-soft);color:var(--accent)!important}
.dt-stats{display:flex;gap:6px;flex-wrap:wrap}
.dt-stats span{flex:1;min-width:56px;display:flex;flex-direction:column;align-items:center;background:var(--solid);border-radius:10px;padding:5px 4px}
.dt-stats b{font:800 .98rem var(--f-display)}
.dt-stats small{font-size:.66rem;color:var(--muted)}
.dt-tasks{display:flex;flex-direction:column;gap:2px}
.trow2{display:flex;align-items:center;gap:8px;padding:4px 6px;border-radius:9px;border:0;background:none;color:var(--ink2);font:inherit;text-align:left;width:100%}
button.trow2{cursor:pointer}
button.trow2:hover,button.trow2:focus-visible{background:var(--accent-soft);color:var(--ink)}
.trow2 i{width:22px;height:22px;flex:none;border-radius:50%;display:grid;place-items:center;border:1.5px solid var(--line);color:var(--muted)}
.trow2 i .ic{width:12px;height:12px}
.trow2.ok i{background:var(--good);border-color:var(--good);color:var(--accent-ink)}
.trow2.ok>span{color:var(--ink)}
.trow2>span{flex:1}
.trow2 small{color:var(--muted);font-size:.74rem}
.trow2 .req{font-size:.62rem;font-weight:800;color:var(--accent);text-transform:uppercase;letter-spacing:.04em;margin-left:4px}
.dt-acts{display:flex;flex-wrap:wrap;gap:6px;align-items:center;border-top:1px solid var(--line);padding-top:10px}
.dt-acts .btn.small{padding:7px 12px;font-size:.84rem}
.pillbtn.sm{height:32px;font-size:.8rem;padding:0 12px}
.pillbtn.sm:hover{border-color:var(--accent);color:var(--accent)}
.hday.flash{animation:hflash 2.2s ease-out}
@keyframes hflash{0%,40%{color:var(--accent);background:var(--accent-soft)}100%{background:transparent}}
@media (prefers-reduced-motion:reduce){.daytip{transition:none}}
.hlsync{display:inline-flex;align-items:center;gap:6px}.hlsync b{min-width:78px;text-align:center;color:var(--ink2);font-size:.8rem}

/* ================= Find your level and your goal ================= */
.gf{display:flex;flex-direction:column;gap:22px;min-height:calc(100vh - 140px)}
.gfbar{display:grid;grid-template-columns:120px 1fr 120px;align-items:center;gap:16px}
.gfclose{justify-self:start;color:var(--muted)}
.gfleft{justify-self:end;white-space:nowrap}
.gfstages{display:flex;justify-content:center;gap:10px;flex-wrap:wrap}
.gfstage{display:flex;align-items:center;gap:10px;border:1.5px solid var(--line);border-radius:16px;padding:7px 14px 7px 7px;background:transparent;transition:border-color .2s,background .2s}
.gfstage.cur{border-color:var(--accent);background:var(--solid);box-shadow:0 10px 24px -16px var(--accent)}
.gfsn{width:30px;height:30px;border-radius:10px;display:grid;place-items:center;font-weight:800;font-size:.88rem;background:var(--raised);color:var(--muted)}
.gfstage.cur .gfsn{background:var(--accent);color:var(--accent-ink)}
.gfstage.done .gfsn{background:var(--good);color:var(--accent-ink)}
.gfst{display:flex;flex-direction:column;gap:5px;min-width:120px}.gfst b{font-size:.88rem}
.gfst i{display:block;height:4px;border-radius:99px;background:var(--line);overflow:hidden}
.gfst u{display:block;height:100%;border-radius:99px;background:var(--accent);transition:width .4s;text-decoration:none}
.gfstage.done .gfst u{background:var(--good)}
.gfbody{display:flex;flex-direction:column;flex:1}
.gfbody .eyebrow{font-size:.78rem}
/* intro */
.gfintro{display:grid;grid-template-columns:minmax(0,1fr) 460px;gap:32px;align-items:center;flex:1}
.gfhero{display:flex;flex-direction:column;gap:18px}
.gfhero h1{font:800 2.9rem/1.06 var(--f-display);letter-spacing:-.03em;margin:0}
.gflead{font-size:1.1rem;color:var(--ink2);margin:0;max-width:560px}
.gfsteps{display:flex;flex-direction:column;gap:10px;max-width:580px}
.gfstep{display:flex;align-items:center;gap:14px;background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:12px 16px}
.gfstep>span:nth-child(2){flex:1;display:flex;flex-direction:column}.gfstep small{color:var(--muted);font-size:.86rem}
.gfstep em{font-style:normal;font-weight:800;font-size:.82rem;color:var(--muted)}
.gfsi{width:44px;height:44px;border-radius:13px;display:grid;place-items:center;font-size:1.35rem;flex:none}
.c-accent{background:color-mix(in srgb,var(--accent) 18%,transparent)}.c-gold{background:color-mix(in srgb,var(--gold) 20%,transparent)}.c-good{background:color-mix(in srgb,var(--good) 18%,transparent)}
.gfgo{gap:18px;align-items:center}
.gfmap{position:relative;height:420px;padding:0;overflow:hidden;background:var(--map)}
.gfmap svg{position:absolute;inset:18px;width:calc(100% - 36px);height:calc(100% - 36px)}
.gfroad{fill:none;stroke:var(--road);stroke-width:30;stroke-linecap:round}
.gfroute{fill:none;stroke:var(--accent);stroke-width:6;stroke-linecap:round;stroke-dasharray:1}
.gfpin{position:absolute;display:flex;align-items:center;gap:8px;margin:18px;animation:rise .5s cubic-bezier(.2,.8,.2,1) both}
.gfpd{width:46px;height:46px;border-radius:50%;display:grid;place-items:center;font-size:1.3rem;background:var(--solid);border:3px solid var(--accent)}
.gfpd.c-gold{border-color:var(--gold)}.gfpd.c-good{border-color:var(--good)}
.gfpl{display:flex;flex-direction:column;background:var(--raised);border:1px solid var(--line);border-radius:12px;padding:6px 10px}.gfpl b{font-size:.88rem}.gfpl small{font-size:.74rem;color:var(--muted)}
.gfpinbox{display:flex;flex-wrap:wrap;align-items:center;gap:10px;background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:10px 14px}
.gfpinbox input{width:110px;margin-left:6px}
/* one question per screen */
.gfq{width:min(860px,100%);align-self:center;display:flex;flex-direction:column;gap:14px}
.gfq.wide{width:min(940px,100%)}.gfq.wider{width:min(1000px,100%)}
.gfqhead{display:flex;justify-content:space-between;align-items:center;gap:12px}
.gfchip{--c:var(--accent);display:inline-flex;align-items:center;gap:6px;border-radius:999px;padding:6px 12px;font-size:.86rem;font-weight:800;background:color-mix(in srgb,var(--c) 16%,transparent);color:var(--c)}
.sk-grammar{--c:var(--accent)}.sk-vocab{--c:var(--good)}.sk-reading{--c:var(--violet)}.sk-listening{--c:var(--pen)}.sk-polite{--c:var(--gold)}.sk-speak{--c:var(--bad)}
.gfdots{display:flex;gap:4px}.gfdots i{flex:1;height:6px;border-radius:99px;background:var(--line)}.gfdots i.done{background:var(--accent)}.gfdots i.cur{background:var(--violet)}
.gfcard{padding:26px 28px;display:flex;flex-direction:column;gap:18px;border-radius:26px}
.gfask{font:800 1.7rem/1.28 var(--f-display);letter-spacing:-.02em;margin:0}
.gfmsg{background:var(--raised);border-radius:16px;padding:14px 18px;border-inline-start:4px solid var(--violet);direction:ltr;text-align:left}
.gfmsg>span:nth-child(2){display:flex;gap:8px;align-items:baseline}.gfmsg small{color:var(--muted)}
.gfmsg p{grid-column:1/-1;margin:2px 0 0;font-size:1.02rem;line-height:1.55}
.gfav{width:30px;height:30px;border-radius:50%;background:var(--violet);color:var(--accent-ink);display:grid;place-items:center;font-weight:800}
.gfsit{background:var(--raised);border-radius:16px;padding:12px 16px;font-size:1rem;color:var(--ink2)}
.gfaudio{display:flex;align-items:center;gap:16px;background:var(--raised);border-radius:16px;padding:12px 16px}
.gfplay{width:52px;height:52px;border-radius:50%;border:0;background:var(--accent);color:var(--accent-ink);font-size:1.2rem;cursor:pointer;flex:none}
.gfplay.on{animation:ping2 1.2s ease-out infinite}
@keyframes ping2{0%{box-shadow:0 0 0 0 color-mix(in srgb,var(--accent) 50%,transparent)}100%{box-shadow:0 0 0 14px transparent}}
.gfwave{flex:1;display:flex;align-items:center;gap:3px;height:40px}.gfwave i{flex:1;border-radius:99px;background:var(--line)}
.gfplay.on+.gfwave i{background:var(--accent);animation:bars .9s ease-in-out infinite alternate}.gfplay.on+.gfwave i:nth-child(odd){animation-delay:.2s}
@keyframes bars{to{transform:scaleY(.4)}}
.gfopts{display:grid;gap:12px}.gfopts.n4{grid-template-columns:1fr 1fr}.gfopts.n6{grid-template-columns:repeat(3,minmax(0,1fr));--c:var(--accent)}
.gfopt{display:flex;align-items:center;gap:14px;text-align:left;border-radius:18px;padding:15px 17px;min-height:72px;cursor:pointer;color:var(--ink);font:600 1.02rem/1.35 var(--f-body);background:var(--raised);border:2px solid transparent;transition:transform .15s,box-shadow .15s,border-color .15s,background .15s;position:relative}
.gfopt:hover{transform:translateY(-2px);box-shadow:0 12px 24px -16px var(--shadow);border-color:var(--line)}
.gfopt:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
.gfopt[aria-pressed=true]{background:var(--accent-soft);border-color:var(--accent)}
.gfkey{width:34px;height:34px;border-radius:10px;display:grid;place-items:center;font-weight:800;flex:none;background:var(--solid);color:var(--muted);border:1px solid var(--line)}
.gfopt[aria-pressed=true] .gfkey{background:var(--accent);color:var(--accent-ink);border-color:var(--accent)}
.gfopt.big{min-height:86px;padding:14px;gap:12px}
.gfopts.n6 .gfopt[aria-pressed=true]{background:color-mix(in srgb,var(--c) 13%,var(--solid));border-color:var(--c)}
.gfoi{width:46px;height:46px;border-radius:14px;display:grid;place-items:center;font-size:1.4rem;flex:none;background:var(--solid);transition:background .15s}
.gfopt[aria-pressed=true] .gfoi{background:var(--c)}
.gfot{display:flex;flex-direction:column;gap:2px;flex:1}.gfot b{font-size:1rem;line-height:1.3}.gfot small{font-size:.8rem;color:var(--muted);font-weight:400}
.gftick{width:24px;height:24px;border-radius:50%;display:grid;place-items:center;font-weight:900;font-size:.8rem;flex:none;align-self:flex-start;border:2px solid var(--line);color:transparent}
.gfopt[aria-pressed=true] .gftick{background:var(--c);border-color:var(--c);color:var(--accent-ink)}
.gfkey.sm{position:absolute;right:10px;bottom:8px;width:auto;height:auto;padding:0 5px;font-size:.66rem;background:none;border:0;color:var(--faint)}
.gffoot{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.gfkeys{font-size:.78rem}
.gfnote{text-align:center;margin:0}
/* speaking */
.gfspeak{display:grid;grid-template-columns:minmax(0,1fr) 260px;gap:28px;align-items:center}
.gfsq{display:flex;flex-direction:column;gap:14px}
.gfhelp{display:flex;flex-wrap:wrap;gap:8px}.gfhelp span{background:var(--raised);border-radius:999px;padding:6px 12px;font-size:.86rem;color:var(--ink2)}
.gflive{background:var(--raised);border-radius:16px;padding:14px 16px;font-size:.98rem;line-height:1.5;font-style:italic;color:var(--ink2);min-height:56px;max-height:160px;overflow:auto}
.gfrec{display:flex;flex-direction:column;align-items:center;gap:12px;text-align:center}
.gflisten{display:flex;gap:8px;flex-wrap:wrap}.gflisten span{border:1px solid var(--line);border-radius:999px;padding:5px 12px;font-size:.8rem;color:var(--ink2)}
/* level result */
.gflevel{display:flex;flex-direction:column;gap:16px}
.gflvtop{display:grid;grid-template-columns:320px minmax(0,1fr);gap:26px;align-items:center;padding:22px 28px}
.gflvinfo{display:flex;flex-direction:column;gap:8px}.gflvinfo p{margin:0;color:var(--ink2);line-height:1.5}
.gflvbig{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap}
.gflvbig b{font:800 4.4rem/1 var(--f-display);background:linear-gradient(135deg,var(--accent),var(--violet));-webkit-background-clip:text;background-clip:text;color:transparent;animation:popin .6s cubic-bezier(.3,1.6,.5,1) both}
.gflvbig span{font-weight:800;font-size:1.15rem}
.gfstairs{display:flex;align-items:flex-end;gap:8px;height:200px;padding-top:40px}
.gfstair{flex:1;height:var(--h);border-radius:14px 14px 6px 6px;background:var(--raised);display:flex;flex-direction:column;align-items:center;padding-top:10px;position:relative;animation:rise .5s cubic-bezier(.2,.8,.2,1) both}
.gfstair b{font:800 1.05rem var(--f-display);color:var(--faint)}.gfstair small{font-size:.66rem;color:var(--muted);text-align:center;padding:0 4px}
.gfstair.past{background:var(--accent-soft)}.gfstair.past b{color:var(--accent)}
.gfstair.me{background:linear-gradient(160deg,var(--accent),var(--violet));box-shadow:0 14px 28px -14px var(--accent)}.gfstair.me b{color:var(--accent-ink);font-size:1.35rem}.gfstair.me small{color:var(--accent-ink);opacity:.85}
.gfstair.goal{background:var(--gold-soft);border:2px dashed var(--gold)}.gfstair.goal b{color:var(--gold)}
.gftag{position:absolute;bottom:calc(100% + 8px);left:50%;transform:translateX(-50%);white-space:nowrap;font-style:normal;font-weight:800;font-size:.76rem;border-radius:999px;padding:4px 10px}
.gftag.me{background:var(--accent);color:var(--accent-ink)}.gftag.goal{background:var(--gold);color:var(--accent-ink)}
.gflvgrid{display:grid;grid-template-columns:1.1fr 1fr 1fr;gap:16px}
.gflvgrid .card{display:flex;flex-direction:column;gap:10px;padding:20px 22px}
.gflvgrid p{margin:0;color:var(--ink2);line-height:1.45}
.gfsk{display:grid;grid-template-columns:110px 1fr 44px;gap:10px;align-items:center;font-size:.92rem}
.gfsk i{height:10px;border-radius:99px;background:var(--line);overflow:hidden}.gfsk u{display:block;height:100%;border-radius:99px;background:var(--accent);transform-origin:left;animation:grow .8s cubic-bezier(.2,.8,.2,1) both;text-decoration:none}
.gfsk u.low{background:var(--pen)}.gfsk b{text-align:right}
.gfcan{border-color:color-mix(in srgb,var(--good) 40%,transparent)!important}.gfcan .h3{color:var(--good)}
.gftrain{border-color:color-mix(in srgb,var(--pen) 40%,transparent)!important}.gftrain .h3{color:var(--pen)}
/* live goal under the questions */
.gfshape{display:grid;grid-template-columns:120px minmax(0,1fr);gap:6px 18px;align-items:baseline;background:color-mix(in srgb,var(--gold) 7%,var(--surface));border:1px solid color-mix(in srgb,var(--gold) 35%,transparent);border-radius:22px;padding:16px 22px}
.gfshape .eyebrow{color:var(--gold)}
.gfshape p{margin:0;line-height:1.7}.gfg{font-size:1.1rem;font-weight:700}.gfw{color:var(--ink2)}
.gffr.on{background:color-mix(in srgb,var(--c) 16%,transparent);border-bottom:2px solid var(--c);border-radius:6px;padding:1px 5px;transition:background .3s,box-shadow .3s}
.gffr.on.now{background:color-mix(in srgb,var(--c) 30%,transparent);box-shadow:0 0 0 3px color-mix(in srgb,var(--c) 22%,transparent)}
.gffr.off{color:var(--faint);border-bottom:2px dashed var(--line);padding:1px 4px;font-weight:400}
.gffr.off.now{color:var(--c);border-bottom-color:var(--c)}
/* plan */
.gfplan{display:grid;grid-template-columns:minmax(0,1fr) 380px;gap:18px;align-items:start}
.gfposter{border:2px solid var(--gold)!important;border-radius:28px;padding:24px 28px;display:flex;flex-direction:column;gap:16px;position:relative;overflow:hidden}
.gfposter::before{content:"";position:absolute;right:-40px;top:-40px;width:190px;height:190px;border-radius:50%;background:var(--gold-soft);pointer-events:none}
.gfphead{display:flex;align-items:center;gap:12px;position:relative}.gfphead>span:last-child{display:flex;flex-direction:column}.gfphead .eyebrow{color:var(--gold)}
.gfflag{width:52px;height:52px;border-radius:16px;background:var(--gold);display:grid;place-items:center;font-size:1.6rem}
.gfedit{width:100%;box-sizing:border-box;border:1.5px solid transparent;border-radius:12px;background:transparent;color:var(--ink);font:inherit;resize:none;padding:6px 8px;line-height:1.5;position:relative}
.gfedit:hover{border-color:var(--line)}.gfedit:focus{border-color:var(--accent);outline:0;background:var(--solid)}
.gfedit.big{font:800 1.7rem/1.3 var(--f-display);letter-spacing:-.02em}
.gfpair{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.gfbox{background:var(--raised);border-radius:16px;padding:12px 12px 6px;display:flex;flex-direction:column;gap:2px}
.gfbox>span{font-size:.72rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase;padding:0 8px}.gfbox.v>span{color:var(--violet)}.gfbox.g>span{color:var(--good)}
.gfbox .gfedit{font-size:.96rem}
.gfline{display:grid;grid-template-columns:repeat(4,1fr);position:relative;padding-top:4px}
.gfline::before{content:"";position:absolute;left:18px;right:18px;top:21px;height:4px;border-radius:99px;background:linear-gradient(90deg,var(--accent),var(--gold))}
.gfstop{display:flex;flex-direction:column;align-items:center;gap:3px;position:relative;text-align:center}.gfstop:first-child{align-items:flex-start;text-align:left}.gfstop:last-child{align-items:flex-end;text-align:right}
.gfstop i{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;font-style:normal;font-size:.9rem;background:var(--solid);border:3px solid var(--accent);margin-bottom:4px}
.gfstop.v i{border-color:var(--violet)}.gfstop.g i{border-color:var(--gold)}
.gfstop b{font-size:.9rem}.gfstop small{font-size:.76rem;color:var(--muted)}
.gfside{display:flex;flex-direction:column;gap:14px}
.gfpath{display:flex;flex-direction:column;gap:8px;padding:18px 20px}.gfpath p{margin:0;font-size:.92rem;color:var(--ink2)}
.gfph{display:flex;align-items:center;gap:12px}.gfph>span:nth-child(2){flex:1;display:flex;flex-direction:column}.gfph b{font-size:1.15rem}
.gfpi{font-size:2rem}.gfph em{font-style:normal;background:var(--good-bg);color:var(--good);border-radius:999px;padding:4px 10px;font-weight:800;font-size:.8rem;white-space:nowrap}
.gfalt{display:flex;flex-wrap:wrap;gap:6px;align-items:center;border-top:1px solid var(--line);padding-top:10px;margin-top:4px}
.gfnums{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:18px 20px}.gfnums span{display:flex;flex-direction:column}.gfnums b{font:800 1.15rem var(--f-display)}.gfnums small{font-size:.76rem;color:var(--muted)}
/* dashboard + profile */
.goalcard.gfcta .btn{white-space:nowrap}
.goalcard.gfcta{grid-template-columns:64px minmax(0,1fr) auto}
.lvchip{display:inline-block;background:var(--accent-soft);color:var(--accent);border-radius:999px;padding:1px 9px;font-weight:800;letter-spacing:0;text-transform:none}
.gtitle.own{font-size:1.3rem;line-height:1.3}
.lvrecheck{margin-top:8px;align-self:flex-start;border:1.5px dashed var(--accent);background:var(--accent-soft);color:var(--accent);border-radius:999px;padding:6px 14px;font:700 .86rem var(--f-body);cursor:pointer}
.lvhist{display:flex;flex-direction:column;gap:8px}
.lvrow{display:flex;align-items:center;gap:12px;background:var(--raised);border-radius:14px;padding:10px 12px}.lvrow>span:nth-child(2){flex:1;display:flex;flex-direction:column}.lvrow small{color:var(--muted);font-size:.8rem}
.lvb{min-width:54px;height:40px;border-radius:12px;display:grid;place-items:center;background:linear-gradient(135deg,var(--accent),var(--violet));color:var(--accent-ink);font:800 1rem var(--f-display)}
@media (max-width:1000px){
  .gfintro{grid-template-columns:1fr}.gfmap{height:300px}
  .gflvtop{grid-template-columns:1fr}.gflvgrid{grid-template-columns:1fr}
  .gfplan{grid-template-columns:1fr}.gfopts.n6{grid-template-columns:1fr 1fr}
}
@media (max-width:640px){
  .gfbar{grid-template-columns:1fr auto}.gfstages{grid-column:1/-1;grid-row:2;justify-content:flex-start;flex-wrap:nowrap;overflow-x:auto}
  .gfst{min-width:70px}.gfstage{padding:5px 10px 5px 5px}
  .gfhero h1{font-size:2rem}.gfmap{display:none}
  .gfopts.n4,.gfopts.n6{grid-template-columns:1fr}.gfopt.big{min-height:68px}
  .gfcard{padding:18px}.gfask{font-size:1.3rem}
  .gfspeak{grid-template-columns:1fr}
  .gfshape{grid-template-columns:1fr;position:sticky;bottom:8px;z-index:5;padding:12px 14px}.gfg{font-size:.95rem}.gfw{display:none}.gfshape .eyebrow:nth-of-type(2){display:none}
  .gfpair{grid-template-columns:1fr}.gfedit.big{font-size:1.25rem}
  .gfline{grid-template-columns:repeat(2,1fr);row-gap:14px}.gfline::before{display:none}.gfstop,.gfstop:first-child,.gfstop:last-child{align-items:flex-start;text-align:left}
  .gfstairs{height:160px;gap:4px}.gfstair small{display:none}.gfkeys,.gfkey.sm{display:none}
  .goalcard.gfcta{grid-template-columns:44px minmax(0,1fr)}.goalcard.gfcta .btn{grid-column:1/-1}
}
@media (prefers-reduced-motion:reduce){.gfpin,.gfstair,.gfsk u,.gflvbig b,.gfplay.on,.gfplay.on+.gfwave i{animation:none}}
.gfwk{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
@media (max-width:640px){
  .gfchip{white-space:nowrap;flex:none}.gfqhead .hint{text-align:right;font-size:.8rem}
  .gfstages{scrollbar-width:none;gap:6px}.gfstages::-webkit-scrollbar{display:none}
  .gfstage{flex:1;min-width:0;gap:6px}.gfsn{width:24px;height:24px;border-radius:8px;font-size:.75rem;flex:none}
  .gfst{min-width:0}.gfst b{font-size:.74rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
}

/* ================= Accounts: log in, register, admin ================= */
body.authmode .topbar,body.authmode .wrap{display:none!important}
#auth{min-height:100vh;display:flex}
.authwrap{width:min(1100px,100%);margin:auto;padding:32px 24px;display:flex;flex-direction:column;gap:26px}
.authbrand{display:flex;align-items:center;gap:10px;font:800 1.3rem var(--f-display)}.authbrand span{color:var(--accent)}
.authmark{height:30px;width:auto;flex:none}.authbrand b{letter-spacing:-.02em}
.authgrid{display:grid;grid-template-columns:minmax(0,440px) minmax(0,1fr);gap:40px;align-items:center}
.authcard{background:var(--surface);border:1px solid var(--line);border-radius:26px;padding:30px;display:flex;flex-direction:column;gap:14px;box-shadow:0 30px 60px -36px var(--shadow);animation:rise .45s cubic-bezier(.2,.8,.2,1) both}
.authcard h1{font:800 1.9rem/1.15 var(--f-display);letter-spacing:-.02em;margin:0}
.authcard p{margin:0}.authcard .btn.big{width:100%;justify-content:center}
.authbig{font-size:2.6rem}
.afield{display:flex;flex-direction:column;gap:6px;font-weight:700;font-size:.9rem}
.afield small{font-weight:400;color:var(--muted)}
.afield input,.afield textarea{font:inherit;font-weight:400;font-size:1rem;padding:12px 14px;border-radius:12px;border:1.5px solid var(--line);background:var(--solid);color:var(--ink)}
.afield input:focus,.afield textarea:focus{outline:0;border-color:var(--accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 20%,transparent)}
.authmsg{color:var(--bad);font-weight:700;min-height:1.2em}
.hint.small{font-size:.8rem}
.authside h2{font:800 2.4rem/1.1 var(--f-display);letter-spacing:-.03em;margin:0 0 18px}
.authside ul{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:12px}
.authside li{display:flex;gap:10px;font-size:1.05rem;color:var(--ink2)}.authside li::before{content:"✓";color:var(--good);font-weight:900}
.nbadge{display:inline-grid;place-items:center;min-width:18px;height:18px;border-radius:9px;background:var(--pen);color:var(--accent-ink);font-size:.7rem;font-weight:800;padding:0 5px;margin-left:4px}
/* admin */
.adgrid{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);gap:16px}
.adreq{display:flex;flex-direction:column;gap:8px;border-top:1px solid var(--line);padding-top:12px;margin-top:12px}
.adwho{display:flex;align-items:center;gap:10px;min-width:0}.adwho>span:last-child{display:flex;flex-direction:column;min-width:0}.adwho small{color:var(--muted);font-size:.8rem;overflow:hidden;text-overflow:ellipsis}
.adav{width:36px;height:36px;border-radius:50%;flex:none;display:grid;place-items:center;font-weight:800;background:linear-gradient(135deg,var(--accent),var(--violet));color:var(--accent-ink)}
.adabout{margin:0;color:var(--ink2);font-style:italic}
.adinfo p{margin:6px 0}
.adtable{display:flex;flex-direction:column;margin-top:8px}
.adrow{display:grid;grid-template-columns:minmax(0,2fr) 1.1fr .9fr 1fr minmax(0,2fr);gap:12px;align-items:center;padding:10px 4px;border-top:1px solid var(--line)}
.adrow.head{font-size:.75rem;font-weight:800;color:var(--muted);text-transform:uppercase;letter-spacing:.05em;border-top:0}
.adacts{display:flex;flex-wrap:wrap;gap:6px;justify-content:flex-end}
.adout{grid-column:1/-1;background:var(--raised);border-radius:12px;padding:10px 12px;font-size:.9rem}
.adout input{margin-left:6px;padding:6px 8px;border-radius:8px;border:1px solid var(--line);background:var(--solid);color:var(--ink)}
.adpw{font-size:1rem;padding:2px 8px;border-radius:6px;background:var(--solid)}
.chip2.st-approved{background:var(--good-bg);color:var(--good)}.chip2.st-pending,.chip2.warn{background:var(--pen-bg);color:var(--pen)}
.chip2.st-rejected,.chip2.st-disabled{background:var(--bad-bg);color:var(--bad)}
.btn.danger{background:var(--bad);border-color:var(--bad);color:#fff}
.acpw{margin:6px 0}.acpw summary{cursor:pointer;font-weight:700;color:var(--accent)}
#acctCard textarea{width:100%;box-sizing:border-box;font:inherit;padding:10px 12px;border-radius:12px;border:1.5px solid var(--line);background:var(--solid);color:var(--ink)}
@media (max-width:860px){.authgrid{grid-template-columns:1fr}.authside{display:none}.adgrid{grid-template-columns:1fr}
  .adrow{grid-template-columns:1fr auto}.adrow.head{display:none}.adrow>span:nth-child(3),.adrow>span:nth-child(4){display:none}.adacts{grid-column:1/-1;justify-content:flex-start}}

/* ================= Tap a word: meaning, Persian, add to my words ================= */
[data-text] .w,.gfmsg p,.gfask,.gfsit{cursor:pointer}
[data-text] .w:hover{text-decoration:underline dotted color-mix(in srgb,var(--accent) 70%,transparent);text-underline-offset:4px}
.lkpop{position:fixed;z-index:70;width:300px;max-width:calc(100vw - 20px);background:var(--raised);color:var(--ink);border:1px solid var(--line);border-radius:16px;padding:12px 14px;box-shadow:0 22px 50px -18px var(--shadow),0 2px 6px var(--shadow);display:flex;flex-direction:column;gap:6px;font-size:.92rem;animation:rise .16s ease-out both;cursor:auto}
.lkpop p{margin:0;line-height:1.45}
.lkhead{display:flex;align-items:center;gap:8px}.lkhead b{font:800 1.05rem var(--f-display);flex:1;min-width:0}
.lkplay,.lkx{width:28px;height:28px;border-radius:50%;border:1px solid var(--line);background:var(--solid);color:var(--ink);cursor:pointer;flex:none;font-size:.75rem}
.lkplay{background:var(--accent);color:var(--accent-ink);border-color:var(--accent)}
.lkm{font-weight:700}.lkfa{font-family:Vazirmatn,Tahoma,sans-serif;color:var(--ink2);font-size:1rem}
.lkex{color:var(--ink2);font-style:italic}
.lkacts{display:flex;gap:8px;margin-top:4px}
.lktest{color:var(--pen)}
.lkwait{display:flex;align-items:center;gap:4px;color:var(--muted)}.lkwait i{width:6px;height:6px;border-radius:50%;background:var(--accent);animation:lkdot 1s infinite alternate}.lkwait i:nth-child(2){animation-delay:.2s}.lkwait i:nth-child(3){animation-delay:.4s;margin-right:6px}
@keyframes lkdot{from{opacity:.25}to{opacity:1}}

/* recorder: "wait" until Chrome is really listening, then the red "speak now" state (with a beep) */
.recui[data-state="wait"] .rbtn{background:var(--pen);animation:none}
.recui[data-state="wait"] .rbtn span{-webkit-mask:none;mask:none;width:36%;height:36%;border-radius:4px;background:#fff}
.recui[data-state="wait"] .rbtn::after{content:"";position:absolute;inset:-5px;border-radius:50%;border:3px solid var(--pen);border-top-color:transparent;animation:spin .8s linear infinite}
.recui[data-state="wait"] .rctl{display:inline-flex}
.recui[data-state="wait"] .rtime{font-size:0}.recui[data-state="wait"] .rtime::before{content:"Wait…";font-size:.85rem;color:var(--pen);font-weight:800}
.recui[data-state="wait"] .rpause{visibility:hidden}
@keyframes spin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.recui[data-state="wait"] .rbtn::after{animation:none}}

/* New words: "your sentence" keeps a fixed layout while you speak (mic | your words | actions) */
.vcme{align-items:stretch}
.vclabel{text-align:left}
.vcmerow{display:grid;grid-template-columns:120px minmax(0,1fr) 160px;gap:14px;align-items:start;flex-wrap:nowrap}
.vcrec{display:flex;justify-content:center}
/* narrow column: mic, then the timer on its own line, then two compact buttons; nothing spills out of the card */
.vcrec .recui{flex-direction:column;gap:6px;width:120px}
.vcrec .recui .rctl{flex-wrap:wrap;justify-content:center;row-gap:6px;width:100%}
.vcrec .recui .rtime{flex-basis:100%;text-align:center;min-width:0}
.vcrec .recui .rmini{padding:4px 9px;font-size:.76rem}
.vcsaid{min-height:64px;padding-top:4px;justify-content:flex-start}
.vcsaid .said{overflow-wrap:anywhere;line-height:1.5}
.vcacts{display:flex;flex-direction:column;align-items:flex-end;gap:8px;padding-top:4px;min-height:1px}
.vcacts .recheck{margin:0}
.vcacts .player.audio{margin:0}
@media (max-width:640px){
  .vcmerow{grid-template-columns:110px minmax(0,1fr)}
  .vcrec .recui{width:110px}
  .vcacts{grid-column:1/-1;flex-direction:row;justify-content:flex-start;align-items:center}
}

/* ---------- Persian interface (right to left) ---------- */
/* Persian digits (۱۲۳) in the Persian UI: a font that only covers 0-9, so the text itself stays plain numbers */
@font-face{font-family:"FaDigits";src:url(fonts/Vazirmatn-FD-Regular.woff2) format("woff2");font-weight:400;font-display:swap;unicode-range:U+0030-0039,U+0025}
@font-face{font-family:"FaDigits";src:url(fonts/Vazirmatn-FD-SemiBold.woff2) format("woff2");font-weight:600;font-display:swap;unicode-range:U+0030-0039,U+0025}
@font-face{font-family:"FaDigits";src:url(fonts/Vazirmatn-FD-Bold.woff2) format("woff2");font-weight:700;font-display:swap;unicode-range:U+0030-0039,U+0025}
@font-face{font-family:"FaDigits";src:url(fonts/Vazirmatn-FD-ExtraBold.woff2) format("woff2");font-weight:800;font-display:swap;unicode-range:U+0030-0039,U+0025}
html[dir="rtl"]{--f-display:"FaDigits","Vazirmatn","Bricolage Grotesque",Tahoma,sans-serif;--f-body:"FaDigits","Vazirmatn","Atkinson Hyperlegible",Tahoma,sans-serif}
html[dir="rtl"] body{font-family:var(--f-body)}
html[dir="rtl"] .eyebrow{letter-spacing:0}
/* English practice content (sentences, words, chat, transcripts) stays left to right in its own font */
.en{direction:ltr;unicode-bidi:isolate;font-family:"Atkinson Hyperlegible","Segoe UI",system-ui,sans-serif}
html[dir="rtl"] div.en,html[dir="rtl"] p.en,html[dir="rtl"] li.en{text-align:left}
/* drawings keep their own geometry */
html[dir="rtl"] .mapwrap,html[dir="rtl"] .roadsvg,html[dir="rtl"] svg{direction:ltr}

/* ---------- Admin panel ---------- */
:root,[data-theme="light"]{--series1:#1f6fae;--series2:#b55a17}
[data-theme="dark"]{--series1:#3793dc;--series2:#cf6f2c}
#admin{display:flex;flex-direction:column;gap:16px}
.adhead{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.adkpis{grid-template-columns:repeat(6,minmax(0,1fr))}
.adkpis .kpi{display:flex;flex-direction:column}
.adkpis .kpi small{margin-top:4px}
.adgo{cursor:pointer;transition:transform .15s}.adgo:hover{transform:translateY(-2px)}
.adcharts .chead{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}
.adchartgrid{display:grid;grid-template-columns:1fr 1fr;gap:22px;margin-top:10px}
.adfig{margin:0}
.adfig figcaption{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap;margin-bottom:6px}
.adlegend{display:inline-flex;gap:12px;margin-left:auto;font-size:.8rem;color:var(--muted)}
.adlegend span{display:inline-flex;align-items:center;gap:5px}
.sw{display:inline-block;width:10px;height:10px;border-radius:3px}.sw.s1{background:var(--series1)}.sw.s2{background:var(--series2)}
.adchart{position:relative}
.adchart svg{width:100%;height:auto;display:block;overflow:visible}
.adchart .grid line{stroke:var(--line);stroke-width:1}
.adchart .grid text,.adchart .axis text{fill:var(--muted);font-size:10px;font-variant-numeric:tabular-nums}
.adchart .bar.s1{fill:var(--series1)}.adchart .bar.s2{fill:var(--series2)}
.adchart .hit{fill:transparent;cursor:crosshair}
.adchart .col.on .bar{filter:brightness(1.15)}
.adchart .col.on .hit{fill:color-mix(in srgb,var(--ink) 6%,transparent)}
.adtip{position:absolute;top:0;pointer-events:none;background:var(--solid);color:var(--ink);border:1px solid var(--line);border-radius:10px;padding:8px 10px;box-shadow:0 8px 20px var(--shadow);font-size:.82rem;display:flex;flex-direction:column;gap:2px;min-width:120px;z-index:3}
.adtip span{display:flex;align-items:center;gap:6px;color:var(--muted)}.adtip span b{margin-left:auto;color:var(--ink)}
.adtable-view{margin-top:12px}.adtable-view summary{cursor:pointer;color:var(--accent);font-weight:700;font-size:.88rem}
.adscroll{overflow-x:auto}
.adt{width:100%;border-collapse:collapse;font-size:.9rem}
.adt th{text-align:left;font-size:.75rem;color:var(--muted);font-weight:700;padding:8px 10px;border-bottom:1px solid var(--line);white-space:nowrap}
.adt td{padding:9px 10px;border-bottom:1px solid var(--line);vertical-align:middle}
.adt .num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.adt.small td{padding:5px 6px;font-size:.84rem}
.adrowlink{cursor:pointer}.adrowlink:hover td,.adrowlink:focus td{background:color-mix(in srgb,var(--accent) 7%,transparent)}
.adgrid2{display:grid;grid-template-columns:1.3fr 1fr;gap:16px}
.adgrid3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.adkv{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:10px 0 0}.adkv>span:first-child{min-width:78px;color:var(--muted);font-size:.84rem}
.adchip{display:inline-flex;gap:4px;align-items:center;font-size:.8rem;border:1px solid var(--line);border-radius:999px;padding:2px 10px;color:var(--muted)}
.adchip b{color:var(--ink)}.adchip.set{border-color:var(--accent);color:var(--accent)}
#adBody{display:flex;flex-direction:column;gap:16px}
.card.adfilters{display:flex;flex-direction:row;flex-wrap:wrap;gap:10px;align-items:flex-end}
.adf{display:flex;flex-direction:column;gap:4px;font-size:.78rem;color:var(--muted)}.adf.grow{flex:1 1 220px}
.adf input,.adf select,.adact select,.adact input,.adplans input{font:inherit;font-size:.9rem;color:var(--ink);background:var(--solid);border:1px solid var(--line);border-radius:10px;padding:7px 10px;min-height:38px}
.adcsv{display:inline-flex;align-items:center;text-decoration:none}
.adwho{display:flex;align-items:center;gap:10px}.adwho small{display:block;color:var(--muted);font-size:.8rem}
.adav{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;flex:none;background:var(--accent-soft);color:var(--accent);font-weight:800}
.adav.big{width:56px;height:56px;font-size:1.4rem}
.adst{font-size:.78rem;font-weight:700;border-radius:999px;padding:2px 9px;background:var(--bg);color:var(--muted);white-space:nowrap}
.adst.st-approved{color:var(--good)}.adst.st-pending,.adst.st-unverified{color:var(--pen)}.adst.st-disabled,.adst.st-rejected{color:var(--bad)}
.adquick{display:inline-flex;gap:6px}
.adpager{justify-content:center;gap:12px;margin-top:12px}
.card.aduserhead{display:flex;flex-direction:row;gap:16px;align-items:center;text-align:left}.aduserhead h2{margin:0}.aduserhead p{margin:4px 0 0}
.adkvrow{display:flex;justify-content:space-between;gap:10px;padding:6px 0;border-bottom:1px dashed var(--line);font-size:.9rem}.adkvrow span{color:var(--muted)}
.adstrip{display:grid;grid-template-columns:repeat(14,1fr);gap:3px;margin:12px 0 4px}
.adstrip span{height:16px;border-radius:4px;background:var(--line)}.adstrip .part{background:color-mix(in srgb,var(--series1) 35%,var(--line))}.adstrip .on{background:var(--series1)}
.adsess{list-style:none;padding:0;margin:6px 0 0;font-size:.84rem;display:flex;flex-direction:column;gap:4px}
.adactions{display:flex;flex-direction:column;gap:10px}
.adact{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.adact>span:first-child{min-width:70px;font-weight:700;font-size:.88rem}
.adact input[type=text]{min-width:220px}
.adresult code,.adpw{font-family:ui-monospace,monospace;background:var(--bg);padding:2px 6px;border-radius:6px}
.adset{display:flex;flex-direction:column;gap:12px}
.adset .chead{display:flex;align-items:center;gap:10px;margin-top:6px}
.adradios{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:10px}
.adradio{display:flex;gap:10px;align-items:flex-start;border:1px solid var(--line);border-radius:14px;padding:12px;cursor:pointer}
.adradio:has(input:checked){border-color:var(--accent);background:color-mix(in srgb,var(--accent) 7%,transparent)}
.adradio span{display:flex;flex-direction:column;gap:2px}
.adplans{max-width:460px}.adplans input{width:100%}
.adset>.pillbtn,.adset>.row{align-self:flex-start}
.adresult:empty{display:none}
@media (max-width:900px){.adkpis{grid-template-columns:repeat(2,minmax(0,1fr))}.adchartgrid,.adgrid2,.adgrid3{grid-template-columns:1fr}}
/* the road keeps its left-to-right geometry, but its Persian labels read right to left */
html[dir="rtl"] .mapwrap .slabel,html[dir="rtl"] .mapwrap .finish b{direction:rtl;unicode-bidi:isolate}
/* week road: a day with some practice but not the day's minimum; the small real date under "Day N" */
.sdot.lg.part{background:var(--solid);border-color:var(--c,var(--accent));border-style:solid;color:var(--c,var(--accent));
  background-image:linear-gradient(to top,color-mix(in srgb,var(--c,var(--accent)) 22%,transparent) 50%,transparent 50%)}
.slabel .sdate{display:block;font-size:.72rem;color:var(--muted);font-weight:600;margin-top:1px}
/* announcement from the admins */
.banner.ann{display:flex;align-items:center;gap:10px;justify-content:space-between}
.banner.ann.good{background:var(--good-bg);color:var(--good)}.banner.ann.warn{background:var(--gold-soft);color:var(--gold)}
.annx{border:0;background:transparent;color:inherit;font-size:1.3rem;line-height:1;cursor:pointer;padding:0 4px}

/* role-play: a calmer scene card */
.scenecard{gap:12px}
.schead{display:flex;align-items:center;gap:10px}
.scav{width:40px;height:40px;border-radius:50%;flex:none;display:grid;place-items:center;font-weight:800;background:var(--accent-soft);color:var(--accent)}
.scwho{display:flex;flex-direction:column;line-height:1.25;min-width:0}.scwho b{font-size:.98rem}.scwho small{color:var(--muted);font-size:.8rem}
.schead .autolvl{margin-inline-start:auto}
.scenecard h2{margin:0}.scenecard .scene{margin:4px 0 0;color:var(--muted)}
.scfoot{display:flex;flex-wrap:wrap;align-items:center;gap:10px 18px;border-top:1px dashed var(--line);padding-top:10px}
.rpprog{display:flex;align-items:center;gap:10px;flex:1 1 200px}.rpprog .meter{flex:1;max-width:160px}
.rpwords{margin:0;display:flex;flex-wrap:wrap;align-items:center;gap:4px}.rplabel{font-size:.78rem;color:var(--muted);font-weight:700;margin-inline-end:4px}
.scenecard details.other summary{font-size:.86rem}
.btn.pulse{animation:glow 1.6s ease-in-out 3}
/* New words: recorder controls on one row, what you said below */
.vcmerow{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"rec acts" "said said";row-gap:8px}
.vcrec{grid-area:rec;justify-content:flex-start}.vcacts{grid-area:acts}.vcsaid{grid-area:said;min-height:0}
.vcrec .recui{flex-direction:row;width:auto;gap:10px}
.vcrec .recui .rctl{flex-wrap:nowrap;width:auto}.vcrec .recui .rtime{flex-basis:auto;text-align:start;min-width:2.4rem}
@media (max-width:640px){.vcmerow{grid-template-columns:minmax(0,1fr);grid-template-areas:"rec" "said" "acts"}}
.vcrec{padding-inline-start:6px}

/* Word review: remember → say a sentence → the coach's verdict → the app's decision */
#wrInfo{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.wrcount{font-weight:800;color:var(--ink)}
.wrdots{display:inline-flex;gap:4px}.wrdots i{width:10px;height:10px;border-radius:50%;background:var(--line)}
.wrdots i.done{background:var(--good)}.wrdots i.now{background:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
.flash.wr{display:flex;flex-direction:column;gap:12px}
.wrstep{display:flex;align-items:center;gap:8px;font-weight:700;color:var(--muted);font-size:.9rem}
.wrnum{width:22px;height:22px;border-radius:50%;display:grid;place-items:center;background:var(--accent-soft);color:var(--accent);font-size:.78rem;font-weight:800}
.wrterm{display:flex;align-items:center;gap:10px}.wrterm .term{font:800 1.7rem var(--f-display)}
.wrhelp{display:flex;gap:18px;flex-wrap:wrap}
.wrmean{background:var(--bg);border-radius:12px;padding:10px 14px}
.wrresult{border-radius:14px;padding:12px 14px;background:var(--bg);display:flex;flex-direction:column;gap:8px;border:1px solid var(--line)}
.wrresult.knew,.wrresult.help{border-color:var(--good)}.wrresult.again{border-color:var(--pen)}
.wrverdict{margin:0}.wrverdict.good b{color:var(--good)}.wrverdict.bad b{color:var(--pen)}
.wrbetter{margin:0}
.wrdecide{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.wrdecide>div{display:flex;flex-direction:column;gap:2px}
.wrchange{margin:0}

/* ---------- Word review: flashcards (spaced repetition) ---------- */
.wrbox{display:flex;flex-direction:column;gap:14px}
.wrprog{display:flex;align-items:center;gap:12px;flex-wrap:wrap;font-size:.9rem}
.wrbar{flex:1 1 180px;height:10px;border-radius:99px;background:var(--line);overflow:hidden}
.wrbar i{display:block;height:100%;background:var(--good);border-radius:99px;transition:width .4s}
.fc{position:relative;display:flex;flex-direction:column;gap:12px;border-radius:20px;padding:22px;background:linear-gradient(160deg,color-mix(in srgb,var(--accent) 8%,var(--solid)),var(--solid) 55%);
  border:1px solid var(--line);box-shadow:0 10px 30px var(--shadow);animation:popin .35s cubic-bezier(.3,1.4,.5,1)}
.fchead{display:flex;align-items:center;gap:10px}
.fcstage{font-size:.72rem;font-weight:800;letter-spacing:.04em;text-transform:uppercase;border-radius:999px;padding:2px 9px;background:var(--bg);color:var(--muted)}
.fcstage.new{color:var(--accent);background:var(--accent-soft)}.fcstage.learning{color:var(--pen);background:color-mix(in srgb,var(--pen) 14%,transparent)}
.fcstage.young{color:var(--violet);background:var(--violet-soft)}.fcstage.mature{color:var(--good);background:var(--good-bg)}
.fcfront{display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;padding:18px 8px 6px}
.fcmode{font-size:.78rem;font-weight:800;color:var(--muted);text-transform:uppercase;letter-spacing:.06em}
.fcfront .term{font:800 2rem var(--f-display)}.fcfront .term+.player{margin-top:2px}
.fcmeaning{font:700 1.25rem var(--f-display);max-width:560px}
.fcfa{font-size:.95rem}
.fcprompt{margin:0;text-align:center;color:var(--muted)}
.fc .talkbar{justify-content:center}
.fcactions{display:flex;justify-content:center}
.fcback{border-top:1px dashed var(--line);padding-top:12px;display:flex;flex-direction:column;gap:8px;animation:popin .3s}
.fcterm .term2{font:800 1.3rem var(--f-display)}
.fcmean{font-size:1rem}
.fcdecide{border-radius:14px;padding:12px 14px;background:var(--bg);border:1px solid var(--line);display:flex;flex-direction:column;gap:8px}
.fcdecide.good,.fcdecide.easy{border-color:var(--good)}.fcdecide.hard{border-color:var(--gold)}.fcdecide.again{border-color:var(--pen)}
.fcchange summary{cursor:pointer;color:var(--muted);font-size:.84rem}
.fcgrid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-top:8px}
.fcg{display:flex;flex-direction:column;align-items:center;gap:2px;border-radius:12px;border:1px solid var(--line);background:var(--solid);color:var(--ink);padding:8px 4px;cursor:pointer;font:inherit}
.fcg small{color:var(--muted);font-size:.74rem}
.fcg.again b{color:var(--pen)}.fcg.hard b{color:var(--gold)}.fcg.good b{color:var(--good)}.fcg.easy b{color:var(--accent)}
.fcg.sug{border-width:2px;border-color:currentColor;box-shadow:0 0 0 3px var(--accent-soft)}
.wrempty{display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center;padding:26px 10px}.wrempty>span{font-size:2rem}
/* the deck */
.deckhead{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.deckhead input{font:inherit;color:var(--ink);background:var(--solid);border:1px solid var(--line);border-radius:10px;padding:7px 12px;min-width:200px}
.deckstats{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}
.dstat{display:flex;flex-direction:column;align-items:center;min-width:76px;border-radius:12px;border:1px solid var(--line);background:var(--solid);color:var(--ink);padding:6px 10px;cursor:pointer;font:inherit}
.dstat b{font:800 1.2rem var(--f-display)}.dstat span{font-size:.74rem;color:var(--muted)}
.dstat.on{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
.deckgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:10px}
.dcard{position:relative;min-height:118px;border-radius:14px;border:1px solid var(--line);background:var(--solid);padding:12px;cursor:pointer;overflow:hidden}
.dcard:hover{border-color:var(--accent)}
.dfront,.dback{display:flex;flex-direction:column;gap:6px;transition:opacity .2s}
.dfront b{font:800 1.05rem var(--f-display)}
.dback{position:absolute;inset:0;padding:12px;opacity:0;pointer-events:none;background:var(--solid);font-size:.88rem}
.dback i{color:var(--muted);font-size:.82rem}
.dcard.flip .dfront{opacity:0}.dcard.flip .dback{opacity:1;pointer-events:auto}
.dback .del{margin-top:auto;align-self:flex-start}
@media (max-width:640px){.fcgrid{grid-template-columns:repeat(2,minmax(0,1fr))}.fcfront .term{font-size:1.6rem}}
#wrInfo{display:block}#wrInfo .wrprog{width:100%}
.dfront .fcstage{align-self:flex-start}

/* goal picker: path cards */
.gsetup{display:flex;flex-direction:column;gap:16px}
.gshead{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;flex-wrap:wrap}.gshead h2{margin:4px 0 2px}.gshead p{margin:0}
.pcards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.pcard{position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:6px;text-align:start;padding:16px 16px 14px;border-radius:16px;
  border:1.5px solid var(--line);background:var(--solid);color:var(--ink);font:inherit;cursor:pointer;transition:border-color .15s,box-shadow .15s,transform .15s}
.pcard:hover{transform:translateY(-2px);border-color:color-mix(in srgb,var(--accent) 50%,var(--line))}
.pcard[aria-checked="true"]{border-color:var(--accent);box-shadow:0 0 0 4px var(--accent-soft);background:color-mix(in srgb,var(--accent) 6%,var(--solid))}
.pcicon{width:44px;height:44px;border-radius:14px;display:grid;place-items:center;font-size:1.45rem;background:var(--bg)}
.pcicon.sm{width:30px;height:30px;font-size:1rem;border-radius:9px;flex:none}
.pcbadge{position:absolute;top:14px;inset-inline-end:14px;font-size:.7rem;font-weight:800;letter-spacing:.03em;border-radius:999px;padding:3px 9px;background:var(--accent-soft);color:var(--accent)}
.pccheck{position:absolute;top:14px;inset-inline-end:14px;width:24px;height:24px;border-radius:50%;display:none;place-items:center;background:var(--accent);color:var(--accent-ink);font-weight:800;font-size:.8rem}
.pcard[aria-checked="true"] .pccheck{display:grid}.pcard[aria-checked="true"] .pcbadge{inset-inline-end:46px}
.pcard b{font:800 1.05rem var(--f-display);margin-top:4px}
.pctag{font-size:.86rem;color:var(--muted);line-height:1.35}
.gsgoal{margin:0;display:flex;align-items:center;gap:10px;padding:10px 14px;border-radius:12px;background:var(--bg);font-size:.92rem}
.gsfoot{display:flex;gap:16px;flex-wrap:wrap;align-items:flex-end}
.gsf{display:flex;flex-direction:column;gap:6px}.gwhy{flex:1 1 260px}
.gslabel{font-size:.8rem;font-weight:700;color:var(--muted)}
.gwhy input{font:inherit;color:var(--ink);background:var(--solid);border:1px solid var(--line);border-radius:10px;padding:9px 12px}
.gsact{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
@media (max-width:900px){.pcards{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:560px){.pcards{grid-template-columns:1fr}}
/* calendar: a day with some practice (not the day's minimum); missed days are calmer */
.cd.part{background:color-mix(in srgb,var(--gold) 16%,transparent);color:var(--gold);font-weight:700}
.legend i.part{background:color-mix(in srgb,var(--gold) 30%,transparent)}
.cd.miss{background:color-mix(in srgb,var(--bad) 12%,transparent);color:color-mix(in srgb,var(--bad) 80%,var(--muted))}
.legend{flex-wrap:wrap;row-gap:4px}

/* ---------- Settings: a section menu, sections of clean rows ---------- */
#setBox.setgrid{display:grid;grid-template-columns:200px minmax(0,1fr);gap:24px;align-items:start}
.snav{position:sticky;top:84px;display:flex;flex-direction:column;gap:2px}
.snav a{display:flex;align-items:center;gap:10px;padding:9px 12px;border-radius:12px;color:var(--muted);text-decoration:none;font-weight:700;font-size:.92rem}
.snav a:hover{background:var(--raised);color:var(--ink)}
.scol{display:flex;flex-direction:column;gap:18px;min-width:0}
.sset{background:var(--solid);border:1px solid var(--line);border-radius:20px;overflow:hidden;scroll-margin-top:84px}
.sset>header{display:flex;align-items:center;gap:12px;padding:16px 20px;border-bottom:1px solid var(--line)}
.sset h2{margin:0;font-size:1.05rem}.sset header p{margin:2px 0 0;color:var(--muted);font-size:.86rem}
.ssicon{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;background:var(--bg);font-size:1.1rem;flex:none}
.srows>.srow,.srows>div>.srow,#acctCard>.srow{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px;align-items:center;padding:14px 20px;border-bottom:1px solid var(--line)}
.srows>:last-child>.srow:last-child,.srows>.srow:last-child,#acctCard>.srow:last-child{border-bottom:0}
.srl{display:flex;flex-direction:column;gap:3px;min-width:0}.srl b{font-size:.95rem}.srl small{color:var(--muted);font-size:.82rem;line-height:1.45}
.src{display:flex;align-items:center;gap:8px;justify-content:flex-end;flex-wrap:wrap}
.srow.wide{grid-template-columns:1fr}.srow.wide .src{justify-content:stretch;flex-direction:column;align-items:stretch}.srow.wide .src .btn{align-self:flex-end}
.sinput{font:inherit;color:var(--ink);background:var(--bg);border:1px solid var(--line);border-radius:12px;padding:9px 12px;min-width:240px}
textarea.sinput{width:100%;resize:vertical;line-height:1.5}
.sval{color:var(--muted)}
.seg2{flex-wrap:wrap}
.stimes{display:flex;gap:12px;flex-wrap:wrap}.stimes label{display:flex;flex-direction:column;gap:4px;font-size:.78rem;color:var(--muted);font-weight:700}
.stimes input{font:inherit;color:var(--ink);background:var(--bg);border:1px solid var(--line);border-radius:10px;padding:7px 10px}
.toggle{position:relative;display:inline-block;width:46px;height:26px;cursor:pointer}
.toggle input{position:absolute;opacity:0;width:100%;height:100%;margin:0;cursor:pointer}
.toggle i{position:absolute;inset:0;border-radius:99px;background:var(--line);transition:background .2s}
.toggle i::after{content:"";position:absolute;top:3px;inset-inline-start:3px;width:20px;height:20px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.3);transition:transform .2s}
.toggle input:checked+i{background:var(--accent)}.toggle input:checked+i::after{transform:translateX(20px)}
html[dir="rtl"] .toggle input:checked+i::after{transform:translateX(-20px)}
.toggle input:focus-visible+i{outline:2px solid var(--accent);outline-offset:2px}
.sacts{display:flex;gap:10px;padding:14px 20px;justify-content:flex-end}
.sdrop summary{list-style:none;cursor:pointer}.sdrop summary::-webkit-details-marker{display:none}
.sdrop[open] summary{margin-bottom:10px}
.sdbox{display:flex;flex-direction:column;gap:10px;min-width:260px}
.srow.danger .srl b{color:var(--bad)}.dangerish{color:var(--bad)!important;border-color:color-mix(in srgb,var(--bad) 40%,var(--line))!important}
#gmPin:empty{display:none}#gmPin{padding:0 20px 14px}
@media (max-width:900px){#setBox.setgrid{grid-template-columns:1fr}.snav{position:static;flex-direction:row;overflow-x:auto}.snav a{white-space:nowrap}}
@media (max-width:600px){.srows>.srow,.srows>div>.srow,#acctCard>.srow{grid-template-columns:1fr}.src{justify-content:flex-start}.sinput{min-width:0;width:100%}}

/* roadmap: no scrollbars while the map zooms; clear numbers on the stops */
.mapwrap{overflow-y:hidden}
.mapwrap.anim{overflow:hidden}
.sdot em.snum{position:absolute;left:-6px;top:-6px;min-width:22px;height:22px;padding:0 5px;border-radius:11px;background:var(--c);color:var(--solid);font:800 .74rem/22px var(--f-body);font-style:normal;text-align:center;box-shadow:0 0 0 2px var(--solid);font-variant-numeric:tabular-nums}
.sdot.lg em.snum{min-width:24px;height:24px;line-height:24px;font-size:.8rem;border-radius:12px}
.sdot.done em.snum{background:var(--good)}
.sdot.now em.snum,.sdot.lg.today em.snum{background:var(--accent);color:var(--accent-ink)}
.sdot.lg.sun em.snum{background:var(--gold)}
.slabel .snow{color:var(--accent);font-size:.72rem;letter-spacing:.02em}

/* calendar head: month name and streak on one side, the arrows together on the other; arrows mirror in Persian */
.calhead{gap:6px}.calhead b{flex:1;text-align:start;display:flex;align-items:center;gap:10px}
.calhead .streak2{font-size:.85rem;padding:3px 10px;border-radius:99px;background:color-mix(in srgb,var(--pen) 12%,transparent)}
html[dir="rtl"] .flipx .ic{transform:scaleX(-1)}
.srows .srow.wide{grid-template-columns:1fr}
.sset>header>div{display:flex;flex-direction:column;align-items:flex-start}
.sset>header>div{flex:1;min-width:0;text-align:start}.sset>header h2,.sset>header p{text-align:start;width:100%}

/* Settings > Profile: who you are, then a roomy "about you" box */
.pident{display:flex;align-items:center;gap:18px;padding:20px;border-bottom:1px solid var(--line)}
.pavatar{width:64px;height:64px;border-radius:50%;flex:none;display:grid;place-items:center;font:800 1.6rem var(--f-display);color:#fff;background:linear-gradient(135deg,var(--accent),color-mix(in srgb,var(--accent) 45%,#7c5cff));box-shadow:0 8px 20px -10px var(--accent)}
.pidf{display:flex;flex-direction:column;gap:6px;flex:1;min-width:0}
.pidf label{font-size:.8rem;font-weight:700;color:var(--muted)}
.pidf small{color:var(--muted);font-size:.84rem;display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.sinput.big{font-size:1.1rem;font-weight:700;max-width:360px;width:100%}
.pabout{padding:18px 20px 20px;display:flex;flex-direction:column;gap:12px}
.pahead{display:flex;align-items:flex-end;justify-content:space-between;gap:12px}
.pahead>div{display:flex;flex-direction:column;gap:3px}.pahead b{font-size:1rem}.pahead small{color:var(--muted);font-size:.84rem}
.pacount{font-size:.8rem;color:var(--muted);font-variant-numeric:tabular-nums;white-space:nowrap}.pacount.warn{color:var(--gold)}
#acAbout{width:100%;min-height:150px;resize:none;overflow-y:auto;font-size:1rem;line-height:1.7;color:var(--ink);background:var(--bg);border:1.5px solid var(--line);border-radius:16px;padding:14px 16px;transition:border-color .15s,box-shadow .15s}
#acAbout:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 4px color-mix(in srgb,var(--accent) 18%,transparent)}
.pafoot{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.pachips{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.pachips>span{font-size:.8rem;color:var(--muted);font-weight:700}
.pachip{font:inherit;font-size:.8rem;font-weight:700;padding:5px 11px;border-radius:99px;border:1px dashed var(--line);background:transparent;color:var(--ink2);cursor:pointer}
.pachip:hover{border-style:solid;border-color:var(--accent);color:var(--accent)}
.pasave{display:flex;align-items:center;gap:10px;margin-inline-start:auto}
#acAboutSave:disabled{opacity:.45;cursor:default}
@media (max-width:600px){.pident{padding:16px;gap:14px}.pavatar{width:52px;height:52px;font-size:1.3rem}}
@media print{.pspage{break-after:page}.pspage:last-child{break-after:auto}}

/* ---------- Progress: goal, this week, skills, habit ---------- */
#progress{display:flex;flex-direction:column;gap:20px}
#progress h2{margin:0;font:800 1.15rem var(--f-display)}
.pgcard{display:flex;flex-direction:column;gap:14px}
.pghero{display:flex;justify-content:space-between;align-items:flex-start;gap:20px}
.pgtitle{display:flex;flex-direction:column;gap:6px;min-width:0}.pgtitle h2{font-size:1.3rem!important;line-height:1.35}
.pgmeta{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.pgnum{display:flex;flex-direction:column;align-items:flex-end;flex:none}.pgnum b{font:800 2.4rem/1 var(--f-display);color:var(--accent)}.pgnum span{font-size:.8rem;color:var(--muted)}
.pgweeks{display:flex;gap:6px}
.pgw{flex:1;height:12px;border-radius:6px;background:var(--raised);overflow:hidden;position:relative}
.pgw i{position:absolute;inset-block:0;inset-inline-start:0;background:var(--accent);border-radius:6px}
.pgw.done i{background:var(--good)}.pgw.now{box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 45%,transparent)}
.pgsay{margin:0;color:var(--muted);font-size:.86rem}
.sechead{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:12px;flex-wrap:wrap}
.skills{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.skill{display:flex;flex-direction:column;gap:12px}
.skhead{display:flex;align-items:flex-start;gap:12px}.skhead>div{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.skhead b{font-size:1rem}.skhead small{color:var(--muted);font-size:.8rem}
.skic{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;background:var(--bg);font-size:1.15rem;flex:none}
.sktag{font-size:.75rem;font-weight:800;padding:4px 10px;border-radius:99px;white-space:nowrap;background:color-mix(in srgb,var(--pen) 14%,transparent);color:var(--pen)}
.sktag.ok{background:var(--good-bg);color:var(--good)}
.sknum{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap}
.sknum b{font:800 2.2rem/1 var(--f-display)}.sknum b small{font-size:1rem;color:var(--muted);font-weight:700}
.sknum span{color:var(--muted);font-size:.82rem}
.skline{width:100%;height:auto;display:block}
.skline .tgt{stroke:var(--good);stroke-width:1.5;stroke-dasharray:5 5;opacity:.8}
.skline .ln{fill:none;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1;animation:draw 1s ease both}
.skline circle{stroke:var(--solid);stroke-width:2}.skline text{fill:var(--muted);font-size:10px}
.skfoot{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;margin-top:auto}
.sktr{font-size:.84rem;font-weight:700}.sktr.up{color:var(--good)}.sktr.down{color:var(--bad)}.sktr.flat{color:var(--muted);font-weight:600}
.sknone{margin:0;color:var(--muted)}.skill.empty .btn{align-self:flex-start}
.wbar{display:flex;gap:2px;height:14px;border-radius:7px;overflow:hidden}.wbar i{min-width:4px}
.wleg{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 16px;font-size:.84rem}
.wleg span{display:grid;grid-template-columns:auto auto 1fr;column-gap:6px;align-items:center}.wleg i{width:10px;height:10px;border-radius:3px}
.wleg small{grid-column:2/-1;color:var(--muted);font-size:.74rem}
#progHabit{display:flex;flex-direction:column;gap:14px}
.habitgrid{display:grid;grid-template-columns:minmax(0,1fr) 230px;gap:24px;align-items:center}
.habit{width:100%;height:auto}.habit rect{fill:var(--accent);opacity:.55}.habit rect.met{fill:var(--good);opacity:1}.habit rect.now{opacity:.9}
.habit .grid line{stroke:var(--line)}.habit .grid line.tgt{stroke:var(--good);stroke-dasharray:5 5}.habit text{fill:var(--muted);font-size:10.5px}
.hfacts{display:flex;flex-direction:column;gap:14px}
.hfacts>div{display:flex;flex-direction:column;gap:1px}.hfacts b{font:800 1.6rem/1.1 var(--f-display)}.hfacts b small{font-size:.9rem;color:var(--muted)}
.hfacts span{font-size:.84rem}.hfacts em{font-style:normal;font-size:.78rem;color:var(--muted)}.hfacts em.up{color:var(--good)}.hfacts em.down{color:var(--pen)}
@media (max-width:820px){.skills{grid-template-columns:1fr}.habitgrid{grid-template-columns:1fr}.hfacts{flex-direction:row;flex-wrap:wrap}.hfacts>div{flex:1;min-width:120px}}
@media (max-width:600px){.pghero{flex-direction:column}.pgnum{align-items:flex-start}}
.skline .grid line{stroke:var(--line)}.skline .grid line.tgt{stroke:var(--good);stroke-width:1.5;stroke-dasharray:5 5}
.skline .grid text.tl{fill:var(--good);font-weight:700}.skline text{font-size:11px}

/* ---------- Dashboard: goal summary row ---------- */
.gsum{display:flex;flex-direction:row;align-items:center;gap:26px;padding:20px 24px}
.gsring{width:84px;height:84px;flex:none}.gsring circle{fill:none;stroke-width:8}.gsring .bg{stroke:var(--raised)}.gsring .fg{stroke:var(--good);stroke-linecap:round;transition:stroke-dashoffset .8s}
.gsring text{font:800 18px var(--f-display);fill:var(--ink)}
.gslab{font-size:.72rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.gsmain{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}
.gsname{font:800 1.5rem/1.1 var(--f-display)}
.gsline{font-size:.88rem;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.gsmain .lvrecheck{align-self:flex-start;margin-top:4px}
.gsdiv{width:1px;align-self:stretch;background:var(--line);flex:none}
.gsstat{display:flex;flex-direction:column;gap:4px;flex:none}.gsstat>b{font:800 1.5rem/1.1 var(--f-display);display:flex;align-items:baseline;gap:6px}
.gsstat>b small{font-size:1rem;color:var(--faint)}
.lvnow{color:var(--accent)}.lvto{color:var(--faint);font-size:1.1rem}.lvgoal{color:var(--gold)}
.gstrack{gap:6px}.gstrack .track{align-self:flex-start;font-size:.8rem;padding:4px 12px}.gstrack .hint{font-size:.82rem}
.gsedit{flex:none;width:38px;height:38px;border-radius:12px}
@media (max-width:900px){.gsum{flex-wrap:wrap;gap:12px 14px;padding:16px}
  .gsring{width:64px;height:64px}.gsmain{flex:1 1 calc(100% - 140px)}.gsname{font-size:1.25rem}
  .gsdiv{display:none}.gsedit{order:0}
  .gsstat{order:1;flex:1 1 0;min-width:0;background:var(--raised);border-radius:12px;padding:10px 12px}.gsstat>b{font-size:1.05rem}
  .gstrack .track{font-size:.72rem;padding:3px 9px}}

/* ---------- Dashboard: today ---------- */
.todaycard{display:flex;flex-direction:column;align-items:stretch;gap:18px;padding:24px 26px}
.thead2{display:flex;align-items:flex-start;gap:14px}
.tpic{width:46px;height:46px;border-radius:14px;display:grid;place-items:center;background:var(--accent-soft);color:var(--accent);flex:none}.tpic .ic{width:22px;height:22px}
.tptext{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}.tptext h2{margin:0;font:700 1.25rem var(--f-display)}
.tprog{display:flex;align-items:center;gap:16px}.tprog>span{white-space:nowrap;font-size:.92rem}
.tsegs{flex:1;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px}.tsegs i{height:8px;border-radius:4px;background:var(--raised)}.tsegs i.on{background:var(--good)}
.tsteps{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}
.tstep{width:100%;height:100%;display:flex;flex-direction:column;align-items:flex-start;gap:8px;padding:14px;border-radius:16px;background:var(--map);border:1px solid var(--line2);color:var(--ink);font:inherit;text-align:start;cursor:pointer;animation:popin .45s both;transition:transform .15s,border-color .15s}
.tstep:hover{transform:translateY(-2px);border-color:var(--line)}
.tstep b{font-size:.98rem}.tstep small{font-size:.8rem;color:var(--muted)}
.tsno{width:100%;display:flex;align-items:center;justify-content:space-between;gap:6px;min-height:24px;font-size:.75rem;font-weight:800;color:var(--muted)}
.tsok{width:24px;height:24px;border-radius:50%;background:var(--good);color:var(--accent-ink);display:grid;place-items:center}.tsok .ic{width:14px;height:14px;stroke-width:3}
.tsreq{font-style:normal;font-size:.68rem;font-weight:800;padding:2px 8px;border-radius:99px;background:var(--pen-bg);color:var(--pen)}
.tstep.done{opacity:.85}
.tstep.next{background:var(--accent-soft);border:2px solid var(--accent);box-shadow:0 12px 28px -18px var(--accent)}.tstep.next .tsno{color:var(--accent)}
.tsgo{margin-top:auto;align-self:stretch;text-align:center;font-weight:800;font-size:.88rem;color:var(--accent-ink);background-image:linear-gradient(135deg,var(--accent),color-mix(in srgb,var(--accent) 55%,var(--violet)));border-radius:99px;padding:8px 0}
.mission2{display:flex;align-items:center;gap:14px;padding:14px 16px;border-radius:16px;background:var(--gold-soft);border:1px solid color-mix(in srgb,var(--gold) 30%,transparent)}
.mission2>div{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.mission2 .gslab{color:var(--gold)}.mission2 .mtext{font-size:.95rem}
.mic3{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;background:color-mix(in srgb,var(--gold) 16%,transparent);color:var(--gold);flex:none}
.mission2 .pillbtn{color:var(--gold);border-color:color-mix(in srgb,var(--gold) 50%,transparent)}
.mission2.done{opacity:.7}
@media (max-width:900px){.tsteps{grid-template-columns:1fr;gap:8px}
  .tstep{flex-direction:row;flex-wrap:wrap;align-items:center;padding:12px 14px;gap:4px 12px}
  .tstep .tsno{width:auto;order:0}.tstep b{flex:1}.tstep small{order:3;width:100%;padding-inline-start:0}
  .tstep.next .tsgo{order:4;width:100%;padding:11px 0}
  .thead2{flex-wrap:wrap}.tprog{flex-direction:column;align-items:stretch;gap:8px}
  .mission2{display:grid;grid-template-columns:38px minmax(0,1fr);align-items:start}.mission2 .pillbtn{grid-column:2;justify-self:start}}
/* answers in the level test are English: left to right, number badge on the left, also in Persian */
.gfopts.n4{direction:ltr;text-align:left}
