:root {
  --paper: #F2F3F7;
  --card: #FFFFFF;
  --ink: #191A23;
  --ink-2: #6B7080;
  --ink-3: #A3A7B4;
  --line: #E7E8EE;
  --brand: #5B3DF5;
  --brand-soft: #EEEAFF;
  --gain: #F04452;   /* 한국 금융 관례: 이익 = 빨강 */
  --loss: #2F6BEA;   /* 손실 = 파랑 */
  --night: #100D1D;
  --night-2: #1B1730;
  --night-3: #2A2547;
  --felt: #0F4D36;
  --felt-2: #0B3B29;
  --gold: #F6C453;
  --banker: #E5484D;
  --player: #3E7BFA;
  --tie: #2DB37A;
  --pixel: 'Galmuri11', 'Galmuri9', monospace;
  --ui: 'Pretendard Variable', Pretendard, -apple-system, 'Apple SD Gothic Neo', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--ui); background: #D9DCE5; color: var(--ink); -webkit-font-smoothing: antialiased; word-break: keep-all; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
button:disabled { cursor: default; }
button:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
canvas.px { image-rendering: pixelated; image-rendering: crisp-edges; display: block; }
.hidden { display: none !important; }

/* ── 무대 ───────────────────────── */
.stage { min-height: 100vh; display: flex; gap: 48px; align-items: flex-start; justify-content: center; padding: 40px 24px; }
.phone {
  position: relative; width: 390px; height: 844px; flex: none; background: var(--paper);
  border-radius: 44px; box-shadow: 0 0 0 10px #15131c, 0 30px 80px rgba(20,16,40,.35);
  overflow: hidden; display: flex; flex-direction: column;
}
@media (max-width: 860px) {
  .stage { flex-direction: column; align-items: center; padding: 0 0 40px; gap: 32px; }
  .phone { width: 100%; max-width: 480px; height: 100dvh; border-radius: 0; box-shadow: none; }
}

