/* 금나와라 뚝딱! — 스타일
 * 모든 크기는 rem. 1rem = 앱 폭 / 39 (폭 390px 폰에서 10px). */
:root {
  --gold1: #fff6c4; --gold2: #ffd54a; --gold3: #f5a623; --gold4: #a8640a;
  --ink: #12051f; --panel: #230a3a; --line: rgba(255, 214, 102, .35);
  --cell: 6.5rem;
  --display: 'Black Han Sans', 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif;
  --text: 'Malgun Gothic', 'Apple SD Gothic Neo', 'Noto Sans KR', system-ui, sans-serif;
  --emoji: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
}
html { font-size: calc(min(100vw, 520px, 100vh * .57) / 39); }
@supports (height: 100dvh) { html { font-size: calc(min(100vw, 520px, 100dvh * .57) / 39); } }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none; }
body {
  font-family: var(--text); color: #fff; word-break: keep-all; user-select: none; -webkit-user-select: none; touch-action: manipulation;
  /* 배경 그림(세로)은 높이에 맞춘다. 폰에서는 화면을 덮고, 넓은 화면에서는 게임 칸 뒤에만 오고 양옆은 그러데이션이다 */
  background:
    url(../img/dokkaebi/bg.webp) center / auto 100% no-repeat,
    radial-gradient(60rem 40rem at 50% 12%, rgba(255, 170, 60, .16), transparent 60%),
    radial-gradient(ellipse at 50% 40%, #3a1052 0%, #1b0730 48%, #07020d 100%);
  background-color: #07020d;
  display: flex; justify-content: center;
}
button { font: inherit; color: inherit; border: 0; background: none; padding: 0; cursor: pointer; }
[hidden] { display: none !important; }

#app {
  position: relative; width: 39rem; height: 100vh; height: 100dvh;
  padding: calc(.6rem + env(safe-area-inset-top)) .8rem calc(.6rem + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; justify-content: space-between; gap: .3rem;
  transition: background 1s;
}
#app::before { /* 모드별 배경 색조 */
  content: ''; position: fixed; inset: 0; z-index: -1; opacity: 0; transition: opacity .9s; pointer-events: none;
}
#app.mode-free::before { opacity: 1; background: radial-gradient(ellipse at 50% 35%, #123a8a 0%, #071640 55%, #02040f 100%); }
#app.mode-hold::before { opacity: 1; background: radial-gradient(ellipse at 50% 35%, #8a1a12 0%, #3a0508 55%, #0a0102 100%); }
#app.shake { animation: shake .45s; }
@keyframes shake {
  10% { transform: translate(-.5rem, .3rem) rotate(-.6deg); } 30% { transform: translate(.5rem, -.3rem) rotate(.6deg); }
  50% { transform: translate(-.35rem, -.2rem); } 70% { transform: translate(.3rem, .25rem); } 90% { transform: translate(-.15rem, 0); }
}

