/* ═══ VOID GACHA — 炫彩抽卡主題（獨立風格，非寶可夢複製） ═══ */

.home-arena {
    position: relative;
    overflow-x: clip;
    overflow-y: hidden;
    margin: -16px 0 0;
    padding: 0 0 20px;
    width: 100%;
}

.home-arena::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 55% 80% at 0% 50%, rgba(127, 0, 255, 0.22), transparent 70%),
        radial-gradient(ellipse 55% 80% at 100% 50%, rgba(255, 0, 100, 0.18), transparent 70%),
        radial-gradient(ellipse 90% 50% at 50% 0%, rgba(0, 200, 255, 0.08), transparent 60%);
}

/* 極光閃光背景 — 多層炫彩 */
.home-aurora {
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        conic-gradient(from 0deg at 50% 50%,
            #ff0055, #ff6600, #ffd700, #00ff88, #00ffff, #0088ff, #7f00ff, #ff00aa, #ff0055);
    opacity: 0.28;
    animation: auroraSpin 24s linear infinite;
    filter: blur(70px);
}

.home-aurora-2 {
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(ellipse 90% 55% at 15% 5%, rgba(255, 0, 128, 0.45), transparent 55%),
        radial-gradient(ellipse 70% 50% at 85% 15%, rgba(0, 255, 255, 0.35), transparent 50%),
        radial-gradient(ellipse 80% 45% at 50% 95%, rgba(255, 215, 0, 0.3), transparent 55%),
        radial-gradient(ellipse 50% 40% at 70% 60%, rgba(127, 0, 255, 0.35), transparent 50%);
    animation: auroraPulse 5s ease-in-out infinite alternate;
}

.home-aurora-3 {
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(circle at 30% 70%, rgba(0, 180, 120, 0.25), transparent 35%),
        radial-gradient(circle at 75% 40%, rgba(200, 50, 255, 0.2), transparent 30%);
    animation: auroraPulse 8s ease-in-out infinite alternate-reverse;
    mix-blend-mode: screen;
}

/* 系列色彩區塊 */
.home-bg-zones {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.zone-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(50px);
    animation: zoneFloat 14s ease-in-out infinite;
}

.zone-cosmic {
    width: 45%;
    height: 40%;
    left: -10%;
    top: 10%;
    background: radial-gradient(circle, rgba(127, 0, 255, 0.55), transparent 70%);
    animation-delay: 0s;
}

.zone-ocean {
    width: 50%;
    height: 45%;
    right: -15%;
    top: 25%;
    background: radial-gradient(circle, rgba(0, 200, 180, 0.5), rgba(0, 80, 120, 0.3), transparent 70%);
    animation-delay: -3s;
}

.zone-robot {
    width: 40%;
    height: 35%;
    left: 20%;
    bottom: 5%;
    background: radial-gradient(circle, rgba(100, 180, 255, 0.45), transparent 70%);
    animation-delay: -6s;
}

.zone-monster {
    width: 42%;
    height: 38%;
    right: 10%;
    bottom: 0;
    background: radial-gradient(circle, rgba(80, 200, 60, 0.4), rgba(40, 80, 20, 0.25), transparent 70%);
    animation-delay: -4s;
}

.zone-gundam {
    width: 38%;
    height: 35%;
    left: 40%;
    top: -5%;
    background: radial-gradient(circle, rgba(255, 60, 40, 0.45), transparent 70%);
    animation-delay: -2s;
}

.zone-chinese {
    width: 44%;
    height: 40%;
    left: -5%;
    top: 15%;
    background: radial-gradient(circle, rgba(196, 30, 58, 0.45), rgba(212, 160, 23, 0.25), transparent 70%);
    animation-delay: -5s;
}

.zone-greek {
    width: 44%;
    height: 40%;
    right: -5%;
    top: 12%;
    background: radial-gradient(circle, rgba(46, 94, 158, 0.5), rgba(232, 197, 71, 0.28), transparent 70%);
    animation-delay: -7s;
}

@keyframes zoneFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, -15px) scale(1.08); }
}

/* 深海觸手恐怖層 */
.home-bg-tentacles {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.35;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 400'%3E%3Cpath fill='%2300ffcc' fill-opacity='0.15' d='M20 400 Q40 300 30 200 T50 0 Q70 150 60 250 T80 400'/%3E%3Cpath fill='%230088aa' fill-opacity='0.12' d='M160 400 Q140 280 150 150 T130 0 Q110 180 120 300 T100 400'/%3E%3C/svg%3E") 0% 100% / 30% 60% no-repeat,
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 400'%3E%3Cpath fill='%237f00ff' fill-opacity='0.1' d='M100 400 Q120 250 100 100 T90 0 Q80 200 95 350 T100 400'/%3E%3C/svg%3E") 100% 80% / 25% 50% no-repeat;
    animation: tentacleSway 12s ease-in-out infinite alternate;
}

@keyframes tentacleSway {
    0% { transform: translateX(0) scaleY(1); }
    100% { transform: translateX(15px) scaleY(1.03); }
}

/* 巨型霸主剪影 */
.home-bg-beasts {
    position: absolute;
    inset: -10%;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.bg-beast {
    position: absolute;
    width: 140px;
    animation: beastFloat var(--dur, 24s) ease-in-out infinite;
    animation-delay: calc(var(--i) * -1.5s);
    filter: drop-shadow(0 0 25px var(--beast-glow, rgba(255, 0, 128, 0.5)));
}

.bg-beast.beast-ur {
    width: 175px;
    filter: drop-shadow(0 0 40px var(--beast-glow)) drop-shadow(0 0 80px rgba(255, 215, 0, 0.25));
}

.bg-beast.beast-has-art {
    width: 200px;
}

.bg-beast.beast-has-art .beast-body {
    min-height: 260px;
    border-radius: 14px;
    border: 2px solid rgba(255, 215, 0, 0.4);
    box-shadow: 0 0 40px rgba(255, 100, 0, 0.25);
}

.bg-beast.beast-has-art[data-rarity="SEC"] .beast-body {
    border-color: rgba(192, 132, 252, 0.6);
    box-shadow: 0 0 50px rgba(168, 85, 247, 0.4);
}

.beast-aura {
    position: absolute;
    inset: -20%;
    border-radius: 50%;
    background: radial-gradient(circle, var(--beast-glow), transparent 70%);
    animation: beastPulse 3s ease-in-out infinite;
    opacity: 0.7;
}

@keyframes beastPulse {
    0%, 100% { transform: scale(0.9); opacity: 0.5; }
    50% { transform: scale(1.15); opacity: 0.85; }
}

.beast-body {
    position: relative;
    border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    padding: 16px 12px;
    text-align: center;
    overflow: hidden;
    backdrop-filter: blur(2px);
}

.beast-body::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(255,255,255,0.2), transparent 50%);
    z-index: 1;
    pointer-events: none;
}

.beast-body.beast-has-art {
    min-height: 140px;
    background-blend-mode: overlay;
}

.beast-body.beast-has-art::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(6,6,12,0.92) 0%, transparent 55%);
    z-index: 1;
    pointer-events: none;
}

.beast-body.beast-has-art .beast-name,
.beast-body.beast-has-art .beast-rarity {
    position: relative;
    z-index: 2;
}

.beast-emoji {
    display: block;
    font-size: 48px;
    line-height: 1;
    filter: drop-shadow(0 0 12px rgba(255,255,255,0.5));
    animation: beastEmojiPulse 2s ease-in-out infinite;
}

.bg-beast.beast-ur .beast-emoji { font-size: 58px; }

@keyframes beastEmojiPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.beast-name {
    display: block;
    font-size: 11px;
    font-weight: 900;
    color: #fff;
    text-shadow: 0 0 8px #000, 0 0 16px var(--beast-glow);
    margin-top: 6px;
    letter-spacing: 1px;
}

.beast-rarity {
    display: block;
    font-size: 9px;
    color: #ffd700;
    margin-top: 4px;
    font-weight: 700;
}

