/* 見た目の決まり: 地はマイキャリの引退画面と同じ紺と細い金の線。色と光は「当たり」のときだけ強く使う。
   文字はマイキャリと同じ書体(丸ゴシック=操作、明朝=見出しと演出、Rajdhani=数字)。 */
:root {
    --navy: #040a16;
    --ink: #eef4ff;
    --mute: #9fb0cc;
    --dim: #56658a;
    --line: rgba(225,191,121,.34);
    --line2: rgba(225,191,121,.6);
    --gold-t: #fbe7b6;
    --panel: linear-gradient(135deg,#162432,#060e18);
    --champ: linear-gradient(145deg,#ffedb8,#dfbf79 60%,#b18a45);
    --t0: #5a6687;
    --t1: #e6ecfb;
    --t2: #39aaff;
    --t3: #2fdc80;
    --t4: #ff3b52;
    --gold: #ffc93c;
    --goldgrad: linear-gradient(180deg,#fff7c9 0%,#ffe066 30%,#ffa20d 58%,#ffe98a 82%,#fff7c9 100%);
    --rainbow: linear-gradient(100deg,#ff3d6e,#ff9a3d,#ffe14a,#3dff9a,#3dc8ff,#9a6bff,#ff3d6e,#ff9a3d,#ffe14a);
    --ui: "Zen Maru Gothic","Hiragino Maru Gothic ProN","Yu Gothic",sans-serif;
    --disp: "Shippori Mincho","Hiragino Mincho ProN","Yu Mincho",serif;
    --num: "Rajdhani","Avenir Next Condensed","DIN Alternate",sans-serif;
    --gothic: "Noto Sans JP","Hiragino Kaku Gothic ProN","Yu Gothic",sans-serif;
    --lux: "Noto Serif JP","Shippori Mincho","Hiragino Mincho ProN",serif;
    --ease: cubic-bezier(.2,.72,.25,1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent
}

html,body {
    height: 100%;
    background: #02050c;
    color: var(--ink);
    font-family: var(--ui);
    font-weight: 500;
    overflow: hidden;
    overscroll-behavior: none
}

button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    cursor: pointer;
    touch-action: manipulation
}

a {
    color: inherit;
    text-decoration: none
}

/* ---------- 枠 ---------- */
.stage {
    height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    background: #02050c
}

.phone {
    position: relative;
    width: min(100vw,430px);
    height: min(100dvh,932px);
    overflow: hidden;
    container-type: size;
    background: var(--navy);
    isolation: isolate;
    user-select: none;
    -webkit-user-select: none
}

@media (min-width: 720px) {
    .phone {
        border-radius:28px;
        box-shadow: 0 0 0 1px #2a3550,0 0 0 8px #070c18,0 0 0 9px #1c2540,0 40px 90px rgba(0,0,0,.7)
    }
}

.bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    background: linear-gradient(180deg,rgba(4,10,22,.2) 0%,rgba(4,10,22,.74) 30%,rgba(4,10,22,.96) 58%,#040a16 100%), url(../assets/bg-stadium.webp) center top/cover no-repeat
}

/* 光の筋: 見えるのは半径 96.45cqw の円の中だけ(元は 220cqw 四方の 62% で消える)なので、要素をその円が収まる大きさ(193cqw)にした。
   ぼかしの円の大きさは元と同じ長さ(220cqw 四方の対角の半分 = 155.56cqw)で指定しているので、絵は同じ */
.rays {
    position: absolute;
    left: 50%;
    top: 42%;
    width: 193cqw;
    height: 193cqw;
    z-index: -1;
    opacity: 0;
    pointer-events: none;
    translate: -50% -50%;
    border-radius: 50%;
    background: repeating-conic-gradient(from 0deg,rgba(255,201,60,0) 0deg 7deg,rgba(255,201,60,.26) 7deg 10deg);
    -webkit-mask: radial-gradient(circle 155.5635cqw,#000 0%,rgba(0,0,0,.5) 30%,transparent 62%);
    mask: radial-gradient(circle 155.5635cqw,#000 0%,rgba(0,0,0,.5) 30%,transparent 62%);
    transition: opacity .5s
}

.phone.fx-gold .rays {
    opacity: .9;
    animation: spin 14s linear infinite
}

.phone.fx-rainbow .rays,.phone.is-rush .rays {
    opacity: .8;
    animation: spin 9s linear infinite;
    background: repeating-conic-gradient(from 0deg,rgba(255,61,110,.3) 0deg 6deg,rgba(255,225,74,.3) 6deg 12deg,rgba(61,255,154,.3) 12deg 18deg,rgba(61,200,255,.3) 18deg 24deg,rgba(154,107,255,.3) 24deg 30deg)
}

.phone.is-rush .rays {
    opacity: .34
}

@keyframes spin {
    to {
        rotate: 360deg
    }
}

@keyframes flow {
    to {
        background-position: -300% 0
    }
}

/* 軽量化: 虹の帯を「横に4倍の帯を中に置いて transform で動かす」形にしたもの(塗り直しなしで動く)。
   帯の模様の繰り返し(元の幅の3倍)を1回ぶん動かすので、時間は元の flow の半分にすると同じ時刻に同じ位置になる */
@keyframes flowT {
    from {
        transform: translateX(-75%)
    }

    to {
        transform: none
    }
}

.scr {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column
}

.scr.is-on {
    display: flex
}

.scr.is-in {
    animation: scrIn .42s var(--ease) both
}

@keyframes scrIn {
    from {
        opacity: 0;
        transform: scale(1.03)
    }

    to {
        opacity: 1;
        transform: none
    }
}

/* ---------- スロット: 上 ---------- */
.scr-slot {
    padding: max(2.4cqh,env(safe-area-inset-top)) 0 max(2.8cqh,calc(env(safe-area-inset-bottom) + 10px));
    gap: 1.8cqh
}

.hud {
    padding: 0 5cqw
}

.hud-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-end
}

.year {
    display: flex;
    flex-direction: column;
    gap: 3px
}

.year-main {
    font-family: var(--disp);
    font-weight: 800;
    font-size: clamp(23px,6.9cqw,30px);
    line-height: 1.1;
    letter-spacing: .04em;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0,0,0,.7)
}

.year-main.pop {
    animation: yearPop .45s var(--ease)
}

@keyframes yearPop {
    0% {
        transform: translateY(50%);
        opacity: 0
    }

    100% {
        transform: none;
        opacity: 1
    }
}

.year-team {
    font-size: 12px;
    font-weight: 700;
    color: var(--mute);
    letter-spacing: .04em
}

.hud-right {
    display: flex;
    align-items: center;
    gap: 8px
}

.role {
    font-size: 12px;
    font-weight: 700;
    padding: 5px 10px 4px;
    border-radius: 4px;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--gold-t);
    white-space: nowrap;
    letter-spacing: .04em
}

.role[data-kind="rookie"],.role[data-kind="stand"] {
    color: var(--mute);
    border-color: rgba(159,176,204,.3)
}

.role[data-kind="bench"] {
    color: #bfe4ff;
    border-color: rgba(57,170,255,.7)
}

.role[data-kind="reg"] {
    background: linear-gradient(135deg,#a3141f,#5c0810);
    color: #fff;
    border-color: #ff8f9b
}

.role[data-kind="star"] {
    background: var(--champ);
    color: #101c29;
    border-color: #ffeab4;
    box-shadow: inset 0 0 3px 1px #fff2c5
}

.role.pop {
    animation: rolePop .5s cubic-bezier(.2,1.7,.3,1)
}

@keyframes rolePop {
    0% {
        transform: scale(1.6)
    }

    100% {
        transform: none
    }
}

.snd {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--gold-t);
    border: 1px solid var(--line);
    background: var(--panel)
}

.snd .snd-off {
    display: none
}

.snd.is-off .snd-on {
    display: none
}

.snd.is-off .snd-off {
    display: block
}

.snd.is-off {
    color: var(--dim)
}

.rail {
    display: flex;
    margin-top: 1.4cqh;
    align-items: flex-start
}

.rail .grp {
    display: flex;
    flex-direction: column;
    gap: 5px
}

.rail .grp-e {
    flex: 6
}

.rail .grp-j,.rail .grp-h {
    flex: 3
}

.rail .grp + .grp {
    margin-left: 8px
}

.rail .lamps {
    display: flex;
    gap: 3px
}

.rail .lamp {
    flex: 1;
    height: 6px;
    border-radius: 1px;
    background: #18233c;
    position: relative;
    transition: background .3s
}

/* 点滅を独立した層にして、点滅のたびに周りを塗り直さないようにする(見た目は同じ・電池のため 2026-12-01) */
.rail .lamp.now {
    background: #fff;
    box-shadow: 0 0 8px rgba(255,255,255,.9);
    animation: lampNow 1s ease-in-out infinite;
    will-change: opacity
}

@keyframes lampNow {
    50% {
        opacity: .4
    }
}

.rail .lamp[data-t="0"],.rail .lamp[data-t="1"] {
    background: #8d9bb8
}

.rail .lamp[data-t="2"] {
    background: var(--t2)
}

.rail .lamp[data-t="3"] {
    background: var(--t3)
}

.rail .lamp[data-t="4"] {
    background: var(--t4);
    box-shadow: 0 0 8px rgba(255,59,82,.8)
}

.rail .lamp[data-t="5"] {
    background: var(--goldgrad);
    box-shadow: 0 0 10px rgba(255,201,60,.9)
}

.rail .lamp[data-t="6"] {
    background: transparent;
    box-shadow: 0 0 10px #fff
}

.rail .lamp > i {
    display: none;
    position: absolute;
    overflow: hidden
}

.rail .lamp > .lf {
    inset: 0;
    border-radius: 1px
}

.rail .lamp > .lr {
    left: 0;
    right: 0;
    top: -4px;
    height: 1.5px
}

.rail .lamp[data-t="6"] > .lf,.rail .lamp.rush > .lr {
    display: block
}

.rail .lamp > i::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 400%;
    background: var(--rainbow);
    background-size: 75% 100%;
    animation: flowT .8s linear infinite
}

.rail .glabel {
    font-size: 11px;
    font-weight: 700;
    color: var(--dim);
    letter-spacing: .14em
}

/* ---------- スロット: 盤面 ---------- */
.cab {
    position: relative;
    margin: 0 4cqw;
    padding: 1.3cqh 2.6cqw 1.6cqh;
    border-radius: 10px;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: linear-gradient(160deg,rgba(22,36,50,.94),rgba(6,14,24,.96));
    border: 1px solid var(--line2);
    box-shadow: inset 0 0 0 1px rgba(231,201,142,.1),0 14px 30px rgba(0,0,0,.5)
}

.cab-rim {
    position: absolute;
    inset: -2px;
    border-radius: 12px;
    z-index: -1;
    opacity: 0;
    overflow: hidden;
    filter: blur(7px);
    transition: opacity .4s
}

.cab-rim::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 400%;
    background: var(--rainbow);
    background-size: 75% 100%
}

.phone.is-rush .cab-rim {
    opacity: .9
}

.phone.is-rush .cab-rim::before {
    animation: flowT .7s linear infinite
}

.phone.is-rush .cab {
    border-color: #fff
}

.cab[data-edge="2"] {
    animation: edge2 .5s ease-out 2
}

.cab[data-edge="3"] {
    animation: edge3 .5s ease-out 2
}

.cab[data-edge="4"] {
    animation: edge4 .45s ease-out 3
}

.cab[data-edge="5"] {
    animation: edge5 .45s ease-out 3
}

@keyframes edge2 {
    50% {
        border-color: var(--t2);
        box-shadow: 0 0 30px 4px rgba(57,170,255,.8)
    }
}

@keyframes edge3 {
    50% {
        border-color: var(--t3);
        box-shadow: 0 0 30px 4px rgba(47,220,128,.8)
    }
}

@keyframes edge4 {
    50% {
        border-color: var(--t4);
        box-shadow: 0 0 42px 8px rgba(255,59,82,.9)
    }
}

@keyframes edge5 {
    50% {
        border-color: var(--gold);
        box-shadow: 0 0 52px 12px rgba(255,201,60,.95)
    }
}

.marquee {
    height: clamp(26px,3.8cqh,32px);
    display: grid;
    place-items: center;
    overflow: hidden;
    position: relative;
    margin-bottom: 1cqh;
    border-bottom: 1px solid rgba(225,191,121,.22)
}

.marquee span {
    font-family: var(--disp);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .16em;
    color: #c9b88f;
    white-space: nowrap
}

.marquee[data-mode="info"] span {
    color: #fff;
    animation: mqIn .35s var(--ease)
}

.marquee[data-mode="up"] span {
    color: #ff8f9b;
    animation: mqIn .35s var(--ease)
}

.marquee[data-mode="rush"] span {
    font-size: 14px;
    font-weight: 800;
    background: var(--rainbow);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: flow 1.6s linear infinite,mqIn .35s var(--ease);
    will-change: transform
}

@keyframes mqIn {
    from {
        transform: translateY(110%)
    }

    to {
        transform: none
    }
}

.reels {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    grid-auto-rows: minmax(0,1fr);
    gap: 1.2cqh 2cqw;
    flex: 1;
    min-height: 0
}

.reels[data-role="pitcher"] .reel:first-child {
    grid-column: span 2
}

.reel {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    gap: .6cqh
}

.rhead {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px;
    padding: 0 2px;
    height: clamp(22px,3.3cqh,28px)
}

.rname {
    font-size: 12px;
    font-weight: 700;
    color: #d6deef;
    letter-spacing: 0;
    white-space: nowrap
}

.rname.sm {
    font-size: 11px;
    letter-spacing: -.08em
}

.reel.good .rname {
    color: var(--gold-t)
}

.reel.good .rname::after {
    content: var(--good-label,"得意");
    font-size: 9px;
    font-weight: 700;
    margin-left: 4px;
    padding: 0 3px;
    border-radius: 2px;
    border: 1px solid var(--line2);
    color: var(--gold-t);
    vertical-align: 1px
}

.pl-main {
    display: flex;
    align-items: baseline;
    gap: 4px
}

.grade {
    font-family: var(--num);
    font-weight: 700;
    font-size: clamp(22px,6.6cqw,28px);
    line-height: .9;
    transition: color .2s
}

.grade.pop {
    animation: gradePop .6s cubic-bezier(.2,1.8,.3,1)
}

@keyframes gradePop {
    0% {
        transform: scale(2.4);
        filter: brightness(2.2)
    }

    100% {
        transform: none
    }
}

.val {
    font-family: var(--num);
    font-weight: 600;
    font-size: clamp(16px,4.6cqw,19px);
    line-height: 1;
    color: #fff
}

.val small {
    font-size: 10px;
    font-weight: 500;
    color: var(--mute);
    margin-left: 1px;
    font-family: var(--ui)
}

.val.bump {
    animation: valBump .28s ease-out
}

@keyframes valBump {
    40% {
        transform: translateY(-4px);
        color: var(--gold)
    }
}

.win {
    position: relative;
    flex: 1;
    min-height: 0;
    border-radius: 6px;
    overflow: hidden;
    background: linear-gradient(180deg,#01040a 0%,#0a1426 26%,#101d36 50%,#0a1426 74%,#01040a 100%);
    box-shadow: inset 0 0 0 1px rgba(225,191,121,.26),inset 0 14px 14px -4px rgba(0,0,0,.95),inset 0 -14px 14px -4px rgba(0,0,0,.95)
}

.strip {
    position: absolute;
    left: 0;
    right: 0;
    top: -55%;
    height: 210%;
    display: flex;
    flex-direction: column;
    will-change: transform
}

.cell {
    flex: 0 0 33.3333%;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--num);
    font-weight: 700;
    font-size: clamp(40px,15cqw,60px);
    line-height: 1;
    letter-spacing: .01em;
    color: var(--t1);
    opacity: .2;
    transform: scale(.6)
}

.cell.mid {
    opacity: 1;
    transform: none
}

.cell.t0 {
    color: var(--t0)
}

.cell.t1 {
    color: var(--t1)
}

.cell.t2 {
    color: var(--t2);
    text-shadow: 0 0 16px rgba(57,170,255,.85)
}

.cell.t3 {
    color: var(--t3);
    text-shadow: 0 0 16px rgba(47,220,128,.85)
}

.cell.t4 {
    color: #ff5468;
    text-shadow: 0 0 18px rgba(255,59,82,1)
}

.cell.t5 b {
    background: var(--goldgrad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 9px rgba(255,190,40,.95))
}

.cell.t6 b {
    background: var(--rainbow);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: flow 1.1s linear infinite;
    filter: drop-shadow(0 0 10px rgba(255,255,255,.9));
    will-change: opacity
}

.cell b {
    font: inherit;
    display: block
}

.win.spinning .strip {
    top: 0;
    height: 840%;
    animation: reelSpin .24s linear infinite;
    filter: blur(3px)
}

.win.spinning .cell {
    flex-basis: 8.3333%;
    opacity: .7;
    transform: scale(.8)
}

.win.slow .strip {
    animation-duration: .6s;
    filter: blur(1px)
}

@keyframes reelSpin {
    from {
        transform: translateY(-50%)
    }

    to {
        transform: translateY(0)
    }
}

.win.land .strip {
    animation: reelLand .34s cubic-bezier(.2,1.5,.35,1)
}

@keyframes reelLand {
    0% {
        transform: translateY(-30%)
    }

    60% {
        transform: translateY(4%)
    }

    100% {
        transform: none
    }
}

.win.land .cell.mid {
    animation: symPop .5s cubic-bezier(.2,1.8,.3,1)
}

@keyframes symPop {
    0% {
        transform: scale(.55)
    }

    45% {
        transform: scale(1.28)
    }

    100% {
        transform: none
    }
}

.win::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 6px;
    pointer-events: none;
    opacity: 0
}

