/**
 * 散らし練習（リデザイン版）
 * 共通部品は practice-focus.css。ここには散らし練習だけで使う見た目を置く。接頭辞: rd-
 */

.pf-play.rd-play {
    display: flex;
    flex-direction: column;
}
.pf .pf-track i.is-skip { background: #A9B0BD; }

/* 上: 上の句（縦書き）。答えたら下の句を左に並べる */
.rd-q {
    position: relative;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 30px 16px 8px;
    outline: none;
}
.pf .rd-q:focus-visible { outline: none; }
.rd-score {
    position: absolute;
    top: 4px;
    left: 0;
    right: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 16px;
    font-size: 0.8125rem;
    color: var(--pf-ink-3);
    font-variant-numeric: tabular-nums;
}
.rd-ok b { color: var(--pf-rokusho); }
.rd-ng b { color: var(--pf-shu); }
.rd-kami,
.rd-shimo {
    margin: 0;
    max-height: 100%;
    writing-mode: vertical-rl;
    white-space: pre-line;
    font-family: var(--pf-uta);
    font-weight: 600;
    line-height: 1.8;
    letter-spacing: .1em;
}
.rd-kami { font-size: clamp(1.375rem, 6vw, 2rem); color: var(--pf-ink); }
.rd-shimo { font-size: clamp(1.125rem, 4.8vw, 1.625rem); color: var(--pf-rokusho); }
.rd-shimo:empty { display: none; }

/* 下: 文字の盤と「とばす／次へ」 */
.rd-ctrl {
    flex: none;
    display: grid;
    gap: 8px;
    padding: 0 10px 12px;
}
.rd-msg { min-height: 24px; justify-content: center; }
.rd-msg.is-ok, .rd-msg.is-ng { justify-content: flex-start; }
.rd-hint { font-size: 0.8125rem; font-weight: 400; color: var(--pf-ink-2); }
.rd-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 5px;
}
.rd-char {
    min-height: 46px;
    padding: 0;
    border: 1.5px solid var(--pf-line);
    border-radius: 10px;
    background: var(--pf-surface);
    color: var(--pf-ink);
    font-family: var(--pf-uta);
    font-size: 1.25rem;
    font-weight: 600;
    transition: border-color .12s, background-color .12s, opacity .15s;
}
.rd-char:not(:disabled):hover { border-color: var(--pf-ai); }
.rd-char:not(:disabled):active { background: var(--pf-ai-soft); }
.rd-char:disabled { cursor: default; }
.rd-char.is-correct { border-color: var(--pf-rokusho); background: var(--pf-rokusho); color: #fff; }
.rd-char.is-wrong { border-color: var(--pf-shu); background: var(--pf-shu); color: #fff; }
.rd-char.is-dim { opacity: .4; }
.rd-ctrl .pf-cta { min-height: 52px; }
.rd-buf { color: var(--pf-ai); font-weight: 700; }
.rd-buf:empty { display: none; }

/* 結果: とばした歌は灰色の印 */
.pf .pf-miss a.is-skip { border-left-color: #A9B0BD; }
/* 結果の札一覧は札全体がリンク。style.css の本文リンクの下線（.site-main li a:not([class])）を打ち消す */
.pf .pf-miss li a { text-decoration: none; }

@media (max-height: 640px) {
    .rd-char { min-height: 40px; font-size: 1.0625rem; }
    .rd-kami { font-size: 1.25rem; }
}

@media (min-width: 860px) {
    .pf-play.rd-play {
        display: flex;
        max-width: 760px;
        padding: 8px 32px 0;
    }
    .rd-q {
        margin-bottom: 14px;
        border: 1px solid var(--pf-line);
        border-radius: 20px;
        background: var(--pf-surface);
        gap: 28px;
        padding-top: 40px;
    }
    .rd-score { top: 14px; }
    .rd-kami { font-size: 2.25rem; }
    .rd-shimo { font-size: 1.75rem; }
    .rd-ctrl { padding: 0; }
    .rd-grid { grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 6px; }
    .rd-char { min-height: 50px; }
}
