/*
 * Typeface.
 *
 * San Francisco is Apple's system font and cannot be redistributed by a website
 * — its licence restricts it to Apple platforms — so it is requested, never
 * shipped: -apple-system / BlinkMacSystemFont resolve to the real SF on macOS
 * and iOS. Everywhere else falls to Inter, self-hosted below, which was drawn as
 * an SF-like UI typeface and keeps the look consistent off Apple hardware.
 *
 * Both subsets are shipped on purpose: Turkish needs latin-ext for ğ, ş and İ,
 * while ı, ç, ö and ü live in latin. Dropping either would leave the Turkish
 * interface falling back mid-word.
 */
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('../fonts/inter-latin-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('../fonts/inter-latin-ext-wght-normal.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
    U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* FrenchQuest — bold, rounded, high-contrast UI with Duolingo-style motion. */

:root {
  --green: #58cc02;
  --green-dark: #4aa802;
  --green-soft: #e8f8dc;
  --blue: #1cb0f6;
  --blue-dark: #1899d6;
  --blue-soft: #ddf4ff;
  --red: #ff4b4b;
  --red-dark: #e03e3e;
  --red-soft: #ffe0e0;
  --gold: #ffc800;
  --gold-dark: #e0ac00;
  --purple: #ce82ff;
  --ink: #2b2d33;
  --muted: #777d8a;
  --bg: #f7f8fa;
  --card: #ffffff;
  --line: #e4e7ec;
  --line-strong: #cfd4dc;
  --locked: #e9ecf1;
  --radius: 18px;
  --shadow: 0 2px 0 var(--line-strong);
  --ease-pop: cubic-bezier(.34, 1.56, .64, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --green-soft: #1d3312;
    --blue-soft: #0f2d3d;
    --red-soft: #3a1717;
    --ink: #eef1f5;
    --muted: #9aa2b1;
    --bg: #15171c;
    --card: #1d2026;
    --line: #2c313a;
    --line-strong: #3a414d;
    --locked: #262b33;
  }
}
:root[data-theme="dark"] {
  --green-soft: #1d3312; --blue-soft: #0f2d3d; --red-soft: #3a1717;
  --ink: #eef1f5; --muted: #9aa2b1; --bg: #15171c; --card: #1d2026;
  --line: #2c313a; --line-strong: #3a414d; --locked: #262b33;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  /* Real San Francisco first on Apple hardware; Inter for everyone else. */
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter Variable",
    system-ui, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  /* SF and Inter both read better with optical sizing and real kerning. */
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -0.01em; }
p { margin: 0; }

#fx { position: fixed; inset: 0; pointer-events: none; z-index: 60; }
.app { min-height: 100%; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 14px; padding: 13px 20px;
  font-weight: 800; font-size: 15px; letter-spacing: .02em; text-transform: uppercase;
  cursor: pointer; background: var(--locked); color: var(--muted);
  transition: transform .08s ease, filter .15s ease, box-shadow .08s ease;
  box-shadow: 0 4px 0 var(--line-strong);
}
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--line-strong); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--green); color: #fff; box-shadow: 0 4px 0 var(--green-dark); }
.btn-primary:active:not(:disabled) { box-shadow: 0 1px 0 var(--green-dark); }
.btn-blue { background: var(--blue); color: #fff; box-shadow: 0 4px 0 var(--blue-dark); }
.btn-blue:active:not(:disabled) { box-shadow: 0 1px 0 var(--blue-dark); }
.btn-danger { background: var(--red); color: #fff; box-shadow: 0 4px 0 var(--red-dark); }
.btn-gold { background: var(--gold); color: #4a3a00; box-shadow: 0 4px 0 var(--gold-dark); }
.btn-ghost { background: transparent; box-shadow: none; color: var(--muted); border: 2px solid var(--line); }
.btn-ghost:active { transform: translateY(2px); }
.btn-sm { padding: 9px 14px; font-size: 13px; border-radius: 12px; box-shadow: 0 3px 0 var(--line-strong); }
.btn-wide { width: 100%; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ------------------------------------------------------- language switch */
.langpick {
  display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px;
  background: var(--locked); flex: none;
}
.langbtn {
  border: none; background: transparent; color: var(--muted); cursor: pointer;
  font-weight: 800; font-size: 12px; letter-spacing: .06em; padding: 5px 10px; border-radius: 999px;
  transition: background .18s ease, color .18s ease, transform .12s var(--ease-pop);
}
.langbtn:hover { color: var(--ink); }
.langbtn.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .14); }
.langbtn:active { transform: scale(.94); }
.page-top { display: flex; justify-content: flex-start; padding-bottom: 4px; }

/* ------------------------------------------------------------------ cards */
.card {
  background: var(--card); border: 2px solid var(--line); border-radius: var(--radius);
  padding: 20px;
}
.card + .card { margin-top: 16px; }
.card-title { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 10px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.stack { display: grid; gap: 14px; }
.row { display: flex; align-items: center; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }

/* ------------------------------------------------------------------ chrome */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 12px 20px; background: color-mix(in srgb, var(--card) 88%, transparent);
  backdrop-filter: blur(10px); border-bottom: 2px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 900; font-size: 18px; letter-spacing: -.02em; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(145deg, var(--green), #8ee000); color: #fff; font-size: 16px;
}
.stat { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 15px; }
.stat-ico { font-size: 18px; line-height: 1; }
.stat-gold { color: var(--gold-dark); }
.stat-red { color: var(--red); }
.stat-blue { color: var(--blue-dark); }
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px;
  background: var(--blue-soft); color: var(--blue-dark); font-weight: 800; font-size: 13px;
}
.pill-green { background: var(--green-soft); color: var(--green-dark); }
.pill-red { background: var(--red-soft); color: var(--red-dark); }
.pill-gold { background: #fff4cc; color: #8a6b00; }
.pill-grey { background: var(--locked); color: var(--muted); }

.page { max-width: 820px; margin: 0 auto; padding: 22px 18px 90px; }

/* ------------------------------------------------------------- unit header */
.unit-head { display: flex; gap: 18px; align-items: center; }
.ring { position: relative; width: 74px; height: 74px; flex: none; }
.ring svg { transform: rotate(-90deg); display: block; }
.ring .track { stroke: var(--line); }
.ring .fill { stroke: var(--green); stroke-linecap: round; transition: stroke-dashoffset .9s var(--ease-pop); }
.ring-label { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 900; font-size: 15px; }
.cycle-dots { display: flex; gap: 6px; }
.cycle-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--locked); transition: background .3s, transform .3s var(--ease-pop); }
.cycle-dot.on { background: var(--gold); transform: scale(1.12); }

/* --------------------------------------------------------------- the path */
.path { display: grid; gap: 4px; margin: 6px 0 4px; }
.path-row { display: flex; align-items: center; gap: 14px; min-height: 76px; }
.node-wrap { position: relative; display: grid; place-items: center; perspective: 900px; }
/*
 * A puck, not a disc: the face is an ellipse of about 1.55:1 — matching the
 * reference — and the solid offset shadow below it reads as the side wall,
 * so the whole thing looks like a counter lying on the path.
 */
.node {
  position: relative; flex: none;
  width: 66px; height: 42px; border-radius: 50%; border: none; cursor: pointer;
  display: grid; place-items: center; font-weight: 900; font-size: 19px; color: #fff;
  background: var(--locked); color: var(--muted);
  box-shadow: 0 10px 0 var(--line-strong);
  transition: transform .12s ease, box-shadow .12s ease;
}

/*
 * The gloss, measured off the reference: a flat face with a broad soft light
 * spreading out from the star — near-white at the star's edge, back to the base
 * colour around three quarters of the way to the rim. It is painted as a
 * gradient layer on the node rather than a filter on the star, so the circle's
 * own border-radius clips it instead of letting it bleed onto the page.
 */
.node::before {
  content: '';
  position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: radial-gradient(ellipse 62% 74% at 50% 46%,
    rgba(255, 255, 255, .44) 24%,
    rgba(255, 255, 255, .31) 50%,
    rgba(255, 255, 255, .10) 68%,
    rgba(255, 255, 255, 0) 80%);
}
.node > svg {
  position: relative; display: block;
  filter: drop-shadow(0 0 3px rgba(255, 255, 255, .5));
}
.node:active:not(:disabled) { transform: translateY(6px); box-shadow: 0 4px 0 var(--line-strong); }
.node:disabled { cursor: not-allowed; }
.node.done { background: var(--green); color: #fff; box-shadow: 0 10px 0 var(--green-dark); }
/* The lesson you are on. Green like the finished ones — a star marks those and a
   number marks this one, so the two never read as the same thing. */
.node.current { background: var(--green); color: #fff; box-shadow: 0 10px 0 var(--green-dark); }
.node.exam { background: var(--gold); color: #4a3a00; box-shadow: 0 11px 0 var(--gold-dark); width: 74px; height: 48px; }
.node.exam:disabled { background: var(--locked); color: var(--muted); box-shadow: 0 11px 0 var(--line-strong); }
.node.current::after {
  content: ''; position: absolute; inset: -9px; border-radius: 50%;
  border: 3px solid var(--green); opacity: .45; animation: halo 1.9s ease-out infinite;
}
.node-hw {
  position: absolute; top: -4px; right: -6px; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; font-size: 13px; background: var(--card);
  border: 2px solid var(--line); box-shadow: 0 1px 2px rgba(0,0,0,.12);
  padding: 0; font-family: inherit; cursor: pointer;
  transition: transform .14s var(--ease-pop);
}
.node-hw:hover { transform: scale(1.18); }
.node-hw:active { transform: scale(.94); }
.node-hw.due { border-color: var(--gold); background: #fff8df; animation: nudge 1.6s ease-in-out infinite; }
.node-hw.ok { border-color: var(--green); background: var(--green-soft); }
.node-hw.bad { border-color: var(--red); background: var(--red-soft); }
.node-meta { font-weight: 700; }
.node-meta .sub { font-size: 13px; color: var(--muted); font-weight: 600; }

/* ------------------------------------------------------------- level grid */
.level-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.level-card {
  text-align: left; cursor: pointer; background: var(--card); border: 3px solid var(--line);
  border-radius: 16px; padding: 14px; transition: border-color .15s, transform .15s var(--ease-pop);
}
.level-card:hover { transform: translateY(-3px); }
.level-card.sel { border-color: var(--green); background: var(--green-soft); }
.level-code { font-size: 22px; font-weight: 900; }

/* --------------------------------------------------------------- exercises */
.player { max-width: 720px; margin: 0 auto; padding: 16px 18px 120px; }
.player-top { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.bar { flex: 1; height: 16px; border-radius: 999px; background: var(--locked); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 999px; background: var(--green);
  transition: width .45s var(--ease-pop); position: relative; }
.bar > span::after { content:''; position:absolute; inset:3px 6px auto 6px; height:4px; border-radius:999px; background:rgba(255,255,255,.35); }
.hearts { display: flex; gap: 3px; font-size: 18px; }
.heart-lost { filter: grayscale(1); opacity: .35; transform: scale(.85); transition: all .3s; }
.ex-instruction { font-size: 22px; font-weight: 900; margin-bottom: 18px; }
.ex-prompt { font-size: 26px; font-weight: 800; margin: 10px 0 20px; }
.ex-prompt-sm { font-size: 19px; font-weight: 700; margin: 10px 0 18px; }
.choices { display: grid; gap: 10px; }
.choice {
  text-align: left; background: var(--card); border: 2px solid var(--line); border-bottom-width: 4px;
  border-radius: 14px; padding: 15px 16px; cursor: pointer; font-weight: 700;
  transition: transform .1s, border-color .15s, background .15s;
}
.choice:hover { border-color: var(--line-strong); }
.choice.sel { border-color: var(--blue); background: var(--blue-soft); color: var(--blue-dark); }
.choice.right { border-color: var(--green); background: var(--green-soft); color: var(--green-dark); }
.choice.wrong { border-color: var(--red); background: var(--red-soft); color: var(--red-dark); }
.inp {
  width: 100%; padding: 14px 16px; border-radius: 14px; border: 2px solid var(--line);
  background: var(--card); font-size: 17px; font-weight: 600;
}
.inp:focus { outline: none; border-color: var(--blue); }
textarea.inp { min-height: 140px; resize: vertical; line-height: 1.6; }
.tokens { display: flex; flex-wrap: wrap; gap: 8px; min-height: 56px; padding: 10px;
  border-bottom: 2px dashed var(--line); margin-bottom: 16px; }
.token {
  background: var(--card); border: 2px solid var(--line); border-bottom-width: 4px; border-radius: 12px;
  padding: 8px 13px; font-weight: 700; cursor: pointer; transition: transform .12s var(--ease-pop), opacity .12s;
}
.token:hover { transform: translateY(-2px); }
.token.used { opacity: .25; pointer-events: none; }
.speak {
  width: 92px; height: 92px; border-radius: 22px; border: none; cursor: pointer; font-size: 34px;
  background: var(--blue); color: #fff; box-shadow: 0 5px 0 var(--blue-dark); display: grid; place-items: center;
}
.speak:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--blue-dark); }
.speak.playing { animation: pulse .7s ease-in-out infinite; }
.match-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.footbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  border-top: 2px solid var(--line); background: var(--card);
  padding: 14px 18px calc(14px + env(safe-area-inset-bottom));
}
.footbar-inner { max-width: 720px; margin: 0 auto; display: flex; align-items: center; gap: 14px; }
.verdict { flex: 1; font-weight: 800; }
.verdict .expected { font-weight: 700; color: var(--muted); font-size: 14px; display: block; }
.footbar.ok { background: var(--green-soft); border-color: var(--green); }
.footbar.ko { background: var(--red-soft); border-color: var(--red); }
.footbar.ok .verdict { color: var(--green-dark); }
.footbar.ko .verdict { color: var(--red-dark); }

/* ------------------------------------------------------------------ exam */
.q-card { border-top: 2px solid var(--line); padding: 18px 0; }
.q-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.q-num { width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--blue); color: #fff;
  display: grid; place-items: center; font-size: 13px; font-weight: 800; }
.q-pts { margin-left: auto; font-size: 12px; font-weight: 800; color: var(--muted); white-space: nowrap; }
.diff { display: inline-flex; gap: 2px; }
.diff i { width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); display: block; }
.diff i.on { background: var(--gold); }
.score-big { font-size: 56px; font-weight: 900; line-height: 1; }

/* ------------------------------------------------------------- drop zone */
.drop {
  border: 3px dashed var(--line-strong); border-radius: 18px; padding: 26px; text-align: center;
  transition: background .2s, border-color .2s, transform .2s var(--ease-pop); cursor: pointer;
}
.drop.hot { border-color: var(--blue); background: var(--blue-soft); transform: scale(1.015); }
.drop-ico { font-size: 34px; }
.scan-log { display: grid; gap: 6px; margin-top: 12px; font-size: 14px; }
.scan-step { display: flex; gap: 8px; align-items: center; opacity: 0; transform: translateY(6px);
  animation: riseIn .4s var(--ease-pop) forwards; }
.hw-task { border-top: 2px solid var(--line); padding: 14px 0; }
.ok-ico { color: var(--green-dark); font-weight: 900; }
.ko-ico { color: var(--red-dark); font-weight: 900; }

/* ----------------------------------------------------------------- chests */
.chest-stage {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center;
  background: var(--chest-bg, #16202b);
  transition: background .6s ease;
  cursor: pointer; user-select: none; -webkit-user-select: none;
  --glow: #99a3b2; --chest-bg: #16202b;
}

/* Four-point sparkles scattered round the chest, as in the reference art. */
.chest-sparkles { position: absolute; inset: 0; pointer-events: none; }
.chest-spark {
  position: absolute; width: 16px; height: 16px; opacity: 0;
  background: var(--glow);
  clip-path: polygon(50% 0%, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0% 50%, 39% 39%);
  transition: opacity .5s ease;
}
.chest-stage.revealed .chest-spark { opacity: .85; animation: sparkTwinkle 2.2s ease-in-out infinite; }
.chest-spark:nth-child(2n) { width: 11px; height: 11px; animation-delay: .5s; }
.chest-spark:nth-child(3n) { width: 20px; height: 20px; animation-delay: 1.1s; }
@keyframes sparkTwinkle {
  0%, 100% { transform: scale(1); opacity: .85; }
  50% { transform: scale(.72); opacity: .45; }
}
.chest-inner { position: relative; display: grid; justify-items: center; gap: 4px; padding: 20px; text-align: center; }

/* Light behind the chest, which only comes up once the rarity is known. */
.chest-rays {
  position: absolute; top: 40px; width: 460px; height: 460px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--glow) 55%, transparent) 0%,
    color-mix(in srgb, var(--glow) 12%, transparent) 42%, transparent 68%);
  opacity: 0; transform: scale(.5); transition: opacity .5s ease, transform .6s var(--ease-pop);
  pointer-events: none;
}
.chest-stage.revealed .chest-rays { opacity: .85; transform: scale(1); }
.chest-stage.opened .chest-rays { opacity: 1; transform: scale(1.25); }

