/* 型2 3問瞬間・型3 ステータスビルド・型4 ワード合成・型5 分岐エンディング・型7 ドラフト・型8 ガチャ・型10 二人用の画面。play.css と play-shindan.css の上に載せる。
   正本: docs/型_診断テンプレート10種_v1.md */

/* ------------------------------------------------------------ 型2・型4 着地のカードで答える */

.pl-sq-card {
    justify-content: flex-start;
}

.pl-sq-quiz {
    position: relative;
    width: 100%;
    display: grid;
    gap: 10px;
    text-align: left;
}

.pl-sq-quiz.is-in .pl-sq-question,
.pl-sq-quiz.is-in .pl-sq-choices {
    animation: pl-sq-in 0.22s steps(3) both;
}

@keyframes pl-sq-in {
    from {
        opacity: 0;
        transform: translateX(10px);
    }
}

.pl-sq-back.is-off {
    visibility: hidden;
}

.pl-sq-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 14px;
    color: var(--pl-ink);
}

.pl-sq-progress .pl-game-gauge {
    flex: 1;
    border-color: var(--pl-ink);
    background: var(--pl-parch-light);
}

.pl-sq-question {
    margin: 0;
    padding: 14px 18px;
    font-weight: 900;
    font-size: 18px;
    line-height: 1.6;
    word-break: auto-phrase;
}

.pl-sq-question[hidden],
.pl-sq-choices[hidden] {
    display: none;
}

.pl-sq-choices {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.pl-sq-choice {
    position: relative;
    width: 100%;
    min-height: 50px;
    padding: 10px 16px 10px 40px;
    background: #03121f;
    color: #fff;
    border: 2px solid #8f9bab;
    border-radius: 6px;
    box-shadow: 0 0 0 1px #000814, 0 4px 0 #000814;
    font: inherit;
    font-weight: 700;
    font-size: 15.5px;
    line-height: 1.5;
    text-align: left;
    cursor: pointer;
    word-break: auto-phrase;
}

.pl-sq-choice::before {
    content: "▶";
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    color: var(--sr-accent, var(--pl-gold));
}

.pl-sq-choice:focus-visible {
    outline: none;
    border-color: var(--pl-gold);
    color: var(--pl-gold);
}

/* スマホではタップした後も :hover が残り、次の問いの同じ位置の選択肢が「選んだ」ように光っていた（2026-09-17 オーナー指摘）。ホバーはマウスのある端末だけ */
@media (hover: hover) {
    .pl-sq-choice:hover {
        outline: none;
        border-color: var(--pl-gold);
        color: var(--pl-gold);
    }
}

.pl-sq-back {
    justify-self: start;
    color: var(--pl-ink-soft);
}

/* 判定スタンプの置き場（問いの画面）。形・色・押す動きは play-stamp.css（templates/play/_stamp.html） */
.pl-sq-stamp {
    justify-self: center;
    margin: 20px 0;
}

.pl-sq-silhouette {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 50%;
    filter: brightness(0.12) saturate(0);
}

.pl-sq-dex {
    grid-template-columns: repeat(8, minmax(0, 1fr));
}

.pl-sq-attrs {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.pl-sq-attrs li {
    position: relative;
    border: 2px solid var(--a-accent);
    border-radius: 6px;
    overflow: hidden;
    line-height: 0;
}

.pl-sq-attrs img {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
}

.pl-sq-attrs span {
    position: absolute;
    left: 8px;
    bottom: 8px;
    padding: 2px 12px;
    line-height: 1.6;
    background: rgba(2, 10, 22, 0.8);
    border: 2px solid var(--a-accent);
    border-radius: 4px;
    color: #fff;
    font-weight: 900;
}

/* ------------------------------------------------------------ 型4 ワード合成の結果（名前が主役） */

.pl-cr-hero {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 420px;
    padding-block: 40px;
    overflow: hidden;
    isolation: isolate;
}

.pl-cr-bg {
    position: absolute;
    top: 0;
    left: 24px;
    z-index: -1;
    width: calc(100% - 48px);
    height: 100%;
    object-fit: cover;
    image-rendering: pixelated;
    border: 3px solid var(--pl-gold-dark);
    border-radius: 6px;
}

.pl-cr-window {
    max-width: 880px;
    margin-inline: 16px;
    padding: 22px 36px 26px;
    text-align: center;
    background: rgba(2, 10, 22, 0.86);
    border: 3px solid #fff;
    border-radius: 8px;
    box-shadow: 0 0 0 3px #000, inset 0 0 0 3px #000;
}

.pl-cr-intro {
    margin: 0;
    font-weight: 700;
    color: #c3cad4;
}

.pl-cr-name {
    margin: 6px 0 10px;
    font-size: clamp(30px, 5.4vw, 60px);
    font-weight: 900;
    line-height: 1.25;
    color: #ffe38a;
    text-shadow: 3px 3px 0 #000, 0 0 18px var(--sr-accent);
    word-break: auto-phrase;
    text-wrap: balance;
}

.pl-cr-attr {
    display: inline-flex;
    gap: 10px;
    margin: 0;
    padding: 2px 14px;
    border: 2px solid var(--sr-accent);
    border-radius: 4px;
    font-weight: 900;
    color: #fff;
}

.pl-cr-attr span {
    color: var(--sr-accent);
}

.pl-cr-body {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 22px;
}

.pl-cr-parts,
.pl-cr-stats {
    padding: 8px 18px 14px;
}

.pl-cr-part-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.pl-cr-part-list li {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 12px;
    padding: 8px 12px;
    background: var(--pl-parch-light);
    border: 2px solid var(--pl-parch-dark);
}

.pl-cr-word {
    font-weight: 900;
    font-size: 20px;
}

.pl-cr-from {
    font-size: 13px;
    color: var(--pl-ink-soft);
}

.pl-cr-stat-list {
    margin: 0;
    display: grid;
    gap: 6px;
}

.pl-cr-stat-list div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 2px dashed var(--pl-parch-dark);
}

.pl-cr-stat-list dt {
    flex: none;
    font-weight: 700;
    color: var(--pl-ink-soft);
}

.pl-cr-stat-list dd {
    margin: 0;
    font-weight: 900;
    text-align: right;
}

/* ------------------------------------------------------------ 型8 ガチャ・デイリー */

.pl-gc-stage {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 520px);
    align-items: center;
    min-height: 480px;
    padding-block: 30px;
    overflow: hidden;
    isolation: isolate;
}

.pl-gc-bg {
    position: absolute;
    top: 0;
    left: 24px;
    z-index: -1;
    width: calc(100% - 48px);
    height: 100%;
    object-fit: cover;
    image-rendering: pixelated;
    border: 3px solid var(--pl-gold-dark);
    border-radius: 6px;
}

.pl-gc-panel {
    grid-column: 2;
    margin-right: 24px;
    padding: 22px 26px;
    background: rgba(2, 10, 22, 0.88);
    border: 3px solid #8f9bab;
    border-radius: 8px;
    box-shadow: 0 0 0 3px #000;
    color: #fff;
}

.pl-gc-title {
    margin: 6px 0;
    font-size: clamp(26px, 3vw, 36px);
    font-weight: 900;
    line-height: 1.3;
}

.pl-gc-catch {
    margin: 0 0 8px;
    font-weight: 900;
    color: var(--sr-accent);
}

.pl-gc-lead {
    margin: 0 0 18px;
    font-size: 14px;
    line-height: 1.8;
    color: #d6dbe3;
}

.pl-gc-action {
    display: grid;
    justify-items: center;
    gap: 10px;
}

.pl-gc.is-opening .pl-gc-bg {
    animation: pl-gc-shake 0.5s steps(6) 2;
}

@keyframes pl-gc-shake {
    25% {
        transform: translate(-4px, 2px);
    }

    50% {
        transform: translate(4px, -2px);
    }

    75% {
        transform: translate(-2px, -2px);
    }
}

.pl-gc-done {
    display: grid;
    justify-items: center;
    gap: 10px;
    width: 100%;
}

.pl-gc-done[hidden] {
    display: none;
}

.pl-gc-done-text {
    margin: 0;
    font-weight: 900;
}

.pl-gc-next {
    margin: 0;
    color: #c3cad4;
}

.pl-gc-next b {
    font-variant-numeric: tabular-nums;
    color: var(--pl-gold);
    font-size: 20px;
}

