/* Cognitive English — Styleguide v1.4 */

@font-face {
  font-family: "Roboto";
  src: url("../fonts/roboto-var.woff") format("woff");
  font-weight: 100 900;
  font-stretch: 75% 100%;
  font-display: swap;
}

/* Znaki fonetyczne (IPA), których nie ma w Roboto: ɪ ʊ ɒ ˈ ˌ ː itd. */
@font-face {
  font-family: "IPA Fallback";
  src: url("../fonts/ipa-dejavu.woff") format("woff");
  unicode-range: U+0250-02FF;
  font-display: swap;
}

:root {
  --parchment: #F5F2EA;
  --surface: #FAF8F3;
  --card: #FFFFFF;
  --line: #E5E0D5;
  --forest: #264635;
  --forest-hover: #1d3829;
  --sage: #6B8E78;
  --sage-soft: #DDE5DC;
  --ochre: #D99B38;
  --ink: #1F2421;
  --ink-soft: #4A524D;

  --srs-again: #C96A5B;
  --srs-hard: #C88A4B;
  --srs-good: #6E947B;
  --srs-easy: #7FA6AD;

  --radius-card: 18px;
  --radius-rate: 12px;
  --radius-pill: 999px;
  --shadow-card: 0 1px 2px rgba(31, 36, 33, .05), 0 4px 14px rgba(31, 36, 33, .06);

  --font: "Roboto", "IPA Fallback", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 4vw, 32px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--parchment);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--ochre); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { margin: 0; font-stretch: 85%; font-weight: 700; line-height: 1.15; letter-spacing: -.01em; }
p { margin: 0; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Przyciski ─────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 52px; padding: 0 28px;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  font-size: 18px; font-weight: 500; text-decoration: none;
  transition: background-color .15s, transform .1s;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--forest); color: #fff; }
.btn-primary:hover { background: var(--forest-hover); }
.btn-secondary { background: transparent; border-color: var(--forest); color: var(--forest); }
.btn-secondary:hover { background: rgba(38, 70, 53, .06); }
.btn-block { width: 100%; }
.btn svg, .btn-link svg { width: 22px; height: 22px; flex: none; }
.btn-link { display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; padding: 8px 4px; color: var(--forest); text-decoration: underline; text-underline-offset: 3px; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: #ECE7DB; color: var(--forest);
}
.icon-btn:hover { background: #E3DDCE; }
.icon-btn svg { width: 24px; height: 24px; }

.pill {
  display: inline-flex; align-items: center; height: 36px; padding: 0 14px;
  border-radius: var(--radius-pill); border: 0;
  background: #ECE7DB; color: var(--ink); font-size: 15px; font-weight: 500; white-space: nowrap;
}
.pill:hover { background: #E3DDCE; }

/* ── Ekran ładowania ───────────────────────── */
.boot { min-height: 100dvh; display: grid; place-items: center; }
.boot img { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }

/* ── Ekran startowy ────────────────────────── */
.start {
  min-height: 100dvh;
  max-width: 560px; margin: 0 auto;
  padding: var(--gutter) var(--gutter) calc(var(--gutter) + var(--safe-bottom));
  display: flex; flex-direction: column; justify-content: center; gap: 20px;
}
.brand-card {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 20px; border-radius: var(--radius-card);
  background: #EFE9DB;
}
.brand-card img { width: 76px; height: 76px; flex: none; }
.brand-card h1 { font-size: clamp(26px, 6.5vw, 32px); color: var(--forest); }
.brand-card p { font-size: 17px; color: var(--ink); margin-top: 2px; }

.hero-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  padding: 20px 20px 28px; border-radius: var(--radius-card);
  background: #EFE9DB; text-align: center;
}
.hero-card img { width: 100%; max-width: 460px; height: auto; aspect-ratio: 4 / 3; }
.hero-card h2 { font-size: clamp(26px, 7vw, 34px); }
.hero-card p { font-size: 18px; color: var(--ink); max-width: 30ch; }
.start-actions { display: grid; gap: 8px; padding-top: 4px; }


/* ── Dashboard ─────────────────────────────── */
.page {
  max-width: 1040px; margin: 0 auto;
  padding: 16px var(--gutter) calc(32px + var(--safe-bottom));
}
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0 20px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand img { width: 52px; height: 52px; }
.brand span { font-stretch: 85%; font-weight: 700; font-size: 19px; line-height: 1.05; }
.topbar-right { display: flex; align-items: center; gap: 10px; }

.greeting { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 18px; }
.greeting h1 { font-size: clamp(30px, 8vw, 40px); }
.sync-status { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink-soft); }
.sync-status svg { width: 20px; height: 20px; }

.goal-card {
  padding: 22px 24px; border-radius: var(--radius-card);
  background: var(--sage-soft); margin-bottom: 22px;
}
.goal-card h2 { font-size: 24px; margin-bottom: 6px; }
.goal-stats { display: flex; flex-wrap: wrap; gap: 2px 0; font-size: 17px; color: var(--ink); margin-bottom: 18px; }
.goal-stats span:not(:last-child)::after { content: "•"; margin: 0 .45em; color: var(--ink-soft); }