.chest-holder { position: relative; }
.chest-art { display: block; filter: drop-shadow(0 10px 16px rgba(0, 0, 0, .28)); }
.chest-stage.revealed .chest-art { filter: drop-shadow(0 0 26px color-mix(in srgb, var(--glow) 70%, transparent)); }

/* The lid lifts straight up off the chest — no tilt. */
.chest-lid { transition: transform .55s var(--ease-pop); }
.chest-stage.opened .chest-lid { transform: translateY(-42px); }

/* Light out of the open chest, held back until the lid moves. */
.chest-light {
  opacity: 0; transform: scale(.55); transform-origin: 100px 96px;
  transition: opacity .45s ease .08s, transform .6s var(--ease-pop) .08s;
  filter: blur(2px);
}
.chest-stage.opened .chest-light { opacity: .92; transform: scale(1); }
.chest-stage.opened .chest-art { animation: chestPop .6s var(--ease-pop); }

@keyframes chestPop {
  0% { transform: scale(1); }
  35% { transform: scale(1.14) translateY(-10px); }
  100% { transform: scale(1); }
}

/* Every tap jolts it a little harder than a plain wobble. */
.shake-hard { animation: chestShake .42s cubic-bezier(.36, .07, .19, .97); }
@keyframes chestShake {
  10%, 90% { transform: translateX(-4px) rotate(-2deg); }
  20%, 80% { transform: translateX(6px) rotate(2.5deg); }
  30%, 50%, 70% { transform: translateX(-9px) rotate(-3.5deg); }
  40%, 60% { transform: translateX(9px) rotate(3.5deg); }
}