.beast-cosmic { --beast-glow: rgba(160, 80, 255, 0.9); }
.beast-ocean { --beast-glow: rgba(0, 220, 200, 0.85); }
.beast-robot { --beast-glow: rgba(100, 180, 255, 0.85); }
.beast-monster { --beast-glow: rgba(100, 255, 80, 0.8); }
.beast-gundam { --beast-glow: rgba(255, 80, 50, 0.85); }

@keyframes beastFloat {
    0%, 100% { transform: translateY(0) rotate(-3deg); }
    50% { transform: translateY(-25px) rotate(3deg); }
}

/* 閃電掃過 */
.home-lightning {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(105deg, transparent 45%, rgba(255,255,255,0.06) 50%, transparent 55%);
    background-size: 200% 100%;
    animation: lightningSweep 6s ease-in-out infinite;
}

@keyframes lightningSweep {
    0% { background-position: 200% 0; }
    30%, 100% { background-position: -200% 0; }
}

@keyframes auroraSpin {
    0% { transform: rotate(0deg) scale(1.2); }
    100% { transform: rotate(360deg) scale(1.2); }
}

@keyframes auroraPulse {
    0% { opacity: 0.7; }
    100% { opacity: 1; }
}

.home-bg-cards {
    position: absolute;
    inset: -20px;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.float-card {
    position: absolute;
    width: 72px;
    height: 100px;
    border-radius: 10px;
    opacity: 0.55;
    animation: floatDrift var(--dur, 18s) ease-in-out infinite;
    animation-delay: var(--delay, 0s);
    transform: rotate(var(--rot, 0deg));
    filter: drop-shadow(0 0 14px rgba(255, 215, 0, 0.35));
}

.float-card.float-md {
    width: 88px;
    height: 118px;
    opacity: 0.62;
}

.float-card.float-lg {
    width: 102px;
    height: 138px;
    opacity: 0.72;
    filter: drop-shadow(0 0 22px rgba(255, 215, 0, 0.5)) drop-shadow(0 0 35px rgba(127, 0, 255, 0.35));
}

.float-card.fc-series-ocean { filter: drop-shadow(0 0 18px rgba(0, 220, 200, 0.55)); }
.float-card.fc-series-cosmic { filter: drop-shadow(0 0 18px rgba(160, 80, 255, 0.55)); }
.float-card.fc-series-robot { filter: drop-shadow(0 0 18px rgba(100, 180, 255, 0.5)); }
.float-card.fc-series-monster { filter: drop-shadow(0 0 18px rgba(120, 255, 80, 0.45)); }
.float-card.fc-series-gundam { filter: drop-shadow(0 0 18px rgba(255, 80, 50, 0.5)); }
.float-card.fc-series-chinese { filter: drop-shadow(0 0 18px rgba(196, 30, 58, 0.55)); }
.float-card.fc-series-greek { filter: drop-shadow(0 0 18px rgba(232, 197, 71, 0.5)); }

.float-card .fc-inner {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px 4px;
    position: relative;
    overflow: hidden;
}

.float-card .fc-inner.fc-has-art {
    justify-content: flex-end;
    background-blend-mode: overlay;
}

.float-card .fc-inner.fc-has-art::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(6,6,12,0.85) 0%, transparent 50%);
    pointer-events: none;
}

.float-card .fc-inner.fc-has-art .fc-rarity,
.float-card .fc-inner.fc-has-art .fc-name {
    position: relative;
    z-index: 2;
}

.float-card .fc-emoji {
    font-size: 28px;
    line-height: 1;
}

.float-card.float-md .fc-emoji { font-size: 32px; }
.float-card.float-lg .fc-emoji { font-size: 38px; }

.float-card .fc-name {
    font-size: 7px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    line-height: 1.1;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: 0 1px 4px #000;
}

.float-lg .fc-name { font-size: 8px; }

.fc-holo::after, .fc-prism::after, .fc-rainbow::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent, rgba(255,255,255,0.35), transparent);
    animation: pityShine 2.5s infinite;
}

