@layer reset, base, layout, components, pages, responsive;

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  body, h1, h2, h3, p, ul, blockquote { margin: 0; }
  button, input, select { font: inherit; }
  button, a { -webkit-tap-highlight-color: transparent; }
  button { cursor: pointer; }
  a { color: inherit; text-decoration: none; }
  button { color: inherit; }
  img, svg { display: block; }
  button:disabled { cursor: not-allowed; }
}

@layer base {
  :root {
    color-scheme: light;
    --ink: #0c1b33;
    --green: #0c1b33;
    --green-dark: #071324;
    --muted: #6d7d86;
    --background: #eef6fb;
    --line: #d8e7f0;
    --sky: #0ea5e9;
    --sky-deep: #0b83ba;
    --sunny: #facc15;
    --sunny-deep: #c79a08;
    --mist: #e8f6fd;
    --sage: #e8efd9;
    --lavender: #efebf8;
    --peach: #f8ebe2;
    --blue: #e7f0f1;
    --yellow: #f8f1dc;
    --pink: #f5e9ed;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-pill: 999px;
    --space-xs: 6px;
    --space-sm: 10px;
    --space-md: 16px;
    --space-lg: 24px;
    --ease-bounce: cubic-bezier(.34, 1.56, .64, 1);
    --topbar-height: 79px;
    --font-display: Fredoka, "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
    font-family: Nunito, "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    color: var(--ink);
    background: var(--background);
    font-synthesis: none;
    -webkit-font-smoothing: antialiased;
  }
  body { min-width: 320px; line-height: 1.5; }
  button { border: 0; }
  :focus-visible { outline: 3px solid #4a7893; outline-offset: 4px; }
  :disabled { opacity: .48; }
  h1, h2, h3, .brand > span, .hero-card h2, .result-screen h2, .stat-card > strong, .goal-ring strong { font-family: var(--font-display); }
  h1, h2, h3 { font-weight: 650; line-height: 1.25; }
  h1 { font-size: clamp(26px, 2.2vw, 35px); letter-spacing: -1.2px; }
  h2 { font-size: 21px; letter-spacing: -.55px; }
  h3 { font-size: 16px; }
  input, select { min-width: 0; }
  input::placeholder { color: #7e8d96; }
  ::selection { background: #d8e8b7; color: #1b2b40; }
  .icon { flex-shrink: 0; }
  .sage { background: var(--sage); color: #567246; }
  .lavender { background: var(--lavender); color: #86759c; }
  .peach { background: var(--peach); color: #b07d58; }
  .yellow { background: var(--yellow); color: #a48c46; }
  .blue { background: var(--blue); color: #668a91; }
  .pink { background: var(--pink); color: #a87589; }
  .skip-link { position: fixed; top: -70px; left: 16px; z-index: 50; padding: 12px 20px; background: var(--green); color: white; border-radius: 10px; }
  .skip-link:focus { top: 12px; }
}

@layer layout {
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 232px; display: flex; flex-direction: column; padding: 35px 21px 0; background: #ffffff; border-right: 1px solid var(--line); z-index: 10; }
  .brand { display: flex; align-items: center; gap: 9px; width: fit-content; margin: 0 0 34px 10px; color: var(--green); }
  .brand > span { font-size: 37px; font-weight: 750; letter-spacing: -2px; line-height: 1; }
  .brand-dot { color: #d6a274; }
  .sidebar-course { display: flex; gap: 10px; align-items: center; padding: 14px 10px; margin-bottom: 30px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .sidebar-course strong { display: block; font-weight: 650; font-size: 13px; }
  .sidebar-course > div > span { display: block; font-size: 9.5px; color: var(--muted); margin-top: 2px; }
  .language-picker { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; margin: 0 5px 22px; padding: 4px; background: #e9f0f4; border-radius: 12px; }
  .language-option { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-width: 0; padding: 8px 2px; border-radius: 9px; font-size: 9px; font-weight: 600; color: #687f8d; transition: background .16s, color .16s, box-shadow .16s; }
  .language-option > span:not(.language-flag) { display: block; }
  .language-option:hover { color: var(--green); }
  .language-option.selected { background: #ffffff; color: var(--green-dark); box-shadow: 0 2px 6px #1d365714; }
  .nav-caption { padding-left: 13px; margin-bottom: 12px; font-size: 9px; font-weight: 650; letter-spacing: 1.65px; color: #87969f; }
  .navigation { display: grid; gap: 8px; }
  .nav-link { display: flex; align-items: center; gap: 13px; padding: 14px 14px; border-radius: 10px; font-size: 13px; font-weight: 550; color: #6a7a83; transition: background .18s, color .18s; }
  .nav-link:hover { background: #eaf0f4; color: var(--green); }
  .nav-link.active { background: var(--green); color: #fff; box-shadow: 0 4px 8px #1d36570c; }
  .nav-link.active .icon { color: #abd5ee; }
  .nav-dot { width: 5px; height: 5px; border-radius: 50%; background: #abd5ee; margin-left: auto; }
  .sidebar-bottom { margin-top: auto; padding-top: 35px; }
  .little-reminder { background: #f3f4eb; padding: 6px 10px 21px; margin: 0 5px 24px; border-radius: 14px; text-align: center; }
  .little-reminder strong { display: block; font-size: 15px; line-height: 1.45; letter-spacing: -.2px; }
  .little-reminder p { font-size: 11px; color: #708490; line-height: 1.8; margin-top: 8px; }
  .plant-illustration { position: relative; height: 85px; width: 92px; margin: auto; }
  .plant-stem { position: absolute; width: 3px; height: 45px; background: #56788c; left: 45px; top: 19px; transform: rotate(5deg); }
  .plant-leaf { position: absolute; background: #6e98b0; width: 28px; height: 15px; border-radius: 0 90% 0 90%; left: 20px; top: 20px; transform: rotate(20deg); }
  .plant-leaf.two { left: 46px; top: 28px; transform: rotate(-65deg); background: #4e7287; }
  .plant-leaf.three { left: 24px; top: 40px; width: 22px; height: 12px; background: #94b7cc; }
  .plant-pot { position: absolute; left: 31px; top: 59px; width: 33px; height: 20px; background: #daa782; clip-path: polygon(0 0, 100% 0, 83% 100%, 17% 100%); }
  .plant-spark { position: absolute; right: 0; top: 17px; font-size: 20px; color: #9bb3c1; font-weight: 300; }
  .profile-button { width: 100%; display: flex; align-items: center; text-align: left; gap: 10px; padding: 21px 0; border-top: 1px solid var(--line); background: transparent; }
  .avatar { width: 33px; height: 33px; display: grid; place-items: center; background: #e9eadc; border: 3px solid white; outline: 1px solid #e8eade; border-radius: 50%; font-size: 13px; font-weight: 650; color: #57788b; flex-shrink: 0; }
  .profile-button strong { font-size: 11px; font-weight: 650; display: block; max-width: 124px; overflow: hidden; text-overflow: ellipsis; }
  .profile-button small { display: block; color: #84959f; font-size: 9px; margin-top: 2px; }
  .profile-button > .icon { margin-left: auto; color: #8195a1; }
  .workspace { margin-left: 232px; }
  .topbar { height: 79px; display: flex; align-items: center; justify-content: space-between; padding: 0 40px; border-bottom: 1px solid var(--line); background: #f9fbfc; }
  .topbar-location { display: flex; align-items: center; gap: 9px; font-size: 12px; color: #677b87; }
  .topbar-location .icon { color: #668a9f; }
  .topbar-tools { display: flex; align-items: center; gap: 23px; }
  .language-badge { display: flex; align-items: center; gap: 8px; font-size: 11px; padding-right: 22px; border-right: 1px solid var(--line); }
  .language-badge b { background: #e7eff3; border: 1px solid #dce6ec; font-weight: 600; font-size: 9px; padding: 1px 5px; border-radius: 4px; margin-left: 3px; }
  .language-flag { display: inline-flex; width: 23px; height: 16px; border-radius: 3px; overflow: hidden; flex-shrink: 0; border: 1px solid #00000007; box-shadow: 0 1px 2px #00000005; }
  .language-flag i { width: 33.333%; background: #fcfcf8; }
  .italian-flag i:first-child { background: #6693ad; }
  .italian-flag i:last-child { background: #d99588; }
  .french-flag i:first-child { background: #5b7fa6; }
  .french-flag i:last-child { background: #b6685e; }
  .spanish-flag { flex-direction: column; }
  .spanish-flag i { width: 100%; height: 25%; background: #bf4542; }
  .spanish-flag i:nth-child(2) { height: 50%; background: #f4c548; }
  .polish-flag { background: linear-gradient(to bottom, #fff 50%, #dc143c 50%); }
  .polish-flag i { display: none; }
  .serbian-flag { background: linear-gradient(to bottom, #c6363c 33.4%, #0c4076 33.4% 66.7%, #fff 66.7%); }
  .serbian-flag i { display: none; }
  .english-flag { background: linear-gradient(to bottom, transparent 38%, #c8102e 38% 62%, transparent 62%), linear-gradient(to right, transparent 42%, #c8102e 42% 58%, transparent 58%), linear-gradient(to bottom, transparent 28%, #fff 28% 72%, transparent 72%), linear-gradient(to right, transparent 34%, #fff 34% 66%, transparent 66%), #14377d; }
  .english-flag i { display: none; }
  .top-stat { display: flex; align-items: center; gap: 6px; font-size: 11px; }
  .top-stat strong { font-weight: 650; color: #404d5f; font-size: 13px; }
  .top-stat > span { color: #71848f; font-size: 10px; }
  .streak-stat > .icon { color: #d7a270; fill: #f3dabb; }
  .xp-stat > .icon { color: #b09d55; fill: #eee4ac; }
  .settings-shortcut { width: 30px; height: 30px; color: #798f9b; }
  .mobile-brand, .mobile-nav { display: none; }
  main { max-width: 1480px; padding: 34px 40px 0; margin: auto; }
  main:focus { outline: none; }
  .page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
  .page-heading h1 { overflow-wrap: anywhere; }
  .eyebrow { color: #79909d; font-size: 9px; font-weight: 650; letter-spacing: 1.65px; margin-bottom: 10px; }
  .page-subtitle { margin-top: 9px; font-size: 12px; color: #788c97; }
  .date-label { color: #7e929e; font-size: 11px; align-self: flex-end; padding-bottom: 3px; white-space: nowrap; }
  .dashboard-layout { display: grid; grid-template-columns: minmax(0, 1fr) 265px; gap: 26px; align-items: start; }
  .learning-column { min-width: 0; }
  .right-rail { display: grid; gap: 20px; }
  .page-footer { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 28px 0 22px; margin-top: 16px; border-top: 1px solid var(--line); color: #7e94a0; font-size: 10px; }
  .page-footer > span:last-child { display: inline-flex; align-items: center; gap: 6px; font-family: Georgia, serif; font-style: italic; }
}

@layer components {
  .level-picker { display: flex; align-items: center; gap: 24px; padding: 17px 20px; margin-bottom: 27px; background: #ffffff; border: 1px solid #cedee8; border-radius: 12px; }
  .level-track { display: flex; align-items: center; flex-shrink: 0; }
  .level-track span { position: relative; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #e5edf2; color: #8ea4b1; font-size: 9px; font-weight: 700; }
  .level-track span:not(:last-child)::after { content: ''; position: absolute; left: 100%; top: 50%; width: 14px; height: 2px; background: #d5e2e9; transform: translateY(-50%); }
  .level-track span.done { background: #c0dbea; color: #467590; }
  .level-track span.done::after { background: #94bbd2; }
  .level-track span.current { background: var(--green); color: #fff; box-shadow: 0 3px 0 #132740; }
  .level-picker label { display: grid; gap: 7px; flex: 0 1 300px; min-width: 0; font-size: 11px; font-weight: 600; color: #395374; }
  .level-picker select { width: 100%; padding: 10px 12px; border: 1px solid #9dbdd0; border-radius: 7px; background: #e8f1f6; color: #2a3e59; font-size: 13px; cursor: pointer; }
  .level-picker > div { flex: 1; min-width: 0; }
  .level-picker p { color: #3c5473; font-size: 12px; line-height: 1.7; }
  .level-picker small { display: block; color: #5c7482; font-size: 10px; margin-top: 5px; }
  .button { display: inline-flex; justify-content: center; align-items: center; gap: 10px; min-height: 43px; padding: 11px 19px; border: 1px solid transparent; border-radius: 8px; font-size: 12px; font-weight: 600; transition: background .16s, transform .16s, box-shadow .16s; }
  .button:not(:disabled):active, .practice-card:active { transform: translateY(1px); }
  .button-dark { color: var(--ink); background: var(--sunny); box-shadow: 0 3px 0 var(--sunny-deep); }
  .button-dark:hover:not(:disabled) { background: #fdd943; box-shadow: 0 3px 0 var(--sunny-deep), 0 5px 14px #0c1b3326; }
  .button-outline { border-color: #d3dee5; background: #ffffff; color: #41536b; }
  .button-outline:hover:not(:disabled) { background: #e8f0f5; border-color: #b5cbd8; }
  .button-danger { background: #a34b3e; color: white; }
  .button-recording { background: #a35246; color: white; box-shadow: 0 3px 0 #7f3e36; }
  .full-width { width: 100%; }
  .icon-button { display: inline-flex; justify-content: center; align-items: center; flex-shrink: 0; padding: 8px; border-radius: 50%; background: transparent; }
  .icon-button:hover:not(:disabled) { background: #dee9f0; }
  .icon-button.small { padding: 5px; color: #899ca7; }
  .text-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 0; background: transparent; color: #46718a; font-size: 12px; font-weight: 600; }
  .text-button:hover:not(:disabled) { color: #1d3657; text-decoration: underline; text-underline-offset: 3px; }
  .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 15px; }
  .section-heading h2 { font-size: 20px; }
  .section-heading .eyebrow { margin-bottom: 5px; font-size: 8.5px; }
  .section-heading > span { color: #778c98; font-size: 10px; white-space: nowrap; }
  .section-heading.compact h2 { font-size: 17px; }
  .category-tag { display: inline-flex; align-items: center; padding: 4px 9px; font-size: 10px; font-weight: 600; border-radius: 5px; }
  .pronunciation-hint { font-size: 11px; letter-spacing: .25px; color: #938b9d; }
  .audio-button { background: #ecf2f5; color: #58798c; }
  .notifications { position: fixed; bottom: 25px; right: 25px; z-index: 100; display: grid; gap: 8px; max-width: min(410px, calc(100% - 32px)); pointer-events: none; }
  .toast { padding: 16px 20px; background: #1d3657; color: #fff; border-radius: 12px; box-shadow: 0 8px 35px #0b1b3026; font-size: 13px; line-height: 1.6; animation: enter .2s ease-out; }
  .dialog-notifications { padding: 12px 20px 20px; display: grid; gap: 8px; }
  .storage-notice { display: flex; align-items: flex-start; gap: 10px; padding: 15px; margin-bottom: 22px; border: 1px solid #ddc6a7; border-radius: 9px; background: #faf0df; color: #786140; font-size: 12px; line-height: 1.7; text-align: left; }
  .result-screen .storage-notice { margin-top: 20px; margin-bottom: 0; }
  .empty-state { grid-column: 1 / -1; display: grid; justify-items: center; text-align: center; padding: 70px 25px; background: #ffffff; border: 1px dashed #d1dee5; border-radius: 16px; }
  .empty-state > .icon { color: #8ba0ad; margin-bottom: 18px; }
  .empty-state p { color: var(--muted); max-width: 370px; margin: 12px 0 23px; }
  @keyframes enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
}

@layer pages {
  .hero-card { position: relative; isolation: isolate; overflow: hidden; background: #d5e8f3; border: 1px solid #cce0ec; border-radius: 16px; min-height: 289px; padding: 29px 30px 25px; }
  .hero-copy { position: relative; z-index: 1; max-width: 57%; }
  .hero-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 8px; letter-spacing: 1.1px; font-weight: 600; color: #527589; margin-bottom: 15px; }
  .hero-tag > span { width: 5px; height: 5px; border-radius: 50%; background: #3e7696; }
  .hero-card h2 { font-size: clamp(32px, 3vw, 43px); letter-spacing: -1.8px; line-height: 1.1; color: #2f4158; }
  .hero-card h2 > span { color: #50778e; }
  .hero-card p { margin: 15px 0 20px; font-size: 11px; line-height: 1.8; color: #4b6879; }
  .hero-card .button { font-size: 11px; min-height: 40px; padding: 10px 15px; }
  .hero-meta { display: flex; align-items: center; gap: 5px; font-size: 9px; color: #6f8fa1; margin-top: 13px; }
  .hero-illustration { position: absolute; right: -13px; bottom: 0; width: 56%; height: auto; z-index: 0; pointer-events: none; }
  .learning-path { margin-top: 27px; }
  .chapter-count { font-size: 12px !important; color: #547080 !important; }
  .chapter-count > span { color: #7a919e; font-size: 10px; margin-left: 3px; }
  .chapter-progress { display: flex; gap: 5px; height: 6px; margin: 0 0 24px; }
  .chapter-progress > span { flex: 1; background: #dae5eb; border-radius: var(--radius-pill); }
  .chapter-progress > span.filled { background: linear-gradient(90deg, var(--sky), var(--sunny)); }
  .lesson-path { display: grid; gap: 6px; padding: 8px 0 4px; }
  .path-row { position: relative; display: flex; align-items: center; gap: 18px; padding: 10px 0; }
  .path-row.align-end { flex-direction: row-reverse; text-align: right; }
  .path-row:not(:last-child)::before {
    content: ''; position: absolute; top: 100%; left: 34px; width: 2px; height: 18px;
    background: repeating-linear-gradient(to bottom, #afcada 0 4px, transparent 4px 9px);
  }
  .path-row.align-end:not(:last-child)::before { left: auto; right: 34px; }
  .path-node { position: relative; flex-shrink: 0; display: grid; place-items: center; width: 68px; height: 68px; border-radius: 50%; border: 3px solid #ffffff; box-shadow: 0 4px 0 #c5d6e066, 0 6px 14px #2237520f; transition: transform .16s var(--ease-bounce), box-shadow .16s; }
  .path-node:hover { transform: translateY(-2px) scale(1.03); }
  .path-node:active { transform: translateY(1px) scale(.98); }
  .path-node-icon { display: block; }
  .path-node-index { position: absolute; bottom: -7px; font-size: 8px; font-weight: 700; letter-spacing: .4px; color: #638193; background: #ffffff; border: 1px solid #dde6eb; border-radius: var(--radius-pill); padding: 1px 6px; }
  .path-node.next { width: 78px; height: 78px; box-shadow: 0 5px 0 var(--sunny-deep), 0 10px 22px #0c1b3326; animation: path-pulse 2.2s infinite; }
  .path-node.next .path-node-icon .icon { width: 27px; height: 27px; }
  .path-node.completed { box-shadow: 0 4px 0 #73a4c199, 0 6px 14px #22375214; }
  .path-node.completed .path-node-icon { color: #395579; }
  .path-callout { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 8px; font-weight: 700; letter-spacing: .5px; color: #fff; background: var(--green); padding: 3px 9px; border-radius: var(--radius-pill); box-shadow: 0 3px 8px #1d365726; }
  .path-callout::after { content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border: 4px solid transparent; border-top-color: var(--green); }
  .path-label { min-width: 0; display: flex; flex-direction: column; }
  .path-label > strong { display: block; font-weight: 650; font-size: 13px; letter-spacing: -.15px; line-height: 1.35; }
  .lesson-description { font-size: 10px; color: #8095a1; margin-top: 3px; line-height: 1.5; }
  .path-label small { font-size: 8px; color: #899ba6; margin-top: 6px; }
  .path-label small > span { margin: 0 3px; }
  @keyframes path-pulse { 0%, 100% { box-shadow: 0 5px 0 var(--sunny-deep), 0 0 0 0 #facc1588; } 50% { box-shadow: 0 5px 0 var(--sunny-deep), 0 0 0 16px #facc1500; } }
  .extra-practice { margin-top: 29px; }
  .practice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .practice-card { padding: 17px 16px 14px; border: 1px solid #00000003; border-radius: 11px; text-align: left; transition: filter .16s, transform .16s; }
  .practice-card:hover { filter: saturate(1.25) brightness(.985); transform: translateY(-2px); }
  .practice-symbol { display: block; margin-bottom: 13px; }
  .practice-card > strong { display: block; font-size: 12px; font-weight: 600; color: #3d4f67; letter-spacing: -.1px; }
  .practice-card > span:last-child { display: flex; align-items: center; justify-content: space-between; gap: 4px; font-size: 8.5px; margin-top: 6px; color: #798c97; }
  .daily-card { padding: 20px 22px 23px; border: 1px solid #dce5ea; border-radius: 14px; background: #ffffff; }
  .card-heading { display: flex; align-items: center; justify-content: space-between; }
  .card-heading h2 { font-size: 15px; letter-spacing: -.25px; }
  .daily-card > p:not(.goal-caption) { font-size: 10px; color: #8398a4; margin-top: 2px; }
  .goal-ring { width: 147px; height: 147px; margin: 15px auto 11px; position: relative; }
  .goal-ring > svg { width: 100%; height: 100%; transform: rotate(-90deg); }
  .goal-ring circle { fill: none; stroke-width: 6; }
  .ring-track { stroke: #e6eef3; }
  .ring-progress { stroke: var(--sky); stroke-linecap: round; transition: stroke-dasharray .5s; }
  .goal-ring > div { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
  .goal-ring .icon { color: #7da5bc; fill: #cce3f0; margin-bottom: 6px; }
  .goal-ring strong { font-size: 26px; font-weight: 650; line-height: 1.25; }
  .goal-ring strong > span { font-size: 14px; color: #8fa6b3; font-weight: 400; }
  .goal-ring small { font-size: 8px; letter-spacing: 1.7px; color: #899fac; margin-top: 4px; }
  .goal-caption { text-align: center; font-size: 9px; color: #638193; }
  .week-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin-top: 21px; padding-top: 17px; border-top: 1px solid #e6edf1; }
  .week-days > div { display: flex; flex-direction: column; align-items: center; font-size: 8px; color: #9baab2; gap: 9px; }
  .week-days b { display: grid; place-items: center; width: 22px; height: 22px; border: 1px solid #dde8ef; background: #f7f8f0; border-radius: 50%; }
  .week-days i { width: 3px; height: 3px; border-radius: 50%; background: #c2d3dd; }
  .week-days .today { color: #427695; font-weight: 600; }
  .week-days .today b { border-color: #96bcd2; background: #e5f1f8; }
  .week-days .active b { color: #fff; background: #5091b6; border-color: #5091b6; }
  .word-of-day { position: relative; overflow: hidden; isolation: isolate; padding: 23px; background: #eeebf5; border-radius: 14px; border: 1px solid #e9e5f0; }
  .word-card-label { display: flex; align-items: center; gap: 7px; font-size: 7px; font-weight: 600; letter-spacing: 1.1px; color: #9a8fac; }
  .word-card-label .icon { color: #aa9bbe; }
  .word-of-day h2 { font-size: 13px; color: #70617e; margin: 13px 0 17px; letter-spacing: -.1px; }
  .daily-word { font-family: Georgia, "Times New Roman", serif; font-style: italic; font-size: 26px; letter-spacing: -.7px; color: #77608c; position: relative; z-index: 1; overflow-wrap: anywhere; }
  .word-of-day .pronunciation-hint { margin-top: 6px; font-size: 9px; }
  .word-translation { color: #958c9d; margin-top: 12px; font-size: 11px; }
  .audio-pill { display: inline-flex; align-items: center; gap: 7px; border: 1px solid #dbd2e4; background: #f6f3fa; border-radius: 6px; padding: 7px 11px; color: #8e7ba0; font-size: 10px; margin-top: 20px; }
  .audio-pill:hover { background: #fff; }
  .word-decoration { position: absolute; right: -3px; bottom: -43px; font-family: Georgia, serif; font-style: italic; font-size: 140px; color: #e4deee; z-index: -1; }
  .culture-card { position: relative; padding: 21px; border: 1px solid #dde6eb; border-radius: 13px; background: #f6fafd; }
  .culture-icon { color: #aa9876; margin-bottom: 13px; display: block; }
  .culture-card h2 { font-size: 14px; margin-bottom: 8px; letter-spacing: -.25px; }
  .culture-card p { color: #7e94a0; font-size: 11px; line-height: 1.9; }
  .culture-footer { display: flex; align-items: center; gap: 7px; margin-top: 18px; color: #8da2ae; font-size: 8px; }
  .culture-footer .language-flag { width: 15px; height: 10px; border-radius: 2px; opacity: .75; }

  .vocabulary-summary { display: flex; gap: 28px; margin: 5px 0 30px; color: #768f9e; font-size: 12px; }
  .vocabulary-summary > span { display: inline-flex; align-items: center; gap: 7px; }
  .vocabulary-summary strong { color: #3f5571; font-weight: 650; }
  .vocabulary-toolbar { display: flex; gap: 14px; }
  .search-field { display: flex; align-items: center; gap: 12px; flex: 1; border: 1px solid #d5e0e7; background: #ffffff; border-radius: 9px; padding: 0 16px; color: #839aa8; }
  .search-field:focus-within { outline: 2px solid #6b9cb8; outline-offset: 1px; }
  .search-field input { border: 0; background: transparent; padding: 14px 0; width: 100%; color: var(--ink); outline: none; font-size: 12px; }
  .bookmark-filter.selected { background: #ddebf3; border-color: #7faac3; }
  .filter-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 22px 0; }
  .filter-tabs button { border-radius: 7px; padding: 9px 14px; background: transparent; color: #6f8998; font-size: 11px; }
  .filter-tabs button:hover { background: #e6eef2; }
  .filter-tabs button.selected { background: var(--green); color: #fff; }
  .results-count { font-size: 10px; color: #8297a4; margin-bottom: 16px; }
  .vocabulary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
  .vocabulary-card { background: #ffffff; border: 1px solid var(--line); border-radius: 13px; padding: 19px 21px 14px; }
  .vocab-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
  .bookmark-button { color: #a4b7c2; }
  .bookmark-button.bookmarked { color: #b49a4b; }
  .bookmark-button.bookmarked .icon { fill: #f1e6b7; }
  .vocabulary-card h2 { font-size: 24px; font-family: Georgia, serif; font-weight: 400; letter-spacing: -.6px; }
  .vocabulary-card .pronunciation-hint { margin-top: 6px; font-size: 10px; color: #899ca7; }
  .vocab-translation { margin-top: 13px; color: #5c7787; font-size: 12px; }
  .vocab-card-bottom { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid #e5edf1; padding-top: 12px; margin-top: 19px; gap: 7px; }
  .word-mastery { display: flex; align-items: center; gap: 4px; }
  .word-mastery i { width: 5px; height: 5px; background: #dbe5eb; border-radius: 50%; }
  .word-mastery i.filled { background: #5f95b4; }
  .word-mastery small { color: #869dab; font-size: 8px; margin-left: 5px; }

  .pronunciation-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
  .speaking-card { background: #ffffff; border: 1px solid #d6e2e9; border-radius: 17px; padding: 23px 33px 18px; text-align: center; }
  .speaking-card-heading { display: flex; align-items: center; justify-content: space-between; }
  .speaking-card-heading > span:last-child { color: #899eaa; font-size: 10px; }
  .speaking-visual { position: relative; width: 146px; height: 146px; margin: 28px auto 20px; }
  .speaking-visual > span { position: absolute; inset: 0; border: 1px solid #e0ebf2; border-radius: 50%; }
  .speaking-visual > span:nth-child(2) { inset: 16px; background: #edf5f9; border-color: #d8e7ef; }
  .speaking-visual > div { position: absolute; inset: 31px; display: grid; place-items: center; color: #608ea9; background: #d4e8f3; border-radius: 50%; }
  .speaking-visual.recording > div { background: #f6e2dd; color: #ae6b5d; }
  .speaking-visual.recording > span { animation: pulse 1.5s infinite; border-color: #eac5b9; }
  .speaking-card h2 { font-size: clamp(24px, 2.5vw, 34px); font-family: Georgia, serif; font-weight: 400; font-style: italic; line-height: 1.4; color: #3e516b; margin-top: 8px; }
  .phrase-translation { margin-top: 11px; color: #658191; font-size: 13px; }
  .phrase-hint { color: #849ead; font-size: 10px; letter-spacing: .5px; margin-top: 12px; }
  .listen-controls { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 24px; }
  .slow-button { display: flex; align-items: center; gap: 5px; color: #7191a3; background: none; font-size: 11px; padding: 10px 0; }
  .slow-button:hover { color: var(--green); }
  .speaking-divider { height: 1px; background: #e5edf1; margin: 29px 0 24px; }
  .microphone-button { min-width: 212px; }
  .microphone-note { color: #8a9fac; font-size: 9px; margin: 14px auto 6px; max-width: 330px; }
  .self-practice-toggle { font-weight: 400; font-size: 10px; margin: 4px 0; text-decoration: underline; text-underline-offset: 3px; }
  .browser-note { color: #65808f; font-size: 12px; line-height: 1.8; max-width: 430px; margin: auto; }
  .self-practice-box { background: #eef4f8; border: 1px solid #dde8ef; padding: 18px; margin-top: 20px; border-radius: 10px; }
  .self-practice-box p { color: #688393; font-size: 11px; line-height: 1.8; max-width: 390px; margin: auto auto 15px; }
  .self-practice-box small { display: block; color: #8099a7; font-size: 9px; margin-top: 12px; }
  .phrase-navigation { display: flex; justify-content: space-between; align-items: center; padding-top: 22px; margin-top: 21px; border-top: 1px solid #e5edf1; gap: 10px; }
  .phrase-navigation > span { display: flex; gap: 5px; }
  .phrase-navigation i { width: 5px; height: 5px; background: #d6e3ea; border-radius: 50%; }
  .phrase-navigation i.active { background: #669bba; }
  .phrase-navigation .text-button { font-size: 10px; }
  .pronunciation-tip { display: flex; gap: 13px; padding: 21px 23px; background: #f0f0e3; border-radius: 11px; margin-top: 18px; color: #6f8a9a; }
  .pronunciation-tip h3 { font-size: 12px; color: #577484; }
  .pronunciation-tip p { font-size: 11px; margin-top: 7px; line-height: 1.8; }
  .pronunciation-tip small { display: block; font-size: 9px; margin-top: 8px; color: #859caa; }
  .phrase-sidebar > h2 { font-size: 20px; margin-top: 5px; }
  .phrase-sidebar > p { font-size: 11px; color: #849ba8; margin-top: 9px; }
  .phrase-list { display: grid; gap: 8px; margin-top: 22px; }
  .phrase-list-item { display: flex; align-items: center; gap: 12px; padding: 15px 13px; background: #ffffff; border: 1px solid var(--line); border-radius: 10px; text-align: left; }
  .phrase-list-item.selected { border-color: #95b8cd; background: #e4f0f7; }
  .phrase-list-item:hover:not(:disabled) { border-color: #95b8cd; }
  .phrase-number { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; background: #e7eff4; color: #859ead; font-size: 9px; flex-shrink: 0; }
  .phrase-list-item strong { display: block; font-size: 11px; font-weight: 600; }
  .phrase-list-item small { display: block; font-size: 9px; color: #829dad; margin-top: 4px; }
  .phrase-list-item > .icon { margin-left: auto; color: #98adb9; }
  .privacy-note { display: flex; align-items: flex-start; gap: 10px; margin: 22px 7px; color: #859eac; }
  .privacy-note p { font-size: 10px; line-height: 1.8; }
  .speech-feedback { display: flex; align-items: flex-start; text-align: left; gap: 11px; padding: 17px; border-radius: 9px; margin-top: 22px; background: #f2f1e5; color: #85835d; }
  .speech-feedback.success { background: #e3eff6; color: #407390; }
  .speech-feedback.error { background: #f8eee8; color: #a27860; }
  .speech-feedback strong { display: block; font-size: 12px; }
  .speech-feedback p { font-size: 11px; line-height: 1.7; margin-top: 6px; }
  .speech-feedback small { display: block; font-size: 9px; margin-top: 7px; opacity: .85; }
  .speech-feedback .transcript { color: var(--ink); }
  @keyframes pulse { 0%, 100% { opacity: .6; transform: scale(.93); } 50% { opacity: 1; transform: scale(1.03); } }

  .stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 26px; }
  .stat-card { border: 1px solid var(--line); border-radius: 13px; background: #ffffff; padding: 22px; }
  .stat-icon { width: 41px; height: 41px; display: grid; place-items: center; border-radius: 12px; }
  .stat-card > strong { display: block; font-size: 29px; font-weight: 650; letter-spacing: -1px; margin-top: 17px; }
  .stat-card > span:last-child { display: block; color: #8199a7; font-size: 10px; margin-top: 3px; }
  .progress-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(250px, 1fr); gap: 22px; }
  .activity-card, .skills-card { background: #ffffff; border: 1px solid var(--line); border-radius: 14px; padding: 26px; }
  .activity-chart { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 15px 8px 0; }
  .chart-column { flex: 1; text-align: center; min-width: 0; }
  .chart-column > span { display: block; font-size: 9px; color: #839fb0; margin-bottom: 8px; }
  .bar-track { height: 140px; display: flex; align-items: flex-end; border-bottom: 1px solid #d7e3ea; background: repeating-linear-gradient(to top, transparent, transparent 34px, #e9eff3 34px, #e9eff3 35px); }
  .chart-bar { width: 100%; max-width: 41px; margin: 0 auto; background: #a2c6da; border-radius: 6px 6px 0 0; }
  .chart-column.today .chart-bar { background: #4d7e9a; }
  .chart-column > strong { display: block; font-weight: 500; font-size: 10px; color: #859eac; margin-top: 12px; }
  .chart-column.today > strong { color: #42718d; }
  .chart-caption { font-size: 10px; text-align: center; color: #859caa; margin-top: 23px; line-height: 1.7; }
  .skills-card h2 { font-size: 18px; }
  .skills-card > p { font-size: 10px; color: #869ba7; margin: 9px 0 22px; }
  .skill-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 12px 0; border-bottom: 1px solid #e4ecf1; }
  .skill-row > span { display: flex; align-items: center; gap: 11px; color: #6a899b; font-size: 11px; }
  .skill-row > strong { color: #587a8e; font-size: 12px; font-weight: 600; }
  .skill-row small { color: #8ca1ae; font-size: 8px; margin-left: 4px; font-weight: 400; }
  .mastery-note { display: block; color: #899eab; font-size: 9px; line-height: 1.7; margin-top: 20px; }
  .achievements-section { margin-top: 32px; }
  .achievement-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .achievement-card { padding: 25px 18px 20px; text-align: center; background: #ecf2f6; border: 1px dashed #d1dee5; border-radius: 12px; }
  .achievement-card.unlocked { background: #ffffff; border: 1px solid #d1dee5; }
  .achievement-icon { display: grid; place-items: center; width: 57px; height: 57px; border-radius: 50%; background: #dde8ef; color: #9fb5c1; margin: auto auto 15px; }
  .achievement-card h3 { font-size: 12px; color: #6a8a9c; }
  .achievement-card p { font-size: 10px; color: #8da2af; line-height: 1.7; margin: 8px auto 15px; max-width: 150px; }
  .achievement-status { display: inline-flex; align-items: center; gap: 5px; color: #97a9b3; font-size: 8px; }
  .unlocked .achievement-status { color: #5386a4; }

  dialog { border: 1px solid #d9e4ea; border-radius: 20px; padding: 0; color: var(--ink); box-shadow: 0 30px 100px #122c2c30; background: #ffffff; max-height: calc(100dvh - 48px); }
  dialog::backdrop { background: #17243466; backdrop-filter: blur(5px); }
  .lesson-dialog { width: min(780px, calc(100% - 36px)); }
  .lesson-dialog[open] { display: flex; flex-direction: column; }
  .lesson-modal-header { display: flex; align-items: center; gap: 20px; padding: 26px 30px; border-bottom: 1px solid #e4ecf1; }
  .lesson-modal-header > .icon-button { color: #8ea2ac; }
  .lesson-modal-header > div { flex: 1; }
  .lesson-modal-header > div > span { display: block; font-size: 10px; color: #6d8b9d; margin-bottom: 10px; }
  .exercise-progress { height: 7px; border-radius: 10px; background: #e5eef3; overflow: hidden; }
  .exercise-progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--sky), var(--sunny)); border-radius: 10px; transition: width .3s; }
  .lesson-modal-header > strong { font-size: 15px; font-weight: 600; white-space: nowrap; }
  .lesson-modal-header > strong > span { color: #9cb2bf; font-size: 12px; font-weight: 400; }
  .exercise-body { padding: 34px 48px 38px; }
  .exercise-type { display: flex; align-items: center; gap: 7px; font-size: 9px; color: #83a0b1; letter-spacing: 1.4px; margin-bottom: 14px; }
  .exercise-body h2 { font-size: 27px; line-height: 1.35; letter-spacing: -.6px; margin-bottom: 26px; }
  .learning-order-note { color: var(--muted); font-size: 12px; line-height: 1.7; margin-bottom: 16px; }
  .word-study-button { display: block; margin-top: 12px; font-size: 12px; }
  .prerequisite-screen > p:not(.exercise-type) { line-height: 1.7; margin-bottom: 15px; }
  .prerequisite-list { list-style: none; padding: 0; margin: 22px 0; max-height: 240px; overflow-y: auto; border-block: 1px solid var(--line); }
  .prerequisite-list li { display: grid; grid-template-columns: minmax(80px, 1fr) minmax(0, 2fr); gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--line); font-size: 13px; overflow-wrap: anywhere; }
  .prerequisite-list span { color: var(--muted); }
  .word-study { text-align: center; }
  .word-study .exercise-type { justify-content: center; }
  .word-study h2 { overflow-wrap: anywhere; }
  .study-translation { font-size: 22px; margin-bottom: 16px; }
  .word-study .audio-pill { margin: 20px auto; }
  [data-question-heading]:focus { outline: none; }
  .question-word { display: flex; align-items: center; justify-content: center; gap: 16px; background: #e8f1f6; padding: 22px; border: 1px solid #dae7ef; border-radius: 12px; margin-bottom: 26px; }
  .question-word > span { font-family: Georgia, serif; font-size: 33px; color: #446d85; }
  .question-word .audio-button { background: #d7e7f0; color: #5d89a2; }
  .answer-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  .answer-option { display: flex; align-items: center; gap: 10px; min-height: 59px; background: white; border: 1px solid #d3e0e8; border-bottom-width: 3px; border-radius: 9px; text-align: left; padding: 12px; font-size: 12px; color: #587788; }
  /* Hover only where a pointer can hover: on touch screens :hover sticks to the tapped position and made the
     option at the same place in the NEXT exercise look already selected (UI-07). */
  @media (hover: hover) { .answer-option:hover:not(:disabled) { background: #eff6fa; border-color: #9ebed1; } }
  .answer-option.selected { background: #e0edf5; border-color: #79acc9; color: #3a6c89; }
  .answer-option > .icon { margin-left: auto; }
  .answer-number { display: grid; place-items: center; border: 1px solid #d9e5ec; background: #f6fafd; border-radius: 5px; width: 25px; height: 25px; flex-shrink: 0; font-size: 9px; color: #96adbb; }
  .answer-option:disabled, .word-token:disabled, .written-answer:disabled { opacity: 1; }
  .answer-option.correct, .written-answer.correct { border-color: #72a6c4; background: #e5f0f7; color: #3d7392; }
  .answer-option.incorrect, .written-answer.incorrect { border-color: #d8b7a5; background: #faf0e9; color: #a77b63; }
  .translation-prompt { background: #ecf2f6; padding: 20px 24px; border-radius: 10px; border: 1px solid #dae6ed; font-size: 19px; color: #547283; margin: 0 0 28px; }
  .sentence-answer { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; min-height: 89px; padding: 14px 0; border-top: 1px solid #dce7ee; border-bottom: 1px solid #d1e0e8; }
  .sentence-answer > span { color: #9db3bf; font-size: 12px; }
  .word-token { background: #fff; border: 1px solid #cedee8; border-bottom-width: 3px; border-radius: 8px; padding: 10px 15px; font-size: 15px; color: #45718a; }
  @media (hover: hover) { .word-token:hover:not(:disabled) { background: #e2eff6; } }
  .word-token.used { color: transparent; background: #e8f0f4; border-color: #e2ecf2; }
  .token-bank { display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; margin: 26px 0 5px; min-height: 47px; }
  .sentence-answer.correct .word-token { background: #e2eff7; border-color: #83afc9; }
  .sentence-answer.incorrect .word-token { background: #faf0e9; border-color: #d9bda9; color: #ad846b; }
  .write-label { display: block; font-size: 11px; font-weight: 600; color: #708ea0; margin-bottom: 10px; }
  .written-answer { width: 100%; padding: 17px 18px; border: 1px solid #cedee7; border-radius: 10px; background: white; font-size: 17px; color: #355073; }
  .written-answer::placeholder { color: #9eb3bf; font-size: 14px; }
  .input-hint { font-size: 10px; color: #8ca3b1; margin-top: 12px; line-height: 1.7; }
  .listening-prompt { text-align: center; margin-bottom: 24px; }
  .listen-big-button { display: inline-flex; flex-direction: column; align-items: center; gap: 13px; background: #e2edf4; color: #5586a2; padding: 22px 43px; border: 1px solid #c9dde9; border-bottom-width: 3px; border-radius: 13px; font-size: 11px; }
  .listening-prompt .text-button { display: block; margin: 12px auto 0; color: #869eac; font-size: 10px; font-weight: 400; text-decoration: underline; }
  .revealed-text { font-family: Georgia, serif; font-style: italic; font-size: 22px; color: #4a728a; margin-top: 15px; }
  .lesson-modal-footer { display: flex; align-items: center; justify-content: space-between; gap: 25px; padding: 24px 35px; background: #f2f8fb; border-top: 1px solid #dde8ef; margin-top: auto; }
  .lesson-modal-footer .button { flex-shrink: 0; min-width: 139px; }
  .exercise-footer-note { font-size: 10px; color: #8ca3b0; }
  .feedback-correct { background: #e2eff6; border-color: #d0e3ee; }
  .feedback-incorrect { background: #f7eee6; border-color: #efded1; }
  .answer-feedback { display: flex; align-items: flex-start; gap: 13px; color: #447d9e; }
  .feedback-icon { display: grid; place-items: center; width: 38px; height: 38px; background: #fff9; border-radius: 50%; flex-shrink: 0; }
  .answer-feedback strong { display: block; font-size: 14px; font-weight: 650; }
  .answer-feedback p { font-size: 10px; line-height: 1.8; margin-top: 5px; color: #688ca1; }
  .answer-feedback .correct-answer { font-size: 14px; font-weight: 600; color: #a78367; }
  .feedback-incorrect .answer-feedback { color: #aa8467; }
  .feedback-incorrect .answer-feedback p:not(.correct-answer) { color: #b0947c; }
  .quit-screen { text-align: center; padding: 64px 48px; }
  .quit-screen > .icon { color: #719db6; margin: 0 auto 25px; }
  .quit-screen h2 { font-size: 28px; }
  .quit-screen p { color: #7592a2; line-height: 1.9; max-width: 420px; margin: 20px auto 30px; }
  .quit-screen .text-button { display: block; margin: 15px auto 0; }
  .dialog-close { position: absolute; right: 18px; top: 18px; color: #94adbb; }
  .result-screen { text-align: center; padding: 42px 48px; }
  .result-trophy { position: relative; display: grid; place-items: center; width: 113px; height: 113px; margin: 0 auto 28px; color: #a9ad65; background: #f4f2d9; border-radius: 50%; }
  .result-trophy i { position: absolute; font-size: 30px; font-style: normal; color: #c4b87b; right: -22px; top: 0; }
  .result-trophy i:last-child { left: -20px; top: 62px; right: auto; font-size: 23px; color: #b3c294; }
  .result-screen h2 { font-size: 38px; color: #395579; letter-spacing: -1px; }
  .result-screen > p:not(.eyebrow) { font-size: 12px; color: #7f9aaa; max-width: 390px; margin: 15px auto 0; line-height: 1.8; }
  .result-stats { display: flex; justify-content: center; gap: 14px; margin: 29px auto 0; }
  .result-stats > div { width: 175px; padding: 17px 12px; background: #ebf3f7; border: 1px solid #d8e5ed; border-radius: 10px; }
  .result-stats .icon { color: #729db6; margin: auto auto 8px; }
  .result-stats strong { display: block; color: #487894; font-size: 23px; }
  .result-stats span { display: block; color: #8ca3b0; font-size: 9px; margin-top: 3px; }
  .result-screen > p.completion-note { font-size: 9px; margin-top: 13px; }
  .result-screen > .button { margin-top: 27px; min-width: min(230px, 100%); max-width: 100%; }
  .result-screen > .text-button { display: block; margin: 13px auto 0; font-size: 11px; }
  .settings-dialog { width: min(500px, calc(100% - 32px)); padding: 30px; }
  .settings-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 26px; }
  .settings-heading .eyebrow { font-size: 8px; margin-bottom: 7px; }
  .settings-heading h2 { font-size: 25px; }
  .settings-heading .icon-button { color: #869fad; }
  .field-label { display: block; font-size: 11px; font-weight: 600; color: #65899e; margin-bottom: 9px; }
  .field-label > span { font-size: 9px; color: #93a9b6; margin-left: 4px; font-weight: 400; }
  .settings-input { width: 100%; padding: 12px; font-size: 13px; background: #f7fbfe; border: 1px solid #d0e0ea; border-radius: 8px; color: #436f89; }
  .goal-options { display: flex; gap: 8px; border: 0; padding: 0; margin: 25px 0; }
  .goal-options legend { font-size: 11px; font-weight: 600; color: #65899e; margin-bottom: 10px; padding: 0; }
  .goal-options label { flex: 1; position: relative; }
  .goal-options input { position: absolute; opacity: 0; width: 1px; height: 1px; }
  .goal-options label > span { display: block; text-align: center; padding: 13px 4px; border: 1px solid #d5e2e9; border-radius: 8px; background: #f7fbfe; cursor: pointer; }
  .goal-options input:checked + span { background: #e2eff7; border-color: #82adc6; }
  .goal-options input:focus-visible + span { outline: 3px solid #4c87a9; outline-offset: 3px; }
  .goal-options strong { display: block; color: #497893; font-size: 17px; }
  .goal-options small { display: block; color: #859fae; font-size: 8px; margin-top: 4px; }
  .settings-privacy { display: flex; gap: 10px; margin: 25px 0; color: #84a2b4; }
  .settings-privacy p { font-size: 10px; color: #7f9cad; line-height: 1.8; }
  .reset-button { display: block; margin: 21px auto 0; color: #b49883; font-weight: 400; font-size: 10px; }
  .settings-dialog > p { color: #7191a4; font-size: 12px; line-height: 1.9; margin-bottom: 17px; }
  .settings-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 25px; }
  .consent-icon { color: #6b97b1; margin: 0 0 25px; }
  #consent-dialog .full-width { margin-top: 8px; font-size: 11px; }
}

@layer responsive {
  @media (min-width: 1600px) {
    main { padding-top: 42px; }
    .dashboard-layout { grid-template-columns: minmax(0, 1fr) 295px; gap: 32px; }
    .hero-card { min-height: 320px; padding: 35px; }
    .hero-card h2 { font-size: 49px; }
    .hero-card p { font-size: 13px; }
    .hero-card .button { font-size: 12px; }
    .path-node { width: 74px; height: 74px; }
    .path-node.next { width: 84px; height: 84px; }
    .path-label > strong { font-size: 15px; }
    .lesson-description { font-size: 11px; }
    .daily-card, .word-of-day, .culture-card { padding: 26px; }
  }
  @media (max-width: 1250px) {
    .sidebar { width: 210px; padding-left: 15px; padding-right: 15px; }
    .workspace { margin-left: 210px; }
    main { padding: 29px 28px 0; }
    .topbar { padding: 0 28px; }
    .dashboard-layout { grid-template-columns: minmax(0, 1fr) 237px; gap: 20px; }
    .hero-card { padding: 26px 25px; min-height: 282px; }
    .hero-card h2 { font-size: 37px; }
    .hero-illustration { width: 56%; right: -20px; bottom: 11px; }
    .hero-copy { max-width: 62%; }
    .path-row { gap: 12px; }
    .path-node { width: 58px; height: 58px; }
    .path-node.next { width: 66px; height: 66px; }
    .path-label > strong { font-size: 11px; }
    .lesson-description { font-size: 9px; }
    .practice-card { padding: 16px 12px; }
    .practice-card > strong { font-size: 11px; }
    .practice-card > span:last-child { font-size: 8px; }
    .daily-card { padding-left: 19px; padding-right: 19px; }
    .pronunciation-layout { grid-template-columns: minmax(0, 1fr) 265px; gap: 20px; }
    .speaking-card { padding: 22px; }
    .vocabulary-card { padding: 17px; }
    .vocab-card-bottom { gap: 0; }
    .word-mastery small { font-size: 7px; }
    .vocabulary-grid { gap: 12px; }
    .stat-card { padding: 19px; }
    .progress-layout { gap: 16px; }
    .activity-card, .skills-card { padding: 22px; }
    .activity-chart { gap: 12px; }
    .achievement-grid { gap: 12px; }
  }
  @media (max-width: 1020px) {
    .sidebar { display: none; }
    .workspace { margin-left: 0; }
    .mobile-brand { display: inline-flex; align-items: center; gap: 7px; font-size: 26px; font-weight: 700; letter-spacing: -1.5px; color: var(--green); }
    .mobile-brand .brand-icon { width: 28px; height: 28px; }
    .topbar-location { display: none; }
    .mobile-nav { position: fixed; display: grid; grid-template-columns: repeat(5, 1fr); bottom: 0; left: 0; right: 0; z-index: 20; background: #fffffff5; backdrop-filter: blur(15px); border-top: 1px solid var(--line); padding: 8px 15px calc(9px + env(safe-area-inset-bottom)); box-shadow: 0 -3px 20px #1b2b3f05; }
    .mobile-nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; color: #889eab; font-size: 9px; padding: 5px; border-radius: 9px; }
    .mobile-nav a[aria-current="page"] { color: #3b516e; background: #e3eef4; }
    main { padding-bottom: 65px; }
    .notifications { bottom: 87px; }
    .hero-card h2 { font-size: 43px; }
    .hero-card { min-height: 300px; }
    .path-label > strong { font-size: 13px; }
    .lesson-description { font-size: 10px; }
    .dashboard-layout { grid-template-columns: minmax(0, 1fr) 255px; gap: 23px; }
  }
  @media (max-width: 820px) {
    .dashboard-layout { grid-template-columns: minmax(0, 1fr); }
    .right-rail { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
    .daily-card { padding: 18px 15px; }
    .daily-card .card-heading h2 { font-size: 13px; }
    .daily-card .goal-ring { width: 123px; height: 123px; margin: 13px auto; }
    .goal-caption { font-size: 8px; }
    .week-days { gap: 3px; margin-top: 17px; }
    .week-days b { width: 19px; height: 19px; }
    .word-of-day { padding: 20px 17px; }
    .word-card-label { letter-spacing: .6px; font-size: 6px; gap: 5px; }
    .word-of-day h2 { margin-top: 17px; }
    .daily-word { font-size: 24px; }
    .culture-card { padding: 20px 17px; }
    .culture-card p { font-size: 10px; }
    .culture-footer { font-size: 7px; flex-wrap: wrap; }
    .hero-card { padding: 30px; min-height: 300px; }
    .hero-illustration { width: 50%; right: 5px; bottom: -10px; }
    .hero-copy { max-width: 55%; }
    .hero-card h2 { font-size: 43px; }
    .path-node { width: 60px; height: 60px; }
    .path-node.next { width: 70px; height: 70px; }
    .practice-card { padding: 20px; }
    .practice-card > strong { font-size: 13px; }
    .practice-card > span:last-child { font-size: 10px; }
    .vocabulary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .vocabulary-card { padding: 20px; }
    .word-mastery small { font-size: 9px; }
    .pronunciation-layout { grid-template-columns: minmax(0, 1fr); }
    .phrase-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .phrase-sidebar { margin-top: 15px; }
    .speaking-card { padding: 25px 36px 20px; }
    .speaking-card h2 { font-size: 34px; }
    .stat-grid { gap: 12px; }
    .stat-card { padding: 16px; }
    .stat-card > strong { font-size: 25px; }
    .stat-card > span:last-child { font-size: 8px; }
    .progress-layout { grid-template-columns: 1fr; }
    .skills-card { padding: 25px; }
    .achievement-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .page-heading > .button { white-space: nowrap; font-size: 11px; }
    .page-heading > div { min-width: 0; }
  }
  @media (max-width: 600px) {
    body { overflow-x: hidden; }
    .topbar { position: sticky; top: 0; z-index: 15; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
    .mobile-brand { font-size: 24px; }
    .topbar-tools { min-width: 0; }
    .top-stat { min-height: 44px; }
    .settings-shortcut { min-width: 44px; min-height: 44px; }
    .mobile-nav { padding-left: max(10px, env(safe-area-inset-left)); padding-right: max(10px, env(safe-area-inset-right)); }
    .mobile-nav a { min-height: 44px; justify-content: center; }
    .button { min-height: 46px; }
    .icon-button { min-width: 44px; min-height: 44px; }
    .level-picker { flex-direction: column; align-items: stretch; gap: 12px; padding: 15px; margin-bottom: 23px; }
    .level-picker label { flex-basis: auto; }
    .level-picker select { font-size: 12px; }
    .level-picker p { font-size: 11px; }
    main { padding: 27px 20px 65px; }
    .topbar { height: 68px; padding: 0 20px; }
    :root { --topbar-height: 68px; }
    .topbar-tools { gap: 15px; }
    .language-badge { display: none; }
    .top-stat { gap: 3px; }
    .top-stat strong { font-size: 11px; }
    .top-stat > span { font-size: 8px; }
    .top-stat .icon { width: 18px; height: 18px; }
    .settings-shortcut { padding: 5px; width: 26px; }
    .page-heading { margin-bottom: 24px; flex-wrap: wrap; gap: 17px; }
    .page-heading h1 { font-size: 27px; letter-spacing: -1px; line-height: 1.3; }
    .page-heading .eyebrow { font-size: 7px; letter-spacing: 1.4px; }
    .page-subtitle { font-size: 11px; max-width: 320px; line-height: 1.7; }
    .date-label { display: none; }
    .hero-card { padding: 24px; min-height: 284px; }
    .hero-copy { max-width: 66%; }
    .hero-tag { font-size: 6.5px; letter-spacing: .8px; margin-bottom: 14px; }
    .hero-card h2 { font-size: clamp(30px, 9vw, 36px); letter-spacing: -1.5px; white-space: normal; }
    .hero-card p { font-size: 10px; line-height: 1.9; margin: 14px 0 18px; }
    .hero-card .button { font-size: 10px; padding: 10px 12px; gap: 8px; min-height: 40px; }
    .hero-card .button .icon { width: 15px; }
    .hero-illustration { width: 280px; right: -64px; bottom: 0; opacity: .95; }
    .hero-meta { font-size: 7px; margin-top: 14px; }
    .path-row, .path-row.align-end { flex-direction: row; text-align: left; gap: 14px; }
    .path-row:not(:last-child)::before, .path-row.align-end:not(:last-child)::before { left: 26px; right: auto; }
    .path-node { width: 52px; height: 52px; }
    .path-node.next { width: 60px; height: 60px; }
    .path-node.next .path-node-icon .icon { width: 22px; height: 22px; }
    .path-callout { font-size: 7px; padding: 2px 7px; }
    .path-label > strong { font-size: 14px; }
    .lesson-description { font-size: 11px; }
    .path-label small { font-size: 8px; margin-top: 7px; }
    .section-heading h2 { font-size: 19px; }
    .section-heading.compact { flex-wrap: wrap; gap: 5px; }
    .section-heading > span { font-size: 9px; }
    .chapter-count > span { font-size: 8px; }
    .extra-practice { margin-top: 27px; }
    .practice-grid { gap: 9px; }
    .practice-card { padding: 16px 11px 13px; }
    .practice-card > strong { font-size: 10px; line-height: 1.4; }
    .practice-card > span:last-child { font-size: 8px; line-height: 1.7; align-items: flex-end; }
    .practice-card > span:last-child .icon { width: 12px; }
    .practice-symbol { margin-bottom: 12px; }
    .right-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .daily-card { padding: 18px 13px; }
    .goal-ring { width: 115px !important; height: 115px !important; }
    .goal-ring strong { font-size: 22px; }
    .goal-ring small { font-size: 6px; }
    .goal-ring .icon { width: 19px; }
    .goal-ring strong > span { font-size: 12px; }
    .week-days { gap: 2px; }
    .week-days b { width: 16px; height: 16px; }
    .week-days > div { font-size: 7px; }
    .goal-caption { font-size: 7px; min-height: 21px; }
    .word-of-day { padding: 20px 14px; }
    .word-card-label { line-height: 1.7; font-size: 5.5px; letter-spacing: .5px; gap: 5px; }
    .word-card-label .icon { width: 14px; }
    .word-of-day h2 { font-size: 12px; margin: 18px 0 19px; }
    .daily-word { font-size: 23px; letter-spacing: -.9px; }
    .word-of-day .pronunciation-hint { font-size: 7px; overflow-wrap: anywhere; }
    .word-translation { font-size: 10px; }
    .word-decoration { font-size: 120px; bottom: -33px; }
    .culture-card { grid-column: 1 / -1; padding: 20px; }
    .culture-icon { float: left; margin-right: 15px; margin-bottom: 8px; }
    .culture-card p { font-size: 11px; }
    .culture-footer { margin-top: 13px; font-size: 8px; }
    .page-footer { font-size: 8px; margin-top: 22px; padding: 22px 0; }
    .page-footer > span:last-child { font-size: 9px; text-align: right; }
    .vocabulary-summary { flex-wrap: wrap; gap: 12px 20px; font-size: 10px; margin-bottom: 25px; }
    .vocabulary-summary .icon { width: 16px; }
    .vocabulary-toolbar { gap: 9px; }
    .search-field { padding: 0 12px; gap: 8px; }
    .search-field input { font-size: 11px; }
    .bookmark-filter { min-height: 46px; font-size: 10px; padding: 8px 11px; gap: 6px; }
    .bookmark-filter .icon { width: 15px; }
    .filter-tabs { flex-wrap: nowrap; overflow: auto; padding: 4px 2px 9px; margin: 19px -2px 14px; }
    .filter-tabs button { flex-shrink: 0; font-size: 10px; padding: 8px 12px; }
    .vocabulary-grid { gap: 11px; }
    .vocabulary-card { padding: 12px; }
    .vocab-card-top { margin-bottom: 12px; }
    .vocabulary-card .category-tag { font-size: 8px; padding: 3px 6px; }
    .vocabulary-card .bookmark-button { padding: 5px; }
    .vocabulary-card .bookmark-button .icon { width: 16px; }
    .vocabulary-card h2 { font-size: 22px; overflow-wrap: anywhere; }
    .vocabulary-card .pronunciation-hint { font-size: 8px; overflow-wrap: anywhere; }
    .vocab-translation { font-size: 10px; min-height: 30px; }
    .word-mastery { gap: 3px; flex-wrap: wrap; max-width: 80px; }
    .word-mastery i { width: 4px; height: 4px; }
    .word-mastery small { width: 100%; margin-left: 0; font-size: 7px; margin-top: 4px; }
    .vocab-card-bottom .audio-button { padding: 7px; }
    .vocab-card-bottom .audio-button .icon { width: 17px; height: 17px; }
    .speaking-card { padding: 20px 21px 13px; }
    .speaking-card h2 { font-size: 28px; }
    .speaking-card-heading > span:last-child { font-size: 9px; }
    .speaking-visual { width: 128px; height: 128px; margin-top: 26px; }
    .speaking-visual > div { inset: 28px; }
    .speaking-visual .icon { width: 33px; }
    .phrase-translation { font-size: 12px; }
    .phrase-hint { font-size: 9px; line-height: 1.8; }
    .microphone-note { font-size: 8px; }
    .phrase-navigation { gap: 6px; }
    .phrase-navigation > span { gap: 3px; }
    .phrase-navigation i { width: 4px; height: 4px; }
    .phrase-navigation .text-button { font-size: 9px; }
    .phrase-list { grid-template-columns: 1fr; }
    .pronunciation-tip { padding: 20px; }
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stat-card { padding: 21px; }
    .stat-card > strong { font-size: 28px; }
    .stat-card > span:last-child { font-size: 9px; }
    .activity-card, .skills-card { padding: 21px; }
    .activity-card .section-heading h2 { font-size: 18px; }
    .activity-card .eyebrow { font-size: 6px; }
    .activity-chart { gap: 13px; padding: 12px 0 0; }
    .chart-caption { font-size: 9px; }
    .achievements-section .section-heading { align-items: flex-end; }
    .achievements-section .section-heading h2 { font-size: 17px; max-width: 240px; }
    .achievement-grid { gap: 10px; }
    .achievement-card { padding: 20px 13px; }
    .achievement-card h3 { font-size: 11px; }
    .achievement-card p { font-size: 9px; }
    dialog { max-height: calc(100dvh - 24px); border-radius: 15px; }
    .lesson-dialog { width: calc(100% - 22px); }
    .lesson-modal-header { gap: 13px; padding: 18px 14px; }
    .lesson-modal-header > strong { font-size: 12px; }
    .lesson-modal-header > strong > span { font-size: 10px; }
    .exercise-body { padding: 26px 22px 30px; }
    .exercise-body h2 { font-size: 24px; margin-bottom: 23px; }
    .question-word { padding: 20px 16px; }
    .question-word > span { font-size: 29px; }
    .answer-options { grid-template-columns: 1fr; gap: 8px; }
    .answer-option { min-height: 51px; padding: 10px 12px; }
    .answer-number { width: 23px; height: 23px; }
    .lesson-modal-footer { flex-wrap: wrap; gap: 17px; padding: 20px 22px; }
    .lesson-modal-footer > .button { margin-left: auto; }
    .lesson-modal-footer .exercise-footer-note { width: 100%; text-align: center; font-size: 9px; }
    .lesson-modal-footer:not(.feedback-correct):not(.feedback-incorrect) .button { width: 100%; }
    .answer-feedback { width: 100%; gap: 10px; }
    .answer-feedback strong { font-size: 13px; }
    .answer-feedback p { font-size: 10px; }
    .feedback-icon { width: 33px; height: 33px; }
    .translation-prompt { padding: 18px; font-size: 17px; }
    .sentence-answer { min-height: 100px; gap: 6px; }
    .sentence-answer > span { font-size: 11px; }
    .word-token { font-size: 14px; padding: 10px 12px; }
    .token-bank { gap: 7px; }
    .written-answer { font-size: 16px; }
    .written-answer::placeholder { font-size: 12px; }
    .input-hint { font-size: 9px; }
    .result-screen { padding: 38px 23px 30px; }
    .result-screen h2 { font-size: 32px; }
    .result-screen > p:not(.eyebrow) { font-size: 11px; }
    .result-stats { gap: 10px; }
    .result-stats > div { width: 145px; }
    .result-stats strong { font-size: 21px; }
    .result-stats span { font-size: 8px; }
    .quit-screen { padding: 46px 28px; }
    .quit-screen h2 { font-size: 26px; }
    .quit-screen p { font-size: 12px; }
    .settings-dialog { padding: 25px; }
    .settings-heading h2 { font-size: 23px; }
    .settings-actions { flex-direction: column; }
    .settings-actions .button { width: 100%; }
    .notifications { right: 16px; bottom: 86px; }
  }
  @media (max-width: 360px) {
    main { padding-left: 14px; padding-right: 14px; }
    .topbar { padding: 0 14px; }
    .topbar-tools { gap: 10px; }
    .hero-card { padding-left: 20px; padding-right: 20px; }
    .hero-card h2 { font-size: 31px; }
    .hero-illustration { right: -76px; }
    .goal-caption { font-size: 6.5px; }
    .practice-card { padding-left: 9px; padding-right: 9px; }
    .practice-card > span:last-child .icon { display: none; }
    .phrase-navigation > span { display: none; }
    .goal-options { gap: 5px; }
    .goal-options small { font-size: 7px; }
  }
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  }
  .level-switch { display: flex; flex-wrap: wrap; gap: 8px; flex: 0 1 auto; }
  .level-option { display: grid; gap: 2px; min-width: 96px; min-height: 48px; padding: 8px 14px; border: 1px solid #9dbdd0; border-radius: 10px; background: #fff; color: #2a3e59; font: inherit; text-align: center; cursor: pointer; }
  .level-option b { font-size: 15px; }
  .level-option span { font-size: 12px; overflow-wrap: anywhere; }
  .level-option.selected { background: #2a3e59; border-color: #2a3e59; color: #fff; }
  .level-option:focus-visible { outline: 3px solid #1a6fb5; outline-offset: 2px; }
  @media (max-width: 720px) { .level-switch { width: 100%; } .level-option { flex: 1 1 76px; min-width: 0; } }
  .visually-hidden-label { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
}

/* Hoermodus (HOER-01..05) */
.listen-start { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 20px; margin-bottom: 22px; background: #fff; border: 1px solid #cedee8; border-radius: 12px; }
.listen-start-text { display: flex; align-items: center; gap: 14px; min-width: 0; }
.listen-start-text p { margin: 3px 0 0; color: #3c5473; font-size: 13px; line-height: 1.6; }
.listen-dialog { width: min(520px, 94vw); }
.listen-player { display: grid; gap: 10px; text-align: center; padding: 8px 0 4px; }
.listen-part { color: #5c7482; font-size: 12px; letter-spacing: .03em; min-height: 1.4em; }
.listen-main { font-size: clamp(30px, 8vw, 44px); line-height: 1.15; margin: 14px 0 0; min-height: 1.2em; overflow-wrap: anywhere; }
.listen-sub { font-size: clamp(22px, 6vw, 30px); color: #2a3e59; min-height: 1.3em; overflow-wrap: anywhere; }
.listen-state { color: #1a6fb5; font-weight: 600; min-height: 1.4em; }
.listen-think { height: 6px; border-radius: 3px; background: #e1ecf2; overflow: hidden; }
.listen-think i { display: block; height: 100%; width: 0; background: #1a6fb5; }
.listen-player progress { width: 100%; height: 8px; accent-color: #2a3e59; }
.listen-time { display: flex; justify-content: space-between; color: #5c7482; font-size: 12px; margin: 0; }
.listen-controls { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 4px; }
.listen-toggle { min-width: 150px; justify-content: center; }
@media (max-width: 720px) { .listen-start { flex-direction: column; align-items: stretch; } }
@media (prefers-reduced-motion: reduce) { .listen-think i { transition: none !important; } }
.listen-speed-label { margin: 8px 0 4px; color: #5c7482; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.listen-speed { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.listen-speed-option { min-height: 36px; padding: 6px 14px; border: 1px solid #9dbdd0; border-radius: 999px; background: #fff; color: #2a3e59; font: inherit; font-size: 13px; cursor: pointer; }
.listen-speed-option.selected { background: #2a3e59; border-color: #2a3e59; color: #fff; }
.listen-speed-option:focus-visible { outline: 3px solid #1a6fb5; outline-offset: 2px; }
.listen-progress-text { font-weight: 700; color: #1d3f6b; }
.listen-start-text .text-button { margin-top: 6px; padding: 0; text-align: left; }
.listen-heard-list { list-style: none; margin: 10px 0; padding: 0; max-height: 46vh; overflow: auto; border: 1px solid #cedee8; border-radius: 10px; }
.listen-heard-list li { border-bottom: 1px solid #e6eef3; }
.listen-heard-list li:last-child { border-bottom: 0; }
.listen-heard-list label { display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; }
.listen-heard-list small { color: #5c7482; }
.listen-heard-list input { width: 18px; height: 18px; }
@media (max-width: 640px) { .listen-start { flex-direction: column; align-items: stretch; } }
/* Rundenwahl im Hoermodus (HOER-11), gleiche Knoepfe wie bei den Satzrunden (.echo-round). */
.listen-start.listen-rounds-card { display: grid; gap: 14px; align-items: stretch; }
.listen-rounds-card .echo-round { flex-wrap: wrap; row-gap: 0; }
/* Mehr als zwanzig Runden (HOER-12): so viele Spalten, wie Platz ist, auch auf dem Handy mindestens drei. */
.listen-rounds-card .echo-round-list { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
.listen-rounds-card .echo-round { padding: 8px 4px; font-size: 14px; }
.listen-rounds-card .echo-round small { flex-basis: 100%; text-align: center; font-size: 11px; font-weight: 600; opacity: .8; }