.chest-title {
  color: #fff; font-size: 26px; margin-top: 18px;
  text-transform: uppercase; letter-spacing: .12em; font-weight: 900;
}
.chest-stage.revealed .chest-title { color: var(--title, #fff); }
.chest-stage.rarity-mega .chest-title { font-size: 32px; letter-spacing: .04em; }
.chest-sub { color: rgba(255, 255, 255, .72); font-size: 15px; font-weight: 600; min-height: 22px; }

.chest-dots { display: flex; gap: 10px; margin-top: 16px; }
.chest-dot {
  width: 11px; height: 11px; border-radius: 50%; background: rgba(255, 255, 255, .22);
  transition: background .2s ease, transform .2s var(--ease-pop);
}
.chest-dot.on { background: var(--glow); transform: scale(1.3); }

.chest-foot { margin-top: 18px; min-width: 260px; }
.chest-reward { display: flex; align-items: center; justify-content: center; gap: 10px; }
.chest-gem-ico { font-size: 34px; }
.chest-gems { font-size: 44px; font-weight: 900; color: #fff; }

/* The chest waiting on the dashboard. */
.chest-card { border-color: var(--gold) !important; background: color-mix(in srgb, var(--gold) 9%, var(--card)); }
.chest-card .chest-mini { flex: none; display: grid; animation: nudge 1.8s ease-in-out infinite; }

/* --------------------------------------------------------------- overlays */
/* The class sets display:grid, which would beat [hidden] from the UA sheet and
   leave an invisible layer swallowing every click — so hide it explicitly. */
.overlay[hidden] { display: none; }
.overlay {
  position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 20px;
  background: rgba(16, 18, 22, .55); backdrop-filter: blur(3px);
  animation: fadeIn .22s ease both;
}
.sheet {
  background: var(--card); border-radius: 24px; padding: 28px; max-width: 460px; width: 100%;
  text-align: center; animation: popIn .45s var(--ease-pop) both; position: relative; overflow: hidden;
}
.sheet-wide { max-width: 640px; text-align: left; }
.sheet h2 { font-size: 26px; margin-bottom: 8px; }
.sheet-emoji { font-size: 60px; display: block; animation: bounceIn .6s var(--ease-pop) both; }
.burst { position: absolute; inset: -40%; background: conic-gradient(from 0deg, transparent 0 8deg, color-mix(in srgb, var(--gold) 45%, transparent) 8deg 16deg, transparent 16deg 32deg);
  animation: spin 9s linear infinite; opacity: .35; pointer-events: none; }
.levelbadge {
  width: 110px; height: 110px; margin: 6px auto 12px; border-radius: 28px; display: grid; place-items: center;
  font-size: 34px; font-weight: 900; color: #fff;
  background: linear-gradient(145deg, var(--purple), var(--blue));
  box-shadow: 0 10px 30px color-mix(in srgb, var(--blue) 40%, transparent);
  animation: badgeIn .7s var(--ease-pop) both;
}
.xp-count { font-size: 40px; font-weight: 900; color: var(--gold-dark); }
.flame { display: inline-block; animation: flicker 1.5s ease-in-out infinite; }

/* Top-right, not centred: a centred toast sat on top of the card it announces. */
.toasts { position: fixed; top: 72px; right: 16px; z-index: 80;
  display: grid; gap: 8px; width: min(360px, calc(100% - 32px)); justify-items: stretch; }
@media (max-width: 560px) { .toasts { left: 16px; right: 16px; width: auto; } }
.toast {
  background: var(--card); border: 2px solid var(--line); border-left-width: 6px; border-radius: 14px;
  padding: 12px 14px; font-weight: 700; box-shadow: 0 8px 24px rgba(0,0,0,.14);
  animation: dropIn .35s var(--ease-pop) both;
}
.toast.good { border-left-color: var(--green); }
.toast.bad { border-left-color: var(--red); }
.toast.info { border-left-color: var(--blue); }
.toast.out { animation: dropOut .3s ease forwards; }

/* --------------------------------------------------------------- feed */
.feed { display: grid; gap: 8px; }
.feed-item { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; padding: 8px 0; border-top: 1px solid var(--line); }
.feed-item:first-child { border-top: none; }
.feed-ico { font-size: 16px; }
.feed-day { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }

/* The card a lesson badge just jumped to, so the eye lands on it. */
@keyframes cardFlash {
  0%, 100% { box-shadow: 0 0 0 0 transparent; }
  25%, 75% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--gold) 55%, transparent); }
}
.card.flash { animation: cardFlash 1.5s ease-in-out 2; }

