.verb-view-switch {
    display: grid;
    width: min(calc(100% - 40px), var(--max-width));
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0 auto 38px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
}

.verb-view-switch button {
    min-height: 44px;
    padding: 8px 14px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-family: Helvetica, Arial, sans-serif;
    font-size: 0.94rem;
    font-weight: 700;
    appearance: none;
}

.verb-view-switch button:hover {
    color: var(--ink);
}

.verb-view-switch button[aria-pressed="true"] {
    background: #ffffff;
    color: var(--ink);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.verb-guide-section {
    width: min(100%, var(--max-width));
    margin: 0 auto;
    padding: 4px 20px 52px;
}

.verb-family-list,
.verb-form-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.verb-form-list {
    margin-top: 34px;
}

.verb-family-row,
.verb-form-row {
    --verb-colour: var(--study-blue);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.verb-family-row[open] {
    border-color: var(--verb-colour);
    box-shadow: inset 0 0 0 1px var(--verb-colour);
}

.verb-family-row summary,
.verb-form-row summary {
    display: grid;
    min-height: 78px;
    align-items: center;
    cursor: pointer;
    list-style: none;
}

.verb-family-row summary {
    grid-template-columns: 52px minmax(0, 1fr) 22px;
    gap: 14px;
    padding: 12px 16px 12px 14px;
}

.verb-family-row summary::-webkit-details-marker,
.verb-form-row summary::-webkit-details-marker {
    display: none;
}

.verb-family-symbol {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 8px;
    background: color-mix(in srgb, var(--verb-colour) 16%, white);
    font-family: "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
}

.verb-family-row summary strong,
.verb-family-row summary span,
.verb-form-row summary strong,
.verb-form-row summary span {
    display: block;
}

.verb-family-row summary strong,
.verb-form-row summary strong {
    font-family: Helvetica, Arial, sans-serif;
    font-size: 1rem;
    line-height: 1.3;
}

.verb-family-row summary > span:nth-child(2) > span,
.verb-form-row summary > span:first-child > span {
    margin-top: 4px;
    color: var(--muted);
    font-family: Helvetica, Arial, sans-serif;
    font-size: 0.8rem;
    line-height: 1.35;
}

.verb-guide-toggle {
    position: relative;
    width: 18px;
    height: 18px;
}

.verb-guide-toggle::before,
.verb-guide-toggle::after {
    content: "";
    position: absolute;
    top: 8px;
    left: 2px;
    width: 14px;
    height: 2px;
    background: var(--muted);
    transition: transform 0.18s ease;
}

.verb-guide-toggle::after {
    transform: rotate(90deg);
}

.verb-family-row[open] .verb-guide-toggle::after {
    transform: rotate(0);
}

.verb-family-content,
.verb-form-content {
    color: var(--ink);
    font-family: Helvetica, Arial, sans-serif;
    font-size: 0.9rem;
    line-height: 1.55;
}

.verb-family-content {
    margin: 0 16px 0 80px;
    padding: 17px 0 20px;
    border-top: 1px solid var(--line);
}

.verb-family-content p,
.verb-form-content p {
    margin: 0;
}

.verb-family-content ul {
    margin: 12px 0 0;
    padding-left: 20px;
    color: var(--muted);
}

.verb-family-content li + li {
    margin-top: 4px;
}

.verb-family-example {
    margin-top: 14px !important;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.verb-form-row summary {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    padding: 13px 16px;
}

.verb-form-example {
    font-family: "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    white-space: nowrap;
}

.verb-form-content {
    margin: 0 16px;
    padding: 16px 0 19px;
    border-top: 1px solid var(--line);
}

.verb-form-content p + p {
    margin-top: 8px;
}

.verb-form-note {
    color: var(--muted);
}

.verb-category-list,
.verb-topic-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.verb-library-section {
    padding-top: 42px;
}

.verb-list {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 9px;
}

.verb-list-button {
    display: flex;
    min-width: 0;
    min-height: 82px;
    flex-direction: column;
    justify-content: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--ink);
    cursor: pointer;
    text-align: left;
    appearance: none;
}

.verb-list-button:hover {
    border-color: #a9abb0;
}

.verb-list-button[aria-pressed="true"] {
    border-color: var(--study-blue);
    background: #eef5ff;
    box-shadow: inset 0 0 0 1px var(--study-blue);
}

.verb-list-japanese {
    font-family: "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
    font-size: 1.18rem;
    font-weight: 700;
    line-height: 1.45;
}

.verb-list-english {
    margin-top: 5px;
    color: var(--muted);
    font-family: Helvetica, Arial, sans-serif;
    font-size: 0.75rem;
    line-height: 1.3;
}

.verb-detail {
    --verb-colour: var(--study-blue);
    margin-top: 18px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-top: 5px solid var(--verb-colour);
    border-radius: 8px;
    background: #ffffff;
}

.verb-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 22px;
    border-bottom: 1px solid var(--line);
}

.verb-detail-header h3,
.verb-detail-header p {
    margin: 0;
}

.verb-detail-header h3 {
    font-family: "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
    font-size: 1.65rem;
    line-height: 1.5;
}

.verb-detail-header p {
    margin-top: 3px;
    color: var(--muted);
    font-family: Helvetica, Arial, sans-serif;
    font-size: 0.86rem;
}

.verb-family-badge {
    flex: 0 0 auto;
    padding: 6px 8px;
    border: 1px solid var(--line);
    border-radius: 5px;
    color: var(--muted);
    font-family: Helvetica, Arial, sans-serif;
    font-size: 0.74rem;
    font-weight: 700;
}

.verb-conjugation-table {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.verb-conjugation-row {
    display: grid;
    min-height: 76px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 14px 22px;
    border-bottom: 1px solid var(--line);
}

.verb-conjugation-row:nth-child(odd) {
    border-right: 1px solid var(--line);
}

.verb-conjugation-use strong,
.verb-conjugation-use small {
    display: block;
    font-family: Helvetica, Arial, sans-serif;
}

.verb-conjugation-use strong {
    font-size: 0.86rem;
}

.verb-conjugation-use small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.72rem;
}

.verb-conjugation-japanese {
    font-family: "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
    font-size: 1.06rem;
    font-weight: 700;
    text-align: right;
}

.verb-practice-heading-row {
    align-items: center;
}

.verb-practice-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
}

