:root {
    --bg: #f5f7fa;
    --surface: #ffffff;
    --surface2: #f0f3f9;
    --surface3: #e4e9f2;
    --border: #d8dde8;
    --border-hover: #a8b0c4;
    --text: #1a1f2e;
    --text2: #5a6378;
    --text3: #9aa3b8;
    --accent: #5248e0;
    --accent-hover: #3f36c7;
    --accent-glow: rgba(82, 72, 224, 0.10);
    --accent2: #00a383;
    --accent2-glow: rgba(0, 163, 131, 0.10);
    --red: #e63955;
    --orange: #e8890b;
    --h1-start: #1a1f2e;
    --badge-google-bg: #e3f0ff; --badge-google-fg: #1565c0;
    --badge-se-bg:     #fff1e0; --badge-se-fg:     #c26a00;
    --badge-local-bg:  #e3f7ef; --badge-local-fg:  #00815e;
    --badge-cloud-bg:  #ede8ff; --badge-cloud-fg:  #5248e0;
    --status-info-bg:    #e3f0ff; --status-info-fg:    #1565c0;
    --status-error-bg:   #fde7ec; --status-error-fg:   #c62139;
    --status-success-bg: #e3f7ef; --status-success-fg: #00815e;
    --font: 'DM Sans', sans-serif;
    --mono: 'JetBrains Mono', monospace;
    --radius: 12px;
}
[data-theme="dark"] {
    --bg: #0a0e1a;
    --surface: #131829;
    --surface2: #1a2035;
    --surface3: #212945;
    --border: #2a3358;
    --border-hover: #3d4a7a;
    --text: #e0e4f0;
    --text2: #8892b0;
    --text3: #505a78;
    --accent: #645bff;
    --accent-hover: #5248e0;
    --accent-glow: rgba(100, 91, 255, 0.15);
    --accent2: #00d4aa;
    --accent2-glow: rgba(0, 212, 170, 0.12);
    --red: #ff4d6a;
    --orange: #ff9f43;
    --h1-start: #ffffff;
    --badge-google-bg: #1a2d4a; --badge-google-fg: #5bb8ff;
    --badge-se-bg:     #3a1f0e; --badge-se-fg:     #ff9f43;
    --badge-local-bg:  #142e26; --badge-local-fg:  #5bffbb;
    --badge-cloud-bg:  #2a1a45; --badge-cloud-fg:  #b088ff;
    --status-info-bg:    #0d1f35; --status-info-fg:    #5bb8ff;
    --status-error-bg:   #2a0f14; --status-error-fg:   #ff8a9b;
    --status-success-bg: #0d2a1f; --status-success-fg: #5bffbb;
}
body { transition: background-color 0.2s, color 0.2s; }

/* ── Top navigation bar ── */
.topnav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: color-mix(in srgb, var(--bg) 85%, transparent);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border);
}
.topnav-inner {
    max-width: 1040px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
}
.topnav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    font-size: 16px;
    letter-spacing: -0.2px;
}
.topnav-logo img { width: 28px; height: 28px; display: block; }
.topnav-menu {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}
.topnav-menu a {
    padding: 8px 14px;
    border-radius: 8px;
    color: var(--text2);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s;
}
.topnav-menu a:hover { color: var(--text); background: var(--surface2); }
.topnav-menu a.active { color: var(--accent); background: var(--accent-glow); }
.topnav-lang {
    position: relative;
    font-size: 13px;
    font-weight: 600;
}
.topnav-lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: var(--font);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.topnav-lang-btn:hover { border-color: var(--accent); color: var(--accent); }
.topnav-lang-btn::after {
    content: '';
    width: 0; height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    margin-left: 2px;
    transition: transform 0.2s;
}
.topnav-lang.open .topnav-lang-btn::after { transform: rotate(180deg); }
.topnav-lang-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 140px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 6px;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.12);
    display: none;
    z-index: 200;
}
.topnav-lang.open .topnav-lang-menu { display: block; }
.topnav-lang-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    color: var(--text2);
    text-decoration: none;
    font-size: 13px;
    transition: all 0.15s;
}
.topnav-lang-menu a:hover { background: var(--surface2); color: var(--text); }
.topnav-lang-menu a.active { color: var(--accent); background: var(--accent-glow); }
.topnav-lang-menu a .check { margin-left: auto; opacity: 0; }
.topnav-lang-menu a.active .check { opacity: 1; }
.theme-toggle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--surface2);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 720px) {
    .topnav-inner { padding: 12px 16px; gap: 10px; }
    .topnav-menu { display: none; }
}

