/* ============================================================
   gacha.css — 抽奖中心（盲盒抽取）
   设计：赛博霓虹 + 组件库对齐；全部走 CSS 变量，零硬编码色。
   结构：page-header → tabs(3盲盒) → 盲盒舞台 → 爆率表 → 底部盲盒图标栏
        → 结果弹窗(开盒动画 + 搜索扫描 + 翻牌 reveal)
   ============================================================ */

/* 品质色板（与 collection.css 保持一致，暗色默认 / 浅色覆盖） */
:root {
    --rarity-0: #e8e8e8;  /* 白·普通 */
    --rarity-1: #4ade80;  /* 绿·稀有 */
    --rarity-2: #60a5fa;  /* 蓝·精良 */
    --rarity-3: #c084fc;  /* 紫·史诗 */
    --rarity-4: #fbbf24;  /* 金·传说 */
    --rarity-5: #f87171;  /* 红·神话 */
    --rarity-6: #ffb3d1;  /* 粉·炫彩（淡粉↔浅白渐变，高于神话） */
}
body.theme-light-simple {
    --rarity-0: #5a5a5a; --rarity-1: #16a34a; --rarity-2: #2563eb;
    --rarity-3: #9333ea; --rarity-4: #d97706; --rarity-5: #dc2626;
    --rarity-6: #d4699d;
}