/* ── 앱바 ───────────────────────── */
.appbar { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 10px; }
.wordmark { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 18px; letter-spacing: -.02em; }
.wordmark i { width: 22px; height: 22px; border-radius: 7px; background: var(--brand); color: #fff; font: 700 12px var(--pixel); font-style: normal; display: grid; place-items: center; }
.appbar-r { display: flex; align-items: center; gap: 6px; }
.newrun { font: 600 12px var(--ui); background: none; color: var(--ink-2); padding: 6px 8px; border-radius: 99px; }
.newrun:hover { background: var(--card); }
.phone.dark .newrun { color: #B9B3D6; }
.weekchip { font: 600 13px var(--ui); background: var(--card); padding: 6px 10px; border-radius: 99px; color: var(--ink-2); }
.weekchip b { color: var(--ink); }

.screens { flex: 1; position: relative; overflow: hidden; }
.screen { position: absolute; inset: 0; overflow-y: auto; padding: 4px 16px 96px; display: none; scrollbar-width: none; scroll-padding-bottom: 90px; }
.screen::-webkit-scrollbar { display: none; }
.screen.on { display: block; }
#home { padding-bottom: 74px; scroll-padding-bottom: 170px; }

.card { background: var(--card); border-radius: 22px; padding: 20px; margin-bottom: 12px; }
.label { font-size: 14px; color: var(--ink-2); font-weight: 600; }
.h1 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin: 6px 4px 14px; }
.sub { font-size: 13px; color: var(--ink-2); line-height: 1.5; }

/* 주인공 카드 */
.hero { position: relative; display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: end; background: linear-gradient(160deg, #EDE9FF 0%, #FFFFFF 70%); padding: 18px 18px 16px; }
.hero canvas { width: 120px; height: 160px; }
.bubble { position: relative; align-self: start; margin-top: 8px; background: #fff; border: 2px solid var(--ink); border-radius: 4px; padding: 10px 12px; font: 14px/1.5 var(--pixel); box-shadow: 3px 3px 0 var(--ink); text-wrap: balance; }
.bubble::after { content: ''; position: absolute; left: -9px; bottom: 14px; width: 12px; height: 12px; background: #fff; border-left: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg); }
.who { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: baseline; border-top: 1px dashed var(--line); padding-top: 12px; margin-top: 2px; gap: 8px; }
.who b { font-size: 16px; white-space: nowrap; }
.who span { font-size: 13px; color: var(--ink-2); text-align: right; }
.quitbadge { position: absolute; top: 14px; right: 14px; font: 12px var(--pixel); background: var(--tie); color: #fff; padding: 4px 8px; border-radius: 99px; }

.money { font-size: 34px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; margin: 6px 0 14px; }
.row { display: flex; justify-content: space-between; align-items: center; font-size: 15px; padding: 6px 0; gap: 10px; }
.row .v { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.minus { color: var(--loss); }
.plus { color: var(--gain); }
.track { height: 8px; border-radius: 99px; background: var(--paper); overflow: hidden; margin-top: 8px; }
.track i { display: block; height: 100%; background: var(--gain); border-radius: 99px; transition: width .6s; }
.goalmark { position: relative; }
.goalmark small { font-size: 11px; color: var(--ink-3); display: flex; justify-content: space-between; margin-top: 4px; }

.stats { display: grid; gap: 12px; }
.stat { display: grid; grid-template-columns: 56px 1fr 28px; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; }
.cells { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; }
.cells i { height: 12px; border-radius: 2px; background: var(--paper); transition: background .3s; }
.stat[data-k="mental"] .cells i.f { background: #8B6CFF; }
.stat[data-k="relation"] .cells i.f { background: #FF7A9C; }
.stat[data-k="credit"] .cells i.f { background: #33B88A; }
.cells.low i.f { background: var(--gain) !important; }
.stat em { font-style: normal; font-variant-numeric: tabular-nums; color: var(--ink-2); text-align: right; }

.debts { display: grid; gap: 2px; margin: 8px 0 14px; }
.debt { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.debt:last-child { border-bottom: 0; }
.debt b { font-weight: 600; }
.debt .amt { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.debt small { grid-column: 1 / -1; font-size: 12px; color: var(--ink-3); }
.debt.shark b, .debt.shark .amt { color: var(--banker); }
.btnrow { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn2 { height: 48px; border-radius: 14px; font-weight: 700; font-size: 15px; background: var(--paper); }
.btn2.pri { background: var(--brand); color: #fff; }
.btn2.warn { background: #FFE9EA; color: var(--banker); }
.btn2:disabled { opacity: .45; }
.quitcard { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; }
.quitcard b { font-size: 15px; }

.cta-wrap { position: sticky; z-index: 2; bottom: 0; margin: 0 -16px; padding: 12px 16px 8px; background: linear-gradient(transparent, var(--paper) 30%); }
.cta { width: 100%; height: 56px; border-radius: 16px; background: var(--brand); color: #fff; font-size: 17px; font-weight: 700; }
.cta:active { filter: brightness(.92); }

/* ── 하단 탭 ───────────────────────── */
.tabbar { position: absolute; left: 0; right: 0; bottom: 0; height: 74px; padding-bottom: 10px; display: grid; grid-template-columns: repeat(4, 1fr); background: rgba(255,255,255,.96); border-top: 1px solid var(--line); backdrop-filter: blur(10px); z-index: 3; }
.tab { display: grid; place-items: center; align-content: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--ink-3); position: relative; }
.tab .ic { font-size: 20px; filter: grayscale(1); opacity: .55; }
.tab.on { color: var(--ink); }
.tab.on .ic { filter: none; opacity: 1; }
.tab .dot { position: absolute; top: 8px; left: 56%; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--gain); color: #fff; font-size: 10px; display: grid; place-items: center; }

/* ── 푸시 알림 ───────────────────────── */
.toast {
  position: absolute; left: 10px; right: 10px; top: 10px; z-index: 60;
  background: rgba(250,250,252,.97); border-radius: 20px; padding: 12px 14px; box-shadow: 0 10px 30px rgba(0,0,0,.18);
  display: grid; grid-template-columns: 38px 1fr; gap: 10px; align-items: center; text-align: left;
  transform: translateY(-140%); visibility: hidden; pointer-events: none;
  transition: transform .4s cubic-bezier(.2,.9,.3,1.2), visibility 0s .4s;
}
.toast.on { transform: none; visibility: visible; pointer-events: auto; transition: transform .4s cubic-bezier(.2,.9,.3,1.2); }
.toast .ti { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-size: 20px; background: var(--brand-soft); }
.toast .tt { font-size: 12px; color: var(--ink-2); display: flex; justify-content: space-between; }
.toast .tm { font-size: 14px; font-weight: 600; line-height: 1.4; margin-top: 2px; }

/* ── 이야기 카드 (시트) ───────────────────────── */
.sheet { position: absolute; inset: 0; z-index: 40; background: var(--paper); display: flex; flex-direction: column; animation: up .35s cubic-bezier(.2,.9,.3,1); }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.sheet-head { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 8px; }
.sheet-head .wk { font: 13px var(--pixel); color: var(--brand); }
.sheet-head h2 { margin: 2px 0 0; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.sheet-head .x { font-size: 22px; padding: 6px 10px; color: var(--ink-3); }
.sheet-body { flex: 1; overflow-y: auto; padding: 4px 16px 20px; scrollbar-width: none; }
.sheet-body::-webkit-scrollbar { display: none; }
.sheet-foot { flex: none; padding: 10px 16px 20px; display: grid; gap: 8px; background: linear-gradient(transparent, var(--paper) 18%); }

.scene { position: relative; height: 176px; border-radius: 22px; overflow: hidden; margin-bottom: 14px; background-size: cover; background-position: center; }
.scene .deco { position: absolute; font-size: 84px; opacity: .22; right: 14px; top: 6px; filter: saturate(.6); }
.scene .deco2 { position: absolute; font-size: 40px; opacity: .18; left: 18px; top: 18px; }
.scene canvas { position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); width: 108px; height: 144px; }
.scene .ground { position: absolute; left: 0; right: 0; bottom: 0; height: 22px; background: rgba(0,0,0,.12); }
.scene[data-s="office"] { background-image: linear-gradient(180deg, #E8EEF8, #C9D5EA); }
.scene[data-s="room"] { background-image: linear-gradient(180deg, #F6E7D6, #E7CBAF); }
.scene[data-s="street"] { background-image: linear-gradient(180deg, #2B2D52, #4C3E6E); }
.scene[data-s="casino"] { background-image: radial-gradient(120% 90% at 50% 0%, #4B1D6E, #160B26); }
.scene[data-s="night"] { background-image: linear-gradient(180deg, #0E1330, #23284F); }
.scene[data-s="hospital"] { background-image: linear-gradient(180deg, #E5F6F2, #BFE5DC); }
.scene[data-s="shop"] { background-image: linear-gradient(180deg, #FFE3C2, #F2B77A); }
.scene[data-s="bank"] { background-image: linear-gradient(180deg, #EEEAFF, #CFC5FF); }
.scene[data-s="police"] { background-image: linear-gradient(90deg, #2A3A8F, #1A1F3F 50%, #8F2A3A); }
.scene[data-s="family"] { background-image: linear-gradient(180deg, #FFE6E6, #F5C4C8); }
.scene[data-s="study"] { background-image: linear-gradient(180deg, #F3F0E2, #DCD3B2); }
.scene[data-s="road"] { background-image: linear-gradient(180deg, #8FA3B8, #4D5D70); }

.narr { font-size: 16px; line-height: 1.75; white-space: pre-line; margin: 4px 4px 14px; text-wrap: pretty; }
.chatbox { background: #B9C3D6; border-radius: 18px; padding: 12px 10px; margin-bottom: 14px; display: flex; flex-direction: column; gap: 4px; }
.chatbox .cn { font-size: 12px; font-weight: 700; color: #39415A; margin: 0 0 4px 4px; }
.cb { display: flex; flex-direction: column; align-items: flex-start; max-width: 86%; }
.cb .from { font-size: 11px; color: #39415A; margin: 4px 0 2px 2px; }
.cb .b { background: #fff; padding: 8px 11px; border-radius: 4px 14px 14px 14px; font-size: 15px; line-height: 1.45; white-space: pre-line; }
.cb.me { align-self: flex-end; align-items: flex-end; }
.cb.me .b { background: #FFE24A; border-radius: 14px 4px 14px 14px; }
.cb.pop { animation: pop .3s ease-out both; }
@keyframes pop { from { transform: translateY(6px); opacity: 0; } }

.choice { width: 100%; min-height: 58px; border-radius: 16px; background: var(--card); padding: 12px 16px; text-align: left; display: grid; gap: 3px; border: 2px solid transparent; box-shadow: 0 1px 0 rgba(0,0,0,.04); }
.choice b { font-size: 16px; }
.choice small { font-size: 12px; color: var(--ink-2); }
.choice:active { border-color: var(--brand); transform: scale(.99); }
.choice.go b::after { content: ' 🎰'; }

.result { background: var(--card); border-radius: 22px; padding: 18px; margin-bottom: 12px; }
.result p { margin: 0; font-size: 16px; line-height: 1.7; white-space: pre-line; }
.result .detail { font: 13px var(--pixel); color: var(--ink-2); margin-top: 8px; }
.chips2 { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chips2 span { font-size: 13px; font-weight: 700; padding: 6px 10px; border-radius: 99px; background: var(--paper); }
.chips2 span.g { background: #FFE9EA; color: var(--gain); }
.chips2 span.b { background: #E8EFFF; color: var(--loss); }
.notes2 { display: grid; gap: 6px; margin-bottom: 14px; }
.note { display: grid; grid-template-columns: 26px 1fr; gap: 8px; align-items: center; background: var(--card); border-radius: 14px; padding: 10px 12px; font-size: 13px; }
.note .i { font-size: 18px; text-align: center; }
.note small { display: block; color: var(--ink-3); font-size: 11px; }

/* 대출 시트 */
.lender { display: grid; grid-template-columns: 40px 1fr; gap: 12px; background: var(--card); border-radius: 18px; padding: 14px; margin-bottom: 8px; }
.lender .w { font-size: 28px; text-align: center; }
.lender b { font-size: 16px; }
.lender p { margin: 2px 0 10px; font-size: 13px; color: var(--ink-2); }
.lender .amts { display: flex; gap: 6px; flex-wrap: wrap; }
.lender .amts button { height: 36px; padding: 0 12px; border-radius: 10px; background: var(--paper); font-weight: 700; font-size: 14px; }
.lender.no { opacity: .55; }
.lender.no .why { color: var(--banker); font-weight: 600; }
.lender.shark { background: #1B1730; color: #fff; }
.lender.shark p { color: #B9B3D6; }
.lender.shark .amts button { background: var(--night-3); color: #FF8F93; }

/* ── 메시지 ───────────────────────── */
.rooms { background: var(--card); border-radius: 22px; overflow: hidden; }
.room { width: 100%; display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: center; padding: 14px 16px; text-align: left; }
.room + .room { border-top: 1px solid var(--line); }
.av { width: 48px; height: 48px; border-radius: 18px; display: grid; place-items: center; font-size: 24px; background: var(--paper); }
.room b { font-size: 15px; display: block; }
.room p { margin: 3px 0 0; font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 210px; }
.room .meta { display: grid; justify-items: end; gap: 6px; font-size: 11px; color: var(--ink-3); }
.room .n { background: var(--gain); color: #fff; font-weight: 700; border-radius: 99px; padding: 2px 7px; font-size: 11px; }
.empty { text-align: center; color: var(--ink-3); font-size: 14px; padding: 40px 10px; line-height: 1.6; }
.thread { display: none; position: absolute; inset: 0; background: #B9C3D6; z-index: 20; flex-direction: column; }
.thread.on { display: flex; }
.thead { flex: none; display: flex; align-items: center; gap: 10px; padding: 14px 12px; background: #B9C3D6; font-weight: 700; }
.thead button { font-size: 22px; padding: 4px 8px; }
.msgs { flex: 1; overflow-y: auto; padding: 8px 12px 100px; display: flex; flex-direction: column; gap: 4px; }
.daysep { align-self: center; font-size: 11px; background: rgba(0,0,0,.12); color: #fff; padding: 4px 10px; border-radius: 99px; margin: 8px 0; }

/* ── 도박장 ───────────────────────── */
.phone.dark { background: var(--night); }
.phone.dark .appbar { color: #fff; }
.phone.dark .weekchip { background: var(--night-3); color: #B9B3D6; }
.phone.dark .weekchip b { color: #fff; }
.phone.dark .tabbar { background: rgba(16,13,29,.96); border-color: var(--night-3); }
.phone.dark .tab { color: #6E6890; }
.phone.dark .tab.on { color: #fff; }
#casino { color: #fff; }
.purse { display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: center; background: var(--night-2); border-radius: 20px; padding: 10px 14px; margin-bottom: 12px; position: sticky; top: 0; z-index: 2; }
.purse canvas { width: 48px; height: 64px; }
.purse .label { color: #9C95C2; font-size: 12px; }
.purse .money { font-size: 24px; margin: 2px 0 0; color: #fff; }
.purse .mood { font: 12px/1.4 var(--pixel); color: var(--gold); text-align: right; max-width: 110px; }
.lobby { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gtile { background: var(--night-2); border-radius: 18px; padding: 14px; text-align: left; display: grid; gap: 4px; position: relative; min-height: 104px; }
.gtile .ic { font-size: 28px; }
.gtile b { font-size: 16px; }
.gtile small { font-size: 12px; color: #9C95C2; line-height: 1.4; }
.gtile .tag { position: absolute; top: 12px; right: 12px; font-size: 10px; font-weight: 700; padding: 3px 7px; border-radius: 99px; background: #4A1E2A; color: #FF8F93; }
.gtile .tag.ok { background: #183A2C; color: #6FE0AE; }
.gtop { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.gtop button { font-size: 20px; padding: 4px 10px 4px 2px; color: #CFC9EE; }
.gtop b { font-size: 18px; }
.gtop .tag { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 99px; background: #4A1E2A; color: #FF8F93; margin-left: auto; }
.gtop .tag.ok { background: #183A2C; color: #6FE0AE; }
.lock { background: var(--night-2); border-radius: 22px; padding: 26px 20px; text-align: center; }
.lock .big { font-size: 48px; }
.lock h3 { margin: 10px 0 6px; font-size: 20px; }
.lock p { color: #B9B3D6; font-size: 14px; line-height: 1.6; margin: 0 0 18px; }

.felt { background: radial-gradient(120% 90% at 50% 0%, #17724F 0%, var(--felt) 45%, var(--felt-2) 100%); border-radius: 22px; padding: 16px; margin-bottom: 12px; position: relative; box-shadow: inset 0 0 0 2px rgba(246,196,83,.25); min-height: 190px; }
.hands { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hand { text-align: center; }
.hand h4 { margin: 0 0 8px; font: 13px var(--pixel); letter-spacing: .05em; }
.hand.p h4 { color: #9FC0FF; }
.hand.b h4 { color: #FF9EA1; }
.cardrow { display: flex; justify-content: center; gap: 4px; min-height: 64px; flex-wrap: wrap; }
.pc { width: 44px; height: 62px; border-radius: 6px; background: #fff; color: #1A1A1A; display: grid; align-content: center; justify-items: center; font-weight: 800; font-size: 17px; line-height: 1; box-shadow: 0 3px 0 rgba(0,0,0,.3); animation: deal .25s ease-out; }
.pc.r { color: #D92B37; }
.pc small { font-size: 15px; margin-top: 3px; }
.pc.third { transform: rotate(90deg); margin: 0 8px; animation: deal3 .25s ease-out; }
.pc.back { background: repeating-linear-gradient(45deg, #5B3DF5 0 6px, #4529c9 6px 12px); color: transparent; }
@keyframes deal { from { transform: translateY(-30px) rotate(-8deg); opacity: 0; } }
@keyframes deal3 { from { transform: translateY(-30px) rotate(60deg); opacity: 0; } }
.total { margin-top: 8px; font: 22px var(--pixel); }
.verdict { text-align: center; font: 16px var(--pixel); color: var(--gold); min-height: 22px; margin-top: 12px; }
.spots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.spots.c2 { grid-template-columns: repeat(2, 1fr); }
.spots.c4 { grid-template-columns: repeat(4, 1fr); }
.spot { border-radius: 16px; padding: 12px 6px; display: grid; gap: 2px; text-align: center; border: 2px solid transparent; background: var(--night-2); }
.spot b { font-size: 15px; }
.spot small { font-size: 12px; color: #9C95C2; }
.spot.sel { border-color: var(--gold); background: var(--night-3); }
.spot.P b { color: #8DB4FF; } .spot.B b { color: #FF8F93; } .spot.T b { color: #6FE0AE; }
.chips { display: flex; gap: 6px; margin-bottom: 10px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 40px; min-width: 52px; padding: 0 12px; border-radius: 99px; font-weight: 700; font-size: 14px; background: var(--night-2); color: #CFC9EE; border: 2px dashed #3B3560; }
.chip.sel { background: var(--gold); color: #2A1E00; border-color: var(--gold); }
.chip.allin { color: #FF8F93; border-color: #6B2A3A; }
.chip.allin.sel { background: var(--banker); color: #fff; border-color: var(--banker); }
.go { width: 100%; height: 54px; border-radius: 16px; background: var(--gold); color: #2A1E00; font-size: 17px; font-weight: 800; }
.go:disabled { opacity: .4; }
.again { display: none; width: 100%; height: 64px; margin-top: 8px; border-radius: 16px; background: linear-gradient(180deg, #FF5A5F, #D9303A); color: #fff; font: 20px var(--pixel); box-shadow: 0 5px 0 #8E1A22; animation: throb 1.1s ease-in-out infinite; }
.again.on { display: block; }
@keyframes throb { 50% { transform: scale(1.025); } }
.acts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 10px; }
.acts button { height: 48px; border-radius: 12px; background: var(--night-3); font-weight: 700; font-size: 14px; color: #fff; position: relative; }
.acts button:disabled { opacity: .3; }
.acts button.tip { box-shadow: 0 0 0 2px var(--tie); }
.hint { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: #9C95C2; margin-bottom: 10px; }
.hint label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.road { background: #fff; border-radius: 14px; padding: 10px; margin: 12px 0 8px; color: var(--ink); }
.road .rh { display: flex; justify-content: space-between; color: var(--ink-2); font-size: 12px; margin-bottom: 6px; }
.beads { display: grid; grid-template-rows: repeat(6, 16px); grid-auto-flow: column; grid-auto-columns: 16px; gap: 3px; overflow: hidden; }
.beads:empty::before { content: '첫 판을 하면 여기에 쌓여요'; grid-row: 1 / -1; font-size: 12px; color: var(--ink-3); white-space: nowrap; align-self: center; }
.beads i { width: 16px; height: 16px; border-radius: 50%; font: 9px/16px var(--pixel); color: #fff; text-align: center; font-style: normal; }
.beads i.P { background: var(--player); } .beads i.B { background: var(--banker); } .beads i.T { background: var(--tie); }
.fine { font-size: 12px; line-height: 1.6; color: #8D86B5; margin: 10px 2px 0; }
.fine b { color: #CFC9EE; }
.tipbox { background: #2C2650; border-radius: 14px; padding: 12px; font-size: 13px; line-height: 1.55; color: #E3DEFF; margin-top: 10px; }
.tipbox b { color: var(--gold); }

.crashbox { background: var(--night-2); border-radius: 22px; padding: 16px; margin-bottom: 12px; position: relative; overflow: hidden; }
.crashbox svg { width: 100%; height: 160px; display: block; }
.mult { position: absolute; left: 0; right: 0; top: 50px; text-align: center; font: 50px var(--pixel); color: #fff; text-shadow: 0 0 24px rgba(246,196,83,.35); }
.mult.bust { color: var(--banker); } .mult.cashed { color: var(--tie); } .mult.small { font-size: 20px; top: 76px; }
.hist { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; min-height: 22px; }
.hist span { font: 12px var(--pixel); padding: 4px 8px; border-radius: 8px; background: var(--night-3); color: #CFC9EE; }
.hist span.hi { color: var(--gold); } .hist span.lo { color: #FF8F93; }

.reels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; background: linear-gradient(180deg, #3A1C5C, #1B1030); border-radius: 22px; padding: 18px; margin-bottom: 10px; box-shadow: inset 0 0 0 3px var(--gold); }
.reel { height: 92px; border-radius: 14px; background: #fff; display: grid; place-items: center; font-size: 46px; overflow: hidden; }
.reel.spin { animation: blur .1s linear infinite; }
@keyframes blur { 50% { transform: translateY(4px); filter: blur(1px); } }
.paytable { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; font-size: 12px; color: #CFC9EE; margin-bottom: 10px; }
.paytable span { background: var(--night-2); border-radius: 8px; padding: 6px 4px; text-align: center; }
.slotmsg { text-align: center; font: 16px var(--pixel); min-height: 22px; margin-bottom: 10px; color: var(--gold); }

.fx { background: var(--night-2); border-radius: 18px; padding: 14px; margin-bottom: 8px; }
.fx .lg { font-size: 12px; color: #8D86B5; display: flex; justify-content: space-between; }
.fx .teams { font-size: 16px; font-weight: 700; margin: 6px 0 10px; }
.fx .teams small { color: #8D86B5; font-weight: 500; margin: 0 6px; }
.fx.done { opacity: .5; }
.fx.done .lg span:last-child { color: var(--gold); }
.odds { display: grid; gap: 6px; }
.odds.o3 { grid-template-columns: repeat(3, 1fr); } .odds.o2 { grid-template-columns: repeat(2, 1fr); }
.odd { height: 46px; border-radius: 12px; background: var(--night-3); display: grid; place-items: center; align-content: center; gap: 1px; }
.odd small { font-size: 11px; color: #9C95C2; } .odd b { font-size: 16px; font-variant-numeric: tabular-nums; }
.odd.sel { background: var(--gold); color: #2A1E00; } .odd.sel small { color: #5A4500; }
.mkt { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; }
.mkt button { height: 40px; border-radius: 12px; background: var(--night-2); color: #8D86B5; font-weight: 700; font-size: 14px; }
.mkt button.on { background: #fff; color: var(--ink); }
.score { text-align: center; font: 15px var(--pixel); color: var(--gold); margin-top: 10px; min-height: 20px; }

.balls { display: flex; justify-content: center; gap: 6px; background: var(--night-2); border-radius: 22px; padding: 22px 10px; margin-bottom: 10px; min-height: 90px; align-items: center; flex-wrap: wrap; }
.ball { width: 42px; height: 42px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #D8DCE8 60%, #9AA0B4); color: #1A1A1A; display: grid; place-items: center; font: 16px var(--pixel); animation: drop .35s cubic-bezier(.3,1.6,.5,1) both; }
.ball.pb { background: radial-gradient(circle at 35% 30%, #FFB3B6, #E5484D 60%, #8E1A22); color: #fff; margin-left: 8px; }
@keyframes drop { from { transform: translateY(-40px) scale(.6); opacity: 0; } }
.ladder { background: var(--night-2); border-radius: 22px; padding: 12px; margin-bottom: 10px; }
.ladder svg { display: block; width: 100%; height: 190px; }
.die { width: 92px; height: 92px; margin: 0 auto; border-radius: 20px; background: #fff; color: #1A1A1A; display: grid; place-items: center; font: 44px var(--pixel); box-shadow: 0 6px 0 #B9B3D6; }
.die.roll { animation: roll .5s ease-out; }
@keyframes roll { 30% { transform: rotate(160deg) scale(.8); } 70% { transform: rotate(320deg) scale(1.05); } }
.dicebox { background: var(--night-2); border-radius: 22px; padding: 26px; margin-bottom: 10px; }

/* ── 기록 ───────────────────────── */
.recs { display: grid; gap: 8px; }
.rec { display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: center; background: var(--card); border-radius: 18px; padding: 12px 14px; }
.rec canvas { width: 36px; height: 48px; margin: 0 auto; }
.rec b { font-size: 15px; }
.rec p { margin: 2px 0 0; font-size: 12px; color: var(--ink-2); }
.rec .sc { font: 18px var(--pixel); text-align: right; }
.rec .sc small { display: block; font: 11px var(--ui); color: var(--ink-3); }
.grand { background: linear-gradient(135deg, #2A2547, #5B3DF5); color: #fff; border-radius: 22px; padding: 18px; margin-bottom: 12px; }
.grand .label { color: #CFC9EE; }
.grand .money { color: #fff; font-family: var(--pixel); font-weight: 400; }
.dex { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.dx { aspect-ratio: 1; border-radius: 12px; background: var(--brand-soft); display: grid; place-items: center; align-content: center; gap: 2px; font-size: 22px; text-align: center; }
.dx small { font: 9px/1.2 var(--pixel); color: var(--ink-2); padding: 0 2px; }
.dx.no { background: #E6E7EC; color: #B5B8C4; font: 16px var(--pixel); }

/* ── 시작 화면들 ───────────────────────── */
.full { position: absolute; inset: 0; z-index: 50; overflow-y: auto; scrollbar-width: none; }
.full::-webkit-scrollbar { display: none; }
.gate { background: var(--night); display: grid; place-items: center; align-content: center; padding: 32px; text-align: center; color: #fff; }
.gate canvas { width: 96px; height: 128px; margin: 0 auto 18px; }
.gate h1 { font: 40px var(--pixel); margin: 0 0 6px; letter-spacing: -.02em; }
.gate h1 span { color: var(--gold); }
.gate .sub { font-size: 15px; color: #B9B3D6; margin: 0 0 36px; }
.gate .warn { font: 13px/1.6 var(--pixel); color: #8D86B5; margin: 0 0 22px; text-wrap: balance; }
.gate .go { max-width: 300px; }
.gate .age { margin-top: 14px; font-size: 12px; color: #6E6890; }
.gate .ghost { margin-top: 10px; width: 100%; max-width: 300px; height: 48px; border-radius: 14px; color: #CFC9EE; background: var(--night-2); font-weight: 700; }
.select { background: var(--paper); padding: 22px 16px 30px; }
.select h2 { font-size: 24px; font-weight: 800; margin: 8px 4px 4px; letter-spacing: -.02em; }
.select > p { margin: 0 4px 16px; color: var(--ink-2); font-size: 14px; }
.pick { width: 100%; text-align: left; background: var(--card); border-radius: 22px; padding: 16px; margin-bottom: 10px; display: grid; grid-template-columns: 72px 1fr; gap: 14px; border: 2px solid transparent; }
.pick:hover { border-color: var(--brand-soft); }
.pick canvas { width: 72px; height: 96px; background: var(--paper); border-radius: 14px; }
.pick b { font-size: 17px; }
.pick .tg { font-size: 12px; font-weight: 700; color: var(--brand); }
.pick p { margin: 6px 0 8px; font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.pick ul { margin: 0; padding: 0; list-style: none; font-size: 12px; line-height: 1.6; }
.pick li.p::before { content: '＋ '; color: var(--tie); font-weight: 800; }
.pick li.m::before { content: '－ '; color: var(--banker); font-weight: 800; }
.pick .best { margin-top: 6px; font: 11px var(--pixel); color: var(--ink-3); }

/* ── 엔딩 ───────────────────────── */
.ending { background: var(--paper); padding: 18px 16px 30px; }
.receipt {
  background: #FFFEFA; margin: 6px 4px 16px; padding: 22px 20px 30px; position: relative; font-family: var(--pixel); color: #222;
  -webkit-mask: radial-gradient(circle at 8px 100%, transparent 7px, #000 7.5px) 0 0 / 16px 100% repeat-x;
          mask: radial-gradient(circle at 8px 100%, transparent 7px, #000 7.5px) 0 0 / 16px 100% repeat-x;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,.08));
}
.receipt header { text-align: center; border-bottom: 2px dashed #CFCBC0; padding-bottom: 14px; margin-bottom: 12px; }
.receipt header canvas { width: 48px; height: 64px; margin: 0 auto 8px; }
.receipt h2 { font: 20px var(--pixel); margin: 0; }
.receipt header p { margin: 6px 0 0; font-size: 12px; color: #777; }
.ln { display: flex; justify-content: space-between; font-size: 13px; padding: 5px 0; gap: 10px; }
.ln span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ln.trap span:first-child::after { content: ' (함정)'; color: var(--gain); }
.sum { border-top: 2px dashed #CFCBC0; margin-top: 10px; padding-top: 12px; font-size: 16px; }
.stamp { margin: 18px auto 4px; width: max-content; max-width: 100%; padding: 8px 14px; border: 3px solid var(--gain); color: var(--gain); font: 18px var(--pixel); transform: rotate(-4deg); border-radius: 6px; text-align: center; }
.stamp.S, .stamp.A { border-color: var(--tie); color: var(--tie); }
.etext { text-align: center; font: 14px/1.6 var(--pixel); color: #444; margin: 12px 0 0; text-wrap: balance; }
.rank { text-align: center; font-size: 13px; color: #555; margin-top: 10px; }
.help { margin: 18px 4px 0; font-size: 13px; color: var(--ink-2); line-height: 1.55; text-align: center; }
.help b { color: var(--ink); }

/* ── 노트 패널 ───────────────────────── */
.notes { width: 360px; flex: none; padding-top: 10px; }
.notes h2 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 6px; }
.notes .v { font: 13px var(--pixel); color: var(--brand); margin-bottom: 18px; display: block; }
.notes section { background: rgba(255,255,255,.7); border-radius: 18px; padding: 18px; margin-bottom: 12px; }
.notes h3 { font-size: 15px; margin: 0 0 10px; }
.notes ul { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.7; }
@media (max-width: 860px) { .notes { width: 100%; max-width: 480px; padding: 0 16px; } }

.shake { animation: shake .4s; }
@keyframes shake { 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* 온라인 순위 */
.nickrow { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-bottom: 10px; }
.nickrow input { height: 44px; border-radius: 12px; border: 1px solid var(--line); padding: 0 12px; font: 16px var(--ui); background: var(--paper); min-width: 0; }
.nickrow .btn2 { height: 44px; padding: 0 14px; }
.mkt.light { grid-template-columns: repeat(4, 1fr); }
.mkt.light button { background: var(--paper); color: var(--ink-2); height: 34px; font-size: 13px; }
.mkt.light button.on { background: var(--brand); color: #fff; }
.ranks { margin: 0; padding: 0; list-style: none; counter-reset: r; }
.ranks li { counter-increment: r; display: grid; grid-template-columns: 26px 1fr auto 52px; gap: 8px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--ink); }
.ranks li::before { content: counter(r); font: 13px var(--pixel); color: var(--brand); text-align: center; }
.ranks li b { font: 14px var(--pixel); text-align: right; }
.ranks li span:nth-child(2) { color: var(--ink-2); font-size: 13px; }
#onlineRank b { color: var(--brand); }

/* 그림 배경이 들어오면 장식 이모지는 숨긴다 */
.scene.has-img { background-size: cover; image-rendering: pixelated; }
.scene.has-img .deco, .scene.has-img .deco2, .scene.has-img .ground { display: none; }

/* 스포츠 중계 보드 */
.board { background: #0B0918; border-radius: 20px; padding: 14px; margin-bottom: 10px; box-shadow: inset 0 0 0 2px #2A2547; }
.bhead { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: #9C95C2; margin-bottom: 8px; }
.bhead span:first-child { color: #FF6B6F; font-weight: 700; }
.bhead b { color: var(--gold); }
.bscore { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; text-align: center; margin-bottom: 10px; }
.bt { font-size: 14px; font-weight: 700; line-height: 1.3; }
.bnum { font: 30px var(--pixel); color: #fff; padding: 4px 10px; background: #1B1730; border-radius: 10px; min-width: 96px; }
.bnum.flash { animation: flash .6s; }
@keyframes flash { 30% { color: var(--gold); transform: scale(1.12); } }
.line { width: 100%; border-collapse: collapse; font: 11px var(--pixel); color: #CFC9EE; margin-bottom: 10px; table-layout: fixed; }
.line th, .line td { text-align: center; padding: 3px 0; border-bottom: 1px solid #221E3B; }
.line th { color: #6E6890; font-weight: 400; }
.line td:first-child, .line th:first-child { width: 40px; text-align: left; color: #fff; }
.line td:last-child b { color: var(--gold); }
.ticker { list-style: none; margin: 0; padding: 0; max-height: 196px; overflow-y: auto; scrollbar-width: none; }
.ticker::-webkit-scrollbar { display: none; }
.ticker li { display: grid; grid-template-columns: 52px 1fr auto; gap: 8px; align-items: center; padding: 7px 4px; border-bottom: 1px solid #1B1730; font-size: 13px; line-height: 1.4; animation: pop .3s ease-out; }
.ticker .clk { font: 11px var(--pixel); color: #8D86B5; }
.ticker b { font: 12px var(--pixel); color: #8D86B5; }
.ticker li.goal { color: #fff; background: rgba(246,196,83,.08); }
.ticker li.goal b { color: var(--gold); }
.ticker li.ht, .ticker li.ft { color: #9C95C2; justify-content: center; }
.board .skip { width: 100%; height: 36px; margin-top: 8px; border-radius: 10px; background: #1B1730; color: #CFC9EE; font-size: 13px; font-weight: 700; }

.fx .single { font-size: 10px; font-weight: 700; color: #6FE0AE; background: #183A2C; padding: 2px 6px; border-radius: 99px; margin-left: 4px; }

.purse .mood { display: grid; gap: 4px; justify-items: end; }
.purse .turns { font: 11px var(--ui); font-weight: 700; color: #CFC9EE; background: var(--night-3); padding: 3px 8px; border-radius: 99px; }
.gtop .maxbet { font-size: 11px; color: #9C95C2; margin-left: auto; }
.gtop .maxbet + .tag { margin-left: 6px; }

/* 애정 · 이번 주 쓸 곳 */
.stat[data-k="love"] .cells i.f { background: #FF5FA2; }
.spends { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.spend { background: var(--paper); border-radius: 14px; padding: 12px; text-align: left; display: grid; grid-template-columns: 28px 1fr; gap: 2px 8px; align-items: center; }
.spend .ic { font-size: 22px; grid-row: span 2; }
.spend b { font-size: 14px; }
.spend small { font-size: 11px; color: var(--ink-2); }
.spend:disabled { opacity: .45; }
.spend:not(:disabled):active { transform: scale(.98); }
.spend.wide { grid-column: 1 / -1; }

/* 위에 붙은 지갑에 중계 보드가 가리지 않게 */
#casino { scroll-padding-top: 100px; }
.board { scroll-margin-top: 100px; }

/* 엔딩 그림 */
.endart { height: 220px; margin: 0 4px 12px; border-radius: 20px; background-size: cover; background-position: center; image-rendering: pixelated; position: relative; box-shadow: 0 6px 18px rgba(0,0,0,.12); }
.endart span { position: absolute; left: 12px; bottom: 12px; font: 15px var(--pixel); color: #fff; background: rgba(16,13,29,.7); padding: 6px 10px; border-radius: 10px; }

/* 배팅 슬립 · 결과지 · 내역 */
.slip { background: #fff; color: var(--ink); border-radius: 18px; padding: 12px 14px; margin-bottom: 10px; }
.slip-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 14px; padding-bottom: 8px; border-bottom: 1px dashed var(--line); margin-bottom: 4px; }
.slip-h span { font-size: 12px; color: var(--ink-2); text-align: right; }
.leg { display: grid; grid-template-columns: 24px 1fr auto; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.leg:last-of-type { border-bottom: 0; }
.leg .no { width: 22px; height: 22px; border-radius: 50%; background: var(--paper); display: grid; place-items: center; font: 12px var(--pixel); color: var(--ink-2); }
.leg .lt { line-height: 1.35; }
.leg .lt small { display: block; font-size: 12px; color: var(--ink-2); }
.leg > b { font: 14px var(--pixel); }
.leg .stt { font-size: 12px; font-weight: 700; text-align: right; white-space: nowrap; }
.leg .stt small { display: block; font: 12px var(--pixel); color: var(--ink-2); }
.leg.live .no, .leg.now .no { background: #FF5A5F; color: #fff; }
.leg.now { background: #FFF4F4; margin: 0 -14px; padding: 8px 14px; }
.leg.hit .no { background: var(--tie); color: #fff; } .leg.hit .stt { color: var(--tie); }
.leg.miss .no { background: var(--banker); color: #fff; } .leg.miss .stt { color: var(--banker); }
.leg.skip { opacity: .45; }
.slip-f { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-top: 10px; margin-top: 4px; border-top: 1px dashed var(--line); font-size: 13px; color: var(--ink-2); }
.slip-f b { font-size: 15px; color: var(--ink); }
.result-slip.win .slip-f b { color: var(--gain); }
.result-slip.lose .slip-f b { color: var(--loss); }
.bgame { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-size: 13px; color: #CFC9EE; }
.bgame b { font: 22px var(--pixel); color: #fff; margin-right: 4px; }
.bgame span { font-size: 12px; color: #9C95C2; }
.bgame i { font-style: normal; color: #FF6B6F; font-weight: 700; }
.bpick { font-size: 13px; color: #9C95C2; margin-bottom: 8px; }
.bpick b { color: var(--gold); }
.bverdict { margin-top: 10px; text-align: center; font: 18px var(--pixel); padding: 10px; border-radius: 12px; animation: pop .3s ease-out; }
.bverdict.hit { background: rgba(45,179,122,.18); color: #6FE0AE; }
.bverdict.miss { background: rgba(229,72,77,.18); color: #FF8F93; }
.hist-box { background: var(--night-2); border-radius: 18px; padding: 12px 14px; margin-top: 12px; }
.hist-box .label { color: #9C95C2; font-size: 12px; margin-bottom: 6px; }
.hrow { border-top: 1px solid var(--night-3); padding: 8px 0; font-size: 13px; }
.hrow summary { display: flex; justify-content: space-between; cursor: pointer; list-style: none; }
.hrow summary::-webkit-details-marker { display: none; }
.hrow.win summary b { color: #FF8F93; } .hrow.lose summary b { color: #8DB4FF; }
.hleg { font-size: 12px; color: #9C95C2; padding: 3px 0 0 4px; }

/* 큰 마감 배너 */
.duecard { background: #1B1730; color: #fff; }
.due-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 14px; }
.due-h span { font-size: 12px; color: #FF8F93; font-weight: 700; white-space: nowrap; }
.due-n { font: 28px var(--pixel); margin: 6px 0 10px; color: var(--gold); }
.duecard .track { background: #2A2547; }
.duecard .track i { background: var(--gold); }
.due-f { font-size: 13px; color: #CFC9EE; margin-top: 8px; }
.due-f b { color: #FF8F93; }

/* 버그 신고 · 링크 */
.rp { width: 100%; min-height: 160px; border-radius: 14px; border: 1px solid var(--line); padding: 12px; font: 16px/1.6 var(--ui); background: var(--card); resize: vertical; }
.rp-ctx { margin: 8px 4px 0; font-size: 12px; }
.linkbtn { display: grid; place-items: center; text-decoration: none; color: var(--ink); }
.gate .age a { color: #9C95C2; }
.help a { color: var(--ink-2); }

/* 대화 속 사진 */
.chatphoto { display: block; width: 190px; max-width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px 14px 14px 14px; background: #E7EBF3; }
.chatphoto.none { display: grid; place-items: center; color: #8890A6; font-size: 13px; }
img.chatphoto { aspect-ratio: auto; height: auto; }
img.chatphoto[src*="stream"] { width: 240px; }

/* 결과 카드 */
.cardmodal { position: absolute; inset: 0; z-index: 80; background: #0B0918; display: grid; place-items: center; padding: 16px; animation: up .3s ease-out; }
.cm-box { width: 100%; max-width: 360px; display: grid; gap: 10px; max-height: 100%; overflow-y: auto; }
.cm-box img { width: 70%; max-height: 52vh; object-fit: contain; justify-self: center; border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.cm-btns { display: grid; gap: 8px; }
.cm-btns .btn2 { background: var(--night-3); color: #fff; }
.cm-tip { margin: 0; text-align: center; font-size: 12px; color: #9C95C2; }
.cm-btns .btn2.cm-close { background: none; color: #9C95C2; }
/* 선택지가 많은 카드(잔액 부족 등): 버튼을 촘촘하게, 아래 영역은 스크롤 */
.sheet-foot { max-height: 58%; overflow-y: auto; scrollbar-width: none; }
.sheet:has(.sheet-foot .choice:nth-child(6)) .scene { display: none; }
.sheet-foot:has(.choice:nth-child(6)) { max-height: 48%; }
.sheet-foot:has(.choice:nth-child(5)) .choice { padding-top: 9px; padding-bottom: 9px; }
.sheet-foot:has(.choice:nth-child(5)) { gap: 6px; }
.sysline { align-self: center; font-size: 12px; color: #5B6480; background: rgba(255,255,255,.55); padding: 4px 12px; border-radius: 99px; margin: 4px 0; }
/* 배팅금: 더하기 칩 + 직접 입력 */
.stakebar { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.stakecur { flex: 1; font-size: 13px; color: #9C95C2; white-space: nowrap; }
.stakecur b { color: var(--gold); font-size: 16px; margin-left: 4px; }
.stakein { display: flex; align-items: center; gap: 4px; background: var(--night-2); border: 2px solid #3B3560; border-radius: 99px; padding: 0 10px; height: 40px; }
.stakein input { width: 64px; background: none; border: 0; color: #fff; font: 700 16px var(--ui); text-align: right; outline: none; }
.stakein input::placeholder { color: #6E6890; font-weight: 500; }
.stakein span { font-size: 12px; color: #9C95C2; }
.stakein:focus-within { border-color: var(--gold); }
.chip.reset { color: #9C95C2; border-style: solid; }
.stakein input::-webkit-outer-spin-button, .stakein input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stakein input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.spnote { grid-column: 2; font-style: normal; font-size: 11px; color: #E8873A; line-height: 1.3; }
.rankbtn { width: 100%; margin: 0 0 14px; }
/* 사설 사이트 스킨: 먹튀 나면 다른 사이트로 (색·무늬·강조색이 통째로 바뀐다) */
.phone.dark { transition: background-color .6s; }
.phone.dark[data-site="1"] { --night: #1A0A0C; --night-2: #2A1216; --night-3: #42202A; --gold: #FFB547; background-image: repeating-linear-gradient(135deg, rgba(255,80,80,.05) 0 10px, transparent 10px 22px); }
.phone.dark[data-site="2"] { --night: #06140F; --night-2: #0D2219; --night-3: #18392A; --gold: #5BE3A6; background-image: radial-gradient(rgba(91,227,166,.09) 1.5px, transparent 1.6px); background-size: 16px 16px; }
.phone.dark[data-site="3"] { --night: #15110A; --night-2: #241C0F; --night-3: #3B2F18; --gold: #FFD54A; background-image: linear-gradient(45deg, rgba(255,213,74,.05) 25%, transparent 25%, transparent 75%, rgba(255,213,74,.05) 75%), linear-gradient(45deg, rgba(255,213,74,.05) 25%, transparent 25%, transparent 75%, rgba(255,213,74,.05) 75%); background-size: 24px 24px; background-position: 0 0, 12px 12px; }
.phone.dark[data-site="4"] { --night: #070F1F; --night-2: #0F1B33; --night-3: #1C2E52; --gold: #4FD1FF; background-image: linear-gradient(rgba(79,209,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(79,209,255,.06) 1px, transparent 1px); background-size: 20px 20px; }
.photo-wrap { position: relative; display: inline-block; max-width: 100%; }
.ai-badge { position: absolute; right: 6px; bottom: 6px; font-size: 10px; font-weight: 700; color: #fff; background: rgba(0,0,0,.55); padding: 2px 6px; border-radius: 99px; letter-spacing: .02em; pointer-events: none; }
/* 음악 켜기/끄기 */
.sound { font-size: 15px; line-height: 1; background: none; padding: 6px 6px; border-radius: 99px; }
.sound.off { opacity: .55; }
.sound:hover { background: var(--card); }
.phone.dark .sound:hover { background: var(--night-3); }
.sound-float { position: absolute; top: 14px; right: 14px; z-index: 55; display: none; width: 40px; height: 40px; padding: 0; background: rgba(128,128,140,.2); backdrop-filter: blur(6px); }
#phone:has(> .full:not(.hidden)) .sound-float { display: block; }
/* 빚 갚기 창 */
.debt[data-id] { cursor: pointer; }
.debt[data-id]:active { background: var(--paper); }
.rp-debts { display: grid; gap: 6px; margin-top: 8px; }
.rp-debt { text-align: left; background: var(--card); border: 2px solid transparent; border-radius: 14px; padding: 10px 12px; font-size: 14px; display: grid; gap: 2px; }
.rp-debt b { float: right; font-variant-numeric: tabular-nums; }
.rp-debt small { font-size: 12px; color: var(--ink-2); }
.rp-debt.on { border-color: var(--brand, #5B3DF5); background: #F1EEFF; }
.rp-amt { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 8px 0; font-size: 13px; color: var(--ink-2); }
.rp-amt b { font-size: 18px; color: var(--ink); margin-left: 4px; }
.stakein.light { background: var(--card); border-color: var(--line); }
.stakein.light input { color: var(--ink); }
.chips.light .chip { background: var(--card); color: var(--ink); border-color: var(--line); }
.rp-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
#rpNote.warn { color: #D9480F; }