.verb-primary-action:disabled,
.verb-choice:disabled,
.study-control:disabled {
    cursor: not-allowed;
    opacity: 0.48;
}

.verb-session-bar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
    color: var(--muted);
    font-family: Helvetica, Arial, sans-serif;
    font-size: 0.84rem;
}

.verb-session-bar strong {
    color: var(--ink);
}

.verb-question-panel {
    --practice-colour: var(--study-blue);
    position: relative;
    min-height: 450px;
    padding: 28px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.06);
}

.verb-question-panel::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 5px;
    background: var(--practice-colour);
}

.verb-english {
    margin: 0;
    color: var(--muted);
    font-family: Helvetica, Arial, sans-serif;
    font-size: 0.95rem;
    line-height: 1.5;
}

.verb-japanese {
    min-height: 86px;
    margin-top: 22px;
    font-family: "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
    font-size: clamp(1.35rem, 3vw, 2rem);
    font-weight: 600;
    line-height: 2;
}

.verb-answer-blank {
    display: inline-flex;
    min-width: 92px;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    margin: 0 4px;
    padding: 1px 10px;
    border: 1px solid #bfc1c6;
    border-bottom: 3px solid var(--practice-colour);
    border-radius: 6px;
    background: var(--panel);
    vertical-align: middle;
}

.verb-answer-blank.is-correct {
    border-color: var(--study-green);
    background: #ecf8ee;
}

.verb-answer-blank.is-incorrect {
    border-color: var(--study-red);
    background: #fff0ef;
}

.verb-answer-blank.is-revealed {
    border-color: var(--study-yellow);
    background: #fff9e8;
}

.verb-choice-prompt {
    margin: 10px 0 9px;
    color: var(--muted);
    font-family: Helvetica, Arial, sans-serif;
    font-size: 0.82rem;
    line-height: 1.4;
}

.verb-choices {
    display: grid;
    min-height: 62px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.verb-choice {
    min-width: 0;
    min-height: 58px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--ink);
    cursor: pointer;
    font-family: "Hiragino Sans", "Yu Gothic", "Noto Sans JP", sans-serif;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.5;
    appearance: none;
}