.fc-fire { box-shadow: 0 0 20px rgba(255, 80, 0, 0.9); }
.fc-gold { border-color: #ffd700 !important; box-shadow: 0 0 18px gold; }
.fc-limited { border-color: #ff0055 !important; box-shadow: 0 0 22px rgba(255,0,128,0.9); }
.fc-cosmic { box-shadow: 0 0 18px rgba(127, 0, 255, 0.8); }
.fc-neon { box-shadow: 0 0 16px cyan; }
.fc-plasma { box-shadow: 0 0 16px #88ccff; }

.float-card .fc-rarity {
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 8px;
    font-weight: 900;
    padding: 1px 5px;
    border-radius: 4px;
    background: rgba(0,0,0,0.65);
}

@keyframes floatDrift {
    0%, 100% { transform: translate(0, 0) rotate(var(--rot, 0deg)); }
    33% { transform: translate(15px, -25px) rotate(calc(var(--rot, 0deg) + 5deg)); }
    66% { transform: translate(-10px, -40px) rotate(calc(var(--rot, 0deg) - 4deg)); }
}

.home-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
    background-image:
        radial-gradient(2px 2px at 8% 15%, #fff, transparent),
        radial-gradient(2px 2px at 92% 25%, #ffcc00, transparent),
        radial-gradient(2px 2px at 25% 80%, #0ff, transparent),
        radial-gradient(2px 2px at 75% 55%, #ff66aa, transparent),
        radial-gradient(1px 1px at 50% 40%, #88ff88, transparent),
        radial-gradient(2px 2px at 15% 50%, #aa88ff, transparent),
        radial-gradient(1px 1px at 85% 75%, #00ffcc, transparent);
    background-size: 200% 200%;
    animation: sparkleMove 6s linear infinite;
    opacity: 0.75;
}

@keyframes sparkleMove {
    0% { background-position: 0% 0%; }
    100% { background-position: 100% 100%; }
}

/* —— 首頁舞台 —— */
.home-stage {
    --epic-card-w: 200px;
    --epic-card-gap: 14px;
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: 1fr minmax(0, 1100px) 1fr;
    gap: 0;
    align-items: start;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

.home-stage--browse {
    display: block;
    max-width: 1100px;
}

.home-stage-center {
    min-width: 0;
}

.home-stage-center--full {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

.pack-section--hero,
.legend-section--hero {
    margin-top: 8px;
}

.pack-section--hero {
    margin-bottom: 20px;
}

.home-epic-col {
    position: sticky;
    top: 72px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 16px 10px 12px;
    min-height: 0;
    height: auto;
    align-self: start;
    pointer-events: none;
    overflow: visible;
    width: 100%;
}

.home-epic-col--left {
    background:
        linear-gradient(90deg, rgba(4, 2, 14, 0.98) 0%, rgba(30, 10, 50, 0.75) 70%, rgba(30, 10, 50, 0.35) 100%);
    border-right: 1px solid rgba(127, 0, 255, 0.2);
    box-shadow: inset -20px 0 60px rgba(127, 0, 255, 0.12);
}

.home-epic-col--right {
    background:
        linear-gradient(270deg, rgba(4, 2, 14, 0.98) 0%, rgba(30, 10, 50, 0.75) 70%, rgba(30, 10, 50, 0.35) 100%);
    border-left: 1px solid rgba(255, 0, 128, 0.15);
    box-shadow: inset 20px 0 60px rgba(255, 0, 100, 0.1);
}

.home-flank-wing {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: center top / cover no-repeat;
    opacity: 0.12;
    filter: saturate(1.3) blur(0px);
    pointer-events: none;
    mask-image: linear-gradient(180deg, #000 0%, #000 85%, transparent 100%);
}

.epic-col-label {
    position: relative;
    z-index: 3;
    width: 100%;
    text-align: center;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.35em;
    color: rgba(255, 215, 0, 0.75);
    text-shadow: 0 0 12px rgba(127, 0, 255, 0.6);
    margin-bottom: 8px;
    pointer-events: none;
}

.home-epic-col--filled::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        repeating-linear-gradient(
            180deg,
            transparent,
            transparent 33.33%,
            rgba(255, 215, 0, 0.03) 33.33%,
            rgba(255, 215, 0, 0.03) calc(33.33% + 1px)
        );
    opacity: 0.6;
}

/* 左右欄 · 3 槽氛圍（對齊三張卡） */
.home-epic-ambience {
    position: absolute;
    inset: 12px 0;
    z-index: 0;
    pointer-events: none;
}

.epic-ambience-layer {
    position: absolute;
    left: 50%;
    width: 115%;
    height: 30%;
    transform: translateX(-50%);
    background: center top / cover no-repeat;
    opacity: 0.28;
    filter: blur(1px) saturate(1.2);
    border-radius: 16px;
    animation: epicAmbFloat 16s ease-in-out infinite;
    animation-delay: calc(var(--amb-slot, 0) * -2.2s);
    box-shadow: 0 0 50px rgba(127, 0, 255, 0.2);
}

.epic-ambience-layer--left:nth-child(1),
.epic-ambience-layer--right:nth-child(1) { top: 2%; }
.epic-ambience-layer--left:nth-child(2),
.epic-ambience-layer--right:nth-child(2) { top: 34%; opacity: 0.24; }
.epic-ambience-layer--left:nth-child(3),
.epic-ambience-layer--right:nth-child(3) { top: 66%; opacity: 0.22; }

.home-epic-ambience--left .epic-ambience-layer:nth-child(odd) { transform: translateX(-52%) rotate(-2deg); }
.home-epic-ambience--right .epic-ambience-layer:nth-child(odd) { transform: translateX(-48%) rotate(2deg); }

/* 三張卡 · 等高等寬 */
.epic-card-stack {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--epic-card-gap);
    width: 100%;
    margin: 0 auto;
    padding: 8px 0 12px;
    pointer-events: none;
}

.epic-card-stack .epic-hero-card {
    pointer-events: auto;
    width: var(--epic-card-w);
    height: auto;
    flex: 0 0 auto;
}

@keyframes epicAmbFloat {
    0%, 100% { translate: 0 0; filter: blur(2px) brightness(0.95); }
    50% { translate: 0 -14px; filter: blur(1px) brightness(1.1); }
}

.epic-hero-card {
    position: relative;
    width: var(--epic-card-w);
    aspect-ratio: 5 / 7;
    height: auto;
    border-radius: 18px;
    overflow: hidden;
    pointer-events: auto;
    cursor: pointer;
    transition: transform 0.35s ease, box-shadow 0.35s ease, filter 0.35s ease;
    border: 2px solid rgba(255, 215, 0, 0.5);
    box-shadow:
        0 16px 48px rgba(0, 0, 0, 0.7),
        0 0 40px var(--epic-glow, rgba(127, 0, 255, 0.4)),
        inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.epic-hero-art {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    z-index: 0;
    display: block;
    pointer-events: none;
    transition: transform 0.45s ease;
}

.epic-hero-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    opacity: 0.45;
    z-index: 0;
}

.epic-hero-card:hover .epic-hero-art {
    transform: scale(1.06);
}

.epic-hero-card:hover {
    transform: translateY(-6px);
    z-index: 3;
}

.epic-hero-card--uniform,
.epic-hero-card--hero,
.epic-hero-card--tall,
.epic-hero-card--mid {
    width: var(--epic-card-w);
    max-width: none;
    opacity: 1;
}

.epic-hero-card[data-rarity="SEC"] {
    --epic-glow: rgba(255, 0, 200, 0.45);
    border-color: rgba(255, 100, 255, 0.75);
    animation: epicSecPulse 3s ease-in-out infinite;
}

.epic-hero-card[data-rarity="LR"],
.epic-hero-card[data-rarity="MR"] {
    --epic-glow: rgba(255, 180, 0, 0.5);
    border-color: rgba(255, 215, 0, 0.8);
}

.epic-hero-card[data-rarity="UR"] {
    --epic-glow: rgba(255, 200, 80, 0.45);
    border-color: rgba(255, 215, 0, 0.65);
}

.epic-hero-card[data-art-fallback="1"] .epic-hero-art {
    filter: saturate(1.12) contrast(1.05) hue-rotate(-8deg);
}

.epic-hero-vignette {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.15) 0%,
        transparent 35%,
        rgba(0, 0, 0, 0.55) 72%,
        rgba(4, 2, 12, 0.98) 100%
    );
    pointer-events: none;
}

.epic-hero-vignette--side-left {
    background: linear-gradient(
        90deg,
        rgba(4, 2, 12, 0.5) 0%,
        transparent 45%,
        transparent 55%,
        rgba(0, 0, 0, 0.6) 100%
    ),
    linear-gradient(180deg, transparent 40%, rgba(4, 2, 12, 0.95) 100%);
}

.epic-hero-vignette--side-right {
    background: linear-gradient(
        270deg,
        rgba(4, 2, 12, 0.5) 0%,
        transparent 45%,
        transparent 55%,
        rgba(0, 0, 0, 0.6) 100%
    ),
    linear-gradient(180deg, transparent 40%, rgba(4, 2, 12, 0.95) 100%);
}

.epic-hero-shine {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(
        115deg,
        transparent 35%,
        rgba(255, 255, 255, 0.12) 48%,
        transparent 62%
    );
    background-size: 200% 200%;
    animation: epicShine 4s ease-in-out infinite;
    pointer-events: none;
}

.epic-hero-frame {
    position: absolute;
    inset: 5px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 2;
    pointer-events: none;
}

.epic-hero-meta {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 4;
    padding: 10px 10px 12px;
    pointer-events: none;
}

.epic-hero-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.15em;
    padding: 3px 10px;
    border-radius: 6px;
    margin-bottom: 6px;
    background: rgba(0, 0, 0, 0.75);
    color: #ffd700;
    border: 1px solid rgba(255, 215, 0, 0.55);
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
}

.epic-hero-card[data-rarity="SEC"] .epic-hero-badge {
    color: #f0abfc;
    border-color: rgba(192, 132, 252, 0.7);
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.5);
}

.epic-hero-name {
    margin: 0 0 4px;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.25;
    color: #fff;
    text-shadow: 0 2px 8px #000, 0 0 16px var(--epic-glow, rgba(255, 215, 0, 0.4));
}

.epic-hero-card--hero .epic-hero-name {
    font-size: 15px;
}

.epic-hero-stats {
    font-size: 11px;
    font-weight: 800;
    color: #ffe566;
    letter-spacing: 0.06em;
}

.epic-hero-realm {
    font-size: 9px;
    color: rgba(200, 190, 255, 0.85);
    margin-top: 2px;
}

.epic-hero-no {
    position: absolute;
    top: 8px;
    left: 10px;
    z-index: 4;
    font-size: 11px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 4px #000;
    pointer-events: none;
}

@keyframes epicSecPulse {
    0%, 100% { box-shadow: 0 12px 40px rgba(0, 0, 0, 0.65), 0 0 24px rgba(255, 0, 200, 0.35); }
    50% { box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7), 0 0 48px rgba(168, 85, 247, 0.55); }
}

@keyframes epicShine {
    0%, 100% { background-position: 120% 0%; opacity: 0.4; }
    50% { background-position: -20% 100%; opacity: 0.85; }
}

/* 抽卡機內側 · 大卡圖槽 */
.machine-epic-slot {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 168px;
    aspect-ratio: 5 / 7;
    min-height: 0;
    border-radius: 14px;
    overflow: hidden;
    border: 2px solid rgba(255, 215, 0, 0.55);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.6), 0 0 28px var(--slot-glow, rgba(127, 0, 255, 0.35));
    transition: transform 0.3s ease, filter 0.3s ease;
    cursor: pointer;
}

.machine-side-left .machine-epic-slot,
.machine-side-right .machine-epic-slot {
    margin-top: -22px;
}

.machine-side-left .machine-epic-slot:first-of-type,
.machine-side-right .machine-epic-slot:first-of-type {
    margin-top: 0;
}

.machine-epic-slot[data-rarity="SEC"] {
    border-color: #e879f9;
    box-shadow: 0 10px 36px rgba(0, 0, 0, 0.65), 0 0 32px rgba(232, 121, 249, 0.65), 0 0 48px rgba(192, 38, 211, 0.35);
    animation: slotSecGlow 2.4s ease-in-out infinite;
}

.machine-epic-slot[data-rarity="UR"] {
    border-color: #ffd700;
    box-shadow: 0 10px 36px rgba(0, 0, 0, 0.65), 0 0 32px rgba(255, 215, 0, 0.6), 0 0 40px rgba(255, 140, 0, 0.25);
}

.machine-epic-slot[data-rarity="SSR"] {
    border-color: #ff9a3c;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.6), 0 0 28px rgba(255, 140, 0, 0.55);
}

.machine-epic-slot[data-rarity="MR"] {
    border-color: #ff4d8d;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.6), 0 0 28px rgba(255, 77, 141, 0.5);
}

@keyframes slotSecGlow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.12); }
}

.machine-epic-slot:hover {
    transform: scale(1.06);
    filter: brightness(1.1);
    z-index: 4;
}

.machine-epic-slot::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(4, 2, 12, 0.75) 100%);
    z-index: 1;
    pointer-events: none;
}