/* ── FAQ ── */
.faq {
    max-width: 720px;
    margin: 0 auto 60px;
    padding: 0 20px;
}
.faq h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
    text-align: center;
}
.faq-sub {
    text-align: center;
    color: var(--text2);
    font-size: 14px;
    margin-bottom: 24px;
}
.faq-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 8px;
    overflow: hidden;
    transition: border-color 0.2s;
}
.faq-item:hover { border-color: var(--border-hover); }
.faq-item[open] { border-color: var(--accent); }
.faq-item summary {
    padding: 16px 20px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: '+';
    font-size: 20px;
    font-weight: 400;
    color: var(--text3);
    flex-shrink: 0;
    transition: transform 0.2s;
}
.faq-item[open] summary::after {
    content: '−';
    color: var(--accent);
}
.faq-item .faq-answer {
    padding: 0 20px 18px;
    font-size: 14px;
    color: var(--text2);
    line-height: 1.65;
}

/* ── Static pages ── */
.page {
    max-width: 720px;
    margin: 48px auto 40px;
    padding: 0 20px;
}
.page .panel { display: block; border-radius: var(--radius); }
.page h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    margin-top: 24px;
    margin-bottom: 8px;
}
.page h2:first-child { margin-top: 0; }
.page p, .page li {
    font-size: 15px;
    color: var(--text2);
    line-height: 1.7;
    margin-bottom: 12px;
}
.page ul { padding-left: 20px; margin-bottom: 12px; }
.page a { color: var(--accent); text-decoration: none; }
.page a:hover { text-decoration: underline; }
.page .muted { font-size: 12px; color: var(--text3); margin-top: 20px; }

/* ── Footer ── */
.site-footer {
    max-width: 1040px;
    margin: 60px auto 0;
    padding: 48px 24px 32px;
    border-top: 1px solid var(--border);
    color: var(--text3);
    font-size: 13px;
}
.site-footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    margin-bottom: 32px;
}
@media (min-width: 520px) {
    .site-footer-grid { grid-template-columns: repeat(2, 1fr); gap: 36px; }
}
@media (min-width: 820px) {
    .site-footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; }
}
.site-footer-brand {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.site-footer-brand .brand-row {
    display: flex; align-items: center; gap: 10px;
    font-weight: 700;
    color: var(--text);
    font-size: 15px;
}
.site-footer-brand .brand-row img { width: 24px; height: 24px; }
.site-footer-brand p {
    font-size: 13px;
    color: var(--text2);
    line-height: 1.6;
    max-width: 280px;
}
.site-footer-col h4 {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text3);
    margin-bottom: 14px;
}
.site-footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.site-footer-col a {
    color: var(--text2);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.15s;
}
.site-footer-col a:hover { color: var(--accent); }
.site-footer-col a.active { color: var(--accent); font-weight: 600; }
.site-footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 20px;
    text-align: center;
    color: var(--text3);
    font-size: 12px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}