.modules { display: grid; gap: 14px; grid-template-columns: 1fr; }
.tile {
  display: flex; align-items: center; gap: 18px; width: 100%;
  padding: 16px 20px; border-radius: var(--radius-card);
  border: 1px solid var(--line); background: var(--card);
  box-shadow: var(--shadow-card); text-align: left;
  transition: transform .12s, box-shadow .12s;
}
.tile:hover { transform: translateY(-1px); box-shadow: 0 2px 4px rgba(31,36,33,.06), 0 8px 22px rgba(31,36,33,.08); }
.tile img { width: 64px; height: 64px; flex: none; }
.tile-title { display: block; font-size: 22px; font-weight: 700; font-stretch: 85%; line-height: 1.15; margin-bottom: 2px; }
.tile-desc { display: block; font-size: 15.5px; color: var(--ink-soft); line-height: 1.3; }
.tile .soon { display: inline-block; margin-left: 6px; font-size: 12px; font-weight: 500; font-stretch: 100%; letter-spacing: .02em;
  vertical-align: middle; padding: 2px 8px; border-radius: 99px; background: #F3EBDA; color: #8A6420; }

@media (min-width: 700px) {
  .modules { grid-template-columns: repeat(2, 1fr); }
  .tile img { width: 72px; height: 72px; }
}
@media (min-width: 1000px) {
  .dash-grid { display: grid; grid-template-columns: 1fr; }
  .modules { grid-template-columns: repeat(3, 1fr); }
  .goal-card { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
  .goal-card .goal-stats { margin-bottom: 0; }
}

/* ── Ustawienia ────────────────────────────── */
.settings { max-width: 640px; }
.back { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 12px -8px; }
.settings h1 { font-size: 32px; margin-bottom: 18px; }
.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-card);
  padding: 20px; margin-bottom: 18px; box-shadow: var(--shadow-card);
}
.panel h2 { font-size: 21px; margin-bottom: 4px; }
.panel .hint { font-size: 15px; color: var(--ink-soft); margin-bottom: 14px; }
.field { display: grid; gap: 6px; margin-top: 14px; }
.field label { font-size: 15px; font-weight: 500; }
.field input, .field select {
  height: 50px; padding: 0 16px; border-radius: 14px;
  border: 1.5px solid var(--line); background: var(--surface);
}
.field input:focus, .field select:focus { border-color: var(--forest); outline: none; box-shadow: 0 0 0 3px rgba(38,70,53,.15); }
.field-row { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px; border-radius: 16px; background: var(--surface); border: 1.5px solid var(--line); }
.segmented label { display: grid; place-items: center; height: 42px; border-radius: 12px; font-weight: 500; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented input:checked + span { background: var(--forest); color: #fff; }
.segmented span { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 12px; }
.segmented input:focus-visible + span { outline: 3px solid var(--ochre); }
.backup-actions { display: grid; gap: 10px; }
@media (min-width: 560px) { .backup-actions { grid-template-columns: 1fr 1fr; } }
.backup-meta { font-size: 15px; color: var(--ink-soft); margin-top: 12px; }
.backup-meta.warn { color: #8A4A3E; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* ── Okno dialogowe ────────────────────────── */
dialog {
  border: 0; padding: 24px; border-radius: 20px; max-width: min(440px, calc(100vw - 32px));
  background: var(--card); color: var(--ink); box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
dialog::backdrop { background: rgba(31, 36, 33, .4); }
dialog h2 { font-size: 22px; margin-bottom: 8px; }
dialog p { font-size: 16px; color: var(--ink-soft); margin-bottom: 18px; }
dialog .dialog-actions { display: grid; gap: 10px; }

/* ── Powiadomienie ─────────────────────────── */
.toast {
  position: fixed; left: 50%; top: calc(14px + env(safe-area-inset-top, 0px)); transform: translateX(-50%);
  max-width: calc(100vw - 32px); padding: 12px 20px; border-radius: 14px;
  background: var(--ink); color: #fff; font-size: 15px; box-shadow: 0 8px 24px rgba(0,0,0,.18); z-index: 10;
}

/* ── Błąd ──────────────────────────────────── */
.error-screen { max-width: 520px; margin: 0 auto; padding: 48px var(--gutter); text-align: center; display: grid; gap: 14px; justify-items: center; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Zapis fonetyczny */
.ipa { font-family: "IPA Fallback", var(--font); letter-spacing: .01em; }

/* ── Sesja nauki ───────────────────────────── */
.study { min-height: 100dvh; display: flex; flex-direction: column; }
.study-bar {
  position: sticky; top: 0; z-index: 3; width: 100%; max-width: 760px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px; padding: 12px var(--gutter);
  background: var(--parchment);
}
.progress { flex: 1; height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: 99px; background: var(--sage); transition: width .3s; }
.progress-label { min-width: 3.5em; text-align: right; font-size: 14px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.study-main { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 4px var(--gutter) 24px; }
.study-card {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 20px;
  background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-card);
}
@media (min-width: 700px) { .study-card { padding: 28px 32px; } }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 4px 11px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; font-weight: 500; color: var(--ink-soft); }
.chip-new { background: #F6EAD2; border-color: #EBD3A6; color: #7A5518; }
.chip-review { background: var(--sage-soft); border-color: #C9D6CB; color: #2F4F3C; }
.chip-link { background: #fff; color: var(--forest); font-weight: 600; }

.word-figure { margin: 0; width: 100%; height: min(68vw, 340px); border-radius: 16px; background: var(--surface); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.word-figure img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }

.term { font-size: clamp(38px, 10vw, 52px); color: var(--forest); }
.ipa-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 8px; }
.ipa { font-size: 20px; color: var(--ink-soft); font-family: "IPA Fallback", var(--font); }
.audio-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 13px;
  border-radius: 99px; border: 1.5px solid var(--line); background: var(--surface);
  font-size: 14px; font-weight: 600; color: var(--forest); justify-self: start;
}
.audio-btn:hover { background: #EFEADF; }
.audio-btn svg, .say-inline svg { width: 18px; height: 18px; }
.say-inline { border: 0; background: none; color: var(--sage); padding: 2px 4px; vertical-align: -3px; }

.def-pl { font-size: 22px; font-weight: 600; line-height: 1.3; }
.def-en { margin-top: 4px; font-size: 16.5px; color: var(--ink-soft); font-style: italic; }
.section-title { margin-bottom: 10px; font-size: 13px; font-weight: 600; font-stretch: 100%; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-soft); }
.examples { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.examples li { padding-left: 14px; border-left: 3px solid var(--sage-soft); }
.ex-en { font-size: 18px; }
.ex-pl { font-size: 15.5px; color: var(--ink-soft); margin-top: 2px; }
mark { padding: 0 3px; border-radius: 4px; background: #F6E3BD; color: inherit; font-weight: 600; }
mark.ok { background: #D5E7DA; } mark.warn { background: #F6E3BD; } mark.bad { background: #F2D3CD; }

.think { padding: 16px 18px; border-radius: 16px; background: #FBF3E3; border: 1px solid #EFDDB8; }
.think-title { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 18px; color: #7A5518; }
.think-title svg { width: 22px; height: 22px; color: var(--ochre); }
.alts { margin: 0; padding-left: 18px; display: grid; gap: 4px; color: var(--ink-soft); }
.alts strong { color: var(--ink); }

.sticky-footer {
  position: sticky; bottom: 0; z-index: 3;
  padding: 18px var(--gutter) calc(14px + var(--safe-bottom));
  background: linear-gradient(to top, var(--parchment) 70%, rgba(245, 242, 234, 0));
}
.footer-inner { max-width: 760px; margin: 0 auto; }

/* Powtórka */
.prompt { font-size: 17px; color: var(--ink-soft); }
.sentence-card { display: grid; gap: 10px; padding: 20px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.sentence-en { font-size: clamp(21px, 5.4vw, 26px); line-height: 1.5; }
.sentence-pl { font-size: 16.5px; color: var(--ink-soft); }
.gap { display: inline-block; min-width: 5.5em; height: 1.1em; vertical-align: -3px; border-bottom: 3px solid var(--ochre); }
.answer-row { display: flex; gap: 8px; min-width: 0; }
.answer-row .btn { padding: 0 20px; flex: none; }
.answer-input {
  flex: 1; min-width: 0; height: 54px; padding: 0 18px; border-radius: 16px;
  border: 1.5px solid var(--line); background: #fff; font-size: 19px;
}
.answer-input:focus { outline: none; border-color: var(--forest); box-shadow: 0 0 0 3px rgba(38, 70, 53, .15); }
.hint-btn { justify-self: start; }
.feedback { padding: 12px 16px; border-radius: 14px; font-weight: 500; }
.feedback svg { width: 20px; height: 20px; vertical-align: -4px; margin-right: 4px; }
.fb-ok { background: #E3EEE6; color: #22513A; }
.fb-warn { background: #F6EAD2; color: #6E4C14; }
.fb-bad { background: #F5E1DD; color: #8A3D31; }
.fb-neutral { background: var(--surface); color: var(--ink); }
.mini-word { display: grid; gap: 6px; padding-top: 4px; border-top: 1px solid var(--line); padding-top: 16px; }
.mini-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.mini-term { font-size: 26px; font-weight: 700; font-stretch: 85%; color: var(--forest); }
.mini-think { color: var(--ink-soft); font-size: 16px; }

.rate-hint { text-align: center; font-size: 14px; color: var(--ink-soft); margin-bottom: 8px; }
.rating { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.rate-wrap { display: grid; gap: 4px; text-align: center; }
.rate-time { font-size: 13px; font-weight: 500; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.rate {
  min-height: 56px; padding: 6px 4px; border: 0; border-radius: var(--radius-rate);
  color: var(--ink); font-size: 15px; font-weight: 600; line-height: 1.15;
  transition: transform .1s, filter .15s;
}
.rate:hover { filter: brightness(1.05); }
.rate:active { transform: scale(.97); }
.rate-again { background: var(--srs-again); }
.rate-hard { background: var(--srs-hard); }
.rate-good { background: var(--srs-good); }
.rate-easy { background: var(--srs-easy); }
.rate.suggested { box-shadow: 0 0 0 3px var(--parchment), 0 0 0 5.5px var(--forest); }

/* Koniec sesji */
.done-card { justify-items: center; text-align: center; padding: 36px 24px; }
.done-card h1 { font-size: 32px; }
.done-stats { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.done-stats li { padding: 10px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.done-stats strong { font-size: 22px; color: var(--forest); margin-right: 4px; }

/* ── Ustawienia: przełącznik ───────────────── */
.check-field { display: flex; align-items: flex-start; gap: 12px; margin-top: 16px; cursor: pointer; }
.check-field input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--forest); flex: none; }
.check-field small { color: var(--ink-soft); font-size: 14px; }

/* ── Policzalność ──────────────────────────── */
.count-box { padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); }
.count-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .count-grid { grid-template-columns: 1fr 1fr; } }
.count-sense { display: grid; gap: 6px; align-content: start; padding: 14px; border-radius: 14px; background: #fff; border: 1px solid var(--line); }
.count-figure { margin: 0 0 4px; height: 150px; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--surface); overflow: hidden; }
.count-figure img { max-width: 100%; max-height: 100%; width: auto; height: auto; }
.count-chip { display: inline-block; justify-self: start; padding: 3px 10px; border-radius: 99px; font-size: 13px; font-weight: 700; }
.count-c { background: #DDE5DC; color: #22513A; }
.count-u { background: #F6E3BD; color: #6E4C14; }
.count-f { background: #E6E1F0; color: #4A3D6B; }
.count-meaning { font-weight: 600; }
.count-signals { font-size: 14px; color: var(--ink-soft); }
.count-signals code { font-family: inherit; padding: 1px 6px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); white-space: nowrap; line-height: 2; }
.count-note { margin-top: 10px; font-size: 15px; color: var(--ink-soft); }
.count-line { font-size: 15px; color: var(--ink-soft); }

/* ── Karta powtórki z odwracaniem ──────────── */
.review-chips { margin-bottom: 12px; }
.flip-card {
  min-height: min(58vh, 460px); perspective: 1200px;
  background: var(--card); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-card);
  display: grid;
}
.flip-face { display: grid; align-content: center; gap: 16px; padding: 28px 24px; }
@media (min-width: 700px) { .flip-face { padding: 40px 48px; } }
.flip-front { text-align: center; justify-items: center; }
.flip-prompt { font-size: 14px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.sentence-main { font-size: clamp(24px, 6.4vw, 32px); line-height: 1.4; font-weight: 500; }
.sentence-sub { font-size: 17px; color: var(--ink-soft); }
.flip-target { font-size: 16px; color: var(--ink-soft); }
.flip-target strong { color: var(--forest); }
.flip-anim { animation: flip-in .38s ease-out; }
@keyframes flip-in { from { transform: rotateY(-90deg); opacity: .4; } to { transform: rotateY(0); opacity: 1; } }
.btn svg { width: 20px; height: 20px; }

/* ── Słownictwo ────────────────────────────── */
.vocab { max-width: 880px; }
.page-head { margin-bottom: 16px; }
.page-head h1 { font-size: 32px; }
.search input, .list-search {
  width: 100%; height: 50px; padding: 0 18px; border-radius: 16px;
  border: 1.5px solid var(--line); background: #fff; font-size: 17px;
}
.search input:focus, .list-search:focus { outline: none; border-color: var(--forest); box-shadow: 0 0 0 3px rgba(38, 70, 53, .15); }
.search { margin-bottom: 18px; }
.group-title { margin: 26px 0 10px; font-size: 14px; font-weight: 600; font-stretch: 100%; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-soft); }
.deck-grid { display: grid; gap: 14px; }
@media (min-width: 720px) { .deck-grid { grid-template-columns: 1fr 1fr; } }
.deck-card { display: grid; gap: 12px; padding: 18px 20px; border-radius: var(--radius-card); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-card); }
.deck-card.is-empty { background: var(--surface); box-shadow: none; border-style: dashed; }
.deck-all { background: var(--sage-soft); border-color: #C9D6CB; box-shadow: none; }
.deck-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.deck-top h3 { font-size: 22px; }
.deck-count { font-size: 15px; color: var(--ink-soft); margin-top: 2px; }
.deck-bar { display: flex; height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.seg-mastered { background: var(--forest); } .seg-learning { background: var(--ochre); }
.deck-stats { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; color: var(--ink-soft); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }
.dot.st-new { background: var(--line); } .dot.st-learning { background: var(--ochre); } .dot.st-mastered { background: var(--forest); }
.deck-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.deck-actions .btn { min-height: 44px; font-size: 16px; padding: 0 20px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.vocab-hint { margin-top: 22px; font-size: 14.5px; color: var(--ink-soft); }

.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; flex: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-ui { position: relative; width: 46px; height: 28px; border-radius: 99px; background: #D6D0C3; transition: background .15s; flex: none; }
.switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .15s; }
.switch input:checked + .switch-ui { background: var(--forest); }
.switch input:checked + .switch-ui::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-ui { outline: 3px solid var(--ochre); outline-offset: 2px; }
.switch-label { font-size: 13px; color: var(--ink-soft); max-width: 7.5em; line-height: 1.2; }

.list-tools { display: grid; gap: 10px; margin-bottom: 10px; }
.chip-btn { cursor: pointer; font-size: 14px; padding: 6px 12px; }
.chip-btn.is-on { background: var(--forest); border-color: var(--forest); color: #fff; }
.list-count { font-size: 14px; color: var(--ink-soft); margin: 6px 0 8px; }
.word-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.word-row {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); text-align: left;
}
.word-row:hover { border-color: var(--sage); }
.wr-main { display: grid; gap: 2px; min-width: 0; }
.wr-term { font-size: 19px; font-weight: 700; font-stretch: 85%; color: var(--forest); }
.wr-pl { font-size: 15px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wr-meta { display: flex; align-items: center; gap: 6px; flex: none; }
.status { font-size: 12.5px; font-weight: 600; padding: 3px 9px; border-radius: 99px; }
.status.st-new { background: var(--surface); color: var(--ink-soft); border: 1px solid var(--line); }
.status.st-learning { background: #F6E3BD; color: #6E4C14; }
.status.st-mastered { background: var(--sage-soft); color: #22513A; }
.word-list .empty { padding: 20px; text-align: center; color: var(--ink-soft); }

/* ── Dopasowanie kolorystyki do mockupu (v0.5) ─────────── */
.audio-btn.audio-main { background: var(--forest); border-color: var(--forest); color: #fff; }
.audio-btn.audio-main:hover { background: var(--forest-hover); }
.audio-btn.audio-soft { background: var(--sage-soft); border-color: var(--sage-soft); color: var(--forest); }

.defs { padding: 12px 16px; border-radius: 14px; background: #EEF1EA; border: 1px solid #DDE4DA; }
.defs .def-pl { display: flex; align-items: flex-start; gap: 10px; }
.defs .def-pl svg { width: 22px; height: 22px; color: var(--sage); flex: none; margin-top: 3px; }
.defs .def-en { padding-left: 32px; }

.examples li {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
  padding: 12px 14px; border-left: 0; border-radius: 14px; background: var(--surface); border: 1px solid var(--line);
}
.ex-icon svg { width: 22px; height: 22px; color: var(--sage); display: block; }
.ex-en { font-weight: 500; }
.say-round {
  width: 40px; height: 40px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: var(--sage-soft); color: var(--forest); flex: none;
}
.say-round:hover { background: #CFDBCF; }
.say-round svg { width: 20px; height: 20px; }

.think { background: #FCF6EA; border-color: #EFDDB8; }
.think-title { display: inline-flex; padding: 4px 12px 4px 8px; border-radius: 99px; background: #F6E3BD; font-size: 16px; }
.think-title svg { color: #A9701E; }

.count-grid { gap: 0; border: 1px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden; }
.count-sense { border: 0; border-radius: 0; background: transparent; }
@media (min-width: 560px) { .count-sense + .count-sense { border-left: 1px solid var(--line); } }
@media (max-width: 559px) { .count-sense + .count-sense { border-top: 1px solid var(--line); } }

/* Fiszka z obrazkiem */
.flip-face { grid-template-columns: minmax(0, 1fr); }
.flip-figure { margin: 0; height: 150px; display: flex; align-items: center; justify-content: center; }
.flip-figure img { max-width: 100%; max-height: 100%; width: auto; height: auto; }
.flip-text { display: grid; gap: 14px; justify-items: inherit; }
@media (min-width: 640px) {
  .flip-face { grid-template-columns: 220px minmax(0, 1fr); align-items: center; gap: 28px; text-align: left; justify-items: stretch; }
  .flip-figure { height: 180px; border-right: 1px solid var(--line); padding-right: 24px; }
  .flip-front { text-align: left; }
}
.btn-flip { background: var(--sage-soft); color: var(--forest); border-color: #C9D6CB; }
.btn-flip:hover { background: #CFDBCF; }

/* Oceny jak na mockupie: ikona + nazwa, czas nad przyciskiem */
.rate { display: grid; justify-items: center; gap: 4px; min-height: 68px; padding: 8px 4px; }
.rate svg { width: 24px; height: 24px; }
.rate-again { background: #D9776A; color: #fff; }
.rate-hard { background: #E8A84E; color: var(--ink); }
.rate-good { background: #B9CDBC; color: var(--ink); }
.rate-easy { background: var(--forest); color: #fff; }

/* Podgląd słówka w Słownictwie */
.preview-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.preview-actions .btn { padding: 0 16px; }
.btn-added { background: var(--sage-soft); color: #22513A; border-color: var(--sage-soft); opacity: 1 !important; cursor: default !important; }
.btn-added svg, .preview-actions svg { width: 20px; height: 20px; }
.preview-actions .btn { font-size: 16px; white-space: nowrap; padding: 0 12px; gap: 6px; }
.rate span { font-size: 14px; line-height: 1.1; }

/* ── Nagłówek karty: nazwa + wymowa obok obrazka ── */
.word-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 14px; }
.word-hero .term { font-size: clamp(30px, 8.5vw, 54px); overflow-wrap: anywhere; line-height: 1.05; }
.word-hero .ipa { margin-top: 6px; font-size: clamp(16px, 4.4vw, 21px); }
.ipa-tag { display: inline-block; min-width: 2.6em; font-family: var(--font); font-size: 12px; font-weight: 700; color: var(--sage); letter-spacing: .03em; }
.audio-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.audio-row .audio-btn { height: 34px; padding: 0 11px; font-size: 13.5px; }
.hero-figure { margin: 0; height: clamp(140px, 40vw, 280px); border-radius: 16px; background: var(--surface); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.hero-figure img { max-width: 100%; max-height: 100%; width: auto; height: auto; }
@media (min-width: 700px) { .word-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 24px; } }
/* BrE i AmE zawsze obok siebie */
.word-hero { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.audio-row { flex-wrap: nowrap; gap: 6px; }
.audio-row .audio-btn { padding: 0 10px; gap: 4px; font-size: 13px; flex: none; }
.audio-row .audio-btn svg { width: 16px; height: 16px; }
@media (min-width: 700px) { .word-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); } .audio-row .audio-btn { padding: 0 13px; font-size: 14px; } }

/* ── Górny pasek aplikacji (jak Analysis Trail) ─────────── */
.app-bar { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0 18px; }
.brand-pill {
  display: inline-flex; align-items: center; gap: 12px; min-width: 0;
  padding: 6px 18px 6px 8px; border-radius: 18px;
  border: 2px solid #CFD9CC; background: rgba(255, 255, 255, .35);
  text-decoration: none; color: var(--forest);
}
.brand-pill img { width: 40px; height: 40px; flex: none; }
.brand-divider { width: 2px; height: 30px; border-radius: 2px; background: #CFD9CC; flex: none; }
.brand-name { font-size: clamp(18px, 5vw, 23px); font-weight: 700; font-stretch: 85%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-btn { width: 48px; height: 48px; background: transparent; border: 2px solid #CFD9CC; border-radius: 16px; }
.menu-btn:hover, .menu-btn[aria-expanded="true"] { background: var(--sage-soft); }
.menu-btn svg { width: 26px; height: 26px; }

.app-menu {
  position: absolute; top: calc(100% - 8px); right: 0; z-index: 20; width: min(300px, calc(100vw - 32px));
  padding: 8px; border-radius: 20px; background: var(--parchment);
  border: 1px solid var(--line); box-shadow: 0 16px 40px rgba(31, 36, 33, .16);
}
.app-menu ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.menu-item {
  width: 100%; display: flex; align-items: center; gap: 14px; padding: 12px 14px;
  border: 0; border-radius: 14px; background: transparent; color: #5E655F;
  font-size: 17px; font-weight: 500; text-align: left;
}
.menu-item svg { width: 24px; height: 24px; flex: none; }
.menu-item:hover { background: #ECE7DB; }
.menu-item.is-active { background: var(--sage-soft); color: var(--forest); font-weight: 700; }
.menu-item small { margin-left: auto; font-size: 12px; font-weight: 500; color: #8A6420; background: #F3EBDA; padding: 2px 8px; border-radius: 99px; }
.menu-sep { height: 1px; margin: 6px 10px; background: var(--line); }

.page-tight { padding-bottom: 0; }
.greeting-pill { margin-left: auto; }
@media (max-width: 420px) { .greeting-pill { margin-left: 0; } }

/* ── Górny pasek v2: logo + nazwa + kontekst; jasny lub zielony ── */
.app-bar { display: flex; align-items: center; gap: 12px; padding: 6px 0 16px; }
.app-bar .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--forest); flex: none; }
.app-bar .brand-logo { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; flex: none; }
.app-bar .brand img { width: 40px; height: 40px; }
.app-bar .brand-name { font-size: 18px; font-weight: 700; font-stretch: 85%; line-height: 1.02; }
.app-bar .brand-divider { width: 2px; height: 32px; border-radius: 2px; background: #CFD9CC; flex: none; }
.app-context { min-width: 0; font-size: 15px; font-weight: 600; color: var(--forest); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-shortcuts { display: none; margin-left: auto; gap: 4px; }
.shortcut {
  display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 12px;
  border: 0; border-radius: 12px; background: transparent; color: var(--ink-soft); font-size: 15px; font-weight: 500;
}
.shortcut svg { width: 20px; height: 20px; }
.shortcut:hover { background: #ECE7DB; }
.shortcut.is-active { background: var(--sage-soft); color: var(--forest); font-weight: 600; }
.app-bar .menu-btn { margin-left: auto; flex: none; }
.app-menu { top: calc(100% - 4px); }
@media (min-width: 900px) {
  .app-shortcuts { display: flex; }
  .app-bar .menu-btn { margin-left: 0; }
}

/* Wersja zielona: zawsze (green) albo tylko na komputerze (auto) */
html[data-header="green"] .app-bar { --bar: 1; }
@media (min-width: 900px) { html[data-header="auto"] .app-bar { --bar: 1; } }
html[data-header="green"] .app-bar,
html[data-header="auto"] .app-bar.force-green { }
@media all {
  html[data-header="green"] .app-bar { margin: -16px calc(50% - 50vw) 18px; padding: 10px calc(50vw - 50% + var(--gutter)); background: var(--forest); }
}
@media (min-width: 900px) {
  html[data-header="auto"] .app-bar { margin: -16px calc(50% - 50vw) 18px; padding: 10px calc(50vw - 50% + var(--gutter)); background: var(--forest); }
}
:is(html[data-header="green"]) .app-bar .brand,
:is(html[data-header="green"]) .app-bar .app-context { color: #F5F2EA; }
:is(html[data-header="green"]) .app-bar .brand-logo { background: #F5F2EA; }
:is(html[data-header="green"]) .app-bar .brand-divider { background: rgba(245, 242, 234, .35); }
:is(html[data-header="green"]) .app-bar .shortcut { color: rgba(245, 242, 234, .82); }
:is(html[data-header="green"]) .app-bar .shortcut:hover { background: rgba(255, 255, 255, .08); }
:is(html[data-header="green"]) .app-bar .shortcut.is-active { background: rgba(255, 255, 255, .16); color: #fff; }
:is(html[data-header="green"]) .app-bar .menu-btn { color: #F5F2EA; border-color: rgba(245, 242, 234, .35); background: transparent; }
:is(html[data-header="green"]) .app-bar .menu-btn:hover,
:is(html[data-header="green"]) .app-bar .menu-btn[aria-expanded="true"] { background: rgba(255, 255, 255, .1); }
:is(html[data-header="green"]) .app-bar .app-menu { right: var(--gutter); }
@media (min-width: 900px) {
  html[data-header="auto"] .app-bar .brand, html[data-header="auto"] .app-bar .app-context { color: #F5F2EA; }
  html[data-header="auto"] .app-bar .brand-logo { background: #F5F2EA; }
  html[data-header="auto"] .app-bar .brand-divider { background: rgba(245, 242, 234, .35); }
  html[data-header="auto"] .app-bar .shortcut { color: rgba(245, 242, 234, .82); }
  html[data-header="auto"] .app-bar .shortcut:hover { background: rgba(255, 255, 255, .08); }
  html[data-header="auto"] .app-bar .shortcut.is-active { background: rgba(255, 255, 255, .16); color: #fff; }
  html[data-header="auto"] .app-bar .menu-btn { color: #F5F2EA; border-color: rgba(245, 242, 234, .35); background: transparent; }
  html[data-header="auto"] .app-bar .menu-btn:hover, html[data-header="auto"] .app-bar .menu-btn[aria-expanded="true"] { background: rgba(255, 255, 255, .1); }
  html[data-header="auto"] .app-bar .app-menu { right: var(--gutter); }
}
.context-bar .progress { max-width: 420px; }
.seg-3 { grid-template-columns: repeat(3, 1fr); }
.study > .page { width: 100%; }

/* ── Telefon: przyciski w dedykowanym obszarze (jak na mockupie) ── */
@media (max-width: 699px) {
  .sticky-footer {
    background: var(--card);
    border-top: 1px solid var(--line);
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -8px 24px rgba(31, 36, 33, .08);
    padding: 14px var(--gutter) calc(14px + var(--safe-bottom));
  }
  .study-main { padding-bottom: 16px; }
  .preview-actions .act-add { background: transparent; color: var(--forest); border-color: var(--forest); }
  .preview-actions .act-add:hover { background: rgba(38, 70, 53, .06); }
  .preview-actions .act-next { background: var(--forest); color: #fff; border-color: var(--forest); }
  .preview-actions .act-next:disabled { background: var(--line); border-color: var(--line); color: var(--ink-soft); opacity: 1; }
}

/* ── Nazwa aplikacji jako przycisk „Pulpit” (jak w Analysis Trail) ── */
.app-bar .brand-home {
  padding: 5px 14px 5px 5px; border-radius: 18px;
  border: 2px solid rgba(245, 242, 234, .35); transition: background-color .15s, border-color .15s;
}
.app-bar .brand-home:hover { background: rgba(255, 255, 255, .08); border-color: rgba(245, 242, 234, .6); }
.app-bar .brand-home.is-active { background: rgba(255, 255, 255, .12); border-color: rgba(245, 242, 234, .6); }
.app-bar .brand-home:focus-visible { outline: 3px solid var(--ochre); outline-offset: 2px; }

/* ── Tablet i komputer: wszystkie opcje menu na pasku, bez ☰ ── */
@media (min-width: 700px) {
  .app-bar .app-shortcuts { display: flex; margin-left: auto; gap: 2px; }
  .app-bar .menu-btn, .app-bar .app-menu { display: none; }
  .app-bar .shortcut {
    flex-direction: column; justify-content: center; gap: 3px;
    height: 58px; min-width: 76px; padding: 4px 8px; border-radius: 14px;
    font-size: 13px; line-height: 1.1;
  }
  .app-bar .shortcut svg { width: 22px; height: 22px; }
  .app-bar .shortcut.is-soon { opacity: .6; }
  .app-bar .shortcut.is-soon:hover { opacity: .85; }
}
/* Kontekst („Słownictwo • A2”) na tablecie się nie mieści — pokazujemy go od 1180 px */
@media (min-width: 700px) and (max-width: 1179px) {
  .app-bar .brand-divider, .app-bar .app-context { display: none; }
}
@media (min-width: 1180px) {
  .app-bar .shortcut { min-width: 88px; font-size: 14px; }
}

/* ── Pigułka „Home” jak w Analysis Trail (jasna, z ramką i podpisem) ── */
html[data-header="green"] .app-bar .brand-home {
  gap: 10px; padding: 5px 16px 5px 6px; border-radius: 18px;
  background: #DDE5DC; border: 2px solid #9FBBA6; color: var(--forest);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
}
html[data-header="green"] .app-bar .brand-home:hover { background: #E8EEE6; border-color: #B9CDBC; }
html[data-header="green"] .app-bar .brand-home.is-active { background: #EEF2EC; border-color: #F5F2EA; }
html[data-header="green"] .app-bar .brand-logo { background: transparent; width: 42px; height: 42px; }
.brand-text { display: grid; gap: 1px; min-width: 0; }
.app-bar .brand-name { font-size: 18px; line-height: 1.02; }
.app-bar .brand-name > span { display: block; }
.brand-tag { display: none; font-size: 12.5px; font-weight: 400; color: #4A5E50; white-space: nowrap; }
.brand-home::before { content: none; }
@media (min-width: 1180px) {
  .app-bar .brand-name { font-size: 21px; }
  .app-bar .brand-name > span { display: inline; }
  .brand-tag { display: block; }
  html[data-header="green"] .app-bar .brand-home { padding-right: 20px; }
}

/* Telefon: brak miejsca na kontekst obok nazwy i lupy — chowamy go (tytuł strony i tak go mówi) */
@media (max-width: 699px) {
  .app-bar .brand-divider, .app-bar .app-context { display: none; }
  .app-bar .search-btn { margin-left: auto; }
  .app-bar .menu-btn { margin-left: 0; }
}

/* Lupa */
.app-bar .search-btn { flex: none; width: 48px; height: 48px; border-radius: 16px; background: transparent; border: 2px solid rgba(245, 242, 234, .35); color: #F5F2EA; }
.app-bar .search-btn:hover, .app-bar .search-btn[aria-expanded="true"] { background: rgba(255, 255, 255, .1); }
.app-bar .search-btn svg { width: 24px; height: 24px; }
@media (min-width: 700px) { .app-bar .search-btn { margin-left: 4px; border-color: transparent; } }

/* Panel wyszukiwania */
.search-panel {
  position: absolute; z-index: 25; top: calc(100% + 6px); right: var(--gutter);
  width: min(440px, calc(100vw - 2 * var(--gutter))); padding: 10px;
  border-radius: 20px; background: var(--parchment); border: 1px solid var(--line);
  box-shadow: 0 16px 40px rgba(31, 36, 33, .18);
}
.search-panel input {
  width: 100%; height: 50px; padding: 0 16px; border-radius: 14px; border: 1.5px solid var(--line);
  background: #fff; font-size: 17px; color: var(--ink);
}
.search-panel input:focus { outline: none; border-color: var(--forest); box-shadow: 0 0 0 3px rgba(38, 70, 53, .15); }
.search-results { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 2px; max-height: min(60vh, 420px); overflow: auto; }
.search-results:empty { display: none; }
.search-hit, .search-all {
  width: 100%; display: grid; gap: 1px; padding: 10px 12px; border: 0; border-radius: 12px;
  background: transparent; text-align: left; color: var(--ink);
}
.search-hit:hover, .search-hit:focus-visible, .search-all:hover { background: var(--sage-soft); }
.search-hit strong { font-size: 17px; font-stretch: 85%; color: var(--forest); }
.search-hit span { font-size: 14.5px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-all { font-weight: 600; color: var(--forest); }
.search-empty { padding: 12px; color: var(--ink-soft); font-size: 15px; }

/* Duży ekran: pozycje menu poziomo, jak w Analysis Trail (ikona + podpis w linii) */
@media (min-width: 1180px) {
  .app-bar .shortcut { flex-direction: row; height: 46px; min-width: 0; padding: 0 12px; gap: 8px; font-size: 15px; }
}
/* poprawki paska: podpis lekką czcionką, szerszy obszar paska na dużych ekranach, kontekst schowany (aktywna pozycja menu go zastępuje) */
.app-bar .brand-tag { font-size: 12.5px; font-weight: 400; font-stretch: 100%; line-height: 1.2; }
.app-bar .brand-divider, .app-bar .app-context { display: none !important; }
html[data-header="green"] .app-bar { padding-left: max(var(--gutter), calc(50vw - 640px)); padding-right: max(var(--gutter), calc(50vw - 640px)); }
@media (min-width: 1180px) and (max-width: 1259px) {
  .brand-tag { display: none; }
  .app-bar .brand-name > span { display: block; }
  .app-bar .shortcut { flex-direction: column; height: 58px; padding: 4px 8px; gap: 3px; font-size: 13px; }
}

/* ═══ v0.8: jednolity obszar roboczy, hover bez ruchu, ‹ przy tytule, Słownictwo jak Techniques ═══ */
:root { --content: 1040px; }
.page, .vocab, .settings { max-width: var(--content); }
.study-bar, .study-main, .footer-inner { max-width: var(--content); }
.study > .page { max-width: var(--content); }

/* Hover: element zostaje na miejscu — zmienia się obramowanie, tło i cień */
.tile, .tile:hover { transform: none; }
.tile { transition: border-color .15s, background-color .15s, box-shadow .15s; }
.tile:hover { border-color: var(--sage); background: #FCFBF7; box-shadow: 0 0 0 3px rgba(107, 142, 120, .14), var(--shadow-card); }
.tile:active { background: #F6F4EE; }
.tile:focus-visible { outline: 3px solid var(--ochre); outline-offset: 2px; }

/* Tytuł strony ze strzałką ‹ */
.page-title { display: flex; align-items: center; gap: 8px; margin: 4px 0 18px; }
.page-title h1 { font-size: clamp(26px, 6vw, 34px); }
.page-sub { margin-top: 2px; font-size: 15px; color: var(--ink-soft); }
.title-back {
  width: 40px; height: 40px; flex: none; display: grid; place-items: center; margin-left: -6px;
  border: 0; border-radius: 12px; background: transparent; color: var(--forest);
}
.title-back:hover { background: #ECE7DB; }
.title-back svg { width: 26px; height: 26px; }

/* Narzędzia Słownictwa: wyszukiwarka + przełącznik widoków */
.vocab-tools { display: grid; gap: 12px; margin-bottom: 18px; }
@media (min-width: 900px) { .vocab-tools { grid-template-columns: minmax(0, 1fr) auto; align-items: center; } }
.vocab-search {
  display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 18px;
  border-radius: 18px; border: 1.5px solid var(--line); background: #FDFBF6;
}
.vocab-search:focus-within { border-color: var(--forest); box-shadow: 0 0 0 3px rgba(38, 70, 53, .12); }
.vocab-search svg { width: 22px; height: 22px; color: var(--ink-soft); flex: none; }
.vocab-search input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; font-size: 17px; outline: none; padding: 0; }
.list-tools .vocab-search { height: 48px; }
.list-tools .list-search { border: 0; box-shadow: none; height: 100%; width: auto; padding: 0; }
.view-switch { display: flex; gap: 4px; padding: 5px; border-radius: 18px; border: 1.5px solid var(--line); background: #FDFBF6; overflow-x: auto; }
.view-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px;
  border: 0; border-radius: 13px; background: transparent; color: var(--forest); font-size: 16px; font-weight: 600; white-space: nowrap;
}
.view-btn svg { width: 20px; height: 20px; }
.view-btn:hover { background: #EFEADF; }
.view-btn.is-on { background: var(--forest); color: #fff; }
@media (max-width: 559px) { .view-btn { flex: 1; justify-content: center; padding: 0 10px; font-size: 15px; } }

/* Karty kategorii */
.cat-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.cat-card {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: start; gap: 14px;
  padding: 20px; border-radius: 20px; border: 1.5px solid var(--line); background: #FDFBF6; text-align: left;
  transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.cat-card:hover { border-color: var(--sage); background: #fff; box-shadow: 0 0 0 3px rgba(107, 142, 120, .14); }
.cat-card:focus-visible { outline: 3px solid var(--ochre); outline-offset: 2px; }
.cat-card.is-empty { opacity: .75; }
.cat-icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 16px; }
.cat-icon svg { width: 28px; height: 28px; }
.tone-sage { background: #E3ECE3; color: #3E6B4F; }
.tone-blue { background: #E2EBF2; color: #4C6F8A; }
.tone-ochre { background: #F4EAD6; color: #A9701E; }
.cat-text { display: grid; gap: 4px; }
.cat-title { font-size: 20px; font-weight: 700; font-stretch: 85%; color: var(--forest); line-height: 1.15; }
.cat-desc { font-size: 15.5px; color: var(--ink-soft); line-height: 1.35; }
.cat-count { min-width: 34px; height: 34px; padding: 0 8px; display: grid; place-items: center; border-radius: 99px; background: #F3EBDA; color: #8A6420; font-weight: 700; font-size: 15px; }
.cat-chevron svg { width: 22px; height: 22px; color: var(--forest); margin-top: 6px; }

/* A–Z */
.az-group { margin-bottom: 18px; }
.az-letter { font-size: 15px; font-weight: 700; color: var(--sage); margin: 0 0 8px 4px; font-stretch: 100%; }
.list-empty { padding: 22px; text-align: center; color: var(--ink-soft); border: 1.5px dashed var(--line); border-radius: 16px; list-style: none; }
.wr-fav svg { width: 15px; height: 15px; color: var(--ochre); fill: var(--ochre); vertical-align: -1px; }

/* Panel talii */
.deck-panel { display: grid; gap: 14px; padding: 18px 20px; margin-bottom: 18px; border-radius: 20px; border: 1.5px solid var(--line); background: #FDFBF6; }
@media (min-width: 760px) { .deck-panel { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px; } }
.deck-panel-stats { display: grid; gap: 8px; }
.deck-panel-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.deck-panel .switch-label { max-width: 12em; }

/* Pasek tytułu podglądu słówka: ‹ talia + pozycja + ulubione */
.word-titlebar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.word-titlebar .page-title { margin: 0; }
.word-titlebar .page-title h1 { font-size: 22px; }
.word-pos { display: flex; align-items: center; gap: 10px; flex: 1; justify-content: flex-end; min-width: 180px; }
.word-pos .progress { max-width: 260px; }
.fav-btn { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 12px; border: 1.5px solid var(--line); background: #FDFBF6; color: var(--ink-soft); }
.fav-btn svg { width: 22px; height: 22px; }
.fav-btn:hover { border-color: var(--ochre); color: #A9701E; }
.fav-btn.is-on { color: var(--ochre); border-color: #EBD3A6; background: #FBF3E3; }
.fav-btn.is-on svg { fill: var(--ochre); }
.study > .page-tight { padding-bottom: 6px; }
/* Karta kategorii: ikona + licznik u góry, tytuł i opis pełną szerokością */
.cat-card { grid-template-columns: auto 1fr auto auto; grid-template-areas: "icon . count chev" "text text text text"; align-items: center; row-gap: 14px; }
.cat-icon { grid-area: icon; }
.cat-text { grid-area: text; }
.cat-count { grid-area: count; }
.cat-chevron { grid-area: chev; }
.cat-chevron svg { margin-top: 0; }
.page-title { align-items: flex-start; }
.page-title .title-back { margin-top: 1px; }
.word-titlebar .page-title { align-items: center; }
.word-titlebar .page-title .title-back { margin-top: 0; }
@media (min-width: 700px) { .sticky-footer .footer-inner { padding-left: var(--gutter); padding-right: var(--gutter); box-sizing: border-box; } }
@media (max-width: 559px) { .vocab-search input { font-size: 16px; } }

/* ═══ v0.8.1: grupy talii (rozwijane karty) ═══ */
.cat-grid { align-items: start; }
.cat-card { display: block; padding: 0; overflow: hidden; }
.cat-card.is-open { grid-column: 1 / -1; border-color: var(--sage); background: #fff; }
.cat-head {
  width: 100%; display: grid; grid-template-columns: auto 1fr auto auto;
  grid-template-areas: "icon . count chev" "text text text text";
  align-items: center; gap: 14px; padding: 20px; border: 0; background: transparent; text-align: left; color: inherit;
}
.cat-card.is-open .cat-head { grid-template-columns: auto minmax(0, 1fr) auto auto; grid-template-areas: "icon text count chev"; }
.cat-head .cat-chevron svg { transition: transform .2s; }
.cat-card.is-open .cat-head .cat-chevron svg { transform: rotate(180deg); }
.cat-head:focus-visible { outline: 3px solid var(--ochre); outline-offset: -3px; border-radius: 20px; }
.cat-sub { font-size: 14px; font-weight: 600; color: var(--sage); margin-top: 2px; }
.tone-rose { background: #F5E3DE; color: #A65B4B; }
.deck-sublist { list-style: none; margin: 0; padding: 0 14px 14px; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.deck-sub {
  width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--line); background: #FDFBF6; text-align: left; color: inherit;
  transition: border-color .15s, background-color .15s;
}
.deck-sub:hover { border-color: var(--sage); background: #F6F8F4; }
.ds-text { display: grid; gap: 2px; }
.ds-title { font-size: 18px; font-weight: 700; color: var(--forest); font-stretch: 85%; }
.ds-desc { font-size: 14.5px; color: var(--ink-soft); line-height: 1.3; }
.ds-count { font-size: 14px; font-weight: 700; color: #8A6420; background: #F3EBDA; padding: 4px 10px; border-radius: 99px; white-space: nowrap; }
.ds-count.is-zero { color: var(--ink-soft); background: #EEEAE1; font-weight: 600; }
.deck-sub .cat-chevron { grid-area: auto; } .deck-sub .cat-chevron svg { margin: 0; }
@media (max-width: 559px) { .cat-card.is-open .cat-head { grid-template-columns: auto 1fr auto auto; grid-template-areas: "icon . count chev" "text text text text"; } .deck-sublist { padding: 0 10px 10px; } }
.list-tools { display: grid; gap: 10px; }
.chip-kind { background: #E8EEF3; color: #4C6F8A; border-color: transparent; }

/* ═══ v0.9.1: kategorie jako filtry + panel talii (jak Analysis Trail) ═══ */
.vocab .cat-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); align-items: stretch; margin-bottom: 18px; }
.vocab .cat-card {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; grid-template-areas: none; align-items: start; gap: 14px;
  padding: 18px; border-radius: 20px; border: 1.5px solid var(--line); background: #FDFBF6; text-align: left; color: inherit; overflow: visible;
}
.vocab .cat-card > * { grid-area: auto; }
.vocab .cat-card:hover { border-color: var(--sage); background: #fff; box-shadow: 0 0 0 3px rgba(107, 142, 120, .12); }
.vocab .cat-card.is-on { background: #DFE9E0; border-color: #9FBBA6; box-shadow: none; }
.vocab .cat-card .cat-chevron svg { margin-top: 6px; }
.vocab .cat-card .cat-count { margin-top: 0; }
.vocab .cat-card .cat-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.cat-panel { padding: 22px; border-radius: 24px; border: 1.5px solid var(--line); background: #FDFBF6; }
.cat-panel-head { border-left: 5px solid var(--forest); padding: 2px 0 2px 16px; margin-bottom: 18px; }
.cat-panel-head h2 { font-size: clamp(24px, 5vw, 30px); color: var(--forest); }
.cat-panel-head p { margin-top: 4px; font-size: 15.5px; color: var(--ink-soft); }
.deck-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.deck-card {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 14px;
  padding: 18px; border-radius: 18px; border: 1.5px solid var(--line); background: #fff; text-align: left; color: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.deck-card:hover { border-color: var(--sage); box-shadow: 0 0 0 3px rgba(107, 142, 120, .12); }
.deck-card:focus-visible, .vocab .cat-card:focus-visible { outline: 3px solid var(--ochre); outline-offset: 2px; }
.deck-card .cat-icon { width: 50px; height: 50px; }
.deck-card .cat-chevron svg { width: 22px; height: 22px; color: var(--forest); margin-top: 4px; }
.dc-text { display: grid; gap: 4px; }
.dc-title { font-size: 20px; font-weight: 700; color: var(--forest); font-stretch: 85%; }
.dc-desc { font-size: 15px; color: var(--ink-soft); line-height: 1.35; }
.dc-foot { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 15px; font-weight: 600; color: #3E6B4F; }
.dc-foot svg { width: 18px; height: 18px; }
.dc-foot.is-zero { color: var(--ink-soft); font-weight: 500; }
@media (max-width: 559px) { .cat-panel { padding: 16px; } .vocab .cat-grid { gap: 10px; } .vocab .cat-card { padding: 14px; } }
.deck-card > * { grid-area: auto; }
.dc-foot { display: flex; }
.vocab .cat-card.is-on .cat-icon { background: #fff; }

/* ═══ v0.11.9: „Cognitive English” wygląda jak przycisk dopiero po najechaniu (jak w Analysis Trail) ═══ */
html[data-header="green"] .app-bar .brand-home,
html[data-header="green"] .app-bar .brand-home.is-active {
  background: transparent; border: 2px solid transparent; box-shadow: none; color: #F5F2EA;
  padding: 5px 16px 5px 6px; transition: background-color .15s, border-color .15s, color .15s;
}
html[data-header="green"] .app-bar .brand-logo { background: #F5F2EA; border-radius: 12px; transition: background-color .15s; }
html[data-header="green"] .app-bar .brand-name { color: #F5F2EA; transition: color .15s; }
html[data-header="green"] .app-bar .brand-tag { color: #B9CDBC; transition: color .15s; }
html[data-header="green"] .app-bar .brand-home:hover,
html[data-header="green"] .app-bar .brand-home:focus-visible {
  background: #E3E9E1; border-color: #9FBBA6; box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
}
html[data-header="green"] .app-bar .brand-home:hover .brand-logo,
html[data-header="green"] .app-bar .brand-home:focus-visible .brand-logo { background: transparent; }
html[data-header="green"] .app-bar .brand-home:hover .brand-name,
html[data-header="green"] .app-bar .brand-home:focus-visible .brand-name { color: var(--forest); }
html[data-header="green"] .app-bar .brand-home:hover .brand-tag,
html[data-header="green"] .app-bar .brand-home:focus-visible .brand-tag { color: #4A5E50; }
html[data-header="green"] .app-bar .brand-home:active { background: #D3DDD2; }

/* ═══ v0.12: strona talii jak „Techniques” ═══ */
.lvl-icon { font-size: 19px; font-weight: 800; font-stretch: 85%; }
.cat-panel-row { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 20px; margin-bottom: 18px; }
.cat-panel-row .cat-panel-head { margin-bottom: 0; }
.sort-by { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; color: var(--ink-soft); }
.sort-by select { height: 44px; padding: 0 36px 0 14px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; font-size: 15px; color: var(--ink); }
.wgrid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.wcard {
  display: grid; gap: 8px; align-content: start; padding: 18px 18px 16px; border-radius: 18px;
  border: 1.5px solid var(--line); background: #fff; cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.wcard:hover { border-color: var(--sage); box-shadow: 0 0 0 3px rgba(107, 142, 120, .12); }
.wcard:focus-visible { outline: 3px solid var(--ochre); outline-offset: 2px; }
.wc-head { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 6px; }
.wc-term { font-size: 21px; font-weight: 700; color: var(--forest); font-stretch: 85%; line-height: 1.15; overflow-wrap: anywhere; }
.wc-fav { width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: #B7AE9C; }
.wc-fav svg { width: 22px; height: 22px; }
.wc-fav:hover { background: #FBF3E3; color: var(--ochre); }
.wc-fav.is-on { color: var(--ochre); }
.wc-fav.is-on svg { fill: var(--ochre); }
.wc-chevron svg { width: 20px; height: 20px; color: var(--forest); }
.wc-pl { font-size: 15.5px; color: var(--ink-soft); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wc-foot { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.az-index { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.az-index a { min-width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; border: 1.5px solid var(--line); background: #FDFBF6; color: var(--forest); font-weight: 700; text-decoration: none; }
.az-index a:hover { border-color: var(--sage); background: #fff; }
.az-group { scroll-margin-top: 16px; }
.az-group .az-letter { font-size: 20px; color: var(--forest); margin: 6px 0 10px 2px; }
@media (max-width: 559px) {
  .vocab .lvl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .vocab .lvl-grid .cat-card { grid-template-columns: 1fr; justify-items: center; gap: 6px; padding: 12px 8px; text-align: center; }
  .vocab .lvl-grid .cat-text, .vocab .lvl-grid .cat-chevron { display: none; }
}

/* v0.12.1: bez ikon listka i dymka na karcie słówka */
.defs .def-en { padding-left: 0; }
.examples li { grid-template-columns: minmax(0, 1fr) auto; padding-left: 16px; }

/* ═══ v0.13: Ustawienia wg przewodnika stylu ═══ */
.settings .page-title h1 { font-size: clamp(30px, 6vw, 36px); }
.set-card {
  display: block; margin-bottom: 24px; padding: 28px 32px; border-radius: 22px;
  background: #FDFBF6; border: 1.5px solid var(--line); box-shadow: 0 1px 2px rgba(31, 36, 33, .04);
}
.set-head { display: flex; align-items: center; gap: 16px; }
.set-head h2 { font-size: 21px; line-height: 1.2; color: var(--ink); }
.set-head p { margin-top: 2px; font-size: 15px; color: var(--ink-soft); }
.set-icon { width: 52px; height: 52px; flex: none; display: grid; place-items: center; border-radius: 14px; background: #E9EEE7; color: var(--forest); }
.set-icon svg { width: 28px; height: 28px; }
#profile .set-head { padding-bottom: 20px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }

.set-grid { display: grid; gap: 22px 32px; }
@media (min-width: 760px) { .set-grid { grid-template-columns: 1fr 1fr; } }
.set-field { display: grid; gap: 10px; align-content: start; }
.set-label { display: grid; gap: 2px; }
.set-label b { font-size: 16px; font-weight: 600; color: var(--ink); }
.set-label span { font-size: 14px; color: var(--ink-soft); font-weight: 400; }
.set-card input[type="text"], .set-card input:not([type]), .set-card select {
  height: 48px; width: 100%; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--line);
  background: #fff; font-size: 16px; color: var(--ink);
}
.set-card select { padding-right: 40px; }
.set-card .segmented { height: 48px; }

.set-toggle-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px;
  margin-top: 24px; padding: 16px 18px; border-radius: 16px; background: #EEF2EC; cursor: pointer;
}
.set-row-icon svg { width: 26px; height: 26px; color: var(--forest); display: block; }
.set-toggle-row .switch { margin: 0; }

.set-inline { display: grid; gap: 12px; margin-top: 24px; }
@media (min-width: 760px) { .set-inline { grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; } }

.set-fold summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: default; }
.set-fold summary::-webkit-details-marker { display: none; }
.set-chevron { display: none; }
.set-chevron svg { width: 22px; height: 22px; color: var(--forest); transition: transform .2s; }
.set-fold[open] .set-chevron svg { transform: rotate(180deg); }
.set-fold > :not(summary) { margin-top: 20px; }
.set-text { font-size: 15.5px; color: var(--ink); padding-top: 20px; border-top: 1px solid var(--line); }
.set-card .backup-actions { display: grid; gap: 12px; }
@media (min-width: 640px) { .set-card .backup-actions { grid-template-columns: 1fr 1fr; gap: 20px; } }
.set-card .backup-actions .btn { height: 52px; justify-content: center; font-size: 17px; }
.set-note {
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px;
  background: #EEF2EC; color: var(--forest); font-size: 15px;
}
.set-note svg { width: 20px; height: 20px; flex: none; }
.set-note.is-warn { background: #FBF1E0; color: #8A5A12; }
.set-facts { display: grid; gap: 0; padding-top: 8px; border-top: 1px solid var(--line); }
.set-facts div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 4px; border-bottom: 1px solid var(--line); font-size: 15px; }
.set-facts div:last-child { border-bottom: 0; }
.set-facts dt { color: var(--ink-soft); }
.set-facts dd { margin: 0; font-weight: 600; color: var(--ink); text-align: right; }

@media (max-width: 699px) {
  .set-card { padding: 20px; margin-bottom: 16px; }
  .set-icon { width: 46px; height: 46px; }
  .set-chevron { display: block; }
  .set-fold summary { cursor: pointer; }
  .set-toggle-row { padding: 14px; }
}
.settings .page-title h1 { margin-bottom: 0; }
.settings .page-sub { margin-top: 4px; }
.set-facts { margin: 0; }
@media (max-width: 420px) { .seg-extra { display: none; } }
@media (max-width: 420px) { .segmented label span.seg-extra { display: none !important; } }

/* ═══ v0.13.1: przełączniki dwóch opcji w stylu „toggle” — suwak przesuwa się pod wybraną opcję ═══ */
.segmented {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 0; padding: 4px; height: auto;
  border-radius: 99px; background: #EEF2EC; border: 1.5px solid #DDE4DA; isolation: isolate;
}
.set-card .segmented { height: auto; }
.segmented::before {
  content: ''; position: absolute; z-index: -1; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px);
  border-radius: 99px; background: var(--forest); box-shadow: 0 2px 6px rgba(38, 70, 53, .25);
  transition: transform .22s cubic-bezier(.3, .7, .3, 1);
}
.segmented:has(label:nth-child(2) input:checked)::before { transform: translateX(100%); }
.segmented label { height: 44px; border-radius: 99px; }
.segmented label > span {
  display: flex; align-items: center; justify-content: center; gap: 4px; width: 100%; height: 100%;
  padding: 0 10px; border-radius: 99px; white-space: nowrap; font-weight: 600; color: var(--forest);
  transition: color .2s;
}
.segmented input:checked + span { background: transparent; color: #fff; }
.segmented label span.seg-extra { display: inline; font-weight: 500; opacity: .8; }
.segmented input:focus-visible + span { outline: 3px solid var(--ochre); outline-offset: 2px; }
@media (max-width: 520px) { .segmented label span.seg-extra { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .segmented::before { transition: none; } }
.segmented label span.seg-extra { height: auto; width: auto; padding: 0; border-radius: 0; place-items: initial; }

/* ═══ v0.14: Czytanki ═══ */
.slist { list-style: none; margin: 0; padding: 0; display: grid; }
.slist > li + li { border-top: 1px solid var(--line); }
.cat-panel .slist, .az-card .slist { margin: 0 -6px; }
.srow {
  width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 16px;
  padding: 16px 12px; border: 0; border-radius: 14px; background: transparent; text-align: left; color: inherit;
  transition: background-color .15s;
}
.srow:hover { background: #F2F4EF; }
.srow:focus-visible { outline: 3px solid var(--ochre); outline-offset: -3px; }
.srow .cat-icon { width: 50px; height: 50px; }
.srow-text { display: grid; gap: 3px; min-width: 0; }
.srow-title { font-size: 19px; font-weight: 700; color: var(--forest); font-stretch: 90%; }
.srow-sub { font-size: 15px; color: var(--ink-soft); line-height: 1.35; }
.srow-match { font-size: 14px; color: #8A6420; }
.srow-match b { display: inline-block; margin-left: 4px; padding: 1px 8px; border-radius: 99px; background: #F6E3BD; color: #6E4C12; font-weight: 600; }
.srow-meta { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px; max-width: 260px; }
.srow-min { font-size: 14px; color: var(--ink-soft); white-space: nowrap; }
.chip-topic { background: #EEF2EC; border-color: #DDE4DA; color: var(--forest); }
.status svg { width: 14px; height: 14px; vertical-align: -2px; }
@media (max-width: 699px) {
  .srow { grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; padding: 14px 8px; }
  .srow-meta { grid-column: 2 / 4; grid-row: 2; justify-content: flex-start; max-width: none; }
  .srow .cat-chevron { grid-column: 3; grid-row: 1; }
  .srow .cat-icon { width: 42px; height: 42px; }
}
.az-card { margin-bottom: 18px; padding: 14px 16px; border-radius: 22px; border: 1.5px solid var(--line); background: #FDFBF6; }
.az-band { margin: 0 -2px 6px; padding: 10px 18px; border-radius: 14px; background: #DFE6DD; font-size: 18px; color: var(--forest); font-weight: 700; }

/* czytnik */
.story-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: -4px 0 18px; }
.story-cover { margin: 0 0 20px; border-radius: 22px; overflow: hidden; background: #EEF2EC; border: 1.5px solid var(--line); }
.story-cover img { display: block; width: 100%; height: auto; max-height: 420px; object-fit: contain; }
.story-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; margin-bottom: 14px; }
.story-hint { font-size: 14.5px; color: var(--ink-soft); }
.story-text { display: grid; gap: 14px; margin-bottom: 24px; }
.spara { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 14px; padding: 18px 20px; border-radius: 18px; background: #fff; border: 1.5px solid var(--line); }
.spara-en { font-size: 19px; line-height: 1.7; color: var(--ink); max-width: 68ch; }
.spara-pl { grid-column: 1 / -1; font-size: 16px; line-height: 1.55; color: var(--ink-soft); padding-top: 10px; border-top: 1px dashed var(--line); }
.hl {
  display: inline; padding: 0 3px; margin: 0 -1px; border: 0; border-radius: 6px; background: #F6E3BD; color: #4B3410;
  font: inherit; font-weight: 600; cursor: pointer; box-shadow: inset 0 -2px 0 #E2B866;
}
.hl:hover { background: #F1D69F; }
.hl:focus-visible { outline: 3px solid var(--forest); outline-offset: 1px; }
.quiz .section-title { margin-bottom: 14px; }
.qitem { border: 0; margin: 0 0 18px; padding: 0; display: grid; gap: 8px; }
.qitem legend { font-size: 17px; font-weight: 600; margin-bottom: 8px; padding: 0; }
.qopt { text-align: left; padding: 12px 16px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; font-size: 16px; color: var(--ink); }
.qopt:hover:not([disabled]) { border-color: var(--sage); }
.qopt.is-right { border-color: #5E8F6B; background: #E5F0E6; color: var(--forest); font-weight: 600; }
.qopt.is-wrong { border-color: #D9776A; background: #FBE9E5; color: #8A3B2E; }
.qopt.is-dim { opacity: .6; }
.qexp { font-size: 15px; line-height: 1.45; padding: 10px 14px; border-radius: 12px; background: #EEF2EC; }
.qexp.bad { background: #FBF1E0; }
.story-end { display: flex; justify-content: center; margin: 8px 0 30px; }
.story-end .btn { min-width: 260px; justify-content: center; }
.word-pop { position: fixed; inset: auto 0 0 0; z-index: 60; display: flex; justify-content: center; padding: 0 12px 16px; pointer-events: none; }
.word-pop[hidden] { display: none; }
.wp-card {
  position: relative; pointer-events: auto; width: min(520px, 100%); padding: 20px 22px; border-radius: 22px;
  background: #FDFBF6; border: 1.5px solid var(--line); box-shadow: 0 12px 40px rgba(25, 40, 32, .22);
}
.wp-close { position: absolute; top: 10px; right: 10px; width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 12px; background: transparent; color: var(--forest); }
.wp-close svg { width: 22px; height: 22px; }
.wp-term { font-size: 26px; font-weight: 800; color: var(--forest); font-stretch: 85%; padding-right: 40px; }
.wp-ipa { font-family: var(--font-ipa, inherit); color: var(--ink-soft); }
.wp-note { margin-top: 8px; font-size: 17px; font-weight: 600; }
.wp-def { font-size: 15px; color: var(--ink-soft); }
.wp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.wp-actions .btn { height: 44px; }
.srow > * { grid-area: auto; }
.srow > .cat-icon { grid-column: 1; grid-row: 1; }
@media (max-width: 699px) {
  .srow > .cat-icon { grid-row: 1 / 3; align-self: start; }
  .srow > .srow-text { grid-column: 2; grid-row: 1; }
  .srow > .srow-meta { grid-column: 2 / 4; grid-row: 2; }
  .srow > .cat-chevron { grid-column: 3; grid-row: 1; }
  .story-tools .switch-label { white-space: nowrap; }
}

/* ═══ v0.14: Karta nauki na powtórce — modal (desktop) / dolny panel (telefon) ═══ */
.review-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.study-card-btn {
  margin-left: auto; display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px;
  border-radius: 99px; border: 1.5px solid var(--line); background: #FDFBF6; color: var(--forest); font-size: 15.5px; font-weight: 600;
  transition: border-color .15s, background-color .15s;
}
.study-card-btn svg { width: 20px; height: 20px; }
.study-card-btn:hover { border-color: var(--sage); background: #fff; }
.study-fab { display: none; }
html.sheet-lock { overflow: hidden; }

.sheet-overlay {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 24px;
  background: rgba(25, 40, 32, .30); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  opacity: 0; transition: opacity .18s ease;
}
.sheet-overlay.is-open { opacity: 1; }
.sheet {
  width: min(640px, 100%); max-height: min(88vh, 860px); display: flex; flex-direction: column;
  border-radius: 24px; background: #FDFBF6; box-shadow: 0 18px 50px rgba(25, 40, 32, .18), 0 2px 8px rgba(25, 40, 32, .08);
  transform: translateY(10px) scale(.98); transition: transform .2s ease;
}
.sheet-overlay.is-open .sheet { transform: none; }
.sheet-grip { display: none; }
.sheet-head { display: flex; align-items: center; gap: 14px; padding: 18px 20px 16px 24px; border-bottom: 1px solid var(--line); }
.sheet-head h2 { font-size: 18px; line-height: 1.2; }
.sheet-head p { font-size: 14px; color: var(--ink-soft); }
.sheet-ic svg { width: 28px; height: 28px; color: var(--forest); display: block; }
.sheet-close { margin-left: auto; width: 42px; height: 42px; display: grid; place-items: center; border: 0; border-radius: 12px; background: transparent; color: var(--forest); }
.sheet-close:hover { background: #EEF2EC; }
.sheet-close svg { width: 24px; height: 24px; }
.sheet-body { overflow-y: auto; overscroll-behavior: contain; padding: 18px 24px 24px; display: grid; gap: 14px; }
.sheet-term { font-size: 36px; font-weight: 800; color: var(--forest); font-stretch: 85%; line-height: 1.1; }
.sheet-body .ipa { margin-top: -8px; }
.sheet-body .audio-row { margin-top: -2px; }
.sheet-body .section-title { margin: 4px 0 -4px; }
.sheet-body .examples { margin: 0; }

@media (max-width: 699px) {
  .study-card-btn { display: none; }
  .study-fab {
    display: grid; place-items: center; position: fixed; right: 18px; bottom: calc(var(--footer-h, 150px) + 16px); z-index: 30;
    width: 58px; height: 58px; border: 0; border-radius: 50%; background: #3E6B4F; color: #fff;
    box-shadow: 0 6px 18px rgba(25, 40, 32, .3);
  }
  .study-fab svg { width: 26px; height: 26px; }
  .sheet-overlay { place-items: end stretch; padding: 0; }
  .sheet {
    width: 100%; max-height: 90vh; border-radius: 26px 26px 0 0;
    transform: translateY(100%); transition: transform .24s cubic-bezier(.3, .7, .3, 1);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .sheet-grip { display: block; width: 44px; height: 5px; margin: 10px auto 2px; border-radius: 99px; background: #CFC8B8; flex: none; }
  .sheet-head { padding: 8px 14px 12px 20px; }
  .sheet-body { padding: 16px 20px 24px; }
  .sheet-term { font-size: 30px; }
}
@media (prefers-reduced-motion: reduce) { .sheet, .sheet-overlay { transition: none; } }

/* ═══ v0.15: Pulpit wg makiety ═══ */
.dash-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px; margin: 4px 0 -6px; }
.dash-hello h1 { font-size: clamp(34px, 7vw, 52px); line-height: 1.05; letter-spacing: -.01em; }
.dash-hello .wave { display: inline-block; font-size: .8em; transform-origin: 70% 70%; }
.dash-hello p { margin-top: 10px; font-size: 18px; color: var(--ink); max-width: 36ch; }
.dash-art { width: 320px; height: auto; margin-right: 80px; position: relative; z-index: 1; }
.dir-pill {
  position: absolute; top: 4px; right: 0; display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 18px;
  border-radius: 99px; border: 1.5px solid var(--line); background: #FDFBF6; color: var(--ink); font-size: 16px; font-weight: 700;
}
.dir-pill svg { width: 20px; height: 20px; color: var(--forest); }
.dir-pill:hover { border-color: var(--sage); }

.dash-goal {
  display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(180px, 320px) auto; align-items: center; gap: 22px;
  padding: 20px 22px; margin-bottom: 26px; border-radius: 24px; background: #E9EEE7; border: 1.5px solid #DDE4DA; position: relative; z-index: 2;
}
.goal-ic { width: 60px; height: 60px; display: grid; place-items: center; border-radius: 16px; background: #DCE5DA; color: var(--forest); }
.goal-ic svg { width: 34px; height: 34px; }
.goal-text h2 { font-size: 23px; }
.goal-text p { margin-top: 4px; font-size: 16.5px; color: var(--ink); }
.goal-text i { font-style: normal; margin: 0 6px; color: var(--sage); }
.goal-bar { display: flex; align-items: center; gap: 12px; }
.goal-bar .progress { flex: 1; height: 10px; background: #D6DED4; }
.dash-goal .btn { height: 54px; padding: 0 26px; font-size: 17px; white-space: nowrap; }

.dash-modules { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); margin-bottom: 26px; }
.dash-modules .tile {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; min-height: 120px;
  padding: 18px 18px 18px 20px; border-radius: 22px; background: #FDFBF6; border: 1.5px solid var(--line); text-align: left;
}
.dash-modules .tile img { width: 64px; height: 64px; }
.dash-modules .tile-body { display: grid; gap: 4px; }
.dash-modules .tile-title { font-size: 21px; font-weight: 800; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.dash-modules .tile-desc { font-size: 15.5px; color: var(--ink-soft); line-height: 1.35; }
.tile-go { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: #F1EDE4; color: var(--ink); transition: background-color .15s; }
.tile-go svg { width: 20px; height: 20px; }
.dash-modules .tile:hover .tile-go { background: var(--forest); color: #fff; }
.dash-modules .tile.is-due { background: #EEF3EC; border-color: #CFDCCF; }
.tile-badge { min-width: 26px; height: 26px; padding: 0 8px; display: inline-grid; place-items: center; border-radius: 99px; background: var(--ochre); color: #fff; font-size: 14px; font-weight: 700; }
.tile-soon { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: #EEEAE1; color: var(--ink-soft); }
.dash-modules .tile.is-soon img { opacity: .7; }

.dash-bottom { display: grid; gap: 18px; margin-bottom: 32px; }
@media (min-width: 900px) { .dash-bottom { grid-template-columns: 1fr 1fr; } }
.dash-card { padding: 20px 22px; border-radius: 22px; background: #FDFBF6; border: 1.5px solid var(--line); }
.dash-head { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.dash-head h2 { font-size: 20px; }
.dash-ic { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: #EEF2EC; color: var(--forest); }
.dash-ic svg, .tip-ic svg { width: 24px; height: 24px; }
.dash-period { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 0 4px 0 12px; height: 42px; border-radius: 12px; background: #F3F0E8; color: var(--ink); }
.dash-period svg { width: 18px; height: 18px; color: var(--forest); }
.dash-period select { border: 0; background: transparent; font-size: 15px; height: 100%; padding-right: 6px; color: var(--ink); }
.dash-stats { display: grid; grid-template-columns: repeat(3, 1fr); }
.dash-stats > div { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: baseline; padding: 4px 14px; }
.dash-stats > div + div { border-left: 1px solid var(--line); }
.ds-ic svg { width: 22px; height: 22px; color: var(--sage); }
.dash-stats b { font-size: 28px; font-weight: 800; }
.dash-stats span:last-child { grid-column: 2; font-size: 15px; color: var(--ink-soft); }
.dash-tip { background: #FBF4E6; border-color: #EFDDB8; }
.dash-tip .dash-head { border-bottom-color: #EFDDB8; }
.tip-ic { color: var(--ochre); }
.dash-tip p { font-size: 16px; line-height: 1.5; }
.dash-tip .btn-link { margin-top: 10px; }

@media (max-width: 899px) {
  .dash-goal { grid-template-columns: auto minmax(0, 1fr); }
  .goal-bar, .dash-goal .btn { grid-column: 1 / -1; }
  .dash-goal .btn { justify-content: center; }
}
@media (max-width: 699px) {
  .dash-hero { grid-template-columns: 1fr; }
  .dash-art { width: 200px; margin: 6px auto -4px; }
  .dir-pill { position: static; justify-self: start; order: -1; height: 40px; font-size: 15px; }
  .dash-hello p { font-size: 16px; }
  .dash-stats > div { padding: 4px 8px; grid-template-columns: 1fr; }
  .dash-stats .ds-ic { display: none; }
  .dash-stats b { font-size: 22px; }
  .dash-stats span:last-child { grid-column: 1; font-size: 13.5px; }
  .dash-modules .tile { min-height: 96px; }
  .dash-modules .tile img { width: 52px; height: 52px; }
}

/* ═══ v0.15: Mówienie ═══ */
.sp-steps { margin: 18px 0 20px; padding-left: 22px; display: grid; gap: 8px; font-size: 16px; }
.sp-choices { display: grid; gap: 12px; }
@media (min-width: 700px) { .sp-choices { grid-template-columns: 1fr 1fr; } }
.sp-choice { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 16px; border-radius: 18px; border: 1.5px solid var(--line); background: #fff; text-align: left; color: inherit; }
.sp-choice:hover:not([disabled]) { border-color: var(--sage); box-shadow: 0 0 0 3px rgba(107, 142, 120, .12); }
.sp-choice[disabled] { opacity: .55; }
.sp-choice b { display: block; font-size: 18px; color: var(--forest); }
.sp-choice span span { font-size: 14.5px; color: var(--ink-soft); }
.sp-bar { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.sp-bar .progress { flex: 1; }
.sp-card { padding: 28px; border-radius: 24px; background: #fff; border: 1.5px solid var(--line); display: grid; gap: 14px; margin-bottom: 20px; }
.sp-q { font-size: clamp(24px, 4.5vw, 34px); font-weight: 700; line-height: 1.25; color: var(--ink); }
.sp-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.sp-hint { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 16px; border-radius: 14px; background: #FBF4E6; font-size: 16px; }
.sp-hint svg { width: 20px; height: 20px; color: var(--ochre); }
.sp-word { margin-left: auto; color: var(--ink-soft); font-size: 15px; }
.sp-answer { padding: 18px 20px; border-radius: 18px; background: #EEF2EC; border: 1.5px solid #DDE4DA; display: grid; gap: 8px; }
.sp-a { font-size: clamp(21px, 3.8vw, 27px); font-weight: 700; color: var(--forest); line-height: 1.3; }
.sp-a mark { background: #F6E3BD; color: inherit; border-radius: 6px; padding: 0 4px; }
.sp-a-pl { font-size: 16px; color: var(--ink-soft); }
.sp-done .sp-choices { margin-top: 18px; }
@media (max-width: 699px) { .sp-card { padding: 20px; } }
.dash-hero { align-items: center; min-height: 210px; }
.dash-hello p { max-width: 46ch; line-height: 1.4; }
.dash-art { align-self: end; }
.dash-goal { grid-template-columns: auto minmax(240px, 1fr) minmax(160px, 280px) auto; }
.goal-text p { white-space: nowrap; }
.dash-modules .tile { gap: 14px; padding: 18px 16px; }
.dash-modules .tile img { width: 56px; height: 56px; }
.dash-modules .tile-desc { font-size: 15px; }
@media (max-width: 1100px) and (min-width: 900px) { .goal-text p { white-space: normal; } }
@media (max-width: 699px) { .dash-hero { min-height: 0; } .goal-text p { white-space: normal; } }

/* ═══ v0.15.1: karta powtórki — nagłówek strony, „Karta nauki” w prawym górnym rogu fiszki ═══ */
.study-head { padding-bottom: 4px; }
.study-head .word-titlebar { margin-bottom: 14px; }
.study-head .word-titlebar .page-title h1 { font-size: clamp(26px, 5vw, 34px); }
.study-head .page-sub { font-size: 15px; }
.study-head .word-pos .progress { max-width: 320px; }
.flip-card { position: relative; }
.flip-top { display: flex; align-items: center; gap: 8px; padding: 18px 20px 0; }
.flip-top .study-card-btn { margin-left: auto; }
.flip-top + .flip-face { padding-top: 12px; }
@media (min-width: 700px) {
  .flip-top { padding: 22px 26px 0; }
  .flip-face .flip-text { padding-left: 28px; border-left: 1.5px solid var(--line); }
}
@media (max-width: 699px) {
  .study-card-btn { display: inline-flex; height: 38px; padding: 0 12px; font-size: 14.5px; }
  .study-card-btn svg { width: 18px; height: 18px; }
  .study-fab { display: none !important; }
  .study-head .word-titlebar { gap: 6px; }
  .study-head .word-pos { min-width: 0; width: 100%; justify-content: flex-start; }
  .study-head .word-pos .progress { max-width: none; }
}
.flip-card { grid-template-rows: auto 1fr; align-content: stretch; }
@media (min-width: 700px) { .flip-face .flip-text { padding-left: 0; border-left: 0; } }
@media (max-width: 699px) {
  .study-head .word-titlebar { flex-wrap: wrap; }
  .study-head .word-pos { flex: 1 1 100%; padding-left: 42px; }
}
/* v0.15.2: na komputerze „Odwróć kartę” i oceny tuż pod fiszką, nie przy dolnej krawędzi ekranu */
@media (min-width: 700px) {
  .study:has(.review-footer) { min-height: 0; }
  .review-footer { position: static; background: transparent; box-shadow: none; border-top: 0; padding-top: 6px; }
  .flip-card { min-height: min(46vh, 420px); }
}

/* v0.16: Ustawienia → Powtórki */
#srs .set-head { padding-bottom: 20px; margin-bottom: 0; border-bottom: 0; }
.srs-grid { display: grid; gap: 12px; margin-top: 18px; }
@media (min-width: 760px) { .srs-grid { grid-template-columns: 1fr 1fr; gap: 14px 32px; } }
.srs-row { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(150px, 200px); align-items: center; gap: 12px; }
.srs-dot { width: 14px; height: 14px; border-radius: 50%; padding: 0; min-height: 0; border: 0; }
.srs-dot.rate-again { background: #D9776A; } .srs-dot.rate-hard { background: #E8A84E; }
.srs-dot.rate-good { background: #B9CDBC; } .srs-dot.rate-easy { background: var(--forest); }
.srs-label { font-size: 16px; font-weight: 600; }
.srs-reset { margin-top: 16px; }

/* v0.16.1: „Odwróć kartę” na telefonie */
@media (max-width: 699px) {
  .review-footer {
    padding: 12px 16px calc(20px + env(safe-area-inset-bottom));
    background: #F5F2EA; border-top: 1px solid #E5E0D5; box-shadow: 0 -6px 16px rgba(31, 36, 33, .05);
  }
  .review-footer .footer-inner { padding: 0; }
  .review-footer .btn-flip {
    height: 68px; border-radius: 22px; background: #244837; color: #fff; border: 0;
    font-size: 19px; font-weight: 600; gap: 12px; box-shadow: 0 4px 12px rgba(36, 72, 55, .22);
  }
  .review-footer .btn-flip svg { width: 24px; height: 24px; }
  .review-footer .btn-flip:active { background: #1D3B2D; }
}
@media (max-width: 699px) { .review-footer { border-radius: 0; } }

/* ═══ v0.16.3: powtórka na komputerze wg makiety ═══ */
.flip-target { display: inline-flex; align-items: center; gap: 10px; justify-self: start; padding: 10px 18px; border-radius: 99px; background: #FBF1E0; color: var(--ink); }
.flip-target svg { width: 22px; height: 22px; color: var(--ochre); flex: none; }
.study-head .fav-btn { margin-left: 4px; }
.shortcuts-bar { display: none; }
@media (min-width: 700px) {
  .sentence-main { font-size: clamp(28px, 3.2vw, 38px); font-weight: 600; line-height: 1.3; }
  .review-footer .footer-inner { max-width: 820px; }
  .review-footer .btn-flip {
    height: 64px; border-radius: 99px; background: #244837; color: #fff; border: 0;
    font-size: 20px; font-weight: 600; gap: 14px; box-shadow: 0 6px 16px rgba(36, 72, 55, .22);
  }
  .review-footer .btn-flip svg { width: 26px; height: 26px; }
  .review-footer .btn-flip:hover { background: #1D3B2D; }
  .shortcuts-bar {
    display: flex; align-items: center; gap: 12px; width: min(var(--content), calc(100% - 2 * var(--gutter))); margin: 18px auto 28px;
    padding: 12px 18px; border-radius: 16px; background: #EFEBE2; color: var(--ink-soft); font-size: 15px;
  }
  .shortcuts-bar b { color: var(--forest); }
  .kb-ic svg { width: 24px; height: 24px; color: var(--forest); display: block; }
  .shortcuts-bar .auto-flip { margin-left: auto; }
  .shortcuts-bar .switch-label { font-size: 15px; color: var(--ink); }
  .info-tip { position: relative; display: grid; place-items: center; color: var(--forest); cursor: help; }
  .info-tip > svg { width: 20px; height: 20px; }
  .info-tip [role="tooltip"] {
    position: absolute; bottom: calc(100% + 10px); right: -8px; width: 260px; padding: 10px 12px; border-radius: 12px;
    background: var(--ink); color: #fff; font-size: 14px; line-height: 1.35; opacity: 0; pointer-events: none; transition: opacity .15s;
  }
  .info-tip:hover [role="tooltip"], .info-tip:focus [role="tooltip"] { opacity: 1; }
}
@media (min-width: 700px) {
  .shortcuts-bar { width: auto; max-width: var(--content); margin: 18px auto 28px; box-sizing: border-box; }
  .study > .shortcuts-bar { margin-left: max(var(--gutter), calc((100% - var(--content)) / 2 + var(--gutter))); margin-right: max(var(--gutter), calc((100% - var(--content)) / 2 + var(--gutter))); }
  .shortcuts-bar .switch-label { white-space: nowrap; }
}
@media (min-width: 700px) { .shortcuts-bar .switch-label { max-width: none; overflow: visible; } .shortcuts-bar .auto-flip { flex: none; width: auto; } .shortcuts-bar .info-tip { flex: none; margin-left: 4px; } }
#srs .set-toggle-row { margin-top: 22px; }
.info-tip [role="tooltip"] b { color: #F6E3BD; }
.shortcuts-bar { position: relative; z-index: 6; } .info-tip [role="tooltip"] { z-index: 50; }

/* ═══ v0.17: pulpit na telefonie — własny układ ═══ */
.dir-pill-m { display: none; }
.tip-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 10px; }
.tip-actions .btn-link { margin-top: 0; }
.tip-more { display: none; border: 0; background: none; padding: 0; color: var(--forest); font-weight: 600; font-size: 15px; text-decoration: underline; text-underline-offset: 3px; }
.dash-goal { grid-template-areas: none; }

@media (max-width: 699px) {
  /* nagłówek: logo + dwa kompaktowe przyciski */
  html[data-header="green"] .app-bar { padding-top: 10px; padding-bottom: 10px; min-height: 0; }
  html[data-header="green"] .app-bar .brand-logo { width: 44px; height: 44px; }
  html[data-header="green"] .app-bar .brand-name { font-size: 19px; line-height: 1.05; }
  .app-bar .search-btn, .app-bar .menu-btn { width: 46px; height: 46px; border-radius: 14px; }

  /* powitanie: tekst po lewej, mała ilustracja po prawej */
  .dash-hero {
    display: grid; grid-template-columns: minmax(0, 1fr) 42%; align-items: end; gap: 8px;
    min-height: 0; margin: 2px 0 14px;
  }
  .dash-hero > .dir-pill:not(.dir-pill-m) { display: none; }
  .dir-pill-m { display: inline-flex; position: static; height: 38px; padding: 0 14px; font-size: 15px; margin-bottom: 12px; }
  .dash-hello h1 { font-size: 36px; }
  .dash-hello p { margin-top: 6px; font-size: 16px; line-height: 1.4; max-width: none; }
  .dash-art {
    width: 100%; max-width: 190px; margin: 0; justify-self: end; align-self: end;
    padding: 10px 4px 0; border-radius: 999px 999px 0 0;
    background: radial-gradient(ellipse 60% 70% at 55% 60%, #E3E9E1 0 70%, transparent 71%);
  }

  /* dzisiejszy cel: kompaktowy, bez przewijania w bok */
  .dash-goal {
    grid-template-columns: auto minmax(0, 1fr); gap: 14px 14px; padding: 16px; margin-bottom: 16px; border-radius: 22px;
  }
  .goal-ic { width: 52px; height: 52px; border-radius: 14px; }
  .goal-ic svg { width: 30px; height: 30px; }
  .goal-text h2 { font-size: 21px; }
  .goal-text p { white-space: normal; font-size: 15.5px; line-height: 1.35; }
  .goal-bar { grid-column: 1 / -1; min-width: 0; }
  .dash-goal .btn { grid-column: 1 / -1; width: 100%; min-width: 0; height: 56px; padding: 0 16px; font-size: 17px; justify-content: center; white-space: normal; }

  /* moduły: pojedyncze poziome karty */
  .dash-modules { grid-template-columns: 1fr; gap: 14px; margin-bottom: 18px; }
  .dash-modules .tile { min-height: 112px; padding: 14px 14px 14px 16px; gap: 14px; border-radius: 20px; }
  .dash-modules .tile img { width: 64px; height: 64px; }
  .dash-modules .tile-title { font-size: 22px; }
  .dash-modules .tile-desc { font-size: 16px; }
  .tile-go { width: 44px; height: 44px; }

  /* postęp i wskazówka: osobne karty, jedna pod drugą */
  .dash-bottom { grid-template-columns: 1fr; gap: 14px; }
  .dash-card { padding: 16px; border-radius: 20px; }
  .dash-head { padding-bottom: 12px; margin-bottom: 12px; gap: 10px; }
  .dash-head h2 { font-size: 19px; white-space: nowrap; }
  .dash-period { height: 38px; padding-left: 10px; }
  .dash-period select { font-size: 14px; }
  .dash-tip .tip-text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .dash-tip.is-open .tip-text { display: block; }
  .tip-more { display: inline; }
}
@media (max-width: 370px) {
  .dash-hero { grid-template-columns: minmax(0, 1fr) 38%; }
  .dash-hello h1 { font-size: 32px; }
  .dash-modules .tile img { width: 56px; height: 56px; }
}
.nw { white-space: nowrap; }
@media (max-width: 699px) { .goal-sep { display: none; } .goal-min { display: block; } }

/* ═══ v0.17: pasek nauki — „Dodaj do powtórek” (drugorzędny, lewo) | „Następne” (główny, prawo) ═══ */
.preview-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.preview-actions .btn.act-add, .preview-actions .btn.act-next {
  height: 56px; border-radius: 32px; font-size: 18px; font-weight: 600; gap: 10px; padding: 0 16px; white-space: nowrap; box-shadow: none;
}
.preview-actions .btn.act-add { background: #FDFBF6; color: var(--forest); border: 2px solid var(--forest); }
.preview-actions .btn.act-add:hover { background: #F1F4EF; }
.preview-actions .btn.act-add.is-added { background: #E3ECE3; border-color: #9FBBA6; color: #22513A; }
.preview-actions .btn.act-next { background: #244837; color: #fff; border: 2px solid #244837; }
.preview-actions .btn.act-next:hover { background: #1D3B2D; }
.preview-actions .btn.act-next:disabled { background: var(--line); border-color: var(--line); color: var(--ink-soft); }
.preview-actions .btn svg { width: 24px; height: 24px; flex: none; }
.preview-actions .btn.act-next svg { width: 26px; height: 26px; }
@media (min-width: 700px) {
  .sticky-footer:has(.preview-actions) .footer-inner { max-width: 760px; }
}
@media (max-width: 699px) {
  .sticky-footer:has(.preview-actions) {
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); border-radius: 0;
    background: #F5F2EA; border-top: 1px solid #E5E0D5; box-shadow: 0 -6px 16px rgba(31, 36, 33, .05);
  }
  .sticky-footer:has(.preview-actions) .footer-inner { padding: 0; }
  .preview-actions { gap: 12px; grid-template-columns: 1.15fr 1fr; }
  .preview-actions .btn.act-add, .preview-actions .btn.act-next { height: 64px; font-size: 18px; padding: 0 12px; }
}
@media (max-width: 370px) { .preview-actions .btn.act-add, .preview-actions .btn.act-next { font-size: 16px; gap: 6px; } }
.preview-actions { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } @media (max-width: 699px) { .preview-actions { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); } .preview-actions .btn { overflow: hidden; text-overflow: ellipsis; } }
@media (max-width: 699px) {
  .preview-actions { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 12px; }
  .preview-actions .btn.act-add, .preview-actions .btn.act-next { font-size: 17px; gap: 8px; padding: 0 10px; }
  .preview-actions .btn.act-add svg { width: 22px; height: 22px; }
}
@media (max-width: 380px) { .preview-actions .btn.act-add, .preview-actions .btn.act-next { font-size: 15.5px; gap: 6px; padding: 0 8px; } }
@media (max-width: 420px) { .act-add.is-added .add-tail { display: none; } .act-add.is-added::after { content: "do powtórek"; display: none; } }

/* v0.17.2: Ustawienia na telefonie — mniejsze przełączniki, węższe listy, „Przywróć domyślne” nad listami */
.srs-reset-row { display: flex; justify-content: flex-end; margin-top: 14px; }
.srs-reset { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 15px; }
.srs-reset svg { width: 18px; height: 18px; }
.srs-grid { margin-top: 10px; }
@media (max-width: 699px) {
  .segmented label { height: 42px; }
  .segmented label > span { font-size: 15.5px; padding: 0 8px; }
  .set-toggle-row { gap: 12px; padding: 14px; }
  .set-toggle-row .set-label b { font-size: 16px; }
  .set-toggle-row .set-label span { font-size: 14px; line-height: 1.35; }
  .set-row-icon svg { width: 22px; height: 22px; }
  .set-label b { font-size: 16px; }
  .set-label span { font-size: 14px; }
  .set-card select, .set-card input:not([type]) { height: 46px; font-size: 16px; }
  .srs-row { grid-template-columns: auto minmax(0, 1fr) 128px; gap: 10px; }
  .srs-label { font-size: 16px; white-space: nowrap; }
  .srs-row select { padding: 0 32px 0 12px; }
  .set-head h2 { font-size: 20px; }
  .set-head p { font-size: 14.5px; }
  .set-text { font-size: 15px; line-height: 1.45; }
}
@media (max-width: 699px) { .vocab-search { height: 50px; padding: 0 14px; gap: 8px; } .vocab-search input { font-size: 16px; } .vocab-search input::placeholder { font-size: 15.5px; } .cat-panel { scroll-margin-top: 12px; } }

/* v0.18 — podlinkowane „Podobne wyrażenia” */
.alts li { line-height: 1.5; }
.alt-link { display: inline-flex; align-items: center; gap: 2px; padding: 0 2px; margin: 0 -2px; border: 0; background: none; font: inherit; color: var(--ink); cursor: pointer; border-radius: 6px; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent, #D99B38) 70%, transparent); text-underline-offset: 3px; text-decoration-thickness: 2px; }
.alt-link svg { width: 15px; height: 15px; color: var(--ink-soft); }
.alt-link:hover strong, .alt-link:focus-visible strong { color: var(--green, #244837); }
.alt-link:focus-visible { outline: 2px solid var(--green, #244837); outline-offset: 2px; }

/* v0.18: mniejsze przyciski w dolnym pasku na telefonie (jak w Kod Ciała) */
@media (max-width: 699px) {
  .sticky-footer:has(.preview-actions) { padding: 8px 14px calc(8px + env(safe-area-inset-bottom)); }
  .preview-actions { gap: 10px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .preview-actions .btn.act-add, .preview-actions .btn.act-next { height: 44px; min-height: 0; border-radius: 22px; font-size: 15.5px; gap: 6px; padding: 0 10px; border-width: 1.5px; }
  .preview-actions .btn svg, .preview-actions .btn.act-add svg, .preview-actions .btn.act-next svg { width: 18px; height: 18px; }
  .review-footer { padding: 8px 14px calc(8px + env(safe-area-inset-bottom)); }
  .review-footer .btn-flip { height: 48px; min-height: 0; border-radius: 16px; font-size: 16px; gap: 8px; box-shadow: 0 2px 8px rgba(36, 72, 55, .18); }
  .review-footer .btn-flip svg { width: 19px; height: 19px; }
  .rate { min-height: 54px; padding: 6px 4px; gap: 2px; }
  .rate svg { width: 19px; height: 19px; }
  .rate span { font-size: 13px; }
}

/* v0.18.2: obszar roboczy = zawartość zielonego paska (od logo do lupy), na każdym ekranie */
:root { --bar-inner: 1280px; --content: calc(var(--bar-inner) + 2 * var(--gutter)); }
html[data-header="green"] .app-bar { padding-left: max(var(--gutter), calc(50vw - var(--bar-inner) / 2)); padding-right: max(var(--gutter), calc(50vw - var(--bar-inner) / 2)); }
@media (min-width: 900px) { .dash-modules { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.vocab .cat-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
@media (min-width: 900px) { .vocab .cat-grid:has(> .cat-card:nth-child(5):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* v0.18.3: powtórka na telefonie — cała karta na ekranie */
.lbl-short { display: none; }
.study-card-btn { gap: 8px; }
@media (max-width: 699px) {
  .lbl-long { display: none; } .lbl-short { display: inline; }
  .study-head .page-sub { display: none; }
  .study-head h1 { font-size: 24px; }
  .study-head .word-titlebar { gap: 6px; }
  .flip-top { padding: 14px 14px 0; align-items: center; }
  .flip-top .chip { font-size: 13px; padding: 4px 10px; }
  /* Karta nauki: okrągły zielony przycisk z książką w prawym rogu */
  .flip-top .study-card-btn {
    display: inline-grid; place-items: center; margin-left: auto; width: 44px; height: 44px; padding: 0; border-radius: 50%;
    background: var(--forest, #244837); border: 0; color: #fff; box-shadow: 0 4px 12px rgba(36, 72, 55, .28);
  }
  .flip-top .study-card-btn svg { width: 21px; height: 21px; }
  .flip-top .study-card-btn:active { transform: scale(.95); }
  .flip-top .scb-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .flip-card { min-height: 0; }
  .flip-face { gap: 10px; padding: 10px 18px 18px; }
  .flip-top + .flip-face { padding-top: 4px; }
  .flip-figure { height: 112px; }
  .flip-prompt { font-size: 12px; }
  .sentence-main { font-size: 21px; line-height: 1.35; }
  .sentence-sub { font-size: 15px; }
  .flip-target { padding: 7px 12px; font-size: 14px; gap: 7px; }
  .flip-target svg { width: 17px; height: 17px; }
  .flip-back .audio-btn { height: 38px; font-size: 14px; }
  .mini-word { padding-top: 10px; gap: 4px; }
  .mini-word .def-pl, .count-line { font-size: 14px; }
  .rating { gap: 6px; }
  .rate span { font-size: 12.5px; white-space: nowrap; }
}
@media (max-width: 699px) { .mini-term { font-size: 21px; } }
@media (max-width: 699px) { .flip-back .flip-figure { display: none; } .flip-back { padding-top: 6px; } .flip-front .flip-target { justify-self: center; } }
button.chip-link { cursor: pointer; font: inherit; font-weight: 600; display: inline-flex; align-items: center; border: 1px solid var(--line); }
button.chip-link:hover, button.chip-link:focus-visible { border-color: var(--sage, #6B8E78); background: #F1F4EF; }

/* v0.18.5: przycisk wymowy w miejscu etykiety Br/Am */
.pron { display: grid; gap: 8px; margin-top: 10px; }
.pron-row { display: flex; align-items: center; gap: 10px; margin: 0; flex-wrap: wrap; }
.pron-row .audio-btn { height: 34px; padding: 0 12px; gap: 5px; font-size: 14px; flex: none; }
.pron-row .audio-btn svg { width: 16px; height: 16px; }
.pron-row .ipa { margin: 0; font-size: 19px; }
.sheet-body .pron { margin-top: -4px; }
@media (max-width: 699px) {
  .pron { gap: 6px; margin-top: 8px; }
  .pron-row { gap: 8px; }
  .pron-row .audio-btn { height: 30px; padding: 0 10px; gap: 4px; font-size: 13px; }
  .pron-row .audio-btn svg { width: 15px; height: 15px; }
  .pron-row .ipa { font-size: 16px; }
  /* dolny pasek nauki: mniejsza czcionka, żeby „Dodaj do powtórek” miało oddech */
  .preview-actions .btn.act-add, .preview-actions .btn.act-next { height: 42px; border-radius: 21px; font-size: 14px; gap: 6px; padding: 0 10px; }
  .preview-actions .btn svg, .preview-actions .btn.act-add svg, .preview-actions .btn.act-next svg { width: 16px; height: 16px; }
}

/* v0.19: „Dwa spojrzenia” — EN vs PL w „Pomyśl o tym” */
.contrast { margin-top: 14px; padding-top: 14px; border-top: 1px dashed #E6CF9F; display: grid; gap: 10px; }
.contrast-title { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #8A6420; }
.contrast-fig { margin: 0; border-radius: 14px; background: #fff; overflow: hidden; aspect-ratio: 2 / 1; }
.contrast-fig img { width: 100%; height: 100%; object-fit: contain; display: block; }
.contrast-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.contrast-col { padding: 10px 12px; border-radius: 12px; background: #fff; border: 1px solid #EFDDB8; display: grid; gap: 3px; align-content: start; }
.contrast-lang { font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--sage, #6B8E78); }
.contrast-phrase { margin: 0; font-size: 16px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.contrast-phrase mark { background: #F6E3BD; color: #7A4E10; padding: 0 4px; border-radius: 5px; }
.contrast-why { margin: 0; font-size: 13.5px; color: var(--ink-soft); line-height: 1.35; }
@media (max-width: 699px) { .contrast-cols { gap: 8px; } .contrast-col { padding: 9px 10px; } .contrast-phrase { font-size: 15px; } .contrast-why { font-size: 12.5px; } }
.sheet-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sheet-figure { margin: 0; width: 132px; height: 99px; flex: none; border-radius: 12px; background: var(--surface, #F5F2EA); display: grid; place-items: center; overflow: hidden; }
.sheet-figure img { max-width: 100%; max-height: 100%; }

/* v0.19.4: „Karta nauki” na komputerze — zielony przycisk (jak okrągły na telefonie) */
@media (min-width: 700px) {
  .flip-top .study-card-btn {
    display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 18px 0 14px; border-radius: 99px;
    background: var(--forest, #244837); border: 0; color: #fff; font-size: 15px; font-weight: 600;
    box-shadow: 0 4px 12px rgba(36, 72, 55, .22); cursor: pointer; transition: background .15s, box-shadow .15s;
  }
  .flip-top .study-card-btn svg { width: 19px; height: 19px; color: #fff; }
  .flip-top .study-card-btn:hover { background: #1D3B2D; box-shadow: 0 6px 16px rgba(36, 72, 55, .28); border: 0; }
  .flip-top .study-card-btn:focus-visible { outline: 3px solid #D99B38; outline-offset: 2px; }
}

/* ═══ v0.20: Ustawienia — pola wyboru wg specyfikacji (label nad polem, 2 kolumny, własny chevron) ═══ */
.settings select, .settings .set-field input[type="text"], .settings .set-field input:not([type]) {
  -webkit-appearance: none; appearance: none; box-sizing: border-box; width: 100%; height: 50px; margin: 0;
  padding: 0 16px; border: 1px solid #DED6CD; border-radius: 12px; background-color: #FFFCFA; box-shadow: none;
  font: inherit; font-size: 16px; color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.settings select {
  padding-right: 44px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23244637' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 20px 20px;
}
.settings select:hover, .settings .set-field input:hover { border-color: #244637; }
.settings select:focus-visible, .settings .set-field input:focus-visible, .settings select:focus, .settings .set-field input:focus {
  outline: none; border-color: #244637; box-shadow: 0 0 0 3px rgba(36, 70, 55, .14);
}
.settings .set-label b, .srs-field-label { font-size: 15.5px; font-weight: 600; color: var(--ink); }
.settings .set-field, .set-single, .srs-field { display: grid; gap: 8px; align-content: start; }
.settings .set-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.settings .segmented { min-height: 50px; }
/* pojedyncze ustawienia: label nad polem, węższe pole */
.set-single { margin-top: 24px; }
.set-single select { max-width: 320px; }
/* cztery oceny powtórek: 2 kolumny */
.srs-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 16px; }
.srs-field-label { display: inline-flex; align-items: center; gap: 8px; }
.srs-field-label .srs-dot { width: 12px; height: 12px; flex: none; }
/* wiersze z przełącznikiem */
.settings .set-toggle-row { padding: 18px 20px; border-radius: 16px; margin-top: 24px; }
@media (max-width: 699px) {
  .settings .set-grid { grid-template-columns: 1fr; gap: 20px; }
  .srs-grid2 { gap: 16px; }
  .set-single select { max-width: none; }
  .settings .set-toggle-row { padding: 16px; }
}

/* v0.20.1: Kopia zapasowa — dwa wiersze akcji (ikona, opis, przycisk) */
.backup-list { display: grid; gap: 14px; margin-top: 18px; }
.backup-row {
  display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 16px;
  padding: 16px 18px; border-radius: 16px; background: #F3F1EA; border: 1px solid #ECE6DA;
}
.backup-ic { width: 52px; height: 52px; border-radius: 14px; background: #E6EDE6; color: var(--forest); display: grid; place-items: center; }
.backup-ic svg { width: 24px; height: 24px; }
.backup-txt { display: grid; gap: 3px; }
.backup-txt b { font-size: 16.5px; font-weight: 700; color: var(--ink); }
.backup-txt span { font-size: 14.5px; color: var(--ink-soft); line-height: 1.4; }
.backup-btn { min-width: 220px; height: 52px; min-height: 0; border-radius: 99px; font-size: 16px; font-weight: 600; gap: 10px; justify-content: center; }
.backup-btn svg { width: 20px; height: 20px; }
.backup-row .btn-secondary.backup-btn { background: #fff; border: 2px solid var(--forest); color: var(--forest); }
.backup-row .btn-secondary.backup-btn:hover { background: #F1F4EF; }
.settings .set-note.is-warn { margin-top: 16px; padding: 14px 18px; border-radius: 14px; font-size: 15px; }
@media (max-width: 699px) {
  .backup-row { grid-template-columns: 44px minmax(0, 1fr); gap: 12px 14px; padding: 14px; align-items: start; }
  .backup-ic { width: 44px; height: 44px; border-radius: 12px; }
  .backup-ic svg { width: 21px; height: 21px; }
  .backup-txt b { font-size: 16px; }
  .backup-txt span { font-size: 14px; }
  .backup-btn { grid-column: 1 / -1; width: 100%; min-width: 0; height: 48px; font-size: 15.5px; }
}

/* v0.20.4: panel wyszukiwania i menu wyrównane do prawej krawędzi obszaru roboczego (pod lupą) */
html[data-header="green"] .app-bar .search-panel,
html[data-header="green"] .app-bar .app-menu { right: max(var(--gutter), calc(50vw - var(--bar-inner) / 2)); }

/* v0.22: Praktyka — lekcje i przycisk na karcie słówka */
.pr-units { margin-top: 24px; }
.pr-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); margin-top: 10px; }
.pr-unit { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--card, #fff); text-align: left; font: inherit; cursor: pointer; transition: border-color .15s, background .15s; }
.pr-unit:hover { border-color: var(--sage, #6B8E78); background: #F6F8F4; }
.pr-num { width: 44px; height: 44px; border-radius: 12px; background: var(--forest, #244837); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 18px; }
.pr-txt { display: grid; gap: 2px; }
.pr-txt b { font-size: 16.5px; color: var(--ink); }
.pr-txt span { font-size: 14px; color: var(--ink-soft); }
.pr-cta { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 16px 18px; border-radius: 16px; background: #EEF3EC; border: 1px solid #CFDCCF; }
.pr-cta p { margin: 4px 0 0; font-size: 14.5px; color: var(--ink-soft); }
.pr-cta-btn { gap: 8px; }
.pr-cta-btn svg { width: 18px; height: 18px; }
.pr-unit > * { grid-area: auto !important; position: static; } .pr-unit .cat-chevron { justify-self: end; align-self: center; }

/* v0.22.2 — Dwa spojrzenia: obraz dzielony na dwie połówki, każda przy swoim tekście */
.contrast-col { padding: 0; overflow: hidden; gap: 0; }
.contrast-half { background: #fff; aspect-ratio: .94 / 1; overflow: hidden; border-bottom: 1px solid #F3E6CC; }
.contrast-half img { width: 100%; height: 100%; object-fit: cover; display: block; }
.contrast-half img.half-l { object-position: 0% 50%; }
.contrast-half img.half-r { object-position: 100% 50%; }
.contrast-text { padding: 10px 12px; display: grid; gap: 3px; align-content: start; }
.contrast.no-img .contrast-half { display: none; }
@media (min-width: 700px) {
  .contrast-col { grid-template-columns: clamp(150px, 16vw, 210px) 1fr; align-items: stretch; }
  .contrast-text { align-self: center; }
  .contrast-half { border-bottom: 0; border-right: 1px solid #F3E6CC; height: 100%; aspect-ratio: auto; min-height: clamp(150px, 16vw, 210px); }
  .contrast-text { padding: 14px 18px; gap: 5px; }
  .contrast.no-img .contrast-col { grid-template-columns: 1fr; }
}
@media (max-width: 699px) { .contrast-text { padding: 8px 10px; } }
.contrast-half img.half-l { transform: scale(1.07); transform-origin: 0% 50%; }
.contrast-half img.half-r { transform: scale(1.07); transform-origin: 100% 50%; }
@media (min-width: 700px) { .contrast-phrase { font-size: 18px; } .contrast-why { font-size: 14px; } }

/* v0.23 — karta słówka: nowa hierarchia typografii.
   Telefon: wariant B (słówko 24, granica 18, IPA 14, def 15, zdanie 16/15, nagłówki i etykiety 12).
   Desktop: słówko i wymowa w jednej linii, pionowa kreska, obrazek po prawej; definicje w jednym wierszu. */
.study-card .word-head .chips { margin: 0 0 10px; }
.study-card .chips .chip { font-size: 12px; font-weight: 500; }
.study-card .word-hero .term { font-size: 24px; font-weight: 600; line-height: 1.15; letter-spacing: 0; }
.study-card .pron { margin-top: 8px; gap: 6px; }
.study-card .pron-row .ipa { font-size: 14px; }
.study-card .pron-row .audio-btn { height: 30px; padding: 0 10px; font-size: 13px; }
.study-card .hero-figure { height: 110px; }
.study-card .defs .def-pl { font-size: 18px; font-weight: 600; }
.study-card .defs .def-en { font-size: 15px; }
.study-card .ex-en { font-size: 16px; font-weight: 500; }
.study-card .ex-pl { font-size: 15px; }
.study-card .section-title { font-size: 12px; font-weight: 600; }

@media (min-width: 700px) {
  .study-card .word-hero { grid-template-columns: minmax(0, 1fr) auto; gap: 0; align-items: stretch; }
  .study-card .word-head { display: flex; flex-direction: column; justify-content: center; padding-right: 28px; }
  .study-card .term-line { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 28px; }
  .study-card .word-hero .term { font-size: 28px; }
  .study-card .pron { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; margin: 0; }
  .study-card .pron-row { gap: 10px; }
  .study-card .pron-row .ipa { font-size: 15px; }
  .study-card .pron-row .audio-btn { height: 32px; padding: 0 12px; font-size: 13.5px; }
  .study-card .hero-figure { height: 150px; width: 230px; background: transparent; border-radius: 0; border-left: 1px solid var(--line, #E3DDD3); padding-left: 24px; box-sizing: content-box; }
  .study-card .defs { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 18px; padding: 12px 20px; }
  .study-card .defs .def-pl { font-size: 20px; padding-right: 18px; border-right: 1px solid #CFD8CC; }
  .study-card .defs .def-en { font-size: 16px; margin: 0; padding: 0; }
}

/* v0.23.1 — nagłówek karty: tagi przy górnej krawędzi, tłumaczenie i definicja pod słówkiem (desktop),
   obrazek tuż obok treści, a nie przy prawej krawędzi. */
.study-card .word-hero { grid-template-areas: "head fig" "defs defs"; row-gap: 14px; }
.study-card .word-head { grid-area: head; }
.study-card .hero-figure { grid-area: fig; }
.study-card .word-hero .defs { grid-area: defs; margin: 0; }
@media (min-width: 700px) {
  .study-card .word-hero { grid-template-columns: fit-content(720px) auto; grid-template-areas: "head fig" "defs fig"; justify-content: start; row-gap: 16px; align-items: start; }
  .study-card .word-head { justify-content: flex-start; padding-right: 36px; }
  .study-card .word-head .chips { margin: 0 0 14px; }
  .study-card .word-hero .defs { display: block; align-self: end; margin-right: 36px; padding: 10px 18px; border-left: 3px solid var(--sage, #6B8E78); border-radius: 0 12px 12px 0; }
  .study-card .word-hero .defs .def-pl { border: 0; padding: 0; font-size: 20px; }
  .study-card .word-hero .defs .def-en { margin-top: 3px; font-size: 16px; }
  .study-card .hero-figure { align-self: center; height: 170px; width: 240px; padding-left: 36px; }
}

/* v0.23.2 — tagi nad całym nagłówkiem; na desktopie ilustracja z lewej, obok słówko, wymowa i tłumaczenie. */
.study-card .word-hero { grid-template-areas: "chips chips" "head fig" "defs defs"; }
.study-card .hero-chips { grid-area: chips; margin: 0; }
@media (min-width: 700px) {
  .study-card .word-hero { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "chips chips" "fig head" "fig defs"; justify-content: stretch; row-gap: 14px; }
  .study-card .word-head { padding-right: 0; align-self: start; }
  .study-card .hero-figure { padding-left: 0; padding-right: 32px; margin-right: 32px; border-left: 0; border-right: 1px solid var(--line, #E3DDD3); height: 160px; width: 220px; align-self: start; }
  .study-card .word-hero .defs { margin-right: 0; justify-self: start; min-width: min(100%, 420px); max-width: 720px; align-self: start; }
}

/* v0.23.3 — na desktopie zdania przykładowe obok siebie */
@media (min-width: 700px) {
  .study-card .examples { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .study-card .examples > li { margin: 0; height: 100%; box-sizing: border-box; }
  .study-card .examples > li:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
