/* VOID GACHA — 卡池召喚介面（參考手遊抽卡 UI） */

.gacha-hub {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: -8px -12px 0;
    min-height: calc(100vh - 120px);
    background: linear-gradient(165deg, #0a0618 0%, #12082a 40%, #060610 100%);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(127, 0, 255, 0.25);
}

.gacha-hub-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: rgba(0, 0, 0, 0.45);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.gacha-hub-top h2 {
    margin: 0;
    font-size: clamp(1.35rem, 2.8vw, 1.75rem);
    font-weight: 900;
    letter-spacing: 0.22em;
    background: linear-gradient(90deg, #fff, #c4a0ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gacha-currency-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.gacha-cur {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.gacha-cur.gold { color: #ffd700; border-color: rgba(255, 215, 0, 0.35); }
.gacha-cur.silver { color: #a8d4ff; border-color: rgba(100, 180, 255, 0.35); }

.gacha-cur-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.1em;
    font-size: 10px;
    font-weight: 900;
    padding: 1px 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.12);
}

.gacha-hub-body {
    display: grid;
    grid-template-columns: 88px 1fr;
    flex: 1;
    min-height: 420px;
}

/* 左側卡池列表 */
.gacha-banner-sidebar {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 6px;
    background: rgba(0, 0, 0, 0.55);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    overflow-y: auto;
    max-height: 65vh;
}

.gacha-banner-tile {
    position: relative;
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 6px 4px;
    text-align: center;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.04);
    transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
}

.gacha-banner-tile:hover {
    transform: scale(1.03);
    border-color: rgba(255, 255, 255, 0.2);
}

.gacha-banner-tile.active {
    border-color: #ffd700;
    box-shadow: 0 0 16px rgba(255, 215, 0, 0.35);
    background: rgba(127, 0, 255, 0.2);
}

.gacha-banner-tile .bn-thumb {
    font-size: 22px;
    line-height: 1.2;
    display: block;
}

.gacha-banner-tile .bn-name {
    font-size: 8px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.2;
    margin-top: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gacha-banner-tile .bn-tag {
    position: absolute;
    top: 2px;
    left: 2px;
    font-size: 7px;
    padding: 1px 4px;
    border-radius: 4px;
    background: #ff0055;
    color: #fff;
    font-weight: 800;
}

.gacha-banner-tile[data-theme="limited"] .bn-tag { background: #ff3366; }
.gacha-banner-tile[data-theme="cosmic"] .bn-tag { background: #7f00ff; }
.gacha-banner-tile[data-theme="silver"] .bn-tag { background: #4488cc; }

/* 中央卡池主視覺 */
.gacha-banner-main {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 12px 14px 16px;
    overflow: hidden;
}

.gacha-banner-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 60% at 70% 30%, rgba(127, 0, 255, 0.35), transparent 60%),
        radial-gradient(ellipse 50% 40% at 20% 80%, rgba(0, 200, 255, 0.15), transparent 50%);
    pointer-events: none;
}

.gacha-banner-bg.theme-cosmic { background: radial-gradient(ellipse at 60% 40%, rgba(120, 40, 255, 0.4), transparent 55%); }
.gacha-banner-bg.theme-ocean { background: radial-gradient(ellipse at 60% 40%, rgba(0, 168, 204, 0.35), transparent 55%); }
.gacha-banner-bg.theme-gundam { background: radial-gradient(ellipse at 60% 40%, rgba(204, 32, 32, 0.3), transparent 55%); }
.gacha-banner-bg.theme-chinese { background: radial-gradient(ellipse at 40% 35%, rgba(196, 30, 58, 0.35), rgba(212, 160, 23, 0.2), transparent 55%); }
.gacha-banner-bg.theme-greek { background: radial-gradient(ellipse at 55% 40%, rgba(46, 94, 158, 0.38), rgba(232, 197, 71, 0.22), transparent 55%); }
.gacha-banner-bg.theme-robot { background: radial-gradient(ellipse at 60% 40%, rgba(100, 140, 200, 0.35), transparent 55%); }
.gacha-banner-bg.theme-monster { background: radial-gradient(ellipse at 60% 40%, rgba(85, 170, 34, 0.3), transparent 55%); }
.gacha-banner-bg.theme-limited { background: radial-gradient(ellipse at 60% 40%, rgba(255, 0, 128, 0.35), transparent 55%); }
.gacha-banner-bg.theme-rainbow {
    background: radial-gradient(ellipse at 50% 50%, rgba(255, 0, 128, 0.25), transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(0, 255, 255, 0.2), transparent 40%);
}

.gacha-banner-content {
    position: relative;
    z-index: 2;
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 150px;
    gap: 12px;
    align-items: start;
}

.gacha-banner-info h3 {
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 900;
    text-shadow: 0 0 20px rgba(127, 0, 255, 0.8);
}

.gacha-banner-info .bn-sub {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.gacha-pity-banner {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 6px;
    background: linear-gradient(90deg, rgba(255, 0, 85, 0.5), rgba(127, 0, 255, 0.5));
    border: 1px solid rgba(255, 255, 255, 0.25);
    margin-bottom: 8px;
}

.gacha-rate-line {
    font-size: 12px;
    color: rgba(255, 220, 150, 0.95);
    margin: 4px 0;
}

.gacha-rate-line strong { color: #ffd700; }

.gacha-banner-desc {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.5;
    max-width: 280px;
    margin-top: 8px;
}

.gacha-timer-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(255, 51, 102, 0.25);
    border: 1px solid rgba(255, 100, 150, 0.5);
    font-size: 11px;
    color: #ffb3c6;
}

.gacha-featured-mount {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.gacha-featured-mount .card-3d-wrap {
    width: 130px;
    height: 186px;
    filter: drop-shadow(0 0 30px rgba(255, 215, 0, 0.4));
}

.gacha-featured-mount .card-premium-wrap {
    width: 148px;
    height: 208px;
}

.pack-format {
    font-size: 9px;
    color: rgba(196, 160, 255, 0.85);
    letter-spacing: 0.12em;
    margin-top: 2px;
}

/* 底部召喚列 */
.gacha-summon-bar {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.gacha-util-btns {
    display: flex;
    gap: 8px;
}

.gacha-util-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.gacha-util-btn:hover { background: rgba(127, 0, 255, 0.4); }

.gacha-summon-actions {
    display: flex;
    gap: 10px;
}

.btn-summon {
    min-width: 130px;
    padding: 12px 18px;
    border: 2px solid rgba(255, 215, 100, 0.8);
    border-radius: 12px;
    background: linear-gradient(160deg, rgba(40, 30, 10, 0.9), rgba(80, 50, 10, 0.85));
    color: #fff;
    cursor: pointer;
    text-align: center;
    transition: transform 0.15s, box-shadow 0.2s;
}

.btn-summon:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255, 215, 0, 0.35);
}

.btn-summon.ten {
    border-color: #ffd700;
    background: linear-gradient(160deg, #553300, #aa7700 40%, #332200);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.25);
}

.btn-summon .sum-label {
    display: block;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 1px;
}

.btn-summon .sum-cost {
    display: block;
    font-size: 11px;
    color: rgba(255, 220, 150, 0.9);
    margin-top: 4px;
}

/* 機率詳情抽屜 */
.gacha-detail-drawer {
    margin: 0 12px 12px;
    padding: 12px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.gacha-detail-drawer h4 {
    margin: 0 0 8px;
    font-size: 13px;
    color: #c4a0ff;
}

.gacha-detail-rates {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.gacha-rate-chip {
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
}

.gacha-rate-chip.scheme-tag {
    background: rgba(255, 200, 80, 0.15);
    color: #ffd080;
    border: 1px solid rgba(255, 200, 80, 0.35);
}

.gacha-soft-pity {
    color: #7dffb8;
    font-size: 0.92em;
}

/* —— 抽卡結果全屏（動畫見 pull-cinema.css） —— */

.pull-celebration {
    width: 100%;
    max-width: 520px;
    text-align: center;
    padding: 16px;
    position: relative;
}

.pull-celebration::before {
    content: "";
    position: absolute;
    inset: -20px -10px auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.5), transparent);
    pointer-events: none;
}

.pull-title {
    margin: 0 0 8px;
    font-size: 26px;
    font-weight: 900;
    background: linear-gradient(90deg, #ffd700, #ff6ec7, #00ffff);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: crystalShine 3s linear infinite;
}

.pull-subtitle {
    font-family: Orbitron, monospace;
    font-size: 11px;
    letter-spacing: 0.2em;
    color: rgba(0, 255, 255, 0.65);
    margin-bottom: 16px;
}

.pull-hero-spotlight {
    margin: 0 auto 16px;
    min-height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.pull-hero-spotlight.is-collapsed {
    display: none;
    min-height: 0;
    margin: 0;
}

.pull-hero-spotlight .card-3d-wrap {
    width: 200px;
    height: 286px;
    filter: drop-shadow(0 0 40px rgba(255, 215, 0, 0.5));
}

.pull-hero-spotlight--solo {
    width: 100%;
    max-width: min(280px, 82vw);
    min-height: 0;
    margin: 0 auto 20px;
    box-sizing: border-box;
}

.pull-hero-spotlight--solo .void-card-frame,
.pull-hero-spotlight--solo .void-card-frame.pull-result-card-art {
    width: 100% !important;
    max-width: min(280px, 82vw);
    margin: 0 auto;
    flex-shrink: 0;
}

.pull-hero-spotlight--solo .card-3d-wrap,
.pull-hero-spotlight--solo .void-card-tile {
    width: min(280px, 82vw) !important;
    height: auto !important;
    max-width: 100%;
    max-height: min(400px, 52vh);
    aspect-ratio: 2 / 3;
    filter: drop-shadow(0 0 48px rgba(255, 215, 0, 0.55));
}

.pull-hero-spotlight--solo .card-3d-wrap.small {
    width: min(200px, 72vw) !important;
    height: auto !important;
    max-height: min(300px, 48vh);
    aspect-ratio: 2 / 3;
}

.pull-results-grid.is-solo-hidden {
    display: none;
    margin: 0;
}

.pull-results-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px 14px;
    max-width: min(720px, 96vw);
    margin: 0 auto 16px;
}

.pull-results-grid.pull-results-grid--eleven,
.pull-results-grid.pull-results-grid--wide {
    max-width: min(1140px, 96vw);
    gap: 14px 16px;
}

/* 寶箱／少張數結果：依實際張數排欄，避免 5 張卡擠在 6 欄裡過小 */
.pull-results-grid.pull-results-grid--few {
    grid-template-columns: repeat(var(--pull-cols, 5), minmax(0, 1fr));
    max-width: min(1120px, 98vw);
    gap: clamp(14px, 2vw, 22px) clamp(16px, 2.5vw, 24px);
}

.pull-results-grid.pull-results-grid--cols-2 {
    max-width: min(560px, 94vw);
}

.pull-results-grid.pull-results-grid--cols-3 {
    max-width: min(900px, 96vw);
}

.pull-results-grid.pull-results-grid--cols-4 {
    max-width: min(1000px, 97vw);
}

.pull-results-grid.pull-results-grid--cols-5 {
    max-width: min(1120px, 98vw);
}

.pull-results-grid.pull-results-grid--cols-6 {
    max-width: min(1140px, 98vw);
}

.pull-results-grid.pull-results-grid--few .pull-result-slot.is-best {
    transform: scale(1.04);
}

.pull-results-grid.single {
    grid-template-columns: 1fr;
    max-width: 200px;
}

.pull-result-slot {
    position: relative;
    border-radius: 10px;
    overflow: visible;
    transition: transform 0.3s ease;
    min-height: 0;
}

.pull-result-slot .pull-card-mount {
    width: 100%;
    aspect-ratio: 5 / 7;
    display: flex;
    align-items: stretch;
    justify-content: center;
}

.pull-result-slot.is-best {
    transform: scale(1.05);
    z-index: 2;
}

.pull-result-slot--zoom {
    cursor: zoom-in;
}

.pull-result-slot--zoom:hover {
    transform: scale(1.06);
    z-index: 4;
}

.pull-result-slot--zoom.is-best:hover {
    transform: scale(1.1);
}

.pull-result-slot--zoom:focus-visible {
    outline: 2px solid rgba(255, 215, 0, 0.5);
    outline-offset: 2px;
    border-radius: 10px;
}

.pull-results-hint {
    margin: -6px auto 14px;
    font-family: Orbitron, 'Noto Sans TC', sans-serif;
    font-size: 11px;
    letter-spacing: 0.12em;
    color: rgba(0, 255, 255, 0.55);
}

.pull-hero-spotlight--zoom {
    cursor: zoom-in;
}

.pull-result-slot .card-3d-wrap,
.pull-result-slot .void-card-tile {
    width: 100% !important;
    max-width: 100%;
    height: 100% !important;
    margin: 0 auto;
    aspect-ratio: 5 / 7;
}

.pull-result-slot .card-3d-wrap.card-bag-fill .card-face,
.pull-result-slot .void-card-tile .card-face {
    width: 100%;
    height: 100%;
}

.pull-result-slot.rarity-UR {
    filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.9));
    animation: urSlotPulse 1.5s ease-in-out infinite;
}

.pull-result-slot.rarity-SSR { filter: drop-shadow(0 0 8px rgba(255, 110, 199, 0.7)); }
.pull-result-slot.rarity-SR { filter: drop-shadow(0 0 6px rgba(187, 134, 252, 0.5)); }

@keyframes urSlotPulse {
    0%, 100% { filter: drop-shadow(0 0 12px rgba(255, 215, 0, 0.7)); }
    50% { filter: drop-shadow(0 0 20px rgba(255, 0, 128, 1)); }
}

.pull-rarity-badge {
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 8;
    display: block;
    padding: 0;
    border: none;
    background: none;
    color: var(--pull-rarity-color, #e8ecff);
    font-family: Orbitron, "Segoe UI", sans-serif;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.18em;
    line-height: 1;
    text-shadow:
        0 0 12px color-mix(in srgb, var(--pull-rarity-color, #fff) 65%, transparent),
        0 1px 2px rgba(0, 0, 0, 0.9);
    pointer-events: none;
}

.pull-rarity-badge.rarity-N { --pull-rarity-color: #8b93a8; }
.pull-rarity-badge.rarity-R { --pull-rarity-color: #4da3ff; }
.pull-rarity-badge.rarity-SR { --pull-rarity-color: #7eb8ff; }
.pull-rarity-badge.rarity-SSR { --pull-rarity-color: #ff9a3c; }
.pull-rarity-badge.rarity-UR { --pull-rarity-color: #ffd700; }
.pull-rarity-badge.rarity-LR { --pull-rarity-color: #ffb347; }
.pull-rarity-badge.rarity-MR { --pull-rarity-color: #ff4d8d; }
.pull-rarity-badge.rarity-SEC {
    --pull-rarity-color: #e879f9;
    animation: secRainbow 2s linear infinite;
}

/* 抽卡結果卡面：僅保留英文主標，隱藏中文副標 */
.pull-result-slot .card-unified-rarity__sub,
.pull-result-slot .prem-legend-badge__ribbon {
    display: none !important;
}

.pull-result-slot .card-unified-rarity__main {
    font-family: Orbitron, "Segoe UI", sans-serif;
    letter-spacing: 0.12em;
}

.pull-result-slot.rarity-MR,
.pull-result-slot.rarity-LR,
.pull-result-slot.rarity-SEC { z-index: 3; }
.pull-result-slot.rarity-SEC { animation: urSlotPulse 1s ease-in-out infinite; }

.pull-summary {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 16px;
}

.pull-summary[hidden] {
    display: none;
}

.pull-slot-meta {
    margin-top: 10px;
    padding: 0 4px;
    text-align: center;
    line-height: 1.35;
}

.pull-slot-name {
    margin: 0 0 4px;
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 235, 210, 0.92);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pull-slot-stats {
    margin: 0;
    font-family: Orbitron, 'Noto Sans TC', sans-serif;
    font-size: 11px;
    letter-spacing: 0.06em;
    color: rgba(200, 220, 255, 0.82);
}

.pull-result-slot.is-best .pull-slot-name,
.pull-result-slot.is-best .pull-slot-stats {
    color: #ffd080;
}

/* 抽卡分頁 · 滿版無捲動 · 左右華麗光幕 */
.gacha-view.view-panel {
    overflow: hidden;
    max-height: calc(100dvh - 64px);
    padding: 0 !important;
    margin: 0;
}

.gacha-arena {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    min-height: calc(100dvh - 120px);
    max-height: calc(100dvh - 120px);
    overflow: hidden;
    isolation: isolate;
}

.gacha-flank-beam {
    position: absolute;
    top: 0;
    bottom: 0;
    width: min(22vw, 280px);
    z-index: 0;
    pointer-events: none;
}

.gacha-flank-beam--left {
    left: 0;
    background:
        linear-gradient(90deg, rgba(127, 0, 255, 0.35) 0%, rgba(255, 0, 128, 0.12) 45%, transparent 100%),
        radial-gradient(ellipse 80% 50% at 0% 40%, rgba(0, 255, 255, 0.2), transparent 70%);
    animation: gachaFlankPulse 6s ease-in-out infinite alternate;
}

.gacha-flank-beam--right {
    right: 0;
    background:
        linear-gradient(270deg, rgba(255, 180, 0, 0.28) 0%, rgba(255, 0, 100, 0.14) 40%, transparent 100%),
        radial-gradient(ellipse 80% 50% at 100% 55%, rgba(255, 0, 200, 0.22), transparent 70%);
    animation: gachaFlankPulse 6s ease-in-out infinite alternate-reverse;
}

@keyframes gachaFlankPulse {
    0% { opacity: 0.65; filter: brightness(0.9); }
    100% { opacity: 1; filter: brightness(1.15); }
}

.gacha-hub--machine {
    position: relative;
    z-index: 2;
    gap: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1 1 auto;
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
    width: min(100%, 1180px);
    margin: 0 auto;
}

.gacha-hub-util {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.35);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.gacha-hub-util .gacha-util-btn {
    flex: 1;
    min-width: 88px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid rgba(127, 0, 255, 0.35);
    background: rgba(20, 8, 40, 0.85);
    color: rgba(255, 255, 255, 0.9);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.gacha-hub-util .gacha-util-btn:hover {
    border-color: rgba(255, 215, 0, 0.5);
    box-shadow: 0 0 12px rgba(127, 0, 255, 0.35);
}

.gacha-machine-wrap {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    width: min(100%, 1180px);
    margin: 0 auto 6px;
    border-radius: 18px;
    overflow: hidden;
}

.gacha-machine-wrap.summon-chamber-wrap {
    overflow: visible;
    width: min(100%, 1180px);
}

#screen-app:has(.gacha-view:not(.hidden)) {
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
}

.gacha-holo-wall {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.gacha-holo-wall::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 55% 70% at 0% 50%, rgba(127, 0, 255, 0.28), transparent 58%),
        radial-gradient(ellipse 55% 70% at 100% 50%, rgba(255, 0, 128, 0.24), transparent 58%),
        radial-gradient(ellipse 70% 55% at 50% 30%, rgba(255, 215, 0, 0.1), transparent 65%),
        radial-gradient(ellipse 80% 40% at 50% 100%, rgba(0, 255, 255, 0.12), transparent 70%),
        linear-gradient(180deg, rgba(8, 4, 24, 0.92), rgba(4, 2, 14, 0.98));
}

.gacha-holo-wall::after {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        105deg,
        transparent 0,
        transparent 40px,
        rgba(255, 255, 255, 0.015) 40px,
        rgba(255, 255, 255, 0.015) 41px
    );
    opacity: 0.6;
}

.holo-wall-card {
    position: absolute;
    width: clamp(72px, 9vw, 118px);
    aspect-ratio: 2 / 3;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    border-radius: 10px;
    opacity: 0.22;
    border: 1px solid rgba(160, 120, 255, 0.45);
    box-shadow:
        0 0 24px rgba(127, 0, 255, 0.35),
        inset 0 0 18px rgba(255, 255, 255, 0.08);
    filter: saturate(1.2) brightness(0.92);
    animation: holoWallBreathe 4.5s ease-in-out infinite;
}

.holo-wall-card--s0 { top: 4%; left: 1%; transform: rotate(-14deg); }
.holo-wall-card--s1 { top: 22%; left: 8%; transform: rotate(8deg); border-color: rgba(255, 215, 0, 0.5); animation-delay: -0.6s; }
.holo-wall-card--s2 { bottom: 10%; left: 2%; transform: rotate(-8deg); animation-delay: -1.2s; }
.holo-wall-card--s8 { top: 55%; left: -1%; transform: rotate(5deg) scale(0.88); opacity: 0.18; animation-delay: -2.2s; }
.holo-wall-card--s9 { bottom: 32%; left: 12%; transform: rotate(-12deg) scale(0.85); opacity: 0.16; animation-delay: -1.8s; }
.holo-wall-card--s3 { top: 6%; right: 2%; transform: rotate(12deg); animation-delay: -0.3s; }
.holo-wall-card--s4 { top: 28%; right: 8%; transform: rotate(-6deg); animation-delay: -0.9s; }
.holo-wall-card--s5 { bottom: 6%; right: 3%; transform: rotate(6deg); animation-delay: -1.5s; }
.holo-wall-card--s10 { top: 52%; right: 0%; transform: rotate(-10deg) scale(0.9); opacity: 0.18; animation-delay: -2s; }
.holo-wall-card--s11 { bottom: 28%; right: 11%; transform: rotate(8deg) scale(0.86); opacity: 0.17; animation-delay: -2.6s; }
.holo-wall-card--s6 { top: 42%; left: 18%; transform: rotate(2deg) scale(0.78); opacity: 0.14; animation-delay: -2.4s; }
.holo-wall-card--s7 { bottom: 22%; right: 18%; transform: rotate(-3deg) scale(0.78); opacity: 0.14; animation-delay: -1.7s; }

@keyframes holoWallBreathe {
    0%, 100% {
        opacity: 0.16;
        box-shadow: 0 0 12px rgba(127, 0, 255, 0.2), inset 0 0 10px rgba(255, 255, 255, 0.04);
    }
    50% {
        opacity: 0.26;
        box-shadow:
            0 0 28px rgba(255, 0, 200, 0.35),
            0 0 40px rgba(0, 255, 255, 0.15),
            inset 0 0 14px rgba(255, 255, 255, 0.12);
    }
}

.gacha-machine--page {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    margin: 0;
    padding: 14px 16px 12px;
    box-sizing: border-box;
    max-width: none;
    overflow: hidden;
    background: linear-gradient(165deg, rgba(14, 8, 32, 0.82), rgba(6, 4, 18, 0.88));
    border: 1px solid rgba(140, 100, 255, 0.35);
    border-radius: 18px;
    box-shadow:
        inset 0 0 48px rgba(127, 0, 255, 0.15),
        0 0 40px rgba(0, 0, 0, 0.35);
}

.gacha-machine-title {
    margin: 0 0 8px;
    text-align: center;
    font-size: 1.15rem;
}

.gacha-view .gacha-machine > * {
    position: relative;
    z-index: 1;
}

/* 底部：本池機率 + 保底（常駐 · 無捲軸） */
.gacha-footer-panel {
    flex: 0 0 auto;
    margin: 0 8px 10px;
    padding: 12px 14px 14px;
    border-radius: 14px;
    background: linear-gradient(165deg, rgba(12, 8, 28, 0.95), rgba(6, 4, 18, 0.98));
    border: 1px solid rgba(140, 100, 255, 0.35);
    box-shadow: inset 0 0 28px rgba(127, 0, 255, 0.12);
    overflow: visible;
}

.gacha-footer-panel--flash {
    animation: machineRatesFlash 0.6s ease-in-out 2;
}

.gacha-footer-heading {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: rgba(220, 210, 255, 0.95);
}

.gacha-pool-pity {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.gacha-pool-pity__title {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: rgba(255, 215, 120, 0.95);
}

.gacha-pool-pity--flash {
    animation: machineRatesFlash 0.6s ease-in-out 2;
}

.gacha-pool-rates {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    align-items: stretch;
}

.gacha-pool-rates--board {
    display: block;
    width: 100%;
    text-align: left;
}

.gacha-pool-rates--board .rate-board-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    font-weight: 800;
    margin-bottom: 8px;
    color: rgba(220, 200, 255, 0.95);
}

.gacha-pool-rates--board .rate-bars {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gacha-pool-rates--board .rate-bar-row {
    display: grid;
    grid-template-columns: 52px 1fr 56px;
    align-items: center;
    gap: 8px;
    font-size: 11px;
}

.gacha-pool-rates--board .rate-bar-track {
    height: 8px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.45);
    overflow: hidden;
}

.gacha-pool-rates--board .rate-bar-pct {
    font-weight: 900;
    text-align: right;
    color: #fff8e8;
}

.gacha-pool-rates--board .rate-extra-line {
    margin: 8px 0 0;
    font-size: 10px;
    color: rgba(180, 220, 255, 0.85);
    line-height: 1.45;
}

.gacha-pool-rates--flash {
    animation: machineRatesFlash 0.6s ease-in-out 2;
}

.gacha-rate-chip {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid color-mix(in srgb, var(--chip-color, #a78bfa) 55%, transparent);
    box-shadow: 0 0 14px color-mix(in srgb, var(--chip-color, #a78bfa) 35%, transparent);
}

.gacha-rate-chip__tier {
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
    color: var(--chip-color, #e8d4ff);
}

.gacha-rate-chip__pct {
    font-size: 15px;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 0 10px var(--chip-color, #a78bfa);
}

.gacha-rate-chip.tier-sec {
    border-color: rgba(232, 121, 249, 0.65);
    box-shadow: 0 0 18px rgba(232, 121, 249, 0.45);
}

.gacha-rate-chip.tier-ur {
    border-color: rgba(255, 215, 0, 0.6);
    box-shadow: 0 0 16px rgba(255, 215, 0, 0.4);
}

.gacha-pity-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
}

.gacha-footer-panel--silver .gacha-pity-grid {
    grid-template-columns: 1fr 1fr;
}

.gacha-pity-cell[hidden] {
    display: none !important;
}

.gacha-pity-label {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    font-size: 10px;
    font-weight: 700;
    color: rgba(220, 230, 255, 0.9);
    margin-bottom: 4px;
}

.gacha-pity-bar {
    height: 10px;
    border-radius: 8px;
}

.gacha-footer-note {
    margin: 10px 0 0;
    font-size: 10px;
    text-align: center;
    color: rgba(180, 200, 255, 0.75);
    line-height: 1.45;
}

.gacha-view .machine-showcase-row {
    flex: 0 1 auto;
    min-height: 0;
    max-height: min(32vh, 220px);
    height: auto;
    margin-bottom: 8px;
    padding: 8px 6px 10px;
    grid-template-columns: minmax(0, 1fr) minmax(140px, 220px) minmax(0, 1fr);
}

.gacha-view .machine-god-slot .card-3d-wrap,
.gacha-view .machine-epic-slot .card-3d-wrap {
    width: min(100px, 22vw) !important;
    height: auto !important;
}

.gacha-view .machine-summon-head {
    margin-bottom: 4px;
}

.gacha-view .machine-pull-grid {
    gap: 8px;
}

.gacha-view .btn-summon {
    min-height: 72px;
    padding: 10px 12px 8px;
}

.gacha-view .btn-newbie {
    margin-top: 6px;
    padding: 6px 12px;
    font-size: 11px;
}

.gacha-view .machine-pool-tabs:not(.summon-chamber__pool-tabs) {
    margin-bottom: 8px;
    padding: 4px;
}

.gacha-view .machine-pool-tabs:not(.summon-chamber__pool-tabs) .machine-pool-tab {
    padding: 8px 6px;
}

.gacha-view .machine-hint {
    margin: 0 0 8px;
    font-size: 11px;
    text-align: center;
}

.gacha-view .machine-summon-panel {
    flex: 0 0 auto;
    padding: 8px 8px 6px;
    margin-top: 0;
}

.gacha-view .machine-side {
    min-height: 0;
}

.gacha-view .machine-center .card-3d-wrap {
    width: min(180px, 36vw) !important;
    height: auto !important;
    max-height: min(36vh, 240px);
}

.gacha-hub-top {
    flex-shrink: 0;
    padding: 8px 14px 6px;
}

.gacha-hub-top h2 {
    margin: 0;
    font-size: clamp(1.4rem, 3vw, 1.85rem);
    font-weight: 900;
}

.gacha-currency-row {
    gap: 8px;
}

.gacha-view .machine-rates-board {
    max-height: none;
    overflow: visible;
    margin-bottom: 6px;
}

.gacha-view .machine-rates-board .rate-bars {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    justify-content: center;
}

.gacha-view .machine-rates-board .rate-bar-row {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 100%;
    grid-template-columns: auto 1fr auto;
    gap: 4px 6px;
    padding: 3px 6px;
    font-size: 10px;
}

.gacha-view .machine-rates-board .rate-bar-track {
    min-width: 48px;
    max-width: 72px;
    height: 6px;
}

.gacha-view .machine-rates-board .rate-board-head {
    font-size: 10px;
    margin-bottom: 4px;
}

.gacha-view .machine-rates-board .rate-extra-line {
    font-size: 9px;
    margin: 4px 0 0;
}

.gacha-view .btn-summon--single:hover {
    box-shadow:
        0 12px 36px rgba(255, 100, 0, 0.65),
        0 0 24px rgba(255, 50, 150, 0.45),
        inset 0 0 20px rgba(255, 255, 255, 0.15);
}

.gacha-view .btn-summon--ten:hover {
    box-shadow:
        0 12px 36px rgba(127, 0, 255, 0.55),
        0 0 28px rgba(255, 215, 0, 0.5),
        inset 0 0 24px rgba(255, 215, 0, 0.12);
    border-color: rgba(255, 230, 120, 0.95);
}

.btn-summon__cost-sub {
    display: block;
    font-size: 9px;
    font-weight: 700;
    opacity: 0.85;
    margin-top: 2px;
}

.gacha-view .machine-pity-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 10px;
}

.gacha-view .machine-pity-strip .pity-chip {
    font-size: 11px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.45);
}

.gacha-view .machine-pity-strip .pity-chip.tier-ur {
    color: #ffd700;
    border: 1px solid rgba(255, 215, 0, 0.5);
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.35);
}

.gacha-view .machine-pity-strip .pity-chip.tier-sec {
    color: #f0abfc;
    border: 1px solid rgba(232, 121, 249, 0.55);
    box-shadow: 0 0 12px rgba(232, 121, 249, 0.4);
}

.gacha-view .rate-bar-fill.tier-ssr {
    background: linear-gradient(90deg, #ff6600, #ffaa44) !important;
    box-shadow: 0 0 10px rgba(255, 140, 0, 0.5);
}

.gacha-view .rate-bar-fill.tier-sec {
    background: linear-gradient(90deg, #c026d3, #e879f9, #ff00cc) !important;
    box-shadow: 0 0 12px rgba(232, 121, 249, 0.55);
}

.gacha-view .rate-bar-fill.tier-ur {
    background: linear-gradient(90deg, #ffd700, #ffaa00) !important;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.5);
}

.gacha-view .machine-summon-panel {
    position: relative;
    z-index: 2;
}

@keyframes machineRatesFlash {
    0%, 100% { box-shadow: 0 0 0 transparent; }
    50% { box-shadow: 0 0 24px rgba(0, 255, 200, 0.45), inset 0 0 12px rgba(255, 215, 0, 0.15); }
}

.machine-rates-board--flash {
    animation: machineRatesFlash 0.6s ease-in-out 2;
    border-radius: 12px;
}

@media (max-width: 720px) {
    .gacha-view.view-panel {
        overflow-x: hidden;
        overflow-y: auto;
        max-height: none;
        -webkit-overflow-scrolling: touch;
    }

    .gacha-arena {
        min-height: 0;
        max-height: none;
        overflow: visible;
    }

    .gacha-hub {
        min-height: 0;
        margin: 0;
        border-radius: 12px;
    }

    .gacha-hub--machine {
        overflow: visible;
        max-height: none;
        width: 100%;
    }

    .gacha-machine-wrap,
    .gacha-machine-wrap.summon-chamber-wrap {
        width: 100%;
        overflow: visible;
    }

    .gacha-hub-body {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .gacha-banner-sidebar {
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-height: none;
        width: 100%;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        padding: 8px 6px;
        gap: 8px;
    }

    .gacha-banner-tile {
        flex: 0 0 auto;
        min-width: 72px;
    }

    .gacha-banner-main {
        padding: 10px 10px 14px;
    }

    .gacha-banner-content {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .gacha-featured-mount {
        order: -1;
        justify-content: center;
    }

    .gacha-featured-mount .card-3d-wrap {
        width: min(120px, 36vw);
        height: auto;
        aspect-ratio: 5 / 7;
    }

    .pull-results-grid,
    .pull-results-grid.pull-results-grid--eleven,
    .pull-results-grid.pull-results-grid--wide {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px 10px;
        max-width: 100%;
        padding: 0 4px;
    }

    .pull-results-grid.pull-results-grid--few {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px 10px;
    }

    .pull-results-grid.pull-results-grid--cols-3.pull-results-grid--few {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pull-result-slot {
        isolation: isolate;
        contain: layout style;
    }

    .pull-result-slot .pull-card-mount {
        aspect-ratio: 2 / 3;
        overflow: hidden;
        border-radius: 10px;
    }

    .pull-rarity-badge {
        top: 6px;
        font-size: 10px;
        z-index: 5;
    }

    .pull-result-slot .card-unified-rarity__main {
        font-size: 10px;
    }

    .pull-hero-spotlight--solo {
        max-width: min(260px, 88vw);
        margin: 0 auto 12px;
    }

    .pc-phase-summary .pull-results-grid.pull-results-grid--few {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .gacha-machine--page {
        margin: 8px;
        padding: 16px 12px;
    }

    .gacha-summon-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .gacha-summon-actions {
        width: 100%;
    }

    .btn-summon {
        flex: 1;
        min-width: 0;
    }

    .pull-results-grid.pull-results-grid--cols-2.pull-results-grid--few {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
