.card {
    max-height: 420px;
    display: flex;
    flex-direction: column;
}

/* Action tag: small, centered, pinned to the top of the prompt panel, so
   the main content stays centered in the middle. */
.card-action {
    position: absolute;
    top: 0.9em;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border-radius: 999px;
    padding: 3px 12px;
    white-space: nowrap;
}

.card-action--pronounce {
    color: #2b5ca8;
    background: #e7f0fb;
    border: 1px solid #b9d3f0;
}

.card-action--translate {
    color: #2e7d52;
    background: #e7f6ec;
    border: 1px solid #b7e0c6;
}

/* Answer with a local-audio play button (pronunciation decks). */
.audio-answer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6em;
}

/* "How it sounds" guide under the word, e.g. English near-equivalents. */
.answer-guide {
    display: block;
    font-size: 14px;
    font-weight: 400;
    color: #8a8a8a;
    max-width: 300px;
    line-height: 1.35;
}

.audio-btn {
    font-size: 14px;
    font-weight: 600;
    color: #2b5ca8;
    background: #e7f0fb;
    border: 1px solid #b9d3f0;
    border-radius: 999px;
    padding: 6px 16px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.audio-btn:hover {
    background: #d6e6f8;
}

/* Tapped / currently playing: solid, so the tap clearly registered. */
.audio-btn.is-playing {
    color: #ffffff;
    background: #2b5ca8;
    border-color: #2b5ca8;
}

/* Small muted focus hint under the word (e.g. which consonant, or a meaning). */
.card-hint {
    display: block;
    margin-top: 0.6em;
    font-size: 13px;
    font-weight: 400;
    color: #8a8a8a;
    text-transform: none;
    letter-spacing: normal;
}

.card_prompt_container, .card_answer_container {
    flex: 1;
    overflow: auto;
    cursor: pointer;
    padding: 1em;
    text-align: center;
    line-height: 1.4;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.card_prompt_container {
    border-bottom: 1px solid #e0e0e0;
    position: relative; /* anchor for the absolutely-positioned action tag */
}

.card_prompt_content, .card_answer_content {
    align-self: center;
    align-items: center;
    justify-content: center;
}

.card_prompt_content {
    display: flex;
    overflow-x: auto;
    height: 100%;
}

.card_prompt_content img {
    height: 100%;
    max-width: none;
}

.card_answer_content {
    position: relative;
    transition: color 0.3s ease;
}

.answer-placeholder {
    height: 100px;
    width: 10em;
    height: 1em;
    background-color: gainsboro;
    line-height: 1.0;
    border-radius: 3px;
    margin: 5px 0; /* Adds vertical space between placeholders */
}
