:root {
    color-scheme: light;
    --bg: #f0f4f8;
    --text: #1a202c;
    --muted: #64748b;
    --line: #e2e8f0;
    --panel: #ffffff;
    --primary: #0ea5e9;
    --primary-dark: #0284c7;
    --primary-light: #e0f2fe;
    --success: #10b981;
    --success-light: #d1fae5;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --radius-sm: 8px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Verdana, Arial, sans-serif;
    line-height: 1.6;
}

.topbar {
    align-items: center;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    gap: 16px;
    min-height: 64px;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar-actions {
    align-items: center;
    display: flex;
    gap: 12px;
    margin-left: auto;
}

.nav-toggle {
    align-items: center;
    background: var(--panel);
    border: 2px solid var(--line);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: none;
    height: 40px;
    justify-content: center;
    min-height: 40px;
    padding: 0;
    width: 40px;
}

.nav-toggle-icon {
    display: grid;
    gap: 5px;
    width: 18px;
}

.nav-toggle-bar {
    background: var(--text);
    border-radius: 2px;
    display: block;
    height: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
    width: 100%;
}

.topbar.is-menu-open .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.topbar.is-menu-open .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}

.topbar.is-menu-open .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.lang-switcher select {
    background: var(--panel);
    border: 2px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 11px;
    font-weight: 600;
    min-height: 36px;
    padding: 6px 10px;
}

.lang-switcher select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
    outline: none;
}

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

