* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #ffffff;
    color: #111111;
    font-family: Georgia, 'Times New Roman', serif;
    -webkit-font-smoothing: antialiased;
}

.page {
    max-width: 560px;
    margin: 36px auto;
    padding: 0 20px;
}

h1 {
    text-align: center;
    font-size: 30px;
    font-weight: normal;
    margin: 0 0 8px;
}

.cartoon-switcher {
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 14px;
    color: #555555;
    text-align: center;
    margin-bottom: 18px;
}

.cartoon-switcher .sep {
    margin: 0 6px;
    color: #999999;
}

.nav-link {
    background: none;
    border: none;
    padding: 2px 4px;
    font: inherit;
    color: #111111;
    cursor: pointer;
    text-decoration: none;
}

.nav-link:hover {
    text-decoration: underline;
}

.cartoon-img {
    display: block;
    max-width: 380px;
    max-height: 340px;
    width: auto;
    height: auto;
    margin: 0 auto 20px;
}

.caption-line {
    font-style: italic;
    font-size: 21px;
    line-height: 1.45;
    margin: 0 0 18px;
    text-align: center;
}

.blank-slot {
    font-style: normal;
    letter-spacing: 0.04em;
}

.filled-word {
    border-bottom: 1px solid #111111;
    padding: 0 2px;
}

.word-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.word-btn {
    background: #ffffff;
    color: #111111;
    border: 1px solid #111111;
    padding: 10px 14px;
    font-family: Georgia, serif;
    font-size: 17px;
    cursor: pointer;
    text-align: center;
}

.word-btn:hover:not(:disabled) {
    background: #111111;
    color: #ffffff;
}

.word-btn:disabled {
    cursor: default;
}

.word-btn.is-answer {
    background: #111111;
    color: #ffffff;
}

.word-btn.is-wrong-pick {
    background: #f3f3f3;
    color: #666666;
    border-color: #888888;
}

.feedback-row {
    margin-top: 14px;
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333333;
    text-align: center;
}

.advance-link {
    display: inline-block;
    margin-left: 6px;
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: #111111;
    text-decoration: underline;
    cursor: pointer;
}

.top-details {
    margin-top: 28px;
    padding-top: 14px;
    border-top: 1px solid #eeeeee;
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 14px;
    color: #555555;
}

.top-details summary {
    cursor: pointer;
}

.top-list {
    margin: 12px 0 0;
    padding-left: 20px;
    font-family: Georgia, serif;
    font-size: 15px;
    color: #222222;
}

.top-list li {
    margin-bottom: 8px;
    line-height: 1.45;
}

.top-score {
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 13px;
    color: #666666;
}

@media (max-width: 480px) {
    .cartoon-img {
        max-width: 100%;
    }
    .word-grid {
        grid-template-columns: 1fr;
    }
}
