:root {
  --bg: #f7f5f0;
  --surface: #ffffff;
  --surface-2: #f0ede6;
  --text: #1f2328;
  --muted: #5d6470;
  --border: #ddd8cc;
  --accent: #1f4e79;
  --accent-soft: #e3ecf5;
  --ok: #1b7f4b;
  --ok-soft: #e2f3ea;
  --bad: #b3261e;
  --bad-soft: #fbe7e5;
  --radius: 14px;
  --accent-2: #e07a5f;
  --gold: #e9b949;
  --blob-1: #f6d7c3;
  --blob-2: #cfe0f1;
  --blob-3: #f3e3b3;
  --shadow: 0 1px 2px rgba(31,35,40,.05), 0 6px 20px rgba(31,35,40,.06);
  --shadow-hover: 0 2px 4px rgba(31,35,40,.06), 0 14px 32px rgba(31,78,121,.14);
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15171b;
    --surface: #1d2026;
    --surface-2: #252931;
    --text: #e8e6e1;
    --muted: #a3a9b3;
    --border: #353a44;
    --accent: #8fb8e3;
    --accent-soft: #233244;
    --ok: #6fd19c;
    --ok-soft: #1c3428;
    --bad: #f08b84;
    --bad-soft: #3d2221;
    --accent-2: #f2a287;
    --gold: #f0cc6b;
    --blob-1: #3a2a2a;
    --blob-2: #1e3047;
    --blob-3: #3a3420;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.25);
    --shadow-hover: 0 2px 4px rgba(0,0,0,.35), 0 14px 32px rgba(0,0,0,.4);
  }
}
:root[data-theme="dark"] {
  --bg: #15171b; --surface: #1d2026; --surface-2: #252931; --text: #e8e6e1;
  --muted: #a3a9b3; --border: #353a44; --accent: #8fb8e3; --accent-soft: #233244;
  --ok: #6fd19c; --ok-soft: #1c3428; --bad: #f08b84; --bad-soft: #3d2221;
  --accent-2: #f2a287;
  --gold: #f0cc6b;
  --blob-1: #3a2a2a;
  --blob-2: #1e3047;
  --blob-3: #3a3420;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.25);
  --shadow-hover: 0 2px 4px rgba(0,0,0,.35), 0 14px 32px rgba(0,0,0,.4);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
}
a { color: var(--accent); }
.wrap { max-width: 820px; margin: 0 auto; padding: 24px 16px 80px; }

header.site {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  padding-bottom: 14px; border-bottom: 1px solid var(--border); margin-bottom: 28px;
}
header.site a.brand { font-family: var(--serif); font-size: 22px; font-weight: 700; color: var(--text); text-decoration: none; }
header.site nav a { font-size: 15px; text-decoration: none; }

h1 { font-family: var(--serif); font-size: 32px; line-height: 1.2; margin: 0 0 6px; }
h2 { font-family: var(--serif); font-size: 23px; margin: 36px 0 10px; }
h3 { font-size: 17px; margin: 22px 0 8px; }
.kicker { text-transform: uppercase; letter-spacing: .08em; font-size: 13px; color: var(--muted); font-weight: 600; margin: 0 0 4px; }
.lead { color: var(--muted); margin: 0 0 22px; }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 22px; margin: 16px 0;
  box-shadow: var(--shadow);
}
.instructions { background: var(--accent-soft); border: none; }
.instructions p { margin: 0; }