.pl-gc-dex {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.pl-gc-dex .pl-sd-silhouette,
.pl-gc-dex img.pl-pixel {
    width: 96px;
    height: 96px;
}

.pl-gc-rarity {
    display: inline-block;
    align-self: flex-start;
    margin: 0 0 10px;
    padding: 0 12px;
    border: 2px solid var(--pl-ink);
    font-weight: 900;
    letter-spacing: 0.1em;
    background: var(--pl-parch-light);
}

.pl-gc-rarity--sr {
    background: #d9c2ff;
}

.pl-gc-rarity--ssr {
    background: linear-gradient(90deg, #ffe38a, #ffb3d9, #b3e5ff);
}

.pl-gc-effects li {
    align-items: flex-start;
}

.pl-gc-effects .pl-sr-mark {
    flex: none;
    min-width: 3.2em;
    padding: 0 6px;
    font-size: 13px;
    font-weight: 900;
    text-align: center;
    color: #fff;
    border-radius: 3px;
}

.pl-gc-effects .pl-sr-mark--bad {
    background: #8b2b2b;
}

.pl-gc-effects .pl-sr-mark--good {
    background: #2e7d4a;
}

.pl-gc-effects .pl-gc-lucky {
    background: #1e4a8f;
}

/* 型8 のおみくじ（omikuji）: 吉凶・5つの運・ラッキーカラーとアイテム。値がある札にだけ出る（今日の呪われた装備には出ない） */

/* 見出し（h1）の下線は inline-block の中には伝わらない。吉凶の札は下線なしで、札の名前だけに下線が付く */
.pl-gc-rank {
    display: inline-block;
    margin: 2px 0 8px;
    padding: 2px 16px 4px;
    font-size: clamp(36px, 5vw, 48px);
    line-height: 1.1;
    letter-spacing: 0.12em;
    color: #fff;
    background: #b23a2a;
    border: 3px solid var(--pl-ink);
    border-radius: 4px;
    box-shadow: 3px 3px 0 var(--pl-ink);
}

.pl-gc-rank--1 {
    color: var(--pl-ink);
    background: linear-gradient(180deg, #ffe690, #e2b33c);
}

.pl-gc-rank--2 {
    background: #c8432f;
}

.pl-gc-rank--3 {
    background: #d9772a;
}

.pl-gc-rank--4 {
    background: #3f8f5a;
}

.pl-gc-rank--5 {
    background: #3a7a99;
}

.pl-gc-rank--6 {
    background: #5d6475;
}

.pl-gc-rank--7 {
    background: #3b2f55;
}

.pl-gc-luck {
    display: grid;
    gap: 0;
    margin: 4px 0 12px;
    border-top: 2px dashed var(--pl-parch-dark);
}

.pl-gc-luck-row {
    display: grid;
    grid-template-columns: 5em 1.6em minmax(0, 1fr);
    align-items: baseline;
    gap: 6px;
    padding: 6px 0;
    border-bottom: 1px solid var(--pl-parch-dark);
}

.pl-gc-luck dt {
    font-weight: 900;
}

.pl-gc-luck dd {
    margin: 0;
}

.pl-gc-luck-mark {
    font-size: 19px;
    font-weight: 900;
    text-align: center;
}

.pl-gc-luck-mark--best {
    color: #b23a2a;
}

.pl-gc-luck-mark--good {
    color: #2e7d4a;
}

.pl-gc-luck-mark--care {
    color: #1e4a8f;
}

.pl-gc-luck-text {
    font-size: 14px;
    line-height: 1.6;
}

.pl-gc-charms {
    display: grid;
    gap: 8px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 2px dashed var(--pl-parch-dark);
}

.pl-gc-charm {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    margin: 0;
}

.pl-gc-charm-label {
    flex: none;
    min-width: 8.2em;
    font-size: 13px;
    font-weight: 900;
}

.pl-gc-charm b {
    font-size: 17px;
}

.pl-gc-charm small {
    font-size: 13px;
}

.pl-gc-swatch {
    flex: none;
    display: inline-block;
    width: 24px;
    height: 24px;
    background: var(--swatch);
    border: 2px solid var(--pl-ink);
    border-radius: 3px;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.pl-gc-today {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 16px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 2px solid #8f9bab;
    border-radius: 6px;
}

.pl-gc-today .pl-gc-swatch {
    width: 32px;
    height: 32px;
    margin-top: 2px;
    border-color: #fff;
}

.pl-gc-today p {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 8px;
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
}

.pl-gc-today-title {
    font-weight: 900;
    color: var(--pl-gold);
}

.pl-gc-today b {
    font-size: 18px;
}

.pl-gc-today small {
    font-size: 12px;
    color: #c3cad4;
}

.pl-gc-today-tip {
    flex-basis: 100%;
    color: #d6dbe3;
}

/* スマホ幅: 運のひとことが「明日にまわ／す」と1字だけ折れていた。項目名の列を詰めて、文を1行に収める */
@media (max-width: 480px) {
    .pl-gc-luck-row {
        grid-template-columns: 4.3em 1.3em minmax(0, 1fr);
        gap: 4px;
    }

    .pl-gc-luck dt {
        font-size: 14px;
    }

    .pl-gc-luck-text {
        font-size: 13px;
    }

    .pl-gc-charm-label {
        min-width: 0;
        flex-basis: 100%;
    }
}

/* ------------------------------------------------------------ 型7 ドラフト・トーナメント
   ドット絵（64×64）は整数倍だけ: 舞台 PC4倍（256）・スマホ2倍（128）／結果 PC5倍（320）・スマホ3倍（192）／一覧1倍 */

.pl-dr-game {
    margin-top: 4px;
    /* 始めたときに舞台の頭（回戦・進み具合）がサイトの固定ヘッダーの下に隠れないように */
    scroll-margin-top: 84px;
}

.pl-dr-game[hidden],
.pl-sd-land[hidden],
.pl-dr-bracket[hidden] {
    display: none;
}

.pl-dr-stage {
    position: relative;
    padding: 16px 22px 18px;
    border: 3px solid var(--pl-gold-dark);
    box-shadow: inset 0 0 0 2px var(--pl-gold), 0 5px 0 #000;
    background: linear-gradient(rgba(2, 10, 22, 0.8), rgba(2, 10, 22, 0.92)), var(--dr-bg, none) center / cover, var(--pl-navy-tile);
    overflow: hidden;
}

.pl-dr-head {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.pl-dr-round {
    margin: 0;
    padding: 2px 16px;
    background: var(--pl-gold);
    color: var(--pl-wood-dark);
    font-weight: 900;
    font-size: 17px;
    letter-spacing: 0.08em;
    box-shadow: inset 0 -3px 0 var(--pl-gold-dark);
}

.pl-dr-count {
    margin: 0;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    color: var(--pl-white);
}

.pl-dr-gauge {
    flex: 1;
    min-width: 80px;
    width: auto;
}

.pl-dr-prompt {
    margin: 14px 0 12px;
    text-align: center;
    font-size: clamp(22px, 2.6vw, 30px);
    font-weight: 900;
    color: #fff;
    text-shadow: var(--pl-outline);
}

.pl-dr-prompt[hidden],
.pl-dr-arena[hidden] {
    display: none;
}

.pl-dr-arena {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 56px;
    max-width: 880px;
    margin: 0 auto;
}

.pl-dr-pick {
    position: relative;
    display: grid;
    grid-template-rows: auto auto 1fr;
    justify-items: center;
    align-content: start;
    gap: 6px;
    padding: 18px 14px 16px;
    background: #03121f;
    color: #fff;
    border: 3px solid var(--pl-navy-line);
    border-radius: 6px;
    box-shadow: 0 0 0 2px #000814, 0 6px 0 #000814;
    font: inherit;
    text-align: center;
    cursor: pointer;
    transition: transform 0.12s steps(2), opacity 0.2s steps(3);
}

.pl-dr-pick:focus-visible {
    outline: none;
    border-color: var(--pl-gold);
    transform: translateY(-3px);
}

/* スマホではタップした後も :hover が残り、次の問いの同じ位置の選択肢が「選んだ」ように光っていた（2026-09-17 オーナー指摘）。ホバーはマウスのある端末だけ */
@media (hover: hover) {
    .pl-dr-pick:hover {
        outline: none;
        border-color: var(--pl-gold);
        transform: translateY(-3px);
    }
}

.pl-dr-pick:disabled {
    cursor: default;
}

.pl-dr-pick.is-chosen {
    border-color: var(--pl-gold);
    box-shadow: 0 0 0 2px #000814, 0 6px 0 #000814, 0 0 0 5px var(--pl-gold-dark), 0 0 26px rgba(242, 201, 76, 0.6);
    transform: translateY(-4px);
}

.pl-dr-pick.is-dropped {
    opacity: 0.35;
    filter: grayscale(1);
    transform: none;
}

.pl-dr-arena.is-in .pl-dr-pick:first-of-type {
    animation: pl-dr-in-left 0.24s steps(4) both;
}

.pl-dr-arena.is-in .pl-dr-pick:last-of-type {
    animation: pl-dr-in-right 0.24s steps(4) both;
}

@keyframes pl-dr-in-left {
    from {
        opacity: 0;
        transform: translateX(-24px);
    }
}

@keyframes pl-dr-in-right {
    from {
        opacity: 0;
        transform: translateX(24px);
    }
}

.pl-dr-key {
    position: absolute;
    top: 8px;
    left: 10px;
    min-width: 26px;
    padding: 0 6px;
    border: 2px solid var(--pl-navy-line);
    border-radius: 3px;
    font-weight: 900;
    font-size: 14px;
    line-height: 1.5;
    color: var(--pl-muted);
}

.pl-dr-sprite {
    width: 256px;
    height: 256px;
}

.pl-dr-name {
    font-weight: 900;
    font-size: 22px;
    line-height: 1.35;
    color: var(--pl-gold);
    word-break: auto-phrase;
}

.pl-dr-catch {
    font-weight: 700;
    font-size: 14px;
    line-height: 1.65;
    color: #d6dbe3;
    word-break: auto-phrase;
    text-wrap: balance;
}

.pl-dr-vs {
    position: absolute;
    left: 50%;
    top: 42%;
    z-index: 2;
    transform: translate(-50%, -50%);
    font-weight: 900;
    font-size: 34px;
    letter-spacing: 0.04em;
    color: var(--sr-accent, var(--pl-gold));
    text-shadow: var(--pl-outline), 0 5px 0 var(--pl-navy-deep);
    pointer-events: none;
}

.pl-dr-banner {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: grid;
    place-items: center;
    margin: 0;
    background: rgba(2, 10, 22, 0.72);
    font-weight: 900;
    font-size: clamp(40px, 7vw, 72px);
    letter-spacing: 0.12em;
    color: var(--pl-gold);
    text-shadow: var(--pl-outline), 0 6px 0 var(--pl-navy-deep);
    animation: pl-dr-banner 0.9s steps(6) both;
}

.pl-dr-banner[hidden],
.pl-dr-winner[hidden] {
    display: none;
}

@keyframes pl-dr-banner {
    0% {
        opacity: 0;
        transform: scale(1.4);
    }

    30%,
    80% {
        opacity: 1;
        transform: none;
    }

    100% {
        opacity: 0;
    }
}

.pl-dr-winner {
    display: grid;
    justify-items: center;
    gap: 4px;
    padding: 6px 0 0;
}

.pl-dr-winner-name {
    margin: 0;
    font-weight: 900;
    font-size: 28px;
    color: var(--pl-gold);
    text-shadow: var(--pl-outline);
}

.pl-dr-stamp {
    margin: 8px 0 4px;
}

.pl-dr-hint {
    margin: 12px 0 0;
    text-align: center;
    font-size: 12.5px;
    color: var(--pl-muted);
}

@media (hover: none) {
    .pl-dr-hint,
    .pl-dr-key {
        display: none;
    }
}

/* 候補の一覧（着地の顔ぶれ・結果の一覧）。正体は隠さない（ドラフトは候補が先にわかっている遊び） */
.pl-dr-dex {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 8px;
}

.pl-dr-dex-cell {
    display: grid;
    justify-items: center;
    align-content: start;
    gap: 2px;
    height: 100%;
    padding: 8px 4px;
    background: var(--pl-navy-tile);
    border: 2px solid var(--pl-navy-line);
    box-shadow: inset 0 0 0 2px var(--pl-navy-deep);
    text-align: center;
}

.pl-dr-dex-cell img,
.pl-dr-mini img {
    width: 64px;
    height: 64px;
}

.pl-dr-dex-cell.is-current {
    border: 3px solid var(--pl-gold);
    box-shadow: inset 0 0 0 2px var(--pl-navy-deep), 0 0 0 3px var(--pl-gold-dark), 0 0 16px rgba(242, 201, 76, 0.55);
}

/* 冒険の記録: この端末で優勝させたことがある候補（docs/設計_冒険の記録_登録なし_2026-09-18.md） */
.pl-dr-dex-cell.is-found:not(.is-current) {
    border-color: var(--pl-gold-dark);
    box-shadow: inset 0 0 0 2px var(--pl-navy-deep), 0 0 0 2px var(--pl-gold-dark);
}

/* 結果: 優勝した候補を舞台の絵の上に大きく */
.pl-dr-hero {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 3 / 2;
    isolation: isolate;
}

.pl-dr-hero .pl-dr-hero-bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    filter: brightness(0.5) saturate(0.8);
}

.pl-dr-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(ellipse 34% 46% at 50% 56%, rgba(255, 227, 138, 0.55), rgba(255, 227, 138, 0) 70%);
}

.pl-dr-hero .pl-dr-hero-sprite {
    width: 320px;
    height: 320px;
    aspect-ratio: auto;
    object-fit: contain;
}

.pl-dr-way {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin: 0;
    padding-top: 12px;
    border-top: 2px dashed var(--pl-parch-dark);
}

.pl-dr-way span {
    padding: 0 10px;
    background: var(--pl-ink);
    color: var(--pl-parch-light);
    font-size: 13px;
    font-weight: 900;
    border-radius: 3px;
}

.pl-dr-way a {
    font-weight: 900;
    font-size: 20px;
    color: var(--pl-ink);
    text-decoration-color: var(--sr-accent);
    text-decoration-thickness: 4px;
    text-underline-offset: 5px;
}

.pl-dr-bracket,
.pl-dr-tend {
    margin-top: 22px;
}

.pl-dr-bracket-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
    gap: 18px;
}

.pl-dr-bracket-label {
    margin: 0 0 6px;
    font-weight: 900;
    font-size: 14px;
    color: var(--pl-muted);
}

.pl-dr-mini {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pl-dr-mini li {
    display: grid;
    justify-items: center;
    align-content: start;
    width: 96px;
    padding: 6px 2px;
    background: var(--pl-navy-tile);
    border: 2px solid var(--pl-navy-line);
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
    word-break: auto-phrase;
}

.pl-dr-mini li.is-current {
    border-color: var(--pl-gold);
    color: var(--pl-gold);
}

.pl-dr-tend-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
    gap: 22px;
    align-items: stretch;
}

.pl-dr-tend-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 8px 16px 14px;
}

.pl-dr-tend-card .pl-sr-kicker {
    font-size: 15px;
}

.pl-dr-tend-name {
    margin: 2px 0 6px;
    font-size: clamp(28px, 3.2vw, 40px);
    font-weight: 900;
    line-height: 1.25;
    color: var(--pl-ink);
}

.pl-dr-tend-card .pl-sr-catch {
    margin-bottom: 8px;
}

.pl-dr .pl-sr-catch {
    word-break: auto-phrase;
    text-wrap: pretty;
}

.pl-dr-tend-desc {
    margin: 0 0 12px;
    font-size: 14.5px;
    line-height: 1.9;
}

.pl-dr-tend-all {
    list-style: none;
    margin: 0;
    padding: 10px 0 0;
    border-top: 2px dashed var(--pl-parch-dark);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pl-dr-tend-all li {
    padding: 0 10px;
    border: 2px solid var(--pl-parch-dark);
    font-size: 13px;
    font-weight: 700;
    color: var(--pl-ink-soft);
}

.pl-dr-tend-all li.is-current {
    background: var(--pl-ink);
    border-color: var(--pl-ink);
    color: var(--pl-parch-light);
}

@media (max-width: 960px) {
    .pl-dr-tend-grid,
    .pl-dr-bracket-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .pl-dr-dex {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .pl-dr-stage {
        padding: 12px 10px 14px;
    }

    .pl-dr-prompt {
        margin: 10px 0 8px;
    }

    .pl-dr-arena {
        gap: 10px;
    }

    .pl-dr-pick {
        padding: 12px 6px;
        gap: 4px;
    }

    .pl-dr-sprite {
        width: 128px;
        height: 128px;
    }

    .pl-dr-name {
        font-size: 16px;
    }

    .pl-dr-catch {
        font-size: 12.5px;
        line-height: 1.55;
    }

    .pl-dr-vs {
        top: 76px;
        font-size: 24px;
    }

    .pl-dr-winner-name {
        font-size: 22px;
    }

    .pl-dr-hero .pl-dr-hero-sprite {
        width: 192px;
        height: 192px;
    }

    .pl-dr-mini {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 6px;
    }

    .pl-dr-mini li {
        width: auto;
    }
}

@media (max-width: 480px) {
    /* 「自分もオーディションする」が「…す／る」で折れていた */
    .pl-dr .pl-sd-start {
        padding-inline: 12px;
        font-size: 17px;
        white-space: nowrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pl-dr-arena.is-in .pl-dr-pick,
    .pl-dr-banner {
        animation: none;
    }

    .pl-dr-pick {
        transition: none;
    }
}

/* ------------------------------------------------------------ 型10 二人用診断
   着地（ひとりめ→受け渡し→ふたりめ）・結果（関係＋ふたりの魔王）・招待状。
   ★設問ごとのカードの高さは pair.js が最小の高さで固定する（ここでは伸び縮みの原因を作らない） */

.pl-pr-who {
    flex: none;
    padding: 1px 10px;
    background: var(--pl-ink);
    color: var(--pl-parch-light);
    border-radius: 3px;
    font-size: 13px;
    font-weight: 900;
}

.pl-pr-who.is-second {
    background: var(--pl-blue);
    color: var(--pl-white);
}

.pl-pr-partner {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin: 0 0 6px;
    padding: 8px;
    background: var(--pl-parch-light);
    border: 3px solid var(--pl-wood-dark);
    box-shadow: inset 0 0 0 2px var(--pl-parch-dark);
    text-align: left;
}

.pl-pr-partner img {
    flex: none;
    width: 96px;
    height: 64px;
    object-fit: cover;
    image-rendering: pixelated;
    border: 2px solid var(--pl-wood-dark);
}

.pl-pr-partner p {
    display: grid;
    gap: 2px;
    min-width: 0;
    margin: 0;
}

.pl-pr-partner span {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--pl-ink-soft);
}

.pl-pr-partner strong {
    font-size: 16px;
    font-weight: 900;
    line-height: 1.45;
    color: var(--pl-ink);
    word-break: auto-phrase;
}

.pl-pr-partner-text {
    margin: 0 0 12px;
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.7;
    color: var(--pl-ink);
    text-align: left;
}

.pl-pr-quiz {
    align-content: start;
}

.pl-pr-handoff {
    display: grid;
    justify-items: center;
    gap: 12px;
    padding: 18px 12px;
    background: rgba(6, 17, 42, 0.94);
    color: var(--pl-white);
    border: 3px solid var(--pl-white);
    box-shadow: inset 0 0 0 3px var(--pl-navy-deep), 0 0 0 3px var(--pl-navy-deep);
    text-align: center;
}

.pl-pr-handoff[hidden] {
    display: none;
}

.pl-pr-handoff-title {
    margin: 0;
    word-break: auto-phrase;
    text-wrap: balance;
    font-size: 18px;
    font-weight: 900;
    color: var(--pl-gold);
}

.pl-pr-handoff-text {
    margin: 0;
    font-size: 14px;
    line-height: 1.7;
    word-break: auto-phrase;
}

.pl-pr-handoff .pl-sd-start {
    max-width: 100%;
    word-break: auto-phrase;
    text-wrap: balance;
    padding-inline: 20px;
    font-size: 17px;
}

.pl-pr-handoff-send {
    min-height: 48px;
    padding: 8px 20px;
    background: #06c755;
    color: #fff;
    border: 3px solid var(--pl-navy-deep);
    box-shadow: 0 0 0 2px var(--pl-white), 0 4px 0 2px #000;
    font: inherit;
    font-family: var(--pl-dot);
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
}

.pl-pr-handoff-send:hover,
.pl-pr-handoff-send:focus-visible {
    outline: none;
    filter: brightness(1.12);
}

.pl-pr-how {
    margin-top: 24px;
}

.pl-pr-how-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    counter-reset: pl-pr-how;
}

.pl-pr-how-list li {
    position: relative;
    padding: 10px 14px 12px 50px;
    background: var(--pl-navy-tile);
    border: 2px solid var(--pl-navy-line);
    box-shadow: inset 0 0 0 2px var(--pl-navy-deep);
    color: var(--pl-white);
    font-size: 14px;
    line-height: 1.7;
    counter-increment: pl-pr-how;
}

.pl-pr-how-list li::before {
    content: counter(pl-pr-how);
    position: absolute;
    left: 12px;
    top: 10px;
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    background: var(--pl-gold);
    color: var(--pl-wood-dark);
    font-family: var(--pl-dot);
    font-weight: 700;
}

.pl-pr-how-list b {
    display: block;
    color: var(--pl-gold);
}

/* 結果: ふたりの魔王 */
.pl-pr-duo {
    margin-top: 22px;
}

.pl-pr-duo-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: stretch;
    gap: 12px;
}

.pl-pr-member {
    display: grid;
    grid-template-columns: minmax(0, 200px) minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    column-gap: 14px;
    row-gap: 4px;
    align-content: center;
    padding: 10px;
    background: var(--pl-navy-tile);
    border: 2px solid var(--pl-navy-line);
    box-shadow: inset 0 0 0 2px var(--pl-navy-deep);
    color: var(--pl-white);
    text-decoration: none;
}

a.pl-pr-member:hover,
a.pl-pr-member:focus-visible {
    outline: none;
    border-color: var(--pl-gold);
}

.pl-pr-member-art {
    grid-row: 1 / span 2;
    display: block;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    border: 2px solid var(--pl-navy-line-soft);
    line-height: 0;
    background: var(--pl-navy-deep);
}

.pl-pr-member-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: pixelated;
}