/* ───────── 공용 조각 ───────── */
.coin {
  display: inline-block; width: 1em; height: 1em; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 35% 30%, #fffbe0 0 12%, #ffd54a 30%, #f5a623 62%, #a8640a 100%);
  box-shadow: inset 0 0 0 .09em #a8640a, inset 0 0 0 .17em #ffe58a, 0 .08em .15em rgba(0, 0, 0, .5);
}
.gold-text {
  background: linear-gradient(180deg, #fffbe0 5%, #ffd54a 40%, #f5a623 62%, #fff0a0 78%, #c97a0a 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.btn {
  font-family: var(--display); font-size: 1.9rem; padding: 1rem 2.2rem; border-radius: 3rem; letter-spacing: .03em;
  transition: transform .08s, filter .15s;
}
.btn:active { transform: scale(.95); }
.btn.gold {
  color: #4a1d00; background: linear-gradient(180deg, #fff6c4, #ffd54a 40%, #f5a623 100%);
  box-shadow: 0 .35rem 0 #8a4b00, 0 .7rem 1.4rem rgba(0, 0, 0, .5), inset 0 .15rem 0 rgba(255, 255, 255, .7);
}
.btn.ghost { color: var(--gold1); border: .15rem solid var(--gold3); background: rgba(0, 0, 0, .35); }
.btn.big { font-size: 2.3rem; padding: 1.2rem 3rem; }
.btn.pulse { animation: btnPulse 1.1s ease-in-out infinite; }
.btn[disabled] { filter: grayscale(1) brightness(.6); pointer-events: none; }
@keyframes btnPulse { 50% { transform: scale(1.06); filter: brightness(1.15); } }

/* ───────── 상단 바 ───────── */
.topbar { display: flex; align-items: center; gap: .7rem; height: 4.6rem; flex: none; }
.level { display: flex; align-items: center; flex: none; width: 12.5rem; }
.lv-badge {
  position: relative; z-index: 1; width: 4.2rem; height: 4.2rem; border-radius: 50%; flex: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1;
  background: radial-gradient(circle at 35% 25%, #ffe9a0, #f5a623 55%, #9a5200);
  box-shadow: 0 0 0 .2rem #5a2c00, 0 .2rem .6rem rgba(0, 0, 0, .6); color: #4a1d00; font-family: var(--display);
}
.lv-badge small { font-size: 1rem; }
.lv-badge b { font-size: 1.9rem; font-weight: 400; }
.lv-badge.up { animation: lvUp .8s; }
@keyframes lvUp { 30% { transform: scale(1.5) rotate(-8deg); filter: brightness(1.6); } 60% { transform: scale(.95); } }
.xp {
  position: relative; flex: 1; height: 2rem; margin-left: -1rem; border-radius: 0 1rem 1rem 0; overflow: hidden;
  background: #0b0314; box-shadow: inset 0 0 0 .15rem #5a2c00, inset 0 .2rem .4rem rgba(0, 0, 0, .8);
}
.xp i {
  position: absolute; inset: .15rem auto .15rem .15rem; width: 0; border-radius: 0 1rem 1rem 0;
  background: linear-gradient(180deg, #8dfcff, #19b6ff 50%, #0a62d8); transition: width .5s cubic-bezier(.2, .9, .3, 1);
  box-shadow: 0 0 .6rem #19b6ff;
}
.xp em { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding-left: .8rem; font-style: normal; font-size: 1.15rem; font-weight: 700; text-shadow: 0 .1rem .2rem #000; }
.balance {
  flex: 1; height: 3.6rem; border-radius: 2rem; display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: 0 1.2rem 0 .5rem;
  background: linear-gradient(180deg, #0b0314, #1c0a2e); box-shadow: inset 0 0 0 .15rem var(--gold4), inset 0 .25rem .5rem rgba(0, 0, 0, .9);
  font-family: var(--display); min-width: 0;
}
.balance .coin { font-size: 2.6rem; }
.balance b { font-weight: 400; font-size: 2.1rem; color: var(--gold2); white-space: nowrap; text-shadow: 0 0 .6rem rgba(255, 180, 0, .5); }
.balance.bump { animation: bump .35s; }
@keyframes bump { 40% { transform: scale(1.07); filter: brightness(1.5); } }
.icon-btn { width: 3.8rem; height: 3.8rem; border-radius: 1rem; font-size: 2.1rem; background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 .12rem var(--line); flex: none; }

/* ───────── 도크 ───────── */
.dock { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: .5rem; height: 5rem; flex: none; }
.dock-btn {
  position: relative; border-radius: 1rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .1rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .03)); box-shadow: inset 0 0 0 .1rem var(--line);
  transition: transform .08s;
}
.dock-btn:active { transform: scale(.94); }
.d-ico { font-size: 2.3rem; line-height: 1; font-family: var(--emoji); }
.d-ico img { display: block; width: 2.8rem; height: 2.8rem; object-fit: contain; filter: drop-shadow(0 .1rem .15rem rgba(0, 0, 0, .55)); }
.d-txt { font-size: 1.15rem; font-weight: 700; color: #ffe9b8; white-space: nowrap; }
.dock-btn .badge {
  position: absolute; top: -.4rem; right: -.2rem; min-width: 1.9rem; height: 1.9rem; padding: 0 .4rem; border-radius: 1rem; font-style: normal;
  background: #ff2d55; color: #fff; font-size: 1.1rem; font-weight: 800; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 .15rem #fff, 0 .2rem .4rem rgba(0, 0, 0, .5); animation: badge 1s ease-in-out infinite;
}
@keyframes badge { 50% { transform: scale(1.18); } }
.dock-btn.ready { background: linear-gradient(180deg, #ffd54a, #f5a623); animation: ready 1.2s ease-in-out infinite; }
.dock-btn.ready .d-txt { color: #4a1d00; }
@keyframes ready { 50% { box-shadow: 0 0 1.6rem rgba(255, 200, 60, .9), inset 0 0 0 .1rem #fff; transform: translateY(-.2rem); } }
.dock-btn.install { background: linear-gradient(180deg, #2bd97c, #0c8a48); }
.dock-btn.install .d-txt { color: #fff; }
.dock-btn.install .badge { background: #ffd54a; color: #4a1d00; }

/* ───────── 잭팟 ───────── */
.jackpots { display: flex; flex-direction: column; gap: .4rem; flex: none; }
.jp-row { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: .4rem; }
.jp {
  position: relative; overflow: hidden; height: 3rem; border-radius: .8rem; display: flex; align-items: center; justify-content: space-between; padding: 0 .9rem;
  font-family: var(--display); box-shadow: inset 0 0 0 .15rem var(--gold2), inset 0 0 0 .3rem rgba(0, 0, 0, .35), 0 .25rem .5rem rgba(0, 0, 0, .5);
}
.jp::after { /* 번쩍이는 빛줄기 */
  content: ''; position: absolute; top: 0; bottom: 0; width: 30%; left: -40%; transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent); animation: sheen 4s infinite;
}
.jp-MAJOR::after { animation-delay: 1s; } .jp-MINOR::after { animation-delay: 2s; } .jp-MINI::after { animation-delay: 3s; }
@keyframes sheen { 0%, 60% { left: -40%; } 100% { left: 130%; } }
.jp span { font-size: 1.25rem; letter-spacing: .08em; color: #fff; text-shadow: 0 .12rem 0 rgba(0, 0, 0, .5); }
.jp b { font-weight: 400; font-size: 1.7rem; color: var(--gold1); text-shadow: 0 .12rem 0 rgba(0, 0, 0, .6), 0 0 .6rem rgba(255, 220, 120, .6); }
.jp-row .jp { height: 4rem; flex-direction: column; justify-content: center; gap: .05rem; padding: 0 .3rem; }
.jp-row .jp span { font-size: 1rem; }
.jp-row .jp b { font-size: 1.6rem; white-space: nowrap; }
.jp-GRAND { height: 3.6rem; background: linear-gradient(180deg, #ff5a3c, #c4001d 55%, #6b0012); }
.jp-GRAND span { font-size: 1.7rem; } .jp-GRAND b { font-size: 2.5rem; }
.jp-MAJOR { background: linear-gradient(180deg, #c06bff, #6a14c4 55%, #3a0a72); }
.jp-MINOR { background: linear-gradient(180deg, #4fb4ff, #0b5ed6 55%, #072f78); }
.jp-MINI { background: linear-gradient(180deg, #3fe08a, #0b9a4c 55%, #06522a); }
.jp.hit { animation: jpHit .5s 6; }
@keyframes jpHit { 50% { filter: brightness(2); transform: scale(1.04); } }

/* ───────── 도깨비 항아리 ───────── */
.meter-row { display: grid; grid-template-columns: 1.32fr 1fr; gap: .5rem; flex: none; }
.potbar {
  display: flex; align-items: center; gap: .6rem; height: 4.8rem; min-width: 0; text-align: left; padding: 0 1rem 0 .3rem; border-radius: 2.4rem;
  background: linear-gradient(180deg, #34104f, #1a0730); box-shadow: inset 0 0 0 .15rem var(--gold4), 0 .25rem .6rem rgba(0, 0, 0, .5);
}
.pot { position: relative; width: 4.4rem; height: 4.4rem; flex: none; display: flex; align-items: center; justify-content: center; }
.pot-ico { position: relative; font-family: var(--emoji); font-size: 3rem; line-height: 1; transition: transform .4s cubic-bezier(.3, 1.6, .5, 1); transform: scale(var(--pot-scale, .8)); filter: drop-shadow(0 .2rem .3rem rgba(0, 0, 0, .6)); }
.pot-glow { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle, rgba(255, 200, 60, var(--pot-glow, .15)), transparent 68%); }
.pot-ico img { display: block; width: 3.8rem; height: 3.8rem; object-fit: contain; }
.pot.bump .pot-ico { animation: potBump .3s; }
@keyframes potBump { 40% { transform: scale(calc(var(--pot-scale, .8) * 1.35)) rotate(-8deg); filter: brightness(1.6) drop-shadow(0 0 .8rem gold); } }
.pot.hot .pot-ico { animation: potHot .5s ease-in-out infinite; }
@keyframes potHot { 25% { transform: scale(var(--pot-scale)) rotate(-7deg); } 75% { transform: scale(var(--pot-scale)) rotate(7deg); } }
.pot-mid { flex: 1; display: flex; flex-direction: column; gap: .45rem; min-width: 0; }
.pot-label { font-size: 1.15rem; font-weight: 800; color: #ffe9b8; white-space: nowrap; }
.pot-label em { font-style: normal; color: #fff; opacity: .75; margin-left: .4rem; font-weight: 600; }
.pot-gauge { height: 1.3rem; border-radius: 1rem; background: #0b0314; overflow: hidden; box-shadow: inset 0 .15rem .3rem rgba(0, 0, 0, .9), inset 0 0 0 .1rem #5a2c00; }
.pot-gauge i {
  display: block; height: 100%; width: 0; border-radius: 1rem; transition: width .45s cubic-bezier(.2, .9, .3, 1);
  background: repeating-linear-gradient(110deg, #ffd54a 0 1rem, #ffb62e 1rem 2rem); background-size: 4rem 100%; animation: stripes 1.2s linear infinite;
  box-shadow: 0 0 .8rem rgba(255, 200, 60, .9);
}
@keyframes stripes { to { background-position: 4rem 0; } }
.pot-prize { display: flex; flex-direction: column; align-items: flex-end; font-family: var(--display); line-height: 1.1; }
.pot-prize small { font-family: var(--text); font-size: 1rem; font-weight: 700; color: #d9b8ff; }
.pot-prize b { font-weight: 400; font-size: 1.75rem; color: var(--gold2); }
.pot-prize.tick b { animation: bump .25s; }

/* ───────── 릴 머신 ───────── */
.machine {
  position: relative; flex: none; border-radius: 1.6rem; padding: .35rem .5rem;
  background: linear-gradient(145deg, #fff0a8, #e89d1c 22%, #fff6c4 45%, #c47a0a 70%, #ffe27a 100%);
  box-shadow: 0 0 0 .15rem #5a2c00, 0 .8rem 2rem rgba(0, 0, 0, .7), 0 0 3rem rgba(255, 170, 40, .28);
}
.mode-free .machine { background: linear-gradient(145deg, #c9f1ff, #2a8cff 22%, #e8fbff 45%, #1653c4 70%, #8fd6ff 100%); box-shadow: 0 0 0 .15rem #062a6a, 0 .8rem 2rem rgba(0, 0, 0, .7), 0 0 3.5rem rgba(60, 160, 255, .55); }
.mode-hold .machine { background: linear-gradient(145deg, #ffd0a8, #ff4a1c 22%, #fff0c4 45%, #c4200a 70%, #ff9a5a 100%); box-shadow: 0 0 0 .15rem #5a0c00, 0 .8rem 2rem rgba(0, 0, 0, .7), 0 0 3.5rem rgba(255, 90, 40, .6); }
.bulbs { display: flex; justify-content: space-between; padding: 0 .6rem; height: 1.2rem; align-items: center; }
.bulbs i { width: .7rem; height: .7rem; border-radius: 50%; background: #7a4a00; animation: bulb 1s steps(1) infinite; }
.bulbs i:nth-child(even) { animation-delay: .5s; }
@keyframes bulb { 0%, 49% { background: #fffbe0; box-shadow: 0 0 .5rem .15rem #fff3a0; } 50%, 100% { background: #7a4a00; box-shadow: none; } }
.machine.fever .bulbs i { animation-duration: .24s; }
.reel-window { position: relative; border-radius: .9rem; overflow: hidden; background: #07020d; box-shadow: inset 0 0 0 .15rem #3a1a00, inset 0 0 1.6rem #000; }
.reels { display: grid; grid-template-columns: repeat(5, 1fr); gap: .2rem; padding: .2rem; }
.reel {
  position: relative; height: calc(var(--cell) * 3); border-radius: .5rem;
  background: linear-gradient(180deg, #0a0314 0%, #2a1040 18%, #34164d 50%, #2a1040 82%, #0a0314 100%);
}
.mode-free .reel { background: linear-gradient(180deg, #030a1f 0%, #0c2a66 18%, #123a8a 50%, #0c2a66 82%, #030a1f 100%); }
.reel::after { /* 위아래 그림자로 원통 느낌 */
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 3;
  background: linear-gradient(180deg, rgba(0, 0, 0, .55), transparent 16%, transparent 84%, rgba(0, 0, 0, .55));
}
.reel.rolling { overflow: hidden; }
.reel.antic::before {
  content: ''; position: absolute; inset: 0; z-index: 4; border-radius: .5rem; pointer-events: none;
  box-shadow: inset 0 0 0 .3rem #7cf3ff, inset 0 0 2.4rem #19b6ff; animation: antic .28s linear infinite;
}
.reel.antic.orb::before { box-shadow: inset 0 0 0 .3rem #ffe27a, inset 0 0 2.4rem #ff9a1c; }
@keyframes antic { 50% { filter: brightness(1.45); } }
.strip { position: absolute; left: 0; right: 0; top: 0; will-change: transform; }
.strip.blur { filter: blur(.1rem) brightness(1.08); }
.cell { position: relative; height: var(--cell); padding: .16rem; }

/* 심볼 타일 */
.sym {
  position: relative; width: 100%; height: 100%; border-radius: .7rem; display: flex; align-items: center; justify-content: center; overflow: hidden;
  background: radial-gradient(circle at 50% 35%, var(--c1, #5a2a7a), var(--c2, #2a0f40) 78%);
  box-shadow: inset 0 0 0 .1rem rgba(255, 255, 255, .14), inset 0 -.6rem 1rem rgba(0, 0, 0, .35);
}
.sym .g { font-family: var(--emoji); font-size: 4.3rem; line-height: 1; filter: drop-shadow(0 .25rem .25rem rgba(0, 0, 0, .55)); }
/* 그림이 있는 화풍의 심볼. 그림을 칸의 바탕으로 깔아서 테두리와 당첨 빛이 그 위에 그려진다(주소는 game.js 가 칸마다 넣는다). */
.sym.pic { background-size: cover; background-position: center; }
.s-DOK { --c1: #b52bd9; --c2: #3a0a5a; box-shadow: inset 0 0 0 .16rem #ffd54a, inset 0 -.6rem 1rem rgba(0, 0, 0, .35); }
.s-TIGER { --c1: #ff9a2e; --c2: #6a2a00; }
.s-POUCH { --c1: #ff4a5a; --c2: #6a0a1a; }
.s-LANTERN { --c1: #2ec4c9; --c2: #073a4a; }
.s-PEACH { --c1: #5ad66a; --c2: #0c4a1a; }
.sym.low { --c1: #3a2452; --c2: #1c0d2e; }
.sym.low .g {
  font-family: var(--display); font-size: 4.6rem; -webkit-background-clip: text; background-clip: text; color: transparent;
  background-image: linear-gradient(180deg, #fff 8%, var(--k1) 45%, var(--k2) 100%); filter: drop-shadow(0 .2rem 0 rgba(0, 0, 0, .7));
}
.s-A { --k1: #ff6b6b; --k2: #a8001d; } .s-K { --k1: #5aa9ff; --k2: #0a3aa8; }
.s-Q { --k1: #d58cff; --k2: #5a14a8; } .s-J { --k1: #6be88a; --k2: #0a7a34; }
.s-WILD { --c1: #fff2a0; --c2: #c9780a; box-shadow: inset 0 0 0 .18rem #fff, inset 0 0 1.2rem rgba(255, 255, 255, .7); }
.s-WILD svg.g { width: 4.6rem; height: 4.6rem; margin-top: -.9rem; }
.s-SCAT { --c1: #2a6cff; --c2: #06123a; box-shadow: inset 0 0 0 .16rem #9fe8ff, inset 0 0 1.4rem rgba(120, 220, 255, .55); }
.s-SCAT .g { margin-top: -.8rem; filter: drop-shadow(0 0 .8rem #ffe9a0); }
.sym .tag {
  position: absolute; left: 0; right: 0; bottom: .25rem; text-align: center; font-style: normal; font-family: var(--display); font-size: 1.45rem; letter-spacing: .05em;
  color: #fff; text-shadow: 0 .12rem 0 #5a0c00, 0 0 .4rem #5a0c00, .1rem 0 0 #5a0c00, -.1rem 0 0 #5a0c00;
}
.s-SCAT .tag { text-shadow: 0 .12rem 0 #06123a, 0 0 .4rem #06123a, .1rem 0 0 #06123a, -.1rem 0 0 #06123a; color: #c9f4ff; }
.sym .mult {
  position: absolute; top: .2rem; right: .25rem; font-family: var(--display); font-weight: 400; font-size: 1.9rem; line-height: 1; color: #fff;
  background: #e0002a; border-radius: .6rem; padding: .15rem .4rem; box-shadow: 0 0 0 .12rem #fff, 0 0 .8rem #ff2d55; animation: badge .7s ease-in-out infinite;
}
/* 여의주 */
.s-ORB { --c1: #4a0a14; --c2: #1a0308; }
.orb {
  width: 86%; aspect-ratio: 1; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 34% 28%, #fffde8 0 9%, #ffe27a 26%, #ffb62e 55%, #d46a00 82%, #8a3c00 100%);
  box-shadow: 0 0 0 .14rem #7a3a00, 0 0 1rem rgba(255, 170, 40, .85), inset 0 -.4rem .8rem rgba(120, 40, 0, .45);
}
.orb b { font-family: var(--display); font-weight: 400; font-size: 1.85rem; color: #6b0a0a; text-shadow: 0 .08rem 0 rgba(255, 255, 255, .65); letter-spacing: -.02em; }
.s-ORB.jp .orb b { font-size: 1.5rem; color: #fff; text-shadow: 0 .1rem 0 #000, 0 0 .3rem #000; }
.s-ORB.jp-MINI .orb { background: radial-gradient(circle at 34% 28%, #eafff2 0 9%, #5af09a 30%, #0b9a4c 70%, #06522a 100%); }
.s-ORB.jp-MINOR .orb { background: radial-gradient(circle at 34% 28%, #eaf6ff 0 9%, #6ac0ff 30%, #0b5ed6 70%, #072f78 100%); }
.s-ORB.jp-MAJOR .orb { background: radial-gradient(circle at 34% 28%, #f6eaff 0 9%, #cf8cff 30%, #6a14c4 70%, #3a0a72 100%); }

/* 착지 · 당첨 연출 */
.cell.land .sym { animation: land .45s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes land { 0% { transform: scale(1.35); filter: brightness(2.2); } 100% { transform: scale(1); } }
.reels.dim .cell:not(.win) .sym { filter: brightness(.33) saturate(.6); transition: filter .25s; }
.cell.win { z-index: 2; }
.cell.win .sym { animation: winPop .62s ease-in-out infinite alternate; box-shadow: inset 0 0 0 .22rem #fff7c2, 0 0 1.4rem .2rem rgba(255, 210, 80, .95); }
@keyframes winPop { from { transform: scale(.96); } to { transform: scale(1.09); filter: brightness(1.25); } }
.cell.scat-hit .sym { animation: scatHit .5s ease-in-out infinite alternate; box-shadow: inset 0 0 0 .22rem #fff, 0 0 1.8rem .3rem #5ad0ff; }
@keyframes scatHit { from { transform: scale(1) rotate(-3deg); } to { transform: scale(1.14) rotate(3deg); filter: brightness(1.4); } }
.cell.orb-glow .sym { animation: orbGlow .6s ease-in-out infinite alternate; }
@keyframes orbGlow { to { filter: brightness(1.45); transform: scale(1.06); } }

/* 홀드 & 스핀 레이어 */
.hold-layer { position: absolute; inset: 0; z-index: 5; display: grid; grid-template-columns: repeat(5, 1fr); grid-auto-flow: column; grid-template-rows: repeat(3, var(--cell)); gap: 0 .2rem; padding: .2rem; background: rgba(10, 1, 2, .9); }
.hcell { position: relative; padding: .16rem; }
.hcell::before { content: ''; position: absolute; inset: .16rem; border-radius: .7rem; background: linear-gradient(180deg, #2a0508, #120103); box-shadow: inset 0 0 0 .1rem rgba(255, 150, 80, .25), inset 0 0 1rem #000; }
.hcell.spin::after {
  content: ''; position: absolute; inset: .16rem; border-radius: .7rem; opacity: .9;
  background: repeating-linear-gradient(180deg, transparent 0 1.2rem, rgba(255, 190, 80, .28) 1.2rem 2.4rem); background-size: 100% 4.8rem; animation: hspin .16s linear infinite;
}
@keyframes hspin { to { background-position: 0 4.8rem; } }
.hcell .sym { position: relative; z-index: 1; }
.hcell.new .sym { animation: slam .5s cubic-bezier(.3, 1.9, .5, 1); }
@keyframes slam { 0% { transform: scale(2.4); opacity: 0; filter: brightness(3); } 60% { opacity: 1; } 100% { transform: scale(1); } }
.hcell.tally .sym { animation: tally .35s; }
@keyframes tally { 50% { transform: scale(1.25); filter: brightness(1.9); } }
.hcell.done .sym { filter: saturate(.5) brightness(.75); }
.hold-layer.near .hcell:not(.locked)::before { box-shadow: inset 0 0 0 .2rem #ffd54a, inset 0 0 1.4rem #ff9a1c; animation: antic .3s linear infinite; }

.feature-banner {
  position: absolute; z-index: 6; left: 0; right: 0; top: -1.2rem; width: max-content; max-width: 100%; margin: 0 auto; white-space: nowrap; display: flex; align-items: center; gap: .8rem;
  font-family: var(--display); font-size: 1.7rem; padding: .35rem 1.6rem; border-radius: 2rem; color: #fff;
  background: linear-gradient(180deg, #ff5a3c, #a8001d); box-shadow: 0 0 0 .18rem var(--gold2), 0 .4rem 1rem rgba(0, 0, 0, .6);
}
.mode-free .feature-banner { background: linear-gradient(180deg, #3a9bff, #0b3fa8); }
.feature-banner b { font-weight: 400; color: var(--gold2); }
.feature-banner .pips { display: inline-flex; gap: .35rem; }
.feature-banner .pips i { width: 1.3rem; height: 1.3rem; border-radius: 50%; background: #3a0508; box-shadow: inset 0 0 0 .12rem #ffb62e; }
.feature-banner .pips i.on { background: radial-gradient(circle at 35% 30%, #fffbe0, #ffd54a 40%, #f5a623); box-shadow: 0 0 .8rem #ffd54a; }
.feature-banner.flash { animation: bump .35s; }
.ways-tag { position: absolute; right: 1.2rem; bottom: -.75rem; z-index: 4; font-family: var(--display); font-size: 1.05rem; letter-spacing: .1em; padding: .1rem .8rem; border-radius: 1rem; color: #4a1d00; background: linear-gradient(180deg, #fff6c4, #f5a623); box-shadow: 0 0 0 .1rem #5a2c00; }

.nice-win { position: absolute; inset: 0; z-index: 7; display: flex; align-items: center; justify-content: center; pointer-events: none; font-family: var(--display); font-size: 5rem; animation: nice 1.5s forwards; }
.nice-win span { background: linear-gradient(180deg, #fffbe0, #ffd54a 45%, #f5a623); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 .3rem 0 #6b1d00) drop-shadow(0 0 1.2rem rgba(255, 170, 0, .9)); }
@keyframes nice { 0% { transform: scale(.2); opacity: 0; } 18% { transform: scale(1.2); opacity: 1; } 30% { transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: scale(1.15); } }

.fly-orb { position: fixed; z-index: 80; width: 3rem; height: 3rem; margin: -1.5rem 0 0 -1.5rem; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 34% 28%, #fffde8 0 9%, #ffe27a 26%, #ffb62e 55%, #d46a00 100%); box-shadow: 0 0 1.4rem .3rem rgba(255, 190, 60, .95); }

/* ───────── 메시지 · 컨트롤 ───────── */
.msgbar { height: 2.4rem; flex: none; display: flex; align-items: center; justify-content: center; font-size: 1.35rem; font-weight: 700; color: #ffe9b8; text-shadow: 0 .1rem .2rem #000; white-space: nowrap; overflow: hidden; }
.msgbar.pop { animation: bump .3s; }
.msgbar b { color: var(--gold2); margin: 0 .3em; }
.controls { flex: none; display: flex; flex-direction: column; gap: .4rem; }
.winbar {
  height: 3.6rem; border-radius: 1rem; display: flex; align-items: center; justify-content: center; gap: 1.2rem; font-family: var(--display);
  background: linear-gradient(180deg, #0b0314, #1c0a2e); box-shadow: inset 0 0 0 .15rem var(--gold4), inset 0 .25rem .6rem rgba(0, 0, 0, .9);
}
.winbar span { font-size: 1.5rem; color: #d9b8ff; letter-spacing: .15em; }
.winbar b { font-weight: 400; font-size: 2.7rem; color: var(--gold2); text-shadow: 0 0 .9rem rgba(255, 180, 0, .7); min-width: 4ch; text-align: center; }
.winbar.hot { animation: winbarHot .5s ease-in-out infinite alternate; }
@keyframes winbarHot { to { box-shadow: inset 0 0 0 .2rem #fff3a0, 0 0 1.8rem rgba(255, 190, 60, .9); } }
.ctrl-row { display: grid; grid-template-columns: 1fr 9.4rem 1fr; gap: .8rem; align-items: center; height: 9.4rem; }
.bet-box { height: 100%; border-radius: 1.2rem; padding: .5rem .6rem; display: flex; flex-direction: column; align-items: center; justify-content: space-between; background: linear-gradient(180deg, #34104f, #1a0730); box-shadow: inset 0 0 0 .12rem var(--line); }
.bet-box small { font-size: 1.05rem; font-weight: 800; color: #d9b8ff; letter-spacing: .1em; }
.bet-box > b { font-family: var(--display); font-weight: 400; font-size: 2.3rem; color: #fff; }
.bet-btns { display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: .4rem; width: 100%; }
.bet-btns button { height: 3rem; border-radius: .8rem; font-family: var(--display); font-size: 1.9rem; color: #4a1d00; background: linear-gradient(180deg, #fff6c4, #f5a623); box-shadow: 0 .2rem 0 #8a4b00; }
.bet-btns button:active { transform: translateY(.15rem); box-shadow: none; }
.bet-btns #betMax { font-size: 1.25rem; }
.spin-btn {
  position: relative; width: 9.4rem; height: 9.4rem; border-radius: 50%; font-family: var(--display);
  background: radial-gradient(circle at 40% 28%, #7dffb0, #17c964 42%, #067a3a 78%, #034a22);
  box-shadow: 0 0 0 .3rem #fff6c4, 0 0 0 .6rem #c47a0a, 0 .8rem 0 .5rem #5a2c00, 0 1.2rem 1.6rem rgba(0, 0, 0, .7), inset 0 .5rem .6rem rgba(255, 255, 255, .5);
  transition: transform .07s; animation: spinIdle 2.2s ease-in-out infinite;
}
@keyframes spinIdle { 50% { box-shadow: 0 0 0 .3rem #fff6c4, 0 0 0 .6rem #c47a0a, 0 .8rem 0 .5rem #5a2c00, 0 1.2rem 1.6rem rgba(0, 0, 0, .7), inset 0 .5rem .6rem rgba(255, 255, 255, .5), 0 0 2.6rem .5rem rgba(60, 255, 150, .65); } }
.spin-btn:active { transform: translateY(.4rem) scale(.97); }
.spin-label { position: relative; font-size: 2.7rem; color: #fff; text-shadow: 0 .2rem 0 #034a22, 0 0 .8rem rgba(0, 0, 0, .4); letter-spacing: .04em; }
.spin-btn.busy { animation: none; background: radial-gradient(circle at 40% 28%, #ffb0a0, #e5342a 42%, #8a0a0a 78%, #4a0303); }
.spin-btn.busy .spin-label { text-shadow: 0 .2rem 0 #4a0303; }
.spin-btn.auto { background: radial-gradient(circle at 40% 28%, #ffe9a0, #f5a623 42%, #a85a00 78%, #5a2c00); }
.spin-btn.locked { filter: grayscale(.7) brightness(.7); animation: none; }
.side-btns { height: 100%; display: grid; grid-template-rows: repeat(3, 1fr); gap: .4rem; }
.toggle { border-radius: .8rem; font-family: var(--display); font-size: 1.4rem; color: #ffe9b8; background: linear-gradient(180deg, #34104f, #1a0730); box-shadow: inset 0 0 0 .12rem var(--line); letter-spacing: .04em; }
.toggle.on { color: #4a1d00; background: linear-gradient(180deg, #fff6c4, #f5a623); box-shadow: 0 0 1.2rem rgba(255, 190, 60, .8); }
.fineprint { margin: 0; text-align: center; font-size: .95rem; color: rgba(255, 255, 255, .4); height: 1.2rem; line-height: 1.2rem; }

/* ───────── 오버레이 ───────── */
.overlay { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; background: rgba(5, 0, 12, .82); animation: fadeIn .2s; overflow: hidden; }
@keyframes fadeIn { from { opacity: 0; } }
#splash { z-index: 60; background: radial-gradient(circle, rgba(60, 10, 90, .9), rgba(5, 0, 12, .94)); pointer-events: none; }
.splash-inner { text-align: center; animation: splashIn .6s cubic-bezier(.2, 1.7, .4, 1); }
@keyframes splashIn { 0% { transform: scale(.1) rotate(-12deg); opacity: 0; } }
.splash-title {
  font-family: var(--display); font-size: 6.6rem; line-height: 1.05; padding: 0 1rem;
  background: linear-gradient(180deg, #fffbe0 5%, #ffd54a 40%, #f5a623 62%, #fff0a0 78%, #c97a0a 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 .4rem 0 #6b1d00) drop-shadow(0 0 2rem rgba(255, 170, 0, .9)); animation: titleThrob .5s ease-in-out infinite alternate;
}
@keyframes titleThrob { to { transform: scale(1.05); } }
.splash-sub { margin-top: 1.6rem; font-size: 2rem; font-weight: 800; color: #fff; text-shadow: 0 .15rem .4rem #000; padding: 0 2rem; line-height: 1.4; }

#bigwin { z-index: 55; flex-direction: column; }
.bw-rays { position: absolute; left: 50%; top: 50%; width: 220vmax; height: 220vmax; margin: -110vmax 0 0 -110vmax; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, rgba(255, 200, 60, .13) 0 10deg, transparent 10deg 20deg); animation: rays 14s linear infinite; }
@keyframes rays { to { transform: rotate(360deg); } }
.bw-inner { position: relative; width: 39rem; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 1.2rem; }
.bw-kicker { font-family: var(--display); font-size: 2rem; color: #fff; letter-spacing: .2em; min-height: 2.4rem; text-shadow: 0 .15rem .4rem #000; }
.bw-title {
  font-family: var(--display); font-size: 7.4rem; line-height: 1;
  background: linear-gradient(180deg, #fffbe0 5%, #ffd54a 40%, #f5a623 62%, #fff0a0 78%, #c97a0a 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 .45rem 0 #6b1d00) drop-shadow(0 0 2.4rem rgba(255, 170, 0, .95)); animation: titleThrob .45s ease-in-out infinite alternate;
}
.bw-title.swap { animation: titleSwap .6s cubic-bezier(.2, 1.8, .4, 1), titleThrob .45s .6s ease-in-out infinite alternate; }
@keyframes titleSwap { 0% { transform: scale(3); opacity: 0; } }
.bw-title.t2 { background-image: linear-gradient(180deg, #fff 5%, #9fe8ff 40%, #19b6ff 62%, #e0f8ff 78%, #0a62d8 100%); filter: drop-shadow(0 .45rem 0 #062a6a) drop-shadow(0 0 2.4rem rgba(60, 160, 255, .95)); }
.bw-title.t3 { background-image: linear-gradient(180deg, #fff 5%, #ffb0e8 40%, #ff3ea5 62%, #ffe0f4 78%, #a8005a 100%); filter: drop-shadow(0 .45rem 0 #5a0030) drop-shadow(0 0 2.4rem rgba(255, 60, 160, .95)); }
.bw-title.t4 { font-size: 6.4rem; background-image: linear-gradient(90deg, #ff5a5a, #ffd54a, #5aff9a, #5ac8ff, #d58cff, #ff5a5a); background-size: 200% 100%; animation: titleThrob .35s ease-in-out infinite alternate, rainbow 1.6s linear infinite; filter: drop-shadow(0 .45rem 0 #2a0a4a) drop-shadow(0 0 2.6rem #fff); }
@keyframes rainbow { to { background-position: 200% 0; } }
.bw-amount { display: flex; align-items: center; justify-content: center; gap: 1rem; font-family: var(--display); font-size: 5.4rem; line-height: 1; }
.bw-amount b { font-weight: 400; color: #fff; text-shadow: 0 .3rem 0 #a8640a, 0 0 2rem rgba(255, 200, 60, .9); font-variant-numeric: tabular-nums; }
.bw-amount.small { font-size: 4.2rem; }
.bw-amount.final b { animation: finalPop .6s cubic-bezier(.2, 1.8, .4, 1); color: var(--gold2); }
@keyframes finalPop { 0% { transform: scale(1.6); } }
.bw-sub { font-size: 1.8rem; font-weight: 800; color: #ffe9b8; min-height: 2.2rem; text-shadow: 0 .15rem .3rem #000; }
.bw-actions { display: flex; gap: 1rem; margin-top: 1rem; transition: opacity .3s; }
.bw-actions.wait { opacity: 0; pointer-events: none; }

/* ───────── 모달 시트 ───────── */
.sheet {
  position: relative; width: 35rem; max-height: 94vh; border-radius: 2rem; padding: 2.2rem 1.8rem 1.8rem; overflow: hidden auto; text-align: center; scrollbar-width: thin; scrollbar-color: #f5a623 transparent;
  background: linear-gradient(180deg, #4a1670, #1f0836 70%); box-shadow: 0 0 0 .25rem var(--gold3), 0 0 0 .5rem #5a2c00, 0 1.5rem 4rem #000, inset 0 .3rem 2rem rgba(255, 255, 255, .12);
  animation: sheetIn .35s cubic-bezier(.2, 1.5, .4, 1);
}
@keyframes sheetIn { from { transform: scale(.6) translateY(4rem); opacity: 0; } }
.sheet-x { position: absolute; top: .8rem; right: .8rem; width: 3.4rem; height: 3.4rem; border-radius: 50%; font-size: 1.7rem; background: rgba(0, 0, 0, .35); z-index: 2; }
.sheet.noclose .sheet-x { display: none; }
.sheet h2 { margin: 0 0 .6rem; font-family: var(--display); font-weight: 400; font-size: 3.3rem; line-height: 1.15; }
.sheet h2 span { background: linear-gradient(180deg, #fffbe0, #ffd54a 45%, #f5a623); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 .2rem 0 #6b1d00); }
.sheet p { margin: .6rem 0; font-size: 1.55rem; line-height: 1.5; color: #f0e2ff; }
.sheet .hero { font-family: var(--emoji); font-size: 8rem; line-height: 1.1; filter: drop-shadow(0 .6rem 1rem rgba(0, 0, 0, .6)); animation: heroBob 1.6s ease-in-out infinite; }
.m-title .seal-pic { width: 2rem; height: 2rem; vertical-align: -.5rem; object-fit: contain; }
.sheet .hero .ico-img { display: block; width: 9rem; height: 9rem; margin: 0 auto; object-fit: contain; }
@keyframes heroBob { 50% { transform: translateY(-.8rem) rotate(4deg); } }
.sheet .amount { display: flex; align-items: center; justify-content: center; gap: .8rem; font-family: var(--display); font-size: 4.2rem; color: var(--gold2); text-shadow: 0 .25rem 0 #6b1d00, 0 0 1.4rem rgba(255, 190, 60, .8); margin: .8rem 0; }
.sheet .actions { display: flex; flex-direction: column; align-items: center; gap: 1rem; margin-top: 1.6rem; }
.sheet .actions .btn { min-width: 22rem; }
.sheet .note { font-size: 1.2rem; color: rgba(255, 255, 255, .55); }
.sheet .perks { list-style: none; margin: 1rem 0; padding: 0; text-align: left; display: flex; flex-direction: column; gap: .7rem; }
.sheet .perks li { display: flex; align-items: center; gap: 1rem; padding: .9rem 1.1rem; border-radius: 1.1rem; background: rgba(0, 0, 0, .3); font-size: 1.5rem; font-weight: 700; box-shadow: inset 0 0 0 .1rem var(--line); }
.sheet .perks li i { font-style: normal; font-family: var(--emoji); font-size: 2.4rem; flex: none; }
.sheet .perks li b { color: var(--gold2); }
.sheet .steps { text-align: left; font-size: 1.5rem; line-height: 1.7; padding-left: 2.2rem; color: #f0e2ff; }

/* 돌림판 */
.wheel-wrap { position: relative; width: 26rem; height: 26rem; margin: 1.2rem auto .6rem; }
.wheel-wrap canvas { width: 100%; height: 100%; border-radius: 50%; box-shadow: 0 0 0 .5rem #ffd54a, 0 0 0 .9rem #8a4b00, 0 0 3rem rgba(255, 190, 60, .7); }
.wheel-pin { position: absolute; left: 50%; top: -1.4rem; width: 0; height: 0; margin-left: -1.5rem; border: 1.5rem solid transparent; border-top: 3.2rem solid #ff2d55; filter: drop-shadow(0 .3rem .3rem rgba(0, 0, 0, .6)); z-index: 2; }
.wheel-hub { position: absolute; left: 50%; top: 50%; width: 5.4rem; height: 5.4rem; margin: -2.7rem 0 0 -2.7rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--emoji); font-size: 3rem; background: radial-gradient(circle at 35% 30%, #fffbe0, #ffd54a 40%, #a8640a); box-shadow: 0 0 0 .3rem #5a2c00; }
.streak { display: grid; grid-template-columns: repeat(7, 1fr); gap: .35rem; margin: 1rem 0; }
.streak i { font-style: normal; font-size: 1.1rem; font-weight: 800; padding: .5rem 0; border-radius: .7rem; background: rgba(0, 0, 0, .35); color: rgba(255, 255, 255, .6); line-height: 1.3; }
.streak i.on { background: linear-gradient(180deg, #ffd54a, #f5a623); color: #4a1d00; }
.streak i.now { box-shadow: 0 0 0 .2rem #fff, 0 0 1rem #ffd54a; }

/* 미션 */
.missions { display: flex; flex-direction: column; gap: .8rem; margin-top: 1rem; }
.mission { display: grid; grid-template-columns: 1fr auto; gap: .5rem 1rem; align-items: center; text-align: left; padding: 1rem 1.2rem; border-radius: 1.2rem; background: rgba(0, 0, 0, .3); box-shadow: inset 0 0 0 .1rem var(--line); }
.mission .m-title { font-size: 1.5rem; font-weight: 800; }
.mission .m-reward { font-size: 1.25rem; color: var(--gold2); font-weight: 700; }
.mission .m-bar { grid-column: 1; height: 1rem; border-radius: 1rem; background: #0b0314; overflow: hidden; }
.mission .m-bar i { display: block; height: 100%; border-radius: 1rem; background: linear-gradient(90deg, #19b6ff, #8dfcff); }
.mission .btn { grid-row: 1 / span 3; grid-column: 2; font-size: 1.5rem; padding: .8rem 1.4rem; }
.mission.done { opacity: .5; }
.mission .m-state { grid-row: 1 / span 3; grid-column: 2; font-family: var(--display); font-weight: 400; font-size: 2.1rem; color: var(--gold2); min-width: 5rem; text-align: center; }
.mission .m-bar.gold i { background: linear-gradient(90deg, #f5a623, #fff6c4); }

/* 배당표 */
.paytable { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin: 1rem 0; }
.pay { border-radius: 1rem; background: rgba(0, 0, 0, .32); padding: .6rem; display: flex; flex-direction: column; align-items: center; gap: .3rem; box-shadow: inset 0 0 0 .1rem var(--line); }
.pay .cell { width: 5.6rem; height: 5.6rem; padding: 0; }
.pay .sym .g { font-size: 3.5rem; } .pay .sym.low .g { font-size: 3.8rem; }
.pay table { border-collapse: collapse; font-size: 1.2rem; line-height: 1.45; }
.pay td:first-child { color: #d9b8ff; padding-right: .6rem; font-weight: 800; }
.pay td:last-child { color: var(--gold2); font-weight: 700; text-align: right; }
.rules { text-align: left; }
.rules h3 { font-family: var(--display); font-weight: 400; font-size: 1.9rem; color: var(--gold2); margin: 1.4rem 0 .3rem; }
.rules p { font-size: 1.35rem; margin: .3rem 0; }

/* 항아리 방망이 고르기 */
.clubs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1.6rem 0 .6rem; }
.club { position: relative; height: 11rem; border-radius: 1.4rem; background: linear-gradient(180deg, #6a22a0, #2a0a4a); box-shadow: inset 0 0 0 .15rem var(--gold3), 0 .5rem 0 #14041f; display: flex; align-items: center; justify-content: center; animation: clubBob 1s ease-in-out infinite; transition: transform .15s, filter .3s; }
.club:nth-child(2) { animation-delay: .15s; } .club:nth-child(3) { animation-delay: .3s; }
@keyframes clubBob { 50% { transform: translateY(-.7rem); } }
.club svg { width: 7.5rem; height: 7.5rem; }
.club b { display: none; font-family: var(--display); font-weight: 400; font-size: 5rem; color: var(--gold2); text-shadow: 0 .3rem 0 #6b1d00, 0 0 1.4rem rgba(255, 190, 60, .9); }
.club.open { animation: none; } .club.open svg { display: none; } .club.open b { display: block; animation: finalPop .5s cubic-bezier(.2, 1.8, .4, 1); }
.club.picked { background: linear-gradient(180deg, #ffd54a, #c4500a); box-shadow: 0 0 0 .3rem #fff, 0 0 2.4rem #ffd54a; transform: scale(1.08); }
.club.picked b { color: #fff; }
.club.other { filter: brightness(.5) saturate(.5); }

/* 메뉴 */
.menu-list { display: flex; flex-direction: column; gap: .7rem; margin-top: 1rem; }
.menu-list button { display: flex; align-items: center; justify-content: space-between; padding: 1.2rem 1.4rem; border-radius: 1.2rem; font-size: 1.6rem; font-weight: 800; background: rgba(0, 0, 0, .3); box-shadow: inset 0 0 0 .1rem var(--line); }
.menu-list button em { font-style: normal; color: var(--gold2); }
/* 심볼 그림 고르기 */
.skin-list { display: flex; flex-direction: column; gap: .7rem; margin-top: 1rem; }
.skin-list button { display: grid; grid-template-columns: 1fr auto; gap: .7rem; align-items: center; padding: 1rem 1.2rem; border-radius: 1.2rem; text-align: left; font-size: 1.6rem; font-weight: 800; background: rgba(0, 0, 0, .3); box-shadow: inset 0 0 0 .1rem var(--line); }
.skin-list button.on { box-shadow: inset 0 0 0 .22rem var(--gold2); }
.skin-list button em { font-style: normal; color: var(--gold2); }
.skin-list .row { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(6, 1fr); gap: .4rem; }
.skin-list .cell { display: block; height: auto; aspect-ratio: 1; padding: 0; }
.skin-list .sym .g { font-size: 2.9rem; } .skin-list .sym.low .g { font-size: 3.1rem; }
.skin-list .s-WILD svg.g { width: 3.1rem; height: 3.1rem; margin-top: -.6rem; }
.skin-list .sym .tag { font-size: 1rem; bottom: .15rem; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: 1rem; }
.stats div:last-child:nth-child(odd) { grid-column: 1 / -1; }
.stats div { padding: .9rem; border-radius: 1rem; background: rgba(0, 0, 0, .3); font-size: 1.2rem; color: #d9b8ff; }
.stats b { display: block; font-family: var(--display); font-weight: 400; font-size: 1.9rem; color: var(--gold2); }

#toast {
  position: fixed; left: 50%; top: 12%; transform: translateX(-50%); z-index: 95; padding: 1rem 2rem; border-radius: 2rem; white-space: nowrap; max-width: 92vw; overflow: hidden; text-overflow: ellipsis;
  font-size: 1.6rem; font-weight: 800; color: #4a1d00; background: linear-gradient(180deg, #fff6c4, #ffd54a); box-shadow: 0 .6rem 1.6rem rgba(0, 0, 0, .6), 0 0 0 .15rem #fff; animation: toastIn .35s cubic-bezier(.2, 1.6, .4, 1);
}
@keyframes toastIn { from { transform: translate(-50%, -3rem) scale(.6); opacity: 0; } }
#fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 90; }

@media (prefers-reduced-motion: reduce) {
  .bw-rays, .jp::after, .bulbs i, .spin-btn, .pot-gauge i { animation: none !important; }
}

/* ───────── 대왕 봉인(항아리 옆의 조건 3개) ───────── */
.sealbar {
  position: relative; height: 4.8rem; min-width: 0; display: flex; align-items: center; justify-content: space-evenly; padding: .5rem .5rem 0; border-radius: 1.4rem;
  background: linear-gradient(180deg, #4a0c1c, #1f0410); box-shadow: inset 0 0 0 .15rem var(--gold4), 0 .25rem .6rem rgba(0, 0, 0, .5);
}
.seal-cap {
  position: absolute; left: 50%; top: -.55rem; transform: translateX(-50%); white-space: nowrap; font-size: .95rem; font-weight: 800; padding: 0 .7rem; height: 1.3rem; line-height: 1.3rem; border-radius: 1rem;
  color: #4a1d00; background: linear-gradient(180deg, #fff6c4, #f5a623); box-shadow: 0 0 0 .1rem #5a2c00;
}
.seal {
  --p: 0%; position: relative; width: 3.5rem; height: 3.5rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none;
  background: conic-gradient(#ffd54a var(--p), #3a0f1c 0); box-shadow: 0 0 0 .1rem #12020a, 0 .15rem .3rem rgba(0, 0, 0, .6);
}
.seal::before { content: ''; position: absolute; inset: .36rem; border-radius: 50%; background: radial-gradient(circle at 40% 30%, #5a1630, #1a0410 75%); box-shadow: inset 0 .15rem .3rem rgba(0, 0, 0, .8); }
.seal i { position: relative; font-style: normal; font-family: var(--emoji); font-size: 1.75rem; line-height: 1; filter: grayscale(.75) brightness(.75); transition: filter .4s; }
.seal i img { display: block; width: 2.3rem; height: 2.3rem; object-fit: contain; }
.seal.bump { animation: bump .28s; }
.seal.done { background: conic-gradient(#fff6c4, #ffd54a, #f5a623, #fff6c4); box-shadow: 0 0 0 .1rem #5a2c00, 0 0 1rem rgba(255, 200, 60, .95); animation: sealDone 1.3s ease-in-out infinite; }
.seal.done::before { background: radial-gradient(circle at 40% 30%, #fff6c4, #ffb62e 70%); }
.seal.done i { filter: none; }
@keyframes sealDone { 50% { transform: scale(1.09); filter: brightness(1.25); } }
.sealbar.ready { animation: sealReady .5s ease-in-out infinite; }
@keyframes sealReady { 50% { filter: brightness(1.5); transform: scale(1.04); } }

/* ───────── 도깨비 대왕전: 3D 무대 위에서 치르는 배수 보너스 ───────── */
#stage3d { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; opacity: 0; transition: opacity .6s; pointer-events: none; }
#stage3d.on { opacity: 1; }
.topbar, .dock, .jackpots, .meter-row, .controls, .msgbar { transition: opacity .5s; }
.mode-boss .topbar, .mode-boss .dock, .mode-boss .jackpots, .mode-boss .meter-row, .mode-boss .controls { opacity: 0; pointer-events: none; }
.mode-boss .machine {
  background: linear-gradient(145deg, #ffe9a8, #ff3b1c 22%, #fff0c4 45%, #7a0a2a 70%, #ffb62e 100%);
  box-shadow: 0 0 0 .15rem #3a0008, 0 1.6rem 3rem rgba(0, 0, 0, .75), 0 0 4rem rgba(255, 80, 40, .7);
  animation: bossFloat 5.5s ease-in-out infinite; will-change: transform;
}
/* 릴 판이 3D 공간에 떠서 천천히 기울어진다 */
@keyframes bossFloat {
  0%, 100% { transform: perspective(85rem) rotateX(9deg) rotateY(-4deg) translateY(0); }
  50% { transform: perspective(85rem) rotateX(5deg) rotateY(4deg) translateY(-.7rem); }
}
.mode-boss .machine.struck { animation: bossStruck .4s; }
@keyframes bossStruck { 0% { transform: perspective(85rem) rotateX(16deg) scale(.95) translateY(1rem); } 100% { transform: perspective(85rem) rotateX(9deg) rotateY(-4deg); } }
.mode-boss .reel { background: linear-gradient(180deg, #100104 0%, #4a0a1c 18%, #6a1226 50%, #4a0a1c 82%, #100104 100%); }
.mode-boss .ways-tag { display: none; }
.machine, .msgbar { transition: opacity .5s; }
.boss-ending .machine, .boss-ending .msgbar, .boss-ending .boss-top, .boss-ending .boss-bottom { opacity: 0 !important; pointer-events: none; }

.boss-top { position: absolute; left: 2.4rem; right: 2.4rem; top: calc(1rem + env(safe-area-inset-top)); z-index: 8; text-align: center; transition: opacity .5s; animation: bossDrop .6s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes bossDrop { from { transform: translateY(-8rem); opacity: 0; } }
.boss-name { font-family: var(--display); font-size: 2.3rem; letter-spacing: .22em; color: var(--gold2); text-shadow: 0 .15rem 0 #6b1d00, 0 .3rem 0 #3a0008, 0 0 1.4rem rgba(255, 80, 40, .95); }
.boss-hp { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: .3rem; height: 2rem; margin-top: .3rem; padding: .3rem; border-radius: 1rem; background: #12020a; box-shadow: inset 0 0 0 .15rem var(--gold2), 0 .3rem .8rem rgba(0, 0, 0, .7); }
.boss-hp i { border-radius: .5rem; background: linear-gradient(180deg, #ff8a5a, #e0102a 55%, #8a0016); box-shadow: 0 0 .6rem rgba(255, 60, 60, .9); transition: background .3s, box-shadow .3s; }
.boss-hp i.off { background: #2a0a12; box-shadow: none; animation: hpBreak .45s; }
@keyframes hpBreak { 0% { background: #fff; transform: scale(1.5, 2.2); box-shadow: 0 0 1.4rem #fff; } }

.boss-bottom { position: absolute; left: .8rem; right: .8rem; bottom: calc(1.6rem + env(safe-area-inset-bottom)); height: 12rem; z-index: 8; display: grid; grid-template-columns: 13rem 1fr; gap: .8rem; transition: opacity .5s; animation: bossRise .6s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes bossRise { from { transform: translateY(14rem); opacity: 0; } }
.boss-mult, .boss-total { border-radius: 1.8rem; display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: inset 0 0 0 .2rem var(--gold2), inset 0 0 0 .4rem rgba(0, 0, 0, .35), 0 .6rem 1.6rem rgba(0, 0, 0, .7); }
.boss-mult { background: radial-gradient(circle at 50% 28%, #ff6a3c, #a00018 60%, #4a000c); box-shadow: inset 0 0 0 .2rem var(--gold2), inset 0 0 0 .4rem rgba(0, 0, 0, .35), 0 0 2.4rem rgba(255, 80, 40, .75); }
.boss-mult small, .boss-total small { font-size: 1.25rem; font-weight: 800; color: #ffe9b8; letter-spacing: .08em; }
.boss-mult b { font-family: var(--display); font-weight: 400; font-size: 7.4rem; line-height: 1; color: var(--gold2); text-shadow: 0 .12rem 0 #fff6c4, 0 .35rem 0 #a8640a, 0 .6rem 0 #5a2c00, 0 0 2rem rgba(255, 200, 60, .9); }
.boss-mult.up b { animation: multUp .7s cubic-bezier(.2, 1.9, .4, 1); }
@keyframes multUp { 0% { transform: scale(2.6) rotate(-14deg); filter: brightness(2.5); } }
.boss-total { background: linear-gradient(180deg, rgba(52, 16, 79, .92), rgba(18, 5, 31, .94)); padding: 0 .8rem; min-width: 0; }
.boss-total b { font-family: var(--display); font-weight: 400; font-size: 3.6rem; line-height: 1.15; color: var(--gold2); text-shadow: 0 .15rem 0 rgba(0, 0, 0, .6), 0 0 1rem rgba(255, 200, 60, .6); white-space: nowrap; }
.boss-total.small b { font-size: 2.7rem; }
.boss-total.bump b { animation: bump .3s; }
.boss-total em { font-style: normal; font-size: 1.15rem; font-weight: 700; color: #d9b8ff; margin-top: .2rem; white-space: nowrap; }

/* 시네마틱 자막: 원근이 걸린 입체 글자 */
.cine { position: fixed; inset: 0; z-index: 46; display: flex; flex-direction: column; align-items: center; justify-content: center; perspective: 60rem; overflow: hidden; }
.cine-title {
  font-family: var(--display); font-size: 7.6rem; line-height: 1.05; text-align: center; color: var(--gold2); padding: 0 1rem; margin-top: 18rem;
  text-shadow: 0 .1rem 0 #fff6c4, 0 .2rem 0 #f5a623, 0 .32rem 0 #e09a10, 0 .44rem 0 #c97a0a, 0 .56rem 0 #a8640a, 0 .68rem 0 #8a4b00, 0 .8rem 0 #6b1d00, 0 1.3rem 1.6rem rgba(0, 0, 0, .75), 0 0 3.5rem rgba(255, 170, 0, .95);
}
.cine-title.in { animation: cineIn .95s cubic-bezier(.2, 1.4, .4, 1) both, cineSway 3.6s ease-in-out .95s infinite alternate; }
@keyframes cineIn { 0% { transform: translateZ(-90rem) rotateX(75deg) scale(.2); opacity: 0; } 55% { opacity: 1; } 100% { transform: none; } }
@keyframes cineSway { from { transform: rotateY(-16deg) rotateX(7deg); } to { transform: rotateY(16deg) rotateX(-5deg); } }
.cine-title.small { font-size: 5.4rem; }
.cine-sub { min-height: 6rem; margin-top: 1.8rem; font-size: 2.1rem; font-weight: 800; text-align: center; line-height: 1.5; color: #fff; text-shadow: 0 .15rem .4rem #000, 0 0 1rem rgba(0, 0, 0, .8); padding: 0 2rem; }
.cine-sub b { color: var(--gold2); font-family: var(--display); font-weight: 400; font-size: 1.25em; }
.cine-sub > span { display: block; animation: splashIn .45s cubic-bezier(.2, 1.7, .4, 1); }
.cine-actions { display: flex; gap: 1rem; margin-top: 2rem; animation: fadeIn .5s; }
.cine-skip { position: absolute; left: 0; right: 0; bottom: calc(1.6rem + env(safe-area-inset-bottom)); text-align: center; font-size: 1.2rem; color: rgba(255, 255, 255, .6); text-shadow: 0 .1rem .3rem #000; }
/* 엔딩 크레딧: 뒤로 누운 판 위를 글자가 흘러 올라간다 */
.cine-crawl { position: absolute; inset: 0; perspective: 34rem; perspective-origin: 50% 40%; -webkit-mask-image: linear-gradient(180deg, transparent 22%, #000 48%, #000 92%, transparent); mask-image: linear-gradient(180deg, transparent 22%, #000 48%, #000 92%, transparent); }
.crawl-plane { position: absolute; left: 50%; bottom: 0; width: 34rem; height: 100%; margin-left: -17rem; transform: rotateX(26deg); transform-origin: 50% 100%; }
.crawl-inner { position: absolute; left: 0; right: 0; top: 100%; text-align: center; font-size: 2.2rem; font-weight: 800; line-height: 1.5; color: #ffe9b8; text-shadow: 0 .15rem .5rem #000, 0 0 1.2rem rgba(0, 0, 0, .9); will-change: transform; }
.crawl-inner h3 { font-family: var(--display); font-weight: 400; font-size: 4.4rem; margin: 0 0 .5rem; color: var(--gold2); }
.crawl-inner h4 { font-family: var(--display); font-weight: 400; font-size: 2.6rem; margin: 4rem 0 .8rem; color: #fff; letter-spacing: .2em; }
.crawl-inner p { margin: .5rem 0; }
.crawl-inner b { color: var(--gold2); font-family: var(--display); font-weight: 400; font-size: 1.2em; margin-left: .6em; }
.crawl-inner .end { font-family: var(--display); font-size: 6rem; color: var(--gold2); margin-top: 6rem; letter-spacing: .12em; }

#bigwin.on3d { background: radial-gradient(circle, rgba(5, 0, 12, .25) 25%, rgba(5, 0, 12, .6)); }
#bigwin.on3d .bw-rays { display: none; }

/* WebGL 을 쓸 수 없는 기기: 3D 무대 대신 움직이는 빛 배경 */
.no-webgl #app.mode-boss::before { opacity: 1; background: repeating-conic-gradient(from 0deg at 50% 26%, rgba(255, 120, 40, .22) 0 9deg, transparent 9deg 18deg), radial-gradient(ellipse at 50% 26%, #a01c20 0%, #2a0410 55%, #070104 100%); }
.no-webgl .mode-boss .boss-top::after { content: '👹'; display: block; font-family: var(--emoji); font-size: 13rem; line-height: 1.35; filter: drop-shadow(0 0 2rem rgba(255, 80, 40, .9)); animation: sealDone 1.3s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .mode-boss .machine { animation: none; transform: perspective(85rem) rotateX(7deg); } .cine-title.in { animation: fadeIn .4s; } }

/* ───────── 대왕 4종: 돌림판 · 대왕별 색 · 메두사의 석화 칸 ───────── */
.boss-wheel canvas { box-shadow: 0 0 0 .5rem #ffd54a, 0 0 0 .9rem #3a0008, 0 0 3rem rgba(255, 90, 40, .7); }
.boss-wheel .wheel-hub { font-size: 2.8rem; }
.boss-card {
  display: flex; align-items: center; gap: 1.2rem; width: 100%; text-align: left; padding: .9rem 1.4rem .9rem .9rem; border-radius: 1.6rem; color: #fff;
  background: linear-gradient(120deg, var(--bc), #12051f 85%); box-shadow: inset 0 0 0 .2rem var(--gold2), 0 0 2rem rgba(255, 190, 60, .6); animation: splashIn .5s cubic-bezier(.2, 1.6, .4, 1);
}
.boss-card img { width: 8.4rem; height: 8.4rem; flex: none; }
.boss-card span { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.boss-card b { font-family: var(--display); font-weight: 400; font-size: 2.8rem; color: var(--gold2); text-shadow: 0 .15rem 0 rgba(0, 0, 0, .6); }
.boss-card i { font-style: normal; font-size: 1.45rem; font-weight: 800; }
.boss-card i b { font-size: 1.15em; text-shadow: none; }
.boss-card em { font-style: normal; font-size: 1.25rem; color: #ffe9b8; }
.mini-boss { width: 3.2rem; height: 3.2rem; vertical-align: middle; margin: -.8rem .8rem -.6rem -.4rem; }

[data-boss="genie"] .boss-name { text-shadow: 0 .15rem 0 #1a1060, 0 .3rem 0 #070320, 0 0 1.4rem rgba(120, 110, 255, .95); }
[data-boss="medusa"] .boss-name { text-shadow: 0 .15rem 0 #0a4a2c, 0 .3rem 0 #03160e, 0 0 1.4rem rgba(60, 255, 160, .95); }
[data-boss="pharaoh"] .boss-name { text-shadow: 0 .15rem 0 #7a4500, 0 .3rem 0 #2a1804, 0 0 1.4rem rgba(255, 200, 60, .95); }
[data-boss="genie"].mode-boss .machine { background: linear-gradient(145deg, #d9dcff, #4a3cff 22%, #f0f0ff 45%, #1c1070 70%, #7fd6ff 100%); box-shadow: 0 0 0 .15rem #070320, 0 1.6rem 3rem rgba(0, 0, 0, .75), 0 0 4rem rgba(110, 100, 255, .75); }
[data-boss="medusa"].mode-boss .machine { background: linear-gradient(145deg, #dcffe6, #17a05a 22%, #f0fff4 45%, #06452a 70%, #b8ff5a 100%); box-shadow: 0 0 0 .15rem #03160e, 0 1.6rem 3rem rgba(0, 0, 0, .75), 0 0 4rem rgba(60, 255, 160, .65); }
[data-boss="pharaoh"].mode-boss .machine { background: linear-gradient(145deg, #fff6c4, #e8a01c 22%, #fffbe0 45%, #17349a 70%, #ffd54a 100%); box-shadow: 0 0 0 .15rem #2a1804, 0 1.6rem 3rem rgba(0, 0, 0, .75), 0 0 4rem rgba(255, 200, 60, .7); }
[data-boss="genie"].mode-boss .reel { background: linear-gradient(180deg, #03020f 0%, #151050 18%, #221a78 50%, #151050 82%, #03020f 100%); }
[data-boss="medusa"].mode-boss .reel { background: linear-gradient(180deg, #010a06 0%, #06301e 18%, #0a4a2e 50%, #06301e 82%, #010a06 100%); }
[data-boss="pharaoh"].mode-boss .reel { background: linear-gradient(180deg, #0a0602 0%, #3a2408 18%, #54360c 50%, #3a2408 82%, #0a0602 100%); }
[data-boss="genie"] .boss-mult { background: radial-gradient(circle at 50% 28%, #7f8cff, #2a1a9a 60%, #0c0638); box-shadow: inset 0 0 0 .2rem var(--gold2), inset 0 0 0 .4rem rgba(0, 0, 0, .35), 0 0 2.4rem rgba(110, 100, 255, .8); }
[data-boss="medusa"] .boss-mult { background: radial-gradient(circle at 50% 28%, #3fd08a, #0a6a3c 60%, #03241a); box-shadow: inset 0 0 0 .2rem var(--gold2), inset 0 0 0 .4rem rgba(0, 0, 0, .35), 0 0 2.4rem rgba(60, 255, 160, .7); }
[data-boss="medusa"] .boss-mult b { font-size: 5.6rem; }
[data-boss="pharaoh"] .boss-mult { background: radial-gradient(circle at 50% 28%, #ffcf5a, #b06a08 60%, #3a2204); box-shadow: inset 0 0 0 .2rem var(--gold2), inset 0 0 0 .4rem rgba(0, 0, 0, .35), 0 0 2.4rem rgba(255, 200, 60, .8); }
[data-boss="pharaoh"] .boss-mult b { color: #fffbe0; }

.stick-layer { position: absolute; inset: 0; z-index: 5; display: grid; grid-template-columns: repeat(5, 1fr); grid-auto-flow: column; grid-template-rows: repeat(3, var(--cell)); gap: 0 .2rem; padding: .2rem; pointer-events: none; }
.stick-layer > div { position: relative; padding: .16rem; }
.stick-layer .stone .sym { --c1: #dfe8e2; --c2: #56645d; box-shadow: inset 0 0 0 .18rem #eafff0, inset 0 0 1.2rem rgba(0, 0, 0, .45), 0 0 1.1rem rgba(120, 255, 170, .75); }
.stick-layer .stone svg.g { filter: grayscale(1) contrast(1.15) brightness(1.1) drop-shadow(0 .2rem .2rem rgba(0, 0, 0, .6)); }
/* 그림 심볼이 돌로 굳을 때: 그림의 밝기만 남기고 색은 돌 색으로 바꾼다 */
.stick-layer .stone .sym.pic { background-color: #9fb0a6; background-blend-mode: luminosity; }
.stick-layer .stone .tag { background: #2a3a32; color: #eafff0; }
.stick-layer .stone.new .sym { animation: stoneIn .55s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes stoneIn { 0% { transform: scale(1.7); filter: brightness(3.5); } }
.stick-layer .stone.win .sym { animation: winPop .62s ease-in-out infinite alternate; box-shadow: inset 0 0 0 .22rem #fff7c2, 0 0 1.4rem .2rem rgba(255, 210, 80, .95); }

/* 디버그용 대왕전 바로가기: 눈에 띄지 않게 오른쪽 아래 구석에 둔다 */
.controls { position: relative; }
.boss-test { position: absolute; right: 0; bottom: -.1rem; width: 2.2rem; height: 1.5rem; font-size: 1rem; line-height: 1.5rem; border-radius: .5rem; opacity: .32; font-family: var(--emoji); background: rgba(255, 255, 255, .08); }
.boss-test:active { opacity: 1; }
.boss-list { display: grid; gap: .6rem; margin: 1rem 0; }
.boss-row { display: flex; align-items: center; gap: 1rem; text-align: left; padding: .5rem 1.2rem .5rem .6rem; border-radius: 1.2rem; background: linear-gradient(110deg, var(--bc), rgba(0, 0, 0, .35) 70%); box-shadow: inset 0 0 0 .1rem var(--line); }
.boss-row img { width: 5.4rem; height: 5.4rem; flex: none; }
.boss-row span { display: flex; flex-direction: column; min-width: 0; }
.boss-row b { font-family: var(--display); font-weight: 400; font-size: 1.9rem; color: var(--gold2); }
.boss-row i { font-style: normal; font-size: 1.25rem; font-weight: 700; }
.boss-row i b { font-size: 1.1em; }
.boss-row em { font-style: normal; font-size: 1.1rem; color: #ffe9b8; }

/* ───────── 코인 충전(광고 보상 · 상점) ───────── */
.balance b { margin-left: auto; }
.bal-plus { flex: none; width: 2.7rem; height: 2.7rem; margin-right: -.7rem; border-radius: 50%; font-family: var(--display); font-size: 2.2rem; line-height: 1; color: #4a1d00; background: linear-gradient(180deg, #fff6c4, #f5a623); box-shadow: 0 0 0 .12rem #5a2c00, 0 0 .8rem rgba(255, 190, 60, .6); }
.bal-plus:active { transform: scale(.9); }
.shop-first { font-weight: 800; color: var(--gold1); }
.shop-first b { color: var(--gold2); font-size: 1.2em; }
.shop { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem .8rem; margin-top: 1.4rem; }
.pack { position: relative; display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: 1.5rem .8rem 1.1rem; border-radius: 1.4rem; background: rgba(0, 0, 0, .3); box-shadow: inset 0 0 0 .12rem var(--gold4); }
.pack:active { transform: scale(.96); }
.pack .coin { font-size: 3.4rem; }
.pack b { font-family: var(--display); font-weight: 400; font-size: 2.6rem; color: var(--gold2); }
.pack em { font-style: normal; font-weight: 800; font-size: 1.6rem; padding: .4rem 1.6rem; border-radius: 2rem; color: #4a1d00; background: linear-gradient(180deg, #fff6c4, #f5a623); }
.pack i { position: absolute; top: -.8rem; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 1.1rem; font-weight: 800; padding: .15rem .9rem; border-radius: 1rem; color: #fff; background: #d81b45; white-space: nowrap; }
#toast.wrap { white-space: normal; width: max-content; max-width: 86vw; text-align: center; line-height: 1.4; }
/* 연습용 광고 · 결제 창. 모달보다 위에 뜬다 */
.svc { z-index: 70; background: rgba(0, 0, 0, .94); }
.svc-box { display: flex; flex-direction: column; align-items: center; gap: 1rem; padding: 2rem; text-align: center; color: #fff; }
.svc-box small { font-size: 1.3rem; letter-spacing: .2em; color: rgba(255, 255, 255, .6); }
.svc-box b { font-family: var(--display); font-weight: 400; font-size: 7rem; line-height: 1; color: var(--gold2); }
.svc-box p { margin: 0 0 1rem; font-size: 1.4rem; color: rgba(255, 255, 255, .7); }
.svc-box .btn { min-width: 22rem; }

/* ───────── 계정 연결 ───────── */
.btn.login { font-size: 1.7rem; }
.btn.login-google { color: #1f1f1f; background: #fff; box-shadow: 0 .3rem 0 #b9b9b9; }
.btn.login-kakao { color: #191919; background: #fee500; box-shadow: 0 .3rem 0 #b8a600; }
.save-pick { display: flex; flex-direction: column; gap: .8rem; margin-top: 1.2rem; }
.save-pick button { display: flex; flex-direction: column; gap: .3rem; padding: 1.2rem 1.4rem; border-radius: 1.2rem; text-align: left; background: rgba(0, 0, 0, .3); box-shadow: inset 0 0 0 .12rem var(--line); }
.save-pick button.on { background: rgba(255, 190, 60, .18); box-shadow: inset 0 0 0 .25rem var(--gold2); }
.save-pick small { font-size: 1.25rem; font-weight: 700; color: #d9b8ff; }
.save-pick b { font-size: 1.55rem; font-weight: 800; color: var(--gold1); }
.svc-box b.svc-word { font-size: 4.6rem; }

/* 언어마다 문구 길이가 달라서: 한 줄로 두고 넘치면 스크립트(UI.fit)가 글자를 줄인다 */
.nice-win span { white-space: nowrap; }

/* ───────── 친구 대결 ───────── */
.duel-me { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 1rem 0 0; padding: .8rem 1.2rem; border-radius: 1.2rem; background: rgba(0, 0, 0, .3); box-shadow: inset 0 0 0 .1rem var(--line); font-size: 1.45rem; font-weight: 700; text-align: left; }
.duel-me b { color: var(--gold2); margin-left: .4rem; }
.duel-me .btn { font-size: 1.3rem; padding: .5rem 1.2rem; }
.duel-h { margin: 1.8rem 0 0; font-family: var(--display); font-weight: 400; font-size: 2rem; color: var(--gold2); text-align: left; }
.duel-row .m-title { display: flex; align-items: center; gap: .6rem; }
.duel-row .mini-boss { width: 3.2rem; height: 3.2rem; flex: none; }
.duel-lines { grid-column: 1; display: flex; flex-direction: column; gap: .15rem; }
.duel-line { font-size: 1.2rem; font-weight: 700; color: #e6d3ff; }
.r-win { color: #7dffb0 !important; }
.r-lose { color: #ff9aa8 !important; }
.duel-dev { align-self: flex-start; margin-top: .4rem; padding: .3rem .9rem; border-radius: 1rem; font-size: 1.1rem; color: #cfe9ff; background: rgba(60, 140, 255, .22); box-shadow: inset 0 0 0 .1rem rgba(120, 180, 255, .5); }
.sheet > div > .duel-dev, #modalBody > .duel-dev { display: block; margin: 1.2rem auto 0; }
.duel-boss { width: 14rem; height: 14rem; filter: drop-shadow(0 .6rem 1.2rem rgba(0, 0, 0, .7)); }
.field { width: 100%; margin-top: 1rem; padding: 1rem 1.2rem; border-radius: 1.2rem; border: 0; font: 800 1.9rem var(--text); text-align: center; color: #fff; background: #0b0314; box-shadow: inset 0 0 0 .15rem var(--gold4); outline: none; user-select: text; -webkit-user-select: text; }
.field:focus { box-shadow: inset 0 0 0 .2rem var(--gold2); }
/* 대왕전 화면의 목표 점수 막대 */
.duel-bar { width: 86%; height: .7rem; margin-top: .3rem; border-radius: 1rem; background: #0b0314; overflow: hidden; box-shadow: inset 0 0 0 .08rem rgba(255, 214, 102, .4); }
.duel-bar i { display: block; width: 0; height: 100%; border-radius: 1rem; background: linear-gradient(90deg, #19b6ff, #8dfcff); transition: width .6s cubic-bezier(.2, .9, .3, 1); }
.boss-total.ahead .duel-bar i { background: linear-gradient(90deg, #f5a623, #fff6c4); }
.boss-total.ahead b { color: #7dffb0; }

/* ───────── 스핀 대결 ───────── */
.duel-hud { flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .3rem 1rem; padding: .6rem 1.4rem .7rem; border-radius: 1.4rem; font-size: 1.3rem; font-weight: 800; color: #ffe9b8; background: linear-gradient(180deg, rgba(52, 16, 79, .95), rgba(18, 5, 31, .96)); box-shadow: inset 0 0 0 .15rem var(--gold3), 0 .4rem 1rem rgba(0, 0, 0, .5); }
.duel-hud .dh-score { display: flex; align-items: baseline; gap: .6rem; }
.duel-hud .dh-score small { font-size: 1.15rem; letter-spacing: .08em; }
.duel-hud .dh-score b { font-family: var(--display); font-weight: 400; font-size: 2.8rem; line-height: 1.1; color: var(--gold2); text-shadow: 0 0 1rem rgba(255, 200, 60, .6); }
.duel-hud .dh-target { text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #d9b8ff; }
.duel-hud .dh-bar { grid-column: 1 / -1; height: .7rem; border-radius: 1rem; background: #0b0314; overflow: hidden; }
.duel-hud .dh-bar em { display: block; width: 0; height: 100%; border-radius: 1rem; background: linear-gradient(90deg, #19b6ff, #8dfcff); transition: width .6s cubic-bezier(.2, .9, .3, 1); }
.duel-hud.solo .dh-bar { display: none; }
.duel-hud.ahead .dh-score b { color: #7dffb0; }
.duel-hud.ahead .dh-bar em { background: linear-gradient(90deg, #f5a623, #fff6c4); }
.duel-spin .meter-row { display: none; }
.duel-spin .topbar, .duel-spin .dock, .duel-spin .jackpots, .duel-spin .bet-box, .duel-spin #btnAuto, .duel-spin #btnInfo { opacity: .3; pointer-events: none; }
.duel-slot { display: inline-flex; align-items: center; justify-content: center; font-family: var(--emoji); font-size: 2.4rem; line-height: 1; }
.duel-boss.duel-slot { font-size: 9rem; }
.duel-vs { gap: 1.2rem; }
.duel-vs small { font-size: .7em; color: #fff; }
.duel-vs span { color: #e6d3ff; font-size: .8em; }

/* ───────── 주간 랭킹 ───────── */
.rank-pic { width: 9rem; height: 9rem; filter: drop-shadow(0 .5rem 1rem rgba(0, 0, 0, .7)); }
.rank-pic.duel-slot { font-size: 6.5rem; }
/* 그림 아이콘(js/icons.js). 글 속의 작은 그림(.i-ico)과 큰 그림(.ico-img) */
.i-ico { display: inline-block; width: 1.3em; height: 1.3em; vertical-align: -.3em; object-fit: contain; }
.menu-list .i-ico { width: 1.6em; height: 1.6em; vertical-align: -.45em; margin-right: .25em; }
.seal-cap .i-ico { width: 1.4em; height: 1.4em; vertical-align: -.35em; }
.sheet .perks li i .i-ico { width: 2.8rem; height: 2.8rem; vertical-align: middle; }
.wheel-hub .ico-img { width: 4.2rem; height: 4.2rem; object-fit: contain; }
.duel-slot .ico-img { width: 1.15em; height: 1.15em; object-fit: contain; }
.toggle .i-ico { width: 1.2em; height: 1.2em; vertical-align: -.25em; }
.rank-me { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: .6rem; margin-top: 1rem; }
.rank-me div { padding: .8rem .4rem; border-radius: 1.2rem; background: rgba(0, 0, 0, .3); box-shadow: inset 0 0 0 .1rem var(--line); }
.rank-me small { display: block; font-size: 1.1rem; font-weight: 700; color: #d9b8ff; }
.rank-me b { font-family: var(--display); font-weight: 400; font-size: 2.3rem; color: var(--gold2); white-space: nowrap; }
.rank-me b i { font-style: normal; font-size: .6em; color: #e6d3ff; }
.rank-days { margin-top: .8rem; }
.rank-ms { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-top: .6rem; }
.ms-chip { display: flex; flex-direction: column; align-items: center; padding: .7rem .4rem; border-radius: 1.2rem; background: rgba(0, 0, 0, .3); box-shadow: inset 0 0 0 .1rem var(--line); color: #e6d3ff; }
.ms-chip b { font-family: var(--display); font-weight: 400; font-size: 1.9rem; }
.ms-chip small { font-size: 1.15rem; font-weight: 700; }
.ms-chip.ready { color: #4a1d00; background: linear-gradient(180deg, #fff6c4, #f5a623); animation: btnPulse 1.1s ease-in-out infinite; }
.ms-chip.done { opacity: .55; }
.ms-chip.done small { color: #7dffb0; }
.rank-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; margin-top: 1.6rem; padding: .4rem; border-radius: 1.4rem; background: rgba(0, 0, 0, .35); }
.rank-tabs button { padding: .8rem .2rem; border-radius: 1.1rem; font-size: 1.4rem; font-weight: 800; color: #d9b8ff; }
.rank-tabs button.on { color: #4a1d00; background: linear-gradient(180deg, #fff6c4, #f5a623); }
.rk-list { display: flex; flex-direction: column; gap: .35rem; }
.rk-row { display: grid; grid-template-columns: 3.4rem 1fr auto; align-items: center; gap: .8rem; padding: .7rem 1.2rem .7rem .6rem; border-radius: 1rem; background: rgba(0, 0, 0, .28); font-size: 1.5rem; font-weight: 700; text-align: left; }
.rk-row i { font-style: normal; font-family: var(--display); font-size: 1.7rem; text-align: center; color: #d9b8ff; }
.rk-row span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rk-row b { font-family: var(--display); font-weight: 400; font-size: 1.7rem; color: var(--gold2); }
.rk-row.top1 i { color: #ffd54a; font-size: 2.2rem; }
.rk-row.top2 i { color: #dfe6f0; font-size: 2rem; }
.rk-row.top3 i { color: #e0955a; font-size: 1.9rem; }
.rk-row.me { background: rgba(255, 190, 60, .2); box-shadow: inset 0 0 0 .15rem var(--gold3); }
.rk-row.mine { margin-top: .6rem; }
.rank-dev { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: 1.2rem; }
.rank-dev .duel-dev { margin: 0; }
