/* ふるさと納税ガチャ v7: 黒〜濃紺の地に、金・虹のメタリックと光の筋。画像が主役 */
@font-face { font-family: 'DSEG7'; src: url(fonts/DSEG7Classic-Bold.woff2) format('woff2'); font-weight: 700; font-display: swap; }
:root {
  --bg: #04060d; --bg2: #0a1128; --ink: #f3f1ea; --mute: #8e98b4; --line: rgba(255, 255, 255, .12);
  --gold: linear-gradient(180deg, #fff6c8 0%, #ffd95a 28%, #e8a31a 52%, #fff0a0 70%, #c9840b 100%);
  --goldflat: #ffc83a; --lcd: #ffb23a; --lcdglow: rgba(255, 150, 30, .65);
  --N: #9fb2c8; --R: #4b8dff; --SR: #ff3d57; --SSR: #ffc83a;
  --rainbow: linear-gradient(115deg, #ff3d6e, #ff9a3d, #ffe14a, #3dff9a, #3dc8ff, #9a6bff, #ff3d6e);
  --font-num: 'Dela Gothic One', 'Hiragino Kaku Gothic Std', 'Noto Sans JP', sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; overflow-x: hidden; background: var(--bg); color: var(--ink); 
  font-family: 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', 'Yu Gothic', system-ui, sans-serif; touch-action: manipulation; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
[hidden] { display: none !important; }
b { font-weight: 800; }

.app { position: relative; min-height: 100dvh; display: flex; flex-direction: column; background: radial-gradient(120% 60% at 50% -10%, #16224a 0%, var(--bg2) 38%, var(--bg) 78%); overflow-x: clip; }
.app.shake { animation: shake .5s; } .app.shake.big { animation: shakeBig .9s; }
@keyframes shake { 0%, 100% { transform: none } 20% { transform: translate(-4px, 2px) } 40% { transform: translate(4px, -3px) } 60% { transform: translate(-3px, -2px) } 80% { transform: translate(3px, 3px) } }
@keyframes shakeBig { 0%, 100% { transform: none } 10% { transform: translate(-9px, 5px) } 25% { transform: translate(8px, -7px) } 40% { transform: translate(-7px, -5px) } 55% { transform: translate(6px, 7px) } 70% { transform: translate(-4px, 3px) } 85% { transform: translate(3px, -2px) } }

/* 背景の光の筋と粒 */
.bgfx { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.bgfx i { position: absolute; display: block; }
.bgfx .s1 { left: -30%; top: -10%; width: 160%; height: 40%; background: repeating-linear-gradient(105deg, transparent 0 38px, rgba(255, 215, 120, .05) 38px 44px, transparent 44px 90px); transform: rotate(-8deg); animation: drift 18s linear infinite; mask-image: linear-gradient(#000, transparent); }
.bgfx .s2 { right: -40%; bottom: -10%; width: 160%; height: 40%; background: repeating-linear-gradient(75deg, transparent 0 50px, rgba(120, 170, 255, .05) 50px 55px, transparent 55px 110px); animation: drift2 24s linear infinite; mask-image: linear-gradient(transparent, #000); }
@keyframes drift { to { background-position: 180px 0; } } @keyframes drift2 { to { background-position: -220px 0; } }
.bgfx .dust { inset: 0; background-image: radial-gradient(circle, rgba(255, 220, 140, .55) 0 1px, transparent 1.5px), radial-gradient(circle, rgba(255, 255, 255, .35) 0 1px, transparent 1.5px); background-size: 97px 131px, 173px 89px; background-position: 0 0, 40px 60px; opacity: .45; animation: dust 40s linear infinite; }
@keyframes dust { to { background-position: -30px -520px, 20px -380px; } }

.pr { position: relative; z-index: 3; display: flex; gap: 6px; align-items: center; padding: max(4px, env(safe-area-inset-top)) 12px 4px; font-size: 10px; color: var(--mute); background: rgba(0, 0, 0, .35); }
.pr b { border: 1px solid var(--mute); border-radius: 3px; padding: 0 3px; font-size: 9px; }
.pr em { margin-left: auto; font-style: normal; color: #ffcf6b; }

.screen { position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; padding: 0 16px calc(150px + env(safe-area-inset-bottom)); }

/* ===== 入力 ===== */
.logo { margin: 14px 0 0; text-align: center; line-height: 1; }
.logo small { display: block; font-size: 15px; letter-spacing: .5em; color: #d8c28a; font-weight: 700; }
.logo span { display: block; font-family: var(--font-num); font-size: 54px; letter-spacing: .04em; background: var(--gold); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-stroke: 1px #7a4d00; filter: drop-shadow(0 0 14px rgba(255, 190, 60, .5)) drop-shadow(0 3px 0 #5a3500); }
.lead { text-align: center; margin: 8px 0 10px; font-size: 13px; color: #c9d1ea; } .lead b { color: #ffd466; }
.panel { background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02)); border: 1px solid rgba(255, 215, 120, .22); border-radius: 14px; padding: 10px 14px; margin-bottom: 9px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); }
.q { font-size: 12px; font-weight: 700; color: #e6cf90; letter-spacing: .06em; } .q small { color: var(--mute); font-weight: 400; margin-left: 6px; }
.income-val { text-align: center; margin: 2px 0 0; } .income-val b { font-family: var(--font-num); font-size: 38px; background: var(--gold); -webkit-background-clip: text; background-clip: text; color: transparent; } .income-val small { font-size: 14px; color: #d8c28a; margin-left: 4px; }
input[type=range] { width: 100%; height: 30px; background: none; -webkit-appearance: none; appearance: none; margin: 0; }
input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, #6b4a0c, #ffcf4a); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: -11px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff8d0, #ffc83a 50%, #a8680a); border: 2px solid #fff3b0; box-shadow: 0 0 14px rgba(255, 190, 60, .8); }
input[type=range]::-moz-range-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, #6b4a0c, #ffcf4a); }
input[type=range]::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: #ffc83a; border: 2px solid #fff3b0; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 2px; }
.chips button { padding: 5px 11px; border-radius: 99px; font-size: 12px; background: rgba(255, 255, 255, .07); border: 1px solid var(--line); color: #c9d1ea; } .chips button.on { background: var(--gold); color: #3a2400; border-color: #ffe9a0; font-weight: 800; }
.seg { display: flex; gap: 6px; margin: 5px 0 6px; } .seg button { flex: 1; padding: 7px 4px; border-radius: 10px; font-size: 13px; font-weight: 700; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); line-height: 1.15; } .seg button small { display: block; font-size: 9px; color: var(--mute); font-weight: 400; }
.seg button.on { background: linear-gradient(180deg, #ffe58a, #e0a020); color: #3a2400; border-color: #fff0b0; } .seg button.on small { color: #6b4a10; }
.row { display: flex; align-items: center; justify-content: space-between; font-size: 13px; } .row small { color: var(--mute); margin-left: 4px; font-size: 10px; }
.step { display: flex; align-items: center; gap: 8px; } .step button { width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .08); border: 1px solid var(--line); font-size: 18px; } .step b { min-width: 18px; text-align: center; font-size: 16px; }
.limit-panel { text-align: center; border-color: rgba(255, 190, 60, .5); background: linear-gradient(180deg, rgba(255, 190, 60, .1), rgba(0, 0, 0, .35)); box-shadow: 0 0 24px rgba(255, 170, 40, .12), inset 0 1px 0 rgba(255, 255, 255, .1); }
.g-sub { font-size: 11px; color: #b9c2dc; margin-top: 2px; } .g-sub b { color: #ffd466; }
.start-wrap { padding: 4px 0; text-align: center; }
.fine { margin: 7px 0 0; font-size: 10px; color: var(--mute); } .fine b { color: #c9d1ea; } .link { color: #9fc0ff; text-decoration: underline; font-size: 10px; }

/* ===== パチンコ風の数字(7セグ) ===== */
.lcd { display: inline-flex; align-items: baseline; justify-content: center; gap: 6px; padding: 4px 12px 2px; border-radius: 8px; background: linear-gradient(180deg, #0a0502, #1a0d02); border: 2px solid #3b2a12; box-shadow: inset 0 0 14px #000, 0 0 0 1px rgba(255, 220, 140, .25), 0 0 18px rgba(255, 140, 20, .15); }
.lcd em { font-style: normal; font-family: var(--font-num); font-size: 20px; color: var(--lcd); text-shadow: 0 0 8px var(--lcdglow); }
.lcd .digits { position: relative; display: inline-block; font-family: 'DSEG7', monospace; font-weight: 700; font-size: 38px; line-height: 1.15; letter-spacing: .02em; text-align: right; }
.lcd .digits .ghost { display: block; font-style: normal; color: rgba(255, 150, 40, .1); }
.lcd .digits b { position: absolute; right: 0; top: 0; white-space: nowrap; color: var(--lcd); text-shadow: 0 0 6px var(--lcdglow), 0 0 16px var(--lcdglow); }
.lcd.big .digits { font-size: 46px; } .lcd.big em { font-size: 24px; }
.lcd.spin .digits b { filter: blur(.3px); }
.topbar .lcd .digits { font-size: 25px; } .topbar .lcd em { font-size: 15px; } .topbar .lcd { padding: 3px 9px 1px; }

/* ===== 金のメタリックのボタン(押すのは1つだけ) ===== */
.bigbtn { position: relative; width: 100%; max-width: 420px; height: 66px; border-radius: 16px; font-family: var(--font-num); font-size: 30px; letter-spacing: .3em; text-indent: .3em; color: #3b1d00; overflow: hidden;
  background: linear-gradient(180deg, #fff6c0 0%, #ffd34a 30%, #f0a010 55%, #ffe27a 75%, #c47a05 100%); border: 2px solid #fff2b0; box-shadow: 0 5px 0 #7a4600, 0 8px 24px rgba(255, 170, 30, .45), inset 0 2px 0 rgba(255, 255, 255, .7); transition: transform .08s, box-shadow .08s, filter .2s; }
.bigbtn::after { content: ''; position: absolute; top: 0; bottom: 0; width: 38%; left: -60%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .75), transparent); transform: skewX(-20deg); animation: sheen 2.8s ease-in-out infinite; }
@keyframes sheen { 0%, 55% { left: -60% } 100% { left: 130% } }
.bigbtn:active, .bigbtn.press { transform: translateY(4px); box-shadow: 0 1px 0 #7a4600, 0 3px 12px rgba(255, 170, 30, .4), inset 0 2px 0 rgba(255, 255, 255, .6); }
.bigbtn.skip { background: linear-gradient(180deg, #e5ebf7, #9ba7c2 55%, #5f6b86); border-color: #fff; color: #1b2335; box-shadow: 0 5px 0 #2c3550, 0 8px 20px rgba(120, 150, 220, .3); font-size: 22px; }
.bigbtn.skip::after { display: none; }

/* ===== ガチャ画面 ===== */
.topbar { display: flex; align-items: center; gap: 6px; padding: 6px 0 4px; }
.tbtn { min-width: 38px; height: 40px; border-radius: 10px; font-size: 18px; line-height: 1; color: #e6cf90; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); padding: 0 5px; }
.tbtn small { font-size: 8px; color: var(--mute); margin-top: 1px; } .tbtn.close { height: 34px; }
.tools { display: flex; gap: 5px; }
.limit-box { flex: 1; display: flex; flex-direction: column; align-items: center; } .limit-box .lab { font-size: 9px; color: #d8c28a; letter-spacing: .2em; margin-bottom: 1px; }
.stage { position: relative; margin: 0 -16px; padding: 8px 16px 6px; min-height: 300px; overflow: hidden; }
.idle { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: #c9d1ea; font-size: 14px; line-height: 1.7; z-index: 4; pointer-events: none; transition: opacity .3s; }
.idle.off { opacity: 0; }
.idle-mark { width: 120px; height: 120px; margin-bottom: 14px; border-radius: 50%; background: conic-gradient(from 0deg, #ffd45a, #fff6c0, #c9840b, #ffd45a, #fff6c0, #c9840b, #ffd45a); -webkit-mask: radial-gradient(circle, transparent 46px, #000 47px, #000 56px, transparent 57px); mask: radial-gradient(circle, transparent 46px, #000 47px, #000 56px, transparent 57px); animation: spin 8s linear infinite; filter: drop-shadow(0 0 14px rgba(255, 190, 60, .6)); }
@keyframes spin { to { transform: rotate(360deg); } }

/* 札 */
.card { position: relative; flex: none; perspective: 900px; scroll-snap-align: center; cursor: pointer; }
.card .inner { position: relative; width: 100%; transform-style: preserve-3d; transition: transform .5s cubic-bezier(.3, .8, .3, 1); }
.card.flip .inner { transform: rotateY(180deg); }
.card.fast .inner { transition-duration: .01s; }
.card .face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 14px; }
.card .front { transform: rotateY(180deg); position: relative; inset: auto; }
.card .back { background: linear-gradient(135deg, #131b36, #0a1024); border: 2px solid #8a6a22; overflow: hidden; box-shadow: 0 0 0 1px #000, inset 0 0 30px #000; }
.card .back::before { content: ''; position: absolute; inset: 8px; border: 1px solid rgba(255, 210, 100, .45); border-radius: 10px; background: repeating-linear-gradient(45deg, transparent 0 9px, rgba(255, 210, 100, .07) 9px 10px), repeating-linear-gradient(-45deg, transparent 0 9px, rgba(255, 210, 100, .07) 9px 10px); }
.card .back .emb { position: absolute; left: 50%; top: 50%; width: 38%; aspect-ratio: 1; transform: translate(-50%, -50%) rotate(45deg); border: 3px solid transparent; border-radius: 10%; background: linear-gradient(#0a1024, #0a1024) padding-box, var(--gold) border-box; box-shadow: 0 0 18px rgba(255, 190, 60, .5); }
.card .back .emb::after { content: ''; position: absolute; inset: 22%; background: var(--gold); border-radius: 50%; }
@keyframes rbBorder { 50% { filter: hue-rotate(160deg); } }
.card.wob .inner { animation: wob .5s ease-in-out; } @keyframes wob { 20% { transform: rotate(-3deg) scale(1.02) } 50% { transform: rotate(3deg) scale(1.03) } 80% { transform: rotate(-2deg) } }

/* レアの枠 */
.card { --fr: var(--N); --glow: rgba(159, 178, 200, .35); --rc: var(--N); }
.card.r-R { --fr: linear-gradient(135deg, #bcd6ff, #4b8dff 45%, #1f4fd0); --glow: rgba(75, 141, 255, .6); --rc: var(--R); }
.card.r-N { --fr: linear-gradient(135deg, #e6edf5, #9fb2c8 50%, #6a7b90); }
.card.r-SR { --fr: linear-gradient(135deg, #ffc0c8, #ff3d57 45%, #a8081f); --glow: rgba(255, 61, 87, .75); --rc: var(--SR); }
.card.r-SSR { --fr: linear-gradient(135deg, #fff6c8, #ffd34a 25%, #e89a10 50%, #fff0a0 70%, #c9840b); --glow: rgba(255, 200, 60, .9); --rc: var(--SSR); }
.card.r-UR { --fr: var(--rainbow); --glow: rgba(255, 255, 255, .8); --rc: #fff; }
.frame { position: relative; padding: 4px; border-radius: 14px; background: var(--fr); background-size: 300% 300%; box-shadow: 0 0 14px var(--glow), 0 6px 16px rgba(0, 0, 0, .6); }
.card.r-SSR .frame { background-size: 250% 250%; animation: glint 2.4s linear infinite; box-shadow: 0 0 24px var(--glow), 0 0 50px rgba(255, 190, 40, .35), 0 6px 16px rgba(0, 0, 0, .6); }
.card.r-UR .frame { animation: glint 2s linear infinite; box-shadow: 0 0 26px #fff, 0 0 56px rgba(255, 120, 220, .55), 0 0 90px rgba(80, 200, 255, .4), 0 6px 16px rgba(0, 0, 0, .6); }
@keyframes glint { 0% { background-position: 0% 0% } 100% { background-position: 100% 100% } }
.card.r-SR .frame { box-shadow: 0 0 20px var(--glow), 0 6px 16px rgba(0, 0, 0, .6); }
.ph { position: relative; width: 100%; aspect-ratio: 1; overflow: hidden; border-radius: 10px; background: #0b0f1d; }
.ph img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.ph img.dim { filter: brightness(.06) contrast(1.4) saturate(0); }
.ph img.real { clip-path: circle(80% at 50% 50%); }
.card.sil .ph img.real { clip-path: circle(0% at 50% 50%); }
.card.sil.lit .ph img.real { clip-path: circle(85% at 50% 50%); transition: clip-path .55s cubic-bezier(.2, .7, .3, 1); }
.card.sil .ph::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 50% 50%, var(--lvc, rgba(70, 120, 255, .45)), transparent 62%); animation: pulse 1s ease-in-out infinite; }
.card.sil.lit .ph::after { animation: none; opacity: 0; transition: opacity .5s; }
.stage[data-lv="1"] .card.sil { --lvc: rgba(255, 60, 90, .6); } .stage[data-lv="2"] .card.sil { --lvc: rgba(255, 200, 60, .7); } .stage[data-lv="3"] .card.sil { --lvc: rgba(255, 255, 255, .8); }
@keyframes pulse { 50% { opacity: .35; } }
.ph .badge { position: absolute; left: 6px; top: 6px; padding: 1px 9px 0; border-radius: 6px; font-family: var(--font-num); font-size: 15px; letter-spacing: .05em; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .7); border: 1px solid rgba(255, 255, 255, .6); background: var(--fr); background-size: 300% 300%; box-shadow: 0 0 10px var(--glow); }
.card.r-SSR .badge { color: #4a2c00; text-shadow: none; } .card.r-N .badge { color: #1d2735; text-shadow: none; }
.heart { position: absolute; right: 5px; top: 5px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 19px; line-height: 1; color: #fff; background: rgba(0, 0, 0, .5); border: 1px solid rgba(255, 255, 255, .4); z-index: 2; }
.heart.on { color: #ff4d79; background: rgba(255, 255, 255, .9); }
.cap { padding: 7px 4px 0; }
.pr-tag, .cap .yen { font-family: var(--font-num); background: var(--gold); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-stroke: .6px #6b4300; filter: drop-shadow(0 0 6px rgba(255, 190, 60, .45)); white-space: nowrap; }
/* 小さい札: 写真の下端に帯で品名と金額 */
.card.pop .frame { animation: popin .5s cubic-bezier(.2, 1.6, .4, 1); } @keyframes popin { 0% { transform: scale(.88); filter: brightness(2.2) } 100% { transform: none; filter: none } }

/* 合計 */
.fine2 { margin: 3px 0 0; font-size: 9.5px; color: #7f89a6; line-height: 1.35; } .fine2 b { color: #ffcf6b; }

/* 扉(開幕) */
.gate { position: absolute; inset: 0; z-index: 6; pointer-events: none; }
.gate i { position: absolute; top: 0; bottom: 0; width: 50.5%; background: linear-gradient(90deg, #0b1226, #1b2646 60%, #0b1226), #0b1226; border: 3px solid #8a6a22; box-shadow: inset 0 0 40px #000; transition: transform .55s cubic-bezier(.7, 0, .3, 1); }
.gate i::before { content: ''; position: absolute; inset: 12px; border: 1px solid rgba(255, 210, 100, .4); background: repeating-linear-gradient(45deg, transparent 0 11px, rgba(255, 210, 100, .06) 11px 12px); }
.gate .dl { left: 0; border-right-width: 2px; } .gate .dr { right: 0; border-left-width: 2px; }
.gate .seam { left: 50%; width: 6px; margin-left: -3px; background: #6aa0ff; box-shadow: 0 0 24px 10px rgba(80, 130, 255, .8); border: 0; transition: none; z-index: 2; animation: seamPulse .5s ease-in-out infinite alternate; }
.gate .seam::before { display: none; }
@keyframes seamPulse { to { filter: brightness(1.8); width: 10px; margin-left: -5px; } }
.gate[data-lv="1"] .seam { background: #ff5a6e; box-shadow: 0 0 28px 12px rgba(255, 60, 90, .85); }
.gate[data-lv="2"] .seam { background: #ffd45a; box-shadow: 0 0 34px 14px rgba(255, 200, 60, .95); }
.gate[data-lv="3"] .seam { background: #fff; box-shadow: 0 0 40px 16px #fff, 0 0 70px 24px rgba(180, 110, 255, .8); }
.gate.open .dl { transform: translateX(-102%); } .gate.open .dr { transform: translateX(102%); } .gate.open .seam { opacity: 0; transition: opacity .2s; }
.gate.rattle { animation: shake .4s; }

/* 光の筋(当たり) */
.rays { position: absolute; left: 50%; top: calc(var(--hs) / 2 + 12px); width: 220vmax; height: 220vmax; margin: -110vmax 0 0 -110vmax; pointer-events: none; opacity: 0; z-index: 0;
  background: repeating-conic-gradient(from 0deg, rgba(255, 220, 120, .0) 0deg 9deg, rgba(255, 220, 120, .22) 9deg 14deg); -webkit-mask: radial-gradient(circle, #000 0, transparent 55%); mask: radial-gradient(circle, #000 0, transparent 55%); transition: opacity .4s; }
.rays.on { opacity: 1; animation: spin 14s linear infinite; } .rays.UR { background: repeating-conic-gradient(from 0deg, transparent 0deg 8deg, rgba(255, 100, 200, .28) 8deg 12deg, transparent 12deg 18deg, rgba(90, 220, 255, .28) 18deg 22deg, transparent 22deg 30deg, rgba(255, 240, 120, .3) 30deg 34deg); }

/* 演出の層 */
#fx { position: fixed; inset: 0; z-index: 30; pointer-events: none; }
.flash { position: fixed; inset: 0; z-index: 31; background: #fff; opacity: 0; pointer-events: none; } .flash.go { animation: fl .5s ease-out; } .flash.long { animation: fl 1s ease-out; } @keyframes fl { 0% { opacity: .95 } 100% { opacity: 0 } }
.dark { position: fixed; inset: 0; z-index: 29; background: #000; opacity: 0; pointer-events: none; transition: opacity .06s; } .dark.on { opacity: 1; }
.cutin { position: fixed; left: 0; right: 0; top: 38%; z-index: 32; height: 96px; display: grid; place-items: center; pointer-events: none; opacity: 0; transform: skewY(-4deg); background: linear-gradient(90deg, transparent, rgba(0, 0, 0, .85) 12%, rgba(0, 0, 0, .85) 88%, transparent); border-top: 3px solid #ffd45a; border-bottom: 3px solid #ffd45a; }
.cutin span { font-family: var(--font-num); font-size: 54px; letter-spacing: .06em; background: var(--gold); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-stroke: 1.5px #7a4300; filter: drop-shadow(0 0 16px rgba(255, 190, 60, .9)); }
.cutin.go { animation: cutin 1.1s cubic-bezier(.2, .9, .3, 1) forwards; } .cutin.ur span { background: var(--rainbow); -webkit-background-clip: text; background-clip: text; }
@keyframes cutin { 0% { opacity: 0; transform: translateX(-100%) skewY(-4deg) } 18% { opacity: 1; transform: translateX(0) skewY(-4deg) } 80% { opacity: 1 } 100% { opacity: 0; transform: translateX(10%) skewY(-4deg) } }
.banner { position: absolute; left: 0; right: 0; top: 16px; z-index: 12; text-align: center; opacity: 0; pointer-events: none; }
.banner b { display: inline-block; padding: 4px 22px 0; font-family: var(--font-num); font-size: 36px; letter-spacing: .05em; background: var(--gold); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-stroke: 1.2px #6b4300; filter: drop-shadow(0 0 14px rgba(255, 190, 60, .9)) drop-shadow(0 3px 0 #4a2c00); }
.banner.UR b { background: var(--rainbow); -webkit-background-clip: text; background-clip: text; font-size: 42px; } .banner.SR b { background: linear-gradient(180deg, #ffd0d6, #ff3d57 55%, #a8081f); -webkit-background-clip: text; background-clip: text; filter: drop-shadow(0 0 12px rgba(255, 60, 90, .9)); -webkit-text-stroke-color: #500; }
.banner.go { animation: ban 1.5s ease-out forwards; } @keyframes ban { 0% { opacity: 0; transform: scale(1.8) } 14% { opacity: 1; transform: scale(1) } 75% { opacity: 1 } 100% { opacity: 0; transform: translateY(-6px) } }
.toast { position: fixed; left: 50%; bottom: 110px; transform: translateX(-50%) translateY(20px); z-index: 60; background: rgba(20, 26, 48, .96); border: 1px solid rgba(255, 215, 120, .5); color: #fff; padding: 9px 16px; border-radius: 99px; font-size: 13px; opacity: 0; transition: .25s; pointer-events: none; white-space: nowrap; } .toast.on { opacity: 1; transform: translateX(-50%); }

/* シート(札の詳細・お気に入り・確率) */
.sheet { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; }
.sheet-bg { position: absolute; inset: 0; background: rgba(0, 0, 0, .7); }
.sheet-body { position: relative; width: 100%; max-height: 92dvh; display: flex; flex-direction: column; background: linear-gradient(180deg, #121a38, #080c1c); border-radius: 20px 20px 0 0; border-top: 2px solid #c9a24a; box-shadow: 0 -10px 40px rgba(0, 0, 0, .7); animation: up .28s cubic-bezier(.2, .9, .3, 1); }
@keyframes up { from { transform: translateY(100%); } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px 6px; } .sheet-head b { font-size: 14px; color: #ecd58f; }
.sheet-content { overflow-y: auto; padding: 0 14px max(16px, env(safe-area-inset-bottom)); font-size: 13px; line-height: 1.6; color: #d6dcf0; -webkit-overflow-scrolling: touch; }
.d-photo { position: relative; margin: 0 -14px 10px; } .d-photo img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; background: #0b0f1d; }
.d-photo .rare { position: absolute; left: 12px; top: 10px; padding: 2px 14px 0; border-radius: 8px; font-family: var(--font-num); font-size: 24px; color: #fff; background: var(--fr); border: 1px solid rgba(255, 255, 255, .7); box-shadow: 0 0 14px var(--glow); }
.d-photo.r-SSR .rare { color: #4a2c00; } .d-photo.r-N .rare { color: #1d2735; }
.d-photo { --fr: var(--N); --glow: rgba(159, 178, 200, .35); }
.d-photo.r-R { --fr: linear-gradient(135deg, #bcd6ff, #4b8dff 45%, #1f4fd0); --glow: rgba(75, 141, 255, .6); } .d-photo.r-SR { --fr: linear-gradient(135deg, #ffc0c8, #ff3d57 45%, #a8081f); --glow: rgba(255, 61, 87, .75); }
.d-photo.r-SSR { --fr: linear-gradient(135deg, #fff6c8, #ffd34a 25%, #e89a10 50%, #fff0a0 70%, #c9840b); --glow: rgba(255, 200, 60, .9); } .d-photo.r-UR { --fr: var(--rainbow); --glow: #fff; }
.d-photo.r-N { --fr: linear-gradient(135deg, #e6edf5, #9fb2c8 50%, #6a7b90); }
.d-name { font-size: 17px; font-weight: 800; color: #fff; line-height: 1.3; } .d-mu { font-size: 12px; color: var(--mute); }
.d-yen { font-family: var(--font-num); font-size: 40px; background: var(--gold); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-stroke: .8px #6b4300; filter: drop-shadow(0 0 8px rgba(255, 190, 60, .5)); line-height: 1.2; }
.d-meta { font-size: 12px; color: #aab3d0; margin: 2px 0 8px; } .d-full { font-size: 10.5px; color: #7f89a6; margin-top: 8px; line-height: 1.45; }
.d-act { display: flex; gap: 8px; margin: 8px 0; } .d-act a { flex: 1; text-align: center; padding: 13px 8px; border-radius: 12px; font-weight: 800; font-size: 16px; text-decoration: none; background: linear-gradient(180deg, #ff6a7e, #d6112f 60%, #8f0a20); color: #fff; border: 2px solid #ffc0c8; box-shadow: 0 4px 0 #5a0414, 0 0 18px rgba(255, 60, 90, .4); }
.d-act button { width: 56px; border-radius: 12px; font-size: 22px; background: rgba(255, 255, 255, .08); border: 1px solid var(--line); } .d-act button.on { color: #ff4d79; background: #fff; }
.sheet-content h4 { margin: 12px 0 4px; color: #ecd58f; font-size: 13px; } .sheet-content p { margin: 4px 0; } .sheet-content small { color: #8f99b8; }
.rt { width: 100%; border-collapse: collapse; font-size: 12px; } .rt td, .rt th { padding: 4px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.fv { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); } .fv img { width: 86px; height: 86px; border-radius: 10px; object-fit: cover; flex: none; background: #0b0f1d; } .fv .t { flex: 1; min-width: 0; font-size: 12.5px; font-weight: 700; } .fv .t span { display: block; font-size: 10.5px; color: var(--mute); font-weight: 400; }
.fv .yen { font-family: var(--font-num); font-size: 16px; color: #ffd466; } .fv a { color: #ff9aa8; font-size: 12px; font-weight: 800; }
.over { color: #ff8a8a; font-weight: 700; }

@media (min-width: 700px) { .app { max-width: 480px; margin: 0 auto; left: 0; right: 0; } }

/* 昇格前(シルエット中)の枠は期待度の色。レアの色はめくった後に出る(ネタバレ防止) */
.card.sil:not(.lit) .badge, .card.sil:not(.lit) .heart { opacity: 0; } .card.sil:not(.lit) .cap { visibility: hidden; }
.stage[data-lv="0"] .card.sil:not(.lit) { --fr: linear-gradient(135deg, #bcd6ff, #4b8dff 45%, #1f4fd0); --glow: rgba(75, 141, 255, .6); }
.stage[data-lv="1"] .card.sil:not(.lit) { --fr: linear-gradient(135deg, #ffc0c8, #ff3d57 45%, #a8081f); --glow: rgba(255, 61, 87, .85); }
.stage[data-lv="2"] .card.sil:not(.lit) { --fr: linear-gradient(135deg, #fff6c8, #ffd34a 25%, #e89a10 50%, #fff0a0 70%, #c9840b); --glow: rgba(255, 200, 60, .95); }
.stage[data-lv="3"] .card.sil:not(.lit) { --fr: var(--rainbow); --glow: #fff; }
.card .frame { transition: box-shadow .3s; }
.noimg { background: linear-gradient(135deg, #1b2646, #0b1020); }
.ph .nm-fallback { position: absolute; inset: 0; display: grid; place-items: center; padding: 10px; text-align: center; font-size: 12px; color: #aab3d0; }

/* ===== v8: 結果は2列の一覧。ページは普通に縦スクロールでき、「回す」は下に固定 ===== */
.topbar .title { flex: 1; text-align: center; font-size: 12px; font-weight: 800; letter-spacing: .12em; color: #e6cf90; }
.summary { text-align: center; padding: 2px 0 8px; }
.summary p { margin: 0; line-height: 1.5; color: #d6dcf0; }
.sum1 { font-size: 12.5px; font-weight: 700; white-space: nowrap; } .sum1 b { color: #ffd466; }
.sum2 { font-size: 12px; margin-top: 2px !important; color: #c9d1ea; } .sum2 b { color: #ffd466; }
.lcd.inl { padding: 1px 8px 0; vertical-align: middle; margin: 0 2px; } .lcd.inl .digits { font-size: 20px; } .lcd.inl em { font-size: 12px; } .lcd.inl { gap: 3px; }
.sum2 .lcd.inl .digits { font-size: 20px; } .sum2 { white-space: nowrap; }
.sum2.idle { visibility: hidden; }
.grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 10px; }
.grid .card { width: 100%; }
.grid .card.solo { grid-column: 1 / -1; }
.card.tile .back { }
.card.tile .cap { padding: 7px 3px 0; }
.card.tile .nm { display: block; font-size: 13px; font-weight: 800; line-height: 1.3; min-height: 34px; max-height: 34px; overflow: hidden; color: #fff; }
.card.tile .qty { display: block; font-size: 10.5px; color: #aab3d0; margin-top: 1px; }
.card.tile .yen { display: block; margin-top: 1px; font-size: 22px; font-family: var(--font-num); background: var(--gold); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-stroke: .6px #6b4300; filter: drop-shadow(0 0 5px rgba(255, 190, 60, .4)); }
.card.tile .mu { display: block; font-size: 10px; color: var(--mute); margin-top: 1px; }
.card.tile .badge { font-size: 13px; padding: 1px 8px 0; left: 5px; top: 5px; }
.card.solo .nm { font-size: 16px; } .card.solo .yen { font-size: 28px; }
.card.hid { visibility: hidden; }
/* 主役(SR以上)は、めくる前に画面の幅いっぱいまで寄ってくる */
.card { transition: transform .45s cubic-bezier(.2, .8, .3, 1); }
.card.zoom { z-index: 25; transform: scale(2); transform-origin: 0 0; }
.card.zoom.right { transform-origin: 100% 0; }
.stage[data-lv="0"] .card.zoom .back, .stage[data-lv="0"] .card.herocard .back { border-color: #5a86ff; box-shadow: 0 0 22px rgba(70, 120, 255, .6), inset 0 0 30px #000; }
.stage[data-lv="1"] .card.herocard .back { border-color: #ff5a6e; box-shadow: 0 0 26px rgba(255, 60, 90, .75), inset 0 0 30px #000; }
.stage[data-lv="2"] .card.herocard .back { border-color: #ffd45a; box-shadow: 0 0 34px rgba(255, 200, 60, .9), inset 0 0 30px #000; }
.stage[data-lv="3"] .card.herocard .back { border-color: #fff; box-shadow: 0 0 40px #fff, 0 0 60px rgba(160, 100, 255, .8), inset 0 0 30px #000; animation: rbBorder 1.2s linear infinite; }
.rays { top: 0; }
.dock { display: flex; position: fixed; left: 50%; bottom: 0; width: min(100%, 480px); transform: translateX(-50%); z-index: 40; flex-direction: column; align-items: center; gap: 6px; padding: 18px 16px calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgba(4, 6, 13, .92) 28%); }
.dock-hint { margin: 0; font-size: 11px; line-height: 1.4; color: #d6dcf0; text-align: center; max-width: 340px; } .dock-hint b { color: #ffd466; }
.dock .bigbtn { height: 60px; }
.foot-note { position: relative; z-index: 3; margin: 6px 0 0; text-align: center; font-size: 9.5px; color: #7f89a6; line-height: 1.4; } .foot-note b { color: #ffcf6b; }
/* 当たりの枠: ゆっくり脈打つ。SSRは金、URは虹。めくった後は一覧の中で少し遅れて光が走る */
@keyframes pulseG { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.28) saturate(1.15); } }
.card.lit.r-SR .frame { animation: pulseG 2.6s ease-in-out infinite; }
.card.lit.r-SSR .frame { animation: glint 2.4s linear infinite, pulseG 2.2s ease-in-out infinite; }
.card.lit.r-UR .frame { animation: glint 1.8s linear infinite, pulseG 1.8s ease-in-out infinite; }
.card.lit.r-SSR .frame, .card.lit.r-UR .frame { box-shadow: 0 0 22px var(--glow), 0 0 46px var(--glow), 0 6px 16px rgba(0, 0, 0, .6); }
.ph::before { content: ''; position: absolute; top: -10%; bottom: -10%; width: 40%; left: -60%; z-index: 3; pointer-events: none; opacity: 0; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .85), transparent); transform: skewX(-18deg); }
.card.lit.sweep .ph::before { animation: sweep 1.1s ease-out var(--sd, .4s) 1 forwards; }
@keyframes sweep { 0% { left: -60%; opacity: 1; } 100% { left: 130%; opacity: 1; } }
.card.lit.sweep.r-UR .ph::before { animation-iteration-count: 3; animation-delay: var(--sd, .4s); }
.idle { z-index: 4; min-height: 300px; }
@media (max-height: 700px) { .logo span { font-size: 40px; } }