.pl-pr-member-name {
    align-self: end;
    font-size: 16px;
    font-weight: 900;
    line-height: 1.45;
    word-break: auto-phrase;
    overflow-wrap: anywhere;
}

.pl-pr-member-catch {
    align-self: start;
    font-size: 13px;
    line-height: 1.6;
    color: var(--pl-muted);
    word-break: auto-phrase;
    overflow-wrap: anywhere;
}

.pl-pr-x {
    align-self: center;
    font-family: var(--pl-dot);
    font-weight: 700;
    font-size: 30px;
    color: var(--pl-gold);
    text-shadow: 2px 2px 0 var(--pl-navy-deep);
}

.pl-pr-scene {
    margin: 14px 0 0;
    padding: 12px 16px;
    background: var(--pl-parch-light);
    border-left: 6px solid var(--sr-accent);
    color: var(--pl-ink);
    font-weight: 700;
    line-height: 1.85;
    word-break: auto-phrase;
}

.pl-pr-move {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 12px;
    margin: 12px 0 0;
    color: var(--pl-white);
}

.pl-pr-move-label {
    padding: 0 10px;
    background: var(--pl-gold);
    color: var(--pl-wood-dark);
    font-size: 13px;
    font-weight: 900;
    border-radius: 3px;
}

.pl-pr-move b {
    font-size: 18px;
    font-weight: 900;
    color: var(--pl-gold);
}