/* index */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.grid a.tile {
  display: block; text-decoration: none; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; transition: border-color .15s, transform .15s;
}
.grid a.tile:hover { border-color: var(--accent); transform: translateY(-1px); }
.tile .part { font-size: 13px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.tile .name { font-family: var(--serif); font-size: 19px; font-weight: 700; margin: 2px 0 4px; }
.tile .desc { font-size: 14.5px; color: var(--muted); line-height: 1.45; }

/* reading text */
.text { font-family: var(--serif); font-size: 18.5px; line-height: 1.75; }
.text p { margin: 0 0 14px; }
.text-title { font-family: var(--serif); font-size: 21px; font-weight: 700; margin: 0 0 4px; }
.text-sub { color: var(--muted); font-style: italic; margin: 0 0 14px; font-family: var(--serif); }

/* inline gaps */
.gapnum { font-family: var(--sans); font-size: 12px; font-weight: 700; color: var(--accent); vertical-align: super; margin-right: 2px; }
select.gap, input.gap {
  font: inherit; font-family: var(--sans); font-size: 16px;
  color: var(--text); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 6px;
  padding: 2px 6px; margin: 0 2px; min-width: 8ch; max-width: 100%;
}
input.gap { width: 12ch; }
select.gap:focus, input.gap:focus, textarea:focus, input.kwt:focus, select.choice:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.stem { font-family: var(--sans); font-size: 13px; font-weight: 700; letter-spacing: .04em; color: var(--muted); }
.ok { background: var(--ok-soft) !important; border-color: var(--ok) !important; }
.bad { background: var(--bad-soft) !important; border-color: var(--bad) !important; }
.reveal { font-family: var(--sans); font-size: 14px; font-weight: 600; color: var(--ok); margin-left: 3px; }

/* questions */
.q { padding: 14px 0; border-top: 1px solid var(--border); }
.q:first-child { border-top: none; padding-top: 0; }
.q .prompt { font-weight: 600; margin: 0 0 8px; }
.q .prompt .n { color: var(--accent); margin-right: 6px; }
.opts { display: grid; gap: 6px; }
.opts label {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer;
  background: var(--surface);
}
.opts label:hover { border-color: var(--accent); }
.opts input { margin-top: 5px; accent-color: var(--accent); }
.opts .letter { font-weight: 700; min-width: 1.2em; }
.explain { display: none; margin-top: 8px; font-size: 15px; color: var(--muted); }
.checked .explain { display: block; }

/* KWT */
.kwt-row { line-height: 2.2; }
.kwt-key { display: inline-block; font-weight: 800; letter-spacing: .1em; background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px; padding: 0 8px; margin: 2px 0 6px; }
input.kwt { font: inherit; font-size: 16px; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 3px 8px; width: 26ch; max-width: 100%; }

/* matching */
select.choice { font: inherit; font-size: 16px; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 3px 8px; }
.match-row { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--border); }
.match-row:first-child { border-top: none; }
.match-row .n { color: var(--accent); font-weight: 700; min-width: 2ch; }
.match-row .stmt { flex: 1; }
.section-label { font-family: var(--sans); font-weight: 800; color: var(--accent); margin-right: 6px; }

/* gapped text (part 7) */
.slot { margin: 10px 0 16px; padding: 10px 12px; border: 1px dashed var(--border); border-radius: 8px; font-family: var(--sans); font-size: 15px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.para-bank .para { margin: 10px 0; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); font-family: var(--serif); font-size: 17px; }
.para-bank .para b { font-family: var(--sans); color: var(--accent); margin-right: 6px; }

/* controls */
.bar { position: sticky; bottom: 0; background: var(--bg); border-top: 1px solid var(--border); padding: 12px 0; margin-top: 24px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
button {
  font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
  border-radius: 8px; padding: 9px 16px; border: 1px solid var(--accent);
  background: var(--accent); color: var(--surface);
}
button.secondary { background: transparent; color: var(--accent); }
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.score { font-weight: 700; margin-left: auto; }

/* writing */
textarea {
  width: 100%; min-height: 320px; resize: vertical;
  font-family: var(--serif); font-size: 17px; line-height: 1.6;
  color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px;
}
.counter { font-size: 14px; color: var(--muted); margin-top: 6px; }
.counter.in { color: var(--ok); font-weight: 600; }
.counter.out { color: var(--bad); font-weight: 600; }
.checklist label { display: flex; gap: 10px; align-items: flex-start; padding: 4px 0; }
.checklist input { margin-top: 6px; accent-color: var(--accent); }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 0; }
.tabs button { background: transparent; color: var(--accent); }
.tabs button[aria-selected="true"] { background: var(--accent); color: var(--surface); }
.small-note { color: var(--muted); font-size: 15px; margin-bottom: 0; }
.notes-box { background: var(--surface-2); border-radius: 8px; padding: 12px 14px; margin: 10px 0; }
.notes-box ul { margin: 6px 0 0; padding-left: 20px; }

.setpicker { margin: 0 0 18px; }
.notes-list { margin: 0; padding: 0; list-style: none; }
.notes-list li { padding: 8px 0; border-top: 1px solid var(--border); font-size: 15.5px; line-height: 1.5; }
.notes-list li:first-child { border-top: none; }
.notes-list .n { display: inline-block; min-width: 2.2ch; color: var(--accent); font-weight: 700; margin-right: 6px; }
.tick { color: var(--ok); font-weight: 800; margin-right: 6px; }
.cross { color: var(--bad); font-weight: 800; margin-right: 6px; }
.also { color: var(--muted); font-size: 14px; }

