/* Famiglot — design system and app styles */

:root {
  --bg: #f7f4ee;
  --bg-elev: #ffffff;
  --bg-sunk: #efeae1;
  --ink: #1f1c24;
  --ink-2: #4a4552;
  --ink-3: #7a7482;
  --line: #e4ddd1;
  --line-strong: #d3cab9;
  --brand: #c2412d;
  --brand-ink: #ffffff;
  --brand-soft: #fbe6e0;
  --brand-strong: #9f3020;
  --gold: #e3a32f;
  --gold-soft: #fbefd5;
  --ok: #2f8a62;
  --ok-soft: #dcf1e6;
  --bad: #c23a3a;
  --bad-soft: #f9e0de;
  --info: #2f6f9f;
  --info-soft: #ddebf6;
  --violet: #6b4fbb;
  --violet-soft: #e9e3f8;
  --pa-g: #f3c66c; --pa-b: #f0a08b; --pa-o: #93d3b0; --pa-i: #a3cbec;
  --shadow-1: 0 1px 2px rgb(31 28 36 / .06), 0 1px 1px rgb(31 28 36 / .04);
  --shadow-2: 0 6px 24px -8px rgb(31 28 36 / .18), 0 2px 6px rgb(31 28 36 / .06);
  --radius: 16px;
  --radius-sm: 10px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Fraunces", Georgia, serif;
  --sidebar: 248px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15131a; --bg-elev: #1e1b24; --bg-sunk: #110f15;
    --ink: #f1edf5; --ink-2: #c4bdcc; --ink-3: #8f8899;
    --line: #2d2934; --line-strong: #3b3644;
    --brand: #e8644d; --brand-ink: #1a0d0a; --brand-soft: #3a1f1a; --brand-strong: #f08672;
    --gold: #f0b54a; --gold-soft: #3a2e17;
    --ok: #4cc08c; --ok-soft: #173327; --bad: #f06b6b; --bad-soft: #3a1c1c;
    --info: #6aaee0; --info-soft: #172b3a; --violet: #a993f0; --violet-soft: #272040;
    --pa-g: #7d5f22; --pa-b: #84392c; --pa-o: #24664a; --pa-i: #285476;
    --shadow-1: 0 1px 2px rgb(0 0 0 / .4); --shadow-2: 0 10px 30px -10px rgb(0 0 0 / .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #15131a; --bg-elev: #1e1b24; --bg-sunk: #110f15;
  --ink: #f1edf5; --ink-2: #c4bdcc; --ink-3: #8f8899;
  --line: #2d2934; --line-strong: #3b3644;
  --brand: #e8644d; --brand-ink: #1a0d0a; --brand-soft: #3a1f1a; --brand-strong: #f08672;
  --gold: #f0b54a; --gold-soft: #3a2e17;
  --ok: #4cc08c; --ok-soft: #173327; --bad: #f06b6b; --bad-soft: #3a1c1c;
  --info: #6aaee0; --info-soft: #172b3a; --violet: #a993f0; --violet-soft: #272040;
  --pa-g: #7d5f22; --pa-b: #84392c; --pa-o: #24664a; --pa-i: #285476;
  --shadow-1: 0 1px 2px rgb(0 0 0 / .4); --shadow-2: 0 10px 30px -10px rgb(0 0 0 / .6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.55 var(--font); font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased; min-height: 100dvh;
}
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.2; font-weight: 650; letter-spacing: -.01em; }
h1 { font: 600 clamp(1.7rem, 3.4vw, 2.3rem)/1.15 var(--font-display); letter-spacing: -.02em; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .8em; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, textarea, select { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2.5px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.es { font-family: var(--font-display); }
.muted { color: var(--ink-3); }
.small { font-size: .875rem; }
.tiny { font-size: .78rem; }
.center { text-align: center; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100dvh; }
.sidebar {
  position: sticky; top: 0; height: 100dvh; padding: 22px 14px; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 4px; background: var(--bg);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
  background: var(--brand) url(/img/mark.svg) center / 82% no-repeat; box-shadow: var(--shadow-1);
}
.welcome-hero { display: flex; align-items: center; gap: 18px; margin-bottom: 12px; }
.welcome-hero h1 { margin-bottom: 0; }
.mascot { width: 96px; height: auto; flex: none; transform-origin: 50% 100%; animation: mascot-bob 3.2s ease-in-out infinite; }
@keyframes mascot-bob { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-4deg) translateY(-2px); } }
@media (prefers-reduced-motion: reduce) { .mascot { animation: none; } }
@media (max-width: 480px) { .mascot { width: 64px; } .welcome-hero { gap: 12px; } }
.brand-mark.light { background-color: #fff; background-image: url(/img/mark-brand.svg); }
.brand-name { font: 600 1.25rem/1 var(--font-display); letter-spacing: -.02em; }
.brand-sub { display: block; font: 500 .7rem/1.2 var(--font); color: var(--ink-3); letter-spacing: .02em; margin-top: 3px; }
.lang-pick {
  display: flex; align-items: center; gap: 8px; margin: 4px 0 10px; padding: 0 0 0 12px; border-radius: 10px;
  border: 1px solid var(--line-strong); background: var(--bg-elev); cursor: pointer;
}
.flag { width: 21px; height: 14px; flex: none; vertical-align: -2px; border-radius: 2px; box-shadow: 0 0 0 1px var(--line-strong); }
.lang-pick .flag { width: 24px; height: 16px; flex: none; border-radius: 3px; box-shadow: 0 0 0 1px var(--line-strong); }
.lang-select {
  flex: 1; min-width: 0; padding: 8px 12px 8px 0; border: 0; background: transparent;
  color: var(--ink); font: 600 .9rem/1.2 var(--font); cursor: pointer;
}
.lang-pick.sm { margin: 0 0 0 auto; padding-left: 10px; }
.lang-pick.sm .flag { width: 21px; height: 14px; }
.lang-pick.sm .lang-select { padding: 6px 10px 6px 0; font-size: .85rem; }
.nav-link {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
  color: var(--ink-2); font-weight: 520; font-size: .95rem; position: relative;
}
.nav-link:hover { background: var(--bg-sunk); text-decoration: none; color: var(--ink); }
.nav-link[aria-current="page"] { background: var(--bg-elev); color: var(--ink); box-shadow: var(--shadow-1); }
.nav-link[aria-current="page"] .ico { color: var(--brand); }
.nav-link .badge { margin-left: auto; }
.nav-sep { height: 1px; background: var(--line); margin: 10px 8px; }
.sidebar-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; }
.sidebar-foot .who { min-width: 0; flex: 1; }
.sidebar-foot .who b { display: block; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ico { width: 20px; height: 20px; flex: none; }
.main { min-width: 0; padding: 32px clamp(16px, 4vw, 48px) 96px; }
.page { max-width: 1080px; margin: 0 auto; }
/* Every screen has the same width; long running text keeps a readable line. */
.page-narrow { max-width: 1080px; margin: 0 auto; }
.page-narrow > p, .page-narrow > div > p { max-width: 72ch; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head p { color: var(--ink-2); margin: 0; max-width: 60ch; }
.eyebrow { font-size: .75rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); margin-bottom: 6px; }

.bottom-nav { display: none; }
.topbar { display: none; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .main { padding: 16px 16px 108px; }
  .topbar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 16px; position: sticky; top: 0; z-index: 20;
    background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
  }
  .bottom-nav {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; inset: auto 0 0 0; z-index: 30;
    background: color-mix(in srgb, var(--bg-elev) 92%, transparent); backdrop-filter: blur(14px);
    border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .bottom-nav a {
    display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0;
    font-size: .68rem; font-weight: 560; color: var(--ink-3); border-radius: 10px; position: relative;
  }
  .bottom-nav a:hover { text-decoration: none; }
  .bottom-nav a[aria-current="page"] { color: var(--brand); }
  .bottom-nav .ico { width: 22px; height: 22px; }
  .bottom-nav .dot { position: absolute; top: 4px; right: calc(50% - 18px); width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
}

/* ---------- Surfaces ---------- */
.card {
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow-1);
}
.card.flat { box-shadow: none; }
.card.sunk { background: var(--bg-sunk); box-shadow: none; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2, .card-head h3 { margin: 0; }
a.card { color: inherit; display: block; transition: transform .15s ease, box-shadow .15s ease, border-color .15s; }
a.card.row { display: flex; flex-wrap: nowrap; }
a.card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: var(--line-strong); }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-lg { display: flex; flex-direction: column; gap: 24px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }
section + section { margin-top: 32px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 14px; }
.section-title h2 { margin: 0; }

.hero {
  position: relative; overflow: hidden; border-radius: 22px; padding: clamp(22px, 4vw, 34px);
  background:
    radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--gold) 38%, transparent) 0%, transparent 55%),
    linear-gradient(135deg, var(--brand) 0%, var(--brand-strong) 100%);
  color: #fff; box-shadow: var(--shadow-2);
}
.hero h1 { color: #fff; margin-bottom: 6px; }
.hero p { color: rgb(255 255 255 / .88); max-width: 56ch; }
.hero .btn { background: #fff; color: var(--brand-strong); border-color: #fff; }
.hero .btn.ghost { background: rgb(255 255 255 / .14); color: #fff; border-color: rgb(255 255 255 / .35); }
.hero-deco { position: absolute; right: -10px; bottom: -34px; font: 700 9rem/1 var(--font-display); color: rgb(255 255 255 / .09); pointer-events: none; user-select: none; }

/* ---------- Buttons & inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: var(--bg-elev); color: var(--ink); font-weight: 600; font-size: .95rem; cursor: pointer;
  transition: transform .08s ease, background .15s, box-shadow .15s, border-color .15s; text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; border-color: var(--ink-3); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); box-shadow: 0 4px 14px -6px var(--brand); }
.btn.primary:hover { background: var(--brand-strong); border-color: var(--brand-strong); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--bg-sunk); }
.btn.sm { padding: 7px 12px; font-size: .85rem; border-radius: 10px; }
.btn.lg { padding: 14px 22px; font-size: 1.02rem; border-radius: 14px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn.icon { padding: 9px; border-radius: 11px; }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.bad { background: var(--bad); border-color: var(--bad); color: #fff; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .field legend { font-size: .85rem; font-weight: 600; color: var(--ink-2); }
.input, .textarea, .select {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: var(--bg-elev); transition: border-color .15s, box-shadow .15s;
}
.textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }

.choice {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; padding: 16px 18px;
  border-radius: 14px; border: 1.5px solid var(--line); background: var(--bg-elev); cursor: pointer;
  transition: border-color .15s, background .15s, transform .08s;
}
.choice:hover { border-color: var(--line-strong); background: var(--bg-sunk); }
.choice:active { transform: scale(.995); }
.choice .key {
  width: 30px; height: 30px; flex: none; border-radius: 9px; display: grid; place-items: center;
  font-size: .8rem; font-weight: 700; background: var(--bg-sunk); color: var(--ink-2); border: 1px solid var(--line);
}
.choice.selected { border-color: var(--brand); background: var(--brand-soft); }
.choice.correct { border-color: var(--ok); background: var(--ok-soft); }
.choice.correct .key { background: var(--ok); color: #fff; border-color: var(--ok); }
.choice.wrong { border-color: var(--bad); background: var(--bad-soft); }
.choice.wrong .key { background: var(--bad); color: #fff; border-color: var(--bad); }
.choice[disabled] { cursor: default; }
.choice .big { font-size: 1.6rem; }
.choice b { display: block; }

/* ---------- Badges, chips, progress ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px;
  font-size: .74rem; font-weight: 650; background: var(--bg-sunk); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap;
}
.badge.brand { background: var(--brand-soft); color: var(--brand-strong); border-color: transparent; }
.badge.gold { background: var(--gold-soft); color: color-mix(in srgb, var(--gold) 60%, var(--ink)); border-color: transparent; }
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.badge.info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.badge.violet { background: var(--violet-soft); color: var(--violet); border-color: transparent; }
.badge.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.level-pill {
  display: inline-grid; place-items: center; min-width: 46px; height: 28px; padding: 0 10px; border-radius: 9px;
  font: 700 .85rem/1 var(--font); background: var(--ink); color: var(--bg);
}
.bar { height: 8px; border-radius: 99px; background: var(--bg-sunk); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--gold)); transition: width .4s ease; }
.bar.ok > i { background: var(--ok); }
.bar.gold > i { background: var(--gold); }
/* Two layers: seen (light) under learnt for good (full colour). */
.bar.layered { position: relative; }
.bar.layered > i { position: absolute; inset: 0 auto 0 0; }
.bar.layered > i.seen { opacity: .55; }
.ring { --p: 0; --size: 72px; width: var(--size); height: var(--size); border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--brand) calc(var(--p) * 1%), var(--bg-sunk) 0); position: relative; flex: none; }
.ring::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--bg-elev); }
.ring span { position: relative; font-weight: 700; font-size: .95rem; }