.pl-pr-move-effect {
    font-size: 14px;
    color: var(--pl-muted);
}

/* 関係図鑑（場面の縮小版 3:2）。8種→4列×2段・スマホは2列 */
.pl-pr-dex {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.pl-pr-dex-cell {
    display: grid;
    align-content: start;
    gap: 6px;
    min-width: 0;
    padding: 6px 6px 8px;
    background: var(--pl-navy-tile);
    border: 2px solid var(--pl-navy-line);
    box-shadow: inset 0 0 0 2px var(--pl-navy-deep);
    text-align: center;
}

.pl-pr-dex-art {
    display: block;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    line-height: 0;
    background: var(--pl-navy-deep);
}

.pl-pr-dex-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: pixelated;
    filter: saturate(0.6) brightness(0.8);
}

.pl-pr-dex-name {
    min-width: 0;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--pl-white);
    word-break: auto-phrase;
    overflow-wrap: anywhere;
}

.pl-pr-dex-cell.is-current {
    border: 3px solid var(--pl-gold);
    box-shadow: inset 0 0 0 2px var(--pl-navy-deep), 0 0 0 3px var(--pl-gold-dark), 0 0 16px rgba(242, 201, 76, 0.55);
}

/* 冒険の記録: この端末で出したことがある関係 */
.pl-pr-dex-cell.is-found:not(.is-current) {
    border-color: var(--pl-gold-dark);
    box-shadow: inset 0 0 0 2px var(--pl-navy-deep), 0 0 0 2px var(--pl-gold-dark);
}

.pl-pr-dex-cell.is-current .pl-pr-dex-art img {
    filter: none;
}

.pl-pr-dex-cell.is-current .pl-pr-dex-name {
    color: var(--pl-gold);
}

/* 招待状 */
.pl-pr-inv-text {
    margin: 0 0 10px;
    padding: 10px 12px;
    background: var(--pl-parch-light);
    border-left: 6px solid var(--sr-accent);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.75;
}

.pl-pr-inv-more {
    justify-self: start;
    align-self: flex-start;
    padding: 0;
    color: var(--pl-blue);
}

.pl-pr .pl-sr-catch,
.pl-pr .pl-sr-name {
    word-break: auto-phrase;
}

@media (max-width: 960px) {
    .pl-pr-duo-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .pl-pr-x {
        justify-self: center;
        line-height: 1;
    }

    .pl-pr-member {
        grid-template-columns: minmax(0, 160px) minmax(0, 1fr);
    }
}