.verb-choice:hover:not(:disabled) {
    border-color: var(--practice-colour);
}

.verb-choice[aria-pressed="true"] {
    border-color: var(--practice-colour);
    background: var(--practice-colour);
    color: #ffffff;
}

.verb-choice.is-correct {
    border-color: var(--study-green);
    background: #ecf8ee;
    color: var(--ink);
}

.verb-feedback {
    margin-top: 22px;
    padding: 16px 0 0;
    border-top: 1px solid var(--line);
    font-family: Helvetica, Arial, sans-serif;
}

.verb-feedback[hidden] {
    display: none;
}

.verb-feedback-title,
.verb-explanation {
    margin: 0;
    line-height: 1.5;
}

.verb-feedback-title {
    font-weight: 700;
}

.verb-feedback.is-success .verb-feedback-title {
    color: #247d34;
}

.verb-feedback.is-error .verb-feedback-title {
    color: #b82e27;
}

.verb-explanation {
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.88rem;
}

.verb-explanation strong {
    color: var(--ink);
}

.verb-question-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 24px;
}

.verb-primary-action {
    min-width: 150px;
    min-height: 46px;
    padding: 10px 18px;
    border: 1px solid var(--ink);
    border-radius: 8px;
    background: var(--ink);
    color: #ffffff;
    cursor: pointer;
    font-family: Helvetica, Arial, sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    appearance: none;
}

.verb-primary-action:hover:not(:disabled) {
    background: #333333;
}

.verb-completion {
    min-height: 330px;
    padding: 42px 28px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    text-align: center;
}

.verb-completion[hidden] {
    display: none;
}

.verb-completion h3 {
    margin: 0;
    font-family: Helvetica, Arial, sans-serif;
    font-size: clamp(1.75rem, 4vw, 2.6rem);
}

.verb-completion > p:not(.step-label) {
    max-width: 600px;
    margin: 15px auto 0;
    color: var(--muted);
    font-family: Helvetica, Arial, sans-serif;
    line-height: 1.55;
}

.verb-completion-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.verb-view-switch button:focus-visible,
.verb-family-row summary:focus-visible,
.verb-form-row summary:focus-visible,
.verb-list-button:focus-visible,
.verb-choice:focus-visible,
.verb-primary-action:focus-visible {
    outline: 3px solid var(--ink);
    outline-offset: 3px;
}

@media (max-width: 900px) {
    .verb-category-list,
    .verb-topic-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .verb-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .verb-choices {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .verb-view-switch {
        margin-bottom: 30px;
    }

    .verb-guide-section {
        padding-top: 0;
        padding-bottom: 42px;
    }

    .verb-family-list,
    .verb-form-list {
        grid-template-columns: 1fr;
    }

    .verb-category-list,
    .verb-topic-list {
        display: flex;
    }

    .verb-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .verb-conjugation-table {
        grid-template-columns: 1fr;
    }

    .verb-conjugation-row:nth-child(odd) {
        border-right: 0;
    }

    .verb-practice-heading-row {
        display: block;
    }

    .verb-practice-actions {
        margin-top: 18px;
    }

    .verb-question-panel {
        min-height: 440px;
        padding: 22px 18px;
    }

    .verb-japanese {
        min-height: 76px;
    }
}

@media (max-width: 420px) {
    .verb-view-switch {
        width: calc(100% - 32px);
    }

    .verb-family-content {
        margin-left: 14px;
    }

    .verb-detail-header {
        display: block;
    }

    .verb-family-badge {
        display: inline-block;
        margin-top: 12px;
    }

    .verb-conjugation-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    .verb-conjugation-japanese {
        text-align: left;
    }

    .verb-practice-actions,
    .verb-completion-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .verb-session-bar {
        display: grid;
        gap: 5px;
    }

    .verb-question-panel {
        padding: 20px 15px;
    }

    .verb-choices {
        grid-template-columns: 1fr;
    }

    .verb-question-actions {
        display: block;
    }

    .verb-primary-action {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .verb-guide-toggle::before,
    .verb-guide-toggle::after {
        transition: none;
    }
}