/* ── Hero ── */
.hero {
    position: relative;
    text-align: center;
    padding: 72px 20px 40px;
    max-width: 820px;
    margin: 0 auto;
}
.hero::before {
    content: '';
    position: absolute;
    top: 30px; left: 50%;
    width: 560px; height: 560px;
    max-width: 90vw; max-height: 60vh;
    transform: translateX(-50%);
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}
.hero .eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-glow);
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 20px;
}
.hero h1 {
    font-size: 48px;
    line-height: 1.1;
    font-weight: 700;
    background: linear-gradient(135deg, var(--h1-start) 0%, var(--accent) 55%, var(--accent2) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 16px;
    letter-spacing: -1px;
}
.hero p.tagline {
    color: var(--text2);
    font-size: 17px;
    max-width: 560px;
    margin: 0 auto 28px;
    line-height: 1.6;
}
.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: var(--accent);
    color: #fff;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 6px 24px var(--accent-glow);
    transition: all 0.2s;
}
.hero-cta:hover { background: var(--accent-hover); transform: translateY(-1px); }
.hero-meta {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 24px;
    font-size: 13px;
    color: var(--text3);
    flex-wrap: wrap;
}
.hero-meta span::before { content: '✓ '; color: var(--accent2); font-weight: 700; }

/* ── Features grid ── */
.features {
    max-width: 900px;
    margin: 40px auto 0;
    padding: 0 20px;
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.feature {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 22px;
    transition: all 0.2s;
}
.feature:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}
.feature-icon {
    font-size: 24px;
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    background: var(--accent-glow);
    border-radius: 10px;
    margin-bottom: 14px;
}
.feature h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}
.feature p {
    font-size: 13px;
    color: var(--text2);
    line-height: 1.55;
}

/* ── Header (legacy — used on static pages) ── */
.header {
    text-align: center;
    padding: 56px 20px 0;
}
.header h1 {
    font-size: 36px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--h1-start) 0%, var(--accent) 50%, var(--accent2) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}
.header p { color: var(--text2); font-size: 15px; max-width: 500px; margin: 0 auto; }

/* ── Section heading (above app) ── */
.section-label {
    max-width: 720px;
    margin: 56px auto 16px;
    padding: 0 20px;
    text-align: center;
}
.section-label h2 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text3);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* ── Tabs ── */
.tabs {
    display: flex;
    justify-content: center;
    gap: 4px;
    padding: 24px 20px 0;
    max-width: 900px;
    margin: 0 auto;
}
.tab {
    padding: 10px 20px;
    border: none;
    background: transparent;
    color: var(--text3);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 10px 10px 0 0;
    transition: all 0.2s;
    position: relative;
}
.tab:hover { color: var(--text2); }
.tab.active {
    color: var(--text);
    background: var(--surface);
}
.tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
}
.tab-icon { margin-right: 6px; }

/* ── Main container ── */
.main {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px 40px;
}
.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0 0 var(--radius) var(--radius);
    padding: 28px;
    display: none;
}
.panel.active { display: block; }

/* ── Form elements ── */
textarea,
input[type="text"],
input[type="email"],
input[type="url"],
input[type="tel"],
input[type="number"],
input[type="password"],
input[type="search"] {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    padding: 14px;
    font-size: 15px;
    font-family: var(--font);
    outline: none;
    transition: border-color 0.2s;
}
textarea { height: 120px; resize: vertical; }
textarea:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
input[type="search"]:focus { border-color: var(--accent); }
textarea::placeholder,
input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="url"]::placeholder,
input[type="tel"]::placeholder,
input[type="number"]::placeholder,
input[type="password"]::placeholder,
input[type="search"]::placeholder { color: var(--text3); }

label.field-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--text3);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 6px;
}