/* ----------------------------------------------------------- transitions */
.screen { animation: screenIn .3s ease both; }
.pop-in { animation: popIn .4s var(--ease-pop) both; }
.rise { animation: riseIn .45s var(--ease-pop) both; }
.rise-2 { animation: riseIn .45s .06s var(--ease-pop) both; }
.rise-3 { animation: riseIn .45s .12s var(--ease-pop) both; }
.shake { animation: shake .4s ease; }
.bump { animation: bump .5s var(--ease-pop); }

@keyframes screenIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { 0% { opacity: 0; transform: scale(.88) translateY(14px); } 100% { opacity: 1; transform: none; } }
@keyframes riseIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes dropIn { from { opacity: 0; transform: translateY(-16px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes dropOut { to { opacity: 0; transform: translateY(-14px) scale(.96); } }
@keyframes bounceIn { 0% { transform: scale(0) rotate(-20deg); } 60% { transform: scale(1.25) rotate(6deg); } 100% { transform: scale(1); } }
@keyframes badgeIn { 0% { transform: scale(.4) rotate(-12deg); opacity: 0; } 70% { transform: scale(1.12) rotate(4deg); } 100% { transform: none; opacity: 1; } }
@keyframes shake { 10%, 90% { transform: translateX(-3px); } 20%, 80% { transform: translateX(5px); }
  30%, 50%, 70% { transform: translateX(-8px); } 40%, 60% { transform: translateX(8px); } }
@keyframes bump { 0% { transform: scale(1); } 35% { transform: scale(1.3); } 100% { transform: scale(1); } }
/*
 * The lesson you just finished: it lifts, turns over twice and drops back onto
 * the path, brightening in the air and settling to its normal green.
 *
 * It turns deliberately — roughly two seconds for the two turns — so both
 * flips read rather than blurring past.
 *
 * Everything here animates `translate`, `rotate`, `scale`, `opacity` and
 * `filter` — properties the compositor can run on its own. The first version
 * keyframed `background` and `box-shadow`, which repaint the element on every
 * frame and made the flip stutter. Each part also carries its own easing:
 * the lift decelerates going up and accelerates coming down, while the spin
 * runs at its own even pace, which is what reads as "smooth".
 */
.node-wrap.landing { z-index: 2; }

/* The shadow it casts on the path — shrinks as it rises, spreads on impact. */
.node-wrap.landing::before {
  content: '';
  position: absolute; left: 50%; bottom: -16px;
  width: 58px; height: 11px; margin-left: -29px;
  border-radius: 50%; background: rgba(0, 0, 0, .28); filter: blur(3px);
  animation: nodeShadow 2.1s both;
}
@keyframes nodeShadow {
  0%   { opacity: .34; scale: 1 1;    animation-timing-function: cubic-bezier(.16, .84, .44, 1); }
  40%  { opacity: .10; scale: .5 .55; animation-timing-function: cubic-bezier(.55, .06, .68, .19); }
  72%  { opacity: .40; scale: 1.18 1; animation-timing-function: ease-out; }
  82%  { opacity: .28; scale: .92 .9; }
  100% { opacity: .30; scale: 1 1; }
}

.node-wrap.landing .node {
  animation:
    nodeLift 2.1s both,
    nodeSpin 1.95s cubic-bezier(.38, .02, .36, 1) both,
    nodeSquash 2.1s both,
    nodeSettle 2.1s ease-out both;
  will-change: translate, rotate, scale, filter;
}

/* Up with gravity easing, down with gravity easing, then a small rebound. */
@keyframes nodeLift {
  0%   { translate: 0 0;     animation-timing-function: cubic-bezier(.16, .84, .44, 1); }
  40%  { translate: 0 -42px; animation-timing-function: cubic-bezier(.55, .06, .68, .19); }
  72%  { translate: 0 0;     animation-timing-function: cubic-bezier(.16, .84, .44, 1); }
  84%  { translate: 0 -9px;  animation-timing-function: cubic-bezier(.55, .06, .68, .19); }
  94%  { translate: 0 0;     animation-timing-function: ease-out; }
  100% { translate: 0 0; }
}

/* Two full turns at one even pace — no mid-flip stalls. */
@keyframes nodeSpin {
  0%   { rotate: x 0deg; }
  100% { rotate: x 720deg; }
}

/* Squash on contact, a little overshoot, then settle. */
@keyframes nodeSquash {
  0%, 68% { scale: 1 1; }
  74%     { scale: 1.13 .85; }
  82%     { scale: .95 1.06; }
  90%     { scale: 1.03 .97; }
  100%    { scale: 1 1; }
}

/* Catches the light while it is in the air, back to normal once it lands. */
@keyframes nodeSettle {
  0%   { filter: brightness(1.22) saturate(1.1); }
  66%  { filter: brightness(1.18) saturate(1.08); }
  100% { filter: brightness(1) saturate(1); }
}

@keyframes halo { 0% { transform: scale(.95); opacity: .5; } 100% { transform: scale(1.3); opacity: 0; } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes flicker { 0%, 100% { transform: scale(1) rotate(-2deg); } 50% { transform: scale(1.14) rotate(3deg); } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; }
}

@media (max-width: 560px) {
  .page { padding: 16px 14px 90px; }
  .ex-prompt { font-size: 22px; }
  .node { width: 58px; height: 37px; font-size: 17px; }
  .topbar { gap: 10px; padding: 10px 14px; }
  .brand span.brand-text { display: none; }
}

/* ---------------------------------------------------------- Google sign-in */

/* A labelled rule between the password form and the Google button. */
.or-rule {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.or-rule::before,
.or-rule::after {
  content: '';
  flex: 1;
  height: 2px;
  background: var(--line);
  border-radius: 2px;
}

.btn-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.btn-google[disabled] { opacity: .6; cursor: default; }

/* Google's official mark, inlined as SVG (see screens-auth.js). It carries its
   own brand colours, so it gets no background, filter or recolouring here —
   Google's guidelines require the logo unmodified. */
.g-mark {
  width: 20px;
  height: 20px;
  flex: none;
  display: block;
}

/* The sound switch, sized and weighted to sit level with the language picker. */
.sfxbtn {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  padding: 7px 9px;
  border-radius: 10px;
  opacity: .85;
  transition: opacity .15s, background .15s, transform .12s;
}
.sfxbtn:hover { background: var(--line); opacity: 1; }
.sfxbtn:active { transform: scale(.9); }
/* Muted reads as muted at a glance, not just by the glyph. */
.sfxbtn.off { opacity: .4; filter: grayscale(1); }


/* ===================================================== course editor === */
/* Admin-only screen. Dense on purpose: it is a workbench, not a lesson. */

.admin .adm-wrap {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 16px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px;
  align-items: start;
}

.adm-side {
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 16px;
  padding: 10px;
}

.adm-level + .adm-level { margin-top: 14px; }
.adm-level-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.adm-units { display: flex; flex-direction: column; gap: 2px; }

.adm-unit {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  font: inherit;
  font-size: 13px;
  color: inherit;
  background: none;
  border: none;
  border-radius: 10px;
  padding: 7px 9px;
  cursor: pointer;
}
.adm-unit:hover { background: var(--locked); }
.adm-unit.on { background: var(--green-soft); color: var(--green-dark); font-weight: 700; }
.adm-unit-n { flex: 0 0 18px; color: var(--muted); font-variant-numeric: tabular-nums; }
.adm-unit.on .adm-unit-n { color: inherit; }
.adm-unit-t { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-dot { color: var(--gold); font-size: 10px; }

.adm-main {
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 16px;
  min-height: 60vh;
  overflow: hidden;
}

.adm-head { display: flex; gap: 12px; padding: 18px 18px 0; }
.adm-pad { padding: 18px; }
.adm-h { margin: 22px 0 8px; font-size: 15px; }

.adm-tabs {
  display: flex;
  gap: 4px;
  padding: 14px 18px 0;
  border-bottom: 2px solid var(--line);
  overflow-x: auto;
}
.adm-tab {
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 8px 10px;
  margin-bottom: -2px;
  cursor: pointer;
  white-space: nowrap;
}
.adm-tab:hover:not(:disabled) { color: var(--ink); }
.adm-tab.on { color: var(--green-dark); border-bottom-color: var(--green); }
.adm-tab:disabled { opacity: .4; cursor: default; }

.adm-field { display: block; margin-bottom: 12px; }
.adm-label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.inp-sm { padding: 7px 9px; font-size: 13px; border-width: 2px; }

.adm-langs { display: flex; flex-direction: column; gap: 4px; }
.adm-lang { display: flex; align-items: center; gap: 6px; }
.adm-tag {
  flex: 0 0 28px;
  font-size: 10px;
  font-weight: 800;
  text-align: center;
  color: var(--muted);
  background: var(--locked);
  border-radius: 5px;
  padding: 3px 0;
}
/* English is the fallback every other language falls back to, so it is the
   one field that is not optional. */
.adm-tag.req { background: var(--green-soft); color: var(--green-dark); }
.adm-lang .inp { flex: 1 1 auto; min-width: 0; }

.adm-rows { display: flex; flex-direction: column; gap: 4px; }
.adm-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 28px;
  gap: 5px;
  align-items: center;
}
.adm-row-4 { grid-template-columns: 1.6fr 1fr 64px 1fr 28px; }
.adm-row-5 { grid-template-columns: 1.6fr .7fr 1.2fr .9fr .9fr; }
.adm-row-head {
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .03em;
  padding-bottom: 2px;
}
.adm-row-5 > span { font-size: 13px; padding: 6px 2px; border-bottom: 1px solid var(--line); }

.adm-x {
  width: 28px;
  height: 28px;
  font-size: 12px;
  line-height: 1;
  color: var(--muted);
  background: none;
  border: 2px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}
.adm-x:hover { color: var(--red); border-color: var(--red); }

.adm-q {
  border: 2px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
}
.adm-q-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.adm-narrow { width: auto; min-width: 120px; }
.adm-tiny { width: 72px; }
.adm-inline { display: flex; align-items: center; gap: 6px; }
.adm-opt { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 6px; }
.adm-opt input[type="radio"] { margin-top: 10px; }

.adm-hwpick { display: flex; flex-wrap: wrap; gap: 6px; }
.adm-chip {
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  background: var(--locked);
  border: none;
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
}
.adm-chip.on { background: var(--green); color: #fff; }

.adm-preview-opts { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.adm-opt-chip {
  font-size: 13px;
  background: var(--locked);
  border-radius: 8px;
  padding: 4px 9px;
}
.adm-opt-chip.right { background: var(--green-soft); color: var(--green-dark); font-weight: 700; }

.adm-savebar {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: var(--card);
  border-top: 2px solid var(--line);
}
.adm-savebar.on { border-top-color: var(--gold); }

.adm-errors { margin: 10px 0 0; padding-left: 18px; text-align: left; font-size: 14px; }
.adm-errors li { margin-bottom: 5px; }
.adm-mini { font-size: 10px; margin-left: 6px; padding: 1px 6px; }

@media (max-width: 860px) {
  .admin .adm-wrap { grid-template-columns: minmax(0, 1fr); }
  .adm-side { position: static; max-height: 240px; }
  .adm-hide-sm { display: none; }
  .adm-row { grid-template-columns: 1fr 1fr 28px; }
  .adm-row > *:nth-child(3):not(.adm-x) { grid-column: 1 / -1; }
  .adm-row-4, .adm-row-5 { grid-template-columns: 1fr 1fr 28px; }
}


/* Account editor -------------------------------------------------------- */

.adm-acc-edit {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 2px solid var(--line);
}

/* A suspended account should be legible at a glance in a long list. */
.adm-suspended { border-color: var(--red); background: color-mix(in srgb, var(--red) 5%, transparent); }

.adm-toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px;
  border: 2px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}
.adm-toggle input { margin-top: 3px; flex: 0 0 auto; }
.adm-toggle.off { opacity: .55; cursor: default; }
.adm-q-head.wrap { flex-wrap: wrap; }


/* ====================================================== account page === */

.avatar {
  display: inline-grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  overflow: hidden;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  user-select: none;
}
.avatar-photo { object-fit: cover; background: var(--locked); }
.avatar-preset { color: inherit; }

.avatar-btn {
  display: grid;
  place-items: center;
  padding: 2px;
  background: none;
  border: 2px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  transition: border-color .12s ease, transform .12s ease;
}
.avatar-btn:hover { border-color: var(--green); }
.avatar-btn:active { transform: scale(.94); }

.acct-head { display: flex; align-items: center; gap: 16px; }
.acct-head h1 { margin: 0; font-size: 24px; }
.acct-h { margin: 18px 0 8px; font-size: 15px; }

.acct-pic { display: flex; align-items: flex-start; gap: 18px; flex-wrap: wrap; }

.preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
  gap: 8px;
}
.preset {
  display: grid;
  place-items: center;
  padding: 6px;
  background: none;
  border: 2px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
  transition: border-color .12s ease, transform .12s ease;
}
.preset:hover { border-color: var(--green); }
.preset:active { transform: scale(.94); }
.preset.on { border-color: var(--green); background: var(--green-soft); }

.cam-wrap {
  margin-top: 12px;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 1 / 1;
}
/* Mirrored, because a camera preview that is not mirrored feels wrong. */
.cam { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
}
.stat-cell {
  display: grid;
  gap: 2px;
  padding: 12px;
  background: var(--locked);
  border-radius: 12px;
  text-align: center;
}
.stat-cell strong { font-size: 20px; }

.exam-list { display: flex; flex-direction: column; gap: 6px; }
.exam-row { display: flex; align-items: center; gap: 10px; font-size: 14px; }

.study-level + .study-level { margin-top: 18px; }
.study-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.study-unit {
  padding: 12px;
  border: 2px solid var(--line);
  border-radius: 12px;
}
.study-unit + .study-unit { margin-top: 8px; }
.study-lessons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.study-lesson {
  width: 38px;
  height: 38px;
  font: inherit;
  font-weight: 800;
  color: var(--green-dark);
  background: var(--green-soft);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: transform .12s ease, background .12s ease;
}
.study-lesson:hover { background: var(--green); color: #fff; }
.study-lesson:active { transform: scale(.92); }

@media (max-width: 560px) {
  .acct-head h1 { font-size: 20px; }
  .acct-pic { gap: 12px; }
}


/* The account panel ------------------------------------------------------ */

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  justify-content: flex-end;
  background: rgba(0, 0, 0, .45);
  opacity: 0;
  transition: opacity .22s ease;
}
.drawer-backdrop.on { opacity: 1; }

.drawer {
  display: flex;
  flex-direction: column;
  width: min(440px, 100%);
  height: 100%;
  background: var(--bg);
  border-left: 2px solid var(--line);
  box-shadow: -18px 0 44px rgba(0, 0, 0, .28);
  transform: translateX(100%);
  transition: transform .24s cubic-bezier(.22, .8, .3, 1);
}
.drawer-backdrop.on .drawer { transform: translateX(0); }

.drawer-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  padding: 14px 16px;
  border-bottom: 2px solid var(--line);
  background: var(--card);
}
.drawer-x {
  width: 34px;
  height: 34px;
  font: inherit;
  font-size: 13px;
  color: inherit;
  background: none;
  border: 2px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}
.drawer-x:hover { border-color: var(--red); color: var(--red); }

.drawer-body {
  display: grid;
  gap: 14px;
  align-content: start;
  overflow-y: auto;
  padding: 14px;
  -webkit-overflow-scrolling: touch;
}
/* The cards space themselves through the grid gap in here. */
.drawer-body > .card { margin: 0; }

.drawer-id { display: flex; align-items: center; gap: 12px; padding: 2px; }
.drawer-id h1 { margin: 0; font-size: 20px; }

/* The page behind must not scroll under the panel. */
body.drawer-open { overflow: hidden; }

@media (max-width: 520px) {
  .drawer { width: 100%; border-left: none; }
}
@media (prefers-reduced-motion: reduce) {
  .drawer-backdrop, .drawer { transition: none; }
}


/* New and known words ---------------------------------------------------- */
/*
 * A dotted underline under the course vocabulary inside a French phrase:
 * purple the first time a word appears in the course, grey once it has been
 * taught. Underline rather than a background, so it marks the word without
 * competing with the answer buttons it sits on.
 */
.w-new,
.w-known {
  text-decoration-line: underline;
  text-decoration-style: dotted;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}
.w-new { text-decoration-color: var(--purple); }
.w-known { text-decoration-color: var(--muted); }

/* The prompt is large; its dots want a little more room. */
.ex-prompt .w-new,
.ex-prompt .w-known { text-underline-offset: 7px; }


/* Tap a marked word ------------------------------------------------------ */

.w-tap { cursor: pointer; }
.w-tap:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 3px; }
.w-open { background: color-mix(in srgb, var(--purple) 22%, transparent); border-radius: 4px; }
.w-known.w-open { background: color-mix(in srgb, var(--muted) 24%, transparent); }

.wordpop {
  position: fixed;
  z-index: 120;
  min-width: 150px;
  max-width: min(300px, calc(100vw - 24px));
  padding: 12px 14px;
  background: var(--card);
  border: 2px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .34);
  opacity: 0;
  transform: translateY(-5px);
  transition: opacity .14s ease, transform .14s ease;
}
.wordpop.on { opacity: 1; transform: none; }
.wordpop.is-new { border-color: var(--purple); }

.wp-top { display: flex; align-items: center; gap: 10px; }
.wp-fr { font-size: 19px; }
.wp-speak {
  margin-left: auto;
  width: 34px;
  height: 34px;
  font-size: 15px;
  line-height: 1;
  background: none;
  border: 2px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}
.wp-speak:hover { border-color: var(--blue); }
.wp-speak:active { transform: scale(.94); }

.wp-gloss { margin-top: 6px; font-size: 16px; color: var(--ink); }
.wp-tag {
  margin-top: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}
.wordpop.is-new .wp-tag { color: var(--purple); }