.win[data-t="2"]::after {
    opacity: 1;
    box-shadow: inset 0 0 0 1px var(--t2),inset 0 0 24px rgba(57,170,255,.38)
}

.win[data-t="3"]::after {
    opacity: 1;
    box-shadow: inset 0 0 0 1px var(--t3),inset 0 0 24px rgba(47,220,128,.42)
}

.win[data-t="4"] {
    background: radial-gradient(90% 70% at 50% 50%,#5a0014 0%,#22000a 60%,#000 100%)
}

.win[data-t="4"]::after {
    opacity: 1;
    box-shadow: inset 0 0 0 1.5px var(--t4),inset 0 0 32px rgba(255,59,82,.62)
}

.win[data-t="5"] {
    background: radial-gradient(90% 70% at 50% 50%,#8a5400 0%,#2a1700 60%,#000 100%)
}

.win[data-t="5"]::after {
    opacity: 1;
    box-shadow: inset 0 0 0 1.5px var(--gold),inset 0 0 36px rgba(255,201,60,.8)
}

.win[data-t="6"] {
    background: radial-gradient(90% 70% at 50% 50%,#3a0a6a 0%,#061a44 60%,#000 100%)
}

.win-ring {
    display: none
}

.win[data-t="6"] .win-ring {
    display: block;
    position: absolute;
    inset: 0;
    border-radius: 6px;
    padding: 2px;
    overflow: hidden;
    -webkit-mask: linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: 2
}

.win[data-t="6"] .win-ring::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 400%;
    background: var(--rainbow);
    background-size: 75% 100%;
    animation: flowT .5s linear infinite
}

.win[data-t="6"]::after {
    opacity: 1;
    box-shadow: inset 0 0 44px rgba(255,255,255,.5)
}

.win.reach {
    animation: reach .32s ease-in-out infinite
}

@keyframes reach {
    50% {
        box-shadow: inset 0 0 0 1.5px var(--gold),inset 0 0 44px rgba(255,201,60,.75)
    }
}

.win.dying {
    animation: dying .12s steps(2) infinite
}

@keyframes dying {
    50% {
        opacity: .35;
        filter: brightness(2.4)
    }
}

.gauge {
    height: 3px;
    background: #0a1322;
    overflow: hidden;
    margin: 0 1px
}

.gauge i {
    display: block;
    height: 100%;
    width: 0;
    transition: width .5s var(--ease),background .3s
}

/* ---------- スロット: 下 ---------- */
.console {
    padding: 0 5cqw;
    display: grid;
    grid-template-columns: minmax(0,1fr) auto minmax(0,1fr);
    align-items: center;
    gap: 8px
}

.total {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px
}

.k {
    font-size: 11px;
    font-weight: 700;
    color: var(--mute);
    letter-spacing: .2em
}

.total-num {
    font-family: var(--num);
    font-weight: 700;
    font-size: clamp(46px,15.5cqw,64px);
    line-height: .86;
    letter-spacing: 0;
    position: relative;
    color: #fff
}

.total-num.bump {
    animation: totalBump .4s cubic-bezier(.2,1.8,.3,1)
}

@keyframes totalBump {
    30% {
        transform: scale(1.12);
        color: var(--gold)
    }
}

.total-delta {
    position: absolute;
    left: 2px;
    bottom: 100%;
    font-size: .34em;
    font-style: normal;
    font-weight: 700;
    color: var(--gold);
    white-space: nowrap;
    opacity: 0
}

.total-delta.show {
    animation: deltaUp 1.5s ease-out both
}

@keyframes deltaUp {
    0% {
        opacity: 0;
        transform: translateY(60%)
    }

    15% {
        opacity: 1;
        transform: none
    }

    78% {
        opacity: 1
    }

    100% {
        opacity: 0;
        transform: translateY(-40%)
    }
}

.total-rank {
    text-align: right;
    font-size: 10.5px;
    font-weight: 700;
    color: var(--mute);
    line-height: 1.5;
    letter-spacing: .02em
}

.total-rank b {
    display: block;
    font-family: var(--num);
    font-size: clamp(25px,7.8cqw,32px);
    font-weight: 700;
    color: #fff;
    line-height: 1
}

.total-rank b small {
    font-family: var(--ui);
    font-size: 12px;
    font-weight: 700;
    margin-left: 2px
}

.total-rank.up b {
    color: var(--gold)
}

/* 回すボタン: マイキャリの「試合へ」と同じ作りの、光沢のある丸いメダル */
.spin {
    position: relative;
    width: clamp(104px,31cqw,132px);
    aspect-ratio: 1;
    border-radius: 50%;
    display: block;
    transition: transform .12s var(--ease)
}

/* 影はメダル(spin-md)だけに付ける。光の筋(md-shine)はメダルの不透明な面の内側だけを通るので、影の形は元と同じ。
   光の筋は別の層にして、回転と透明度だけで動かす(メダルと影を毎コマ描き直さない) */
.spin-md {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    filter: drop-shadow(0 5px 0 #4a050a) drop-shadow(0 12px 12px rgba(0,0,0,.55));
    transition: filter .12s var(--ease)
}

.spin svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible
}

.spin .md-label {
    font-family: var(--ui);
    font-weight: 900;
    font-size: 43px;
    letter-spacing: .02em
}

.spin-md::before {
    content: "";
    position: absolute;
    inset: -7px;
    border-radius: 50%;
    z-index: -1;
    opacity: 0;
    background: conic-gradient(#ff3d6e,#ff9a3d,#ffe14a,#3dff9a,#3dc8ff,#9a6bff,#ff3d6e);
    filter: blur(5px);
    transition: opacity .3s
}

.phone.is-rush .spin-md::before {
    opacity: 1;
    animation: spin 2.4s linear infinite
}

.spin:active,.spin.is-down {
    transform: translateY(4px) scale(.985)
}

.spin:active .spin-md,.spin.is-down .spin-md {
    filter: drop-shadow(0 1px 0 #4a050a) drop-shadow(0 4px 6px rgba(0,0,0,.5))
}

.spin.is-busy .spin-md {
    filter: drop-shadow(0 5px 0 #2b0306) drop-shadow(0 12px 12px rgba(0,0,0,.55)) saturate(.5) brightness(.62)
}

.spin .md-shine {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    animation: mdShine 3.2s ease-in-out infinite
}

@keyframes mdShine {
    0%,60% {
        opacity: 0;
        transform: rotate(-30deg)
    }

    75% {
        opacity: .5
    }

    100% {
        opacity: 0;
        transform: rotate(60deg)
    }
}

.spin.is-busy .md-shine {
    animation: none;
    opacity: 0
}

/* ---------- 演出の重ね ---------- */
.fx {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 30
}

.ov {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 40;
    overflow: hidden
}

.ov-flash {
    position: absolute;
    inset: 0;
    opacity: 0;
    background: #fff
}

.ov-flash.go {
    animation: flash .5s ease-out
}

.ov-flash.long.go {
    animation-duration: 1.1s
}

.ov-flash.gold {
    background: radial-gradient(circle at 50% 45%,#fff 0%,#ffe27a 35%,rgba(255,160,0,0) 75%)
}

.ov-flash.rainbow {
    background: var(--rainbow);
    background-size: 200% 100%
}

@keyframes flash {
    0% {
        opacity: .95
    }

    100% {
        opacity: 0
    }
}

.ov-edge {
    position: absolute;
    inset: 0;
    opacity: 0
}

.ov-edge.go {
    animation: edgeIn 1.1s ease-out
}

.ov-edge[data-c="4"] {
    box-shadow: inset 0 0 90px 24px rgba(255,59,82,.85)
}

.ov-edge[data-c="5"] {
    box-shadow: inset 0 0 100px 30px rgba(255,201,60,.9)
}

.ov-edge[data-c="6"] {
    box-shadow: inset 0 0 110px 34px rgba(255,255,255,.9),inset 0 0 200px 60px rgba(154,107,255,.6)
}

@keyframes edgeIn {
    0% {
        opacity: 0
    }

    18% {
        opacity: 1
    }

    60% {
        opacity: .7
    }

    100% {
        opacity: 0
    }
}

.ov-cut {
    position: absolute;
    left: -10%;
    right: -10%;
    top: 27%;
    height: 22cqh;
    transform: translateX(120%) skewY(-7deg);
    background: linear-gradient(90deg,#3d0010,#b3122a 40%,#ff3b52);
    box-shadow: 0 0 0 1px #ffeab4,0 0 0 6px #040a16,0 0 0 7px rgba(225,191,121,.7),0 0 50px rgba(255,59,82,.7)
}

.ov-cut[data-c="5"] {
    background: linear-gradient(90deg,#4a2a00,#c98a12 40%,#ffd84a);
    box-shadow: 0 0 0 1px #fff,0 0 0 6px #040a16,0 0 0 7px rgba(225,191,121,.9),0 0 50px rgba(255,201,60,.9)
}

.ov-cut[data-c="6"] {
    background: transparent
}

.ov-cut-bg {
    display: none
}

.ov-cut[data-c="6"] .ov-cut-bg {
    display: block;
    position: absolute;
    inset: 0;
    overflow: hidden
}

.ov-cut[data-c="6"] .ov-cut-bg::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 300%;
    background: var(--rainbow);
    background-size: 66.6667% 100%
}

.ov-cut[data-c="6"].go .ov-cut-bg::before {
    animation: cutFlow 1s linear infinite
}

/* 元の flow(帯の幅の2倍の模様を1秒で幅3つぶん動かす)と同じ時刻に同じ位置: 模様1つぶん動いたところで1つぶん戻す */
@keyframes cutFlow {
    0% {
        transform: translateX(-66.6667%)
    }

    66.666% {
        transform: none
    }

    66.667% {
        transform: translateX(-66.6667%)
    }

    100% {
        transform: translateX(-33.3333%)
    }
}

.ov-cut img {
    position: absolute;
    right: 12%;
    bottom: 0;
    height: 150%;
    transform: skewY(7deg);
    filter: drop-shadow(-6px 4px 0 rgba(0,0,0,.4))
}

.ov-cut p {
    position: absolute;
    left: 14%;
    top: 50%;
    transform: translateY(-50%) skewY(7deg) rotate(-7deg);
    font-family: var(--lux);
    font-weight: 900;
    font-size: clamp(30px,9.6cqw,42px);
    color: #fff;
    text-shadow: var(--sh-dark),0 .08em 0 rgba(0,0,0,.6);
    letter-spacing: .06em;
    white-space: nowrap
}

.ov-cut.go {
    animation: cutIn 1.05s var(--ease) both
}

@keyframes cutIn {
    0% {
        transform: translateX(120%) skewY(-7deg)
    }

    16% {
        transform: translateX(0) skewY(-7deg)
    }

    84% {
        transform: translateX(-2%) skewY(-7deg)
    }

    100% {
        transform: translateX(-125%) skewY(-7deg)
    }
}

.ov-word {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    opacity: 0;
    --fs: 23cqw
}

/* 演出の大きな文字: 極太の明朝に、金の面・濃い縁・明るい外縁の三重の袋文字 */
.ov-word .w {
    position: relative;
    display: block;
    font-family: var(--lux);
    font-weight: 900;
    font-size: min(var(--fs),118px);
    line-height: 1.1;
    letter-spacing: .02em;
    text-align: center;
    white-space: pre;
    filter: drop-shadow(0 .07em 0 rgba(16,5,0,.7)) drop-shadow(0 0 30px rgba(255,190,60,.9))
}

.ov-word .w i {
    font-style: normal;
    display: block
}

.ov-word .w-o,.ov-word .w-s {
    position: absolute;
    inset: 0
}

.ov-word .w-o {
    display: none
}

.ov-word .w-s {
    color: #3a0d00;
    text-shadow: var(--sh-s)
}

.ov-word .w-f {
    position: relative;
    background: linear-gradient(180deg,#fffbe0 0%,#ffe680 24%,#ffb800 48%,#fff6c0 52%,#ff9d00 76%,#ffe9a8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent
}

/* 虹の文字: 影は縁(w-s)だけに付けても同じ絵になる(面の文字は縁の内側に収まるため)。影つきの縁は一度だけ描き、流れる面(w-f)は別の層で塗り直す */
.ov-word[data-c="6"] .w {
    filter: none
}

.ov-word[data-c="6"] .w-s {
    filter: drop-shadow(0 .07em 0 rgba(10,0,30,.75)) drop-shadow(0 0 34px rgba(255,255,255,.95))
}

.ov-word[data-c="6"] .w-o {
    color: #fff
}

.ov-word[data-c="6"] .w-s {
    color: #1b0540
}

.ov-word[data-c="6"] .w-f {
    background: linear-gradient(180deg,rgba(255,255,255,.75) 0%,rgba(255,255,255,0) 46%,rgba(255,255,255,.5) 52%,rgba(255,255,255,0) 60%),var(--rainbow);
    background-size: 100% 100%,160% 100%;
    -webkit-background-clip: text;
    background-clip: text
}

/* 流れは文字が出ている間(.go)だけ動かす(消えた後も見えない文字を毎コマ塗り直していたため) */
.ov-word[data-c="6"].go .w-f {
    animation: wflow 1.2s linear infinite;
    will-change: opacity
}

@keyframes wflow {
    to {
        background-position: 0 0,-160% 0
    }
}

.ov-word[data-c="4"] .w-o {
    color: #ffd9de
}

.ov-word[data-c="4"] .w-s {
    color: #4a0010
}

.ov-word[data-c="4"] .w-f {
    background: linear-gradient(180deg,#fff 0%,#ffc2ca 30%,#ff3b52 60%,#ffd9de 100%);
    -webkit-background-clip: text;
    background-clip: text
}

.ov-word small {
    font-size: 15px;
    font-weight: 900;
    letter-spacing: .14em;
    color: #fff;
    text-shadow: var(--sh-dark),0 3px 8px #000
}

.ov-word.go {
    animation: wordIn 1.5s var(--ease) both
}

.ov-word.go.long {
    animation-duration: 2.2s
}

@keyframes wordIn {
    0% {
        opacity: 0;
        transform: scale(3)
    }

    12% {
        opacity: 1;
        transform: scale(.94)
    }

    20% {
        transform: scale(1.03)
    }

    26% {
        transform: scale(1)
    }

    80% {
        opacity: 1;
        transform: scale(1.03)
    }

    100% {
        opacity: 0;
        transform: scale(1.4)
    }
}

.ov-black {
    position: absolute;
    inset: 0;
    background: #000;
    opacity: 0;
    transition: opacity .12s
}

.ov-black.on {
    opacity: 1
}

/* プツン: 画面が1本の線に縮んで消える */
.ov-crt {
    position: absolute;
    inset: 0;
    background: #000;
    opacity: 0
}

.ov-crt i {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 3px;
    margin-top: -1.5px;
    background: #fff;
    box-shadow: 0 0 22px 6px rgba(190,220,255,.9);
    transform: scaleX(0)
}

.ov-crt.on {
    opacity: 1;
    animation: crtIn .16s steps(3) both
}

.ov-crt.on i {
    animation: crtLine .5s cubic-bezier(.7,0,.9,.4) both
}

@keyframes crtIn {
    0% {
        opacity: 0
    }

    40% {
        opacity: .6
    }

    100% {
        opacity: 1
    }
}

@keyframes crtLine {
    0% {
        transform: scaleX(1) scaleY(60)
    }

    22% {
        transform: scaleX(1) scaleY(1)
    }

    70% {
        transform: scaleX(.04) scaleY(1)
    }

    100% {
        transform: scaleX(0) scaleY(1)
    }
}

.phone.shake {
    animation: shake .45s linear
}

.phone.shake-l {
    animation: shake .9s linear
}

.phone.shake-xl {
    animation: shakeXl 1.3s linear
}

@keyframes shake {
    10% {
        transform: translate(-5px,3px)
    }

    25% {
        transform: translate(6px,-4px)
    }

    40% {
        transform: translate(-6px,-2px)
    }

    55% {
        transform: translate(4px,5px)
    }

    70% {
        transform: translate(-3px,-3px)
    }

    85% {
        transform: translate(2px,2px)
    }
}

@keyframes shakeXl {
    5% {
        transform: translate(-12px,8px) scale(1.04)
    }

    14% {
        transform: translate(13px,-9px) scale(1.04)
    }

    23% {
        transform: translate(-11px,-6px) scale(1.03)
    }

    32% {
        transform: translate(9px,10px) scale(1.03)
    }

    42% {
        transform: translate(-8px,5px) scale(1.02)
    }

    54% {
        transform: translate(7px,-6px) scale(1.02)
    }

    66% {
        transform: translate(-5px,-4px)
    }

    80% {
        transform: translate(3px,3px)
    }

    92% {
        transform: translate(-2px,1px)
    }
}

.toast {
    position: absolute;
    left: 50%;
    bottom: 22cqh;
    translate: -50% 0;
    z-index: 60;
    background: rgba(6,14,24,.96);
    border: 1px solid var(--line2);
    border-radius: 4px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 700;
    color: var(--gold-t);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s;
    white-space: nowrap
}

.toast.on {
    opacity: 1
}

/* ---------- 分かれ道 ---------- */
.scr-fork {
    padding: max(2.6cqh,env(safe-area-inset-top)) 5cqw max(2.6cqh,env(safe-area-inset-bottom));
    gap: 1.8cqh;
    background: linear-gradient(180deg,rgba(4,10,22,.2),rgba(4,10,22,.9) 46%)
}

.fork-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline
}

.fork-stage {
    font-family: var(--disp);
    font-weight: 800;
    font-size: clamp(22px,6.6cqw,28px);
    letter-spacing: .06em
}

.fork-ov {
    font-size: 12px;
    font-weight: 700;
    color: var(--mute)
}

.fork-ov b {
    font-family: var(--num);
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    margin-left: 4px
}

.fork-call {
    position: relative;
    height: 25cqh;
    min-height: 150px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #ffeab4;
    background: linear-gradient(120deg,#2b1900 0%,#6b4a12 50%,#b18a45 100%);
    box-shadow: inset 0 0 0 1px rgba(255,242,197,.25),0 0 40px rgba(225,191,121,.3)
}

.fork-burst {
    position: absolute;
    right: -30%;
    top: 50%;
    width: 120%;
    aspect-ratio: 1;
    translate: 0 -50%;
    border-radius: 50%;
    background: repeating-conic-gradient(from 0deg,rgba(255,255,255,0) 0deg 8deg,rgba(255,240,190,.3) 8deg 12deg);
    animation: spin 18s linear infinite;
    -webkit-mask: radial-gradient(circle,#000,transparent 66%);
    mask: radial-gradient(circle,#000,transparent 66%)
}

.fork-scout {
    position: absolute;
    right: -7%;
    bottom: -14%;
    height: 122%;
    filter: drop-shadow(-8px 6px 0 rgba(0,0,0,.3))
}

.scr-fork.is-in .fork-scout {
    animation: scoutIn .6s .12s var(--ease) both
}

@keyframes scoutIn {
    from {
        transform: translateX(60%);
        opacity: 0
    }

    to {
        transform: none;
        opacity: 1
    }
}

.fork-copy {
    position: absolute;
    left: 5cqw;
    top: 50%;
    translate: 0 -50%;
    width: 60%
}

.fork-kicker {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: #101c29;
    background: var(--champ);
    padding: 3px 9px 2px;
    border-radius: 2px;
    letter-spacing: .06em
}

.fork-title {
    font-family: var(--disp);
    font-weight: 800;
    font-size: clamp(23px,7cqw,30px);
    line-height: 1.3;
    margin: 8px 0 8px;
    color: #fff;
    letter-spacing: .04em;
    text-shadow: 0 2px 0 rgba(43,25,0,.9),0 0 16px rgba(0,0,0,.45)
}

.scr-fork.is-in .fork-title {
    animation: titleSlam .5s .2s cubic-bezier(.2,1.6,.3,1) both
}

@keyframes titleSlam {
    from {
        transform: scale(1.7);
        opacity: 0
    }

    to {
        transform: none;
        opacity: 1
    }
}

.fork-say {
    font-family: var(--disp);
    font-size: 14px;
    font-weight: 700;
    color: #fff3cf;
    line-height: 1.6;
    text-shadow: 0 1px 3px rgba(0,0,0,.7)
}

.fork-cards {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3cqw;
    padding-bottom: 5px
}

.fcard {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    text-align: left;
    border: 1px solid var(--edge);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.12),0 5px 0 var(--side),0 16px 26px rgba(0,0,0,.5);
    transition: transform .25s cubic-bezier(.2,1.4,.3,1),opacity .3s,filter .3s,box-shadow .2s
}

.fcard-elite {
    --edge: #ff8f9b;
    --side: #3d040b;
    --tint: rgba(62,4,14,.97)
}

.fcard-public {
    --edge: #8ccaff;
    --side: #04203f;
    --tint: rgba(4,26,56,.97)
}

.scr-fork.is-in .fcard {
    animation: cardUp .5s var(--ease) both
}

.scr-fork.is-in .fcard-elite {
    animation-delay: .34s
}

.scr-fork.is-in .fcard-public {
    animation-delay: .44s
}

@keyframes cardUp {
    from {
        transform: translateY(30%);
        opacity: 0
    }

    to {
        transform: none;
        opacity: 1
    }
}

.fcard-img {
    position: absolute;
    inset: 0;
    background-size: 230% auto;
    background-position: 72% 22%;
    background-repeat: no-repeat
}

.fcard-img::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,transparent 24%,var(--tint) 62%)
}

.fcard-body {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 0 3.6cqw 3.4cqw;
    gap: 3px
}

.fcard-name {
    font-family: var(--disp);
    font-weight: 800;
    font-size: clamp(20px,6cqw,25px);
    line-height: 1.2;
    color: #fff;
    letter-spacing: .04em;
    margin-bottom: 6px;
    text-shadow: 0 2px 6px rgba(0,0,0,.8)
}

.fcard-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-top: 5px;
    padding-top: 5px;
    border-top: 1px solid rgba(255,255,255,.16)
}

.fcard-row em {
    font-style: normal;
    font-size: 11px;
    font-weight: 700;
    color: rgba(255,255,255,.7);
    letter-spacing: .08em
}

.fcard-note {
    font-size: 12.5px;
    font-weight: 700;
    color: #fff
}

.pips {
    display: flex;
    gap: 3px
}

.pips i {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    background: var(--t2)
}

.pips i.off {
    background: rgba(255,255,255,.14)
}

.pips-hot i:nth-child(1) {
    background: var(--t3)
}

.pips-hot i:nth-child(2),.pips-hot i:nth-child(3) {
    background: var(--t4)
}

.pips-hot i:nth-child(4) {
    background: var(--goldgrad);
    box-shadow: 0 0 8px var(--gold)
}

.pips-hot i:nth-child(5) {
    background: transparent;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 8px #fff
}

.pips-hot i:nth-child(5)::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 400%;
    background: var(--rainbow);
    background-size: 75% 100%;
    animation: flowT .6s linear infinite
}

.heads {
    display: flex;
    gap: 3px
}

.heads i {
    width: 10px;
    height: 14px;
    border-radius: 5px 5px 2px 2px;
    background: rgba(255,255,255,.18)
}

.heads i.on {
    background: #fff
}

.fcard-stamp {
    position: absolute;
    right: 8%;
    top: 7%;
    font-family: var(--disp);
    font-weight: 800;
    font-size: 24px;
    color: #fff;
    border: 2px solid #fff;
    border-radius: 3px;
    padding: 1px 10px;
    rotate: 10deg;
    opacity: 0;
    transform: scale(2.4);
    background: rgba(0,0,0,.3);
    letter-spacing: .1em
}

.fcard:active {
    transform: translateY(3px);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.12),0 2px 0 var(--side),0 8px 14px rgba(0,0,0,.5)
}

.fcard.picked {
    transform: scale(1.03);
    z-index: 2;
    border-color: #fff;
    box-shadow: 0 0 0 1px #fff,0 5px 0 var(--side),0 0 44px var(--edge)
}

.fcard.picked .fcard-stamp {
    opacity: 1;
    transform: none;
    transition: transform .28s cubic-bezier(.2,1.6,.3,1),opacity .1s
}

.fcard.lost {
    opacity: .26;
    filter: grayscale(1);
    transform: scale(.95)
}

.fork-foot {
    text-align: center;
    font-family: var(--disp);
    font-size: 12px;
    font-weight: 700;
    color: var(--mute);
    letter-spacing: .08em
}

/* ---------- 結果 ---------- */
.scr-result {
    background: linear-gradient(180deg,rgba(4,10,22,.55),rgba(4,10,22,.96) 50%)
}

.res-scroll {
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: max(2.2cqh,env(safe-area-inset-top)) 5cqw max(3cqh,env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    gap: 12px;
    scrollbar-width: none
}

.res-scroll::-webkit-scrollbar {
    display: none
}

.card-wrap {
    perspective: 1100px
}

.card {
    --mx: 50%;
    --my: 30%;
    --rx: 0deg;
    --ry: 0deg;
    --c1: #ffedb8;
    --c2: #b18a45;
    --glow: rgba(225,191,121,.5);
    position: relative;
    aspect-ratio: 5/7.25;
    border-radius: 12px;
    overflow: hidden;
    transform: rotateX(var(--rx)) rotateY(var(--ry));
    transition: transform .18s ease-out;
    background: #060e18;
    box-shadow: 0 22px 46px rgba(0,0,0,.65),0 0 54px var(--glow)
}

.scr-result.is-in .card {
    animation: cardFlip .9s var(--ease) both
}

@keyframes cardFlip {
    0% {
        transform: rotateY(-92deg) scale(.8);
        filter: brightness(3)
    }

    60% {
        filter: brightness(1.5)
    }

    100% {
        transform: none;
        filter: none
    }
}

.card[data-tier="n"] {
    --c1: #d5dcec;
    --c2: #74809c;
    --glow: rgba(130,150,200,.22)
}

.card[data-tier="r"] {
    --c1: #bfe4ff;
    --c2: #2f8fe0;
    --glow: rgba(57,170,255,.4)
}

.card[data-tier="sr"] {
    --c1: #ffedb8;
    --c2: #b18a45;
    --glow: rgba(225,191,121,.55)
}

.card[data-tier="ssr"],.card[data-tier="ur"] {
    --c1: #fff;
    --c2: #dfe8ff;
    --glow: rgba(255,255,255,.5)
}

.card-art {
    position: absolute;
    inset: 0;
    background: url(../assets/cover-fielder.webp) 78% 12%/auto 62% no-repeat,#04061a
}

.card[data-role="pitcher"] .card-art {
    background-image: url(../assets/cover-pitcher.webp)
}

.card-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,rgba(4,8,20,.94) 0%,rgba(4,8,20,.5) 44%,rgba(4,8,20,0) 72%), linear-gradient(180deg,rgba(4,8,20,.5) 0%,rgba(4,8,20,0) 14%,rgba(4,8,20,0) 30%,rgba(4,8,20,.93) 47%,#040814 60%)
}

.card[data-tier="ur"] .card-art {
    filter: grayscale(1) contrast(1.2) brightness(.8)
}

.card-in {
    position: absolute;
    inset: 0;
    padding: 5.4% 6% 4.8%;
    display: flex;
    flex-direction: column
}

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: center
}

.card-logo {
    font-family: var(--disp);
    font-weight: 800;
    font-size: 12px;
    letter-spacing: .14em;
    color: var(--c1)
}

.card-life {
    font-size: 11px;
    font-weight: 700;
    color: var(--gold-t);
    border: 1px solid var(--line2);
    background: rgba(6,14,24,.7);
    padding: 2px 9px 1px;
    border-radius: 2px;
    letter-spacing: .04em
}

.card-hero {
    margin-top: auto;
    flex: 0 0 auto
}

.card-hero-l {
    display: grid;
    grid-template-columns: auto minmax(0,1fr);
    column-gap: 8px;
    align-items: center
}

.card-emblem {
    grid-row: 1/3;
    width: 13cqw;
    display: block;
    margin-left: -1%;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,.7))
}

.card[data-tier="n"] .card-emblem {
    filter: grayscale(1) brightness(.85) drop-shadow(0 4px 10px rgba(0,0,0,.7))
}

.card[data-tier="r"] .card-emblem {
    filter: hue-rotate(170deg) saturate(.9) drop-shadow(0 4px 10px rgba(0,0,0,.7))
}

.card-title {
    font-family: var(--disp);
    font-weight: 800;
    font-size: clamp(26px,8.6cqw,36px);
    line-height: 1.16;
    letter-spacing: .05em;
    white-space: nowrap;
    background: linear-gradient(180deg,#fff 0%,var(--c1) 45%,var(--c2) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 2px 0 rgba(0,0,0,.85)) drop-shadow(0 0 14px var(--glow))
}

.card[data-tier="ssr"] .card-title,.card[data-tier="ur"] .card-title,.card[data-tier="ssr"] .cs b,.card[data-tier="ur"] .cs b {
    background: var(--rainbow);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    animation: flow 2s linear infinite;
    will-change: opacity
}

.card-name {
    font-size: 12.5px;
    font-weight: 700;
    margin-top: 3px;
    display: flex;
    gap: 8px;
    align-items: center;
    color: #fff
}

.card-name span + span {
    font-size: 11px;
    font-weight: 700;
    color: var(--gold-t);
    border: 1px solid var(--line2);
    padding: 1px 7px 0;
    border-radius: 2px
}

/* 総合と順位を同じ大きさで並べる */
.card-score {
    display: grid;
    grid-template-columns: 38fr 62fr;
    margin-top: 2.2%;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: rgba(4,8,20,.55)
}

.cs {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 5px 2px 2px 8px;
    min-width: 0
}

.cs + .cs {
    border-left: 1px solid var(--line);
    padding-left: 12px
}

.cs span {
    font-size: 10.5px;
    font-weight: 700;
    color: #c8d2e8;
    letter-spacing: .08em;
    white-space: nowrap
}

.cs b {
    font-family: var(--num);
    font-weight: 700;
    font-size: clamp(40px,13.4cqw,54px);
    line-height: .92;
    letter-spacing: 0;
    white-space: nowrap;
    align-self: flex-start;
    background: linear-gradient(180deg,#fff 10%,var(--c1) 55%,var(--c2) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 2px 0 rgba(0,0,0,.9)) drop-shadow(0 0 16px var(--glow))
}

.cs b em {
    font-style: normal
}

.cs b small {
    font-family: var(--ui);
    font-size: .3em;
    font-weight: 900;
    margin-left: 3px;
    letter-spacing: 0
}

.card-mid {
    display: grid;
    grid-template-columns: 36% 1fr;
    gap: 4%;
    align-items: center;
    margin-top: 1.5%
}

.radar {
    width: 100%;
    display: block;
    overflow: visible
}

.radar .web {
    fill: none;
    stroke: rgba(225,191,121,.2);
    stroke-width: 1
}

.radar .spoke {
    stroke: rgba(225,191,121,.14);
    stroke-width: 1
}

.radar .shape {
    fill: var(--c2);
    fill-opacity: .36;
    stroke: var(--c1);
    stroke-width: 2;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 8px var(--glow));
    transform-origin: 100px 100px
}

.scr-result.is-in .radar .shape {
    animation: radarIn .8s .7s cubic-bezier(.2,1.3,.3,1) both
}

@keyframes radarIn {
    from {
        transform: scale(0)
    }

    to {
        transform: none
    }
}

.card[data-tier="ssr"] .radar .shape,.card[data-tier="ur"] .radar .shape {
    fill: url(#rbw);
    stroke: #fff
}

.card-abil {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px 12px
}

.card[data-role="pitcher"] .card-abil {
    grid-template-columns: 1fr;
    gap: 3px
}

.card-abil li {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: baseline;
    gap: 5px;
    border-bottom: 1px solid rgba(225,191,121,.18);
    padding-bottom: 2px
}

.card-abil span {
    font-size: 11px;
    font-weight: 700;
    color: #d6deef;
    white-space: nowrap;
    letter-spacing: -.02em
}

.card-abil b {
    font-family: var(--num);
    font-weight: 700;
    font-size: 22px;
    line-height: 1
}

.card-abil i {
    font-family: var(--num);
    font-style: normal;
    font-weight: 600;
    font-size: 16px;
    color: #fff;
    min-width: 1.5em;
    text-align: right
}

.card-abil i small {
    font-family: var(--ui);
    font-size: 9px;
    font-weight: 500;
    color: var(--mute);
    margin-left: 1px
}

.card[data-role="pitcher"] .card-abil i {
    min-width: 3.1em
}

.card-hist {
    list-style: none;
    margin-top: 2.4%;
    display: grid;
    gap: 3px
}

.card-hist li {
    display: grid;
    grid-template-columns: 3.3em 1fr auto;
    gap: 8px;
    align-items: center;
    font-size: 12px;
    font-weight: 700;
    color: #eef4ff
}

.card-hist li em {
    font-style: normal;
    font-size: 11px;
    font-weight: 700;
    color: var(--gold-t);
    border: 1px solid var(--line);
    border-radius: 2px;
    text-align: center;
    white-space: nowrap
}

.card-hist li u {
    text-decoration: none;
    font-size: 11px;
    font-weight: 700;
    color: var(--c1)
}

.card-stat {
    margin-top: 2.2%;
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 6px 10px 4px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: rgba(225,191,121,.06)
}

.card-stat span {
    font-size: 11px;
    font-weight: 700;
    color: var(--gold-t);
    white-space: nowrap;
    letter-spacing: .06em
}

.card-stat b {
    font-family: var(--num);
    font-weight: 700;
    font-size: 22px;
    color: #fff;
    margin-right: 1px
}

.card-stat i {
    font-style: normal;
    font-size: 11px;
    font-weight: 700;
    color: #c8d2e8;
    margin-right: 7px
}

.card-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2%
}

.card-set {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    color: var(--mute)
}

.card-set b {
    font-family: var(--ui);
    font-weight: 900;
    font-size: 13px;
    color: #fff;
    opacity: 0;
    transition: opacity .3s
}

.card-set b.on {
    opacity: 1
}

.setpips {
    display: flex;
    gap: 3px
}

.setpips i {
    width: 8px;
    height: 13px;
    border-radius: 1px;
    background: rgba(255,255,255,.14);
    transform: skewX(-14deg)
}

.setpips i.on {
    background: linear-gradient(180deg,var(--c1),var(--c2));
    box-shadow: 0 0 8px var(--glow)
}

.card[data-tier="ssr"] .setpips i.on,.card[data-tier="ur"] .setpips i.on {
    background: transparent;
    position: relative;
    overflow: hidden
}

.card[data-tier="ssr"] .setpips i.on::before,.card[data-tier="ur"] .setpips i.on::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 400%;
    background: var(--rainbow);
    background-size: 75% 100%;
    animation: flowT .7s linear infinite
}

.card-meta {
    font-size: 11px;
    font-weight: 700;
    color: #c8d2e8
}

.card-meta b {
    font-family: var(--num);
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin: 0 1px
}

.card-holo {
    position: absolute;
    inset: 0;
    pointer-events: none;
    mix-blend-mode: color-dodge;
    opacity: 0;
    background: radial-gradient(60% 45% at var(--mx) var(--my),rgba(255,255,255,.55),transparent 70%), linear-gradient(115deg,transparent 20%,rgba(255,61,110,.4) 34%,rgba(255,225,74,.4) 42%,rgba(61,255,154,.4) 50%,rgba(61,200,255,.4) 58%,rgba(154,107,255,.4) 66%,transparent 80%);
    background-size: 100% 100%,260% 260%;
    background-position: 0 0,var(--mx) var(--my)
}

.card[data-tier="sr"] .card-holo {
    opacity: .3
}

.card[data-tier="ssr"] .card-holo {
    opacity: .7
}

.card[data-tier="ur"] .card-holo {
    opacity: .9
}

.card-frame {
    position: absolute;
    inset: 0;
    border-radius: 12px;
    padding: 2.5px;
    pointer-events: none;
    background: linear-gradient(160deg,var(--c1),var(--c2) 30%,var(--c1) 52%,var(--c2) 76%,var(--c1));
    -webkit-mask: linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude
}

.card[data-tier="ssr"] .card-frame {
    background: transparent;
    overflow: hidden;
    padding: 3.5px
}

.card[data-tier="ssr"] .card-frame::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 400%;
    background: var(--rainbow);
    background-size: 75% 100%;
    animation: flowT 1.2s linear infinite
}

.card[data-tier="ur"] .card-frame {
    background: conic-gradient(from 0deg,#111,#ff3d6e,#111,#ffe14a,#111,#3dff9a,#111,#3dc8ff,#111,#9a6bff,#111);
    padding: 3.5px;
    animation: hue 3s linear infinite
}

@keyframes hue {
    to {
        filter: hue-rotate(360deg)
    }
}

.card[data-tier="ur"] {
    background: #000
}

.card[data-tier="ur"] .card-shade {
    background: linear-gradient(90deg,rgba(0,0,0,.95) 0%,rgba(0,0,0,.5) 44%,rgba(0,0,0,0) 72%),linear-gradient(180deg,rgba(0,0,0,.5) 0%,rgba(0,0,0,0) 14%,rgba(0,0,0,0) 30%,rgba(0,0,0,.93) 47%,#000 60%)
}

/* 結果画面のボタン(ユーザー提供のお手本どおり): 青く光るダウンロード枠 / 紺の枠ボタン / 赤の「もう1回」。金は使わない */
.cta {
    position: relative;
    display: grid;
    grid-template-columns: auto auto minmax(0,1fr);
    align-items: center;
    column-gap: 11px;
    padding: 17px 34px 17px 14px;
    border-radius: 13px;
    color: #fff;
    font-family: var(--gothic);
    margin: 4px 0 6px;
    border: 1.5px solid #3ea6ff;
    background: radial-gradient(120% 150% at 60% 48%,#1663c8 0%,#0e4594 34%,#0a2a60 64%,#07183a 100%);
    box-shadow: 0 0 0 1px rgba(8,30,72,.9),0 0 16px rgba(46,150,255,.8),0 0 44px rgba(30,112,255,.38),inset 0 0 26px rgba(70,160,255,.32),inset 0 1px 0 rgba(190,228,255,.5);
    transition: transform .12s var(--ease),filter .12s
}

.cta:active {
    transform: scale(.985);
    filter: brightness(1.12)
}

.cta > * {
    position: relative
}

.cta-stripes {
    position: absolute!important;
    inset: 0;
    border-radius: 12px;
    pointer-events: none;
    background: linear-gradient(122deg,transparent 0 74%,rgba(80,175,255,.8) 74% 79%,transparent 79% 82.5%,rgba(80,175,255,.62) 82.5% 88%,transparent 88% 91.5%,rgba(80,175,255,.46) 91.5% 100%);
    -webkit-mask: linear-gradient(0deg,#000 0%,rgba(0,0,0,.55) 40%,transparent 82%);
    mask: linear-gradient(0deg,#000 0%,rgba(0,0,0,.55) 40%,transparent 82%)
}

.cta-flare {
    position: absolute!important;
    height: 2.5px;
    border-radius: 2px;
    pointer-events: none;
    background: linear-gradient(90deg,transparent,#9bd6ff 22%,#fff 50%,#9bd6ff 78%,transparent);
    box-shadow: 0 0 10px 2px rgba(130,205,255,1),0 0 30px 7px rgba(60,150,255,.75)
}

.cta-flare-t {
    left: 10%;
    right: 26%;
    top: -2px
}

.cta-flare-b {
    left: 20%;
    right: 34%;
    bottom: -2px
}

.cta img {
    width: 14.6cqw;
    height: 14.6cqw;
    max-width: 66px;
    max-height: 66px;
    border-radius: 22%;
    box-shadow: 0 3px 10px rgba(0,8,30,.6)
}

.cta-div {
    width: 1px;
    align-self: stretch;
    margin: 3px 0;
    background: linear-gradient(180deg,transparent,rgba(210,230,255,.5) 18%,rgba(210,230,255,.5) 82%,transparent)
}

.cta-t {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0
}

.cta-t small {
    font-size: clamp(9.5px,2.76cqw,12px);
    font-weight: 500;
    color: rgba(255,255,255,.92);
    white-space: nowrap;
    letter-spacing: -.01em
}

.cta-t b {
    font-size: clamp(15px,4.55cqw,20px);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0;
    white-space: nowrap;
    text-shadow: 0 1px 6px rgba(0,20,60,.6)
}

.cta-free {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 3px;
    font-size: 11px;
    font-weight: 500;
    color: rgba(214,232,255,.85);
    letter-spacing: .04em
}

.cta-free em {
    font-style: normal;
    font-size: 11.5px;
    font-weight: 700;
    color: #06224f;
    background: linear-gradient(180deg,#fff,#bfe2ff);
    border-radius: 999px;
    padding: 1px 10px 2px;
    letter-spacing: .14em;
    text-indent: .14em;
    box-shadow: 0 0 10px rgba(120,195,255,.7)
}

.cta-go {
    position: absolute!important;
    right: 10px;
    top: 50%;
    margin-top: -11px;
    width: 18px;
    height: 22px;
    filter: drop-shadow(0 0 6px rgba(140,205,255,.9))
}

.res-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px
}

.btn {
    min-height: 52px;
    border-radius: 10px;
    font-family: var(--gothic);
    font-size: 15.5px;
    font-weight: 700;
    letter-spacing: .05em;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 1.5px solid rgba(158,186,228,.6);
    background: linear-gradient(180deg,rgba(27,48,88,.88),rgba(12,25,54,.92));
    box-shadow: inset 0 1px 0 rgba(200,222,255,.22),inset 0 0 18px rgba(60,110,190,.16),0 4px 12px rgba(0,0,0,.45);
    transition: transform .12s var(--ease),filter .12s
}

.btn:active {
    transform: scale(.98);
    filter: brightness(1.15)
}

.btn-again {
    min-height: 62px;
    margin: 2px 0 6px;
    border-radius: 13px;
    border: 0;
    font-family: var(--gothic);
    color: #fff;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 16px;
    padding-top: 15px;
    background: linear-gradient(168deg,#ea3838 0%,#d2232a 34%,#b5151d 72%,#a40f18 100%);
    box-shadow: inset 0 1.5px 0 rgba(255,150,150,.7),inset 0 0 0 1px rgba(255,84,84,.28),inset 0 -8px 16px rgba(110,0,10,.28),0 4px 0 #6d0a10,0 12px 20px rgba(0,0,0,.45);
    transition: transform .1s var(--ease),box-shadow .1s var(--ease)
}

.btn-again b {
    font-size: 23px;
    font-weight: 900;
    letter-spacing: .02em;
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(90,0,8,.5)
}

.btn-again small {
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: .02em
}

.btn-again:active {
    transform: translateY(3px);
    box-shadow: inset 0 1.5px 0 rgba(255,150,150,.6),0 1px 0 #6d0a10,0 4px 8px rgba(0,0,0,.4)
}

/* ================= ここから下は完成版で足した画面 ================= */
[hidden] {
    display: none!important
}

:root {
    --steel: rgba(158,186,228,.6);
    --blue: #3ea6ff
}

body:not(.is-demo) .demo {
    display: none
}

/* ---------- はじめの画面 ---------- */
.scr-title {
    padding: max(3cqh,env(safe-area-inset-top)) 6cqw max(2.6cqh,env(safe-area-inset-bottom));
    justify-content: space-between;
    background: linear-gradient(180deg,rgba(4,10,22,0) 0%,rgba(4,10,22,.55) 34%,rgba(4,10,22,.94) 60%)
}

.tt-top {
    text-align: center;
    padding-top: 4.5cqh
}

.tt-lead {
    display: inline-block;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--gold-t);
    letter-spacing: .16em;
    padding: 4px 14px 3px;
    border-top: 1px solid var(--line2);
    border-bottom: 1px solid var(--line2)
}

.tt-logo {
    margin: 2.6cqh 0 2cqh;
    font-weight: 400
}

.tt-logo .w {
    position: relative;
    display: inline-block;
    font-family: var(--lux);
    font-weight: 900;
    font-size: min(17.5cqw,84px);
    line-height: 1.14;
    letter-spacing: .03em;
    filter: drop-shadow(0 .06em 0 rgba(16,5,0,.75)) drop-shadow(0 0 28px rgba(255,190,60,.55))
}

.tt-logo .w i {
    font-style: normal;
    display: block
}

.tt-logo .w-s {
    position: absolute;
    inset: 0;
    color: #3a0d00;
    text-shadow: var(--sh-s)
}

.tt-logo .w-f {
    position: relative;
    background: linear-gradient(180deg,#fffbe0 0%,#ffe680 24%,#ffb800 48%,#fff6c0 52%,#ff9d00 76%,#ffe9a8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent
}

.tt-sub {
    font-size: 13px;
    font-weight: 700;
    color: #d6deef;
    letter-spacing: .03em;
    line-height: 1.7
}

.tt-form {
    display: flex;
    flex-direction: column;
    gap: 1.7cqh;
    font-family: var(--gothic)
}

.tt-field {
    display: flex;
    flex-direction: column;
    gap: 6px
}

.tt-field > span {
    font-size: 11.5px;
    font-weight: 700;
    color: #b7c6e2;
    letter-spacing: .1em
}

.tt-field input {
    height: 50px;
    border-radius: 10px;
    padding: 0 14px;
    font: 700 17px var(--gothic);
    color: #fff;
    outline: 0;
    width: 100%;
    border: 1.5px solid var(--steel);
    background: linear-gradient(180deg,rgba(12,25,54,.92),rgba(20,38,74,.9));
    box-shadow: inset 0 2px 6px rgba(0,0,0,.45)
}

.tt-field input::placeholder {
    color: rgba(190,206,236,.42);
    font-weight: 500;
    font-size: 13.5px;
    letter-spacing: .02em
}

.tt-field input:focus {
    border-color: var(--blue);
    box-shadow: inset 0 2px 6px rgba(0,0,0,.45),0 0 14px rgba(46,150,255,.6)
}

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

.chips {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 8px
}

.seg button,.chips button {
    min-height: 46px;
    border-radius: 10px;
    font: 700 15px var(--gothic);
    letter-spacing: .04em;
    color: rgba(230,238,255,.82);
    border: 1.5px solid var(--steel);
    background: linear-gradient(180deg,rgba(27,48,88,.88),rgba(12,25,54,.92));
    box-shadow: inset 0 1px 0 rgba(200,222,255,.2),0 3px 8px rgba(0,0,0,.4);
    transition: transform .1s var(--ease)
}

.chips button {
    min-height: 42px;
    font-size: 13.5px;
    letter-spacing: 0
}

.seg button:active,.chips button:active {
    transform: scale(.97)
}

.seg button.on,.chips button.on {
    color: #fff;
    border-color: var(--blue);
    background: radial-gradient(120% 150% at 50% 40%,#1663c8 0%,#0e4594 45%,#0a2a60 100%);
    box-shadow: 0 0 0 1px rgba(8,30,72,.9),0 0 14px rgba(46,150,255,.75),inset 0 0 16px rgba(70,160,255,.3),inset 0 1px 0 rgba(190,228,255,.5)
}

.tt-start {
    width: 100%;
    margin-top: .6cqh
}

.tt-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 24px
}

.tt-link {
    font: 500 12px var(--gothic);
    color: #b7c6e2;
    border-bottom: 1px solid rgba(183,198,226,.5);
    padding: 2px 0
}

#ttBest {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--mute)
}

.tt-lang {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: 1px solid rgba(183,198,226,.35);
    border-radius: 4px;
    color: #b7c6e2;
    font: 500 12px var(--gothic);
    padding: 3px 18px 3px 8px;
    background-image: linear-gradient(45deg,transparent 50%,#b7c6e2 50%),linear-gradient(135deg,#b7c6e2 50%,transparent 50%);
    background-position: calc(100% - 10px) 52%,calc(100% - 6px) 52%;
    background-size: 4px 4px;
    background-repeat: no-repeat
}

.tt-lang option {
    color: #000
}

#ttBest b {
    font-family: var(--num);
    font-size: 15px;
    color: #fff;
    margin: 0 2px
}

/* ---------- 大会・背番号発表 ---------- */
.scr-cup {
    padding: max(3cqh,env(safe-area-inset-top)) 6cqw max(2.8cqh,calc(env(safe-area-inset-bottom) + 8px));
    gap: 1.8cqh;
    background: linear-gradient(180deg,rgba(4,10,22,.25),rgba(4,10,22,.92) 40%)
}

.cup-head {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 3px
}

.cup-head span {
    font-size: 12px;
    font-weight: 700;
    color: var(--mute);
    letter-spacing: .08em
}

.cup-head h2 {
    font-family: var(--disp);
    font-weight: 800;
    font-size: clamp(24px,7.2cqw,30px);
    letter-spacing: .08em;
    color: #fff
}

.num {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px
}

.num p {
    font-family: var(--disp);
    font-weight: 800;
    font-size: 18px;
    letter-spacing: .3em;
    margin-right: -.3em;
    color: var(--gold-t)
}

.num b {
    font-family: var(--num);
    font-weight: 700;
    font-size: min(46cqw,200px);
    line-height: .9;
    color: #5a6687;
    transition: color .2s
}

.num span {
    font-size: 17px;
    font-weight: 900;
    letter-spacing: .12em;
    min-height: 1.5em;
    color: #fff
}

.num[data-kind="star"] b {
    background: var(--goldgrad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 26px rgba(255,190,40,.9))
}

.num[data-kind="reg"] b {
    color: #ff5468;
    text-shadow: 0 0 30px rgba(255,59,82,.9)
}

.num[data-kind="bench"] b {
    color: var(--t2);
    text-shadow: 0 0 26px rgba(57,170,255,.8)
}

.num[data-kind="stand"] b {
    color: #7684a6;
    font-family: var(--disp);
    font-weight: 800;
    font-size: min(30cqw,130px);
    line-height: 1.25;
    white-space: nowrap;
    letter-spacing: .06em
}

/* 「なし」は2文字なので小さくして1行に収める */
.num.pop b {
    animation: symPop .55s cubic-bezier(.2,1.8,.3,1)
}

.ladder {
    list-style: none;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column-reverse;
    justify-content: center;
    gap: clamp(4px,.8cqh,7px)
}

.ladder li {
    --c: #8d9bb8;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    height: clamp(32px,5.1cqh,44px);
    padding: 0 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #7f8cab;
    border: 1px solid rgba(158,186,228,.22);
    background: rgba(10,20,40,.6);
    transition: border-color .2s,color .2s,background .2s
}

.ladder li em {
    font-style: normal;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .1em;
    opacity: 0
}

.ladder li.now {
    color: #fff;
    border-color: #fff;
    box-shadow: 0 0 16px rgba(255,255,255,.5);
    animation: lampNow .5s ease-in-out infinite;
    will-change: opacity
}

.ladder li.win {
    color: #fff;
    border-color: var(--c);
    background: linear-gradient(90deg,color-mix(in srgb,var(--c) 26%,transparent),rgba(10,20,40,.6));
    box-shadow: 0 0 12px color-mix(in srgb,var(--c) 45%,transparent)
}

.ladder li.win em {
    opacity: 1;
    color: var(--c)
}

.ladder li.lose {
    color: #aab4cc;
    border-color: #56658a;
    background: rgba(30,36,54,.8)
}

.ladder li.lose em {
    opacity: 1;
    color: #aab4cc
}

.ladder li[data-d="1"] {
    --c: var(--t2)
}

.ladder li[data-d="2"] {
    --c: var(--t3)
}

.ladder li[data-d="3"] {
    --c: var(--t4)
}

.ladder li[data-d="4"] {
    --c: var(--gold)
}

.ladder li[data-d="5"] {
    --c: #fff
}

.ladder li.win[data-d="5"] {
    border-image: var(--rainbow) 1;
    border-radius: 0
}

.cup-result {
    text-align: center;
    min-height: 9cqh;
    display: flex;
    flex-direction: column;
    gap: 5px;
    justify-content: center;
    opacity: 0;
    transform: scale(1.25);
    transition: opacity .25s,transform .35s cubic-bezier(.2,1.6,.3,1)
}

.cup-result.on {
    opacity: 1;
    transform: none
}

.cup-result b {
    font-family: var(--lux);
    font-weight: 900;
    font-size: clamp(24px,7.6cqw,32px);
    letter-spacing: .04em;
    color: #fff;
    text-shadow: var(--sh-dark)
}

.cup-result[data-top] b {
    background: var(--goldgrad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: none;
    filter: drop-shadow(0 2px 0 #2a1700) drop-shadow(0 0 18px rgba(255,190,60,.8))
}

.cup-result small {
    font-size: 13px;
    font-weight: 700;
    color: #d6deef;
    font-family: var(--num);
    letter-spacing: .04em
}

.cup-btn,.path-btn,.pro-btn {
    width: 100%;
    align-items: center;
    padding-top: 0;
    margin: 0
}

/* ---------- 進路・ドラフト ---------- */
.scr-path {
    padding: max(3cqh,env(safe-area-inset-top)) 6cqw max(2.8cqh,calc(env(safe-area-inset-bottom) + 8px));
    gap: 2cqh;
    text-align: center;
    background: linear-gradient(180deg,rgba(4,10,22,.4),rgba(4,10,22,.94) 45%)
}

.path-k {
    font-size: 12px;
    font-weight: 700;
    color: var(--mute);
    letter-spacing: .14em;
    padding-top: 1cqh
}

.path-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.6cqh
}

.rv {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .4s,transform .45s var(--ease)
}

.rv.on {
    opacity: 1;
    transform: none
}

.p-title {
    font-family: var(--disp);
    font-weight: 800;
    font-size: clamp(26px,8cqw,34px);
    letter-spacing: .08em;
    line-height: 1.4;
    color: #fff
}

.p-sub {
    font-size: 14px;
    font-weight: 700;
    color: #d6deef;
    line-height: 1.8
}

.p-round {
    font-family: var(--disp);
    font-weight: 800;
    font-size: 20px;
    letter-spacing: .14em;
    color: var(--gold-t);
    padding: 6px 18px;
    border-top: 1px solid var(--line2);
    border-bottom: 1px solid var(--line2)
}

.p-name {
    font-family: var(--lux);
    font-weight: 900;
    font-size: min(13.5cqw,62px);
    line-height: 1.2;
    color: #fff;
    text-shadow: var(--sh-dark);
    letter-spacing: .04em;
    white-space: nowrap
}

.p-name.sm {
    font-size: min(10cqw,46px)
}

.p-team {
    font-size: 17px;
    font-weight: 900;
    color: var(--gold-t);
    letter-spacing: .08em
}

.p-from {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--mute);
    letter-spacing: .06em
}

/* ---------- プロ編 ---------- */
.scr-pro {
    padding: max(3cqh,env(safe-area-inset-top)) 5cqw max(2.8cqh,calc(env(safe-area-inset-bottom) + 8px));
    gap: 1.6cqh;
    background: linear-gradient(180deg,rgba(4,10,22,.4),rgba(4,10,22,.95) 38%)
}

.pro-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px
}

.pro-head span {
    font-size: 13px;
    font-weight: 700;
    color: var(--gold-t);
    letter-spacing: .04em;
    white-space: nowrap
}

.pro-head span:last-child {
    color: var(--mute)
}

.pro-head b {
    font-family: var(--disp);
    font-weight: 800;
    font-size: clamp(26px,7.8cqw,32px);
    letter-spacing: .06em;
    color: #fff
}

.pro-list {
    list-style: none;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 5px;
    -webkit-mask: linear-gradient(180deg,transparent 0,#000 16%);
    mask: linear-gradient(180deg,transparent 0,#000 16%)
}

.pro-list li {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: 3.4em auto 1fr;
    align-items: center;
    gap: 8px;
    padding: 7px 10px 6px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #e6ecfb;
    border: 1px solid rgba(158,186,228,.24);
    background: rgba(10,20,40,.72);
    animation: rowIn .28s var(--ease) both
}

@keyframes rowIn {
    from {
        opacity: 0;
        transform: translateY(16px)
    }

    to {
        opacity: 1;
        transform: none
    }
}

.pro-list .n {
    font-family: var(--num);
    font-weight: 600;
    font-size: 14px;
    color: var(--mute)
}

.pro-list .lv {
    font-size: 11px;
    font-weight: 900;
    padding: 2px 7px 1px;
    border-radius: 3px;
    border: 1px solid var(--steel);
    color: #c8d2e8;
    white-space: nowrap
}

.pro-list .lv[data-l="一軍"] {
    background: linear-gradient(135deg,#c1202b,#7a0d15);
    border-color: #ff8f9b;
    color: #fff
}

.pro-list .lv[data-l="育成"] {
    border-color: #56658a;
    color: #8d9bb8
}

.pro-list .ln {
    font-family: var(--num);
    font-size: 14.5px;
    font-weight: 600;
    letter-spacing: .02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.pro-list .fl {
    grid-column: 1/-1;
    display: flex;
    flex-wrap: wrap;
    gap: 5px
}

.pro-list .fl i {
    font-style: normal;
    font-size: 11.5px;
    font-weight: 900;
    color: var(--gold-t);
    border: 1px solid var(--line2);
    border-radius: 3px;
    padding: 1px 8px 0
}

.pro-list li[data-hot="4"] {
    border-color: var(--t4);
    box-shadow: 0 0 14px rgba(255,59,82,.5)
}

.pro-list li[data-hot="5"] {
    border-color: var(--gold);
    box-shadow: 0 0 16px rgba(255,201,60,.7)
}

.pro-list li[data-hot="6"] {
    border-color: #fff;
    box-shadow: 0 0 20px rgba(255,255,255,.75)
}

.pro-list li[data-hot="5"] .fl i,.pro-list li[data-hot="6"] .fl i {
    background: var(--goldgrad);
    color: #3a1a00;
    border-color: #fff3b0
}

.pro-total {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: rgba(4,8,20,.55);
    opacity: .28;
    transition: opacity .4s
}

.pro-total.on {
    opacity: 1
}

.pro-total div {
    padding: 6px 4px 3px;
    text-align: center
}

.pro-total div + div {
    border-left: 1px solid var(--line)
}

.pro-total span {
    display: block;
    font-size: 10.5px;
    font-weight: 700;
    color: #c8d2e8;
    letter-spacing: .08em
}

.pro-total b {
    font-family: var(--num);
    font-weight: 700;
    font-size: clamp(30px,9.6cqw,40px);
    line-height: 1;
    color: #fff
}

/* ---------- 結果のまわり ---------- */
.after {
    text-align: center;
    font-family: var(--disp);
    font-size: 13.5px;
    font-weight: 700;
    color: #d6deef;
    letter-spacing: .04em;
    line-height: 1.6
}

.cta-note {
    text-align: center;
    font-size: 11px;
    font-weight: 500;
    color: var(--mute);
    margin-top: -6px
}

.res-foot {
    text-align: center;
    padding-top: 4px
}

.card.h4 .card-mid {
    grid-template-columns: 30% 1fr;
    margin-top: 1%
}

.card.h4 .card-abil {
    gap: 3px 12px
}

.card.h4 .card-abil b {
    font-size: 19px
}

.card.h4 .card-hist {
    gap: 2px;
    margin-top: 1.6%
}

.card.h4 .card-hist li {
    font-size: 11.5px;
    grid-template-columns: 4.2em 1fr auto
}

.card.h4 .card-stat {
    margin-top: 1.6%;
    padding: 4px 10px 3px
}

.card-stat {
    flex-wrap: nowrap;
    white-space: nowrap
}

/* ---------- 確率と出典 ---------- */
.sheet {
    position: absolute;
    inset: 0;
    z-index: 80;
    background: rgba(2,5,12,.72);
    display: flex;
    align-items: flex-end
}

.sheet-in {
    width: 100%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    background: #07101f;
    border-top: 1.5px solid var(--steel);
    border-radius: 16px 16px 0 0;
    font-family: var(--gothic)
}

.sheet-in header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px 10px
}

.sheet-in h2 {
    font-family: var(--disp);
    font-weight: 800;
    font-size: 19px;
    letter-spacing: .08em
}

.sheet-in header button {
    font: 700 13px var(--gothic);
    color: #fff;
    padding: 7px 14px 6px;
    border-radius: 8px;
    border: 1.5px solid var(--steel);
    background: linear-gradient(180deg,rgba(27,48,88,.88),rgba(12,25,54,.92))
}

.sheet-body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 18px max(22px,env(safe-area-inset-bottom));
    font-size: 13px;
    line-height: 1.85;
    color: #d6deef
}

.sheet-body h3 {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin: 18px 0 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(158,186,228,.3)
}

.sheet-body table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px
}

.sheet-body td,.sheet-body th {
    padding: 6px 4px;
    border-bottom: 1px solid rgba(158,186,228,.16);
    text-align: left;
    font-weight: 500;
    vertical-align: top
}

.sheet-body th {
    font-weight: 700;
    color: #b7c6e2;
    font-size: 11.5px
}

.sheet-body td.r,.sheet-body th.r {
    text-align: right;
    font-family: var(--num);
    font-size: 14.5px;
    font-weight: 600;
    white-space: nowrap
}

.sheet-body .tg {
    display: inline-block;
    font-size: 10.5px;
    font-weight: 700;
    padding: 0 6px;
    border-radius: 3px;
    border: 1px solid var(--steel);
    color: #b7c6e2;
    margin-left: 4px;
    white-space: nowrap
}

.sheet-body .tg.m {
    border-color: #2fdc80;
    color: #8ff0b8
}

.sheet-body a {
    color: #8ccaff
}

.sheet-body p {
    margin: 6px 0
}

.sw {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    margin-right: 6px;
    vertical-align: -1px
}

/* ---------- 見本メニュー ---------- */
.demo {
    width: 300px;
    max-height: min(100dvh,932px);
    overflow: auto;
    color: #c8d2e8
}

.demo-toggle {
    display: none
}

.demo h1 {
    font-family: var(--disp);
    font-weight: 800;
    font-size: 19px;
    color: #fff;
    line-height: 1.4;
    letter-spacing: .04em
}

.demo h2 {
    font-size: 12px;
    font-weight: 700;
    color: var(--mute);
    margin: 18px 0 8px;
    letter-spacing: .1em
}

.demo-note {
    font-size: 12px;
    line-height: 1.8;
    color: var(--mute);
    margin-top: 10px
}

.demo-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 6px
}

.demo-row button {
    font-size: 13px;
    font-weight: 700;
    padding: 8px 12px 7px;
    border-radius: 4px;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--gold-t)
}

.demo-row button:hover {
    border-color: #e1bf79
}

.demo-row button.armed {
    border-color: #fff;
    color: #fff
}

.aud-row {
    display: grid;
    grid-template-columns: 5.1em repeat(3,minmax(0,1fr));
    gap: 4px;
    align-items: center;
    margin-bottom: 5px
}

.aud-stop {
    font-size: 12px;
    font-weight: 700;
    padding: 6px 12px 5px;
    border-radius: 4px;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--gold-t);
    margin-top: 2px
}

.aud-row span {
    font-size: 12px;
    font-weight: 700;
    color: #c8d2e8
}

.aud-row button {
    font-size: 10px;
    font-weight: 700;
    line-height: 1.3;
    padding: 5px 2px 4px;
    border-radius: 4px;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--mute);
    display: flex;
    flex-direction: column;
    align-items: center
}

.aud-row button b {
    font-family: var(--num);
    font-size: 15px;
    color: var(--gold-t);
    line-height: 1
}

.aud-row button.on {
    border-color: #ffeab4;
    background: var(--champ);
    color: #101c29
}

.aud-row button.on b {
    color: #101c29
}

.demo .d-t2 {
    color: var(--t2)
}

.demo .d-t3 {
    color: var(--t3)
}

.demo .d-t4 {
    color: var(--t4)
}

.demo .d-t5 {
    color: var(--gold)
}

.demo .d-t6 {
    background: var(--rainbow);
    background-size: 300% 100%;
    color: #fff;
    text-shadow: 0 1px 2px #000
}

@media (max-width: 719px) {
    .stage {
        display:block
    }

    .demo {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 99;
        width: auto;
        max-height: none;
        pointer-events: none
    }

    .demo-toggle {
        display: block;
        pointer-events: auto;
        position: fixed;
        left: 50%;
        top: max(3px,env(safe-area-inset-top));
        translate: -50% 0;
        font-size: 10px;
        font-weight: 700;
        padding: 2px 9px;
        border-radius: 2px;
        background: rgba(255,255,255,.1);
        color: rgba(255,255,255,.55)
    }

    .demo-body {
        display: none;
        pointer-events: auto;
        background: #060e18;
        border-top: 1px solid var(--line2);
        padding: 16px 16px 26px;
        max-height: 70dvh;
        overflow: auto
    }

    .demo.open .demo-body {
        display: block
    }
}

@media (prefers-reduced-motion:reduce) {
    .rays,.cab-rim::before,.fork-burst,.spin-md::before,.spin .md-shine {
        animation: none!important
    }

    .phone.shake,.phone.shake-l,.phone.shake-xl {
        animation: none
    }
}

/* 背の低い画面(iPhone SE など)ではじめの画面を詰める */
@container (max-height:720px) {
    .tt-top {
        padding-top: 1cqh
    }

    .tt-lead {
        font-size: 11.5px;
        padding: 3px 12px 2px
    }

    .tt-logo {
        margin: 1.4cqh 0 1cqh
    }

    .tt-logo .w {
        font-size: min(14.5cqw,66px);
        line-height: 1.1
    }

    .tt-sub {
        font-size: 12px;
        line-height: 1.5
    }

    .tt-form {
        gap: 1.3cqh
    }

    .tt-field {
        gap: 4px
    }

    .tt-field input {
        height: 44px;
        font-size: 16px
    }

    .seg button {
        min-height: 42px
    }

    .chips button {
        min-height: 38px
    }

    .chips {
        gap: 6px
    }
}

.cta-note a {
    color: #9fd0ff;
    text-decoration: underline;
    text-underline-offset: 2px
}

/* ---------- Xのアプリ内ブラウザ(下に投稿が出ていて画面が短い状態) ----------
   Xは画面の下に操作バー(×・アドレス・更新)を重ねて出すので、その分(約56px)を空けて上に詰める。
   画面が十分に高いとき(全画面で開いたとき)は何も変えない。 */
@media (max-height: 720px) {
    html.in-x .stage {
        align-items:flex-start
    }

    html.in-x .phone {
        height: calc(100dvh - 56px)
    }
}

/* 高さ600px以下の画面でも、すべての画面が切れずに収まるよう詰める */
@container (max-height:600px) {
    .scr-title {
        padding-bottom: 6px
    }

    .tt-top {
        padding-top: 0
    }

    .tt-lead {
        font-size: 10.5px;
        padding: 2px 10px 1px
    }

    .tt-logo {
        margin: .9cqh 0 .5cqh
    }

    .tt-logo .w {
        font-size: min(12cqw,52px);
        line-height: 1.08
    }

    .tt-sub {
        font-size: 11px;
        line-height: 1.4
    }

    .tt-form {
        gap: .9cqh
    }

    .tt-field {
        gap: 3px
    }

    .tt-field > span {
        font-size: 10.5px
    }

    .tt-field input {
        height: 40px
    }

    .seg button {
        min-height: 38px
    }

    .chips button {
        min-height: 33px;
        font-size: 13px
    }

    .chips {
        gap: 5px
    }

    .tt-start {
        min-height: 52px;
        padding-top: 11px;
        margin: 0
    }

    .tt-start b {
        font-size: 21px
    }

    .tt-foot {
        min-height: 18px
    }

    .scr-cup,.scr-path,.scr-pro {
        gap: 1.2cqh
    }

    .cup-head h2 {
        font-size: 22px
    }

    .cup-head span {
        font-size: 11px
    }

    .ladder {
        gap: 2px
    }

    .ladder li {
        height: clamp(21px,4.3cqh,30px);
        font-size: 12px;
        padding: 0 12px;
        border-radius: 6px
    }

    .cup-result {
        min-height: 0;
        gap: 2px
    }

    .cup-btn,.path-btn,.pro-btn {
        min-height: 52px
    }

    .pro-list {
        gap: 3px
    }

    .pro-list li {
        padding: 4px 10px 3px
    }

    .pro-total b {
        font-size: 28px
    }

    .pro-total div {
        padding: 4px 4px 2px
    }
}

/* ---------- 分かれ道: カードを選ぶ → 下のボタンで決める(連打での誤タップを防ぐ) ----------
   決めるボタンは、直前の画面(大会)の「次へ」と同じ場所・同じ形。カードを選ぶまでは押せない */
.scr-fork {
    padding-bottom: max(2.8cqh,calc(env(safe-area-inset-bottom) + 8px))
}

.fork-btn {
    flex: 0 0 auto;
    width: 100%;
    align-items: center;
    padding-top: 0;
    margin: 0
}

.fork-btn b {
    font-size: 21px
}

.fork-btn:disabled {
    background: linear-gradient(168deg,#3a4763 0%,#2c3852 40%,#222c44 100%);
    color: rgba(214,224,244,.62);
    box-shadow: inset 0 1px 0 rgba(200,222,255,.16),0 3px 0 #131a2c,0 8px 14px rgba(0,0,0,.35);
    transform: none
}

.fork-btn:disabled b {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .06em;
    text-shadow: none
}

.fork-btn.ready {
    animation: forkReady .34s cubic-bezier(.2,1.6,.3,1)
}

@keyframes forkReady {
    0% {
        transform: scale(.96)
    }

    60% {
        transform: scale(1.03)
    }

    100% {
        transform: none
    }
}

.fcard.sel {
    transform: translateY(-3px);
    z-index: 2;
    border-color: #fff;
    box-shadow: 0 0 0 1.5px #fff,0 5px 0 var(--side),0 0 30px var(--edge)
}

.fcard.sel::after {
    content: var(--sel-label,"選択中");
    position: absolute;
    left: 8px;
    top: 8px;
    font-family: var(--gothic);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .14em;
    text-indent: .14em;
    color: #06224f;
    background: linear-gradient(180deg,#fff,#bfe2ff);
    border-radius: 999px;
    padding: 2px 11px 3px;
    box-shadow: 0 2px 6px rgba(0,0,0,.45)
}

.fcard.unsel {
    opacity: .55;
    filter: saturate(.55)
}

.fork-foot {
    margin-top: -.6cqh
}

@container (max-height:720px) {
    .fork-foot {
        display: none
    }
}

@container (max-height:600px) {
    .fork-call {
        height: 23cqh;
        min-height: 132px
    }

    .fork-title {
        font-size: 20px;
        margin: 4px 0 4px
    }

    .fork-say {
        font-size: 12px;
        line-height: 1.4
    }

    .fork-btn {
        min-height: 52px
    }

    .fcard-name {
        font-size: 19px;
        margin-bottom: 3px
    }

    .fcard-row {
        margin-top: 3px;
        padding-top: 3px
    }
}

/* 日本語以外(2026-12-01): 英字は字間を詰め、長い見出しが2行や画面の外にはみ出さないようにする(日本語の見た目は変えない) */
html:not([lang="ja"]) :is(.cup-head h2,.p-title,.fork-title,.fcard-name,.year-main,.fork-stage) {
    letter-spacing: .01em
}

html:not([lang="ja"]) .cta-t b {
    font-size: clamp(14px,4.2cqw,18.5px)
}

html:not([lang="ja"]) .fcard-stamp {
    font-size: 20px;
    letter-spacing: .04em
}