/* ── Buttons ── */
.btn {
    padding: 11px 22px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:disabled { background: var(--surface3); color: var(--text3); cursor: not-allowed; }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { opacity: 0.9; }
.btn-pause { background: var(--orange); color: #fff; }
.btn-pause:hover { opacity: 0.9; }
.btn-ghost {
    background: var(--surface2);
    border: 1px solid var(--border);
    color: var(--text2);
}
.btn-ghost:hover { border-color: var(--border-hover); color: var(--text); }
.btn-sm { padding: 7px 14px; font-size: 13px; }

/* ── Voice grid ── */
.voice-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    max-height: 250px;
    overflow-y: auto;
    padding-right: 4px;
}
.voice-grid::-webkit-scrollbar { width: 4px; }
.voice-grid::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.voice-section-label {
    grid-column: 1 / -1;
    font-size: 10px; font-weight: 700;
    color: var(--text3);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 10px 4px 4px;
}
.voice-card {
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 10px;
    padding: 9px 10px;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    gap: 8px;
}
.voice-card:hover { border-color: var(--border-hover); }
.voice-card.selected { border-color: var(--accent); background: var(--accent-glow); }
.voice-flag { font-size: 20px; flex-shrink: 0; }
.voice-info { flex: 1; min-width: 0; }
.voice-name {
    font-size: 12px; font-weight: 600; color: var(--text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.voice-detail {
    font-size: 10px; color: var(--text3);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.voice-badge {
    font-size: 8px; font-weight: 700; padding: 2px 5px;
    border-radius: 4px; text-transform: uppercase; flex-shrink: 0;
}
.badge-google { background: var(--badge-google-bg); color: var(--badge-google-fg); }
.badge-se     { background: var(--badge-se-bg);     color: var(--badge-se-fg); }
.badge-local  { background: var(--badge-local-bg);  color: var(--badge-local-fg); }
.badge-cloud  { background: var(--badge-cloud-bg);  color: var(--badge-cloud-fg); }
.voice-play-btn {
    background: var(--surface3); border: none; color: var(--text3);
    width: 24px; height: 24px; border-radius: 50%;
    cursor: pointer; font-size: 10px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.15s; flex-shrink: 0;
}
.voice-play-btn:hover { background: var(--accent); color: #fff; }

/* Locked voice grid during playback — prevents switching voices mid-speech */
.voice-grid.locked .voice-card:not(.selected) { opacity: 0.5; }
.voice-grid.locked .voice-card { cursor: not-allowed; }
.voice-grid.locked .voice-card:hover { border-color: var(--border); }
.voice-grid.locked .voice-card.selected:hover { border-color: var(--accent); }
.voice-grid.locked .voice-play-btn { opacity: 0.4; cursor: not-allowed; }
.voice-grid.locked .voice-play-btn:hover { background: var(--surface3); color: var(--text3); }

/* ── Range ── */
.range-row { display: flex; align-items: center; gap: 10px; }
input[type="range"] {
    -webkit-appearance: none; border: none; padding: 0;
    height: 5px; border-radius: 3px;
    background: var(--surface3); flex: 1; outline: none;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px; height: 16px; border-radius: 50%;
    background: var(--accent); cursor: pointer; border: 2px solid var(--surface);
}
.range-val {
    font-size: 12px; color: var(--text2); font-weight: 600;
    min-width: 32px; text-align: center; font-family: var(--mono);
}
input[type="range"]:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
input[type="range"]:disabled::-webkit-slider-thumb {
    background: var(--text3);
    cursor: not-allowed;
}

/* ── Karaoke ── */
.karaoke-text {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
    font-size: 18px;
    line-height: 1.8;
    min-height: 80px;
    margin-top: 12px;
}
.karaoke-text .word {
    display: inline;
    padding: 2px 4px;
    border-radius: 4px;
    transition: all 0.12s;
    cursor: pointer;
}
.karaoke-text .word:hover { background: var(--surface3); }
.karaoke-text .word.active {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 0 20px var(--accent-glow);
}

/* ── Pronunciation Card ── */
.pron-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-top: 16px;
}
.pron-word {
    font-size: 32px;
    font-weight: 700;
    color: var(--text);
}
.pron-ipa {
    font-family: var(--mono);
    font-size: 20px;
    color: var(--accent);
    margin-top: 4px;
}
.pron-syllables {
    font-size: 14px;
    color: var(--text2);
    margin-top: 4px;
}
.pron-pos {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    background: var(--surface3);
    color: var(--accent2);
    margin-top: 10px;
}
.pron-def {
    font-size: 14px;
    color: var(--text2);
    margin-top: 10px;
    line-height: 1.6;
}
.pron-audio-row {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    flex-wrap: wrap;
}

/* ── Dictionary ── */
.dict-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
}
.dict-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px;
    cursor: pointer;
    transition: all 0.15s;
}
.dict-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.dict-word { font-size: 16px; font-weight: 700; color: var(--text); }
.dict-ipa { font-family: var(--mono); font-size: 12px; color: var(--accent); margin-top: 2px; }
.dict-common { font-size: 11px; color: var(--red); margin-top: 4px; }
.dict-play-btn {
    margin-top: 8px;
    background: var(--surface3); border: none; color: var(--text2);
    padding: 5px 12px; border-radius: 6px;
    font-size: 12px; cursor: pointer; font-family: var(--font);
    transition: all 0.15s;
}
.dict-play-btn:hover { background: var(--accent); color: #fff; }

/* ── History ── */
.history-list { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.history-item {
    display: flex; align-items: center; gap: 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    color: var(--text2);
}
.history-text { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.history-item .btn-sm { flex-shrink: 0; }

/* ── Share ── */
.share-box {
    display: flex; gap: 8px; margin-top: 12px;
}
.share-box input {
    flex: 1; font-size: 13px; font-family: var(--mono);
    padding: 10px 12px;
}

/* ── Status ── */
.status {
    margin-top: 12px; padding: 10px 14px;
    border-radius: 8px; font-size: 13px; display: none;
}
.status.info    { display: block; background: var(--status-info-bg);    color: var(--status-info-fg); }
.status.error   { display: block; background: var(--status-error-bg);   color: var(--status-error-fg); }
.status.success { display: block; background: var(--status-success-bg); color: var(--status-success-fg); }

.row { display: flex; gap: 10px; align-items: flex-start; }
.gap-16 { margin-top: 16px; }
.gap-12 { margin-top: 12px; }
.flex-1 { flex: 1; }
.checkbox-row {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; color: var(--text2); margin-top: 12px;
}
.checkbox-row input[type="checkbox"] { accent-color: var(--accent); }

.empty-state {
    text-align: center;
    padding: 30px;
    color: var(--text3);
    font-size: 14px;
}

/* ── Utility classes (replace former inline styles) ── */
.speak-meta-row { display: flex; justify-content: space-between; margin-top: 4px; }
.checkbox-row--flush { margin-top: 0; }
.char-count-hint { font-size: 11px; color: var(--text3); }
.voice-grid-loading { color: var(--text3); font-size: 13px; padding: 12px; grid-column: 1 / -1; }
.row--spread { justify-content: space-between; align-items: center; }
.label--flush { margin: 0; }
.dict-hint { font-size: 14px; color: var(--text2); margin-bottom: 16px; }
.pron-input { flex: 1; }
.status--inline { display: block; margin-bottom: 16px; }
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0);
    white-space: nowrap; border: 0;
}

@media (max-width: 820px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
    .hero { padding: 56px 20px 32px; }
    .hero h1 { font-size: 32px; letter-spacing: -0.5px; }
    .hero p.tagline { font-size: 15px; }
    .hero-cta { padding: 12px 22px; font-size: 14px; }
    .features-grid { grid-template-columns: 1fr; }
    .header h1 { font-size: 24px; }
    .header { padding: 40px 20px 0; }
    .tabs { gap: 0; }
    .tab { padding: 8px 12px; font-size: 12px; }
    .tab-icon { display: none; }
    .panel { padding: 20px 16px; }
    .voice-grid { grid-template-columns: 1fr; }
    .dict-grid { grid-template-columns: 1fr 1fr; }
}