.machine-epic-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    z-index: 0;
    display: block;
    pointer-events: none;
}

.machine-epic-slot .machine-god-tag {
    z-index: 5;
}

.machine-side--art {
    gap: 10px;
}

.machine-side-left .machine-epic-slot:nth-of-type(1),
.machine-side-right .machine-epic-slot:nth-of-type(1) {
    max-width: 176px;
    z-index: 4;
}

.machine-side-left .machine-epic-slot:nth-of-type(2),
.machine-side-right .machine-epic-slot:nth-of-type(2) {
    max-width: 162px;
    z-index: 3;
}

.machine-side-left .machine-epic-slot:nth-of-type(3),
.machine-side-right .machine-epic-slot:nth-of-type(3) {
    max-width: 148px;
    z-index: 2;
}

.machine-side-left .machine-epic-slot:nth-child(1) { transform: rotate(-4deg); }
.machine-side-left .machine-epic-slot:nth-child(2) { transform: rotate(1deg); }
.machine-side-left .machine-epic-slot:nth-child(3) { transform: rotate(-2deg); }
.machine-side-right .machine-epic-slot:nth-child(1) { transform: rotate(4deg); }
.machine-side-right .machine-epic-slot:nth-child(2) { transform: rotate(-1deg); }
.machine-side-right .machine-epic-slot:nth-child(3) { transform: rotate(2deg); }

@media (min-width: 961px) {
    .home-bg-beasts {
        opacity: 0;
        visibility: hidden;
    }

    .home-bg-cards .float-card {
        opacity: 0.35;
    }

    .home-bg-cards .float-card.float-has-art {
        opacity: 0.42;
    }

    .home-epic-col {
        align-self: start;
    }
}

@media (max-width: 1180px) {
    .home-stage {
        --epic-card-w: 172px;
        grid-template-columns: 1fr minmax(0, 1fr) 1fr;
    }
}

@media (max-width: 960px) {
    .home-epic-col {
        display: none;
    }
    .home-stage {
        grid-template-columns: 1fr;
    }
}

.home-content {
    position: relative;
    z-index: 10;
    padding: 0 16px;
}

/* 頂部標題 */
.home-mega-title {
    text-align: center;
    padding: 20px 0 8px;
}

.home-mega-title h1 {
    margin: 0;
    font-size: clamp(1.8rem, 6vw, 2.6rem);
    font-weight: 900;
    letter-spacing: 6px;
    background: linear-gradient(90deg, #fff 0%, #ffd700 25%, #ff00aa 50%, #00ffff 75%, #fff 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: titleShine 4s linear infinite;
    filter: drop-shadow(0 0 30px rgba(255, 0, 128, 0.5));
}

@keyframes titleShine {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

.home-mega-title p {
    margin: 8px 0 0;
    font-size: 14px;
    color: rgba(255, 240, 255, 0.85);
}

.home-mega-title .highlight {
    color: #ffd700;
    font-weight: 800;
    text-shadow: 0 0 12px rgba(255, 215, 0, 0.8);
}

/* 跑馬燈 */
.home-marquee {
    overflow: hidden;
    background: linear-gradient(90deg, rgba(255,0,85,0.35), rgba(127,0,255,0.35), rgba(0,255,255,0.35));
    border: 1px solid rgba(255, 215, 0, 0.5);
    border-radius: 12px;
    padding: 10px 0;
    margin-bottom: 20px;
    box-shadow: 0 0 24px rgba(255, 0, 128, 0.25);
}

.marquee-track {
    display: flex;
    gap: 56px;
    animation: marquee 22s linear infinite;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 800;
}

.marquee-track span {
    color: #fff;
    text-shadow: 0 0 8px #ffd700, 0 0 16px #ff0055;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* 抽卡機主區（類似 TCG 選包 + 大按鈕，但 VOID 風） */
.gacha-machine {
    position: relative;
    border-radius: 24px;
    padding: 24px 20px;
    margin-bottom: 24px;
    overflow: hidden;
    border: 2px solid transparent;
    background:
        linear-gradient(160deg, rgba(10, 5, 30, 0.95), rgba(30, 10, 50, 0.9)) padding-box,
        linear-gradient(135deg, #ff0055, #ffd700, #00ffff, #7f00ff) border-box;
    box-shadow:
        0 0 60px rgba(127, 0, 255, 0.4),
        0 0 100px rgba(255, 0, 85, 0.2),
        inset 0 0 40px rgba(255, 215, 0, 0.05);
}

.gacha-machine::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.08) 50%, transparent 60%);
    animation: machineSweep 3s infinite;
}

@keyframes machineSweep {
    0% { transform: translateX(-30%) rotate(25deg); }
    100% { transform: translateX(30%) rotate(25deg); }
}

.gacha-machine h2 {
    margin: 0 0 6px;
    text-align: center;
    font-size: 1.35rem;
    color: #fff;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
}

.gacha-machine .machine-hint {
    text-align: center;
    font-size: 13px;
    color: rgba(255, 230, 255, 0.75);
    margin-bottom: 16px;
}

.machine-showcase-row {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(160px, 240px) minmax(0, 1.15fr);
    gap: 6px 8px;
    align-items: center;
    justify-items: center;
    margin-bottom: 12px;
    min-height: 200px;
    width: 100%;
    padding: 14px 10px 18px;
    border-radius: 18px;
    overflow: hidden;
    background:
        radial-gradient(ellipse 85% 70% at 12% 45%, rgba(127, 0, 255, 0.32), transparent 58%),
        radial-gradient(ellipse 80% 65% at 88% 50%, rgba(255, 0, 128, 0.26), transparent 55%),
        radial-gradient(ellipse 55% 50% at 50% 42%, rgba(255, 215, 0, 0.14), transparent 62%),
        radial-gradient(ellipse 40% 35% at 50% 88%, rgba(0, 255, 255, 0.1), transparent 70%),
        linear-gradient(165deg, rgba(22, 8, 52, 0.95), rgba(8, 4, 22, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        inset 0 0 60px rgba(127, 0, 255, 0.15),
        inset 0 0 80px rgba(255, 0, 128, 0.08),
        0 12px 40px rgba(0, 0, 0, 0.45);
}

.machine-stage-fx {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    border-radius: inherit;
}

.machine-aurora {
    position: absolute;
    width: 140%;
    height: 80%;
    filter: blur(48px);
    opacity: 0.55;
    animation: machineAuroraDrift 14s ease-in-out infinite alternate;
}

.machine-aurora--a {
    top: -20%;
    left: -25%;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.55), transparent 65%);
}

.machine-aurora--b {
    bottom: -25%;
    right: -20%;
    background: radial-gradient(circle, rgba(255, 0, 128, 0.45), rgba(255, 215, 0, 0.2), transparent 68%);
    animation-delay: -6s;
}

.machine-neon-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: radial-gradient(ellipse 75% 65% at 50% 50%, #000 20%, transparent 75%);
    opacity: 0.5;
}

.machine-sparkles {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(1px 1px at 10% 20%, rgba(255, 255, 255, 0.9), transparent),
        radial-gradient(1px 1px at 30% 70%, rgba(255, 215, 0, 0.85), transparent),
        radial-gradient(1.5px 1.5px at 55% 15%, rgba(0, 255, 255, 0.8), transparent),
        radial-gradient(1px 1px at 72% 55%, rgba(255, 110, 199, 0.85), transparent),
        radial-gradient(1px 1px at 88% 28%, rgba(255, 255, 255, 0.75), transparent),
        radial-gradient(1.5px 1.5px at 42% 88%, rgba(192, 132, 252, 0.8), transparent);
    animation: machineSparkleTwinkle 4s ease-in-out infinite;
}

@keyframes machineAuroraDrift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(6%, 4%) scale(1.08); }
}