.brand {
    color: var(--primary);
    font-size: 17px;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.nav {
    align-items: center;
    display: flex;
    gap: 8px;
}

.nav span {
    color: var(--muted);
    font-size: 11px;
    padding-right: 8px;
    border-right: 1px solid var(--line);
    margin-right: 8px;
}

.nav a {
    color: var(--text);
    font-weight: 500;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    font-size: 11px;
}

.nav a:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-trigger {
    background: none;
    border: 0;
    color: var(--text);
    cursor: pointer;
    font: inherit;
    font-size: 11px;
    font-weight: 500;
    min-height: auto;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-trigger,
.nav-dropdown.is-open .nav-dropdown-trigger {
    background: var(--primary-light);
    color: var(--primary);
}

.nav-dropdown-menu {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    display: none;
    left: 0;
    min-width: 140px;
    padding: 4px;
    position: absolute;
    top: 100%;
    z-index: 200;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.is-open .nav-dropdown-menu {
    display: block;
}

.nav-dropdown-menu a {
    border-radius: var(--radius-sm);
    display: block;
    white-space: nowrap;
}

.button {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.page {
    margin: 0 auto;
    max-width: 1120px;
    padding: 32px 20px 48px;
}

.auth-panel,
.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin: 40px auto 0;
    max-width: 520px;
    padding: 32px;
}

h1 {
    font-size: 29px;
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 8px;
    letter-spacing: -0.5px;
}

p {
    color: var(--muted);
    line-height: 1.6;
    margin: 0 0 24px;
}

.form {
    display: grid;
    gap: 20px;
}

label {
    display: grid;
    font-weight: 600;
    font-size: 11px;
    gap: 8px;
    color: var(--text);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    min-height: auto;
    width: 18px;
    height: 18px;
    margin: 0;
    padding: 0;
    cursor: pointer;
}

input,
select,
button {
    border-radius: var(--radius-sm);
    font: inherit;
    min-height: 44px;
    transition: all 0.2s ease;
}

input,
select {
    background: var(--panel);
    border: 2px solid var(--line);
    color: var(--text);
    padding: 10px 14px;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

button,
.button.secondary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: 0;
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    padding: 12px 20px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

button:hover,
.button.secondary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

button:active,
.button.secondary:active {
    transform: translateY(0);
}

.alert {
    background: var(--danger-light);
    border: 1px solid #fca5a5;
    border-radius: var(--radius-sm);
    color: var(--danger);
    margin-bottom: 20px;
    padding: 14px 16px;
    font-weight: 500;
}

.guest-notice {
    background: var(--primary-light);
    border: 1px solid #7dd3fc;
    border-radius: var(--radius-sm);
    color: #0369a1;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 24px;
    padding: 14px 40px 14px 16px;
    position: relative;
}

.guest-notice-text {
    padding-right: 4px;
}

.guest-notice-dismiss {
    background: transparent;
    border: 0;
    box-shadow: none;
    color: #0369a1;
    cursor: pointer;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    min-height: auto;
    padding: 2px 6px;
    position: absolute;
    right: 10px;
    top: 10px;
}

.guest-notice-dismiss:hover {
    color: var(--primary-dark);
    transform: none;
}

.guest-notice a,
.guest-notice-inline a {
    color: var(--primary-dark);
    font-weight: 600;
    text-decoration: underline;
}

.guest-notice-inline {
    color: var(--muted);
    font-size: 14px;
    margin-top: -12px;
}

.guest-profile-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
    padding: 16px;
}

.guest-profile-fields {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.guest-profile-fields label {
    display: flex;
    flex-direction: column;
    font-size: 14px;
    font-weight: 600;
    gap: 8px;
}

.guest-profile-fields select {
    font-weight: 500;
    width: 100%;
}

@media (max-width: 900px) {
    .guest-profile-fields {
        grid-template-columns: 1fr;
    }
}

.hero,
.toolbar {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
}

.hero {
    margin-bottom: 28px;
}

.dashboard-hero {
    align-items: flex-start;
}

.guest-language-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35em 0.75em;
}

.guest-preferences-link {
    color: var(--primary-dark);
    font-size: 14px;
    font-weight: 600;
    text-decoration: underline;
    white-space: nowrap;
}

.guest-preferences-link:hover {
    color: var(--primary);
}

.hero-actions,
.inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.dashboard-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 20px;
}

.metric {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    display: grid;
    gap: 8px;
    padding: 20px;
    transition: all 0.2s ease;
}

.metric:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.metric span,
.metric small,
.list-row small,
.recent-row small {
    color: var(--muted);
}

.metric span {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric strong {
    font-size: 33px;
    line-height: 1;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.metric small {
    line-height: 1.4;
    font-size: 10px;
}

.dashboard-columns {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 20px;
}

.wide-panel {
    margin: 0 0 20px;
    max-width: none;
}

.dashboard-panel {
    margin: 0;
    max-width: none;
}

.dashboard-panel h2,
.wide-panel h2 {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 16px;
    color: var(--text);
}

.compact-list,
.recent-list {
    display: grid;
    gap: 10px;
}

.list-row,
.recent-row,
a.list-row {
    align-items: center;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    display: grid;
    gap: 10px;
    padding: 12px 14px;
    transition: all 0.2s ease;
}

.list-row:hover,
.recent-row:hover,
a.list-row:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

a.list-row {
    color: inherit;
    text-decoration: none;
}

.list-row {
    grid-template-columns: 1fr auto auto;
}

.recent-row {
    grid-template-columns: auto 1fr auto;
}

.status-dot {
    border-radius: 999px;
    display: inline-block;
    height: 10px;
    width: 10px;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.status-dot.ok {
    background: var(--success);
}

.status-dot.fail {
    background: var(--danger);
}

.category-nav {
    margin-bottom: 20px;
}

.category-nav-toggle {
    align-items: center;
    background: var(--panel);
    border: 2px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    color: var(--text);
    cursor: pointer;
    display: inline-flex;
    font-weight: 600;
    gap: 8px;
    min-height: 44px;
    padding: 10px 16px;
    transition: all 0.2s ease;
}

.category-nav-toggle:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: var(--shadow);
}

.category-nav-icon {
    transition: transform 0.2s ease;
}

.category-nav-toggle[aria-expanded="true"] .category-nav-icon {
    transform: rotate(180deg);
}

.category-pills {
    display: none;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
    padding: 12px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}

.category-pills.is-open {
    display: flex;
}

.category-pill {
    background: var(--panel);
    border: 2px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    padding: 10px 16px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.category-pill:hover {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.category-pill.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-color: var(--primary);
    color: #ffffff;
    box-shadow: var(--shadow-sm);
}

.category-pill.active:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.toolbar {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
    padding: 16px;
}

.search-form {
    display: flex;
    flex: 1;
    gap: 12px;
}

.search-form input {
    flex: 1;
}

.table-wrap {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
}

table {
    border-collapse: collapse;
    min-width: 520px;
    width: 100%;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 14px 16px;
    text-align: left;
}

th {
    background: var(--bg);
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

tr:last-child td {
    border-bottom: 0;
}

tr:hover td {
    background: var(--primary-light);
}

.editable-word {
    align-items: center;
    display: inline-flex;
    gap: 8px;
    max-width: 100%;
    min-height: 36px;
}

.editable-word-text {
    overflow-wrap: anywhere;
}

.edit-word-button {
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 50%;
    box-shadow: none;
    color: var(--muted);
    flex: 0 0 28px;
    font-size: 15px;
    height: 28px;
    min-height: 28px;
    padding: 0;
    width: 28px;
}

.edit-word-button:hover {
    background: var(--panel);
    border-color: var(--primary);
    color: var(--primary);
    transform: none;
}

.editable-word-input {
    min-height: 36px;
    min-width: 180px;
    padding: 6px 10px;
    width: min(360px, 45vw);
}

.editable-word.is-saving .edit-word-button {
    opacity: 0.45;
}

.editable-word.is-saved .editable-word-text {
    color: var(--success);
}

.editable-word.is-error .editable-word-text {
    color: var(--danger);
}

.exercise-layout {
    display: grid;
    place-items: start center;
    min-height: calc(100vh - 200px);
}

.exercise-panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-width: 640px;
    padding: 20px;
    width: 100%;
}

.exercise-heading {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 14px;
}

.exercise-heading h1 {
    font-size: 18px;
    margin-bottom: 2px;
}

.exercise-heading p {
    margin: 0;
    font-size: 10px;
}

.result {
    border-radius: var(--radius-sm);
    font-weight: 600;
    margin-bottom: 12px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: slideIn 0.3s ease;
    font-size: 13px;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result.correct {
    background: var(--success-light);
    border: 1px solid #6ee7b7;
    color: #047857;
}

.result.correct::before {
    content: "✓";
    font-size: 15px;
    font-weight: 700;
}

.result.wrong {
    background: var(--danger-light);
    border: 1px solid #fca5a5;
    color: var(--danger);
}

.result.wrong::before {
    content: "✗";
    font-size: 15px;
    font-weight: 700;
}

.stats {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    display: grid;
    gap: 1px;
    grid-template-columns: repeat(2, 1fr);
    margin-bottom: 12px;
    overflow: hidden;
}

.stats div {
    background: var(--panel);
    display: grid;
    gap: 3px;
    padding: 8px 12px;
}

.stats span {
    color: var(--muted);
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stats strong {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.progress-stat {
    grid-column: 1 / -1;
    background: var(--panel) !important;
}

.stats .progress-track {
    background: var(--line);
    border-radius: 999px;
    display: block;
    gap: 0;
    height: 6px;
    overflow: hidden;
    padding: 0;
    width: 100%;
}

.stats .progress-track span {
    background: linear-gradient(90deg, var(--primary), var(--success));
    border-radius: inherit;
    display: block;
    height: 100%;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.start-box,
.final-result {
    display: grid;
    gap: 14px;
    text-align: center;
    padding: 10px 0;
}

.start-box p,
.final-result p {
    margin: 0;
    font-size: 13px;
}

.final-result h2 {
    font-size: 20px;
    margin: 0;
    color: var(--success);
}

.quiz-form {
    display: grid;
    gap: 12px;
}

.prompt {
    background: linear-gradient(135deg, var(--primary-light), #f0f9ff);
    border-radius: var(--radius);
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    border: 1px solid #bae6fd;
}

.prompt span {
    color: var(--primary-dark);
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.prompt strong {
    font-size: 20px;
    line-height: 1.2;
    color: var(--text);
}

.prompt small {
    color: var(--muted);
    font-size: 12px;
}

.sentence-prompt strong {
    font-size: 16px;
    line-height: 1.3;
}

.choices {
    border: 0;
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.choices legend {
    color: var(--muted);
    font-weight: 600;
    font-size: 10px;
    margin-bottom: 8px;
}

.sentence-example-id {
    color: var(--muted);
    font-size: 10px;
    margin: 6px 0 0;
    text-transform: lowercase;
}

.choice {
    align-items: center;
    background: var(--panel);
    border: 2px solid var(--line);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    font-weight: 600;
    gap: 10px;
    min-height: 40px;
    padding: 8px 12px;
    transition: all 0.2s ease;
    position: relative;
}

.choice:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    transform: translateX(4px);
}

.choice:active {
    transform: translateX(2px);
}

.choice input {
    min-height: auto;
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
}

.choice input:checked + span {
    color: var(--primary);
}

.choice:has(input:checked) {
    border-color: var(--primary);
    background: var(--primary-light);
}

.choice span {
    font-size: 13px;
}

/* Auto-submit: hide the submit button in quiz forms */
.quiz-form button[type="submit"] {
    display: none;
}

.spelling-form {
    display: grid;
    gap: 12px;
}

.spelling-fieldset {
    border: 0;
    margin: 0;
    padding: 0;
}

.spelling-fieldset legend {
    color: var(--muted);
    font-size: 10px;
    font-weight: 600;
    margin-bottom: 8px;
}

.spelling-word {
    align-items: center;
    background: var(--bg);
    border: 2px solid var(--line);
    border-radius: var(--radius);
    display: flex;
    flex-wrap: wrap;
    font-size: 24px;
    font-weight: 700;
    gap: 4px;
    justify-content: center;
    letter-spacing: 0.04em;
    line-height: 1.3;
    min-height: 70px;
    padding: 14px;
}

.spelling-text {
    white-space: pre;
}

.spelling-letter {
    background: var(--panel);
    border: 2px solid var(--primary);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    font-size: 20px;
    font-weight: 700;
    min-height: 40px;
    padding: 0;
    text-align: center;
    width: 36px;
}

.spelling-letter:focus {
    border-color: var(--primary-dark);
    box-shadow: 0 0 0 3px var(--primary-light);
    outline: none;
}

.spelling-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* Loading state for choices */
.choice.loading {
    pointer-events: none;
    opacity: 0.7;
}

.choice.loading::after {
    content: "";
    position: absolute;
    right: 16px;
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Success/Error states for choices after selection */
.choice.selected-correct {
    border-color: var(--success);
    background: var(--success-light);
}

.choice.selected-wrong {
    border-color: var(--danger);
    background: var(--danger-light);
}

@media (max-width: 720px) {
    .hero,
    .toolbar,
    .search-form,
    .exercise-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .topbar {
        align-items: center;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        padding: 14px 18px;
        position: sticky;
    }

    .nav-toggle {
        display: inline-flex;
        margin-left: auto;
    }

    .topbar-actions {
        display: none;
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
        margin-left: 0;
        padding-top: 12px;
        width: 100%;
        border-top: 1px solid var(--line);
    }

    .topbar.is-menu-open .topbar-actions {
        display: flex;
    }

    .lang-switcher select {
        width: 100%;
    }

    .nav {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
    }

    .nav a,
    .nav-dropdown,
    .nav-dropdown-trigger {
        text-align: left;
        width: 100%;
    }

    .nav span {
        width: 100%;
        text-align: left;
        border-right: none;
        border-bottom: 1px solid var(--line);
        padding-bottom: 8px;
        margin-bottom: 8px;
        padding-right: 0;
        margin-right: 0;
    }

    .nav-dropdown-menu {
        border: 0;
        box-shadow: none;
        min-width: 0;
        padding: 4px 0 4px 12px;
        position: static;
        width: 100%;
    }

    .nav-dropdown:hover .nav-dropdown-menu {
        display: none;
    }

    .nav-dropdown.is-open .nav-dropdown-menu {
        display: block;
    }

    .dashboard-grid,
    .dashboard-columns {
        grid-template-columns: 1fr;
    }

    .recent-row,
    .list-row {
        grid-template-columns: auto 1fr;
    }

    .list-row small,
    .recent-row small {
        grid-column: 2;
    }

    .exercise-panel {
        padding: 16px;
    }

    .prompt strong {
        font-size: 18px;
    }

    .sentence-prompt strong {
        font-size: 14px;
    }

    h1 {
        font-size: 23px;
    }
}

.verbs-layout {
    display: grid;
    place-items: start center;
}

.verbs-panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    max-width: 1100px;
    padding: 28px;
    width: 100%;
}

.verbs-heading {
    margin-bottom: 20px;
}

.verbs-heading h1 {
    margin: 0 0 4px;
}

.verbs-heading p {
    color: var(--muted);
    margin: 0;
}

.verbs-toolbar {
    align-items: end;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 20px;
}

.verbs-select {
    display: grid;
    gap: 6px;
    min-width: min(100%, 360px);
}

.verbs-select select {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font: inherit;
    padding: 10px 12px;
}

.verb-summary {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    font-size: 18px;
    gap: 10px;
    margin-bottom: 16px;
}

.conjugation-table-wrap {
    overflow-x: auto;
}

.conjugation-table {
    border-collapse: collapse;
    min-width: 720px;
    width: 100%;
}

.conjugation-table th,
.conjugation-table td {
    border: 1px solid var(--line);
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
}

.conjugation-table thead th {
    background: var(--primary-light);
    font-size: 14px;
}

.conjugation-table tbody th {
    background: #f8fafc;
    font-weight: 600;
    white-space: nowrap;
}

.conjugation-form {
    display: grid;
    gap: 12px;
}

.conjugation-input {
    display: grid;
    gap: 6px;
}

.conjugation-input input {
    border: 2px solid var(--line);
    border-radius: var(--radius-sm);
    font: inherit;
    padding: 10px 12px;
}

.conjugation-input input:focus {
    border-color: var(--primary);
    outline: none;
}

.numbers-form {
    display: grid;
    gap: 12px;
}

.numbers-audio-panel {
    align-items: center;
    background: var(--bg);
    border: 2px solid var(--line);
    border-radius: var(--radius);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding: 14px;
}

.numbers-audio-panel audio {
    width: min(100%, 320px);
}

.numbers-input {
    display: grid;
    gap: 8px;
}

.numbers-input input {
    border: 2px solid var(--line);
    border-radius: var(--radius-sm);
    font: inherit;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 10px 12px;
    text-align: center;
}

.numbers-input input:focus {
    border-color: var(--primary);
    outline: none;
}

.numbers-avg-time {
    color: var(--muted);
    font-size: 13px;
    margin-top: 6px;
}

.numbers-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pronunciation-form {
    display: grid;
    gap: 12px;
}

.pronunciation-audio-panel {
    align-items: center;
    background: var(--bg);
    border: 2px solid var(--line);
    border-radius: var(--radius);
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding: 14px;
}

.pronunciation-audio-panel audio {
    width: min(100%, 320px);
}

.pronunciation-record-panel {
    align-items: center;
    background: var(--bg);
    border: 2px dashed var(--line);
    border-radius: var(--radius);
    display: grid;
    gap: 8px;
    justify-items: center;
    padding: 14px;
    text-align: center;
}

.pronunciation-record.is-listening {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.pronunciation-live,
.pronunciation-score-preview {
    color: var(--muted);
    font-size: 13px;
    margin: 0;
    min-height: 1.3em;
}

.pronunciation-score-preview {
    color: var(--text);
    font-weight: 700;
}

.pronunciation-avg-score {
    color: var(--muted);
    font-size: 13px;
    margin-top: 6px;
}

.pronunciation-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

@media (max-width: 720px) {
    .verbs-panel {
        padding: 20px;
    }

    .verbs-toolbar {
        align-items: stretch;
        flex-direction: column;
    }
}
