@font-face{font-family:'Space Grotesk';font-style:normal;font-weight:400;font-display:swap;src:url(fonts/space-grotesk-latin-400-normal.woff2) format('woff2')}
@font-face{font-family:'Space Grotesk';font-style:normal;font-weight:500;font-display:swap;src:url(fonts/space-grotesk-latin-500-normal.woff2) format('woff2')}
@font-face{font-family:'Space Grotesk';font-style:normal;font-weight:700;font-display:swap;src:url(fonts/space-grotesk-latin-700-normal.woff2) format('woff2')}
@font-face{font-family:'JetBrains Mono';font-style:normal;font-weight:400;font-display:swap;src:url(fonts/jetbrains-mono-latin-400-normal.woff2) format('woff2')}
@font-face{font-family:'JetBrains Mono';font-style:normal;font-weight:600;font-display:swap;src:url(fonts/jetbrains-mono-latin-600-normal.woff2) format('woff2')}
/* ==========================================================
   IT Skills Arcade — shared design system
   ========================================================== */
:root{
  --bg:#080c15;
  --bg-2:#0d1322;
  --surface:#121a2c;
  --surface-2:#18223a;
  --surface-3:#202c49;
  --line:#26324f;
  --line-2:#33426a;
  --text:#e9eefb;
  --muted:#93a0bf;
  --dim:#64718f;

  --lime:#c6ff4d;
  --cyan:#4de1ff;
  --pink:#ff5c93;
  --amber:#ffbf47;
  --violet:#9d8cff;
  --green:#3ddc97;
  --red:#ff5d5d;

  --accent:var(--lime);
  --ok:var(--green);
  --bad:var(--red);

  --r-sm:8px; --r:14px; --r-lg:22px;
  --shadow:0 10px 30px rgba(0,0,0,.35);
  --shadow-lg:0 24px 70px rgba(0,0,0,.55);

  --font:'Space Grotesk','Segoe UI',system-ui,-apple-system,Roboto,sans-serif;
  --mono:'JetBrains Mono','Cascadia Code','Fira Code',ui-monospace,Menlo,Consolas,monospace;
}