/* 炫彩(6)专属渐变：淡粉 ↔ 浅白（卡片背景/边框/文字/光效共用） */
:root {
    --iridescent-grad: linear-gradient(145deg, #ffeaf4, #ffffff 36%, #ffd9eb 58%, #fff6fb 82%, #ffcfe6);
    --iridescent-grad-strong: linear-gradient(145deg, #ffdcee, #fff 28%, #ffc4e0 52%, #ffeef7 76%, #ffb8d6);
}

.gacha-main {
    padding: 120px 2rem 5rem;
    max-width: 960px;
    margin: 0 auto;
}
@media (max-width: 768px) {
    .gacha-main { padding: 84px 1rem 3rem; }
}

/* ---------- 盲盒舞台（中央大盲盒 + 信息 + 按钮） ---------- */
.gacha-stage {
    display: grid;
    grid-template-columns: minmax(220px, 320px) 1fr;
    gap: 2rem;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-card);
}
@media (max-width: 720px) {
    .gacha-stage { grid-template-columns: 1fr; gap: 1.2rem; text-align: center; }
}

/* 大盲盒视觉（CSS 3D 礼品盒，主题色随盲盒类型） */
.gacha-box {
    --box-color: var(--accent-cyan);
    --box-color-2: color-mix(in srgb, var(--box-color) 45%, #000);
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto;
    cursor: pointer;
    perspective: 600px;
    -webkit-tap-highlight-color: transparent;
}
.gacha-box--normal  { --box-color: #00f5d4; }
.gacha-box--premium { --box-color: #b388ff; }
.gacha-box--myth    { --box-color: #ffcf40; }

.gacha-box__glow {
    position: absolute;
    inset: -30%;
    background: radial-gradient(circle, color-mix(in srgb, var(--box-color) 40%, transparent), transparent 65%);
    opacity: 0.35;
    filter: blur(8px);
    transition: opacity var(--dur-ui) var(--ease-out), transform var(--dur-ui) var(--ease-out);
    pointer-events: none;
}
.gacha-box__body {
    position: absolute;
    left: 18px; right: 18px; bottom: 14px;
    height: 118px;
    border-radius: 14px;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--box-color) 55%, #12121a), var(--box-color-2));
    box-shadow: inset 0 2px 0 rgba(255,255,255,0.18), 0 10px 26px color-mix(in srgb, var(--box-color) 30%, transparent);
    overflow: hidden;
}
.gacha-box__ribbon-v {
    position: absolute; top: 0; bottom: 0; left: 50%;
    width: 26px; transform: translateX(-50%);
    background: linear-gradient(180deg, rgba(255,255,255,0.85), rgba(255,255,255,0.45));
    opacity: 0.85;
}
.gacha-box__ribbon-h {
    position: absolute; left: 0; right: 0; top: 52%;
    height: 20px; transform: translateY(-50%);
    background: linear-gradient(90deg, rgba(255,255,255,0.6), rgba(255,255,255,0.85), rgba(255,255,255,0.6));
    opacity: 0.8;
}
.gacha-box__lid {
    position: absolute;
    left: 10px; right: 10px; top: 10px;
    height: 58px;
    border-radius: 14px 14px 6px 6px;
    background: linear-gradient(135deg, var(--box-color), color-mix(in srgb, var(--box-color) 70%, #fff 30%));
    box-shadow: inset 0 2px 0 rgba(255,255,255,0.4), 0 6px 16px rgba(0,0,0,0.35);
    transform-origin: 50% 100%;
    transition: transform 520ms var(--ease-out), opacity 420ms ease;
    z-index: 3;
}
.gacha-box__bow {
    position: absolute;
    left: 50%; top: -14px;
    width: 46px; height: 30px;
    transform: translateX(-50%);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    background: radial-gradient(circle at 30% 30%, #fff, color-mix(in srgb, var(--box-color) 60%, #fff));
    box-shadow: 0 3px 8px rgba(0,0,0,0.3);
}
.gacha-box__bow::before {
    content: ''; position: absolute; left: 50%; top: 8px;
    width: 10px; height: 10px; transform: translateX(-50%);
    border-radius: 50%; background: color-mix(in srgb, var(--box-color) 70%, #000);
}
.gacha-box__hint {
    position: absolute; left: 0; right: 0; bottom: -26px;
    text-align: center; font-size: 0.78rem; color: var(--text-muted);
    letter-spacing: 1px;
}

/* 开盒动画：抖动 → 开盖 → 光爆 */
.gacha-box.is-opening { animation: gachaShake 480ms var(--ease-out); }
.gacha-box.is-opening .gacha-box__lid {
    transform: translateY(-86px) rotate(-10deg);
    opacity: 0;
}
.gacha-box.is-opening .gacha-box__glow {
    opacity: 1;
    transform: scale(1.5);
}
.gacha-box.is-opening .gacha-box__body {
    animation: gachaSquash 520ms var(--ease-out);
}
@keyframes gachaShake {
    0%,100% { transform: translateX(0) rotate(0); }
    15% { transform: translateX(-8px) rotate(-3deg); }
    30% { transform: translateX(8px) rotate(3deg); }
    45% { transform: translateX(-6px) rotate(-2deg); }
    60% { transform: translateX(6px) rotate(2deg); }
    75% { transform: translateX(-3px) rotate(-1deg); }
}
@keyframes gachaSquash {
    0% { transform: scale(1,1); }
    55% { transform: scale(1.06, 0.94); }
    100% { transform: scale(1,1); }
}

/* 舞台右侧信息 */
.gacha-info__name {
    font-family: 'Orbitron', 'Microsoft YaHei', 'PingFang SC', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
    letter-spacing: 1px;
}
.gacha-info__sub {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1.1rem;
    letter-spacing: 1px;
}
.gacha-info__cost {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.9rem;
    background: rgba(255,215,0,0.08);
    border: 1px solid rgba(255,215,0,0.28);
    border-radius: var(--radius-md);
    color: var(--accent-gold);
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    margin-bottom: 1.2rem;
}
.gacha-actions {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}
@media (max-width: 720px) {
    .gacha-actions { justify-content: center; }
}
.gacha-actions .btn { min-width: 150px; }
.gacha-actions .btn .price { display: block; font-size: 0.78rem; opacity: 0.85; margin-top: 2px; font-weight: 700; }

/* ---------- 结果弹窗 ---------- */
.gacha-result {
    max-width: 760px;
    width: 94%;
}
.gacha-result__head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 1rem;
}
.gacha-result__head h3 {
    font-family: 'Orbitron', 'Microsoft YaHei', 'PingFang SC', sans-serif;
    color: var(--accent-cyan);
    font-size: 1.2rem;
}
.gacha-result__grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.9rem;
    padding: 0.4rem 0.2rem 0.8rem;
    max-height: 60vh;
    overflow-y: auto;
    overflow-x: hidden; /* 防止扩散/扫描动画溢出产生横向滚动条 */
}
/* 单抽时让卡片居中放大 */
.gacha-result__grid.single {
    grid-template-columns: minmax(200px, 260px);
    justify-content: center;
}
/* 单抽大卡：名称/价格字号增大，且名称+价格块在卡片下部空间（平面图框架以下）内垂直居中。
   框架沿用 base 的正方形（aspect-ratio 1:1 + max-height 50%），仅贴顶，把下部空间全留给文字 */
.gacha-result__grid.single .gacha-card__content {
    padding: 0.55rem 0.55rem 0.8rem;
}
.gacha-result__grid.single .gacha-card__frame {
    margin-top: 0;      /* 框架贴顶，下部空间全部留给名称+价格 */
    flex-shrink: 0;
}
.gacha-result__grid.single .gacha-card__name {
    /* 单抽大卡：基准/上限同步放大（≤4 字取上限 2.6rem） */
    font-size: clamp(0.7rem, calc(100cqw / var(--name-len, 6)), 2.6rem);
}
.gacha-result__grid.single .gacha-card:not(.gacha-card--miss) .gacha-card__name {
    margin-top: auto;       /* 与价格 margin-bottom:auto 配合，使名称+价格在下部空间垂直居中 */
}
.gacha-result__grid.single .gacha-card:not(.gacha-card--miss) .gacha-card__price {
    margin-top: 0.5rem;
    margin-bottom: auto;
    font-size: 1.05rem;
}
.gacha-result__grid.single .gacha-card__miss-ico { font-size: 2rem; }

/* ---------- 结果卡（搜索放大镜 → 品质圆扩散 → 翻出卡面） ---------- */
.gacha-card {
    --card-rarity: var(--accent-cyan);
    aspect-ratio: 3 / 4;
    position: relative;
    perspective: 700px;
}
/* 稀有度 → 主题色变量（reveal 后边框/圆/名称共用） */
.gacha-card[data-rarity="0"] { --card-rarity: var(--rarity-0); }
.gacha-card[data-rarity="1"] { --card-rarity: var(--rarity-1); }
.gacha-card[data-rarity="2"] { --card-rarity: var(--rarity-2); }
.gacha-card[data-rarity="3"] { --card-rarity: var(--rarity-3); }
.gacha-card[data-rarity="4"] { --card-rarity: var(--rarity-4); }
.gacha-card[data-rarity="5"] { --card-rarity: var(--rarity-5); }
.gacha-card[data-rarity="6"] { --card-rarity: var(--rarity-6); }
.gacha-card--miss { --card-rarity: var(--text-muted); }

/* 炫彩(6)专属：淡粉-浅白渐变卡面 + 流动反光 */
.gacha-card[data-rarity="6"] .gacha-card__face {
    background: var(--iridescent-grad);
    border-color: #ffaeca;
    box-shadow:
        0 0 24px rgba(255, 135, 190, 0.5),
        inset 0 0 26px rgba(255, 255, 255, 0.55);
}
.gacha-card[data-rarity="6"] .gacha-card__face::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(115deg,
        transparent 0%, transparent 30%,
        rgba(255, 255, 255, 0.55) 42%,
        rgba(255, 150, 200, 0.42) 52%,
        rgba(255, 255, 255, 0.22) 62%,
        transparent 76%, transparent 100%);
    background-size: 260% 100%;
    animation: iridescentFlow 3.4s linear infinite;
    mix-blend-mode: screen;
    pointer-events: none;
}
@keyframes iridescentFlow {
    0%   { background-position: 130% 0; }
    100% { background-position: -130% 0; }
}
/* 炫彩名称：淡粉-浅白渐变字 */
.gacha-card[data-rarity="6"] .gacha-card__name {
    background: var(--iridescent-grad-strong);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
    filter: drop-shadow(0 0 8px rgba(255, 150, 200, 0.55));
}
/* 炫彩(6)：文字区域（下部）垫深色底，避免渐变字/灰字落在淡粉-浅白卡面上看不清；
   上部（模型区）保留淡粉-浅白渐变卡面，下部与其他卡片一样转为暗色 */
.gacha-card[data-rarity="6"] .gacha-card__content {
    background: linear-gradient(180deg,
        transparent 0%, transparent 40%,
        rgba(12, 12, 18, 0.66) 62%,
        rgba(12, 12, 18, 0.94) 100%);
    border-radius: 12px;
}

/* 卡面容器：对应品质色边框 + 浅色品质色毛玻璃背景（品质圆 flash 消散后显露） */
.gacha-card__face {
    position: absolute; inset: 0;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(145deg,
        color-mix(in srgb, var(--card-rarity) 22%, transparent),
        color-mix(in srgb, var(--card-rarity) 8%, transparent) 62%);
    border: 2px solid color-mix(in srgb, var(--card-rarity) 70%, transparent);
    box-shadow:
        0 0 16px color-mix(in srgb, var(--card-rarity) 26%, transparent),
        inset 0 0 18px color-mix(in srgb, var(--card-rarity) 8%, transparent);
    backdrop-filter: blur(12px) saturate(1.3);
    -webkit-backdrop-filter: blur(12px) saturate(1.3);
    transition: border-color 240ms var(--ease-out), box-shadow 240ms var(--ease-out);
}
/* 搜索中（未翻开）：外框与辉光一并置为深灰，不暴露稀有度；reveal 时随 overlay 渐隐自然恢复稀有度色 */
.gacha-card:not(.is-revealing):not(.is-revealed) .gacha-card__face {
    border-color: #3a3a42;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.35);
}
.gacha-card--miss .gacha-card__face {
    box-shadow: 0 0 10px color-mix(in srgb, var(--card-rarity) 16%, transparent);
}

/* 背面 + 灰色半透明放大镜（搜索阶段，绕卡中心按圆形轨道公转）
   未搜索结束的卡面背景 = 黑灰斜向条纹；边框改为深灰色 */
.gacha-card__overlay {
    position: absolute; inset: 0;
    z-index: 5;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    background:
        repeating-linear-gradient(45deg, #2c2c33 0 14px, #19191e 14px 28px);
    border: 1px solid #3a3a42;   /* 深灰边框：搜索中卡片不突出 */
    transition: opacity 240ms var(--ease-out);
}
.gacha-card.is-revealing .gacha-card__overlay,
.gacha-card.is-revealed .gacha-card__overlay { opacity: 0; pointer-events: none; }

/* 放大镜 PNG：orbit 容器公转 + lens 反自转保持图标始终朝上
   注意：卡片为 3:4，lens 若用 width/height 双 44% 会得到非正方形容器，
   使方形 PNG 被纵向拉伸 → 容器改为 aspect-ratio:1 正方形 + img object-fit:contain 保持原比例 */
.gacha-card__orbit {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    animation: gachaLensOrbit var(--lens-dur, 1.15s) linear infinite;
    pointer-events: none;
}
.gacha-card__lens {
    position: relative;
    width: 44%;
    aspect-ratio: 1 / 1;      /* 保证镜头容器为正方形，防止 3:4 卡面上被纵向拉伸 */
    --lens-r: 26px;
    opacity: 0.65;
    transform: translateX(var(--lens-r));
    animation: gachaLensCounter var(--lens-dur, 1.15s) linear infinite;
    will-change: transform;
    display: flex; align-items: center; justify-content: center;
    pointer-events: none;
}
.gacha-card__lens-img {
    width: 100%; height: 100%;
    display: block;
    object-fit: contain;      /* 保持图标原始比例，不拉伸 */
    filter: drop-shadow(0 0 1px rgba(255,255,255,0.4));
    user-select: none; -webkit-user-drag: none;
}
@keyframes gachaLensOrbit {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
@keyframes gachaLensCounter {
    from { transform: translateX(var(--lens-r)) rotate(0deg); }
    to   { transform: translateX(var(--lens-r)) rotate(-360deg); }
}
.gacha-result__grid.single .gacha-card__lens { --lens-r: 44px; }

/* 品质色圆：快速放大覆盖卡面（flash，占前 50%），随后原地快速渐隐（占后 50%），让毛玻璃卡面平滑显露 */
.gacha-card__circle {
    position: absolute; left: 50%; top: 50%;
    width: 34%; height: 34%;
    transform: translate(-50%,-50%) scale(0);
    border-radius: 50%;
    background: var(--card-rarity);
    z-index: 3;
    pointer-events: none;
    opacity: 0;
}
.gacha-card.is-revealing .gacha-card__circle {
    animation: gachaCirclePop 540ms var(--ease-out) forwards;
}
@keyframes gachaCirclePop {
    0%   { transform: translate(-50%,-50%) scale(0);    opacity: 1; }
    50%  { transform: translate(-50%,-50%) scale(7);    opacity: 1; }
    100% { transform: translate(-50%,-50%) scale(7);    opacity: 0; }
}

/* 出金及以上（金/红/炫彩，稀有度≥4）：圆形放大动画结束后追加一次短闪光
   元素仅由 JS 在 rarity≥4 的卡片里注入；动画延迟 540ms = 圆动画时长，圆消散瞬间闪起 */
.gacha-card__flash {
    position: absolute; inset: 0;
    z-index: 7;
    border-radius: 12px;
    pointer-events: none;
    opacity: 0;
    background:
        radial-gradient(130% 130% at 50% 50%, rgba(255,255,255,0.95), rgba(255,255,255,0.38) 44%, transparent 70%),
        linear-gradient(105deg, transparent 18%, rgba(255,255,255,0.7) 36%, rgba(255,240,150,0.45) 45%, transparent 62%);
}
.gacha-card.is-revealing .gacha-card__flash {
    animation: gachaCardFlash 0.42s ease-out 0.54s 1;
}
@keyframes gachaCardFlash {
    0%   { opacity: 0; }
    20%  { opacity: 1; }
    100% { opacity: 0; }
}

/* 卡面内容（圆角框平面图 + 名称品质色 + 价格）
   container-type: inline-size 使名称可用 cqw 单位按卡片宽度自适应字号 */
.gacha-card__content {
    position: absolute; inset: 0;
    z-index: 4;
    container-type: inline-size;
    display: flex; flex-direction: column;
    align-items: center; justify-content: flex-start;
    padding: 0.5rem 0.45rem 0.55rem;
    opacity: 0;
    /* 内容在品质圆结束（540ms）前 ~200ms 开始淡入（340ms 触发 + 180ms 过渡 = 圆结束前已全显） */
    transition: opacity 180ms linear;
}
.gacha-card.is-revealed .gacha-card__content { opacity: 1; }

.gacha-card__frame {
    width: 100%;
    margin-top: 0.35rem;
    aspect-ratio: 1 / 1;
    max-height: 50%;
    border-radius: 10px;
    border: 1.5px solid color-mix(in srgb, var(--card-rarity) 55%, transparent);
    background: transparent;            /* 模型平面图不要背景 */
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.gacha-card__frame canvas { image-rendering: pixelated; max-width: 92%; max-height: 92%; }

.gacha-card__name {
    margin-top: 0.5rem;
    /* 字号随名称字数自适应：--name-len 由 JS 注入
       cqw 基于卡内 content-box（约卡宽 85%），100cqw/len 让名称总宽填满内容区；
       clamp 兜底：≤4 字取上限放大，超长取下限避免过小 */
    font-size: clamp(0.5rem, calc(100cqw / var(--name-len, 6)), 1.18rem);
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    color: var(--card-rarity); /* 品质色填充 */
    text-shadow: 0 0 10px color-mix(in srgb, var(--card-rarity) 45%, transparent);
    max-width: 100%;
    word-break: break-word;
}
.gacha-card__price {
    margin-top: 0.28rem;
    font-size: 0.7rem;         /* 价格 < 名称 */
    font-weight: 700;
    color: var(--text-muted);
    font-family: 'Orbitron', sans-serif;
}

.gacha-card__tag {
    position: absolute;
    top: 6px; right: 6px;
    z-index: 6;
    font-size: 0.62rem;
    font-weight: 800;
    padding: 0.12rem 0.4rem;
    border-radius: 4px;
    letter-spacing: 0.5px;
}
.gacha-card__tag--new {
    background: var(--accent-gold);
    color: #1a1a00;
    box-shadow: 0 0 10px rgba(255,215,0,0.6);
}
.gacha-card__tag--dup {
    background: rgba(255,255,255,0.12);
    color: var(--text-muted);
}

/* 落空卡面 */
.gacha-card--miss .gacha-card__content { justify-content: center; }
.gacha-card--miss .gacha-card__name { color: var(--text-muted); text-shadow: none; }
.gacha-card--miss .gacha-card__miss-ico { font-size: 1.6rem; margin-bottom: 0.3rem; }

/* 已翻出卡面可点击查看详情（与收藏室同款弹窗） */
.gacha-card.is-revealed { cursor: pointer; }
.gacha-card.is-revealed:active { transform: scale(0.97); }

/* 高稀有度 reveal 抖动（紫/金/红，幅度依次增大；触发时机 = 卡面翻出瞬间 is-revealed） */
@keyframes gachaRevealShakeSmall {
    0%,100% { transform: translateX(0) rotate(0); }
    15% { transform: translateX(-3px) rotate(-1deg); }
    35% { transform: translateX(3px) rotate(1deg); }
    55% { transform: translateX(-2px) rotate(-0.5deg); }
    75% { transform: translateX(2px) rotate(0.5deg); }
}
@keyframes gachaRevealShakeMid {
    0%,100% { transform: translateX(0) rotate(0); }
    15% { transform: translateX(-5px) rotate(-1.5deg); }
    35% { transform: translateX(5px) rotate(1.5deg); }
    55% { transform: translateX(-3px) rotate(-1deg); }
    75% { transform: translateX(3px) rotate(1deg); }
}
@keyframes gachaRevealShakeBig {
    0%,100% { transform: translateX(0) rotate(0); }
    12% { transform: translateX(-8px) rotate(-2deg); }
    30% { transform: translateX(8px) rotate(2deg); }
    48% { transform: translateX(-6px) rotate(-1.5deg); }
    64% { transform: translateX(6px) rotate(1.5deg); }
    82% { transform: translateX(-3px) rotate(-0.8deg); }
}
/* 动画只在 is-revealed 加入瞬间播放一次（无 forwards，播完即还原 transform） */
.gacha-card.is-revealed[data-rarity="3"] { animation: gachaRevealShakeSmall 420ms var(--ease-out); }
.gacha-card.is-revealed[data-rarity="4"] { animation: gachaRevealShakeMid 470ms var(--ease-out); }
.gacha-card.is-revealed[data-rarity="5"] { animation: gachaRevealShakeBig 530ms var(--ease-out); }
.gacha-card.is-revealed[data-rarity="6"] { animation: gachaRevealShakeBig 610ms var(--ease-out); }

.gacha-result__summary {
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 0.4rem 0 1rem;
    min-height: 1.2em;
}
.gacha-result__summary b { color: var(--accent-cyan); }

.gacha-result__foot {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    margin-top: 0.6rem;
}
.gacha-result__foot .btn { min-width: 140px; }

/* ---------- 动效降级 ---------- */
@media (prefers-reduced-motion: reduce) {
    .gacha-box.is-opening { animation: none; }
    .gacha-box.is-opening .gacha-box__lid { transform: translateY(-86px); opacity: 0; }
    .gacha-box.is-opening .gacha-box__glow { opacity: 1; transform: scale(1.5); }
    .gacha-box.is-opening .gacha-box__body { animation: none; }
    .gacha-card__orbit, .gacha-card__lens { animation: none; }
    .gacha-card__lens { transform: translateX(var(--lens-r)) rotate(0deg); }
    .gacha-card__circle { animation: none !important; transform: translate(-50%,-50%) scale(7); opacity: 0; }
    .gacha-card__content { transition: none; }
    .gacha-card.is-revealed[data-rarity="3"],
    .gacha-card.is-revealed[data-rarity="4"],
    .gacha-card.is-revealed[data-rarity="5"],
    .gacha-card.is-revealed[data-rarity="6"] { animation: none; }
    .gacha-card__flash { animation: none !important; opacity: 0; }
    .gacha-card[data-rarity="6"] .gacha-card__face::after { animation: none; }
}