footer { margin-top: 48px; color: var(--muted); font-size: 14px; }

@media (max-width: 560px) {
  body { font-size: 16px; }
  h1 { font-size: 26px; }
  .card { padding: 16px; }
  .text { font-size: 17.5px; }
}
@media print {
  .bar, header.site nav { display: none; }
  body { background: #fff; }
}

/* ================= Frills & motion ================= */
html.theme-anim, html.theme-anim *, html.theme-anim *::before, html.theme-anim *::after {
  transition: background-color .4s ease, color .4s ease, border-color .4s ease, box-shadow .4s ease !important;
}
body { position: relative; overflow-x: hidden; }
.wrap { position: relative; z-index: 1; }

/* soft floating blobs behind everything */
.deco { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.deco span { position: absolute; border-radius: 50%; filter: blur(48px); opacity: .55; animation: drift 22s ease-in-out infinite alternate; }
.deco span:nth-child(1) { width: 340px; height: 340px; background: var(--blob-1); top: -90px; right: -80px; }
.deco span:nth-child(2) { width: 280px; height: 280px; background: var(--blob-2); bottom: 8%; left: -110px; animation-duration: 28s; }
.deco span:nth-child(3) { width: 200px; height: 200px; background: var(--blob-3); top: 45%; right: -70px; animation-duration: 34s; }
@keyframes drift { from { transform: translate(0,0) scale(1); } to { transform: translate(-30px, 40px) scale(1.12); } }

/* brand mark */
header.site a.brand { display: inline-flex; align-items: center; gap: 8px; }
header.site a.brand::before {
  content: ""; width: 22px; height: 22px; flex: none;
  background: conic-gradient(from 45deg, var(--accent-2), var(--gold), var(--accent), var(--accent-2));
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  transition: transform .6s cubic-bezier(.34,1.56,.64,1);
}
header.site a.brand:hover::before { transform: rotate(144deg) scale(1.15); }
header.site nav { display: flex; align-items: center; gap: 12px; }
header.site { align-items: center; }

/* theme toggle */
.theme-toggle {
  width: 40px; height: 40px; padding: 0; border-radius: 50%;
  display: inline-grid; place-items: center;
  background: var(--surface); color: var(--accent); border: 1px solid var(--border);
  box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.theme-toggle:hover { transform: translateY(-1px); border-color: var(--accent); box-shadow: var(--shadow-hover); }
.theme-toggle svg { width: 20px; height: 20px; fill: var(--gold); stroke: var(--gold); stroke-width: 2; display: block; }
:root[data-theme="dark"] .theme-toggle svg { fill: #c9d6ea; stroke: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme-toggle svg { fill: #c9d6ea; stroke: none; } }
.theme-toggle.spin .icon { animation: spin .5s cubic-bezier(.34,1.56,.64,1); }
.theme-toggle .icon { display: grid; }
@keyframes spin { from { transform: rotate(-120deg) scale(.4); opacity: 0; } to { transform: rotate(0) scale(1); opacity: 1; } }

/* wavy underline on page titles */
h1 { position: relative; padding-bottom: 10px; }
h1::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 120px; height: 8px;
  background: radial-gradient(circle at 6px -2px, transparent 6px, var(--accent-2) 6.5px, var(--accent-2) 8.5px, transparent 9px) 0 0 / 16px 8px repeat-x;
  opacity: .8;
}

/* entrance */
.rise { opacity: 0; animation: rise .6s cubic-bezier(.22,1,.36,1) var(--d, 0ms) forwards; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.set-enter > * { animation: rise .45s cubic-bezier(.22,1,.36,1) both; }
.set-enter > *:nth-child(2) { animation-delay: 60ms; }
.set-enter > *:nth-child(3) { animation-delay: 120ms; }
.set-enter > *:nth-child(4) { animation-delay: 180ms; }

/* tiles */
.grid a.tile { position: relative; overflow: hidden; box-shadow: var(--shadow); transition: transform .25s cubic-bezier(.34,1.56,.64,1), box-shadow .25s ease, border-color .25s ease; }
.grid a.tile:hover { transform: translateY(-4px) rotate(-.4deg); box-shadow: var(--shadow-hover); }
.grid a.tile::after {
  content: ""; position: absolute; right: -24px; top: -24px; width: 72px; height: 72px; border-radius: 50%;
  background: var(--blob-1); opacity: .7; transition: transform .4s cubic-bezier(.34,1.56,.64,1);
}
.grid a.tile:nth-child(3n+2)::after { background: var(--blob-2); }
.grid a.tile:nth-child(3n)::after { background: var(--blob-3); }
.grid a.tile:hover::after { transform: scale(1.5); }
.tile .part, .tile .name, .tile .desc { position: relative; z-index: 1; }
.tile .part { display: inline-block; background: var(--accent-soft); color: var(--accent); padding: 1px 9px; border-radius: 999px; font-size: 12px; }

/* buttons */
button { transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease; }
button:hover { box-shadow: 0 4px 14px rgba(31,78,121,.18); }
button:active { transform: scale(.96); }
.tabs button { border-radius: 999px; }
.tabs button[aria-selected="true"] { animation: pop .35s cubic-bezier(.34,1.56,.64,1); }

/* inputs */
select.gap, input.gap, input.kwt, select.choice, textarea { transition: border-color .2s ease, background-color .3s ease, box-shadow .2s ease; }
select.gap:focus, input.gap:focus, input.kwt:focus, select.choice:focus, textarea:focus { box-shadow: 0 0 0 4px var(--accent-soft); }
.opts label { transition: border-color .2s ease, background-color .3s ease, transform .15s ease; }
.opts label:hover { transform: translateX(3px); }

/* feedback */
.ok { animation: pop .45s cubic-bezier(.34,1.56,.64,1); }
.bad { animation: shake .4s ease; }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes shake { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-4px); } 40% { transform: translateX(4px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
.notes:not([hidden]) { animation: rise .5s cubic-bezier(.22,1,.36,1); }
.notes-list li { animation: rise .4s cubic-bezier(.22,1,.36,1) both; }
.notes-list li:nth-child(2) { animation-delay: 40ms; } .notes-list li:nth-child(3) { animation-delay: 80ms; }
.notes-list li:nth-child(4) { animation-delay: 120ms; } .notes-list li:nth-child(5) { animation-delay: 160ms; }
.notes-list li:nth-child(6) { animation-delay: 200ms; } .notes-list li:nth-child(7) { animation-delay: 240ms; }
.notes-list li:nth-child(n+8) { animation-delay: 280ms; }
.checked .explain { animation: rise .4s cubic-bezier(.22,1,.36,1); }
.score { display: inline-block; }
.score.bump { animation: pop .5s cubic-bezier(.34,1.56,.64,1); }
.score.perfect { color: var(--ok); }
.score.perfect::after { content: " \2605"; color: var(--gold); }

/* sticky bar: frosted */
.bar { background: color-mix(in srgb, var(--bg) 82%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }

/* confetti */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 50; overflow: hidden; }
.confetti i { position: absolute; top: -14px; width: 9px; height: 13px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translate(var(--dx), 105vh) rotate(var(--rot)); opacity: .9; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .rise { opacity: 1; }
}

/* ================= Exercise-page frills ================= */
#exercise .card, .wrap > .card:not(.instructions) { position: relative; overflow: hidden; }
#exercise .card > *, .wrap > .card:not(.instructions) > * { position: relative; z-index: 1; }
#exercise .card::before, .wrap > .card:not(.instructions)::before {
  content: ""; position: absolute; right: -34px; top: -34px; width: 96px; height: 96px; border-radius: 50%;
  background: var(--blob-1); opacity: .6; z-index: 0; pointer-events: none;
}
#exercise .card:nth-of-type(3n+2)::before { background: var(--blob-2); }
#exercise .card:nth-of-type(3n)::before { background: var(--blob-3); }
.instructions { position: relative; padding-left: 26px; }
.instructions::before { content: ""; position: absolute; left: 10px; top: 14px; bottom: 14px; width: 4px; border-radius: 4px; background: linear-gradient(var(--accent-2), var(--gold)); }
.kicker { display: inline-block; background: var(--accent-soft); color: var(--accent); padding: 2px 11px; border-radius: 999px; font-size: 12px; }
.gapnum { display: inline-grid; place-items: center; min-width: 1.5em; height: 1.5em; padding: 0 3px; border-radius: 999px; background: var(--accent-soft); vertical-align: 2px; font-size: 11px; line-height: 1; }
select.gap, input.gap, select.choice, input.kwt { border-radius: 10px; border-style: dashed; }
select.gap:focus, input.gap:focus, input.kwt:focus, select.choice:focus { border-style: solid; }
.ok, .bad { border-style: solid !important; }
.text-title { display: inline-block; background: linear-gradient(transparent 62%, var(--blob-3) 62%); padding: 0 2px; }
.slot { border-radius: 12px; background: color-mix(in srgb, var(--surface-2) 60%, transparent); }
.para-bank .para { border-radius: 12px; transition: transform .2s ease, border-color .2s ease; }
.para-bank .para:hover { transform: translateX(3px); border-color: var(--accent); }
.match-row .n, .q .prompt .n { display: inline-grid; place-items: center; min-width: 1.9em; height: 1.9em; border-radius: 999px; background: var(--accent-soft); font-size: 14px; }
.opts label { border-radius: 12px; }
.notes-list li { padding-left: 4px; }
.kwt-key { border-radius: 999px; padding: 0 12px; background: var(--blob-3); border-color: transparent; color: var(--text); }
.checklist label { border-radius: 8px; padding: 4px 6px; transition: background-color .2s ease; }
.checklist label:hover { background: var(--surface-2); }

/* ================= Name + logging ================= */
.name-chip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 46vw;
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
  border-radius: 999px; padding: 6px 12px; font-size: 14px; font-weight: 600; box-shadow: var(--shadow);
}
.name-chip .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.name-chip .who::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); margin-right: 6px; vertical-align: 1px; }
.name-chip .edit { color: var(--accent); font-weight: 500; font-size: 13px; }
.name-chip:hover { border-color: var(--accent); }
.hello { background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); padding: 10px 14px; margin: -8px 0 22px; font-size: 15.5px; }
.linkish { background: none; border: none; padding: 0; color: var(--accent); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; box-shadow: none !important; }