*{box-sizing:border-box;margin:0;padding:0}
html{-webkit-text-size-adjust:100%}
body{
  font-family:var(--font);
  background:var(--bg);
  color:var(--text);
  line-height:1.5;
  min-height:100vh;
  background-image:
    radial-gradient(900px 500px at 85% -10%, rgba(77,225,255,.10), transparent 60%),
    radial-gradient(700px 500px at -10% 10%, rgba(198,255,77,.07), transparent 60%),
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size:auto,auto,36px 36px,36px 36px;
  background-attachment:fixed;
  overflow-x:hidden;
}
img,svg,canvas{max-width:100%}
button{font:inherit;color:inherit;cursor:pointer}
input,select,textarea{font:inherit;color:inherit}
a{color:var(--cyan)}
::selection{background:var(--lime);color:#000}
:focus-visible{outline:2px solid var(--cyan);outline-offset:2px;border-radius:6px}
h1,h2,h3,h4{line-height:1.15;letter-spacing:-.01em}
code,.mono,kbd,pre{font-family:var(--mono)}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.hide{display:none!important}
.muted{color:var(--muted)}
.dim{color:var(--dim)}
.center{text-align:center}
.row{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.col{display:flex;flex-direction:column;gap:12px}
.spacer{flex:1}
.grow{flex:1;min-width:0}

/* ---------- Buttons ---------- */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  padding:10px 18px;border-radius:12px;border:1px solid var(--line-2);
  background:var(--surface-2);color:var(--text);font-weight:600;font-size:15px;
  text-decoration:none;transition:transform .12s, background .15s, border-color .15s, box-shadow .15s;
  user-select:none;-webkit-user-select:none;
}
.btn:hover{background:var(--surface-3);border-color:var(--muted)}
.btn:active{transform:translateY(1px) scale(.99)}
.btn[disabled],.btn.disabled{opacity:.45;pointer-events:none}
.btn.primary{background:var(--accent);color:#0a0f00;border-color:transparent;box-shadow:0 6px 24px rgba(198,255,77,.22)}
.btn.primary:hover{filter:brightness(1.07);box-shadow:0 8px 30px rgba(198,255,77,.32)}
.btn.cyan{background:var(--cyan);color:#001318;border-color:transparent}
.btn.danger{background:rgba(255,93,93,.12);border-color:rgba(255,93,93,.5);color:#ffb0b0}
.btn.ghost{background:transparent}
.btn.sm{padding:6px 12px;font-size:13px;border-radius:9px}
.btn.lg{padding:14px 28px;font-size:17px;border-radius:14px}
.btn.icon{padding:8px 10px}

/* ---------- Surfaces ---------- */
.card{
  background:linear-gradient(180deg,var(--surface),var(--bg-2));
  border:1px solid var(--line);border-radius:var(--r);padding:18px;
  box-shadow:var(--shadow);
}
.card.flat{box-shadow:none}
.card h3,.card h2{font-size:18px;margin-bottom:6px}
.panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:14px}
.chip{
  display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:999px;
  background:var(--surface-2);border:1px solid var(--line);font-size:12.5px;font-weight:600;color:var(--muted);
  white-space:nowrap;
}
.chip b{color:var(--text)}
.chip.lime{color:var(--lime);border-color:rgba(198,255,77,.35);background:rgba(198,255,77,.07)}
.chip.cyan{color:var(--cyan);border-color:rgba(77,225,255,.35);background:rgba(77,225,255,.07)}
.chip.pink{color:var(--pink);border-color:rgba(255,92,147,.35);background:rgba(255,92,147,.07)}
.chip.amber{color:var(--amber);border-color:rgba(255,191,71,.35);background:rgba(255,191,71,.07)}
.chip.green{color:var(--green);border-color:rgba(61,220,151,.35);background:rgba(61,220,151,.07)}
.chip.red{color:var(--red);border-color:rgba(255,93,93,.35);background:rgba(255,93,93,.07)}
.chip.violet{color:var(--violet);border-color:rgba(157,140,255,.35);background:rgba(157,140,255,.07)}
kbd{background:var(--surface-3);border:1px solid var(--line-2);border-bottom-width:3px;border-radius:6px;padding:1px 7px;font-size:.85em}

.progress{height:8px;background:var(--surface-3);border-radius:99px;overflow:hidden}
.progress>i{display:block;height:100%;width:0;background:linear-gradient(90deg,var(--cyan),var(--lime));border-radius:99px;transition:width .35s ease}
.progress.thick{height:14px}
.progress.warn>i{background:linear-gradient(90deg,var(--amber),var(--red))}

.input,.select,.textarea{
  width:100%;padding:10px 12px;background:var(--bg-2);border:1px solid var(--line-2);
  border-radius:10px;outline:none;transition:border-color .15s, box-shadow .15s;
}
.input:focus,.select:focus,.textarea:focus{border-color:var(--cyan);box-shadow:0 0 0 3px rgba(77,225,255,.15)}
.input.mono,.textarea.mono{font-family:var(--mono)}

/* ---------- Game page chrome ---------- */
.game-bar{
  position:sticky;top:0;z-index:40;display:flex;align-items:center;gap:10px;
  padding:10px 16px;background:rgba(8,12,21,.82);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);
  border-bottom:1px solid var(--line);
}
.game-bar .back{display:inline-flex;align-items:center;gap:6px;color:var(--muted);text-decoration:none;font-weight:600;font-size:14px;padding:6px 10px;border-radius:9px}
.game-bar .back:hover{background:var(--surface-2);color:var(--text)}
.game-bar .gtitle{display:flex;align-items:center;gap:10px;font-weight:700;font-size:17px;min-width:0}
.game-bar .gtitle span.ico{font-size:22px}
.game-bar .gtitle span.t{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.game-wrap{max-width:1180px;margin:0 auto;padding:20px 16px 80px}
.game-wrap.narrow{max-width:860px}

.hud{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-bottom:14px}
.hud .stat{
  display:flex;flex-direction:column;min-width:78px;padding:7px 12px;background:var(--surface);
  border:1px solid var(--line);border-radius:12px;
}
.hud .stat small{font-size:10.5px;letter-spacing:.09em;text-transform:uppercase;color:var(--dim);font-weight:700}
.hud .stat b{font-size:20px;font-family:var(--mono);font-variant-numeric:tabular-nums}
.hud .stat.bump b{animation:bump .35s}

/* ---------- Start screen ---------- */
.start{max-width:760px;margin:6vh auto 0;text-align:center}
.start .big-ico{
  width:96px;height:96px;margin:0 auto 18px;border-radius:26px;display:grid;place-items:center;font-size:52px;
  background:linear-gradient(145deg,var(--surface-3),var(--surface));border:1px solid var(--line-2);
  box-shadow:0 0 0 6px rgba(198,255,77,.05),var(--shadow);animation:float 4s ease-in-out infinite;
}
.start h1{font-size:clamp(28px,5vw,44px);margin-bottom:10px}
.start p.lead{color:var(--muted);font-size:17px;max-width:56ch;margin:0 auto 18px}
.start .chips{display:flex;gap:8px;justify-content:center;flex-wrap:wrap;margin-bottom:20px}
.start .how{text-align:left;margin:22px auto;max-width:560px}
.start .how ol{padding-left:20px;color:var(--muted);display:grid;gap:6px}
.start .how li::marker{color:var(--lime);font-weight:700}

/* ---------- Feedback ---------- */
.feedback{
  border-radius:14px;padding:14px 16px;border:1px solid var(--line-2);background:var(--surface);
  display:flex;gap:14px;align-items:flex-start;animation:rise .25s ease;
}
.feedback .fb-ico{font-size:22px;line-height:1.2}
.feedback.ok{border-color:rgba(61,220,151,.55);background:rgba(61,220,151,.08)}
.feedback.bad{border-color:rgba(255,93,93,.55);background:rgba(255,93,93,.08)}
.feedback .fb-title{font-weight:700;margin-bottom:2px}
.feedback.ok .fb-title{color:var(--green)}
.feedback.bad .fb-title{color:#ff9a9a}
.feedback .fb-body{color:var(--text);opacity:.9;font-size:14.5px}

/* ---------- Modal ---------- */
.modal-backdrop{
  position:fixed;inset:0;z-index:100;display:grid;place-items:center;padding:18px;
  background:rgba(3,6,12,.72);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);animation:fade .2s;
  overflow:auto;
}
.modal{
  width:min(520px,100%);background:linear-gradient(180deg,var(--surface-2),var(--surface));border:1px solid var(--line-2);
  border-radius:var(--r-lg);padding:24px;box-shadow:var(--shadow-lg);animation:pop .28s cubic-bezier(.2,1.3,.4,1);
  max-height:92vh;overflow:auto;
}
.modal.wide{width:min(760px,100%)}
.modal h2{font-size:24px;margin-bottom:10px}
.modal .actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end;margin-top:20px}
.modal .stars{font-size:44px;text-align:center;letter-spacing:6px;margin:6px 0 4px}
.modal .stars .s{display:inline-block;opacity:.18;filter:grayscale(1);transition:all .3s}
.modal .stars .s.on{opacity:1;filter:none;animation:starIn .5s cubic-bezier(.2,1.6,.4,1) both}
.modal .score-big{font-family:var(--mono);font-size:44px;text-align:center;font-weight:700}
.modal .learned{margin-top:14px;padding:12px 14px;border-radius:12px;background:var(--bg-2);border:1px dashed var(--line-2);font-size:14px;color:var(--muted)}
.modal .learned b{color:var(--text)}
.modal .learned ul{padding-left:18px;margin-top:6px;display:grid;gap:4px}

/* ---------- Toasts ---------- */
.toast-stack{position:fixed;left:50%;bottom:22px;transform:translateX(-50%);z-index:200;display:grid;gap:8px;width:min(440px,92vw);pointer-events:none}
.toast{
  pointer-events:auto;padding:11px 16px;border-radius:12px;background:var(--surface-3);border:1px solid var(--line-2);
  box-shadow:var(--shadow);font-weight:600;font-size:14.5px;animation:rise .25s ease;display:flex;gap:10px;align-items:center;
}
.toast.ok{border-color:rgba(61,220,151,.6)}
.toast.bad{border-color:rgba(255,93,93,.6)}
.toast.badge{border-color:rgba(198,255,77,.6);background:linear-gradient(90deg,rgba(198,255,77,.12),var(--surface-3))}
.toast.out{opacity:0;transform:translateY(8px);transition:all .3s}

/* ---------- Drag & drop ---------- */
.draggable{cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none}
.draggable.dragging{opacity:.3}
.drag-ghost{position:fixed;z-index:300;pointer-events:none;margin:0!important;transform:rotate(-3deg) scale(1.05);box-shadow:var(--shadow-lg);opacity:.96}
body.is-dragging{cursor:grabbing;user-select:none;-webkit-user-select:none}
.drop-zone{border:2px dashed var(--line-2);border-radius:var(--r);transition:all .15s}
.drop-zone.drop-hover,.drop-hover{border-color:var(--lime)!important;background:rgba(198,255,77,.08)!important;box-shadow:0 0 0 4px rgba(198,255,77,.12)}

/* ---------- Terminal look ---------- */
.term{
  background:#04070d;border:1px solid var(--line-2);border-radius:var(--r);font-family:var(--mono);font-size:14px;
  color:#cfe8d5;overflow:hidden;
}
.term .term-head{display:flex;gap:7px;align-items:center;padding:9px 12px;background:#0b1220;border-bottom:1px solid var(--line)}
.term .term-head i{width:11px;height:11px;border-radius:50%;background:#ff5f57}
.term .term-head i:nth-child(2){background:#febc2e}.term .term-head i:nth-child(3){background:#28c840}
.term .term-head span{margin-left:8px;color:var(--dim);font-size:12px}
.term .term-body{padding:12px 14px;overflow:auto;white-space:pre-wrap;word-break:break-word}
.term .p-user{color:var(--lime)}.term .p-path{color:var(--cyan)}.term .err{color:#ff8b8b}.term .dimt{color:#6d7b99}

/* ---------- Misc ---------- */
.badge-big{
  width:64px;height:64px;border-radius:18px;display:grid;place-items:center;font-size:30px;
  background:var(--surface-3);border:1px solid var(--line-2);
}
.badge-big.locked{filter:grayscale(1);opacity:.35}
.divider{height:1px;background:var(--line);margin:16px 0}
.tag{font-family:var(--mono);font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--dim)}
table.tbl{width:100%;border-collapse:collapse;font-size:14px}
table.tbl th,table.tbl td{padding:9px 10px;border-bottom:1px solid var(--line);text-align:left}
table.tbl th{color:var(--dim);font-size:11px;letter-spacing:.08em;text-transform:uppercase}

/* ---------- Animations ---------- */
@keyframes pop{from{transform:scale(.88);opacity:0}to{transform:scale(1);opacity:1}}
@keyframes fade{from{opacity:0}to{opacity:1}}
@keyframes rise{from{transform:translateY(10px);opacity:0}to{transform:translateY(0);opacity:1}}
@keyframes float{0%,100%{transform:translateY(0)}50%{transform:translateY(-7px)}}
@keyframes bump{0%{transform:scale(1)}40%{transform:scale(1.25);color:var(--lime)}100%{transform:scale(1)}}
@keyframes starIn{from{transform:scale(2.6) rotate(-30deg);opacity:0}to{transform:scale(1) rotate(0);opacity:1}}
@keyframes shake{0%,100%{transform:translateX(0)}20%{transform:translateX(-7px)}40%{transform:translateX(7px)}60%{transform:translateX(-5px)}80%{transform:translateX(5px)}}
@keyframes pulse{0%,100%{box-shadow:0 0 0 0 rgba(198,255,77,.45)}50%{box-shadow:0 0 0 10px rgba(198,255,77,0)}}
.shake{animation:shake .4s}
.pulse{animation:pulse 1.6s infinite}
.pop{animation:pop .3s cubic-bezier(.2,1.3,.4,1)}

@media (max-width:640px){
  .game-wrap{padding:14px 12px 70px}
  .game-bar{padding:8px 10px}
  .game-bar .gtitle{font-size:15px}
  .hud .stat{min-width:64px;padding:6px 9px}
  .hud .stat b{font-size:17px}
  .modal{padding:18px}
  .btn{padding:10px 14px}
}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}
}

/* ---- accessibility & preferences ---- */
:focus-visible{outline:3px solid var(--cyan,#4de1ff);outline-offset:2px;border-radius:6px}
.btn:focus-visible,.opt:focus-visible,.gcard:focus-visible{outline-offset:3px}
.skip{position:absolute;left:-999px;top:8px;background:var(--lime,#c6ff4d);color:#0a0f00;padding:8px 14px;border-radius:8px;z-index:200;font-weight:700}
.skip:focus{left:8px}
@media (prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
html.pref-reduce *,html.pref-reduce *::before,html.pref-reduce *::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}
html.pref-reduce .confetti,html.pref-reduce canvas.confetti{display:none!important}
html.pref-big{font-size:118%}
html.pref-big body{line-height:1.6}
html.pref-contrast{--text:#ffffff;--muted:#d9e2f7;--dim:#b8c4e4;--line:#7f8db3;--line-2:#9aa8cc}
html.pref-contrast .btn,html.pref-contrast .card,html.pref-contrast .opt{border-color:#9aa8cc!important}

/* ---- simulation chrome (windows, terminals, browsers, dialogs) ---- */
.win{background:#1b2033;border:1px solid #39426a;border-radius:10px;overflow:hidden;box-shadow:0 12px 40px rgba(0,0,0,.45);display:flex;flex-direction:column;min-width:0}
.win>.tb{display:flex;align-items:center;gap:8px;padding:7px 10px;background:linear-gradient(#2a3150,#232a45);font:600 13px var(--sans,system-ui);color:#cfd8f5;user-select:none}
.win>.tb .t{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.win>.tb .c{display:flex;gap:6px}.win>.tb .c i{width:11px;height:11px;border-radius:50%;background:#59628a;display:block}
.win>.tb .c i:nth-child(1){background:#ffbf47}.win>.tb .c i:nth-child(2){background:#3ddc97}.win>.tb .c i:nth-child(3){background:#ff5d5d}
.win>.bd{padding:0;min-height:80px;min-width:0}
.win.light>.bd{background:#f3f5fa;color:#1c2333}
.term{background:#0b0f1a;color:#d6e2ff;font:13.5px/1.5 var(--mono,ui-monospace,monospace);padding:10px 12px;height:300px;overflow:auto;cursor:text}
.term .ln{white-space:pre-wrap;word-break:break-word}.term .ln.err{color:#ff8a8a}.term .ln.ok{color:#8bf0b5}.term .ln.dim{color:#7f8cb0}.term .ln.cmd{color:#fff}
.term .pr{display:flex;gap:6px}.term .pr span{white-space:pre;color:#8bf0b5}.term .pr input{flex:1;background:transparent;border:0;outline:0;color:#fff;font:inherit;padding:0;min-width:0;caret-color:#fff}
.term.win-cmd{background:#0c0c0c;color:#cccccc}.term.win-cmd .pr span{color:#cccccc}
.brow{display:flex;align-items:center;gap:8px;padding:6px 10px;background:#2a3150}
.brow .url{flex:1;background:#12172b;border:1px solid #3a4470;border-radius:99px;padding:5px 12px;font:12.5px var(--mono,monospace);color:#9fb0e0;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sim-dialog{background:#f0f0f0;color:#111;border:1px solid #6b6b6b;border-radius:3px;font:13px "Segoe UI",system-ui,Arial,sans-serif;box-shadow:4px 6px 18px rgba(0,0,0,.45);max-width:420px}
.sim-dialog .tt{background:#fff;padding:7px 10px;border-bottom:1px solid #bbb;font-weight:600}
.sim-dialog .bdy{padding:12px}.sim-dialog label{display:flex;align-items:center;gap:8px;margin:5px 0}
.sim-dialog input[type=text]{flex:1;border:1px solid #7a7a7a;border-radius:2px;padding:3px 5px;font:13px "Segoe UI",Arial;background:#fff;color:#000;min-width:0}
.sim-dialog .ft{display:flex;justify-content:flex-end;gap:8px;padding:10px 12px;background:#e9e9e9;border-top:1px solid #ccc}
.sim-dialog .ft button{min-width:76px;padding:4px 10px;border:1px solid #7a7a7a;background:#e1e1e1;color:#000;border-radius:2px;font:13px "Segoe UI",Arial}
.sim-dialog .ft button.def{border-color:#0078d7;box-shadow:inset 0 0 0 1px #0078d7}
.ctx{position:fixed;z-index:300;background:#2b2b2b;color:#eee;border:1px solid #555;border-radius:8px;padding:4px;min-width:190px;box-shadow:0 8px 24px rgba(0,0,0,.5);font:13px system-ui}
.ctx button{display:flex;width:100%;text-align:left;gap:8px;padding:6px 10px;border-radius:5px;color:#eee;background:transparent}.ctx button:hover{background:#3d5a99}.ctx hr{border:0;border-top:1px solid #555;margin:4px 2px}

/* ==========================================================
   Elevation layer — refinement of tokens, surfaces, type, motion
   Principles: fewer borders/glows, one radius scale, calm backdrop,
   clear hierarchy (title > body > meta), generous rhythm (4/8pt).
   ========================================================== */
:root{
  --r-sm:8px; --r:12px; --r-lg:18px;
  --shadow:0 1px 0 rgba(255,255,255,.03) inset,0 1px 2px rgba(0,0,0,.4),0 8px 24px -8px rgba(0,0,0,.45);
  --shadow-lg:0 1px 0 rgba(255,255,255,.05) inset,0 30px 80px -20px rgba(0,0,0,.7);
  --surface:#111829; --surface-2:#161f35; --surface-3:#1d2842;
  --line:#222d48; --line-2:#2f3d62;
  --muted:#9aa6c4; --dim:#8794b3;
  --ease:cubic-bezier(.2,.7,.2,1);
}
body{
  font-feature-settings:"cv11","ss01";-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;
  background-image:
    radial-gradient(1000px 520px at 85% -12%, rgba(77,225,255,.075), transparent 60%),
    radial-gradient(800px 520px at -10% 0%, rgba(198,255,77,.05), transparent 60%),
    linear-gradient(rgba(255,255,255,.014) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.014) 1px, transparent 1px);
  background-size:auto,auto,48px 48px,48px 48px;
}
h1,h2,h3{text-wrap:balance} p{text-wrap:pretty}
.hud .stat b,.score-big,table.tbl td,.chip b{font-variant-numeric:tabular-nums}

/* Buttons: clearer states, consistent height, tactile press */
.btn{min-height:42px;border-radius:10px;font-weight:600;letter-spacing:-.005em;transition:transform .15s var(--ease),background .15s,border-color .15s,box-shadow .2s var(--ease),filter .15s}
.btn.sm{min-height:34px}.btn.lg{min-height:52px;border-radius:12px}
.btn:hover{transform:translateY(-1px)}
.btn:active{transform:translateY(0) scale(.985)}
.btn.primary{box-shadow:0 1px 0 rgba(255,255,255,.35) inset,0 8px 24px -8px rgba(198,255,77,.45)}
.btn.primary:hover{box-shadow:0 1px 0 rgba(255,255,255,.4) inset,0 12px 30px -8px rgba(198,255,77,.55)}

/* Surfaces: single subtle border + soft layered shadow, no heavy glow */
.card{border-radius:var(--r-lg);padding:20px;background:linear-gradient(180deg,rgba(255,255,255,.02),transparent 40%),var(--surface);box-shadow:var(--shadow)}
.panel{border-radius:var(--r)}
.chip{font-size:12px;padding:3px 10px;font-weight:600;letter-spacing:.005em}
.input,.select,.textarea{border-radius:10px;min-height:42px}
.modal{border-radius:20px}.modal h2{letter-spacing:-.02em}

/* Game chrome */
.game-bar{background:rgba(8,12,21,.88);padding:10px max(16px,env(safe-area-inset-left))}
.game-bar .gtitle{font-size:16px;letter-spacing:-.01em}
.game-wrap{padding:24px 20px 96px}
.hud{gap:8px;margin-bottom:16px}
.hud .stat{border-radius:10px;padding:6px 14px 7px;background:var(--surface);min-width:84px}
.hud .stat small{font-size:10px;letter-spacing:.1em}
.hud .stat b{font-size:19px;line-height:1.25}

/* Start screen: calmer, with focal glow behind icon */
.start{margin-top:7vh;position:relative}
.start::before{content:"";position:absolute;left:50%;top:-40px;width:520px;height:320px;transform:translateX(-50%);background:radial-gradient(closest-side,rgba(198,255,77,.10),transparent);pointer-events:none;z-index:-1}
.start .big-ico{border-radius:24px;box-shadow:0 0 0 1px var(--line-2),0 24px 60px -16px rgba(0,0,0,.7)}
.start h1{letter-spacing:-.03em;font-weight:700}
.start p.lead{font-size:17px;line-height:1.55}
.start .how{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);padding:18px 22px}
.start .how h3,.start .how b{font-size:13px;letter-spacing:.08em;text-transform:uppercase;color:var(--dim);margin-bottom:8px;display:block}
.start .how li{line-height:1.5}

/* Feedback: calmer tint, readable title */
.feedback{border-radius:var(--r);padding:14px 16px;border-width:1px}
.feedback .fb-title{font-size:15px;letter-spacing:-.005em}
.feedback .fb-body{line-height:1.55;color:var(--muted)}
.feedback .fb-body b,.feedback .fb-body code{color:var(--text)}

/* Option buttons used by quiz-like games */
.opt{border-radius:var(--r);transition:border-color .15s,background .15s,transform .15s var(--ease)}
.opt:hover:not(:disabled){background:var(--surface-2);transform:translateX(2px)}
.opt:disabled{opacity:.6}

/* Progress */
.progress{height:6px}.progress>i{background:linear-gradient(90deg,var(--cyan),var(--lime))}

/* Focus: visible but not loud */
:focus-visible{outline:2px solid var(--cyan);outline-offset:3px}

/* Tables */
table.tbl th{font-weight:600}
table.tbl tr:hover td{background:rgba(255,255,255,.02)}

/* Phone */
@media (max-width:640px){
  .game-wrap{padding:16px 14px 96px}
  .card{padding:16px;border-radius:var(--r)}
  .btn{min-height:46px}
  .start{margin-top:3vh}
  .start .big-ico{width:80px;height:80px}
  .modal{border-radius:18px 18px 0 0;align-self:end;max-height:88vh}
  .modal-backdrop{align-items:end;padding:0}
}
@media (hover:none){.btn:hover,.opt:hover:not(:disabled){transform:none}}

.card>p.muted+*{margin-top:12px}

/* kinder feedback: warm amber instead of punishing red */
.feedback.bad{border-color:rgba(255,191,71,.5);background:rgba(255,191,71,.07)}
.feedback.bad .fb-title{color:var(--amber)}
.toast.bad{border-color:rgba(255,191,71,.55)}
.chip.red{color:var(--amber);border-color:rgba(255,191,71,.35);background:rgba(255,191,71,.07)}
/* retention UI */
.goalbar{margin-top:14px;padding:12px 14px;border-radius:12px;background:var(--bg-2);border:1px solid var(--line)}
.goalbar .progress{margin-top:8px;height:8px}
.nexthint{margin-top:10px;padding:12px 14px;border-radius:12px;border:1px dashed rgba(77,225,255,.35);background:rgba(77,225,255,.05);font-size:13.5px;color:var(--muted)}
.nexthint b{color:var(--cyan);font-size:12px;letter-spacing:.08em;text-transform:uppercase}
.nexthint ul{padding-left:18px;margin-top:4px;display:grid;gap:2px}
.ring{--p:0;width:64px;height:64px;border-radius:50%;display:grid;place-items:center;background:conic-gradient(var(--lime) calc(var(--p)*1%),var(--surface-3) 0);position:relative;flex:none}
.ring::before{content:"";position:absolute;inset:7px;border-radius:50%;background:var(--surface)}
.ring b{position:relative;font:700 14px var(--mono)}

/* ---------- hints, review, share, course CTA ---------- */
.hint-fab{position:fixed;right:16px;bottom:16px;z-index:60;display:inline-flex;align-items:center;gap:2px;padding:10px 16px;min-height:44px;border-radius:999px;border:1px solid rgba(255,191,71,.5);background:rgba(255,191,71,.12);color:#ffe2a6;font-weight:600;box-shadow:0 10px 30px -8px rgba(0,0,0,.6);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
.hint-fab:hover{background:rgba(255,191,71,.2)}.hint-fab small{font-size:12px;color:var(--muted);font-weight:500}
.hint-pop{position:fixed;right:16px;bottom:72px;z-index:61;max-width:min(360px,calc(100vw - 32px));padding:14px 16px;border-radius:14px;background:var(--surface-2);border:1px solid rgba(255,191,71,.5);box-shadow:var(--shadow-lg);animation:rise .2s var(--ease)}
.hint-pop p{margin:6px 0 10px;line-height:1.5;color:var(--text)}
.rv-q{font-size:18px;font-weight:600;margin:12px 0 4px;line-height:1.4}.rv-a{margin:12px 0;padding:12px 14px;border-radius:12px;background:rgba(61,220,151,.08);border:1px solid rgba(61,220,151,.4);line-height:1.5}
.coursecta{margin-top:14px;padding:14px 16px;border-radius:14px;background:linear-gradient(135deg,rgba(77,225,255,.08),rgba(198,255,77,.06));border:1px solid rgba(77,225,255,.3);display:grid;gap:4px}
.coursecta .eyebrow{font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:var(--cyan);font-weight:700}
.coursecta b{font-size:17px}.coursecta p{font-size:13.5px;margin:0 0 6px}
.sharetext{margin-top:10px;padding:10px 12px;border-radius:10px;background:var(--bg-2);border:1px dashed var(--line-2);font-size:13px;color:var(--muted);word-break:break-word}
.modal .actions a.btn{text-decoration:none}
/* colourful icons stay readable on light "app window" surfaces */
.win.light .svgi.col svg,.office .svgi.col svg,.paper .svgi.col svg,.mail .svgi.col svg{filter:brightness(.55) saturate(1.4)}
@media (forced-colors:active){.svgi.col svg{filter:none}.hint-fab{border:2px solid ButtonText}}
@media (max-width:640px){.hint-fab{right:12px;bottom:12px}.hint-pop{right:12px;bottom:68px}}
.pq-opt{display:block;width:100%;text-align:left;padding:12px 14px;border-radius:12px;background:var(--surface);border:1px solid var(--line-2);margin-top:8px;font-size:15px}
.pq-opt:hover{border-color:var(--cyan);background:var(--surface-2)}
.pq-bar{height:6px;background:var(--surface-3);border-radius:99px;overflow:hidden}.pq-bar i{display:block;height:100%;background:linear-gradient(90deg,var(--cyan),var(--lime));transition:width .3s}
.pq-res{display:grid;gap:10px;margin-top:14px}.pq-res .r{display:grid;grid-template-columns:150px 1fr auto;gap:10px;align-items:center;font-size:14px}
@media(max-width:560px){.pq-res .r{grid-template-columns:1fr auto}.pq-res .r .pq-bar{grid-column:1/-1;order:3}}

.game-bar .gtitle h1.t{font-size:inherit;font-weight:inherit;letter-spacing:inherit;margin:0;line-height:inherit}
.start h1,.start h2.start-title{font-size:clamp(28px,5vw,44px);margin-bottom:10px;letter-spacing:-.03em;font-weight:700}
.start .how h3{font-size:13px}

.opts{display:grid;gap:8px;margin-top:8px}.opt{text-align:left;padding:12px 14px;min-height:44px;border-radius:12px;background:var(--surface);border:1px solid var(--line-2);font-size:14.5px;color:var(--text)}.opt.f{font-family:var(--mono);font-size:14px}.opt:hover:not(:disabled){border-color:var(--cyan)}.qcode{background:var(--bg-2);border:1px solid var(--line);border-radius:10px;padding:10px 12px;overflow:auto;margin:6px 0 10px;font-size:13px}

/* ---------- light theme ---------- */
html[data-theme=light]{
  color-scheme:light;
  --bg:#f4f6fb; --bg-2:#e9edf6; --surface:#ffffff; --surface-2:#f1f4fa; --surface-3:#e3e8f3;
  --line:#d2d9e8; --line-2:#b3bed6;
  --text:#141b2d; --muted:#44516f; --dim:#56637f;
  --lime:#3f6b0a; --cyan:#085f7a; --pink:#b81d56; --amber:#8f5200; --violet:#5342c9; --green:#12733a; --red:#b3261e;
  --shadow:0 1px 2px rgba(20,27,45,.08),0 8px 24px -8px rgba(20,27,45,.18);
  --shadow-lg:0 30px 80px -20px rgba(20,27,45,.35);
}
html[data-theme=light] body{background-image:radial-gradient(1000px 520px at 85% -12%,rgba(10,109,140,.07),transparent 60%),radial-gradient(800px 520px at -10% 0%,rgba(63,107,10,.05),transparent 60%)}
html[data-theme=dark]{color-scheme:dark}
.theme-btn{font-size:16px;line-height:1}
html[data-theme=light] header.top,html[data-theme=light] .game-bar{background:rgba(255,255,255,.92)}
html[data-theme=light] .filters{background:rgba(244,246,251,.92)}
html[data-theme=light] .btn.primary,html[data-theme=light] .logo i,html[data-theme=light] .filters .btn.on,html[data-theme=light] .gcard:hover .foot .btn,html[data-theme=light] .btn.cyan,html[data-theme=light] .lb-tabs .btn.on,html[data-theme=light] .skip{color:#fff}
html[data-theme=light] .btn.primary{box-shadow:0 6px 20px rgba(63,107,10,.22)}
html[data-theme=light] ::selection{color:#fff}
html[data-theme=light] .hint-fab{color:#6b3f00;background:#fff3d6;border-color:#d99a2b;box-shadow:0 10px 30px -10px rgba(20,27,45,.35)}
html[data-theme=light] .hint-fab:hover{background:#ffe9b8}
html[data-theme=light] .hint-pop{border-color:#d99a2b}
html[data-theme=light] .svgi.col svg{filter:saturate(1.15) brightness(.82)}
html[data-theme=light] .win.light .svgi.col svg,html[data-theme=light] .office .svgi.col svg,html[data-theme=light] .paper .svgi.col svg,html[data-theme=light] .mail .svgi.col svg{filter:brightness(.55) saturate(1.4)}
/* simulated dark screens (terminals, code, sheets, PC case) keep the dark palette in the light theme */
html[data-theme=light] :is(.term,.screen,.sheetwrap,.codebox,.bay,.blk .inner,.cheat){
  --text:#e9eefb; --muted:#9aa6c4; --dim:#8794b3; --line:#26324f; --line-2:#33426a;
  --lime:#c6ff4d; --cyan:#4de1ff; --pink:#ff5c93; --amber:#ffbf47; --violet:#9d8cff; --green:#3ddc97; --red:#ff5d5d;
  --surface:#121a2c; --surface-2:#18223a; --surface-3:#202c49; --bg-2:#0d1322;
  color:var(--text)}
html[data-theme=light] .btn.on,html[data-theme=light] .seg .btn.on,html[data-theme=light] .tabs .btn.on{color:#fff}
html[data-theme=light] :is(.term,.screen,.sheetwrap,.codebox,.bay) .btn.on{color:#0a0f00}
html[data-theme=light] .mail .mm b{color:#4a5672}
html[data-theme=light] :is(.obj,.story,.fb-body) code{background:rgba(20,27,45,.04)}
html[data-theme=light] .caseLabel{color:#44516f}
html[data-theme=light] .statusbar{background:#141b2d;color:#c9d4ee}
.drive .svgi.col svg,.side .svgi.col svg{filter:brightness(.55) saturate(1.4)}

/* dark-mode switch */
.theme-switch{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:0 12px;border-radius:999px;border:1px solid var(--line-2);background:var(--surface-2);color:var(--text);font:600 12.5px var(--font);cursor:pointer}
.theme-switch .ts-track{position:relative;width:42px;height:24px;border-radius:999px;background:var(--surface-3);border:1px solid var(--line-2);transition:background .2s var(--ease)}
.theme-switch .ts-knob{position:absolute;top:2px;left:2px;width:18px;height:18px;border-radius:50%;background:var(--muted);transition:transform .2s var(--ease),background .2s var(--ease)}
.theme-switch.on .ts-track{background:var(--green)}
.theme-switch.on .ts-knob{transform:translateX(18px);background:#fff}
.theme-switch .ts-state{min-width:26px;text-align:left;font-family:var(--mono);font-size:11.5px;letter-spacing:.06em}
.theme-switch:focus-visible{outline:2px solid var(--cyan);outline-offset:2px}
html.pref-reduce .theme-switch *{transition:none}
@media(max-width:480px){.theme-switch .ts-label{display:none}}
/* ---- light theme, round 2: more simulated dark surfaces, brighter inline colours ---- */
html[data-theme=light] :is(.phone,.scr,.fbar input,.chartpanel svg,.code,.inrow,.stage,.monitor,.pc-screen,.post,.rack,.statusbar,.textbox,.ev .win,.hdrbox,.progress-os){
  --text:#e9eefb; --muted:#9aa6c4; --dim:#8794b3; --line:#26324f; --line-2:#33426a;
  --lime:#c6ff4d; --cyan:#4de1ff; --pink:#ff5c93; --amber:#ffbf47; --violet:#9d8cff; --green:#3ddc97; --red:#ff5d5d;
  --surface:#121a2c; --surface-2:#18223a; --surface-3:#202c49; --bg-2:#0d1322;
  color:var(--text)}
html[data-theme=light] .svgi.col svg{filter:brightness(.62) saturate(1.5)}
html[data-theme=light] :is(.term,.screen,.sheetwrap,.codebox,.bay,.phone,.scr,.rack,.monitor,.stage,.textbox,.code,.pc-screen,.post,.inrow,.ev .win) .svgi.col svg{filter:none}
html[data-theme=light] .gcard .tag,html[data-theme=light] .cat-tag{filter:brightness(.6) saturate(1.5)}
html[data-theme=light] .badge:not(.on),html[data-theme=light] .bdg.locked{opacity:.75}

.quietlink{font-size:13px;color:var(--muted);text-decoration:underline;text-underline-offset:3px;justify-self:start;margin-top:4px}.quietlink:hover{color:var(--text,inherit)}
.cta-band{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:14px 24px;padding:20px 22px;border-radius:var(--r);background:linear-gradient(135deg,rgba(77,225,255,.08),rgba(198,255,77,.06));border:1px solid var(--line-2)}.cta-band h2{font-size:clamp(18px,2.4vw,22px);margin:0 0 4px}.cta-band p{margin:0;color:var(--muted);font-size:14.5px;max-width:58ch}.cta-band .row{gap:10px;flex-wrap:wrap}
@media(max-width:520px){.game-bar{flex-wrap:wrap;row-gap:6px}.game-bar .gtitle{min-width:0;flex:1 1 100%;order:3}.game-bar .t{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}
html,body{overflow-x:clip}
/* Layout-shift guards: reserve space for content that scripts fill in (keeps CLS low) */
#ita-bar{min-height:57px}@media(max-width:640px){#ita-bar{min-height:53px}}
main#game{min-height:100vh}
#grid:empty{min-height:1500px}
#me:empty{min-height:200px}

/* ==========================================================
   Elevation 2 — QoL pass
   1  Game bar: one compact row on phones (was 3 rows, ~18% of the screen)
   2  HUD: equal-width grid on phones instead of wrapping pills
   3  Modals: body scrolls, action buttons stay pinned and visible
   4  Toasts never sit on top of the buttons they would hide
   5  Hint button: smaller, safe-area aware
   Tokens follow the Tailwind scale: 4/8/12/16 spacing, rounded-lg/xl,
   duration-150/200, ease-out.
   ========================================================== */
.game-bar{gap:8px;min-height:57px}
.game-bar .back{white-space:nowrap;flex:none}
.game-bar .gtitle{flex:0 1 auto;min-width:0}
.game-bar .xp-full{white-space:nowrap}
.kbd-hint{margin-top:12px;font-size:13px}

/* compact theme toggle (sun / moon) */
.theme-icon{min-width:44px;color:var(--muted)}
.theme-icon:hover{color:var(--text)}
.theme-icon svg{display:block}

@media(max-width:640px){
  .game-bar{flex-wrap:nowrap;row-gap:0;padding:6px 10px;min-height:53px;gap:6px}
  .game-bar .gtitle{order:0;flex:1 1 0;font-size:15px;gap:8px}
  .game-bar .gtitle span.ico{font-size:20px}
  .game-bar .spacer{display:none}
  .game-bar .hide-sm,.game-bar .xp-full,.game-bar .chip.amber{display:none}
  .game-bar .back{padding:6px 8px}
  .game-bar .btn.sm{min-height:44px}

  .hud{display:grid;grid-template-columns:repeat(auto-fit,minmax(72px,1fr));gap:6px;margin-bottom:12px}
  .hud .stat{min-width:0;padding:5px 8px;overflow:hidden}
  .hud .stat small{font-size:9.5px;letter-spacing:.07em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .hud .stat b{font-size:15px;letter-spacing:-.03em;white-space:nowrap;overflow:hidden;text-overflow:clip}

  .toast-stack{bottom:72px}
  .hint-fab{padding:8px 13px;min-height:42px;font-size:14px}
}
@media(max-width:420px){ .game-bar .back .back-t{display:none} }

/* Modals: header + body scroll + pinned footer */
.modal{display:flex;flex-direction:column;overflow:hidden;max-height:min(92vh,92dvh)}
.modal>h2{flex:none}
.modal .modal-body{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;margin:0 -8px;padding:2px 8px}
.modal .actions{flex:none;margin-top:14px;padding-top:14px;border-top:1px solid var(--line)}
@media(max-width:640px){
  .modal{max-height:min(90vh,90dvh)}
  .modal .actions{display:flex;flex-wrap:wrap;justify-content:stretch;gap:8px;padding-bottom:max(0px,env(safe-area-inset-bottom))}
  .modal .actions .btn{flex:1 1 0;min-width:0;padding:8px 10px;font-size:14px;white-space:normal;text-align:center}
  .modal .actions .btn.primary{order:-1;flex:1 1 100%;min-height:48px}
}

/* toasts jump to the top while a dialog is open, so they never cover its buttons */
body:has(.modal-backdrop) .toast-stack{bottom:auto;top:12px}

/* hint button */
.hint-fab{min-height:40px;padding:8px 14px;bottom:max(16px,env(safe-area-inset-bottom));right:max(16px,env(safe-area-inset-right))}
.hint-pop{bottom:max(68px,calc(env(safe-area-inset-bottom) + 56px))}

/* tidy long text in feedback and cards */
.feedback .fb-body{overflow-wrap:anywhere}
@media(max-width:640px){ .feedback{padding:12px 14px;gap:10px} }

/* motion: no perpetual pulse when the person asked for calm */
html.pref-reduce .pulse{animation:none}

/* ==========================================================
   Elevation 3 — touch + comfort pass
   - bar buttons never shrink below a comfortable tap size
   - coarse pointers (phones, tablets) get 44px targets
   - the hint button becomes a small round badge on phones so it
     stops covering game content
   ========================================================== */
.game-bar .btn,.game-bar .chip,.game-bar .back{flex:none}
.game-bar .back{display:inline-flex;align-items:center;min-height:44px;padding:0 10px;margin-left:-6px}
.hf-b{display:none;font-style:normal}

@media(pointer:coarse){
  .btn{min-width:44px}
  .btn.sm{min-height:44px}
  .btn.icon{min-width:44px;min-height:44px}
  summary{padding-block:10px}
  .tag,.cat-tag{font-size:12px}
}

@media(max-width:640px){
  .game-bar .back{min-width:44px;justify-content:center;margin-left:-4px}
  .game-bar .btn.sm.icon{min-width:44px}

  .hint-fab{position:fixed;width:54px;height:54px;min-height:0;padding:0;border-radius:50%;display:grid;place-items:center;
    background:color-mix(in srgb,#ffbf47 16%,var(--surface-2));box-shadow:0 8px 24px rgba(0,0,0,.5)}
  .hint-fab .hf-t,.hint-fab .hf-n{display:none}
  .hint-fab>span{font-size:22px;line-height:1}
  .hint-fab .hf-b{display:grid;place-items:center;position:absolute;top:-5px;right:-5px;min-width:22px;height:22px;padding:0 5px;border-radius:11px;
    background:var(--accent);color:#0a0f00;font:700 11px var(--mono);box-shadow:0 0 0 2px var(--bg)}
  .hint-fab.paid .hf-b{background:var(--amber,#ffbf47)}
}

/* placement + exam header link: comfortable tap area */
div.top>a{display:inline-flex;align-items:center;min-height:44px;padding-right:8px}

/* hide calls to action until config gives them a real link */
#hCourses[href="#"],#ctaCourses[href="#"],#ctaSite[href="#"]{display:none}

/* very narrow phones: keep the game title readable next to the theme switch */
@media(max-width:400px){.game-bar .chip{display:none}}

/* Merge pass: on phones the game title wraps to two lines instead of being cut with an ellipsis */
@media(max-width:640px){
  .game-bar .gtitle .t{white-space:normal;text-overflow:clip;overflow:hidden;line-height:1.15;font-size:14.5px;
    display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
}
@media(max-width:380px){
  .game-bar{gap:2px;padding-left:6px;padding-right:6px}
  .game-bar .gtitle{gap:6px}
  .game-bar .gtitle span.ico{font-size:18px}
  .game-bar .gtitle .t{font-size:13.5px}
}
/* touch screens: list links in the About / Quick answers block get a comfortable tap height */
@media(pointer:coarse){.seo li a{display:inline-block;padding:5px 0}}

/* small footer on game pages: Privacy / Terms must be reachable from everywhere */
footer.legal{display:flex;flex-wrap:wrap;justify-content:center;gap:6px 18px;padding:28px 16px 44px;font-size:14px}
footer.legal a{color:var(--muted);text-decoration:none;padding:10px 4px}
footer.legal a:hover{color:var(--text);text-decoration:underline}

/* light theme: the category colours are bright neon tints (green, amber, cyan, pink, purple) that fail contrast on white (1.4 to 2.9:1).
   Darken only the label text; dark theme is unchanged and already passes. */
html[data-theme=light] .tag,html[data-theme=light] .lv{filter:brightness(.5) saturate(1.15)}

/* gameplay screenshot on each game page */
figure.shot{margin:18px 0 22px;max-width:760px}
figure.shot img{display:block;width:100%;height:auto;border-radius:12px;border:1px solid var(--line);background:var(--surface-2)}
figure.shot figcaption{margin-top:8px;font-size:13px;color:var(--muted)}

/* ---------- share / feedback button (bottom right, one quiet round button) ---------- */
.fb-dock{position:fixed;right:16px;bottom:calc(16px + env(safe-area-inset-bottom,0px));z-index:55;display:flex;flex-direction:column;align-items:flex-end;gap:10px;pointer-events:none}
.fb-dock>*{pointer-events:auto}
.fb-fab{width:44px;height:44px;min-height:0;padding:0;border-radius:50%;display:grid;place-items:center;border:1px solid var(--line-2);background:var(--surface-2);color:var(--text);box-shadow:0 8px 24px -8px rgba(0,0,0,.55);cursor:pointer;opacity:1;transition:opacity .15s,color .15s,background .15s,border-color .15s}
.fb-fab:hover,.fb-fab:focus-visible,.fb-fab[aria-expanded=true]{background:var(--surface-3);border-color:var(--muted)}
.fb-fab svg{display:block}
.fb-card{width:min(328px,calc(100vw - 32px));padding:8px;border-radius:16px;background:var(--surface-2);border:1px solid var(--line-2);box-shadow:var(--shadow-lg);display:grid;gap:2px;animation:rise .18s var(--ease)}
.fb-card[hidden]{display:none}
.fb-dock.is-open{z-index:70}   /* while open, sit above the Hint button and its popover */
.fb-item{display:flex;align-items:center;gap:12px;width:100%;min-height:56px;padding:10px 12px;border:0;border-radius:11px;background:transparent;color:var(--text);font:inherit;text-align:left;text-decoration:none;cursor:pointer}
.fb-item:hover{background:var(--surface-3)}
.fb-ic{flex:none;width:36px;height:36px;border-radius:10px;display:grid;place-items:center;background:var(--bg-2);color:var(--cyan)}
.fb-tx{display:grid;gap:1px;min-width:0}
.fb-tx b{font-size:15px;font-weight:700;color:var(--text)}
.fb-tx small{font-size:13px;color:color-mix(in srgb,var(--text) 82%,var(--surface-2));line-height:1.35}
/* games already have a Hint button in this corner: stack it above the share button instead of overlapping it */
body.has-fbdock .hint-fab{bottom:calc(70px + env(safe-area-inset-bottom,0px))}
body.has-fbdock .hint-pop{bottom:calc(126px + env(safe-area-inset-bottom,0px))}
@media print{.fb-dock{display:none!important}}
/* keep the last line of every footer clear of the button when you scroll to the very bottom */
body.has-fbdock footer{margin-bottom:calc(72px + env(safe-area-inset-bottom,0px))}
body.has-fbdock footer.legal{margin-bottom:0;padding-bottom:calc(64px + env(safe-area-inset-bottom,0px))}
body.has-fbdock .seo{padding-bottom:calc(76px + env(safe-area-inset-bottom,0px))}
/* the home page's "Back to top" button lives in the same corner: lift it above the share button */
body.has-fbdock .totop{bottom:calc(70px + env(safe-area-inset-bottom,0px))}
/* WhatsApp logo in its own green (a darker green on the light theme so it stays clearly visible) */
a.fb-item .fb-ic{color:#25d366}
html[data-theme=light] a.fb-item .fb-ic{color:#128c7e}

/* one-time friendly bubble to the left of the button (left, not above, so it never covers the Hint button) */
.fb-tip{position:absolute;right:calc(100% + 12px);bottom:0;width:max-content;max-width:min(300px,calc(100vw - 88px));padding:8px 34px 8px 12px;border-radius:12px;background:var(--surface-2);border:1px solid var(--line-2);color:var(--text);font-size:13px;font-weight:500;line-height:1.35;box-shadow:var(--shadow-lg);cursor:pointer;animation:rise .22s var(--ease)}
.fb-tip[hidden]{display:none}
.fb-tip::after{content:"";position:absolute;right:-6px;bottom:15px;width:10px;height:10px;background:var(--surface-2);border-right:1px solid var(--line-2);border-top:1px solid var(--line-2);transform:rotate(45deg)}
.fb-tip-x{position:absolute;top:0;right:0;width:32px;height:32px;min-height:0;padding:0;display:grid;place-items:center;border:0;border-radius:50%;background:transparent;color:var(--muted);cursor:pointer}
.fb-tip-x:hover{color:var(--text)}
.fb-tip-x .fb-ic{width:auto;height:auto;background:none;color:inherit;border-radius:0;display:grid;place-items:center}
.fb-tip-x svg{width:14px;height:14px}
@media print{.fb-tip{display:none!important}}