.stat { display: flex; flex-direction: column; gap: 2px; }
.stat .num { font: 650 1.8rem/1.1 var(--font-display); letter-spacing: -.02em; }
.stat .lbl { font-size: .8rem; color: var(--ink-3); font-weight: 550; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.stat-card { padding: 16px 18px; }
.stat-card .ico-bubble { margin-bottom: 10px; }
.ico-bubble { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-size: 1.15rem; flex: none; }
.ico-bubble.gold { background: var(--gold-soft); color: var(--gold); }
.ico-bubble.ok { background: var(--ok-soft); color: var(--ok); }
.ico-bubble.info { background: var(--info-soft); color: var(--info); }
.ico-bubble.violet { background: var(--violet-soft); color: var(--violet); }
.emoji-tile { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 1.6rem; background: var(--bg-sunk); flex: none; }

.spark { display: flex; align-items: flex-end; gap: 4px; height: 44px; }
.spark i { flex: 1; min-height: 3px; border-radius: 4px 4px 2px 2px; background: color-mix(in srgb, var(--brand) 30%, var(--bg-sunk)); }
.spark i.on { background: var(--brand); }
.spark i.today { outline: 2px solid var(--gold); outline-offset: 1px; }

/* ---------- Lists ---------- */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 14px; padding: 14px 4px; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .title { font-weight: 600; }
a.list-item { color: inherit; border-radius: 10px; padding-inline: 10px; }
a.list-item:hover { background: var(--bg-sunk); text-decoration: none; }

.check {
  width: 26px; height: 26px; flex: none; border-radius: 8px; border: 2px solid var(--line-strong);
  display: grid; place-items: center; background: var(--bg-elev); cursor: pointer; transition: all .15s; color: transparent;
}
.check.working { border-color: var(--gold); background: var(--gold-soft); color: var(--gold); }
.check.done { border-color: var(--ok); background: var(--ok); color: #fff; }

.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 13px; background: var(--bg-sunk); border: 1px solid var(--line); flex-wrap: wrap; }
.tab { padding: 7px 14px; border-radius: 10px; border: 0; background: transparent; cursor: pointer; font-weight: 600; font-size: .88rem; color: var(--ink-2); }
.tab[aria-selected="true"] { background: var(--bg-elev); color: var(--ink); box-shadow: var(--shadow-1); }

/* ---------- Flashcards ---------- */
.flash-wrap { perspective: 1400px; }
.flash {
  position: relative; min-height: 340px; border-radius: 22px; transform-style: preserve-3d;
  transition: transform .5s cubic-bezier(.2,.8,.2,1); cursor: pointer;
}
.flash.flipped { transform: rotateY(180deg); }
.flash-face {
  position: absolute; inset: 0; backface-visibility: hidden; border-radius: inherit; padding: 28px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 10px;
  background: var(--bg-elev); border: 1px solid var(--line); box-shadow: var(--shadow-2);
}
.flash-back { transform: rotateY(180deg); }
.flash-word { font: 600 clamp(1.8rem, 6vw, 2.6rem)/1.15 var(--font-display); letter-spacing: -.02em; }
.flash-tr { font-size: 1.3rem; font-weight: 600; color: var(--brand); }
.flash-ex { color: var(--ink-2); max-width: 44ch; }
.flash-note { font-size: .88rem; padding: 8px 12px; border-radius: 10px; background: var(--gold-soft); max-width: 46ch; }
.flash-meta { position: absolute; top: 16px; left: 18px; right: 18px; display: flex; justify-content: space-between; }
.rate { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.rate .btn { flex-direction: column; gap: 0; padding: 10px 6px; font-size: .9rem; }
.rate .btn small { font-weight: 500; color: var(--ink-3); font-size: .72rem; }
.rate .again { border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.rate .good { border-color: color-mix(in srgb, var(--ok) 50%, var(--line)); }

/* ---------- Chat ---------- */
.chat { display: flex; flex-direction: column; gap: 14px; }
.msg { display: flex; gap: 10px; max-width: 86%; }
.msg.you { align-self: flex-end; flex-direction: row-reverse; }
.bubble { padding: 12px 16px; border-radius: 18px; background: var(--bg-elev); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.msg.ai .bubble { border-top-left-radius: 6px; }
.msg.you .bubble { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); border-top-right-radius: 6px; }
.bubble .es { font-size: 1.08rem; }
.bubble .tr { font-size: .86rem; color: var(--ink-3); margin-top: 6px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--bg-sunk); font-size: 1.1rem; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.fix { align-self: flex-end; max-width: 86%; font-size: .88rem; padding: 10px 14px; border-radius: 12px; background: var(--gold-soft); border: 1px dashed color-mix(in srgb, var(--gold) 50%, transparent); }
.fix.good { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
/* ---------- Tutor: a lesson in steps, not chat bubbles ---------- */
.lesson { display: flex; flex-direction: column; gap: 18px; }
.step { display: flex; flex-direction: column; gap: 12px; padding: 4px 0 4px 18px; border-left: 3px solid var(--brand); }
.step p { margin: 0; line-height: 1.55; }
.step.aside { border-left-color: var(--line-strong); color: var(--ink-2); }
.step-ex { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--brand-soft); }
.step-ex .es { font-size: 1.12rem; font-weight: 600; }
.step-ex .tr { font-size: .86rem; color: var(--ink-3); margin-top: 2px; }
.step-q { font-weight: 600; }
.step-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.said { align-self: flex-end; max-width: 80%; display: flex; gap: 6px; align-items: baseline; padding: 8px 14px; border-radius: 14px;
  background: var(--bg-sunk); color: var(--ink-2); white-space: pre-wrap; }
.said .ico { flex: none; width: 14px; height: 14px; color: var(--ink-3); }
.composer {
  position: sticky; bottom: 0; display: flex; gap: 8px; align-items: flex-end; padding: 12px;
  background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: 18px; margin-top: 16px;
}
.composer textarea { flex: 1; border: 0; background: transparent; resize: none; min-height: 44px; max-height: 160px; padding: 10px; outline: none; }
@media (max-width: 900px) { .composer { bottom: 84px; } }
.typing { display: inline-flex; gap: 4px; padding: 14px 16px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.mic.on { background: var(--bad); color: #fff; border-color: var(--bad); animation: pulse 1.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--bad) 50%, transparent); } 70% { box-shadow: 0 0 0 12px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ---------- Prose (AI explanations) ---------- */
.prose { line-height: 1.65; }
.prose p { margin: 0 0 .8em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 .9em; }
.prose li { margin: .25em 0; }
.prose h3, .prose h4 { margin: 1.1em 0 .4em; }
.prose code { background: var(--bg-sunk); padding: 1px 6px; border-radius: 6px; font-size: .9em; }
.prose strong { font-weight: 650; }
.prose h3 { font-size: 1.15rem; }
.prose h4 { font-size: 1rem; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 1.2em 0; }
.prose blockquote { margin: 0 0 .9em; padding: 10px 14px; border-left: 3px solid var(--gold); background: var(--gold-soft); border-radius: 0 10px 10px 0; }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose .table-wrap { overflow-x: auto; margin: 0 0 .9em; }
.prose .table-wrap table.simple { min-width: 32rem; line-height: 1.45; }
.prose .table-wrap th { white-space: nowrap; }
/* On a phone each row of a model's table becomes a small card: the first cell as its title, the rest labelled. */
@media (max-width: 640px) {
  .prose .table-wrap table.simple { min-width: 0; }
  .prose .table-wrap thead { display: none; }
  .prose .table-wrap tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .prose .table-wrap td { display: block; padding: 2px 0; border: 0; }
  .prose .table-wrap td:first-child { font-weight: 650; padding-bottom: 4px; }
  .prose .table-wrap td:not(:first-child)::before { content: attr(data-label) ": "; color: var(--ink-3); font-size: .85em; }
}

.callout { display: flex; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--info-soft); color: var(--ink); }
.callout.warn { background: var(--gold-soft); }
.callout.ok { background: var(--ok-soft); }
.callout.bad { background: var(--bad-soft); }
.callout .ico { color: var(--info); margin-top: 2px; }

.speak { border: 0; background: var(--bg-sunk); width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; cursor: pointer; color: var(--ink-2); flex: none; vertical-align: middle; }
.speak:hover { background: var(--brand-soft); color: var(--brand); }
.speak.big { width: 56px; height: 56px; }
.speak.big .ico { width: 26px; height: 26px; }
.speak.is-speaking, .btn.is-speaking { background: var(--brand-soft); color: var(--brand); }
.speak-pair { display: inline-flex; align-items: center; gap: 4px; flex: none; }

.dropzone { display: block; border: 2px dashed var(--line-strong); border-radius: 16px; padding: 22px; text-align: center; background: var(--bg-sunk); cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.over { border-color: var(--brand); background: var(--brand-soft); }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.thumbs figure { margin: 0; position: relative; width: 88px; height: 88px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.thumbs button { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgb(0 0 0 / .6); color: #fff; cursor: pointer; font-size: 13px; line-height: 1; }

.diff del { background: var(--bad-soft); color: var(--bad); text-decoration: line-through; border-radius: 4px; padding: 0 3px; }
.diff ins { background: var(--ok-soft); color: var(--ok); text-decoration: none; border-radius: 4px; padding: 0 3px; font-weight: 600; }

/* Stage path */
.stages { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.stage-chip {
  flex: none; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px;
  border: 1.5px solid var(--line); background: var(--bg-elev); cursor: pointer; min-width: 150px; text-align: left;
}
.stage-chip[aria-selected="true"] { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 14%, transparent); }
.stage-chip .lvl { font: 700 .8rem/1 var(--font); padding: 6px 7px; border-radius: 8px; color: #fff; }
.stage-chip small { display: block; color: var(--ink-3); font-size: .74rem; }

/* Login */
.login {
  min-height: 100dvh; display: grid; grid-template-columns: 1.1fr 1fr;
}
.login-art {
  position: relative; overflow: hidden; padding: 48px; color: #fff; display: flex; flex-direction: column; justify-content: space-between;
  background:
    radial-gradient(90% 70% at 85% 10%, color-mix(in srgb, var(--gold) 55%, transparent), transparent 60%),
    radial-gradient(70% 60% at 0% 100%, rgb(255 255 255 / .12), transparent 60%),
    linear-gradient(150deg, #c2412d 0%, #8f2a1c 100%);
}
.login-art h1 { color: #fff; font-size: clamp(2.2rem, 4.5vw, 3.4rem); max-width: 14ch; }
.login-art p { color: rgb(255 255 255 / .85); max-width: 42ch; font-size: 1.05rem; }
.login-words { position: absolute; inset: 0; pointer-events: none; font-family: var(--font-display); color: rgb(255 255 255 / .1); }
.login-words span { position: absolute; font-size: var(--s); left: var(--x); top: var(--y); transform: rotate(var(--r)); }
.login-panel { display: grid; place-items: center; padding: 32px 20px; }
.login-box { width: 100%; max-width: 380px; }
.gbtn { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; padding: 13px 18px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--bg-elev); font-weight: 600; cursor: pointer; box-shadow: var(--shadow-1); color: var(--ink); }
.gbtn:hover { text-decoration: none; box-shadow: var(--shadow-2); }
.features { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.features li { display: flex; gap: 12px; align-items: flex-start; color: rgb(255 255 255 / .92); }
.features li span:first-child { width: 30px; height: 30px; border-radius: 9px; background: rgb(255 255 255 / .16); display: grid; place-items: center; flex: none; }
@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; min-height: 0; }
  .login-art { padding: 32px 20px; min-height: 0; }
}
.login-now { font-size: .95rem !important; padding: 10px 14px; border-radius: 12px; background: rgb(255 255 255 / .12); }
.lp-tour { margin-top: 18px; background: rgb(255 255 255 / .14); color: #fff; border-color: rgb(255 255 255 / .35); }
.lp-tour:hover { background: rgb(255 255 255 / .22); border-color: #fff; }

/* One-pager below the login hero: tokens only, so both themes hold. */
.lp { max-width: 1080px; margin: 0 auto; padding: 24px 20px 64px; display: grid; gap: 64px; }
.lp-sec { scroll-margin-top: 20px; }
.lp h2 { font: 600 clamp(1.6rem, 3vw, 2.2rem)/1.15 var(--font-display); letter-spacing: -.02em; margin: 0 0 18px; text-wrap: balance; }
.lp h3 { font-size: 1.05rem; margin: 0 0 6px; }
.lp p { margin: 0; color: var(--ink-2); }
.lp-lead { margin: -8px 0 20px !important; max-width: 60ch; }
.lp-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; counter-reset: none; }
.lp-steps li { display: flex; gap: 14px; align-items: flex-start; }
.lp-num { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font: 700 1.1rem/1 var(--font-display); color: var(--brand-ink); background: var(--brand); }
.lp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.lp-card { padding: 20px; border-radius: var(--radius); background: var(--bg-elev); border: 1px solid var(--line); }
.lp-ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--bg-sunk); font-size: 1.25rem; margin-bottom: 12px; }
.lp-who { padding: 4px 0 4px 16px; border-left: 3px solid var(--gold); }
.lp-langs { display: grid; gap: 12px; }
.lp-lang { display: grid; grid-template-columns: 170px 1fr; gap: 16px; align-items: start; padding: 16px 0; border-top: 1px solid var(--line); }
.lp-lang .badge { justify-self: start; }
.lp-faq { display: grid; gap: 10px; max-width: 760px; }
.lp-faq details { padding: 14px 18px; border-radius: 14px; background: var(--bg-elev); border: 1px solid var(--line); }
.lp-faq summary { cursor: pointer; font-weight: 600; }
.lp-faq details p { margin-top: 8px; }
.lp-cta { text-align: center; padding: 40px 20px; border-radius: 24px; background: var(--brand-soft); display: grid; gap: 12px; justify-items: center; }
.lp-cta h2 { margin: 0; }
@media (max-width: 600px) {
  .lp { gap: 48px; padding-inline: 16px; }
  .lp-lang { grid-template-columns: 1fr; gap: 8px; }
}

/* Toast */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 100; display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 900px) { .toasts { left: 16px; bottom: 96px; } }
.toast { padding: 12px 16px; border-radius: 12px; background: var(--ink); color: var(--bg); box-shadow: var(--shadow-2); font-size: .92rem; font-weight: 520; animation: rise .25s ease; max-width: 420px; }
.toast.bad { background: var(--bad); color: #fff; }
.toast.ok { background: var(--ok); color: #fff; }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } }

/* Sheet (mobile "more" menu) and modal */
.sheet-backdrop { position: fixed; inset: 0; background: rgb(0 0 0 / .35); z-index: 50; animation: fade .2s; }
.sheet { position: fixed; left: 8px; right: 8px; bottom: 8px; z-index: 51; background: var(--bg-elev); border-radius: 22px; padding: 10px; box-shadow: var(--shadow-2); animation: rise .25s ease; }
.sheet .nav-link { padding: 14px; }
@keyframes fade { from { opacity: 0; } }
dialog.ask { width: min(440px, calc(100vw - 32px)); padding: 22px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-elev); color: var(--ink); box-shadow: var(--shadow-2); animation: rise .2s ease; }
dialog.ask::backdrop { background: rgb(0 0 0 / .45); animation: fade .2s; }
dialog.ask p { line-height: 1.5; color: var(--ink-2); }
.ask-actions { justify-content: flex-end; gap: 8px; margin-top: 6px; }

.skeleton { border-radius: 12px; background: linear-gradient(90deg, var(--bg-sunk), var(--line), var(--bg-sunk)); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid color-mix(in srgb, currentColor 25%, transparent); border-top-color: currentColor; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-block { display: grid; place-items: center; gap: 12px; padding: 48px 16px; color: var(--ink-3); text-align: center; }

.empty { text-align: center; padding: 36px 16px; color: var(--ink-3); }
.empty .emoji-tile { margin: 0 auto 12px; }

details.disclosure { border: 1px solid var(--line); border-radius: 14px; background: var(--bg-elev); }
details.disclosure > summary { cursor: pointer; padding: 14px 16px; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 10px; }
details.disclosure > summary::-webkit-details-marker { display: none; }
details.disclosure > summary::after { content: "▾"; margin-left: auto; color: var(--ink-3); transition: transform .2s; }
details.disclosure[open] > summary::after { transform: rotate(180deg); }
details.disclosure > .body { padding: 0 16px 16px; }

table.simple { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.simple th, table.simple td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.simple th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); font-weight: 650; }

::view-transition-old(root), ::view-transition-new(root) { animation-duration: .18s; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media (max-width: 700px) { .hide-sm { display: none; } }
.split { display: grid; grid-template-columns: minmax(0, 330px) minmax(0, 1fr); gap: 20px; align-items: start; }
.split > .side { position: sticky; top: 20px; }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); } .split > .side { position: static; } }
input[type=range], input[type=checkbox] { accent-color: var(--brand); }
button.list-item { border: 0; background: none; font: inherit; color: inherit; cursor: pointer; }
.divider { display: flex; align-items: center; gap: 12px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Rhythm: 14-day calendar of the group (members × days) */
.rhythm-cal { max-width: 560px; display: grid; grid-template-columns: minmax(0, 72px) repeat(14, minmax(0, 1fr)); gap: 3px; align-items: center; }
.rhythm-cal .who { font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 4px; }
.rhythm-cal .dh { font-size: .62rem; text-align: center; color: var(--ink-3); }
.rhythm-cal .dh.mon { font-weight: 700; }
.rhythm-cal i { display: block; aspect-ratio: 1; border-radius: 4px; background: var(--bg-sunk); }
.rhythm-cal i.met { background: var(--ok); }
.rhythm-cal i.frozen { background: color-mix(in srgb, var(--info) 55%, var(--bg-sunk)); }
.rhythm-cal i.missed { background: color-mix(in srgb, var(--bad) 30%, var(--bg-sunk)); }
.rhythm-cal i.pending { background: transparent; border: 2px dashed var(--line-strong, var(--line)); }
.rhythm-cal i.out { background: transparent; }
.rhythm-legend { display: flex; flex-wrap: wrap; gap: 12px; }
.rhythm-legend span { display: inline-flex; align-items: center; gap: 5px; }
.rhythm-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

[hidden] { display: none !important; }

/* Home: the group comes first. Seats around the shared fire, each ring is that person's minimum today. */
.hero-group { padding-right: clamp(22px, 4vw, 40px); }
.hero-fire { position: absolute; top: clamp(18px, 3vw, 28px); right: clamp(18px, 3vw, 28px); display: grid; justify-items: center; color: #fff; text-align: center; line-height: 1.05; }
.hero-fire .ico { width: 30px; height: 30px; color: var(--gold); }
.hero-fire b { font: 700 2.4rem/1 var(--font-display); margin-top: 2px; }
.hero-fire span { font-size: .72rem; opacity: .85; }
.hero-group h1, .hero-group > .eyebrow, .hero-group > p { padding-right: 84px; }
.hero-row { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 32px; margin-top: 16px; }
.seats { display: flex; flex-wrap: wrap; gap: 14px 18px; }
.hero-row.solo { flex-wrap: nowrap; }
.hero-row.solo .hero-actions { flex: 1; min-width: 0; }
/* Next steps can be long (a grammar topic, a writing prompt): they wrap, and stack on a phone. */
.hero-actions { min-width: 0; max-width: 100%; }
.hero-actions .btn { white-space: normal; text-align: left; max-width: 100%; }
@media (max-width: 560px) { .hero-actions { flex-direction: column; align-items: stretch; gap: 8px; width: 100%; } .hero-actions .btn { justify-content: flex-start; padding-inline: 14px; } }
.seat { display: grid; justify-items: center; align-content: start; gap: 2px; color: #fff; text-decoration: none; min-width: 64px; }
.seat b { font-size: .9rem; }
.seat-who { display: grid; justify-items: center; align-content: start; gap: 2px; color: inherit; text-decoration: none; }
.seat-who > span:last-child { font-size: .72rem; opacity: .85; }
.seat-nudge { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; padding: 3px 10px 3px 7px; border: 0; border-radius: 999px; background: #fff; color: var(--brand); font: inherit; font-size: .72rem; font-weight: 700; cursor: pointer; }
.seat-nudge .pict { width: 16px; height: 16px; }
.seat-nudge:hover { background: var(--gold); color: #3a2a00; }
.seat-nudge:disabled { background: rgb(255 255 255 / .2); color: #fff; cursor: default; padding-left: 10px; }
.nudge-note { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 14px; border-radius: 14px; background: rgb(255 255 255 / .16); max-width: 60ch; }
.nudge-note .pict { width: 30px; height: 30px; flex: none; }
.seat-ring { position: relative; padding: 4px; border-radius: 50%; background: conic-gradient(#fff calc(var(--p) * 1%), rgb(255 255 255 / .22) 0); }
.seat.met .seat-ring { background: var(--gold); }
.seat.frozen .seat-ring { background: rgb(255 255 255 / .55); }
.seat-ring .avatar { border: 3px solid var(--brand); }
.seat-ok { position: absolute; right: -2px; bottom: -2px; width: 20px; height: 20px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; border: 2px solid var(--brand); }
.seat-ok .ico { width: 12px; height: 12px; stroke-width: 3; }
.week-card { color: inherit; text-decoration: none; }
.week-rows { display: grid; grid-template-columns: minmax(0, max-content) 1fr auto; gap: 8px 12px; align-items: center; }
.week-dots { display: flex; gap: 5px; }
.week-dots i { flex: 1; max-width: 34px; height: 10px; border-radius: 5px; background: var(--bg-sunk); }
.week-dots i.on { background: var(--ok); }

/* Pictograms (picts.js): line in the text colour over an off-register patch of colour. */
.pict { width: 1em; height: 1em; display: inline-block; vertical-align: -0.15em; flex: none; color: var(--ink); overflow: visible; }
.pict-a { fill: var(--pa)}
.pa-g { --pa: var(--pa-g); } .pa-b { --pa: var(--pa-b); } .pa-o { --pa: var(--pa-o); } .pa-i { --pa: var(--pa-i); }
.pict-txt { font: 700 6.4px/1 var(--font); fill: currentColor; stroke: none; letter-spacing: .02em; }
.emoji-tile .pict { width: 62%; height: 62%; }
.avatar .pict { width: 70%; height: 70%; }
.choice .big .pict { width: 1.5em; height: 1.5em; }
.hero .pict { color: #fff; }
.hero-deco .pict { color: rgb(255 255 255 / .1); }
.hero-deco .pict-a { fill: rgb(255 255 255 / .05); }
.hero-fire .pict { width: 34px; height: 34px; color: #fff; }
.lp-ico .pict { width: 26px; height: 26px; }
/* "Skąd biorą się punkty?" next to the daily minimum. */
.points-help { font-size: .82rem; color: var(--ink-2); }
.points-help summary { cursor: pointer; color: var(--brand); font-weight: 600; width: fit-content; }
.points-help p { margin: 8px 0; max-width: 72ch; }
.points-help ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 4px 20px; max-width: 760px; }
.points-help li { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dashed var(--line); padding: 3px 0; }
.points-help li b { white-space: nowrap; color: var(--ink); }

.flash-deck { display: inline-flex; align-items: center; gap: 6px; }
.flash-deck .pict { width: 18px; height: 18px; }

/* "Teraz" / "Dalej": the suggested next step */
.next-step { gap: 16px; flex-wrap: nowrap; border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand) inset; }
.next-step .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.next-step .eyebrow { margin: 0; }
.next-step b { font-size: 1.1rem; }
.next-alt { gap: 8px 12px; justify-content: space-between; padding: 0 4px; }
.next-alt .select { width: auto; max-width: 220px; }

/* Grammar (views/grammar-topic.js) */
.rule summary { cursor: pointer; list-style: none; display: flex; gap: 6px; align-items: baseline; }
.rule summary::-webkit-details-marker { display: none; }
.rule summary::before { content: '▸'; color: var(--ink-3); transition: transform .15s; }
.rule[open] summary::before { transform: rotate(90deg); }
.rule[open] { display: grid; gap: 10px; }
.conj-tables { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.conj { padding: 10px 12px; border-radius: 12px; background: var(--bg-sunk); }
.conj table { border-collapse: collapse; margin-top: 4px; width: 100%; }
.conj td { padding: 2px 8px 2px 0; vertical-align: baseline; }
.conj td:first-child { font-size: .75rem; width: 1%; white-space: nowrap; }
.ex-sentence { font-size: 1.35rem; line-height: 1.7; }
.ex-sentence .speak { vertical-align: middle; margin-left: 6px; }
.ex-sentence .gap { display: inline-block; margin: 0 4px; min-width: 3.5em; padding: 0 6px; border-bottom: 2px solid var(--brand); font-weight: 650; text-align: center; }
.ex-sentence .gap.ok { color: var(--ok); border-color: var(--ok); }
.ex-sentence .gap.bad { color: var(--bad); border-color: var(--bad); }
.feedback { padding: 12px 14px; border-radius: 12px; display: grid; gap: 4px; }
.feedback.ok { background: var(--ok-soft); color: var(--ok); }
.feedback.bad { background: var(--bad-soft); }
.feedback.bad b { color: var(--bad); }
.feedback.gold { background: var(--gold-soft); }

/* Letters with accents under a field (ui.js letters) */
.letters { display: flex; flex-wrap: wrap; gap: 6px; }
.letters button { min-width: 36px; height: 36px; padding: 0 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-elev);
  color: var(--ink); font: inherit; font-size: 1.05rem; cursor: pointer; }
.letters button:hover { border-color: var(--line-strong); background: var(--bg-sunk); }
.letters button:active { transform: scale(.94); }
.flash .letters { justify-content: center; margin-top: 10px; }