@keyframes machineSparkleTwinkle {
    0%, 100% { opacity: 0.45; }
    50% { opacity: 1; }
}

.machine-rarity-ribbon {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    max-width: 96%;
    pointer-events: none;
}

.machine-ribbon-chip {
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.08em;
    padding: 3px 10px;
    border-radius: 999px;
    color: #fff;
    border: 1px solid var(--chip-color, rgba(255, 255, 255, 0.4));
    background: rgba(0, 0, 0, 0.45);
    box-shadow: 0 0 14px color-mix(in srgb, var(--chip-color) 55%, transparent);
    text-shadow: 0 0 8px var(--chip-color);
}

.machine-ribbon-chip.tier-sec {
    background: linear-gradient(135deg, rgba(192, 38, 211, 0.75), rgba(232, 121, 249, 0.55));
    border-color: #f0abfc;
    animation: ribbonSecPulse 2.2s ease-in-out infinite;
}

.machine-ribbon-chip.tier-ur {
    background: linear-gradient(135deg, rgba(255, 180, 0, 0.65), rgba(255, 215, 0, 0.45));
    border-color: #ffe566;
}

.machine-ribbon-chip.tier-ssr {
    background: linear-gradient(135deg, rgba(255, 100, 0, 0.65), rgba(255, 154, 60, 0.45));
    border-color: #ffb347;
}

@keyframes ribbonSecPulse {
    0%, 100% { box-shadow: 0 0 12px rgba(232, 121, 249, 0.5); }
    50% { box-shadow: 0 0 22px rgba(255, 0, 200, 0.65), 0 0 32px rgba(192, 132, 252, 0.4); }
}

.machine-side {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    min-height: 320px;
    width: 100%;
    max-width: 220px;
    margin: 0 auto;
    padding-top: 28px;
}

.machine-side-ambience {
    position: absolute;
    inset: -8px -20px;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    opacity: 0.35;
    filter: blur(12px) saturate(1.4);
}

.machine-side-ambience-layer {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center top;
    opacity: 0.55;
}

.machine-side-ambience-layer:nth-child(2) {
    transform: scale(1.15) translateY(8%);
    opacity: 0.35;
}

.machine-side-left .machine-god-slot:nth-child(1) { transform: rotate(-6deg) scale(0.92); }
.machine-side-left .machine-god-slot:nth-child(2) { transform: rotate(2deg) scale(0.88); margin-left: -8px; }
.machine-side-left .machine-god-slot:nth-child(3) { transform: rotate(-3deg) scale(0.85); margin-left: 4px; }

.machine-side-right .machine-god-slot:nth-child(1) { transform: rotate(5deg) scale(0.92); }
.machine-side-right .machine-god-slot:nth-child(2) { transform: rotate(-2deg) scale(0.88); margin-right: -8px; }
.machine-side-right .machine-god-slot:nth-child(3) { transform: rotate(4deg) scale(0.85); margin-right: 4px; }

.machine-god-slot {
    position: relative;
    padding: 6px;
    border-radius: 14px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.machine-god-slot:hover {
    transform: scale(1.05) rotate(0deg) !important;
    z-index: 2;
}

.machine-god-god {
    background: linear-gradient(135deg, rgba(255, 0, 128, 0.2), rgba(255, 215, 0, 0.15));
    border: 1px solid rgba(255, 200, 80, 0.55);
    box-shadow: 0 0 28px rgba(255, 100, 200, 0.35), 0 0 40px rgba(255, 215, 0, 0.2);
    animation: godPulse 2.5s ease-in-out infinite;
}

.machine-god-legend {
    border: 1px solid rgba(160, 120, 255, 0.45);
    box-shadow: 0 0 20px rgba(127, 0, 255, 0.3);
}

.machine-god-slot[data-rarity="LR"] {
    border-color: rgba(255, 215, 0, 0.7);
    box-shadow: 0 0 32px rgba(255, 180, 0, 0.45);
}

.machine-god-slot[data-rarity="MR"] {
    border-color: rgba(255, 80, 180, 0.75);
    box-shadow: 0 0 32px rgba(255, 0, 120, 0.4);
}

.machine-god-tag {
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 11px;
    font-weight: 900;
    padding: 3px 8px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.72);
    color: #ffd700;
    letter-spacing: 0.06em;
    z-index: 5;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-shadow: 0 0 8px currentColor;
}

.machine-god-tag.tier-sec {
    background: linear-gradient(135deg, rgba(192, 38, 211, 0.92), rgba(232, 121, 249, 0.85));
    color: #fdf4ff;
    border-color: #f0abfc;
    box-shadow: 0 0 16px rgba(232, 121, 249, 0.75), 0 0 28px rgba(255, 0, 200, 0.35);
    animation: tagSecNeon 2s ease-in-out infinite;
}

.machine-god-tag.tier-ur {
    background: linear-gradient(135deg, rgba(255, 160, 0, 0.9), rgba(255, 215, 0, 0.85));
    color: #1a1000;
    border-color: #ffe566;
    box-shadow: 0 0 18px rgba(255, 215, 0, 0.7);
}

.machine-god-tag.tier-ssr {
    background: linear-gradient(135deg, rgba(255, 90, 0, 0.9), rgba(255, 154, 60, 0.88));
    color: #1a0800;
    border-color: #ffb347;
    box-shadow: 0 0 16px rgba(255, 140, 0, 0.65);
}

.machine-god-tag.tier-mr {
    background: linear-gradient(135deg, rgba(255, 0, 100, 0.85), rgba(255, 77, 141, 0.8));
    color: #fff;
    border-color: #ff88cc;
    box-shadow: 0 0 14px rgba(255, 77, 141, 0.55);
}

.machine-god-tag.tier-sr {
    background: linear-gradient(135deg, rgba(60, 120, 220, 0.88), rgba(126, 184, 255, 0.85));
    color: #fff;
    border-color: #9ed0ff;
}

@keyframes tagSecNeon {
    0%, 100% { box-shadow: 0 0 12px rgba(232, 121, 249, 0.6); }
    50% { box-shadow: 0 0 22px rgba(255, 0, 200, 0.7), 0 0 32px rgba(192, 132, 252, 0.45); }
}

@keyframes godPulse {
    0%, 100% { box-shadow: 0 0 24px rgba(255, 120, 200, 0.35), 0 0 36px rgba(255, 215, 0, 0.15); }
    50% { box-shadow: 0 0 36px rgba(255, 80, 180, 0.55), 0 0 50px rgba(255, 215, 0, 0.35); }
}

.machine-center {
    position: relative;
    z-index: 3;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 320px;
    padding-top: 24px;
}

.machine-center-glow {
    position: relative;
    padding: 10px;
    border-radius: 20px;
    background:
        radial-gradient(ellipse at center, rgba(255, 215, 0, 0.18), transparent 65%),
        radial-gradient(ellipse at 30% 20%, rgba(232, 121, 249, 0.12), transparent 50%);
    box-shadow:
        0 0 50px rgba(127, 0, 255, 0.4),
        0 0 70px rgba(255, 215, 0, 0.2);
}

.gacha-view .machine-center-glow .card-3d-wrap {
    width: min(220px, 42vw);
    height: auto;
    aspect-ratio: 5 / 7;
}

.machine-center-glow::before {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 20px;
    border: 2px solid rgba(255, 215, 0, 0.35);
    animation: centerRing 2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes centerRing {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.02); }
}

.machine-preview {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0;
    min-height: 300px;
    width: 100%;
}

@media (max-width: 720px) {
    .machine-showcase-row {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }
    .machine-side {
        flex-direction: row;
        flex-wrap: wrap;
        min-height: auto;
    }
    .machine-side-left .machine-god-slot,
    .machine-side-right .machine-god-slot {
        transform: none !important;
        margin: 0 !important;
    }
}