.name-modal {
  position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px;
  background: color-mix(in srgb, var(--bg) 55%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  animation: fadein .25s ease;
}
.name-modal.out { animation: fadeout .25s ease forwards; }
.name-card {
  width: min(420px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
  padding: 26px 24px 22px; box-shadow: var(--shadow-hover); text-align: center; position: relative; overflow: hidden;
  animation: rise .45s cubic-bezier(.34,1.56,.64,1);
}
.name-card::before { content: ""; position: absolute; right: -40px; top: -40px; width: 120px; height: 120px; border-radius: 50%; background: var(--blob-1); opacity: .7; }
.name-card::after { content: ""; position: absolute; left: -30px; bottom: -30px; width: 90px; height: 90px; border-radius: 50%; background: var(--blob-2); opacity: .7; }
.name-card > * { position: relative; z-index: 1; }
.name-card .wave { font-size: 38px; display: inline-block; animation: wave 1.6s ease-in-out .3s 2; transform-origin: 70% 70%; }
.name-card h2 { margin: 6px 0 4px; }
.name-card p { color: var(--muted); margin: 0 0 16px; font-size: 15px; }
.name-card input {
  width: 100%; font: inherit; font-size: 17px; text-align: center; color: var(--text); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; margin-bottom: 12px;
}
.name-card input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.name-card button { width: 100%; border-radius: 12px; padding: 11px 16px; font-size: 16px; }
@keyframes wave { 0%,100% { transform: rotate(0); } 20% { transform: rotate(16deg); } 40% { transform: rotate(-10deg); } 60% { transform: rotate(14deg); } 80% { transform: rotate(-4deg); } }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeout { to { opacity: 0; } }

.toast {
  position: fixed; left: 50%; top: 18px; transform: translateX(-50%); z-index: 60;
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 999px;
  font-size: 14.5px; font-weight: 600; box-shadow: var(--shadow-hover);
  animation: toastin .35s cubic-bezier(.34,1.56,.64,1);
}
.toast.toast-ok { background: var(--ok); color: #fff; }
:root[data-theme="dark"] .toast.toast-ok { color: #0e1a13; }
.toast.toast-warn { background: var(--gold); color: #2b2209; }
.toast.out { animation: fadeout .4s ease forwards; }
@keyframes toastin { from { opacity: 0; transform: translate(-50%, -14px) scale(.95); } to { opacity: 1; transform: translate(-50%, 0); } }
