:root {
  color-scheme: dark;
  --canvas: #080f1b;
  --surface: #101c2c;
  --surface-raised: #17283b;
  --surface-inset: #0c1625;
  --ink: #e6f4ff;
  --muted: #9badc2;
  --soft-ink: #bfd0e3;
  --pending: #8c9fb8;
  --line: #26394f;
  --line-strong: #3b536f;
  --accent: #65dbff;
  --accent-strong: #9ae8ff;
  --accent-soft: #123345;
  --accent-border: #3386a1;
  --accent-ink: #05131e;
  --accent-glow: #65dbff24;
  --green: #77e6b2;
  --success-soft: #142f2c;
  --success-border: #2d574b;
  --red: #ff8f9f;
  --warning: #ffce91;
  --warning-soft: #30271c;
  --warning-border: #655035;
  --shadow-panel: 0 8px 28px #00000024;
  --ambient-tint: #12304435;
  --panel-tint: #65dbff07;
  --panel-ring: #65dbff04;
  --accent-outline: #65dbff25;
  --accent-halo: #65dbff80;
  --caret-halo: #65dbff70;
  --pressed-halo: #65dbff45;
  --key-tint: #65dbff08;
  --keyboard-edge: #1d3047;
  --key-edge: #0a1626;
  --shadow-color: #00000024;
  --shadow-soft: #00000020;
  --shadow-key: #00000030;
  --shadow-dialog: #00000066;
  --backdrop: #020811cc;
  --sans: 'Be Vietnam Pro', sans-serif;
  --mono: 'JetBrains Mono', monospace;
}
:root[data-theme="light"] {
  color-scheme: light;
  --canvas: #f4f8fc;
  --surface: #ffffff;
  --surface-raised: #f1f7fc;
  --surface-inset: #eaf2f8;
  --ink: #182c40;
  --muted: #536b80;
  --soft-ink: #38536b;
  --pending: #6c8196;
  --line: #d9e5ef;
  --line-strong: #7591a9;
  --accent: #087697;
  --accent-strong: #045f7c;
  --accent-soft: #e3f5fc;
  --accent-border: #529bb7;
  --accent-ink: #ffffff;
  --accent-glow: #1598c516;
  --green: #157551;
  --success-soft: #e8f6ee;
  --success-border: #99cbb1;
  --red: #bf3554;
  --warning: #8c5418;
  --warning-soft: #fff3df;
  --warning-border: #d5af79;
  --shadow-panel: 0 8px 28px #38536b08;
  --ambient-tint: #65dbff0d;
  --panel-tint: #65dbff06;
  --panel-ring: #08769704;
  --accent-outline: #08769720;
  --accent-halo: #1598c52a;
  --caret-halo: #1598c52a;
  --pressed-halo: #1598c52a;
  --key-tint: #1598c508;
  --keyboard-edge: #ccdeeb;
  --key-edge: #c8dae7;
  --shadow-color: #38536b12;
  --shadow-soft: #38536b0d;
  --shadow-key: #38536b12;
  --shadow-dialog: #182c4030;
  --backdrop: #182c4066;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; background: radial-gradient(ellipse at 80% 0%, var(--ambient-tint), transparent 48%), var(--canvas); color: var(--ink); font-family: var(--sans); font-size: 14px; -webkit-font-smoothing: antialiased; }
button, select, input, textarea { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button, select { cursor: pointer; }
button { color: inherit; border: 0; }
a { color: inherit; text-decoration: none; }
button, a, select { transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease, box-shadow 160ms ease; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
button:disabled, select:disabled { cursor: default; opacity: .5; }
button:active:not(:disabled) { filter: brightness(.97); }
::selection { background: var(--accent); color: var(--accent-ink); }
[hidden] { display: none !important; }
.icon-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; clip: rect(0,0,0,0); overflow: hidden; white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: 12px; left: 12px; background: var(--accent); color: var(--accent-ink); padding: 12px 18px; border-radius: 8px; z-index: 10; transform: translateY(-180%); }
.skip-link:focus { transform: translateY(0); }
.sidebar { width: 234px; background: var(--surface); border-right: 1px solid var(--line); position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; padding: 33px 20px 0; z-index: 3; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 3px; font-size: 18px; font-weight: 750; letter-spacing: -.8px; }
.brand-mark { width: 35px; height: 35px; border-radius: 11px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; box-shadow: 0 0 22px var(--accent-glow), 0 4px 12px var(--shadow-color); }
.brand-mark .icon { width: 23px; height: 23px; stroke-width: 1.6; }
.brand-light { color: var(--accent); font-weight: 450; }
.brand small { display: block; color: var(--muted); font-size: 8px; font-weight: 550; letter-spacing: 1.15px; margin-top: 6px; }
.nav-label { color: var(--muted); font-size: 9px; letter-spacing: 1.15px; font-weight: 550; margin: 53px 14px 15px; }
.main-nav { display: grid; gap: 7px; }
.nav-item { background: transparent; display: flex; align-items: center; gap: 11px; padding: 14px 13px; width: 100%; border-radius: 9px; font-size: 12px; color: var(--muted); font-weight: 500; text-align: left; min-height: 46px; }
.nav-item .icon { width: 18px; height: 18px; }
.nav-item:hover { background: var(--surface-raised); color: var(--accent-strong); }
.nav-item.is-active { background: var(--accent-soft); color: var(--accent); font-weight: 600; box-shadow: inset 0 0 0 1px var(--accent-outline); }
.nav-active-dot { width: 5px; height: 5px; box-shadow: 0 0 9px var(--accent-halo); background: var(--accent); border-radius: 50%; margin-left: auto; }
.sidebar-note { margin: auto 6px 35px; padding: 24px 15px 22px; background: var(--surface-inset); border: 1px solid var(--line); border-radius: 13px; text-align: center; }
.letter-art { position: relative; height: 78px; width: 130px; margin: 1px auto 16px; }
.letter-art > span { width: 44px; height: 46px; position: absolute; display: grid; place-items: center; border: 1px solid var(--line-strong); border-bottom: 4px solid var(--line-strong); border-radius: 10px; background: var(--surface-raised); font-family: var(--mono); font-size: 26px; color: var(--accent); box-shadow: 0 4px 7px var(--shadow-soft); }
.letter-one { left: 6px; top: 20px; transform: rotate(-14deg); }
.letter-art > .letter-two { left: 45px; top: 5px; transform: rotate(7deg); background: var(--accent-soft); color: var(--accent); font-size: 22px; z-index: 1; }
.letter-three { left: 80px; top: 28px; transform: rotate(15deg); }
.art-spark { color: var(--accent); position: absolute; top: 0; left: 10px; width: 15px; height: 15px; }
.sidebar-note p { font-size: 12px; line-height: 1.9; margin: 0 0 8px; color: var(--muted); }
.sidebar-note strong { font-weight: 600; color: var(--soft-ink); }
.sidebar-note > span { font-size: 10px; line-height: 1.9; color: var(--muted); }
.sidebar-bottom { border-top: 1px solid var(--line); display: flex; align-items: center; gap: 9px; min-height: 65px; font-size: 9px; color: var(--muted); }
.small-brand-mark { font-family: var(--mono); font-size: 17px; color: var(--accent); letter-spacing: -4px; width: 25px; }
.small-brand-mark > span { color: var(--soft-ink); }
.sidebar-bottom-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); margin-left: auto; }
.workspace { margin-left: 234px; }
.topbar { height: 79px; border-bottom: 1px solid var(--line); background: var(--surface-inset); display: flex; align-items: center; justify-content: space-between; padding: 0 42px; gap: 20px; }
.breadcrumb { display: flex; align-items: center; gap: 15px; font-size: 11px; color: var(--muted); }
.breadcrumb > span:last-child { color: var(--soft-ink); font-weight: 500; }
.breadcrumb-slash { color: var(--line-strong); }
.topbar-actions { display: flex; align-items: center; gap: 20px; }
.theme-toggle { position: relative; isolation: isolate; width: 64px; min-width: 64px; height: 44px; padding: 0; background: transparent; border-radius: 22px; flex-shrink: 0; }
.theme-toggle::before { content: ''; position: absolute; inset: 4px 0; border: 1px solid var(--accent-border); border-radius: 18px; background: var(--surface-raised); transition: border-color 160ms ease, background-color 160ms ease; }
.theme-toggle:hover::before { border-color: var(--accent); }
.theme-toggle-thumb { position: absolute; top: 8px; left: 4px; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); box-shadow: 0 2px 8px var(--shadow-color), 0 0 12px var(--accent-glow); transition: transform 220ms cubic-bezier(.2,.8,.2,1), background-color 160ms ease, box-shadow 160ms ease; }
.theme-toggle[aria-checked="true"] .theme-toggle-thumb { transform: translateX(28px); }
.theme-toggle > .icon { position: absolute; top: 14px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; transition: color 160ms ease; }
.theme-toggle-sun { left: 10px; }
.theme-toggle-moon { right: 10px; }
.theme-toggle[aria-checked="false"] .theme-toggle-sun,
.theme-toggle[aria-checked="true"] .theme-toggle-moon { color: var(--accent-ink); }
.sound-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: 11px; background: transparent; padding: 9px 8px; min-height: 40px; border-radius: 8px; }
.sound-toggle:hover { background: var(--accent-soft); color: var(--accent-strong); }
.sound-toggle .icon { width: 16px; height: 16px; }
.sound-muted { display: none; }
.is-muted .sound-muted { display: block; }
.is-muted .sound-waves { display: none; }
.topbar-divider { width: 1px; height: 20px; background: var(--line); }
.workspace-label { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.status-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green); display: inline-block; flex-shrink: 0; }
.main-content { padding: 36px 42px 0; max-width: 1290px; margin: 0 auto; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.eyebrow { font-size: 10px; font-weight: 600; letter-spacing: 1.5px; color: var(--accent-strong); }
h1 { font-size: clamp(23px, 2.05vw, 31px); font-weight: 650; letter-spacing: -1.25px; line-height: 1.55; margin: 8px 0 6px; }
h1 > span { color: var(--accent); }
.page-heading p { color: var(--muted); font-size: 12px; margin: 0; line-height: 1.8; }
.practice-mode { display: flex; align-items: center; gap: 7px; border: 1px solid var(--accent-border); background: var(--accent-soft); padding: 9px 12px; color: var(--accent); font-size: 10px; white-space: nowrap; border-radius: 6px; margin-top: 19px; }
.practice-mode .icon { width: 13px; height: 13px; }
.metrics { display: grid; grid-template-columns: 1fr 1.1fr 1.1fr 1fr; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); padding: 22px 0; margin-bottom: 24px; box-shadow: var(--shadow-panel); }
.metric { padding: 0 24px; border-right: 1px solid var(--line); }
.metric:last-child { border-right: 0; }
.metric-label { color: var(--muted); font-size: 11px; display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.metric-label .icon { width: 15px; height: 15px; color: var(--muted); }
.metric-value { display: flex; align-items: baseline; gap: 9px; margin: 10px 0 7px; min-height: 32px; font-family: var(--mono); font-size: 29px; font-weight: 500; letter-spacing: -1.2px; line-height: 1.2; }
.metric:first-child .metric-value { color: var(--accent); text-shadow: 0 0 22px var(--accent-glow); }
.metric-unit { font-family: var(--sans); font-size: 10px; color: var(--muted); font-weight: 400; letter-spacing: .2px; }
.metric-check { display: grid; place-items: center; width: 15px; height: 15px; background: var(--success-soft); color: var(--green); border-radius: 50%; }
.metric-check .icon { width: 10px; height: 10px; stroke-width: 2.2; }
.metric-caption { font-size: 10px; color: var(--muted); }
.metric-layout .metric-value { font-size: 21px; letter-spacing: -.5px; align-items: center; }
.practice-card { border: 1px solid var(--line); background: radial-gradient(ellipse at 50% 0%, var(--panel-tint), transparent 70%), var(--surface); border-radius: 16px; box-shadow: var(--shadow-panel), 0 0 0 1px var(--panel-ring); overflow: hidden; scroll-margin-top: 24px; }
.practice-card:focus { outline: none; }
.practice-card:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.practice-toolbar { min-height: 69px; margin: 0 25px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); gap: 16px; }
.section-label { display: flex; align-items: center; gap: 9px; font-size: 10px; font-weight: 600; letter-spacing: 1px; color: var(--muted); white-space: nowrap; }
.accent-dot { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; }
.toolbar-divider { width: 1px; height: 12px; background: var(--line); margin: 0 4px; }
.language-caption { font-size: 11px; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.practice-actions { display: flex; align-items: center; gap: 10px; }
.language-control { position: relative; background: var(--surface-inset); border: 1px solid var(--line-strong); border-radius: 7px; display: flex; align-items: center; min-height: 35px; }
.language-control > .icon { position: absolute; left: 10px; width: 14px; height: 14px; color: var(--muted); pointer-events: none; }
.language-control > .select-chevron { left: auto; right: 8px; width: 13px; height: 13px; }
.language-control select option { color: var(--ink); background: var(--surface-raised); }
.language-control:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.language-control select { appearance: none; border: 0; background: transparent; color: var(--soft-ink); padding: 9px 29px 9px 32px; font-size: 12px; max-width: 190px; min-width: 130px; border-radius: 7px; }
.icon-button { background: transparent; color: var(--muted); width: 35px; min-width: 35px; height: 35px; display: grid; place-items: center; border-radius: 7px; }
.icon-button .icon { width: 17px; height: 17px; }
.icon-button:hover { background: var(--accent-soft); color: var(--accent); }
.word-stage { min-height: 279px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 25px 22px 19px; }
.session-status { display: inline-flex; align-items: center; gap: 6px; background: var(--success-soft); border: 1px solid var(--success-border); color: var(--green); border-radius: 5px; padding: 5px 8px; font-size: 10px; }
.session-status[data-state="loading"] { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-border); }
.session-status[data-state="loading"] .status-dot { background: var(--accent); }
.session-status[data-state="error"] { color: var(--warning); background: var(--warning-soft); border-color: var(--warning-border); }
.session-status[data-state="error"] .status-dot { background: var(--warning); }
.session-status .status-dot { width: 4px; height: 4px; }
.word-display { font-family: var(--mono); font-size: clamp(30px, 4.6vw, 62px); letter-spacing: 1px; font-weight: 500; line-height: 1.65; min-height: 94px; display: flex; justify-content: center; flex-wrap: wrap; max-width: 100%; padding: 11px 0 4px; user-select: none; }
.word-char { position: relative; display: inline-block; color: var(--pending); }
.word-char.is-current { color: var(--accent); text-shadow: 0 0 24px var(--accent-glow); }
.word-char.is-correct { color: var(--green); }
.word-char.is-error { color: var(--red); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 8px; }
.cursor-caret { position: absolute; bottom: 12px; left: 2px; right: 2px; height: 3px; border-radius: 3px; background: var(--accent); box-shadow: 0 0 12px var(--caret-halo); animation: caret-blink 1.2s step-end infinite; }
@keyframes caret-blink { 0%, 55%, 100% { opacity: 1; } 56%, 99% { opacity: 0; } }
.word-details { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 3px; }
.word-ipa { color: var(--muted); font-family: var(--mono); font-size: 12px; }
.word-type { color: var(--accent); background: var(--accent-soft); padding: 3px 6px; border-radius: 4px; font-size: 10px; }
.word-meaning { color: var(--soft-ink); font-size: 14px; margin: 10px 0 0; font-weight: 450; text-align: center; max-width: 65ch; line-height: 1.8; overflow-wrap: anywhere; }
.typing-instruction { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; margin-top: 25px; text-align: center; }
.typing-instruction .icon { width: 13px; height: 13px; }
.word-message { font-family: var(--sans); font-size: 18px; letter-spacing: -.3px; text-align: center; font-weight: 500; color: var(--soft-ink); line-height: 1.8; margin: 12px 0; }
.retry-button { color: var(--accent-strong); background: var(--accent-soft); border-radius: 7px; padding: 10px 14px; margin-top: 12px; font-size: 11px; display: flex; align-items: center; gap: 8px; }
.retry-button .icon { width: 14px; height: 14px; }
.practice-bottom { min-height: 53px; display: flex; align-items: center; justify-content: space-between; padding: 0 25px; border-top: 1px solid var(--line); }
.progress-label { color: var(--muted); font-size: 10px; }
.next-word { display: flex; align-items: center; gap: 8px; min-height: 40px; background: transparent; color: var(--muted); font-size: 11px; padding: 7px 0 7px 10px; border-radius: 5px; }
.next-word:hover { color: var(--accent); }
.next-word .icon { width: 13px; height: 13px; margin-left: 2px; }
kbd { font-family: var(--mono); font-size: 8px; color: var(--soft-ink); background: var(--surface-inset); border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 4px; padding: 3px 5px; white-space: nowrap; }
.progress-track { height: 3px; background: var(--accent-soft); }
.progress-track span { display: block; height: 100%; width: 0; background: var(--accent); box-shadow: 0 0 12px var(--accent-glow); border-radius: 0 3px 3px 0; transition: width 240ms ease; }
.keyboard-section { padding-top: 25px; scroll-margin-top: 20px; }
.keyboard-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 0 4px 18px; }
.keyboard-heading h2 { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 550; margin: 0 0 5px; color: var(--soft-ink); }
.keyboard-heading h2 .icon { width: 15px; height: 15px; color: var(--muted); }
.keyboard-heading p { margin: 0 0 0 23px; color: var(--muted); font-size: 10px; }
.keyboard-legend { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 9px; }
.keyboard-legend > span { display: flex; align-items: center; gap: 6px; }
.legend-key { height: 11px; width: 11px; border: 1px solid var(--accent-border); background: var(--accent-soft); border-radius: 3px; display: inline-block; }
.layout-name { font-family: var(--mono); font-size: 8px; letter-spacing: .5px; padding-left: 14px; border-left: 1px solid var(--line-strong); }
.keyboard-board { padding: 19px 28px; background: var(--surface-inset); border: 1px solid var(--line); border-bottom: 3px solid var(--keyboard-edge); border-radius: 13px; box-shadow: 0 5px 9px var(--shadow-color), inset 0 1px 0 var(--key-tint); }
.virtual-keyboard { display: flex; flex-direction: column; gap: 7px; max-width: 756px; margin: 0 auto; }
.keyboard-row { display: flex; justify-content: center; gap: 7px; }
.keyboard-key { flex: 1; max-width: 52px; min-width: 0; height: 43px; border: 1px solid var(--line-strong); border-bottom: 3px solid var(--key-edge); border-radius: 7px; background: var(--surface-raised); color: var(--muted); font-family: var(--mono); font-size: 13px; display: flex; align-items: center; justify-content: center; user-select: none; pointer-events: none; box-shadow: 0 2px 2px var(--shadow-key); transition: background-color 100ms ease, color 100ms ease, transform 100ms ease; }
.keyboard-key--space { width: 266px; max-width: 42%; flex: none; color: var(--muted); font-size: 9px; height: 36px; }
.keyboard-key.target-hint { background: var(--accent-soft); border-color: var(--accent); border-bottom-color: var(--accent-border); color: var(--accent); box-shadow: 0 0 16px var(--accent-glow), inset 0 0 12px var(--key-tint); }
.keyboard-key.physical-pressed { background: var(--accent); color: var(--accent-ink); border-color: var(--accent-strong); box-shadow: 0 0 22px var(--pressed-halo); transform: translateY(2px); }
.keyboard-footnote { display: flex; align-items: center; justify-content: space-between; margin: 12px 3px 0; gap: 12px; font-size: 9px; color: var(--muted); }
.keyboard-footnote > span { display: flex; align-items: center; gap: 5px; }
.connection-dot { width: 4px; height: 4px; background: var(--accent); border-radius: 50%; margin-right: 1px; }
.keyboard-footnote kbd { font-size: 7px; padding: 2px 4px; background: transparent; }
.footnote-dot { margin: 0 3px; }
.page-footer { border-top: 1px solid var(--line); margin-top: 26px; padding: 20px 0 22px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 15px; font-size: 10px; color: var(--muted); }
.data-credit { flex-basis: 100%; min-width: 0; font-size: 12px; line-height: 1.8; overflow-wrap: anywhere; }
.data-credit a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.data-credit a:hover { color: var(--accent-strong); }
.page-footer > span:last-child { display: flex; align-items: center; gap: 7px; }
.page-footer .icon { height: 11px; width: 11px; color: var(--accent); }
.help-dialog { width: min(500px, calc(100% - 32px)); background: var(--surface); border: 1px solid var(--line); color: var(--ink); border-radius: 20px; padding: 27px; box-shadow: 0 24px 100px var(--shadow-dialog); max-height: calc(100dvh - 40px); }
.help-dialog::backdrop { background: var(--backdrop); backdrop-filter: blur(4px); }
.dialog-heading { display: flex; justify-content: space-between; margin-bottom: 22px; }
.dialog-icon { display: grid; place-items: center; width: 44px; height: 44px; background: var(--accent-soft); color: var(--accent); border-radius: 12px; }
.help-dialog h2 { font-size: 24px; letter-spacing: -.8px; margin: 10px 0 12px; }
.help-dialog > p, .help-steps p { color: var(--muted); font-size: 12px; line-height: 1.9; margin: 0; }
.help-steps { list-style: none; padding: 0; margin: 26px 0; display: grid; gap: 20px; }
.help-steps li { display: flex; gap: 13px; }
.help-steps li > span { background: var(--accent-soft); color: var(--accent); width: 28px; height: 28px; flex-shrink: 0; display: grid; place-items: center; border-radius: 7px; font-family: var(--mono); font-size: 10px; }
.help-steps strong { font-size: 12px; font-weight: 550; display: block; margin: 2px 0 4px; }
.help-tip { padding: 12px; background: var(--surface-raised); border-radius: 8px; display: flex; gap: 8px; align-items: center; font-size: 10px !important; }
.help-tip .icon { color: var(--accent); width: 16px; height: 16px; }
.dictionary-filters { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 24px; }
.dictionary-field { display: grid; gap: 8px; min-width: 0; }
.dictionary-field label { font-size: 12px; font-weight: 550; color: var(--soft-ink); }
.dictionary-field label span { color: var(--muted); font-weight: 400; }
.dictionary-field input, .dictionary-field select, .dictionary-field textarea { width: 100%; min-height: 44px; padding: 11px 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface-inset); color: var(--ink); }
.dictionary-field input::placeholder, .dictionary-field textarea::placeholder { color: var(--muted); opacity: 1; }
.dictionary-field textarea { resize: vertical; line-height: 1.7; }
.dictionary-field select { min-width: 180px; }
.dictionary-search { flex: 1; }
.dictionary-button { min-height: 44px; padding: 10px 16px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface-raised); color: var(--soft-ink); font-size: 12px; font-weight: 550; }
.dictionary-button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.dictionary-button--primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.dictionary-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.dictionary-results, .dictionary-editor { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px; box-shadow: var(--shadow-panel); }
.dictionary-editor { position: sticky; top: 24px; }
.dictionary-list-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.dictionary-list-heading h2 { margin: 0; font-size: 15px; font-weight: 600; }
.dictionary-list-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 12px; }
.dictionary-list-heading > span { color: var(--muted); font-size: 12px; }
.dictionary-list-heading .dictionary-dirty { color: var(--warning); }
.dictionary-status { margin: 14px 0; font-size: 12px; color: var(--muted); line-height: 1.8; }
.dictionary-list { list-style: none; padding: 0; margin: 16px 0; max-height: 580px; overflow-y: auto; scrollbar-gutter: stable; }
.dictionary-list li + li { border-top: 1px solid var(--line); }
.dictionary-entry { display: grid; gap: 6px; width: 100%; padding: 13px 12px; background: transparent; text-align: left; border: 1px solid transparent; border-radius: 8px; overflow-wrap: anywhere; }
.dictionary-entry strong { font-weight: 550; font-size: 14px; }
.dictionary-entry > span { color: var(--muted); font-size: 12px; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dictionary-entry:hover:not(:disabled) { background: var(--surface-raised); }
.dictionary-entry[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent-border); color: var(--accent); }
.dictionary-entry:focus-visible { outline-offset: -3px; }
.dictionary-pagination { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); padding-top: 16px; }
.dictionary-pagination > span { font-size: 11px; color: var(--muted); text-align: center; overflow-wrap: anywhere; }
#dictionaryEditForm { display: grid; gap: 18px; margin-top: 24px; }
.dictionary-hint { font-size: 11px; color: var(--muted); line-height: 1.8; margin: 0; }
.dictionary-save-status { font-size: 12px; line-height: 1.8; margin: 0; min-height: 22px; }
.dictionary-save-status[data-state="success"] { color: var(--green); }
.dictionary-save-status[data-state="error"] { color: var(--red); }
.dictionary-form-actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 1100px) {
  .dictionary-grid { gap: 16px; }
  .dictionary-results, .dictionary-editor { padding: 18px; }
}
@media (max-width: 700px) {
  .dictionary-grid { grid-template-columns: minmax(0, 1fr); }
  .dictionary-editor { position: static; }
  .dictionary-filters { flex-wrap: wrap; gap: 12px; }
  .dictionary-filters > .dictionary-field:first-child { width: 100%; }
  .dictionary-search { min-width: 0; }
  .dictionary-field input, .dictionary-field textarea, .dictionary-field select { font-size: 16px; }
  .dictionary-list { max-height: 320px; }
  .main-nav #practiceTab { display: flex; }
}
@media (min-width: 1600px) {
  .main-content { padding-top: 46px; } .page-heading { margin-bottom: 34px; } .word-stage { min-height: 325px; } .keyboard-key { height: 49px; } .keyboard-key--space { height: 39px; } .keyboard-board { padding: 24px; }
}
@media (max-width: 1180px) {
  .sidebar { width: 210px; padding-left: 14px; padding-right: 14px; } .workspace { margin-left: 210px; } .topbar { padding: 0 28px; } .main-content { padding: 30px 28px 0; } .metric { padding: 0 17px; } .metric-label { font-size: 9px; } .metric-caption { font-size: 8px; } .practice-mode { display: none; } .keyboard-key { max-width: 46px; } .word-display { font-size: 50px; }
}
@media (max-width: 980px) {
  .sidebar { width: 76px; padding: 29px 12px 0; align-items: center; } .brand { padding: 0; } .brand > span:last-child, .nav-label, .nav-item > span, .sidebar-note, .sidebar-bottom { display: none; } .main-nav { width: 100%; margin-top: 49px; gap: 14px; } .nav-item { padding: 13px; justify-content: center; border-radius: 10px; } .nav-item .icon { width: 21px; height: 21px; } .workspace { margin-left: 76px; } .topbar { height: 76px; } h1 { font-size: 27px; } .word-display { font-size: 52px; }
}
@media (max-width: 700px) {
  .sidebar { width: 100%; position: relative; inset: auto; padding: 15px 20px; height: 68px; flex-direction: row; justify-content: space-between; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand > span:last-child { display: block; font-size: 16px; } .brand small { display: none; } .brand-mark { width: 33px; height: 33px; border-radius: 10px; }
  .main-nav { margin: 0; display: flex; gap: 5px; width: auto; } .nav-item { min-height: 37px; width: 37px; padding: 8px; } .nav-item .icon { height: 18px; width: 18px; } .nav-item:first-child { display: none; }
  .workspace { margin: 0; } .topbar { height: 54px; padding: 0 21px; } .breadcrumb { font-size: 9px; gap: 10px; } .topbar-actions { gap: 8px; } .topbar-divider, .workspace-label { display: none; } .sound-toggle { font-size: 9px; padding: 7px 0 7px 7px; } .sound-toggle .icon { width: 14px; height: 14px; }
  .main-content { padding: 27px 20px 0; } .page-heading { margin-bottom: 22px; } .eyebrow { font-size: 8px; letter-spacing: 1px; } h1 { font-size: 25px; line-height: 1.55; letter-spacing: -.9px; margin-top: 9px; } .page-heading p { font-size: 10px; line-height: 1.9; max-width: 280px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0; margin-bottom: 20px; } .metric { padding: 17px 19px; } .metric:nth-child(2) { border-right: 0; } .metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); } .metric-label { font-size: 10px; } .metric-value { font-size: 27px; margin: 11px 0 6px; } .metric-caption { font-size: 8px; } .metric-layout .metric-value { font-size: 21px; }
  .practice-toolbar { margin: 0 16px; min-height: 65px; gap: 8px; } .section-label { font-size: 8px; gap: 6px; letter-spacing: .7px; } .toolbar-divider, .language-caption { display: none; } .practice-actions { gap: 3px; } .language-control select { font-size: 11px; min-width: 112px; padding-left: 27px; padding-right: 25px; max-width: 154px; min-height: 39px; } .language-control > .icon { left: 8px; width: 13px; height: 13px; } .language-control > .select-chevron { left: auto; right: 7px; } .icon-button { min-width: 32px; width: 32px; height: 39px; }
  .word-stage { min-height: 284px; padding: 25px 15px; } .word-display { font-size: clamp(25px, 6.7vw, 43px); min-height: 80px; letter-spacing: 0; line-height: 1.85; padding-top: 12px; } .cursor-caret { bottom: 9px; height: 2px; } .session-status { font-size: 9px; } .word-ipa { font-size: 11px; } .word-meaning { font-size: 15px; max-width: 100%; overflow-wrap: anywhere; } .typing-instruction { font-size: 9px; margin-top: 28px; } .practice-bottom { padding: 0 16px; min-height: 57px; } .progress-label, .next-word { font-size: 9px; } .next-word { min-height: 44px; gap: 6px; } .next-word kbd { display: none; }
  .keyboard-section { padding-top: 26px; } .keyboard-heading { margin: 0 1px 15px; gap: 8px; } .keyboard-heading h2 { font-size: 10px; gap: 5px; } .keyboard-heading p { font-size: 8px; margin-left: 20px; } .keyboard-legend { gap: 7px; font-size: 7px; } .layout-name { display: none !important; } .keyboard-board { padding: 14px 9px; border-radius: 10px; } .virtual-keyboard, .keyboard-row { gap: 4px; } .keyboard-key { height: 34px; font-size: 10px; border-radius: 5px; border-bottom-width: 2px; max-width: 38px; } .keyboard-key--space { height: 29px; font-size: 8px; }
  .keyboard-footnote { font-size: 7px; gap: 10px; align-items: flex-start; line-height: 1.9; } .keyboard-footnote > span:last-child { flex-wrap: wrap; justify-content: flex-end; gap: 3px; max-width: 155px; } .keyboard-footnote kbd { font-size: 7px; padding: 2px 4px; background: transparent; } .page-footer { margin-top: 23px; padding: 17px 0 20px; font-size: 7px; gap: 10px; line-height: 1.8; } .page-footer > span { max-width: 48%; } .page-footer > span:last-child { text-align: right; } .word-message { font-size: 15px; }
}
@media (max-width: 380px) {
  .brand > span:last-child { display: none; }
  .sidebar { padding-left: 16px; padding-right: 16px; } .main-content { padding-left: 14px; padding-right: 14px; } .topbar { padding-left: 16px; padding-right: 16px; } h1 { font-size: 22px; } .metric { padding-left: 15px; padding-right: 15px; } .keyboard-legend { font-size: 6px; } .keyboard-key { font-size: 9px; }
}
@media (max-width: 700px) {
  .nav-item { width: 44px; min-height: 44px; }
  .sound-toggle { font-size: 11px; min-height: 44px; }
  .eyebrow { font-size: 9px; }
  .page-heading p { font-size: 12px; max-width: 100%; }
  .metric-label { font-size: 11px; }
  .metric-caption { font-size: 9px; }
  .section-label { font-size: 9px; letter-spacing: .5px; }
  .language-control select { font-size: 16px; min-width: 128px; min-height: 44px; max-width: 164px; }
  .practice-toolbar { flex-wrap: wrap; padding: 12px 0; row-gap: 10px; }
  .practice-actions { margin-left: auto; }
  .icon-button { width: 36px; min-width: 36px; min-height: 44px; }
  .typing-instruction { font-size: 10px; }
  .progress-label, .next-word { font-size: 11px; }
  .keyboard-heading h2 { font-size: 11px; }
  .keyboard-heading p { font-size: 9px; }
  .keyboard-legend { font-size: 8px; }
  .keyboard-key { color: var(--muted); }
  .keyboard-footnote { font-size: 9px; flex-wrap: wrap; }
  .keyboard-footnote > span:last-child { max-width: none; }
  .page-footer { font-size: 9px; align-items: flex-start; }
}
@media (max-width: 480px) {
  .breadcrumb > span:first-child, .breadcrumb-slash { display: none; }
  .topbar-actions { gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; }
}
