:root {
  --paper: #f4f1ea;
  --card: rgba(255, 255, 255, 0.78);
  --ink: #17221f;
  --muted: #69736f;
  --line: rgba(23, 34, 31, 0.11);
  --sage: #687d6c;
  --sage-dark: #405748;
  --sage-pale: #e3e9e1;
  --gold: #a67c48;
  --shadow: 0 30px 80px rgba(41, 52, 45, 0.08), 0 3px 14px rgba(41, 52, 45, 0.04);
}

[data-theme="dark"] {
  --paper: #111613;
  --card: rgba(27, 34, 30, 0.9);
  --ink: #f1eee6;
  --muted: #9da7a1;
  --line: rgba(235, 239, 235, 0.12);
  --sage: #9eaf9f;
  --sage-dark: #c4d2c5;
  --sage-pale: #2c3931;
  --gold: #d1a66f;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
}

[data-theme="gray"] {
  --paper: #0f0f0f;
  --card: rgba(27, 27, 27, 0.97);
  --ink: #ececec;
  --muted: #b4b4b4;
  --line: rgba(255, 255, 255, 0.12);
  --sage: #b4b4b4;
  --sage-dark: #dedede;
  --sage-pale: #292929;
  --gold: #c7a06b;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: "DM Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.21;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.13'/%3E%3C/svg%3E");
  z-index: -1;
}