/* —— 召喚操作區 · 機率 + 單抽/十連 —— */
.machine-summon-panel {
    position: relative;
    z-index: 2;
    margin-top: 8px;
    padding: 16px 14px 14px;
    border-radius: 18px;
    background: linear-gradient(165deg, rgba(12, 6, 28, 0.92), rgba(6, 4, 14, 0.95));
    border: 1px solid rgba(255, 215, 0, 0.28);
    box-shadow: inset 0 0 40px rgba(127, 0, 255, 0.12), 0 8px 32px rgba(0, 0, 0, 0.45);
}

.machine-summon-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.machine-summon-badge {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: #7dffb8;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(0, 80, 60, 0.35);
    border: 1px solid rgba(125, 255, 184, 0.35);
}

.machine-summon-scheme {
    font-size: 10px;
    color: rgba(255, 220, 180, 0.75);
    letter-spacing: 0.08em;
}

.machine-rates-board {
    margin-bottom: 14px;
    padding: 12px 12px 10px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.rate-board-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 12px;
    font-weight: 800;
    color: rgba(255, 240, 255, 0.9);
    letter-spacing: 0.1em;
}

.rate-board-verify {
    font-size: 10px;
    font-weight: 700;
    color: #7dffb8;
}

.rate-bars {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rate-bar-row {
    display: grid;
    grid-template-columns: 32px 1fr 52px;
    align-items: center;
    gap: 8px;
}

.rate-bar-tag {
    font-size: 11px;
    font-weight: 900;
    text-align: center;
}

.rate-bar-track {
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.rate-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.4s ease;
}

.rate-bar-fill.tier-n { background: linear-gradient(90deg, #6688aa, #99aabb); }
.rate-bar-fill.tier-r { background: linear-gradient(90deg, #22aa88, #55ddaa); }
.rate-bar-fill.tier-sr { background: linear-gradient(90deg, #7c3aed, #bb86fc); }
.rate-bar-fill.tier-ssr { background: linear-gradient(90deg, #ff6600, #ffaa44); box-shadow: 0 0 10px rgba(255, 140, 0, 0.45); }
.rate-bar-fill.tier-sec { background: linear-gradient(90deg, #c026d3, #e879f9); box-shadow: 0 0 12px rgba(232, 121, 249, 0.5); }
.rate-bar-fill.tier-ur { background: linear-gradient(90deg, #ffd700, #ffaa00); box-shadow: 0 0 10px rgba(255, 215, 0, 0.45); }
.rate-bar-fill.tier-ur { background: linear-gradient(90deg, #ffd700, #ffaa00); box-shadow: 0 0 10px rgba(255, 215, 0, 0.5); }
.rate-bar-fill.tier-sec { background: linear-gradient(90deg, #c084fc, #ff00cc); box-shadow: 0 0 12px rgba(255, 0, 200, 0.5); }
.rate-bar-fill.boosted { animation: rateBoostPulse 1.2s ease-in-out infinite; }

@keyframes rateBoostPulse {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.35); }
}

.rate-bar-pct {
    font-size: 11px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.9);
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.rate-extra-line {
    margin: 10px 0 0;
    font-size: 10px;
    line-height: 1.5;
    color: rgba(255, 200, 220, 0.85);
}

.rate-extra-line strong {
    color: #ffd700;
}

.rate-pity-hint {
    color: rgba(180, 220, 255, 0.75);
    margin-top: 6px;
}

.machine-pull-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.btn-summon {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 14px 14px 12px;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    min-height: 88px;
}

.btn-summon:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
}

.btn-summon:active {
    transform: scale(0.98);
}

.btn-summon--single {
    color: #1a0500;
    background: linear-gradient(145deg, #ffe566 0%, #ff8800 45%, #ff3366 100%);
    box-shadow: 0 8px 28px rgba(255, 100, 0, 0.55);
}

.btn-summon--ten {
    color: #fff;
    background: linear-gradient(145deg, #2a1048 0%, #1a0828 40%, #0a0614 100%);
    border: 2px solid rgba(255, 215, 0, 0.65);
    box-shadow: 0 8px 28px rgba(127, 0, 255, 0.4), inset 0 0 24px rgba(255, 215, 0, 0.08);
}

.btn-summon__icon {
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: 22px;
    opacity: 0.85;
}

.btn-summon__labels {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.btn-summon__tag {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.2em;
    opacity: 0.85;
}

.btn-summon__main {
    font-size: 17px;
    font-weight: 900;
    letter-spacing: 0.06em;
}

.btn-summon__cost {
    font-size: 12px;
    font-weight: 800;
    margin-top: 4px;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.25);
}

.btn-summon--ten .btn-summon__cost {
    background: rgba(255, 215, 0, 0.15);
    color: #ffd700;
}

.btn-summon__bonus {
    position: absolute;
    bottom: 8px;
    right: 10px;
    font-size: 9px;
    font-weight: 800;
    color: #bb86fc;
    letter-spacing: 0.05em;
}

.machine-pity-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    justify-content: center;
    margin-top: 12px;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    font-size: 11px;
    color: rgba(200, 220, 255, 0.85);
}

.machine-pity-strip strong {
    color: #ffd700;
}

.gacha-machine .btn-newbie {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 12px 16px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(90deg, #ff0055, #7f00ff);
    color: #fff;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    letter-spacing: 0.06em;
    transition: transform 0.2s, filter 0.2s;
}

.gacha-machine .btn-newbie:hover {
    transform: scale(1.02);
    filter: brightness(1.1);
}

@media (max-width: 480px) {
    .machine-pull-grid {
        grid-template-columns: 1fr;
    }
    .rate-bar-row {
        grid-template-columns: 28px 1fr 48px;
    }
}

/* 卡包選擇網格 */
.pack-section h3 {
    margin: 0 0 6px;
    font-size: 1.1rem;
    text-align: center;
}

.pack-section .pack-sub {
    text-align: center;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 14px;
}

.pack-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 8px 4px 20px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.pack-tile {
    flex: 0 0 168px;
    width: 168px;
    height: 238px;
    scroll-snap-align: center;
    border-radius: 14px;
    padding: 0;
    text-align: center;
    cursor: pointer;
    border: 2px solid var(--pack-border, rgba(255, 255, 255, 0.2));
    background: #080614;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    position: relative;
    overflow: hidden;
    box-shadow: var(--pack-glow, 0 4px 20px rgba(0, 0, 0, 0.55));
    display: flex;
    flex-direction: column;
}

.pack-tile::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.35;
    background: var(--pack-bg);
    z-index: 0;
    pointer-events: none;
}

.pack-art {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.pack-art-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 18%;
    display: block;
    transform: scale(1.02);
    transition: transform 0.35s ease;
}

.pack-art-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 52px;
    filter: drop-shadow(0 0 14px rgba(255, 255, 255, 0.45));
}

.pack-art-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.05) 0%,
        rgba(0, 0, 0, 0.15) 42%,
        rgba(8, 4, 18, 0.88) 78%,
        rgba(4, 2, 12, 0.96) 100%
    );
    pointer-events: none;
}

.pack-foot {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 10px 8px 11px;
    text-align: center;
}

.pack-tile:hover {
    transform: translateY(-5px) scale(1.03);
}

.pack-tile:hover .pack-art-img {
    transform: scale(1.08);
}

.pack-tile.active {
    border-color: #ffd700;
    box-shadow:
        0 0 28px rgba(255, 215, 0, 0.55),
        0 0 48px rgba(255, 0, 85, 0.28),
        var(--pack-glow, none);
    transform: scale(1.05);
}

.pack-tile .pack-name {
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 1px;
    line-height: 1.25;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9);
}

.pack-tile .pack-en {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.62);
    letter-spacing: 0.6px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.pack-tile .pack-ur {
    font-size: 10px;
    color: #ffd700;
    font-weight: 700;
    margin-top: 2px;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.35);
}

.pack-tile .pack-format {
    font-size: 8px;
    color: rgba(255, 255, 255, 0.38);
    margin-top: 3px;
    letter-spacing: 0.3px;
}

.pack-tag {
    position: absolute;
    top: 7px;
    right: 7px;
    font-size: 8px;
    font-weight: 900;
    padding: 3px 7px;
    border-radius: 8px;
    background: linear-gradient(135deg, #ff0055, #ff6600);
    color: #fff;
    z-index: 3;
    box-shadow: 0 2px 10px rgba(255, 0, 85, 0.45);
    letter-spacing: 0.3px;
}

.pack-tile[data-theme="cosmic"] {
    --pack-bg: linear-gradient(160deg, #1a0a3e, #4a1a8a);
    --pack-border: rgba(168, 90, 255, 0.65);
    --pack-glow: 0 0 22px rgba(140, 60, 255, 0.45);
}
.pack-tile[data-theme="gundam"] {
    --pack-bg: linear-gradient(160deg, #3a0808, #cc2020);
    --pack-border: rgba(255, 70, 70, 0.7);
    --pack-glow: 0 0 22px rgba(255, 40, 40, 0.4);
}
.pack-tile[data-theme="ocean"] {
    --pack-bg: linear-gradient(160deg, #051828, #00a8cc);
    --pack-border: rgba(0, 200, 255, 0.65);
    --pack-glow: 0 0 22px rgba(0, 180, 255, 0.42);
}
.pack-tile[data-theme="robot"] {
    --pack-bg: linear-gradient(160deg, #0e1828, #44ccff);
    --pack-border: rgba(80, 220, 255, 0.65);
    --pack-glow: 0 0 22px rgba(60, 200, 255, 0.4);
}
.pack-tile[data-theme="monster"] {
    --pack-bg: linear-gradient(160deg, #142208, #55aa22);
    --pack-border: rgba(120, 255, 80, 0.6);
    --pack-glow: 0 0 22px rgba(90, 220, 60, 0.38);
}
.pack-tile[data-theme="chinese"] {
    --pack-bg: linear-gradient(160deg, #1a1030, #c8b0ff);
    --pack-border: rgba(220, 210, 255, 0.7);
    --pack-glow: 0 0 22px rgba(200, 180, 255, 0.42);
}
.pack-tile[data-theme="greek"] {
    --pack-bg: linear-gradient(160deg, #2a2208, #ffd700);
    --pack-border: rgba(255, 220, 120, 0.7);
    --pack-glow: 0 0 22px rgba(255, 200, 80, 0.4);
}
.pack-tile[data-theme="limited"] {
    --pack-bg: linear-gradient(160deg, #330022, #ff0055);
    --pack-border: rgba(255, 180, 60, 0.75);
    --pack-glow: 0 0 24px rgba(255, 160, 0, 0.45);
}
.pack-tile[data-theme="rainbow"] {
    --pack-bg: linear-gradient(160deg, #ff0055, #7f00ff, #00ffff);
    --pack-border: rgba(255, 120, 220, 0.7);
    --pack-glow: 0 0 24px rgba(255, 0, 200, 0.35);
}
.pack-tile[data-theme="silver"] {
    --pack-bg: linear-gradient(160deg, #203050, #88a8e8);
    --pack-border: rgba(180, 210, 255, 0.65);
    --pack-glow: 0 0 20px rgba(140, 180, 255, 0.38);
}

/* 傳說霸主列 */
.legend-section {
    margin: 28px 0;
}

.legend-section h3 {
    margin: 0 0 4px;
    font-size: 1.15rem;
    text-align: center;
    background: linear-gradient(90deg, #ff6ec7, #ffd700, #00ffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.legend-section .legend-sub {
    text-align: center;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 16px;
}

.legend-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
    max-width: 100%;
}

@media (max-width: 1100px) {
    .legend-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .legend-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
}

.legend-card[role="button"]:focus-visible {
    outline: 2px solid rgba(255, 215, 0, 0.55);
    outline-offset: 3px;
}

.legend-card {
    position: relative;
    border-radius: 18px;
    padding: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.2);
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.25s, box-shadow 0.25s;
}

.legend-card:hover {
    transform: translateY(-6px) scale(1.02);
    z-index: 3;
}

.legend-card .legend-bg {
    position: absolute;
    inset: 0;
    background: var(--legend-grad);
    z-index: 0;
}

.legend-card .legend-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.25) 50%, transparent 60%);
    animation: legendShine 2.5s infinite;
    z-index: 1;
}

@keyframes legendShine {
    0% { transform: translateX(-120%); }
    100% { transform: translateX(120%); }
}

.legend-card .legend-mount {
    position: relative;
    z-index: 2;
    margin: 4px 0;
    width: 100%;
    max-width: 148px;
    min-height: 0;
}

.legend-card .void-card-frame.legend-card-art {
    width: 100%;
    margin: 0 auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

.legend-card .void-card-frame.legend-card-art .void-card-stage {
    cursor: inherit;
}

.legend-card .void-card-holo::before {
    opacity: calc(0.32 * var(--holo-intensity, 1));
}

.legend-card .void-card-stage.is-tilt-active .void-card-holo::before {
    opacity: calc(0.58 * var(--holo-intensity, 1));
}

.legend-card .void-card-stage.is-tilt-active .void-card-holo::after {
    opacity: calc(0.62 * var(--holo-intensity, 1));
}

.auth-wing-slot .void-card-frame.auth-wing-card-art {
    width: 100%;
    height: 100%;
    min-height: 0;
}

.auth-preview-mount .void-card-frame {
    width: min(100%, 220px);
    margin: 0 auto;
}

.legend-card .legend-title {
    position: relative;
    z-index: 2;
    font-size: 12px;
    font-weight: 900;
    color: #ffd700;
    text-align: center;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
    margin: 4px 0 2px;
}

.legend-card .legend-line {
    position: relative;
    z-index: 2;
    font-size: 10px;
    color: rgba(255,255,255,0.8);
    text-align: center;
}

.legend-card[data-series="cosmic"] { --legend-grad: linear-gradient(145deg, #1a0a3e, #7f00ff); box-shadow: 0 0 30px rgba(127,0,255,0.4); }
.legend-card[data-series="robot"] { --legend-grad: linear-gradient(145deg, #1a2030, #88aacc); box-shadow: 0 0 30px rgba(100,180,255,0.35); }
.legend-card[data-series="ocean"] { --legend-grad: linear-gradient(145deg, #051828, #00ccff); box-shadow: 0 0 30px rgba(0,200,255,0.4); }
.legend-card[data-series="gundam"] { --legend-grad: linear-gradient(145deg, #3a0808, #ff4400); box-shadow: 0 0 30px rgba(255,80,0,0.4); }

.legend-card .ur-flare {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 3;
    font-size: 9px;
    font-weight: 900;
    padding: 3px 8px;
    border-radius: 8px;
    background: linear-gradient(90deg, #ffd700, #ff8800);
    color: #1a0800;
}

/* 稀有度金字塔 */
.rarity-pyramid-section h3 {
    font-size: 14px;
    margin: 16px 0 10px;
    color: #c4a0ff;
}

.rarity-pyramid {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 16px;
}

.pyramid-row {
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    gap: 8px 10px;
    align-items: center;
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(10, 12, 26, 0.98);
    border: 1px solid rgba(140, 100, 255, 0.18);
    border-left: 3px solid rgba(255, 255, 255, 0.15);
    font-size: 12px;
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
    isolation: isolate;
}

.pyramid-row.tier-n { border-left-color: #8b93a8; }
.pyramid-row.tier-r { border-left-color: #4da3ff; }
.pyramid-row.tier-sr { border-left-color: #7eb8ff; }
.pyramid-row.tier-ssr { border-left-color: #ff9a3c; }
.pyramid-row.tier-ur { border-left-color: #ffd700; }
.pyramid-row.tier-lr { border-left-color: #ffb347; }
.pyramid-row.tier-mr { border-left-color: #ff4d8d; }
.pyramid-row.tier-sec {
    border-left-color: #00ffff;
    background: rgba(8, 14, 28, 0.98);
    border-color: rgba(0, 255, 255, 0.28);
}

.pyramid-tag { font-weight: 900; letter-spacing: 0.04em; min-width: 2.6em; font-size: 13px; }
.pyramid-code {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.55);
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.06);
}
.pyramid-stars { color: var(--gold); font-size: 11px; letter-spacing: 1px; }
.pyramid-label { color: rgba(255, 255, 255, 0.95); font-weight: 700; font-size: 12px; }
.pyramid-pool {
    color: rgba(210, 235, 255, 0.96);
    font-size: 11px;
    font-weight: 600;
    text-align: right;
    line-height: 1.5;
    text-shadow: none;
    background: rgba(0, 0, 0, 0.42);
    padding: 5px 8px;
    border-radius: 6px;
    word-break: break-word;
}

/* 保底 / 機率 摺疊區 */
.home-collapse {
    margin-bottom: 16px;
    position: relative;
    z-index: 4;
}

.home-collapse > summary {
    list-style: none;
}

.home-collapse > summary::-webkit-details-marker {
    display: none;
}

.collapse-toggle {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(163, 112, 247, 0.4);
    border-radius: 12px;
    background: rgba(0,0,0,0.4);
    color: #f0e6ff;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    text-align: left;
}

.collapse-toggle:focus-visible {
    outline: 2px solid rgba(192, 132, 252, 0.65);
    outline-offset: 2px;
}

.collapse-body {
    margin-top: 10px;
    position: relative;
    z-index: 2;
    background: rgba(6, 4, 18, 0.97);
    border: 1px solid rgba(140, 100, 255, 0.22);
    border-radius: 14px;
    padding: 12px 10px 14px;
}

.rarity-pyramid-section,
.rates-section,
.effect-gallery {
    position: relative;
    z-index: 1;
}

.home-collapse:not([open]) .collapse-body {
    display: none;
}

/* 保留舊組件 */
.pity-panel, .rates-section, .effect-gallery, .home-quick { margin-bottom: 20px; }

.pity-panel {
    background: rgba(8, 10, 22, 0.92);
    border: 1px solid rgba(255, 215, 0, 0.35);
    border-radius: 14px;
    padding: 16px 14px;
}

.pity-panel h3 { margin: 0 0 12px; font-size: 15px; color: #ffd700; text-align: center; }

.pity-bar-wrap { margin-bottom: 14px; }
.pity-label {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
    color: rgba(240, 235, 255, 0.95);
    line-height: 1.45;
}
.pity-note {
    font-size: 11px !important;
    line-height: 1.5 !important;
    color: rgba(190, 220, 255, 0.88) !important;
}
.pity-bar { height: 14px; border-radius: 10px; background: rgba(255,255,255,0.08); overflow: hidden; }
.pity-fill { height: 100%; border-radius: 10px; transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); position: relative; }
.pity-fill.limited { background: linear-gradient(90deg, #7f00ff, #ff0055, #ffd700); box-shadow: 0 0 20px rgba(255, 0, 128, 0.8); }
.pity-fill.ur { background: linear-gradient(90deg, #ffd700, #ff8c00, #ff3366); box-shadow: 0 0 16px rgba(255, 180, 0, 0.7); }
.rate-scheme { font-size: 11px; color: rgba(180, 220, 255, 0.85); margin: 0 0 8px; }
.rate-psych {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.45);
    margin: -4px 0 8px 52px;
    line-height: 1.35;
}
.pity-fill.ssr { background: linear-gradient(90deg, #4060ff, #ff6ec7); }
.pity-fill.sr { background: linear-gradient(90deg, #22aa88, #bb86fc); }

.pity-fill::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
    animation: pityShine 2s infinite;
}

@keyframes pityShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.rates-section h3 {
    margin: 0 0 14px;
    font-size: 16px;
    text-align: center;
    background: linear-gradient(90deg, #00ffff, #ff88ff, #ffd700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.rates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

.rate-card {
    background: rgba(8, 6, 20, 0.85);
    border-radius: 14px;
    padding: 14px;
    border: 1px solid rgba(163, 112, 247, 0.3);
}

.rate-card.limited-pool {
    border-color: rgba(255, 215, 0, 0.5);
    box-shadow: 0 0 24px rgba(255, 215, 0, 0.15);
}

.rate-card h4 { margin: 0 0 10px; font-size: 14px; }
.rate-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 12px; }
.rate-tier { min-width: 2.4em; font-weight: 900; text-align: center; }
.rate-bar-bg { flex: 1; height: 8px; background: rgba(255,255,255,0.06); border-radius: 4px; overflow: hidden; }
.rate-bar-fill { height: 100%; border-radius: 4px; }
.rate-pct { width: 42px; text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }

.effect-gallery h3 { margin: 0 0 14px; font-size: 15px; }
.effect-scroll { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 16px; scroll-snap-type: x mandatory; }
.gallery-card-wrap { flex: 0 0 130px; scroll-snap-align: center; text-align: center; cursor: pointer; }
.gallery-card-wrap .card-3d-wrap { width: 130px; height: 186px; margin: 0 auto; }
.gallery-card-wrap:focus-visible { outline: 2px solid rgba(255, 215, 0, 0.55); outline-offset: 3px; border-radius: 12px; }
.gallery-card-wrap .fx-label { font-size: 11px; font-weight: 700; color: #ffd700; }
.gallery-card-wrap p { font-size: 10px; color: var(--muted); }

.home-quick {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

@media (max-width: 500px) {
    .home-quick { grid-template-columns: repeat(2, 1fr); }
}

.quick-tile {
    padding: 14px 8px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(12, 10, 28, 0.9);
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.quick-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(127, 0, 255, 0.35);
}

.quick-tile .icon { font-size: 26px; display: block; margin-bottom: 4px; }
.quick-tile strong { font-size: 12px; display: block; }
.quick-tile small { font-size: 10px; color: var(--muted); }

.limited-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 12;
    font-size: 10px;
    font-weight: 900;
    padding: 3px 8px;
    border-radius: 6px;
    background: linear-gradient(90deg, #ff0055, #ffd700);
    color: #1a0800;
}

#screen-app.home-wide {
    max-width: 100%;
    width: 100%;
}

#screen-app.home-wide .home-arena {
    width: 100%;
    margin: 0;
}

#screen-app.home-wide .home-stage {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

#screen-app.home-wide .app-header {
    max-width: 100%;
}

/* Auth 炫彩升級（手機可滾動見 auth.css @media max-width 960px） */
#screen-auth {
    background: #030208;
    overflow: hidden;
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
}

@media (max-width: 960px) {
    #screen-auth:not(.hidden) {
        overflow-y: auto;
        overflow-x: hidden;
        height: auto;
        min-height: 100dvh;
        max-height: none;
    }
}

#screen-auth::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        conic-gradient(from 180deg at 50% 50%, rgba(255,0,85,0.15), rgba(127,0,255,0.2), rgba(0,255,255,0.15), rgba(255,215,0,0.1));
    animation: auroraSpin 25s linear infinite;
    filter: blur(60px);
    z-index: 0;
    pointer-events: none;
}

.auth-layout { position: relative; z-index: 2; }

/* 手機：關閉首頁炫光背景（避免破圖／色塊錯位） */
@media (max-width: 768px) {
    .home-aurora,
    .home-aurora-2,
    .home-aurora-3,
    .home-bg-zones,
    .home-bg-beasts,
    .home-bg-tentacles,
    .home-bg-cards,
    .home-particles,
    .home-lightning {
        display: none !important;
    }

    .home-arena::before {
        opacity: 0.35;
    }

    .rarity-pyramid {
        gap: 8px;
    }

    .pyramid-row {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 6px 10px;
        padding: 10px 12px;
    }

    .pyramid-label {
        flex: 1 1 100%;
        font-size: 13px;
        text-align: center;
        margin-top: 2px;
    }

    .pyramid-pool {
        flex: 1 1 100%;
        text-align: center;
        font-size: 11px;
        padding: 8px 10px;
        margin-top: 2px;
        border-top: none;
        background: rgba(0, 0, 0, 0.45);
    }

    .home-collapse .collapse-body {
        padding: 10px 8px 12px;
        max-width: min(400px, 100%);
        margin-inline: auto;
    }

    .pity-panel {
        max-width: min(400px, 100%);
        margin-inline: auto;
    }
}

@media (max-width: 720px) {
    .pack-scroll {
        touch-action: pan-x pan-y;
        overscroll-behavior-x: contain;
        overflow-y: hidden;
    }

    .pack-tile {
        touch-action: pan-y;
    }
}
