[hidden] { display: none !important; }

.site-header {
    height: 78px;
    gap: 12px;
}

.nav-button {
    padding: 25px 0 20px;
    color: #61705f;
    font-size: 13px;
}

.profile-button {
    color: #335540;
    font-size: 12px;
    min-height: 38px;
}

.study-intro {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin: 40px 0 27px;
}

.study-intro h1 {
    margin: 0;
    font-size: clamp(25px, 4vw, 40px);
    font-weight: 650;
    letter-spacing: -.04em;
}

.study-intro p {
    margin: 5px 0 0;
    color: #5d6b58;
}

.review-entry {
    flex: none;
    min-width: 76px;
    min-height: 40px;
}

.classroom { padding-block: 12px; }
.classroom-label { min-width: 150px; }
.classroom h2, .classroom-label div > span { font-size: 12px; color: #566b4c; }
.reading { margin-top: 24px; }
.filters { margin: 0 0 16px; }
.filters select, .search input { font-size: 12px; color: #4d6349; }

.study-column { min-width: 0; }

.study-navigation {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

.study-navigation #card-position {
    color: #60705c;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.study-navigation button { justify-self: start; }
.study-navigation button:last-child { justify-self: end; }
.study-navigation button:disabled { cursor: default; }

.study-navigation button, .study-prompt .button, .modal-actions .button {
    min-height: 40px;
    font-size: 13px;
}

.button:not(.primary), .text-button { color: #4e6945; }
.text-button { font-size: 12px; }
.sentence-card { border-color: #dce5d6; }
.sentence-card .card-meta { justify-content: flex-start; }

.sentence-card .guide-badge { color: #76522b; font-size: 10px; }
.sentence-card .meta-right { width: 100%; flex-wrap: wrap; }
.save-sentence { margin-left: auto; padding: 3px 8px; font-size: 21px; min-height: 32px; }
.card-actions button { color: #51684a; font-size: 12px; min-height: 30px; }
.sentence { font-size: clamp(22px, 2.7vw, 33px); }
.token.later { color: #7c593b; }
.sentence .token.speaking { background: #dcece1; outline: 2px solid #659276; outline-offset: 1px; }
.token.unmatched, .token.unplaced, .token.ambiguous { color: #695779; }
.translation { color: #4f624b; font-size: 14px; }
.translation.hidden { display: none; }
.study-prompt { border-style: solid; min-height: 230px; color: #54634c; }
.study-prompt b { font-size: 22px; color: #30513a; }
.study-prompt p { margin: 0 auto 20px; max-width: 40ch; }
.study-prompt b + .button { margin-top: 12px; }
.empty { color: #54634c; }
.word-placeholder p, .word-disclaimer { color: #5c6f54; }

dialog { padding: 25px; }
.modal-copy, .field, .check, .check small, .about-copy { color: #50624c; font-size: 13px; }
.account-section { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 16px; }
.account-section h3 { font-size: 14px; margin: 0 0 6px; }
.account-section p { margin: 4px 0 10px; }
.account-section .modal-actions { justify-content: flex-start; flex-wrap: wrap; margin-block: 8px 0; }
.account-section .field { margin-block: 10px; }
.account-section input {
    width: 100%;
    display: block;
    margin-top: 5px;
    padding: 9px 10px;
    border: 1px solid #ccd7c4;
    border-radius: 6px;
    background: #fafbf7;
}

.account-note { color: #55664f; }
.account-status { margin: 12px 0 0; color: #6f4030; }
.account-status:empty { display: none; }

.recovery-card {
    margin-top: 14px;
    display: grid;
    justify-items: center;
    gap: 9px;
    background: #f3f5eb;
    padding: 15px;
    border-radius: 9px;
}

.recovery-card img { width: min(100%, 230px); height: auto; }
.recovery-card code { overflow-wrap: anywhere; font-size: 12px; user-select: all; }
.recovery-card a { text-decoration: none; }

@media (max-width: 620px) {
    .site-header { flex-wrap: wrap; height: auto; min-height: 62px; padding-block: 9px; }
    .site-header nav { order: 3; width: 100%; justify-content: flex-start; gap: 18px; }
    .site-header .profile-button { position: static; min-height: 34px; padding-inline: 10px; }
    .nav-button { padding: 5px 0; }
    .study-intro { margin: 18px 0 13px; align-items: flex-start; flex-wrap: wrap; gap: 9px; }
    .classroom { padding: 9px 11px; }
    .classroom-label { min-width: auto; }
    .filters { flex-wrap: wrap; }
    .filters .search { flex-basis: 100%; max-width: none; }
    .reading { margin-top: 13px; }
    .study-column { width: 100%; }
    .study-prompt { min-height: 185px; padding: 25px 16px; }
    .card-actions { gap: 8px; flex-wrap: wrap; }
    .card-actions .translation-toggle { margin-left: 0; }
    #word-panel:has(.word-placeholder) { display: none; }
}

.translation-challenge {
    padding: 23px 27px;
}

.challenge-heading,
.challenge-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.challenge-heading {
    justify-content: space-between;
}

.challenge-heading h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 650;
}

.challenge-prompt {
    margin: 16px 0;
    padding: 14px 16px;
    border-radius: 8px;
    background: #f0f5eb;
    font-size: 17px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.translation-challenge label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

.translation-challenge textarea {
    display: block;
    width: 100%;
    min-height: 98px;
    padding: 10px 12px;
    resize: vertical;
    border: 1px solid #cddac7;
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: 16px;
}

.translation-challenge textarea:focus {
    outline: 2px solid #659276;
    outline-offset: 2px;
}

.challenge-hint {
    margin: 6px 0 15px;
    color: #53634e;
    font-size: 12px;
}

.challenge-actions .button {
    min-height: 40px;
    font-size: 13px;
}

.challenge-feedback {
    margin: 10px 0 0;
    color: #315b3f;
}

.challenge-feedback:empty {
    margin: 0;
}

.challenge-reference {
    margin-top: 16px;
    border-top: 1px solid var(--line);
    padding-top: 12px;
}

.challenge-reference span {
    color: #53634e;
    font-size: 12px;
}

.challenge-reference p {
    margin: 5px 0 0;
    font: 20px/1.6 Georgia, serif;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

@media (max-width: 620px) {
    .translation-challenge { padding: 17px 18px; }
}

#review-practice .translation-challenge { padding: 0; border: 0; background: transparent; }
#extra-sentence { margin-top: 8px; }

.protected-example {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

.sentence i .token { font-style: inherit; }