.profile-trigger {
  position:fixed; z-index:35; top:16px; left:16px; display:flex; align-items:center; gap:8px; min-height:37px; padding:4px 12px 4px 5px;
  border:1px solid var(--line); border-radius:999px; color:var(--ink); background:var(--card); box-shadow:var(--shadow);
  backdrop-filter:blur(14px); font:inherit; font-size:9px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; cursor:pointer;
}
.profile-trigger-mark { display:grid; place-items:center; width:27px; height:27px; border:1px solid rgba(166,124,72,.35); border-radius:50%; color:var(--gold); font-family:"Newsreader",serif; font-size:15px; }
.profile-overlay { position:fixed; z-index:39; inset:0; background:rgba(10,15,12,.34); backdrop-filter:blur(2px); }
.profile-drawer {
  position:fixed; z-index:40; inset:0 auto 0 0; width:min(88vw,360px); padding:27px 23px; overflow:auto;
  border-right:1px solid var(--line); background:var(--paper); box-shadow:18px 0 55px rgba(20,27,23,.18);
  transform:translateX(-105%); transition:transform 240ms ease;
}
.profile-drawer.is-open { transform:translateX(0); }
.profile-header { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; margin-bottom:31px; }
.profile-header h2 { margin:5px 0 0; font-family:"Newsreader",serif; font-size:31px; font-weight:500; letter-spacing:.06em; }
.profile-header button { width:34px; height:34px; border:1px solid var(--line); border-radius:50%; color:var(--muted); background:transparent; font:inherit; font-size:20px; cursor:pointer; }
.profile-level { padding:20px; border:1px solid var(--line); border-radius:19px; background:var(--card); box-shadow:var(--shadow); }
.profile-level > div:first-child { display:flex; align-items:baseline; justify-content:space-between; }
.profile-level > div:first-child span, .profile-stat-grid span { color:var(--muted); font-size:8px; font-weight:700; letter-spacing:.12em; text-transform:uppercase; }
.profile-level > div:first-child strong { color:var(--gold); font-family:"Newsreader",serif; font-size:35px; font-weight:500; }
.profile-xp-copy { display:flex; justify-content:space-between; gap:12px; margin-top:16px; font-size:11px; font-weight:600; }
.profile-xp-copy small { color:var(--muted); font-size:9px; font-weight:500; }
.profile-xp-track { height:6px; margin-top:9px; overflow:hidden; border-radius:99px; background:var(--sage-pale); }
.profile-xp-track span { display:block; width:0; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--sage),var(--gold)); transition:width .35s ease; }
.profile-stat-grid { display:grid; gap:8px; margin-top:12px; }
.profile-stat-grid > div { display:flex; align-items:center; justify-content:space-between; gap:15px; padding:16px 18px; border:1px solid var(--line); border-radius:15px; background:var(--card); }
.profile-stat-grid strong { font-family:"Newsreader",serif; font-size:18px; font-weight:500; }
.profile-note { margin:20px 5px 0; color:var(--muted); font-size:9px; line-height:1.6; text-align:center; }
.profile-reset { display:block; margin:16px auto 0; padding:8px 4px; border:0; color:var(--muted); background:transparent; font:inherit; font-size:9px; text-decoration:underline; text-underline-offset:3px; cursor:pointer; }
.profile-reset:hover { color:#a65148; }
.xp-toast { position:fixed; z-index:60; left:50%; bottom:22px; padding:10px 15px; border-radius:999px; color:#fff; background:var(--ink); box-shadow:var(--shadow); font-size:10px; font-weight:700; opacity:0; pointer-events:none; transform:translate(-50%,12px); transition:opacity .2s ease,transform .2s ease; }
.xp-toast.is-visible { opacity:1; transform:translate(-50%,0); }
.notes-overlay { position:fixed; z-index:49; inset:0; background:rgba(10,15,12,.4); backdrop-filter:blur(3px); }
.notes-modal { position:fixed; z-index:50; top:50%; left:50%; width:min(calc(100% - 28px),560px); max-height:min(82vh,720px); padding:25px; overflow:auto; border:1px solid var(--line); border-radius:24px; color:var(--ink); background:var(--paper); box-shadow:0 30px 90px rgba(15,22,18,.28); transform:translate(-50%,-50%); }
.notes-header { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; }
.notes-header h2 { margin:5px 0 0; font-family:"Newsreader",serif; font-size:32px; font-weight:500; }
.notes-header button { width:34px; height:34px; border:1px solid var(--line); border-radius:50%; color:var(--muted); background:transparent; font:inherit; font-size:20px; cursor:pointer; }
.notes-intro { margin:13px 0 21px; color:var(--muted); font-size:11px; line-height:1.6; }
.notes-form { display:grid; gap:7px; }
.notes-form label { margin:5px 2px 0; color:var(--muted); font-size:8px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; }
.notes-form label span { font-weight:500; letter-spacing:0; text-transform:none; }
.notes-form input, .notes-form textarea { width:100%; padding:12px 13px; border:1px solid var(--line); border-radius:11px; color:var(--ink); background:var(--card); font:inherit; font-size:12px; resize:vertical; }
.notes-form button[type="submit"] { min-height:43px; margin-top:5px; border:0; border-radius:11px; color:#fff; background:var(--ink); font:inherit; font-size:11px; font-weight:700; cursor:pointer; }
.notes-list-head { display:flex; justify-content:space-between; margin:24px 2px 9px; color:var(--muted); font-size:8px; font-weight:700; letter-spacing:.12em; text-transform:uppercase; }
.notes-list { display:grid; gap:7px; }
.note-item { display:grid; grid-template-columns:1fr auto; gap:14px; align-items:start; padding:14px 15px; border:1px solid var(--line); border-radius:13px; background:var(--card); }
.note-item strong { font-family:"Newsreader",serif; font-size:18px; font-weight:500; }
.note-item p { margin:5px 0 0; color:var(--muted); font-size:10px; line-height:1.55; white-space:pre-wrap; }
.note-item button { padding:4px 0; border:0; color:var(--muted); background:transparent; font:inherit; font-size:8px; cursor:pointer; }
.note-item button:hover { color:#a65148; }
.notes-empty { margin:16px 0 2px; color:var(--muted); font-size:10px; text-align:center; }
[data-theme="dark"] .notes-form button[type="submit"], [data-theme="gray"] .notes-form button[type="submit"] { color:#17221f; background:#dfe8df; }

.ambient {
  position: fixed;
  border-radius: 999px;
  filter: blur(2px);
  pointer-events: none;
  z-index: -2;
}

.ambient-one {
  width: 420px;
  height: 420px;
  top: -210px;
  right: -170px;
  background: rgba(171, 190, 170, 0.28);
}

.ambient-two {
  width: 330px;
  height: 330px;
  bottom: -210px;
  left: -170px;
  background: rgba(202, 180, 145, 0.22);
}

.app-shell {
  width: min(100% - 32px, 760px);
  margin: 0 auto;
  padding: 24px 0 30px;
}

.home-view { padding:34px 0 10px; }
.top-feature-grid { display:grid; gap:12px; }
.home-hero { padding: 20px 6px 38px; text-align: center; }
.home-mark { width: 45px; height: 45px; margin: 0 auto 17px; font-size: 23px; }
.home-brand { margin: 0 0 7px; font-size: 13px; font-weight: 700; letter-spacing: .26em; }
.home-hero h1 { margin: 0; white-space: normal; font-size: clamp(31px, 8vw, 48px); line-height: 1.13; }
.home-hero h1::before { content: "„"; margin-right: .04em; color: var(--gold); font-size: .72em; }
.home-hero h1::after { content: "”"; margin-left: .04em; color: var(--gold); font-size: .72em; }
.quote-author { margin: 25px 0 0; color: var(--muted); font-size: 12px; letter-spacing: .06em; }
.home-modules { display: grid; gap: 12px; }
.wide-games-stack { display:grid; gap:12px; }
.home-modules-brand { display:grid; grid-template-columns:1fr auto auto 1fr; align-items:center; gap:14px; padding:2px 8px; text-align:center; }
.home-modules-brand .home-mark { flex:0 0 auto; margin:0; }
.home-modules-brand p:last-child { margin:0; color:var(--muted); font-size:8px; letter-spacing:.18em; }
.brand-line { height:1px; background:linear-gradient(90deg, transparent, var(--line)); }
.brand-line:last-child { transform:scaleX(-1); }
.home-bottom-controls { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-top:14px; padding:0 4px; }
.home-theme-control { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.home-theme-control label { color: var(--muted); font-size: 9px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.notes-trigger { min-height:31px; padding:5px 10px; border:1px solid var(--line); border-radius:999px; color:var(--muted); background:rgba(255,255,255,.45); font:inherit; font-size:9px; font-weight:600; cursor:pointer; }
.notes-trigger span { display:inline-grid; place-items:center; min-width:17px; height:17px; margin-left:5px; padding:0 4px; border-radius:99px; color:var(--gold); background:var(--sage-pale); font-size:8px; }
[data-theme="dark"] .notes-trigger { background:rgba(255,255,255,.04); }
[data-theme="gray"] .notes-trigger { background:#1b1b1b; }
.module-grid { display: grid; gap: 12px; }
.module-tile {
  gap:13px; width:100%; border:1px solid rgba(255,255,255,.86); border-radius:24px;
  color: var(--ink); background: var(--card); box-shadow: var(--shadow); backdrop-filter: blur(16px);
  font: inherit; text-align: left; cursor: pointer; transition: transform 180ms ease, border-color 180ms ease;
}
.primary-module-tile {
  box-sizing:border-box;
  display:grid;
  grid-template-columns:42px minmax(0,1fr) 42px;
  align-items:center;
  width:100%;
  height:132px;
  min-height:132px;
  padding:28px 32px;
}
.primary-module-tile .module-content { display:grid; align-content:center; gap:6px; min-width:0; }
.primary-module-tile .module-content > strong { align-self:auto; line-height:1.2; }
.primary-module-tile .module-content > span { align-self:auto; }
.module-tile:hover { transform: translateY(-2px); border-color: rgba(166,124,72,.35); }
.module-number { align-self:start; padding-top:3px; color:var(--gold); font-size:9px; letter-spacing:.12em; }
.primary-module-tile .module-number { align-self:center; display:grid; place-items:center; width:42px; height:42px; padding:0; border-radius:50%; background:var(--sage-pale); }
.module-content { display:grid; gap:6px; }
.module-content strong { font-family:"Newsreader",serif; font-size:24px; font-weight:500; letter-spacing:.01em; }
.module-content > span { max-width:420px; color:var(--muted); font-size:11px; line-height:1.5; }
.module-content .module-description-row { display:flex; align-items:baseline; justify-content:flex-start; gap:8px; max-width:none; }
.module-description-row > span { min-width:0; }
.module-description-row b { flex:0 1 auto; max-width:42%; overflow:hidden; color:var(--gold); font-family:"Newsreader",serif; font-size:13px; font-weight:500; line-height:1.2; text-overflow:ellipsis; white-space:nowrap; }
.module-arrow { display:grid; place-items:center; width:42px; height:42px; border:1px solid var(--line); border-radius:50%; color:var(--sage-dark); }
.confusion-teaser {
  position:relative; display:grid; grid-template-columns:1fr; grid-template-areas:"label" "title" "copy"; align-content:center; justify-items:center; row-gap:6px; width:100%; min-height:112px; padding:24px 180px; text-align:center;
  border: 1px solid color-mix(in srgb, var(--gold) 25%, transparent); border-radius: 19px;
  color: var(--ink); background: color-mix(in srgb, var(--card) 84%, var(--gold) 4%);
  box-shadow: var(--shadow); font: inherit; text-align: left; cursor: pointer;
}
.confusion-teaser .eyebrow { grid-area:label; }
.confusion-teaser strong { grid-area:title; font-family:"Newsreader",serif; font-size:22px; font-weight:500; line-height:1.2; }
.pair-teaser-copy { grid-area:copy; color:var(--muted); font-size:11px; line-height:1.5; }
.pair-teaser-link { position:absolute; right:32px; top:50%; transform:translateY(-50%); color:var(--sage-dark); font-size:10px; font-weight:600; white-space:nowrap; }
.partner-card { position:relative; display:grid; place-items:center; width:100%; min-height:104px; padding:22px 190px; overflow:hidden; border:1px solid color-mix(in srgb,var(--gold) 22%,var(--line)); border-radius:22px; color:var(--ink); background:linear-gradient(105deg,color-mix(in srgb,var(--card) 92%,var(--gold) 4%),var(--card)); box-shadow:var(--shadow); text-align:center; }
.partner-card-mark { position:absolute; left:30px; top:50%; transform:translateY(-50%); display:grid; place-items:center; width:42px; height:42px; border:1px solid color-mix(in srgb,var(--gold) 35%,transparent); border-radius:50%; color:var(--gold); font-family:"Newsreader",serif; font-size:20px; }
.partner-card-copy { display:grid; justify-items:center; gap:3px; min-width:0; }
.partner-card-copy small { color:var(--sage-dark); font-size:8px; font-weight:700; letter-spacing:.15em; text-transform:uppercase; }
.partner-card-copy strong { font-family:"Newsreader",serif; font-size:21px; font-weight:500; }
.partner-card-copy > span { color:var(--muted); font-size:10px; line-height:1.45; }
.partner-card-action { position:absolute; right:30px; top:50%; transform:translateY(-50%); color:var(--gold); font-size:10px; font-weight:600; white-space:nowrap; }
.home-hero, .confusion-teaser, .home-quiz, .home-game-teaser, .partner-card, .language-fact-card {
  transition:transform 180ms ease,border-color 180ms ease,box-shadow 180ms ease;
}
.home-hero:hover, .confusion-teaser:hover, .home-quiz:hover, .home-game-teaser:hover, .partner-card:hover, .language-fact-card:hover {
  transform:translateY(-2px);
  border-color:color-mix(in srgb,var(--gold) 48%,transparent);
  box-shadow:0 34px 84px rgba(41,52,45,.11),0 4px 16px rgba(41,52,45,.06);
}
.confusion-header h1 { font-size: clamp(38px, 10vw, 62px); }
.pair-grid { display: grid; gap: 1px; overflow: hidden; border-radius: 18px; background: var(--line); }
.pair-word { padding: 23px; background: var(--card); }
.pair-word h2 { margin: 8px 0 10px; font-family: "Newsreader", serif; font-size: 30px; font-weight: 500; }
.pair-word > p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.pair-word blockquote { margin: 20px 0 0; font-size: 18px; }
.pair-rule { display: grid; gap: 8px; margin-top: 18px; padding: 21px; border-radius: 17px; background: var(--sage-pale); }
.pair-rule span { color: var(--gold); font-size: 8px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.pair-rule strong { font-family: "Newsreader", serif; font-size: 20px; font-weight: 500; line-height: 1.4; }
.pair-navigation { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 12px; }
.pair-navigation > span { color: var(--muted); font-size: 9px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.pair-navigation .next-practice { margin-top: 0; }
.synonym-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 18px; }
.synonym-stats > div { padding: 13px 10px; border: 1px solid var(--line); border-radius: 13px; text-align: center; }
.synonym-stats span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 8px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.synonym-stats strong { font-family: "Newsreader", serif; font-size: 22px; font-weight: 500; }
.synonym-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.synonym-tile { min-height: 64px; padding: 12px 10px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: rgba(255,255,255,.34); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: transform 160ms ease, border-color 160ms ease, background 160ms ease; }
.synonym-tile:hover:not(:disabled) { transform: translateY(-1px); border-color: var(--gold); }
.synonym-tile.is-selected { border-color: var(--sage); color: #fff; background: var(--sage-dark); }
.synonym-tile.is-matched { border-color: color-mix(in srgb, var(--gold) 55%, transparent); color: var(--gold); background: color-mix(in srgb, var(--gold) 12%, var(--card)); cursor: default; }
.synonym-tile.is-wrong { border-color: #b9786f; color: #7a3630; background: #f2dfdc; }
.synonym-feedback { min-height: 20px; margin: 15px 0 0; color: var(--muted); font-size: 11px; font-weight: 600; text-align: center; }
.synonym-result { padding: 18px 0 2px; text-align: center; }
.synonym-result h2 { margin: 5px 0; font-family: "Newsreader", serif; font-size: 27px; font-weight: 500; }
.synonym-result > p:last-child { margin: 0; color: var(--muted); font-size: 12px; }
.synonym-new-round { margin-top: 18px; }
[data-theme="dark"] .synonym-tile, [data-theme="gray"] .synonym-tile { background: rgba(255,255,255,.035); }
[data-theme="dark"] .synonym-tile.is-selected, [data-theme="gray"] .synonym-tile.is-selected { color: #17221f; background: #dfe8df; }
[data-theme="dark"] .synonym-tile.is-wrong, [data-theme="gray"] .synonym-tile.is-wrong { color: #f1c7c1; background: #482f2c; }
.module-back { margin: 0 4px 18px; padding: 5px 0; border: 0; color: var(--muted); background: transparent; font: inherit; font-size: 11px; cursor: pointer; }
.module-back:hover { color: var(--ink); }
.practice-view { padding-top: 5px; }
.practice-header { padding: 24px 5px 30px; }
.practice-index { float: right; color: var(--gold); font-family: "Newsreader", serif; font-size: 44px; opacity: .34; }
.practice-header h1 { margin: 22px 0 8px; white-space: normal; font-size: clamp(43px, 12vw, 68px); }
.practice-header > p:last-child { max-width: 420px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.practice-card { padding: 25px 22px 22px; border: 1px solid rgba(255,255,255,.88); border-radius: 28px; background: var(--card); box-shadow: var(--shadow); backdrop-filter: blur(16px); }
.practice-card blockquote { margin: 16px 0 28px; font-family: "Newsreader", serif; font-size: 22px; line-height: 1.42; }
.practice-prompt { display: flex; align-items: flex-start; gap: 14px; padding: 20px; border-radius: 17px; background: var(--sage-pale); }
.practice-prompt > span { color: var(--gold); }
.practice-prompt h2 { margin: 8px 0 5px; font-family: "Newsreader", serif; font-size: 22px; font-weight: 500; }
.practice-prompt h2 + p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.practice-prompt .learning-word-hint { margin-top:9px; color:var(--gold); font-size:10px; font-weight:600; }
.reveal-button { width: 100%; min-height: 52px; margin-top: 18px; border: 0; border-radius: 14px; color: #fff; background: var(--ink); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.answer-panel { margin-top: 18px; padding: 22px; border: 1px solid rgba(166,124,72,.24); border-radius: 17px; background: rgba(166,124,72,.07); }
.answer-panel blockquote { margin: 12px 0; font-size: 21px; }
.answer-panel > p:last-child { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.answer-pattern strong { color: var(--ink); }
.next-practice { display: block; margin: 18px 2px 0 auto; padding: 7px 0; border: 0; color: var(--muted); background: transparent; font: inherit; font-size: 11px; cursor: pointer; }
.next-practice span { display: inline-block; margin-left: 4px; transition: transform 180ms ease; }
.next-practice:hover { color: var(--ink); }
.next-practice:hover span { transform: translateX(3px); }
[data-theme="dark"] .module-tile, [data-theme="dark"] .practice-card { border-color: var(--line); }
[data-theme="gray"] .module-tile, [data-theme="gray"] .practice-card { border-color: var(--line); }
[data-theme="dark"] .reveal-button, [data-theme="gray"] .reveal-button { color: #17221f; background: #dfe8df; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 22px;
  flex-wrap: wrap;
  gap: 10px;
}

.top-actions { display:flex; align-items:center; justify-content:flex-end; gap:7px; }

.theme-select {
  min-height:31px; max-width:126px; padding:5px 24px 5px 9px;
  border:1px solid var(--line); border-radius:999px; color:var(--muted);
  background:rgba(255,255,255,.45); font:inherit; font-size:9px; font-weight:600; cursor:pointer;
}
.category-select { max-width:145px; }

.library-bar {
  margin-bottom: 14px;
  padding: 17px 18px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 19px;
  background: rgba(255,255,255,.44);
  backdrop-filter: blur(12px);
}

.library-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:16px; margin-bottom:14px; }
.library-heading strong { display:block; margin-top:3px; font-family:"Newsreader",serif; font-size:18px; font-weight:500; }
.library-eyebrow { color:var(--muted); font-size:8px; font-weight:600; letter-spacing:.16em; text-transform:uppercase; }
.reset-filters { border:0; padding:5px 0; color:var(--sage-dark); background:transparent; font:inherit; font-size:10px; cursor:pointer; }
.filter-row { display:block; }
.filter-row label { display:block; }
.filter-row label > span { display:block; margin:0 0 5px 3px; color:var(--muted); font-size:8px; font-weight:600; letter-spacing:.1em; text-transform:uppercase; }
.filter-row select {
  width:100%; min-width:0; height:39px; padding:0 30px 0 11px; border:1px solid var(--line); border-radius:10px;
  color:var(--ink); background:rgba(255,255,255,.65); font:inherit; font-size:10px; cursor:pointer;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border: 1px solid color-mix(in srgb, var(--gold) 38%, transparent);
  border-radius: 50%;
  color: var(--gold);
  font-family: "DM Sans", sans-serif;
  font-size: 17px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
}

.day-pill {
  appearance: none;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.45);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: inherit;
  cursor: pointer;
}

.learning-calendar-wrap { position:relative; }
.learning-calendar {
  position:absolute; z-index:20; top:calc(100% + 9px); right:0; width:272px; padding:17px;
  border:1px solid rgba(255,255,255,.85); border-radius:18px; color:var(--ink);
  background:var(--card); box-shadow:0 18px 48px rgba(34,42,37,.16); backdrop-filter:blur(18px);
}
.calendar-header { display:grid; grid-template-columns:28px 1fr 28px; align-items:center; gap:7px; margin-bottom:13px; }
.calendar-header strong { text-align:center; font-family:"Newsreader",serif; font-size:17px; font-weight:500; text-transform:capitalize; }
.calendar-header button {
  width:28px; height:28px; padding:0; border:1px solid var(--line); border-radius:50%; color:var(--muted);
  background:transparent; font:inherit; cursor:pointer;
}
.calendar-header button:disabled { opacity:.25; cursor:default; }
.calendar-weekdays, .calendar-grid { display:grid; grid-template-columns:repeat(7, 1fr); gap:4px; }
.calendar-weekdays { margin-bottom:5px; color:var(--muted); font-size:8px; font-weight:600; text-align:center; text-transform:uppercase; }
.calendar-day { display:grid; place-items:center; aspect-ratio:1; border-radius:50%; color:var(--muted); font-size:10px; }
.calendar-day.is-active { color:#fff; background:var(--sage-dark); font-weight:600; }
.calendar-day.is-missed { color:var(--muted); background:var(--sage-pale); }
.calendar-day.is-today { box-shadow:inset 0 0 0 1px var(--gold); }
.calendar-day.is-empty { visibility:hidden; }
.calendar-legend { display:flex; justify-content:center; gap:15px; margin-top:13px; color:var(--muted); font-size:8px; }
.calendar-legend span { display:flex; align-items:center; gap:5px; }
.calendar-legend i { width:7px; height:7px; border-radius:50%; }
.calendar-legend i.is-active { background:var(--sage-dark); }
.calendar-legend i.is-missed { background:var(--sage-pale); }

.word-card {
  position: relative;
  padding: 25px 22px 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 28px;
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

[data-theme="dark"] .theme-select,
[data-theme="dark"] .day-pill,
[data-theme="dark"] .library-bar { background:rgba(255,255,255,.04); border-color:var(--line); }
[data-theme="dark"] .filter-row select { color:var(--ink); background:#202923; }
[data-theme="dark"] .simple-explanation { color:#c0c8c3; }
[data-theme="dark"] .task-section { background:#222c26; }
[data-theme="dark"] .know-button { color:#17221f; background:#dfe8df; }
[data-theme="dark"] .ambient-one { background:rgba(77,105,83,.22); }
[data-theme="dark"] .ambient-two { background:rgba(135,94,54,.13); }
[data-theme="dark"] .learning-calendar { border-color:var(--line); background:#202923; }

[data-theme="gray"] .theme-select,
[data-theme="gray"] .day-pill,
[data-theme="gray"] .library-bar { background:#1b1b1b; border-color:var(--line); }
[data-theme="gray"] .filter-row select { color:var(--ink); background:#252525; }
[data-theme="gray"] .simple-explanation { color:#d1d1d1; }
[data-theme="gray"] .task-section { background:#252525; }
[data-theme="gray"] .know-button { color:#202020; background:#ececec; }
[data-theme="gray"] .ambient { display:none; }
[data-theme="gray"] .learning-calendar { border-color:var(--line); background:#1b1b1b; }

.word-card::after {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  right: -85px;
  top: 115px;
  border: 1px solid rgba(104, 125, 108, 0.12);
  border-radius: 50%;
}

.card-intro,
.word-meta,
.task-heading,
footer {
  display: flex;
  align-items: center;
}

.quiz-card {
  margin-top:16px; padding:22px; border:1px solid rgba(255,255,255,.85); border-radius:24px;
  background:var(--card); box-shadow:var(--shadow); backdrop-filter:blur(16px);
}
.home-quiz { margin-top: 16px; }
.home-game-teaser { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 14px; width: 100%; margin-top: 12px; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.home-game-teaser .quiz-copy { display: grid; gap: 3px; }
.home-game-teaser .quiz-copy strong { font-family: "Newsreader", serif; font-size: 24px; font-weight: 500; }
.home-game-teaser .quiz-copy > span:last-child { color: var(--muted); font-size: 11px; line-height: 1.5; }
.game-feature-grid { display:grid; gap:12px; margin-top:12px; }
.language-fact-card { position:relative; display:flex; flex-direction:column; justify-content:center; min-height:300px; padding:34px; overflow:hidden; border:1px solid color-mix(in srgb,var(--gold) 46%,transparent); border-radius:26px; background:var(--card); box-shadow:var(--shadow); backdrop-filter:blur(16px); }
.language-fact-mark { position:absolute; right:24px; top:20px; color:var(--gold); font-family:"Newsreader",serif; font-size:34px; opacity:.23; }
.language-fact-card h2 { max-width:390px; margin:18px 0 12px; font-family:"Newsreader",serif; font-size:clamp(29px,7vw,42px); font-weight:500; line-height:1.08; }
.language-fact-card > p { max-width:440px; margin:0; color:var(--ink); font-size:13px; line-height:1.65; }
.language-fact-card > small { display:block; max-width:430px; margin-top:20px; padding-top:16px; border-top:1px solid var(--line); color:var(--muted); font-size:10px; line-height:1.55; }
.game-feature-list { display:grid; gap:12px; }
.game-feature-list .home-game-teaser { margin:0; }
.wheel-badge { font-size:17px; }
.idiom-badge { font-size:15px; letter-spacing:-.08em; }
.quote-game-badge { font-size:15px; letter-spacing:-.08em; }
.game-start { grid-column: 1 / -1; display: grid; place-items: center; min-height: 44px; margin-top: 5px; border-radius: 12px; color: #fff; background: var(--ink); font-size: 12px; font-weight: 600; }
[data-theme="dark"] .game-start, [data-theme="gray"] .game-start { color: #17221f; background: #dfe8df; }
.quiz-card [hidden] { display:none !important; }
.quiz-intro { display:grid; grid-template-columns:auto 1fr; align-items:center; gap:14px; }
.quiz-badge { display:grid; place-items:center; width:42px; height:42px; border-radius:50%; color:var(--gold); background:var(--sage-pale); font-family:"Newsreader",serif; font-size:22px; }
.quiz-copy h2, .quiz-result h2 { margin:5px 0 3px; font-family:"Newsreader",serif; font-size:24px; font-weight:500; }
.quiz-copy > p:last-child, .quiz-result > p { margin:0; color:var(--muted); font-size:11px; line-height:1.5; }
.quiz-start, .quiz-restart, .quiz-next {
  grid-column:1 / -1; width:100%; min-height:44px; margin-top:5px; border:0; border-radius:12px;
  color:#fff; background:var(--ink); font:inherit; font-size:12px; font-weight:600; cursor:pointer;
}
.quiz-progress-row { display:flex; justify-content:space-between; color:var(--muted); font-size:10px; font-weight:600; text-transform:uppercase; letter-spacing:.08em; }
.quiz-progress-track { height:4px; margin:10px 0 26px; overflow:hidden; border-radius:99px; background:var(--sage-pale); }
.quiz-progress-track span { display:block; width:10%; height:100%; border-radius:inherit; background:var(--gold); transition:width .25s ease; }
.quiz-prompt { margin:0 0 7px; color:var(--muted); font-size:10px; font-weight:600; letter-spacing:.08em; text-transform:uppercase; }
.quiz-definition { margin:0 0 21px; font-family:"Newsreader",serif; font-size:21px; font-weight:500; line-height:1.38; }
.quiz-options { display:grid; gap:8px; }
.quiz-option { min-height:46px; padding:10px 14px; border:1px solid var(--line); border-radius:11px; color:var(--ink); background:rgba(255,255,255,.32); font:inherit; font-size:12px; text-align:left; cursor:pointer; }
.quiz-option:hover:not(:disabled) { border-color:var(--gold); }
.quiz-option.is-correct { border-color:#668a6c; color:#315b39; background:#e1eee2; }
.quiz-option.is-wrong { border-color:#b9786f; color:#7a3630; background:#f2dfdc; }
.quiz-option:disabled { cursor:default; }
.quiz-feedback { min-height:20px; margin:14px 0 0; font-size:12px; font-weight:600; }
.daily-synonym-card h2 { margin:13px 0 6px; font-family:"Newsreader",serif; font-size:clamp(38px,10vw,58px); font-weight:500; }
.daily-synonym-definition { max-width:590px; margin:0 0 24px; color:var(--muted); font-size:12px; line-height:1.6; }
.daily-synonym-answer { margin-top:12px; padding:16px 18px; border:1px solid rgba(166,124,72,.24); border-radius:14px; background:rgba(166,124,72,.07); }
.daily-synonym-answer p { margin:0; font-size:12px; line-height:1.55; }
.daily-synonym-answer p + p { margin-top:5px; color:var(--muted); }
.daily-synonym-card .next-practice { margin-top:13px; }
.quote-game-topline { display:flex; align-items:center; justify-content:space-between; color:var(--muted); font-size:9px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; }
.quote-game-topline strong { color:var(--gold); font-size:10px; }
.quote-game-card blockquote { margin:15px 0 20px; font-family:"Newsreader",serif; font-size:clamp(23px,6vw,34px); line-height:1.35; }
.quote-lifeline { display:inline-flex; align-items:center; gap:8px; min-height:34px; margin-bottom:16px; padding:6px 12px; border:1px solid rgba(166,124,72,.35); border-radius:999px; color:var(--gold); background:rgba(166,124,72,.08); font:inherit; font-size:11px; font-weight:700; cursor:pointer; }
.quote-lifeline small { color:var(--muted); font-size:8px; font-weight:500; }
.quote-lifeline:disabled { opacity:.38; cursor:default; }
.quote-game-source { margin-top:10px; padding:12px 14px; border-left:2px solid var(--gold); color:var(--muted); background:rgba(166,124,72,.06); font-size:10px; line-height:1.5; }
.quote-game-result { border-top:0; }
.quote-game-card.is-finished > :not(.quote-game-result) { display:none; }
.quiz-next { margin-top:7px; }
.quiz-result { padding:16px 0 8px; text-align:center; }
.result-mark { display:grid; place-items:center; width:56px; height:56px; margin:0 auto 16px; border-radius:50%; color:var(--sage-dark); background:var(--sage-pale); font-size:23px; }
.quiz-restart { max-width:240px; margin-top:20px; }
[data-theme="dark"] .quiz-card { border-color:var(--line); }
[data-theme="dark"] .quiz-option { background:rgba(255,255,255,.035); }
[data-theme="dark"] .quiz-option.is-correct { color:#cae7ce; background:#263d2b; }
[data-theme="dark"] .quiz-option.is-wrong { color:#f0c2bc; background:#432a28; }
[data-theme="dark"] .quiz-start, [data-theme="dark"] .quiz-next, [data-theme="dark"] .quiz-restart { color:#17221f; background:#dfe8df; }
[data-theme="gray"] .quiz-card { border-color:var(--line); }
[data-theme="gray"] .quiz-option { background:#252525; }
[data-theme="gray"] .quiz-option.is-correct { color:#d7f0db; background:#29402e; }
[data-theme="gray"] .quiz-option.is-wrong { color:#f1c7c1; background:#482f2c; }
[data-theme="gray"] .quiz-start, [data-theme="gray"] .quiz-next, [data-theme="gray"] .quiz-restart { color:#202020; background:#ececec; }

.wheel-level-control { display:flex; align-items:center; justify-content:flex-end; gap:9px; margin-bottom:12px; }
.wheel-level-control label { color:var(--muted); font-size:8px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; }
.wheel-level-control select { min-height:32px; padding:5px 28px 5px 11px; border:1px solid var(--line); border-radius:999px; color:var(--ink); background:rgba(255,255,255,.4); font:inherit; font-size:10px; font-weight:600; cursor:pointer; }
.wheel-stats { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-bottom:18px; }
.wheel-stats > div { padding:12px 14px; border-radius:13px; background:var(--sage-pale); }
.wheel-stats span { display:block; margin-bottom:4px; color:var(--muted); font-size:8px; font-weight:700; letter-spacing:.12em; text-transform:uppercase; }
.wheel-stats strong { font-family:"Newsreader",serif; font-size:21px; font-weight:500; }
.wheel-stats strong.is-ending { color:#a65148; }
.wheel-starter { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-bottom:10px; padding:11px 14px; border-radius:12px; background:color-mix(in srgb, var(--gold) 9%, transparent); }
.wheel-starter strong { color:var(--gold); font-size:11px; font-weight:600; }
.wheel-clue { padding:18px; border:1px solid var(--line); border-radius:15px; text-align:center; }
.wheel-clue p { max-width:570px; margin:8px auto 0; font-family:"Newsreader",serif; font-size:18px; line-height:1.4; }
.wheel-word { display:flex; flex-wrap:wrap; justify-content:center; gap:5px; margin:28px 0 24px; }
.wheel-letter {
  display:grid; place-items:center; width:clamp(22px, 6vw, 33px); height:clamp(32px, 8vw, 43px);
  border-bottom:2px solid var(--gold); font-family:"Newsreader",serif; font-size:clamp(17px, 5vw, 24px); font-weight:600;
}
.wheel-letter.is-visible { animation:letterReveal 220ms ease; }
@keyframes letterReveal { from { opacity:0; transform:translateY(5px); } to { opacity:1; transform:none; } }
.wheel-alphabet { display:grid; grid-template-columns:repeat(7, 1fr); gap:5px; }
.wheel-alphabet button {
  aspect-ratio:1; padding:0; border:1px solid var(--line); border-radius:9px; color:var(--ink);
  background:rgba(255,255,255,.32); font:inherit; font-size:11px; font-weight:600; cursor:pointer;
}
.wheel-alphabet button:hover:not(:disabled) { border-color:var(--gold); transform:translateY(-1px); }
.wheel-alphabet button.is-hit { color:#315b39; border-color:#668a6c; background:#e1eee2; }
.wheel-alphabet button.is-starter { color:#745a32; border-color:rgba(166,124,72,.4); background:rgba(166,124,72,.14); opacity:1; }
.wheel-alphabet button.is-vowel-locked { opacity:.2; }
.wheel-alphabet button.is-miss { opacity:.35; text-decoration:line-through; }
.wheel-alphabet button:disabled { cursor:default; }
.wheel-guess { margin-top:22px; }
.wheel-guess label { display:block; margin:0 0 7px 2px; color:var(--muted); font-size:9px; font-weight:600; letter-spacing:.08em; text-transform:uppercase; }
.wheel-guess > div { display:grid; grid-template-columns:1fr auto; gap:7px; }
.wheel-guess input { min-width:0; height:46px; padding:0 14px; border:1px solid var(--line); border-radius:12px; color:var(--ink); background:rgba(255,255,255,.35); font:inherit; font-size:13px; }
.wheel-guess button { padding:0 18px; border:0; border-radius:12px; color:#fff; background:var(--ink); font:inherit; font-size:11px; font-weight:600; cursor:pointer; }
.wheel-guess button:disabled, .wheel-guess input:disabled { opacity:.55; }
.wheel-feedback { min-height:20px; margin:14px 0 0; color:var(--muted); font-size:11px; font-weight:600; text-align:center; }
.wheel-feedback.is-success { color:#47734f; }
.wheel-feedback.is-failure { color:#a65148; }
.wheel-new-round { margin-top:10px; }
[data-theme="dark"] .wheel-alphabet button { background:rgba(255,255,255,.035); }
[data-theme="gray"] .wheel-alphabet button, [data-theme="gray"] .wheel-guess input, [data-theme="gray"] .wheel-level-control select { background:#252525; }
[data-theme="dark"] .wheel-guess input, [data-theme="dark"] .wheel-level-control select { background:#202923; }
[data-theme="dark"] .wheel-guess button, [data-theme="gray"] .wheel-guess button { color:#17221f; background:#dfe8df; }

.idiom-progress { display:flex; align-items:center; justify-content:space-between; margin-bottom:24px; color:var(--muted); font-size:9px; font-weight:700; letter-spacing:.1em; text-transform:uppercase; }
.idiom-progress strong { color:var(--gold); font-size:10px; }
.idiom-prompt { margin:13px 0 27px; font-family:"Newsreader",serif; font-size:clamp(29px, 8vw, 43px); font-weight:500; line-height:1.18; }
.idiom-form label { display:block; margin:0 0 7px 2px; color:var(--muted); font-size:9px; font-weight:600; letter-spacing:.08em; text-transform:uppercase; }
.idiom-form > div { display:grid; grid-template-columns:1fr auto; gap:7px; }
.idiom-form input { min-width:0; height:48px; padding:0 14px; border:1px solid var(--line); border-radius:12px; color:var(--ink); background:rgba(255,255,255,.35); font:inherit; font-size:13px; }
.idiom-form button { padding:0 19px; border:0; border-radius:12px; color:#fff; background:var(--ink); font:inherit; font-size:11px; font-weight:600; cursor:pointer; }
.idiom-form button:disabled, .idiom-form input:disabled { opacity:.55; }
.idiom-result { margin-top:18px; padding:21px; border:1px solid rgba(166,124,72,.24); border-radius:17px; background:rgba(166,124,72,.07); }
.idiom-verdict { margin:0 0 20px; font-size:12px; font-weight:700; }
.idiom-verdict.is-correct { color:#47734f; }
.idiom-verdict.is-wrong { color:#a65148; }
.idiom-result h2 { margin:8px 0 9px; font-family:"Newsreader",serif; font-size:25px; font-weight:500; }
.idiom-meaning { margin:0; color:var(--muted); font-size:12px; line-height:1.6; }
.idiom-result blockquote { margin:18px 0 0; padding-top:17px; border-top:1px solid var(--line); font-size:17px; }
.idiom-next { margin-top:12px; }
[data-theme="dark"] .idiom-form input { background:#202923; }
[data-theme="gray"] .idiom-form input { background:#252525; }
[data-theme="dark"] .idiom-form button, [data-theme="gray"] .idiom-form button { color:#17221f; background:#dfe8df; }

.card-intro { justify-content: space-between; gap: 14px; }

.eyebrow,
.section-kicker {
  margin: 0;
  color: var(--sage-dark);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow { display: flex; align-items: center; gap: 8px; }
.eyebrow span { width: 18px; height: 1px; background: var(--gold); }

.next-word {
  padding: 5px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
  transition: color 180ms ease, transform 180ms ease;
}

.next-word span { display: inline-block; margin-left: 4px; transition: transform 180ms ease; }
.next-word:hover { color: var(--ink); }
.next-word:hover span { transform: translateX(3px); }

.hero-section { padding: 34px 0 27px; }
.word-meta { gap: 9px; }

.category {
  padding: 6px 9px;
  border-radius: 6px;
  color: var(--sage-dark);
  background: var(--sage-pale);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.topic { color:var(--muted); font-size:9px; letter-spacing:.06em; }

.word-number { color: #929a96; font-size: 10px; letter-spacing: 0.08em; }

h1 {
  margin: 19px 0 2px;
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(48px, 15vw, 74px);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.045em;
  max-width: 100%;
  white-space: nowrap;
  overflow-wrap: normal;
}

.pronunciation {
  margin:8px 0 0; color:var(--muted); font-size:11px; font-weight:500; letter-spacing:.02em;
}
.pronunciation::before { content:"czytaj: "; color:var(--gold); font-style:italic; }

.word-type { margin: 7px 0 21px; color: var(--gold); font-size: 12px; font-style: italic; }

.definition {
  max-width: 590px;
  margin: 0;
  font-family: "Newsreader", Georgia, serif;
  font-size: 21px;
  line-height: 1.42;
}

.divider { height: 1px; background: var(--line); }

.content-section { padding: 27px 0; }
.simple-section { display: grid; gap: 12px; }

.simple-explanation {
  margin: 0;
  color: #46524e;
  font-size: 15px;
  line-height: 1.68;
}

.word-synonyms-section { display:grid; grid-template-columns:145px 1fr; gap:26px; border-top:1px solid var(--line); }
.word-synonyms-section[hidden] { display:none; }
.word-synonym-list { display:flex; flex-wrap:wrap; gap:8px; }
.word-synonym-list span { padding:8px 12px; border:1px solid color-mix(in srgb, var(--gold) 28%, var(--line)); border-radius:999px; color:var(--ink); background:color-mix(in srgb, var(--card) 88%, var(--gold) 5%); font-size:11px; }

@media (max-width: 649px) {
  .word-synonyms-section { grid-template-columns:1fr; gap:13px; }
}

.examples-section { border-top: 1px solid var(--line); }
.examples-grid { display: grid; gap: 23px; margin-top: 20px; }
.example { position: relative; padding-left: 38px; }

.example-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.example-icon {
  position: absolute;
  left: 0;
  top: -2px;
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border: 1px solid rgba(104, 125, 108, 0.28);
  border-radius: 50%;
  color: var(--sage);
  font-size: 8px;
}

.example p { margin: 0; font-size: 14px; line-height: 1.63; }

.task-section {
  margin: 3px 0 18px;
  padding: 20px;
  border-radius: 17px;
  background: #eef0e9;
}

.task-heading { align-items: flex-start; gap: 14px; }
.task-symbol { color: var(--gold); font-size: 17px; line-height: 1; }
.task-section p:last-child { margin: 9px 0 0; font-size: 13px; line-height: 1.62; }

.word-actions { display:grid; grid-template-columns:1fr 1fr; gap:9px; }
.know-button, .learn-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(23, 34, 31, 0.14);
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.know-button:hover { transform: translateY(-1px); background: #24332e; box-shadow: 0 13px 28px rgba(23, 34, 31, 0.18); }
.learn-button { border:1px solid var(--line); color:var(--sage-dark); background:var(--sage-pale); box-shadow:none; }
.learn-button:hover:not(:disabled) { transform:translateY(-1px); border-color:rgba(166,124,72,.35); }
.know-button:disabled, .learn-button:disabled { cursor:default; opacity:.64; transform:none; }
.know-button:active { transform: translateY(0); }
.know-button.is-known { color: var(--sage-dark); background: var(--sage-pale); box-shadow: none; }
.learn-button.is-learning { color:var(--gold); }
.button-check { font-size: 15px; }
.word-check { margin-top:12px; padding:20px; border:1px solid var(--line); border-radius:16px; background:rgba(255,255,255,.25); }
.word-check h2 { margin:8px 0 15px; font-family:"Newsreader",serif; font-size:20px; font-weight:500; }
.word-check-options { display:grid; gap:7px; }
.word-check-options button { padding:11px 13px; border:1px solid var(--line); border-radius:11px; color:var(--ink); background:transparent; font:inherit; font-size:11px; line-height:1.45; text-align:left; cursor:pointer; }
.word-check-options button.is-correct { border-color:#668a6c; color:#315b39; background:#e1eee2; }
.word-check-options button.is-wrong { border-color:#b9786f; color:#7a3630; background:#f2dfdc; }
.word-check > p:last-child { margin:12px 0 0; font-size:11px; line-height:1.5; }
.word-check > p.is-correct { color:#47734f; }
.word-check > p.is-wrong { color:#a65148; }
.daily-done { width:100%; min-height:45px; margin-top:12px; border:1px solid var(--line); border-radius:12px; color:var(--sage-dark); background:var(--sage-pale); font:inherit; font-size:11px; font-weight:700; cursor:pointer; }
.daily-done:disabled { opacity:.58; cursor:default; }
[data-theme="dark"] .word-check, [data-theme="gray"] .word-check { background:rgba(255,255,255,.025); }
[data-theme="dark"] .xp-toast, [data-theme="gray"] .xp-toast { color:#17221f; background:#dfe8df; }

footer {
  justify-content: center;
  gap: 9px;
  padding: 24px 0 0;
  color: #8a928e;
  font-family: "Newsreader", serif;
  font-size: 12px;
  font-style: italic;
}

.footer-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--gold); }

.word-card.is-changing { animation: cardChange 280ms ease; }
@keyframes cardChange {
  0% { opacity: 0.45; transform: translateY(4px); }
  100% { opacity: 1; transform: translateY(0); }
}

button:focus-visible,
a:focus-visible { outline: 3px solid rgba(166, 124, 72, 0.35); outline-offset: 3px; }

@media (min-width: 650px) {
  .app-shell { padding-top: 38px; }
  .word-card { padding: 35px 42px 34px; border-radius: 34px; }
  .library-bar { padding:18px 22px; }
  .hero-section { padding: 47px 0 36px; }
  .simple-section { grid-template-columns: 145px 1fr; gap: 26px; }
  .examples-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .definition { font-size: 24px; }
  .task-section { padding: 24px; }
  .quiz-card { padding:28px 32px; }
  .quiz-intro { grid-template-columns:auto 1fr auto; }
  .quiz-start { grid-column:auto; width:auto; min-width:140px; margin:0; padding:0 18px; }
  .quiz-options { grid-template-columns:1fr 1fr; }
  .quiz-next { width:auto; min-width:170px; padding:0 20px; margin-left:auto; }
  .home-view { padding-top: 55px; }
  .practice-card { padding: 34px 38px; }
}

@media (min-width: 800px) {
  .home-view {
    width: min(calc(100vw - 48px), 1080px);
    min-height: calc(100vh - 76px);
    margin-left: 50%;
    padding: 0;
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    align-content: center;
    gap: 18px;
  }
  .home-modules-brand { width:100%; }
  .top-feature-grid { grid-template-columns:minmax(310px,.85fr) minmax(430px,1.15fr); gap:18px; align-items:stretch; }
  .home-modules { height:100%; }
  .confusion-teaser, .wide-games-stack, .game-feature-grid { width:100%; }
  .home-quiz { width:100%; }
  .home-quiz, .home-game-teaser {
    height:132px !important; min-height:132px !important; margin-top:0;
    padding:28px 32px; border-radius:24px;
  }
  .home-quiz:has(.quiz-game:not([hidden])),
  .home-quiz:has(.quiz-result:not([hidden])) { height:auto !important; }
  .home-game-teaser { grid-template-columns:auto 1fr auto; }
  .wide-games-stack { gap:12px; }
  .game-feature-grid { grid-template-columns:minmax(430px,1.15fr) minmax(310px,.85fr); gap:18px; margin-top:0; align-items:stretch; }
  .game-feature-list { grid-column:1; grid-row:1; grid-template-rows:repeat(3, 132px); }
  .game-feature-list .home-game-teaser { grid-column:auto; width:100%; }
  .language-fact-card { min-height:0; height:100%; }
  .game-start { grid-column: auto; min-width: 140px; margin: 0; padding: 0 18px; }
  .home-bottom-controls { width:100%; margin-top:-2px; }
  .home-hero {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-height:420px;
    height:420px;
    padding: 48px 42px;
    overflow:hidden;
    border: 1px solid rgba(255,255,255,.86);
    border-radius: 28px;
    background: var(--card);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
    text-align: left;
  }
  .home-hero h1 { max-width:100%; font-size:clamp(34px,3.3vw,48px); overflow-wrap:break-word; }
  .home-modules { grid-template-rows:1fr; gap:12px; }
  .home-modules .module-grid { height:auto; grid-template-rows:repeat(3, 132px); }
  .pair-grid { grid-template-columns: 1fr 1fr; }
  .synonym-grid { grid-template-columns: repeat(4, 1fr); }
  [data-theme="dark"] .home-hero,
  [data-theme="gray"] .home-hero { border-color: var(--line); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}

@media (max-width: 390px) {
  .theme-select { max-width:98px; }
  .category-select { max-width:125px; }
  .top-actions { width:100%; }
}

@media (max-width: 649px) {
  .home-view { display:grid; gap:12px; }
  .wide-games-stack > .home-quiz, .wide-games-stack > .home-game-teaser { margin:0; }
  .game-feature-grid { margin-top:0; }
  .home-bottom-controls { margin-top:0; }
  .confusion-teaser { grid-template-columns:1fr; grid-template-areas:"label" "title" "copy" "action"; padding:22px; }
  .pair-teaser-link { position:static; grid-area:action; margin-top:5px; transform:none; }
  .partner-card { grid-template-columns:36px 1fr; padding:20px; }
  .partner-card-mark { position:static; grid-column:1; grid-row:1 / 3; width:36px; height:36px; transform:none; }
  .partner-card-copy { grid-column:2; justify-items:start; text-align:left; }
  .partner-card-action { position:static; grid-column:2; justify-self:start; white-space:normal; transform:none; }
}
