/* joinAmin "My journey" — the student page. Uses the tokens from /assets/site.css. */
.me-body{background-image:none}
.me-app{max-width:1180px;margin:0 auto;padding:16px 16px 40px;box-sizing:border-box;min-height:100vh}
.me-page{display:flex;flex-direction:column;gap:16px}
.me-narrow{max-width:460px;margin:0 auto;display:flex;flex-direction:column;gap:14px}
.me-center{text-align:center;align-items:center}
.me-grow{flex:1;min-width:0}
.me-muted{color:var(--muted)} .me-small{font-size:13.5px}
.me-sr{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}
.me-loading{display:flex;justify-content:center;padding:60px 0}
.me-spin{display:inline-block;width:22px;height:22px;border-radius:50%;border:3px solid var(--line);border-top-color:var(--voice);animation:mespin .8s linear infinite;vertical-align:middle}
@keyframes mespin{to{transform:rotate(360deg)}}
.me-card{background:var(--panel);border-radius:24px;padding:18px 20px;box-shadow:0 1px 0 rgba(19,32,27,.05),0 14px 30px -22px rgba(19,32,27,.4);display:flex;flex-direction:column;gap:10px;text-decoration:none;color:var(--ink)}
.me-eyebrow{font-size:12.5px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.me-eyebrow-l{color:rgba(255,255,255,.85)}
.me-h1{font-size:clamp(28px,6vw,38px);margin:4px 0 0;line-height:1.08}
.me-h2{font-size:22px;margin:0}
.me-lead{font-size:17px;color:#3d4d46;margin:0}
html[data-theme="dark"] .me-lead{color:var(--muted)}
.me-note{background:#fff1c7;color:#7a5400;border-radius:14px;padding:10px 14px;font-size:15px}
.me-note-s{font-size:13px;color:var(--muted);text-align:center;padding:2px 10px}

/* buttons and forms */
.me-btn{display:inline-flex;align-items:center;justify-content:center;gap:10px;font:700 17px var(--f-ui);border:0;border-radius:16px;padding:15px 20px;background:#5a4fe6;color:#fff;box-shadow:0 5px 0 #3b32b0;text-decoration:none;cursor:pointer}
.me-btn:active{transform:translateY(3px);box-shadow:0 2px 0 #3b32b0}
.me-btn:disabled{opacity:.6}
.me-btn svg,.me-mini svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.3;stroke-linecap:round;stroke-linejoin:round}
.me-btn-light{background:var(--panel);color:var(--ink);border:1.5px solid var(--line);box-shadow:0 3px 0 var(--line)}
.me-btn-wide{width:100%}
.me-mini{display:inline-flex;align-items:center;gap:8px;font:600 14.5px var(--f-ui);border:1.5px solid var(--line);background:var(--panel);color:var(--ink);border-radius:99px;padding:9px 14px;cursor:pointer;margin-top:6px}
.me-mini.busy{opacity:.6}
.me-link{background:none;border:0;padding:0;font:700 15px var(--f-ui);color:var(--voice-d);cursor:pointer;text-align:left}
.me-form{display:flex;flex-direction:column;gap:14px}
.me-form label,.me-fs legend{display:flex;flex-direction:column;gap:6px;font-weight:600;font-size:15px}
.me-form input:not([type]),.me-form input[type="email"],.me-row-f input,.me-gapin{font:500 17px var(--f-ui);padding:14px 16px;border-radius:14px;border:1.5px solid var(--line);background:var(--panel);color:var(--ink)}
.me-fs{border:0;padding:0;margin:0;display:flex;gap:18px;flex-wrap:wrap}
.me-fs legend{margin-bottom:8px}
.me-radio{flex-direction:row!important;align-items:center;gap:8px!important;font-weight:500!important}
.me-radio input,.me-check input,.me-toggle input{width:22px;height:22px;accent-color:#5a4fe6;margin:0;flex:none}
.me-check{flex-direction:row!important;align-items:flex-start;gap:10px!important;font-weight:400!important;font-size:14.5px!important;color:var(--ink);opacity:.92;font-size:15.5px!important}
.me-out{font-size:15px;color:var(--ink);background:var(--panel2);border-radius:12px;padding:10px 14px}
.me-or{display:flex;align-items:center;gap:10px;color:var(--muted);font-size:14px}.me-or span:not([lang]){flex:1;height:1px;background:var(--line)}
.me-safe{display:flex;gap:12px;align-items:center;background:var(--direction-s,#d9f2ed);color:var(--direction-d,#075a50);border-radius:16px;padding:12px 14px;font-size:14px}
.me-safe svg{width:24px;height:24px;flex:none;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.me-safe-in{margin:0 12px 8px}
.me-top{display:flex;align-items:center;gap:10px}
.me-brand{font:800 20px var(--f-display);letter-spacing:-.02em}
.me-logo{width:30px;height:30px;color:var(--ink);flex:none}
.me-row{flex-direction:row;align-items:center;gap:14px}
.me-badge-lv{width:62px;height:62px;flex:none;border-radius:18px;background:#5a4fe6;color:#fff;display:flex;align-items:center;justify-content:center;font:800 22px var(--f-display)}
.me-bigicon{width:76px;height:76px;border-radius:24px;display:flex;align-items:center;justify-content:center;margin:20px auto 0}
.me-bigicon svg{width:38px;height:38px}

/* colour chips for icons (one colour per tool, everywhere) */
.c-com{background:#fbe0ea;color:#b0275a}.c-dir{background:#d9f2ed;color:#0b7a6e}.c-voi{background:#e6e4ff;color:#5a4fe6}.c-chg{background:#ffe7d6;color:#cf4a0f}.c-sun{background:#fff1c7;color:#7a5400}.c-ink{background:var(--panel2);color:var(--ink)}
.me-ti svg,.me-bigicon svg,.me-iconbtn svg,.me-round svg,.me-send svg,.me-rec svg,.me-mk svg,.me-path .dot svg{fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}

/* home */
.me-head{display:flex;align-items:center;gap:12px}
.me-head-t{font:800 22px var(--f-display);letter-spacing:-.02em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.me-amin-btn{display:flex;align-items:center;gap:10px;text-decoration:none;background:var(--ink);color:var(--bg);border-radius:14px;padding:6px 14px 6px 6px;font-weight:700;font-size:15px}
.me-a{width:32px;height:32px;border-radius:50%;background:#f2b632;color:#13201b;display:flex;align-items:center;justify-content:center;font:800 15px var(--f-display)}
.me-count{background:#b0275a;color:#fff;border-radius:99px;font-size:12px;padding:2px 8px}
.me-avatar{width:44px;height:44px;border-radius:50%;border:0;background:#e6e4ff;color:#3b32b0;font:800 18px var(--f-ui);cursor:pointer;flex:none}
.me-menu{align-self:flex-end;background:var(--panel);border-radius:16px;padding:14px 16px;box-shadow:0 12px 30px -12px rgba(0,0,0,.3);display:flex;flex-direction:column;gap:8px;margin-top:-8px}
.me-grid2{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);gap:16px}
.me-goal-t{font:800 clamp(24px,3.2vw,34px)/1.06 var(--f-display);letter-spacing:-.03em}
.me-pills{display:flex;gap:8px;flex-wrap:wrap}
.me-pill{border-radius:99px;padding:5px 12px;font-size:14px;font-weight:600}.me-pill.p0{background:#e6e4ff;color:#3b32b0}.me-pill.p1{background:#d9f2ed;color:#075a50}.me-pill.p2{background:#ffe7d6;color:#8f3409}
.me-path{list-style:none;margin:8px 0 0;padding:0;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));position:relative;text-align:center;font-size:13.5px;font-weight:600;color:var(--muted)}
.me-path::before{content:"";position:absolute;left:10%;right:10%;top:21px;height:6px;border-radius:6px;background:var(--line)}
.me-path li{position:relative;display:flex;flex-direction:column;align-items:center;gap:8px;padding:0 2px}
.me-path .dot{width:48px;height:48px;border-radius:50%;background:var(--panel);border:2px dashed #b8c4b8;box-sizing:border-box;display:flex;align-items:center;justify-content:center;position:relative}
.me-path .dot svg{width:22px;height:22px}
.me-path li.done{color:var(--ink)} .me-path li.done .dot{background:#5a4fe6;border:0;color:#fff}
.me-path li.now{color:#3b32b0} .me-path li.now .dot{border:4px solid #5a4fe6;box-shadow:0 0 0 6px #e6e4ff}
.me-today{text-decoration:none;color:#fff;background:#5a4fe6;border-radius:24px;padding:22px 24px;display:flex;flex-direction:column;justify-content:space-between;gap:18px;box-shadow:0 6px 0 #3b32b0}
.me-today:active{transform:translateY(3px);box-shadow:0 3px 0 #3b32b0}
.me-today-t{font:800 clamp(22px,2.6vw,29px)/1.1 var(--f-display);letter-spacing:-.02em;margin-top:8px}
.me-today-go{display:flex;align-items:center;gap:14px;font-weight:700;font-size:17px}
.me-round{width:60px;height:60px;border-radius:50%;background:#fff;color:#5a4fe6;display:flex;align-items:center;justify-content:center}
.me-round svg{width:28px;height:28px}
.me-tiles{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:14px}
.me-tile{position:relative;text-decoration:none;color:var(--ink);background:var(--panel);border-radius:22px;padding:18px 8px;display:flex;flex-direction:column;align-items:center;gap:10px;box-shadow:0 10px 24px -18px rgba(19,32,27,.45);transition:transform .12s}
.me-tile:hover{transform:translateY(-2px)}
.me-tile:focus-visible,.me-today:focus-visible{outline:3px solid var(--ink);outline-offset:3px}
.me-ti{width:64px;height:64px;border-radius:20px;display:flex;align-items:center;justify-content:center;flex:none}
.me-ti svg{width:32px;height:32px}
.me-ti.s{width:44px;height:44px;border-radius:14px}.me-ti.s svg{width:22px;height:22px}
.me-tl{font-weight:700;font-size:16px;text-align:center}
.me-badge{position:absolute;top:10px;right:10px;background:#5a4fe6;color:#fff;border-radius:99px;font-size:12px;font-weight:700;padding:2px 8px}
.me-dot{position:absolute;top:12px;right:12px;width:12px;height:12px;border-radius:50%;background:#b0275a}
.me-storybox .me-st{border-left:3px solid #5a4fe6;padding-left:12px}
.me-storybox .me-st:nth-of-type(2n){border-color:#0b7a6e}
.me-more{font-weight:700;align-self:flex-start}

/* bars, lists */
.me-bar{display:flex;align-items:center;gap:12px;padding:4px 0}
.me-bar-t{flex:1;font:800 21px var(--f-display);letter-spacing:-.02em}
.me-iconbtn{width:44px;height:44px;border-radius:14px;background:var(--panel);display:flex;align-items:center;justify-content:center;color:var(--ink);flex:none}
.me-iconbtn svg{width:22px;height:22px}
.me-row-f{display:flex;gap:10px;flex-wrap:wrap}.me-row-f input{flex:1 1 220px;min-width:0}
.me-toggle{display:flex;gap:10px;align-items:center;font-size:15px}
.me-list,.me-tl,.me-items{display:flex;flex-direction:column;gap:10px}
.me-wrow{flex-direction:row;align-items:center;gap:14px;padding:14px 16px}
.me-score{font:800 18px var(--f-display);color:#0b7a6e}
.me-new{background:#5a4fe6;color:#fff;border-radius:99px;font-size:12.5px;font-weight:700;padding:3px 10px}

/* worksheet */
.me-item{flex-direction:row;gap:14px;align-items:flex-start}
.me-item.ok{box-shadow:0 0 0 2px #1c8350}.me-item.bad{box-shadow:0 0 0 2px #cf4a0f}
.me-qn{width:34px;height:34px;flex:none;border-radius:50%;background:var(--panel2);display:flex;align-items:center;justify-content:center;font-weight:800}
.me-qp{font-size:17px;line-height:1.5;margin-bottom:8px}
.me-gap{color:var(--muted);letter-spacing:.08em}
.me-opts{display:flex;flex-wrap:wrap;gap:8px}
.me-opt{display:flex}.me-opt input{position:absolute;opacity:0}
.me-opt span{border:1.5px solid var(--line);border-radius:12px;padding:10px 14px;font-size:16px;cursor:pointer;background:var(--panel)}
.me-opt input:checked+span{border-color:#5a4fe6;background:#e6e4ff;color:#3b32b0;font-weight:700}
.me-opt input:focus-visible+span{outline:3px solid var(--ink);outline-offset:2px}
.me-gapin{width:100%;box-sizing:border-box;max-width:360px}
.me-fb{margin-top:8px;font-size:14.5px;background:var(--panel2);border-radius:10px;padding:8px 12px}
.me-big{font:800 52px var(--f-display);letter-spacing:-.03em}
.me-audio audio{width:100%;margin-top:6px}
.me-script{text-align:left;width:100%}

/* chat */
.me-chatpage{display:flex;flex-direction:column;gap:10px;min-height:calc(100vh - 56px)}
.me-msgs{flex:1;display:flex;flex-direction:column;gap:10px;padding:6px 2px}
.me-msg{max-width:min(78%,560px);border-radius:18px;padding:11px 15px;font-size:16px;line-height:1.5;background:var(--panel);align-self:flex-start;border-bottom-left-radius:5px}
.me-msg.mine{align-self:flex-end;background:var(--ink);color:var(--bg);border-radius:18px;border-bottom-right-radius:5px}
.me-msg.amin{background:#fff1c7;color:#13201b}
.me-msg.failed{opacity:.5}
.me-typing{display:flex;gap:5px}.me-typing span{width:8px;height:8px;border-radius:50%;background:var(--muted);animation:medot 1s infinite alternate}.me-typing span:nth-child(2){animation-delay:.2s}.me-typing span:nth-child(3){animation-delay:.4s}
@keyframes medot{to{opacity:.25}}
.me-chips{display:flex;gap:8px;flex-wrap:wrap}
.me-chip{font:600 14.5px var(--f-ui);border:1.5px solid var(--line);background:var(--panel);color:var(--ink);border-radius:99px;padding:9px 14px;cursor:pointer}
.me-compose{position:sticky;bottom:0;display:flex;gap:10px;background:var(--bg);padding:10px 0 6px}
.me-compose input{flex:1;min-width:0;font:500 16.5px var(--f-ui);padding:14px 16px;border-radius:16px;border:1.5px solid var(--line);background:var(--panel);color:var(--ink)}
.me-send{width:52px;height:52px;border:0;border-radius:16px;background:#cf4a0f;color:#fff;display:flex;align-items:center;justify-content:center;flex:none;cursor:pointer}
.me-send svg{width:24px;height:24px}
.me-quota{display:flex;gap:3px}.me-quota span{width:6px;height:20px;border-radius:3px;background:var(--line)}.me-quota span.on{background:#cf4a0f}

/* speaking */
.me-q{font:800 clamp(21px,3vw,27px)/1.18 var(--f-display);letter-spacing:-.02em}
.me-row-b{display:flex;gap:8px;flex-wrap:wrap}
.me-recbox{display:flex;flex-direction:column;align-items:center;gap:14px;padding:18px 0}
.me-bars{display:flex;align-items:center;gap:5px;height:60px}.me-bars span{width:7px;height:10px;border-radius:4px;background:#d06a92;transition:height .08s}
.me-rec{width:112px;height:112px;border-radius:50%;border:0;background:#b0275a;color:#fff;box-shadow:0 0 0 14px #fbe0ea;display:flex;align-items:center;justify-content:center;cursor:pointer}
.me-rec svg{width:44px;height:44px}
.me-rec.on{animation:mepulse 1.4s ease-in-out infinite}
@keyframes mepulse{50%{box-shadow:0 0 0 22px #fbe0ea}}
.me-timer{font:800 28px var(--f-display);color:#b0275a}
.me-fbrow{display:flex;gap:12px;align-items:flex-start;font-size:16px}
.me-mk{width:28px;height:28px;border-radius:50%;flex:none;display:flex;align-items:center;justify-content:center}.me-mk svg{width:16px;height:16px;stroke-width:3}
.me-mk.ok{background:#d9f2ed;color:#0b7a6e}.me-mk.nx{background:#ffe7d6;color:#cf4a0f}

@media (max-width:900px){.me-grid2{grid-template-columns:minmax(0,1fr)}.me-tiles{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}}
@media (max-width:560px){
  .me-app{padding:12px 12px 32px}
  .me-hide-s{display:none}
  .me-head{gap:8px;flex-wrap:wrap}
  .me-head .lang{flex:none}
  .me-head .me-grow{display:block}
  .me-head-t{order:9;flex-basis:100%;white-space:normal;margin-top:2px}
  .me-head .me-logo{width:26px;height:26px}
  .me-head .lang button{padding:5px 8px;font-size:12.5px}
  .me-amin-btn{padding:5px}
  .me-avatar{width:38px;height:38px;font-size:16px}
  .me-head-t{font-size:19px}
  .me-path{font-size:11.5px}.me-path .dot{width:38px;height:38px}.me-path::before{top:16px}
  .me-ti{width:52px;height:52px;border-radius:16px}.me-ti svg{width:26px;height:26px}
  .me-tl{font-size:14px}
  .me-msg{max-width:86%}
}
@media (prefers-reduced-motion:reduce){.me-rec.on,.me-spin,.me-typing span{animation:none}}

.me-wrow{text-align:left}

/* placement-test pop-up on the first visit */
.me-pop{position:fixed;inset:0;z-index:50;overflow:auto;display:grid;place-items:center;padding:24px 16px;background:rgba(19,32,27,.55)}
.me-pop-card{width:min(520px,100%);background:var(--panel,#fff);border-radius:28px;padding:30px 26px;display:grid;gap:14px;justify-items:start;box-shadow:0 24px 60px -20px rgba(0,0,0,.45)}
.me-pop-ic{width:72px;height:72px;border-radius:22px;background:#cf4a0f;color:#fff;display:grid;place-items:center}
.me-pop-ic svg,.me-pop-card .me-btn svg{fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.me-pop-ic svg{width:38px;height:38px}
.me-pop-card .me-btn svg{width:22px;height:22px}
.me-pop-next{list-style:none;margin:4px 0 0;padding:0;display:grid;gap:8px;counter-reset:n;width:100%}
.me-pop-next li{counter-increment:n;display:flex;gap:10px;align-items:center;color:var(--muted);font-weight:600}
.me-pop-next li::before{content:counter(n);width:26px;height:26px;border-radius:50%;display:grid;place-items:center;border:2px solid var(--line);font-size:13px;font-weight:800}
.me-pop-next li.on{color:var(--ink)}
.me-pop-next li.on::before{background:#cf4a0f;border-color:#cf4a0f;color:#fff}

/* the pop-up sits over the student's real page: a light veil so the page shows through */
.me-pop-over{background:linear-gradient(to bottom,rgba(19,32,27,0) 0%,rgba(19,32,27,.10) 40%,rgba(19,32,27,.45) 100%);align-items:end;padding-bottom:28px}
.me-pop-over .me-pop-card{animation:me-rise .45s ease-out .35s both}
@keyframes me-rise{from{opacity:0;transform:translateY(24px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.me-pop-over .me-pop-card{animation:none}}
.me-pop-ready{display:flex;align-items:center;gap:8px;background:#d8f1ec;color:#075a50;font-weight:800;font-size:14px;padding:7px 12px;border-radius:999px}
.me-pop-ready svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round}
@media (max-width:699px){.me-pop-over .me-pop-card{border-radius:26px 26px 0 0;padding-bottom:28px}}
@media (max-width:699px){.me-pop-over{padding:40px 0 0}}

.me-pop-over .me-pop-card{gap:10px;padding:22px 22px 20px;width:min(560px,100%)}
.me-pop-over .me-pop-ic{width:52px;height:52px;border-radius:16px}
.me-pop-over .me-pop-ic svg{width:28px;height:28px}
.me-pop-over .me-h1{font-size:clamp(24px,4vw,30px);margin:0}
.me-pop-over .me-lead{margin:0;font-size:15.5px}
.me-pop-over .me-pop-head{display:flex;gap:12px;align-items:center}
.me-pop-over .me-pop-next{display:flex;gap:18px;flex-wrap:wrap}
@media (max-width:699px){.me-pop-over{padding:0}.me-pop-over .me-pop-card{padding:20px 18px 22px}.me-pop-over .me-pop-next{display:none}}

/* placement test, always in the bottom corner of the student's page */
.me-fab{position:fixed;right:16px;bottom:calc(16px + env(safe-area-inset-bottom));z-index:20;display:inline-flex;align-items:center;gap:10px;background:#cf4a0f;color:#fff;text-decoration:none;font-weight:700;border-radius:999px;padding:8px 16px 8px 8px;box-shadow:0 4px 0 #9c3609,0 10px 24px -10px rgba(0,0,0,.4)}
.me-fab-ic{width:38px;height:38px;border-radius:50%;background:rgba(255,255,255,.18);display:grid;place-items:center}
.me-fab-ic svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.me-fab-t b{font-weight:800}
.me-page{padding-bottom:90px}
@media (max-width:560px){.me-fab{padding:8px}.me-fab-t{display:none}.me-fab-ic{width:44px;height:44px}}
.me-fab-lv{display:none}
@media (max-width:560px){.me-fab{position:fixed}.me-fab-lv{display:block;position:absolute;top:-6px;left:-6px;background:#fff;color:#9c3609;font:800 12px/1 var(--f-ui,system-ui);padding:4px 6px;border-radius:999px;box-shadow:0 1px 4px rgba(0,0,0,.25)}}
.me-spin-s{width:14px;height:14px;border-width:2px;vertical-align:-2px;display:inline-block}
.me-bar .lang{margin-left:auto;flex:none}
.me-bar .lang button{padding:5px 8px;font-size:12.5px}

.me-player{display:flex;align-items:center;gap:14px;margin-top:12px}
.me-play{width:56px;height:56px;border-radius:50%;border:0;background:#0b7a6e;color:#fff;display:grid;place-items:center;flex:none;cursor:pointer;box-shadow:0 4px 0 #075a50}
.me-play:disabled{opacity:.45;cursor:default}
.me-play svg{width:24px;height:24px;fill:currentColor;stroke:none}
.me-pbar{height:8px;border-radius:99px;background:var(--line);overflow:hidden;margin-bottom:6px}
.me-pbar i{display:block;height:100%;width:0;background:#0b7a6e;transition:width .4s}

/* coloured transcript */
.me-said{border-top:1px solid var(--line);padding-top:12px;display:grid;gap:8px}
.me-said-t{font-size:17px;line-height:2.1;margin:0}
.w-ok{background:#d9f2ed;color:#075a50;border-radius:6px;padding:2px 4px;box-decoration-break:clone;-webkit-box-decoration-break:clone}
.w-bad{background:#fde2e2;color:#a3141f;border-radius:6px;padding:2px 4px;text-decoration:line-through;text-decoration-thickness:2px}
.w-maybe{background:#fff3c4;color:#7a5600;border-radius:6px;padding:2px 4px}
.w-fix,.w-alt{font-weight:600;margin-left:4px;border-radius:6px;padding:2px 6px;border:1.5px solid}
.w-fix{color:#a3141f;border-color:#f3a5a5;background:#fff}
.w-alt{color:#7a5600;border-color:#f0d777;background:#fff}
.w-fix b,.w-alt b{font-weight:900;text-decoration:underline;text-underline-offset:3px}
.me-legend{display:flex;flex-wrap:wrap;gap:6px 14px;font-size:12.5px;color:var(--muted)}
.me-legend span{display:inline-flex;align-items:center;gap:5px}
.me-legend i{width:12px;height:12px;border-radius:3px;display:inline-block}
.lg-ok{background:#9fdccf}.lg-bad{background:#f3a5a5}.lg-maybe{background:#f0d777}
.me-timer.near{color:#cf4a0f}

/* ---------- live chat ---------- */
.me-chat-av{position:relative;width:42px;height:42px;border-radius:50%;background:#f5b62a;color:#13201b;display:grid;place-items:center;font:800 18px var(--f-display);flex:none}
.me-dot-st{position:absolute;right:-1px;bottom:-1px;width:13px;height:13px;border-radius:50%;background:#b9c2bd;border:2.5px solid var(--bg,#f3f5f1)}
.me-dot-st.on{background:#18a957}
.me-expect{display:flex;gap:10px;align-items:flex-start;background:#fff7e0;color:#6b4e00;border-radius:14px;padding:10px 12px;font-size:14px;margin:6px 0}
.me-expect svg{width:20px;height:20px;flex:none;fill:none;stroke:currentColor;stroke-width:2}
.me-day{align-self:center;font-size:12px;font-weight:700;color:var(--muted);background:var(--line);border-radius:99px;padding:3px 10px;margin:6px 0}
.me-msg .me-mt{display:flex;justify-content:flex-end;align-items:center;gap:3px;font-size:11px;opacity:.7;margin-top:3px}
.me-tick svg{width:14px;height:14px;stroke-width:3;fill:none;stroke:currentColor}
.me-tick.seen{color:#34b7f1;opacity:1}
.me-msg.sending{opacity:.55}
.me-msg.failed{outline:2px solid #e05252}
.me-vn audio{width:230px;max-width:100%;height:38px;display:block}
.me-mic{width:44px;height:44px;border-radius:50%;border:0;background:var(--line);color:var(--ink);display:grid;place-items:center;flex:none;cursor:pointer}
.me-mic svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2}
.me-mic.on{background:#e0245e;color:#fff;animation:mepulse 1.4s ease-in-out infinite}
.me-recbar{display:flex;align-items:center;gap:8px;font-size:13px;color:#b0275a;padding:6px 4px}
.me-recdot{width:10px;height:10px;border-radius:50%;background:#e0245e;animation:mepulse 1.2s infinite}
.me-ctx details{background:var(--panel,#fff);border-radius:14px;padding:8px 12px;font-size:14px}
.me-ctx summary{font-weight:700;cursor:pointer}
.me-ctx-in{display:grid;gap:4px;margin-top:6px}
.me-thread{display:flex;align-items:center;gap:12px;text-decoration:none;color:inherit}
.me-thread.need{border-left:4px solid #cf4a0f}
.me-thread-last{display:block;font-size:14px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.me-thread .me-grow{min-width:0}
.me-thread-r{display:grid;justify-items:end;gap:4px;flex:none}
.me-need{font-size:11.5px;font-weight:800;color:#cf4a0f}
.me-thread .me-count{background:#18a957;color:#fff;border-radius:99px;font-size:12px;font-weight:800;padding:2px 8px}
.me-card.me-thread{display:flex;flex-direction:row;align-items:center;justify-items:initial;text-align:left;gap:12px;padding:14px 16px}

/* ---------- chat button (bottom right) and menu ---------- */
.me-chatfab-wrap{position:fixed;right:16px;bottom:calc(16px + env(safe-area-inset-bottom));z-index:30;display:grid;justify-items:end;gap:10px}
.me-chatfab{position:relative;display:inline-flex;align-items:center;gap:10px;border:0;cursor:pointer;color:#fff;font:800 17px var(--f-display);padding:10px 20px 10px 10px;border-radius:999px;
  background:linear-gradient(135deg,#5a4fe6 0%,#8b5cf6 55%,#d946a8 100%);box-shadow:0 5px 0 #3b32b0,0 14px 30px -10px rgba(90,79,230,.7);animation:cf-pulse 2.8s ease-in-out 1s 4}
.me-chatfab.open{animation:none}
.me-cf-ic{width:40px;height:40px;border-radius:50%;background:rgba(255,255,255,.22);display:grid;place-items:center}
.me-cf-ic svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2.4}
.me-cf-badge{position:absolute;top:-6px;right:-4px;background:#18a957;color:#fff;border:2px solid #fff;border-radius:99px;font:800 12px var(--f-ui);padding:1px 7px}
@keyframes cf-pulse{0%,100%{box-shadow:0 5px 0 #3b32b0,0 0 0 0 rgba(139,92,246,.55)}50%{box-shadow:0 5px 0 #3b32b0,0 0 0 14px rgba(139,92,246,0)}}
@media (prefers-reduced-motion:reduce){.me-chatfab{animation:none}}
.me-chatmenu{width:min(340px,calc(100vw - 32px));background:var(--panel,#fff);border-radius:22px;padding:8px;box-shadow:0 20px 50px -14px rgba(19,32,27,.45);display:grid;gap:6px;animation:me-rise .2s ease-out}
.me-chatopt{display:flex;gap:12px;align-items:flex-start;padding:12px;border-radius:16px;text-decoration:none;color:inherit}
.me-chatopt:hover,.me-chatopt:focus-visible{background:var(--line)}
.me-chatopt b{display:block;font:800 17px var(--f-display)}
.me-co-ic{position:relative;width:46px;height:46px;border-radius:14px;display:grid;place-items:center;flex:none;background:#ffe7d6;color:#cf4a0f}
.me-co-ic svg{width:26px;height:26px}
.me-co-ic.a{border-radius:50%;background:#f5b62a;color:#13201b;font:800 20px var(--f-display)}
.me-co-p{display:block;font-size:14px;color:var(--muted);margin-top:2px}
.me-co-left{display:inline-block;margin-top:6px;font-size:12.5px;font-weight:800;color:#0b7a6e;background:#d8f1ec;border-radius:99px;padding:3px 9px}
/* the placement-test button moves to the bottom left */
.me-fab{right:auto;left:16px}
@media (max-width:560px){.me-chatfab{padding:8px 16px 8px 8px;font-size:15px}.me-cf-ic{width:36px;height:36px}}

/* Amin's photo in round avatars */
.me-av-img{width:100%;height:100%;border-radius:50%;object-fit:cover;display:block}
.me-a{overflow:hidden;padding:0}
.me-chat-av{overflow:visible;background:#f5b62a}
.me-chat-av .me-av-img{border-radius:50%}
/* chat menu: two clear, tappable buttons */
.me-chatmenu{padding:10px;gap:10px}
.me-chatopt{align-items:center;border:2px solid transparent;box-shadow:0 3px 0 rgba(19,32,27,.12);transition:transform .12s,box-shadow .12s}
.me-chatopt:active{transform:translateY(2px);box-shadow:0 1px 0 rgba(19,32,27,.12)}
.me-chatopt.o-ai{background:linear-gradient(135deg,#fff1e6,#ffe1cc);border-color:#f7c4a1}
.me-chatopt.o-amin{background:linear-gradient(135deg,#fff8dc,#fdeab0);border-color:#f0d777}
.me-chatopt:hover{background-color:transparent;filter:brightness(.98)}
.me-chatopt b{font-size:18px}
.me-co-ic{width:52px;height:52px;background:#fff;color:#cf4a0f;box-shadow:inset 0 0 0 2px #f7c4a1}
.me-co-ic.a{padding:0;background:#f5b62a;box-shadow:0 0 0 2px #fff}
.me-co-ic .me-dot-st{right:-2px;bottom:-2px}
.me-co-p{font-size:13.5px;line-height:1.35}
.me-co-badge{display:grid;justify-items:center;line-height:1;font:800 18px var(--f-display);color:#fff;border-radius:14px;padding:6px 9px;min-width:46px}
.me-co-badge small{font:700 10.5px var(--f-ui);opacity:.9;margin-top:2px}
.me-co-badge.ai{background:#cf4a0f}
.me-co-badge.new{background:#18a957}
.me-co-go{width:30px;height:30px;border-radius:50%;background:rgba(19,32,27,.08);display:grid;place-items:center;flex:none}
.me-co-go svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2.6}
/* four tools now: Speak, Listen, Worksheets, My story */
.me-tiles{grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}
@media (max-width:560px){.me-tiles{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* dark mode: keep text readable (checked by an automatic contrast scan) */
@media (prefers-color-scheme: dark){
:root:not([data-theme="light"]) .me-path li.now{color:#c3beff}
:root:not([data-theme="light"]) .me-path li.now .dot{border-color:#9a93ff;box-shadow:0 0 0 6px #25214d}
:root:not([data-theme="light"]) .me-timer{color:#ff7fa8}
}
:root[data-theme="dark"] .me-path li.now{color:#c3beff}
:root[data-theme="dark"] .me-path li.now .dot{border-color:#9a93ff;box-shadow:0 0 0 6px #25214d}
:root[data-theme="dark"] .me-timer{color:#ff7fa8}

/* the chat menu buttons keep light backgrounds in both themes, so their text is always dark */
.me-chatopt{color:#13201b}
.me-chatopt .me-co-p{color:#4b5a53}
.me-co-go{color:#13201b}

@media (prefers-color-scheme: dark){
:root:not([data-theme="light"]) .me-lead{color:var(--muted)}
:root:not([data-theme="light"]) .me-score{color:#3cc4b1}
}
:root[data-theme="dark"] .me-lead{color:var(--muted)}
:root[data-theme="dark"] .me-score{color:#3cc4b1}
/* sign-in: Google first and bold, steps, code box */
.me-btn-google{background:#fff;color:#1f1f1f;border:2px solid #1f1f1f;box-shadow:0 5px 0 #1f1f1f;font:800 19px var(--f-ui);padding:17px 20px;transition:opacity .15s,transform .1s}
.me-btn-google:active{transform:translateY(3px);box-shadow:0 2px 0 #1f1f1f}
.me-btn-google .me-g{width:24px;height:24px;flex:none}
.me-btn-google.is-waiting{opacity:.5}
.me-step{display:flex;align-items:center;gap:10px;font-size:17px;color:var(--ink);margin-top:6px}
.me-stepn{width:30px;height:30px;border-radius:50%;background:#5a4fe6;color:#fff;font:800 15px var(--f-ui);display:inline-flex;align-items:center;justify-content:center;flex:none}
.me-switch{text-align:center;font-size:16px;color:var(--ink);margin:18px 0 6px}
.me-switch a{color:#5a4fe6;font-weight:700}
.me-note-warn{background:#ffe7d6;color:#7a2e00}
.me-codeform{width:100%;text-align:left;margin:8px 0 14px}
.me-codeform input{font:800 30px var(--f-ui)!important;letter-spacing:10px;text-align:center}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]) .me-switch a{color:#a9a2ff}
  :root:not([data-theme="light"]) .me-btn-google{border-color:#fff;box-shadow:0 5px 0 #8d8d8d}
}
:root[data-theme="dark"] .me-switch a{color:#a9a2ff}
:root[data-theme="dark"] .me-btn-google{border-color:#fff;box-shadow:0 5px 0 #8d8d8d}
.me-homelink{display:inline-flex;align-items:center;gap:10px;color:var(--ink);text-decoration:none;border-radius:12px}
.me-homelink:focus-visible{outline:3px solid #5a4fe6;outline-offset:3px}
/* welcome: question counter */
.me-wstep{display:flex;align-items:center;gap:10px;font-size:14px;color:var(--muted);margin-top:2px}
.me-wdots{display:inline-flex;gap:5px}
.me-wdots i{width:9px;height:9px;border-radius:50%;background:var(--line);display:block}
.me-wdots i.done{background:#0b7a6e}
.me-wdots i.now{background:#5a4fe6;box-shadow:0 0 0 3px rgba(90,79,230,.25)}
.me-enline{display:block;margin-top:8px;padding-top:8px;border-top:1px dashed var(--line);font-size:15px;color:var(--muted);font-style:italic}
.me-enline b{font-style:normal;font-size:11px;letter-spacing:.06em;background:#e6e4ff;color:#3b32b0;border-radius:6px;padding:2px 6px;margin-right:6px}

.me-meter .me-nd{transform-origin:12px 17px;animation:me-sweep 3.6s ease-in-out infinite}
@keyframes me-sweep{0%,100%{transform:rotate(-62deg)}45%,62%{transform:rotate(72deg)}}
@media (prefers-reduced-motion:reduce){.me-meter .me-nd{animation:none;transform:rotate(72deg)}}
.me-ti.c-meter{background:#121a3a}
.me-ti.c-meter svg{width:52px;height:34px}
.me-ti.c-meter.s svg{width:32px;height:21px}
.me-ear .me-eb{transform-box:fill-box;transform-origin:50% 100%;animation:me-eq 1.2s ease-in-out infinite}
.me-ear .b2{animation-delay:-.4s;animation-duration:1.0s}.me-ear .b3{animation-delay:-.8s;animation-duration:1.4s}
@keyframes me-eq{0%,100%{transform:scaleY(.35)}50%{transform:scaleY(1.25)}}
@media (prefers-reduced-motion:reduce){.me-ear .me-eb{animation:none;transform:scaleY(.9)}}
.me-ti.c-meter .me-ear{width:46px;height:44px}

.me-new{display:inline-block;vertical-align:middle;background:#5a4fe6;color:#fff;border-radius:99px;font:800 11px var(--f-ui);letter-spacing:.06em;padding:3px 9px;margin-left:6px}
.me-pinbook{border:2px solid #5a4fe6;background:linear-gradient(135deg,rgba(90,79,230,.08),rgba(11,122,110,.06)),var(--panel);gap:10px}
.me-pinbook-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.me-pinbook-t{margin:0;font:800 clamp(22px,2.8vw,28px)/1.12 var(--f-display);letter-spacing:-.02em}
.me-pinbook-n{margin:0;color:var(--muted);font-size:15.5px;line-height:1.45}