@media (max-width: 720px) {
    .pl-pr-how-list {
        grid-template-columns: minmax(0, 1fr);
    }

    .pl-pr-dex {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .pl-pr-member {
        grid-template-columns: minmax(0, 120px) minmax(0, 1fr);
        column-gap: 10px;
    }

    .pl-pr-member-name {
        font-size: 15px;
    }

    .pl-pr-member-catch {
        font-size: 12.5px;
    }
}

@media (max-width: 480px) {
    /* 「誰かと診断する」「この端末で相手が答える」が折れないように */
    .pl-pr .pl-sd-start {
        padding-inline: 12px;
        font-size: 17px;
    }

    .pl-pr-handoff {
        padding: 14px 8px;
    }

    .pl-pr-handoff-title {
        font-size: 16px;
    }

    .pl-pr-handoff .pl-sd-start {
        padding-inline: 10px;
        font-size: 15.5px;
    }

    .pl-pr-member {
        grid-template-columns: minmax(0, 96px) minmax(0, 1fr);
        padding: 8px;
    }

    /* 相手の魔王の名前が「勇者が／来てから／本気を…」と1語ずつ折れていた（320px） */
    .pl-pr-partner {
        gap: 10px;
        padding: 6px;
    }

    .pl-pr-partner img {
        width: 72px;
        height: 48px;
    }

    .pl-pr-partner strong {
        font-size: 15px;
    }
}

/* ------------------------------------------------------------ 型3 ステータスビルド
   着地のカードの中のステータス窓（答えるたびにゲージが動く）と、結果の「第一形態 → 第二形態」。
   ★設問ごとのカードの高さは status.js が最小の高さで固定する */

.pl-st-day {
    flex: none;
    padding: 1px 10px;
    background: var(--pl-ink);
    color: var(--pl-parch-light);
    border-radius: 3px;
    font-size: 13px;
    font-weight: 900;
}

.pl-st-window {
    padding: 8px 14px 10px;
}

.pl-st-window-title {
    margin: 0 0 6px;
    font-family: var(--pl-dot);
    font-weight: 700;
    font-size: 13px;
    color: var(--pl-gold);
    letter-spacing: 0.08em;
}

.pl-st-bars {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 18px;
}

.pl-st-bar {
    display: grid;
    grid-template-columns: 2.6em minmax(0, 1fr) 1.2em;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.pl-st-label {
    font-weight: 900;
    font-size: 14px;
    white-space: nowrap;
}

.pl-st-gauge {
    display: block;
    height: 14px;
    background: var(--pl-navy);
    border: 2px solid var(--pl-white);
    box-shadow: 0 0 0 2px var(--pl-navy-deep);
    overflow: hidden;
}

.pl-st-fill {
    display: block;
    height: 100%;
    background: repeating-linear-gradient(90deg, var(--sr-accent, var(--pl-gold)) 0 8px, rgba(2, 10, 22, 0.35) 8px 10px);
    transition: width 0.4s steps(5);
}

.pl-st-arrow {
    font-size: 13px;
    font-weight: 900;
    text-align: center;
}

.pl-st-arrow.is-up {
    color: #7be08f;
}

.pl-st-arrow.is-down {
    color: #ff7a7a;
}

.pl-st-window.is-moved .pl-st-arrow {
    animation: pl-st-pop 0.36s steps(3) both;
}

@keyframes pl-st-pop {
    from {
        transform: translateY(6px);
        opacity: 0;
    }
}

/* 第二形態へ: 窓が赤紫に光ってゲージがひっくり返る */
.pl-st-window.is-second {
    border-color: var(--pl-gold);
    animation: pl-st-flash 0.6s steps(4) both;
}

.pl-st-window.is-second .pl-st-window-title {
    color: #ff9ad5;
}

.pl-st-window.is-second .pl-st-fill {
    transition-duration: 0.8s;
    transition-timing-function: steps(8);
}

@keyframes pl-st-flash {
    0%,
    50% {
        background: #5a1a6e;
    }
}

/* 高さは status.js が最小の高さで固定する。余った高さで行（窓や設問）が伸びないよう上に詰める */
.pl-st-quiz {
    align-content: start;
}

.pl-st-quiz .pl-sq-stamp {
    margin: 12px 0;
}

.pl-st-lead {
    margin-top: 22px;
    padding: 8px 18px 14px;
}

.pl-st-lead p {
    margin: 0;
    line-height: 1.9;
}

/* 1字だけの行を作らない（320pxで「す。」「て。」が次の行に落ちていた） */
.pl-st p {
    text-wrap: pretty;
}

.pl-st .pl-sd-catch,
.pl-st .pl-sr-catch,
.pl-st .pl-sr-dex-note,
.pl-st .pl-sr-again-in p,
.pl-st .pl-sr-advice {
    word-break: auto-phrase;
}

/* 結果: 第一形態 → 第二形態 */
.pl-st-status {
    margin-top: 22px;
}

.pl-st-compare {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr);
    align-items: stretch;
    gap: 10px;
}

.pl-st-form {
    padding: 10px 16px 14px;
}

.pl-st-form .pl-st-bars {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
}

.pl-st-form .pl-st-bar {
    grid-template-columns: 2.6em minmax(0, 1fr) 3.2em;
}

.pl-st-form--second .pl-st-bar {
    grid-template-columns: 2.6em minmax(0, 1fr) 3.2em 1.2em;
}

.pl-st-form .pl-st-gauge {
    height: 18px;
}

.pl-st-form .pl-st-fill {
    transition: none;
}

.pl-st-form--second {
    border-color: var(--pl-gold);
}

.pl-st-form--second .pl-st-window-title {
    color: #ff9ad5;
}

.pl-st-num {
    font-family: var(--pl-dot);
    font-weight: 700;
    font-size: 17px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.pl-st-turn {
    align-self: center;
    justify-self: center;
    width: 0;
    height: 0;
    border-top: 16px solid transparent;
    border-bottom: 16px solid transparent;
    border-left: 20px solid var(--pl-gold);
}

.pl-st-flip {
    margin: 14px 0 0;
    font-weight: 900;
    font-size: 17px;
    color: var(--pl-white);
    word-break: auto-phrase;
}

.pl-st-notes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 4px;
}

.pl-st-notes .pl-sr-advice {
    margin: 0;
}

.pl-st-memo {
    border-left-color: var(--pl-blue);
}

@media (min-width: 961px) {
    .pl-sr-read-in > .pl-st-notes {
        column-span: all;
    }
}

/* ------------------------------------------------------------ 画面幅 */

@media (max-width: 960px) {
    .pl-cr-body {
        grid-template-columns: minmax(0, 1fr);
    }

    .pl-gc-stage {
        grid-template-columns: minmax(0, 1fr);
        padding: 180px 0 16px;
    }

    .pl-gc-panel {
        grid-column: 1;
        margin: 0 36px;
    }

    .pl-sq-dex,
    .pl-gc-dex {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .pl-sq-attrs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* 図鑑8種は、タブレット幅で5列だと2段目に3つだけ残って右が空いた。4列×2段にそろえる（スマホも4列） */
@media (max-width: 960px) {
    .pl-st .pl-sr-dex-list:has(> :nth-child(8):last-child),
    .pl-st .pl-sd-dex-list:has(> :nth-child(8):last-child) {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .pl-st-compare {
        grid-template-columns: minmax(0, 1fr);
    }

    .pl-st-turn {
        border-left: 16px solid transparent;
        border-right: 16px solid transparent;
        border-top: 18px solid var(--pl-gold);
        border-bottom: 0;
    }

    .pl-st-notes {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 480px) {
    /* 「自分も変身してみる ▶」が320pxで「自分も変身し／てみる」と折れていた */
    .pl-st .pl-sd-start {
        padding-inline: 12px;
        font-size: 18px;
        white-space: nowrap;
    }

    /* 図鑑のマスが1行4字ほどしかないので、語で折ると「巨大化／しすぎ／た」と1字の行ができた。字で折って行の長さをそろえる */
    .pl-st .pl-sr-dex-name {
        word-break: normal;
        text-wrap: balance;
    }

    .pl-st-bars {
        gap: 5px 12px;
    }

    .pl-st-bar {
        grid-template-columns: 2.2em minmax(0, 1fr) 1em;
        gap: 5px;
    }

    .pl-st-label {
        font-size: 13px;
    }

    .pl-gc-dex {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .pl-gc-panel {
        margin: 0 28px;
        padding: 16px;
    }

    .pl-cr-window {
        padding: 16px 14px 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pl-sq-quiz.is-in .pl-sq-question,
    .pl-sq-quiz.is-in .pl-sq-choices,
    .pl-st-window.is-moved .pl-st-arrow,
    .pl-st-window.is-second,
    .pl-gc.is-opening .pl-gc-bg {
        animation: none;
    }

    .pl-st-fill {
        transition: none;
    }
}

/* ------------------------------------------------------------ 型6 ビジュアル選択
   着地のカードで絵を4枚ずつ選ぶ（2×2のマス）。結果は「選んだ4つ」。
   ★ドット絵は元の大きさの整数倍だけ: 96×96 はスマホ96px・タブレットとPC192px（64×64 はスマホ128px・PC192px）
   ★設問ごとのカードの高さは visual.js が最小の高さで固定する。マスは grid-auto-rows: 1fr で4枚とも同じ高さ */

.pl-vs-quiz {
    align-content: start;
}

.pl-vs-shelf {
    flex: none;
    padding: 1px 10px;
    background: var(--pl-ink);
    color: var(--pl-parch-light);
    border-radius: 3px;
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
}

.pl-vs-question {
    margin: 2px 0 0;
    font-weight: 900;
    font-size: 19px;
    line-height: 1.5;
    text-align: center;
    color: var(--pl-ink);
    word-break: auto-phrase;
    text-wrap: balance;
}

.pl-vs-choices {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    gap: 10px;
}

.pl-vs-choices > li {
    min-width: 0;
}

.pl-vs-quiz.is-in .pl-vs-choices > li {
    animation: pl-vs-in 0.24s steps(4) both;
}

.pl-vs-quiz.is-in .pl-vs-choices > li:nth-child(2) {
    animation-delay: 0.04s;
}

.pl-vs-quiz.is-in .pl-vs-choices > li:nth-child(3) {
    animation-delay: 0.08s;
}

.pl-vs-quiz.is-in .pl-vs-choices > li:nth-child(4) {
    animation-delay: 0.12s;
}

@keyframes pl-vs-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
}

.pl-vs-choice {
    position: relative;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-rows: auto 1fr;
    justify-items: center;
    align-items: center;
    gap: 4px;
    padding: 12px 8px 10px;
    background: #03121f;
    color: #fff;
    border: 2px solid #8f9bab;
    border-radius: 6px;
    box-shadow: 0 0 0 1px #000814, 0 4px 0 #000814;
    font: inherit;
    text-align: center;
    cursor: pointer;
    transition: transform 0.12s steps(2), opacity 0.2s steps(3);
}

.pl-vs-choice:focus-visible {
    outline: none;
    border-color: var(--pl-gold);
    transform: translateY(-2px);
}

/* スマホではタップした後も :hover が残り、次の問いの同じ位置の選択肢が「選んだ」ように光っていた（2026-09-17 オーナー指摘）。ホバーはマウスのある端末だけ */
@media (hover: hover) {
    .pl-vs-choice:hover {
        outline: none;
        border-color: var(--pl-gold);
        transform: translateY(-2px);
    }
}

.pl-vs-choice:focus-visible .pl-vs-label {
    color: var(--pl-gold);
}

/* スマホではタップした後も :hover が残り、次の問いの同じ位置の選択肢が「選んだ」ように光っていた（2026-09-17 オーナー指摘）。ホバーはマウスのある端末だけ */
@media (hover: hover) {
    .pl-vs-choice:hover .pl-vs-label {
        color: var(--pl-gold);
    }
}

.pl-vs-choice:disabled {
    cursor: default;
}

.pl-vs-choice.is-chosen {
    border-color: var(--pl-gold);
    box-shadow: 0 0 0 1px #000814, 0 4px 0 #000814, 0 0 0 4px var(--pl-gold-dark), 0 0 22px rgba(242, 201, 76, 0.6);
    transform: translateY(-3px);
}

.pl-vs-choice.is-chosen .pl-vs-label {
    color: var(--pl-gold);
}

.pl-vs-choice.is-dropped {
    opacity: 0.35;
    filter: grayscale(1);
    transform: none;
}

/* 最後に、選んだ4つを同じマスに並べる */
.pl-vs-choice.is-picked {
    cursor: default;
    border-color: var(--pl-gold-dark);
}

.pl-vs-choices.is-done > li {
    animation: none;
}

.pl-vs-key {
    position: absolute;
    top: 6px;
    left: 8px;
    min-width: 24px;
    padding: 0 5px;
    border: 2px solid var(--pl-navy-line);
    border-radius: 3px;
    font-weight: 900;
    font-size: 13px;
    line-height: 1.45;
    color: var(--pl-muted);
}

.pl-vs-sprite {
    display: block;
}

.pl-vs-sprite--96,
.pl-vs-sprite--64 {
    width: 192px;
    height: 192px;
}

.pl-vs-label {
    align-self: start;
    min-width: 0;
    max-width: 100%;
    font-weight: 900;
    font-size: 16px;
    line-height: 1.35;
    word-break: auto-phrase;
    text-wrap: balance;
}

/* はんこは選んだ4つの上に重ねる（下に積むとカードが伸びる） */
.pl-vs-stamp {
    position: absolute;
    left: 0;
    right: 0;
    top: 52%;
    z-index: 3;
    width: max-content;
    margin: 0 auto;
}

@media (hover: none) {
    .pl-vs-key {
        display: none;
    }
}

.pl-vs p {
    text-wrap: pretty;
}

.pl-vs .pl-sd-catch,
.pl-vs .pl-sr-catch,
.pl-vs .pl-sr-dex-note,
.pl-vs .pl-sr-again-in p,
.pl-vs .pl-sr-advice {
    word-break: auto-phrase;
}

/* 結果: 選んだ4つ */
.pl-vs-picks-sec {
    margin-top: 22px;
}

.pl-vs-picks {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.pl-vs-pick {
    display: grid;
    grid-template-rows: auto auto 1fr;
    justify-items: center;
    gap: 6px;
    min-width: 0;
    padding: 10px 8px 12px;
    background: var(--pl-navy-tile);
    border: 2px solid var(--pl-navy-line);
    box-shadow: inset 0 0 0 2px var(--pl-navy-deep);
    text-align: center;
}

.pl-vs-pick-shelf {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--pl-muted);
    white-space: nowrap;
}

.pl-vs-pick .pl-vs-label {
    color: var(--pl-white);
}

.pl-vs-skill {
    display: block;
    margin: 2px 0 2px;
    font-size: 17px;
    font-weight: 900;
    color: var(--pl-ink);
}

@media (max-width: 960px) {
    .pl-vs-pick .pl-vs-sprite--96 {
        width: 96px;
        height: 96px;
    }

    .pl-vs-pick .pl-vs-sprite--64 {
        width: 128px;
        height: 128px;
    }
}

@media (max-width: 720px) {
    .pl-vs-choices {
        gap: 8px;
    }

    .pl-vs-choice {
        padding: 10px 4px 8px;
    }

    .pl-vs-choices .pl-vs-sprite--96 {
        width: 96px;
        height: 96px;
    }

    .pl-vs-choices .pl-vs-sprite--64 {
        width: 128px;
        height: 128px;
    }

    .pl-vs-label {
        font-size: 14px;
    }

    .pl-vs-question {
        font-size: 17px;
    }

    .pl-vs-picks {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
}

@media (max-width: 480px) {
    /* 「自分も武器を受け取る ▶」が320pxで折れないように */
    .pl-vs .pl-sd-start {
        padding-inline: 12px;
        font-size: 18px;
        white-space: nowrap;
    }

    /* 図鑑のマスは1行5字ほど。短い呼び名（5字まで・長いものは語の切れ目で2行）にしてあるので、語の切れ目で折る */
    .pl-vs .pl-sr-dex-name {
        word-break: auto-phrase;
        text-wrap: balance;
    }

    .pl-vs-choices .pl-vs-sprite--64 {
        width: 64px;
        height: 64px;
    }

    .pl-vs-label {
        font-size: 13.5px;
    }
}

/* 320px幅では図鑑のマスに1行4字ほどしか入らず、「内気な短/剣」と1字だけの行ができた。短い呼び名（5字まで）が1行に収まる大きさにする */
@media (max-width: 360px) {
    .pl-vs .pl-sr-dex-list {
        gap: 6px;
    }

    .pl-vs .pl-sr-dex-cell {
        padding: 6px 1px;
    }

    /* 64pxの丸いサムネがマスより広く、楕円につぶれていた */
    .pl-vs .pl-sr-dex-thumb {
        width: 48px;
        height: 48px;
    }

    .pl-vs .pl-sr-dex-name {
        font-size: 10px;
        letter-spacing: -0.02em;
        word-break: auto-phrase;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pl-vs-quiz.is-in .pl-vs-choices > li {
        animation: none;
    }

    .pl-vs-choice {
        transition: none;
    }
}

/* ------------------------------------------------------------ 型5 分岐エンディング
   着地: 左（スマホは上）の絵が場面の背景に替わり、カードの窓に場面の文と分かれ道。上の四角は通った場面の数（ルートの略図）。
   結果: たどったルート（場面の絵・名前・選んだ道）と、見つけた結末だけ名前が出るエンディング一覧。
   ★場面ごとのカードの高さは branch.js が最小の高さで固定する */

.pl-bn-scene {
    position: relative;
}

.pl-bn-scene img.is-in {
    animation: pl-bn-scene-in 0.4s steps(4) both;
}

@keyframes pl-bn-scene-in {
    from {
        opacity: 0.15;
    }
}

.pl-bn-scene-name {
    position: absolute;
    left: 12px;
    top: 12px;
    padding: 4px 12px 5px;
    background: rgba(2, 10, 22, 0.88);
    border: 2px solid var(--pl-gold-dark);
    box-shadow: inset 0 0 0 1px var(--pl-gold);
    color: var(--pl-gold);
    font-family: var(--pl-dot);
    font-weight: 700;
    font-size: 15px;
    line-height: 1.4;
    letter-spacing: 0.06em;
}

.pl-bn-quiz {
    align-content: start;
}

/* スマホ・タブレットは、読んでいるカードの中にも場面の帯を出す（上の大きい絵は文字から遠いので隠す） */
.pl-bn-band {
    display: none;
    margin: 0 0 4px;
}

.pl-bn-band img {
    display: block;
    width: 100%;
    aspect-ratio: 21 / 9;
    object-fit: cover;
    object-position: center 58%;
    image-rendering: pixelated;
    border: 3px solid var(--pl-gold-dark);
    box-shadow: inset 0 0 0 2px var(--pl-gold);
}


.pl-bn-progress {
    justify-content: space-between;
}

.pl-bn-trail {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 5px;
}

.pl-bn-trail li {
    width: 14px;
    height: 14px;
    background: var(--pl-ink);
    border: 2px solid var(--pl-ink);
}

.pl-bn-trail li.is-here {
    background: var(--sr-accent, var(--pl-gold));
    animation: pl-bn-here 1s steps(2) infinite;
}

@keyframes pl-bn-here {
    50% {
        background: var(--pl-parch-light);
    }
}

.pl-bn-text {
    margin: 0;
    padding: 14px 18px 16px;
    background: #03121f;
    color: var(--pl-white);
    border: 3px solid var(--pl-navy-line);
    box-shadow: inset 0 0 0 2px var(--pl-navy-deep), 0 4px 0 var(--pl-navy-deep);
    font-weight: 700;
    font-size: 16px;
    line-height: 1.85;
    text-align: left;
    word-break: auto-phrase;
    text-wrap: pretty;
}

.pl-bn-quiz.is-in .pl-bn-text,
.pl-bn-quiz.is-in .pl-bn-choices {
    animation: pl-sq-in 0.22s steps(3) both;
}

.pl-bn-choices[hidden] {
    display: none;
}

.pl-bn .pl-sq-choice:disabled {
    cursor: default;
}

.pl-bn .pl-sq-choice.is-chosen {
    border-color: var(--pl-gold);
    color: var(--pl-gold);
    box-shadow: 0 0 0 1px #000814, 0 4px 0 #000814, 0 0 0 4px var(--pl-gold-dark);
}

.pl-bn .pl-sq-choice.is-dropped {
    opacity: 0.35;
}

.pl-bn-stamp {
    margin: 28px 0;
}

/* エンディング一覧（場面の縮小版 3:2）。8種→4列×2段・スマホは2列 */
.pl-bn-dex {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.pl-bn-dex-cell {
    min-width: 0;
    background: var(--pl-navy-tile);
    border: 2px solid var(--pl-navy-line);
    box-shadow: inset 0 0 0 2px var(--pl-navy-deep);
    text-align: center;
}

.pl-bn-dex-link {
    display: grid;
    align-content: start;
    gap: 5px;
    height: 100%;
    padding: 6px 6px 8px;
    color: var(--pl-white);
    text-decoration: none;
}

.pl-bn-dex-art {
    position: relative;
    display: block;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    line-height: 0;
    background: var(--pl-navy-deep);
}

.pl-bn-dex-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: pixelated;
    filter: saturate(0.7) brightness(0.85);
}

.pl-bn-dex-q {
    position: absolute;
    inset: 0;
    display: none;
    place-items: center;
    font-family: var(--pl-dot);
    font-weight: 700;
    font-size: 30px;
    line-height: 1;
    color: var(--pl-gold);
    text-shadow: 2px 2px 0 var(--pl-navy-deep);
}

.pl-bn-dex-cell.is-locked .pl-bn-dex-art img {
    filter: brightness(0.14) saturate(0);
}

.pl-bn-dex-cell.is-locked .pl-bn-dex-q {
    display: grid;
}

.pl-bn-dex-name {
    min-width: 0;
    font-size: 13.5px;
    font-weight: 900;
    line-height: 1.4;
    word-break: auto-phrase;
    overflow-wrap: anywhere;
}

.pl-bn-dex-cell.is-locked .pl-bn-dex-name {
    color: var(--pl-muted);
    letter-spacing: 0.1em;
}

.pl-bn-dex-routes {
    font-family: var(--pl-dot);
    font-size: 12px;
    font-weight: 700;
    color: var(--pl-muted);
    white-space: nowrap;
}

.pl-bn-rare {
    margin-right: 6px;
    color: var(--pl-gold);
}

.pl-bn-dex-link[href]:hover .pl-bn-dex-name,
.pl-bn-dex-link[href]:focus-visible .pl-bn-dex-name {
    color: var(--pl-gold);
}

.pl-bn-dex-cell.is-found:not(.is-current) {
    border-color: var(--pl-gold-dark);
}

.pl-bn-dex-cell.is-current {
    border: 3px solid var(--pl-gold);
    box-shadow: inset 0 0 0 2px var(--pl-navy-deep), 0 0 0 3px var(--pl-gold-dark), 0 0 16px rgba(242, 201, 76, 0.55);
}

.pl-bn-dex-cell.is-current .pl-bn-dex-art img {
    filter: none;
}

.pl-bn-dex-cell.is-current .pl-bn-dex-name {
    color: var(--pl-gold);
}

/* 結果: レアの印・たどったルート */
.pl-bn-rare-ribbon {
    align-self: flex-start;
    margin: 0 0 10px;
    padding: 3px 12px 4px;
    background: var(--pl-gold);
    color: var(--pl-wood-dark);
    border: 2px solid var(--pl-wood-dark);
    font-family: var(--pl-dot);
    font-weight: 700;
    font-size: 14px;
}

.pl-bn-route-sec {
    margin-top: 22px;
}

.pl-bn-route {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(var(--steps, 6), minmax(0, 1fr));
    gap: 16px;
}

.pl-bn-step {
    position: relative;
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 6px;
    min-width: 0;
    padding: 6px 6px 10px;
    background: var(--pl-navy-tile);
    border: 2px solid var(--pl-navy-line);
    box-shadow: inset 0 0 0 2px var(--pl-navy-deep);
}

.pl-bn-step:not(:last-child)::after {
    content: "▶";
    position: absolute;
    right: -14px;
    top: 28%;
    z-index: 1;
    font-size: 12px;
    line-height: 1;
    color: var(--pl-gold);
}

.pl-bn-step-art {
    display: block;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    line-height: 0;
    background: var(--pl-navy-deep);
}

.pl-bn-step-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: pixelated;
}

.pl-bn-step-body {
    display: grid;
    align-content: start;
    gap: 4px;
    min-width: 0;
}

.pl-bn-step-place {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 900;
    font-size: 13px;
    color: var(--pl-gold);
    white-space: nowrap;
}

.pl-bn-step-place b {
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 20px;
    height: 20px;
    background: var(--pl-gold);
    color: var(--pl-navy-deep);
    font-family: var(--pl-dot);
    font-size: 12px;
}

.pl-bn-step-choice {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.55;
    color: var(--pl-white);
    word-break: auto-phrase;
    overflow-wrap: anywhere;
}

.pl-bn-step--end {
    border: 3px solid var(--pl-gold);
    box-shadow: inset 0 0 0 2px var(--pl-navy-deep), 0 0 0 2px var(--pl-gold-dark);
}

.pl-bn-step--end .pl-bn-step-choice {
    color: var(--pl-gold);
    font-weight: 900;
}

.pl-bn .pl-sr-catch,
.pl-bn .pl-sr-name,
.pl-bn .pl-sd-catch,
.pl-bn .pl-sr-dex-note,
.pl-bn .pl-sd-dex-note,
.pl-bn .pl-sr-again-in p,
.pl-bn .pl-sr-advice {
    word-break: auto-phrase;
}

.pl-bn p {
    text-wrap: pretty;
}

@media (max-width: 960px) {
    .pl-sd-land .pl-sd-cover.pl-bn-scene {
        display: none;
    }

    .pl-bn-band {
        display: block;
    }

    .pl-bn-route {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px 14px;
    }

    .pl-bn-step {
        grid-template-columns: minmax(0, 120px) minmax(0, 1fr);
        grid-template-rows: none;
        align-items: start;
        column-gap: 10px;
    }

    .pl-bn-step:not(:last-child)::after {
        content: none;
    }

    /* 場面4つ＋結末＝5マスのとき、結末が1マスだけ残って右が空かないよう横いっぱいにする */
    .pl-bn-step--end:nth-child(odd) {
        grid-column: 1 / -1;
    }
}

@media (max-width: 720px) {
    .pl-bn-dex {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .pl-bn-route {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    .pl-bn-step--end:nth-child(odd) {
        grid-column: auto;
    }

    /* 縦に並ぶので、次の場面へ下向きの矢印 */
    .pl-bn-step:not(:last-child)::after {
        content: "▼";
        right: auto;
        top: auto;
        left: 54px;
        bottom: -14px;
    }

    .pl-bn-step {
        grid-template-columns: minmax(0, 112px) minmax(0, 1fr);
    }

    .pl-bn-text {
        font-size: 15px;
        padding: 12px 14px 14px;
    }

    .pl-bn-scene-name {
        font-size: 13px;
        left: 8px;
        top: 8px;
    }
}

@media (max-width: 480px) {
    /* 「別のエンディングを探す ▶」「自分も追放されてみる ▶」が320pxで折れないように */
    .pl-bn .pl-sd-start {
        padding-inline: 10px;
        font-size: 17px;
        white-space: nowrap;
    }

    .pl-bn-step {
        grid-template-columns: minmax(0, 96px) minmax(0, 1fr);
        column-gap: 8px;
    }

    .pl-bn-step:not(:last-child)::after {
        left: 46px;
    }

    .pl-bn-dex-name {
        font-size: 12.5px;
    }
}

@media (max-width: 360px) {
    .pl-bn .pl-sd-start {
        font-size: 15.5px;
    }

    .pl-bn .pl-sq-choice {
        padding-left: 32px;
        font-size: 14.5px;
    }

    .pl-bn .pl-sq-choice::before {
        left: 11px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pl-bn-scene img.is-in,
    .pl-bn-quiz.is-in .pl-bn-text,
    .pl-bn-quiz.is-in .pl-bn-choices,
    .pl-bn-trail li.is-here {
        animation: none;
    }
}

/* ============================================================ 型9 名前Seed（あなたの冒険の書） */
/* 正本: docs/型9_名前Seed_企画と実装計画_2026-09-18.md §2-1
   ★入力窓（.pl-sv-form）は着地と結果ページで共用する（templates/play/_seed_form.html）。
     着地のほうには音の幕が掛かるので position: relative にしてある（幕の見た目は play-shindan.css の「音の許可（幕）」の節）。
   ★セーブ窓（.pl-sv-window）は「ぼうけんのしょ」。**共有画像の右半分と同じ構図**にそろえる
     （scripts/render_shindan_og.js seedResultHtml）。直したらどちらも直す。
   ★角丸・ぼかし影は使わない。色は play-chrome.css の変数だけ。 */

.pl-sv-form {
    position: relative;
    width: 100%;
    text-align: left;
}

.pl-sv-body {
    display: grid;
    gap: 8px;
}

.pl-sv-label {
    font-family: var(--pl-dot);
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.04em;
    color: var(--pl-ink);
}

.pl-sv-label::before {
    content: "▶ ";
    color: var(--pl-wood-light);
}

.pl-sv-field {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--pl-white);
    border: 3px solid var(--pl-ink);
    box-shadow: inset 0 0 0 3px var(--pl-parch-light);
}

.pl-sv-form.is-ready .pl-sv-field {
    border-color: var(--pl-blue);
}

.pl-sv-input {
    flex: 1;
    min-width: 0;
    padding: 6px 2px;
    font-family: var(--pl-round);
    font-weight: 700;
    font-size: 22px;
    line-height: 1.4;
    color: var(--pl-ink);
    background: transparent;
    border: 0;
}

.pl-sv-input:focus {
    outline: none;
}

.pl-sv-field:focus-within {
    box-shadow: inset 0 0 0 3px var(--pl-parch-light), 0 0 0 3px var(--pl-gold);
}

.pl-sv-input::placeholder {
    color: #a9997c;
    font-weight: 500;
}

.pl-sv-count {
    flex: none;
    font-family: var(--pl-dot);
    font-weight: 700;
    font-size: 13px;
    color: var(--pl-ink-soft);
}

.pl-sv-count b {
    font-size: 17px;
    color: var(--pl-ink);
}

/* 高さを最初から取っておく（エラーが出ても下の部品が動かない＝CLSゼロ） */
.pl-sv-error {
    margin: 0;
    min-height: 22px;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.5;
    color: #b03030;
}

.pl-sv-error:not(:empty)::before {
    content: "！ ";
}

.pl-sv-submit {
    width: 100%;
}

.pl-sv-submit[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.pl-sv-note {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: var(--pl-ink-soft);
}

.pl-sv-stamp {
    display: block;
    width: fit-content;
    margin: 14px auto 0;
}

.pl-sv-lead {
    padding: 18px 22px;
}

.pl-sv-lead p {
    margin: 6px 0 0;
    line-height: 1.9;
}

/* ---- セーブ窓（結果の1画面目・共有画像と同じ構図） ---- */

.pl-sv-window {
    display: flex;
    flex-direction: column;
    /* 絵の高さに合わせて伸びるので、中身は真ん中に置く（下に大きな空きを作らない） */
    justify-content: center;
    gap: 10px;
    padding: 16px 18px 18px;
    font-family: var(--pl-dot);
}

.pl-sv-win-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin: 0;
    padding-bottom: 8px;
    border-bottom: 3px solid var(--pl-navy-line-soft);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.08em;
    color: var(--pl-gold);
}

.pl-sv-win-no {
    font-size: 13px;
    color: var(--pl-muted);
}

.pl-sv-win-body {
    display: grid;
    gap: 6px;
    margin: 0;
}

.pl-sv-win-row {
    display: grid;
    grid-template-columns: 5.5em minmax(0, 1fr);
    align-items: baseline;
    gap: 10px;
}

.pl-sv-win-row dt {
    font-size: 13px;
    letter-spacing: 0.04em;
    color: var(--pl-muted);
}

.pl-sv-win-row dd {
    margin: 0;
    font-weight: 700;
    font-size: 17px;
    line-height: 1.5;
    color: var(--pl-white);
    word-break: auto-phrase;
}

.pl-sv-win-row--name dd {
    font-size: clamp(22px, 3.4vw, 32px);
    line-height: 1.3;
    text-shadow: var(--pl-outline);
}

.pl-sv-window.is-unknown .pl-sv-win-name {
    color: var(--pl-muted);
    text-shadow: none;
}

.pl-sv-win-state {
    display: grid;
    gap: 4px;
    margin: 4px 0 0;
    padding-top: 10px;
    border-top: 3px solid var(--pl-navy-line-soft);
}

.pl-sv-win-state span {
    font-size: 13px;
    letter-spacing: 0.04em;
    color: var(--pl-muted);
}

.pl-sv-win-state b {
    font-size: clamp(19px, 2.6vw, 26px);
    line-height: 1.35;
    color: var(--sr-accent, var(--pl-gold));
    word-break: auto-phrase;
}

.pl-sv-said-in {
    padding: 16px 20px 18px;
}

.pl-sv-share-note {
    margin: 10px 0 0;
    font-size: 13px;
    line-height: 1.7;
    color: var(--pl-muted);
}

.pl-sv-again {
    display: grid;
    gap: 10px;
    padding: 18px 22px 20px;
}

.pl-sv-again p {
    margin: 0;
    line-height: 1.8;
}

@media (max-width: 720px) {
    .pl-sv-window {
        padding: 14px 14px 16px;
    }

    .pl-sv-win-row {
        grid-template-columns: 4.6em minmax(0, 1fr);
        gap: 8px;
    }

    .pl-sv-input {
        /* iOS が勝手に拡大しないよう 16px 以上を保つ */
        font-size: 19px;
    }
}

/* ------------------------------------------------------------ 型11 タイムアタック（反射神経テスト） */
/* templates/play/shindan_timeattack.html・play/js/timeattack.js。
   PC は「舞台 | 題＋ボタン」、スマホは「題 → 舞台 → ボタン」（押す場所とボタンを1画面に入れる）。
   ★敵のドット絵（64×64）は整数倍でだけ出す（PCは3倍192px・スマホは2倍128px）。出るときにフェードを付けない（出た瞬間から全部見える）。 */

.pl-ta-land {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    grid-template-areas:
        "stage head"
        "stage controls";
    grid-template-rows: auto 1fr;
    gap: 14px 22px;
}

.pl-ta-head {
    grid-area: head;
    padding-bottom: 6px;
}

.pl-ta-head .pl-sd-meta {
    margin-bottom: 6px;
}

.pl-ta-stage {
    grid-area: stage;
    position: relative;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    border: 3px solid var(--pl-gold-dark);
    box-shadow: inset 0 0 0 2px var(--pl-gold), 0 5px 0 #000;
    background: var(--pl-navy-tile);
    cursor: pointer;
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    /* はじめたときに舞台を画面に入れる（固定ヘッダーの下に隠れないように） */
    scroll-margin-top: 84px;
}

.pl-ta-cover,
.pl-ta-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: pixelated;
}

/* はじめる前は表紙。はじめたら通路の背景 */
.pl-ta-cover {
    z-index: 1;
}

.pl-ta-land:not([data-ta-state="idle"]) .pl-ta-cover {
    display: none;
}

.pl-ta-land[data-ta-state="idle"] .pl-ta-pips,
.pl-ta-land[data-ta-state="idle"] .pl-ta-window {
    visibility: hidden;
}

/* 開始は舞台の上に重ねる（はじめる前だけ）。表紙の絵が透けて見える薄い幕 */
.pl-ta-starts {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: rgba(2, 10, 22, 0.28);
    cursor: default;
}

.pl-ta-starts .pl-sound-gate--inline {
    display: flex;
    justify-content: center;
    padding: 0;
}

.pl-ta-intro {
    margin: 0;
    font-weight: 900;
    font-size: 15px;
    line-height: 1.6;
    color: var(--pl-ink);
}

.pl-ta-intro small {
    display: block;
    font-weight: 700;
    font-size: 12.5px;
    color: var(--pl-ink-soft);
}

.pl-ta-land:not([data-ta-state="idle"]) .pl-ta-intro {
    display: none;
}

.pl-ta-flash {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: #fff;
    opacity: 0;
    pointer-events: none;
}

/* 敵が出た瞬間の白い閃き（RPG のエンカウントの画面）。敵そのものは最初のフレームから全部見えている */
.pl-ta-stage.is-shown .pl-ta-flash {
    animation: pl-ta-flash 0.18s steps(3) both;
}

@keyframes pl-ta-flash {
    from {
        opacity: 0.55;
    }

    to {
        opacity: 0;
    }
}

.pl-ta-enemy {
    position: absolute;
    z-index: 3;
    left: 50%;
    top: 40%;
    width: 192px;
    height: 192px;
    margin: -96px 0 0 -96px;
    image-rendering: pixelated;
    filter: drop-shadow(0 6px 0 rgba(2, 10, 22, 0.45));
}

.pl-ta-enemy[hidden] {
    display: none;
}

.pl-ta-pips {
    position: absolute;
    z-index: 4;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pl-ta-pip {
    flex: 1;
    min-width: 0;
    padding: 3px 2px;
    background: rgba(2, 10, 22, 0.82);
    border: 2px solid var(--pl-navy-line);
    color: var(--pl-muted);
    font-family: var(--pl-dot);
    font-weight: 700;
    font-size: 12.5px;
    text-align: center;
    white-space: nowrap;
}

.pl-ta-pip.is-sente {
    border-color: var(--pl-gold);
    color: var(--pl-gold);
}

.pl-ta-pip.is-gote {
    color: var(--pl-white);
}

.pl-ta-window {
    position: absolute;
    z-index: 4;
    left: 3%;
    right: 3%;
    bottom: 4%;
    padding: 10px 16px;
    text-align: center;
}

.pl-ta-msg {
    margin: 0;
    font-family: var(--pl-dot);
    font-weight: 900;
    font-size: 19px;
    line-height: 1.45;
    word-break: auto-phrase;
}

.pl-ta-sub {
    margin: 2px 0 0;
    min-height: 1.5em;
    font-size: 13px;
    color: var(--pl-muted);
}

.pl-ta-land.is-foul .pl-ta-window {
    border-color: var(--pl-red);
}

.pl-ta-land.is-foul .pl-ta-msg {
    color: #ff8a8a;
}

.pl-ta-land.is-foul .pl-ta-stage {
    animation: pl-ta-shake 0.3s steps(4) both;
}

@keyframes pl-ta-shake {
    25% {
        transform: translateX(-6px);
    }

    75% {
        transform: translateX(6px);
    }
}

.pl-ta-controls {
    grid-area: controls;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px;
    text-align: center;
}

.pl-ta-starts {
    width: 100%;
    display: flex;
    justify-content: center;
}

.pl-ta-starts[hidden],
.pl-ta-press[hidden] {
    display: none;
}

.pl-ta-press {
    width: 100%;
    min-height: 72px;
    padding: 12px 20px;
    background: var(--pl-red);
    color: var(--pl-white);
    font-family: var(--pl-dot);
    font-weight: 900;
    font-size: 24px;
    letter-spacing: 0.06em;
    border: 3px solid var(--pl-navy-deep);
    box-shadow: 0 0 0 3px var(--pl-white), 0 6px 0 3px var(--pl-navy-deep);
    cursor: pointer;
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.pl-ta-press:active {
    transform: translateY(3px);
    box-shadow: 0 0 0 3px var(--pl-white), 0 3px 0 3px var(--pl-navy-deep);
}

.pl-ta-press:focus-visible {
    outline: 3px solid var(--pl-gold);
    outline-offset: 5px;
}

.pl-ta-note {
    margin: 0;
    font-size: 12.5px;
    color: var(--pl-ink-soft);
}

.pl-ta-controls .pl-sq-stamp {
    margin: 6px 0;
}

.pl-ta-controls .pl-sd-plays {
    margin: 0;
}

@media (max-width: 960px) {
    .pl-ta-land {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "head"
            "stage"
            "controls";
        grid-template-rows: auto;
        gap: 12px;
    }
}

@media (max-width: 560px) {
    /* スマホは舞台を少し縦に（敵とメッセージ窓が重ならない高さ） */
    .pl-ta-stage {
        aspect-ratio: 4 / 3;
    }

    .pl-ta-enemy {
        width: 128px;
        height: 128px;
        margin: -64px 0 0 -64px;
    }

    .pl-ta-msg {
        font-size: 16px;
    }

    .pl-ta-sub {
        font-size: 12px;
    }

    .pl-ta-window {
        padding: 7px 10px;
    }

    .pl-ta-pip {
        font-size: 11px;
    }

    .pl-ta-press {
        min-height: 64px;
        font-size: 21px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pl-ta-stage.is-shown .pl-ta-flash,
    .pl-ta-land.is-foul .pl-ta-stage {
        animation: none;
    }
}
