/* =========================================================
   럭키 픽 (옛 럭키 디그 리디자인 v2) — '랜턴 갱도' 화면
   base.css 위에 덮어씀. 테마: <html data-theme="light|dark">
   ========================================================= */
:root, :root[data-theme="light"] {
  --bgimg: url('../assets/v2/bg_light.jpg');
  --bg-veil: linear-gradient(rgba(255,246,228,.55), rgba(255,236,204,.78));
  --ink: #4a2a0a;
  --muted: #7a4a14;
  --panel: rgba(255,247,232,.94);
  --panel-line: transparent;
  --panel-shadow: 0 4px 0 #d79a45;
  --cellbg: #f1dfc0;
  --cellshadow: inset 0 2px 4px rgba(120,70,20,.28);
  --frame: #7a4a22;
  --frame-line: 0 0 0 3px #b97a3e inset, 0 4px 0 #5a3410;
  --hole: #5a3416;
  --track: #efd9b4;
  --chipbg: #4a2a0a;
  --chipink: #ffe08a;
  --accent: linear-gradient(#ff8a3d, #e2541b);
  --accent-ink: #fff;
  --accent-shadow: 0 4px 0 #a63a10;
  --btn2: #f1d8b0;
  --tab-on: #c2410c;
  --glow: none;
}
:root[data-theme="dark"] {
  --bgimg: url('../assets/v2/bg_dark.jpg');
  --bg-veil: linear-gradient(rgba(14,12,22,.62), rgba(14,12,22,.82));
  --ink: #f4e9d8;
  --muted: #c9bedb;
  --panel: rgba(28,26,38,.92);
  --panel-line: #4a3322;
  --panel-shadow: 0 0 0 1px #4a3322;
  --cellbg: #241f33;
  --cellshadow: inset 0 0 0 1px #4a4363;
  --frame: #0d0c12;
  --frame-line: 0 0 0 2px #4a3322, 0 0 26px rgba(255,170,60,.18);
  --hole: #15121d;
  --track: #2e2b3d;
  --chipbg: #ffcf7a;
  --chipink: #1a0f06;
  --accent: radial-gradient(circle at 50% 30%, #ffb04a, #e2611b);
  --accent-ink: #1a0f06;
  --accent-shadow: 0 0 20px rgba(255,140,40,.45);
  --btn2: #2e2b3d;
  --tab-on: #ffcf7a;
  --glow: 0 0 12px #ff9a3a;
}

html, body { background: #1a1410; color: var(--ink); font-family: 'Pretendard', 'Noto Sans KR', 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif; }
#bg { background: var(--bg-veil), var(--bgimg) center / cover no-repeat; }
#bg::after { display: none; }
#app { padding: 10px 16px 0; color: var(--ink); }

/* ---------- 상단 ---------- */
#topbar { margin: 0; width: auto; height: 54px; gap: 10px; }
#modeBadge { position: static; transform: none; border: 0; box-shadow: none; padding: 2px 9px; font: 900 11px/1.3 'Noto Sans KR', sans-serif; }
#modeBadge.mild { background: #2f8a1a; } #modeBadge.hard { background: #c81e3a; }
.iconbtn { width: 44px; height: 44px; border-radius: 14px; background: var(--panel); color: var(--muted); display: flex; align-items: center; justify-content: center; box-shadow: var(--panel-shadow); flex-shrink: 0; }
.iconbtn svg { width: 24px; height: 24px; }
#giftBadge { bottom: -22px; }

/* ---------- 다음 등급 한 줄 ---------- */
#goal { margin-top: 26px; height: 36px; display: flex; align-items: center; gap: 10px; padding: 0 14px; border-radius: 14px; background: var(--chipbg); color: var(--chipink); }
:root[data-theme="dark"] #goal { background: var(--panel); color: var(--ink); border: 1px solid var(--panel-line); }
.goal-gem { width: 15px; height: 15px; border-radius: 3px; transform: rotate(45deg); flex-shrink: 0; background: #7a4f2c; box-shadow: 0 0 0 2px rgba(255,255,255,.5); }
#goalText { font-size: 14px; font-weight: 700; white-space: nowrap; }
#goalText b { font-weight: 900; }
.goal-bar { flex: 1; height: 7px; border-radius: 999px; background: rgba(255,255,255,.2); overflow: hidden; }
.goal-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ffd56a, #ff9a3a); transition: width .15s linear; }

/* ---------- 가운데: 랜턴 미터 + 판 ---------- */
#middle { margin-top: 14px; gap: 12px; justify-content: center; }
#leftcol { position: relative; width: 74px; flex-shrink: 0; }
#leftcol .lantern { position: absolute; left: 50%; top: 40px; width: 62px; transform: translateX(-50%); filter: drop-shadow(0 0 14px rgba(255,170,60,.55)); }
#stagewrap { flex-shrink: 0; }
#stage, #chests { margin-left: 0; }
#gauge { top: calc(var(--cell) * 3 + var(--gap) - 6px); left: 0; width: 74px; height: calc(var(--cell) * 6 + 12px); padding: 0; border-radius: 16px; background: var(--panel); box-shadow: var(--panel-shadow); }
#gaugeTrack { left: 8px; top: 10px; bottom: 10px; width: 10px; border: 0; box-shadow: none; border-radius: 999px; background: var(--track); }
#gaugeFill { background: linear-gradient(#ffe08a, #ff7a2a); box-shadow: var(--glow); }
#gaugeLabels { left: 22px; top: 10px; bottom: 10px; right: 4px; }
.glabel { left: 0; width: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0 4px; line-height: 1.05; }
.glabel .gem { width: 10px; height: 10px; border-radius: 2px; transform: rotate(45deg); flex-shrink: 0; }
.glabel .gname { font-family: 'Black Han Sans', sans-serif; font-size: 13px; color: var(--ink); white-space: nowrap; }
.glabel small { flex-basis: 100%; padding-left: 14px; font: 700 10px/1 'Noto Sans KR', sans-serif; color: var(--muted); text-shadow: none; margin: 0; }
.glabel.on .gname { color: #e2541b; }
:root[data-theme="dark"] .glabel.on .gname { color: #ffcf7a; }
.glabel.on .gem { box-shadow: 0 0 0 2px #fff, 0 0 10px #ffd56a; }

/* 탐지기 (위 5×3) */
#slot::before { inset: -8px; border: 0; border-image: none; border-radius: 16px; background: var(--panel); box-shadow: var(--panel-shadow); }
:root[data-theme="dark"] #slot::before { border: 1px solid var(--panel-line); }
.slot-cell::before { inset: 3px; border-radius: 9px; background: var(--cellbg); box-shadow: var(--cellshadow); }

/* 블록판 */
#board { background: transparent; }
#board::before { inset: -8px; border: 0; border-image: none; border-radius: 16px; background: var(--frame); box-shadow: var(--frame-line); }
.hole { background: none; }
.hole::before { content: ''; position: absolute; inset: 3px; border-radius: 9px; background: var(--hole); box-shadow: inset 0 3px 8px rgba(0,0,0,.55); }
.block { padding: 1px; }

/* 상자 줄 */
#chests { margin-top: 14px; }
#chests::after { display: none; }

/* ---------- 아래 패널 ---------- */
#panel { margin-top: 10px; height: 88px; border: 0; border-image: none; filter: none; border-radius: 20px; background: var(--panel); box-shadow: var(--panel-shadow); padding: 10px 12px; }
:root[data-theme="dark"] #panel { border: 1px solid var(--panel-line); }
.roundbtn, .roundbtn.minus, .roundbtn.plus { width: 46px; height: 46px; border-radius: 14px; background: var(--btn2); color: var(--ink); font-size: 26px; filter: none; }
#betBox { height: 62px; border: 0; border-radius: 14px; background: transparent; color: var(--ink); }
#betBox small { color: var(--muted); font-weight: 700; }
#betBox b { font-family: 'Do Hyeon', sans-serif; font-weight: 400; font-size: 26px; }
#btnPlay { width: 128px; height: 64px; margin: 0; border-radius: 18px; background: var(--accent); box-shadow: var(--accent-shadow); filter: none; color: var(--accent-ink); }
#btnPlay small { position: static; transform: none; font-family: 'Black Han Sans', sans-serif; font-weight: 400; font-size: 28px; letter-spacing: 3px; -webkit-text-stroke: 0; margin: 0; }
#btnPlay.disabled { filter: grayscale(.7) opacity(.7); }
#panelPlay { gap: 10px; }
#panelPlay .info { width: 150px; gap: 6px; }
#panelPlay .info div { background: transparent; border: 0; color: var(--ink); padding: 2px 4px; border-bottom: 1px solid rgba(128,128,128,.25); border-radius: 0; }
#panelPlay .info small { color: var(--muted); font-size: 12px; }
#panelPlay .info b { font-family: 'Do Hyeon', sans-serif; font-weight: 400; font-size: 18px; }
.scorebox { height: 64px; background: transparent; border: 0; box-shadow: none; color: var(--ink); }
.scorebox small { color: var(--muted); font-weight: 700; }
.scorebox b, .scorebox b.long { font-family: 'Do Hyeon', sans-serif; font-weight: 400; font-size: 34px; color: #e2541b; }
:root[data-theme="dark"] .scorebox b { color: #ffcf7a; }
.speedbtn, .speedbtn.on { position: static; flex-shrink: 0; width: 48px; height: 64px; border-radius: 14px; background: var(--btn2); color: var(--muted); font-size: 0; filter: none; display: flex; align-items: center; justify-content: center; }
.speedbtn svg { width: 24px; height: 24px; }
.speedbtn.on { background: #ffcf7a; color: #6b3a10; box-shadow: 0 0 12px #ffcf7a; }

/* ---------- 아래 탭 ---------- */
#tabbar { margin-top: 10px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); height: 54px; border-radius: 18px; background: var(--panel); box-shadow: var(--panel-shadow); }
.tab { background: none; color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; position: static; width: auto; height: auto; filter: none; border-radius: 0; }
.tab svg { width: 22px; height: 22px; }
.tab small { position: static; transform: none; font-size: 11px; font-weight: 900; color: inherit; -webkit-text-stroke: 0; }
.tab.on { color: var(--tab-on); }
.tab:active { transform: translateY(1px); }
.maker-game { position: static; margin-top: 6px; font-size: 11px; font-weight: 700; color: var(--muted); text-shadow: none; }
.maker-game b { color: inherit; }

/* ---------- 효과 글자 ---------- */
.float { font-family: 'Do Hyeon', sans-serif; font-weight: 400; font-size: 19px; }
.float.big { font-size: 25px; }
.banner span { font-family: 'Black Han Sans', sans-serif; font-style: normal; color: #ffcf7a; -webkit-text-stroke: 0; }

/* ---------- 시작 화면 ---------- */
#title { background: var(--bg-veil), var(--bgimg) center / cover no-repeat; background-blend-mode: normal; gap: 12px; }
:root[data-theme="dark"] #title { background: linear-gradient(rgba(14,12,22,.35), rgba(14,12,22,.85) 75%), var(--bgimg) center / cover no-repeat; }
.title-glow { opacity: .55; }
.title-lantern { position: relative; width: 84px; filter: drop-shadow(0 0 22px rgba(255,160,60,.75)); animation: bob 2.6s ease-in-out infinite; }
.title-name { position: relative; margin: 0; font-family: 'Black Han Sans', sans-serif; font-weight: 400; font-size: clamp(52px, 17vw, 72px); line-height: 1; color: #ffd56a; letter-spacing: 2px; text-shadow: 0 5px 0 #8a4a10, 0 0 30px rgba(255,170,60,.45); }
.title-blocks { position: relative; display: flex; gap: 6px; margin: 4px 0 6px; }
.title-blocks img { width: 52px; height: 52px; }
.title-blocks img:nth-child(1) { transform: rotate(-8deg); } .title-blocks img:nth-child(2) { transform: translateY(-8px); }
.title-blocks img:nth-child(3) { transform: translateY(-14px); } .title-blocks img:nth-child(4) { transform: translateY(-8px); } .title-blocks img:nth-child(5) { transform: rotate(8deg); }
#btnStart { height: 76px; border: 0; border-radius: 22px; background: var(--accent); box-shadow: var(--accent-shadow); animation: none; }
#btnStart span { font-family: 'Black Han Sans', sans-serif; font-weight: 400; font-size: clamp(24px, 8vw, 32px); color: var(--accent-ink); -webkit-text-stroke: 0; text-shadow: none; }
:root[data-theme="light"] #btnStart span { color: #fff; }
.title-hint { text-shadow: 0 1px 3px rgba(0,0,0,.6); }

/* ---------- 결과 (등급 확정) ---------- */
.gb-ring { background: radial-gradient(circle, var(--gc) 55%, #fff 57%, #ffd56a 62%, #8a4a10 70%); }
.gb-letter { font-size: 64px; -webkit-text-stroke: 3px rgba(0,0,0,.45); text-shadow: 0 5px 0 rgba(0,0,0,.35); }
.gb-ribbon { background: linear-gradient(#ff8a3d, #e2541b); font-family: 'Black Han Sans', sans-serif; font-weight: 400; }
.chip { font-family: 'Black Han Sans', sans-serif; font-weight: 400; border: 0; border-radius: 999px; padding: 3px 10px; }

/* ---------- 설정: 테마 고르기 ---------- */
.themepick { display: flex; flex-direction: column; gap: 8px; padding: 10px 4px 4px; font-weight: 800; }

/* 예전 버튼 그림 지우기 (id 로 걸려 있던 배경 이미지) */
#btnRank, #btnBag, #btnPrizes, #btnMenu, #btnHelp { background-image: none; }
#tabbar .tab { box-shadow: none; }
#giftBadge { bottom: -30px; font-size: 13px; padding: 4px 11px; }
#goal { margin-top: 32px; }

/* ---------- 버그 수정 (2026-11-14 점검) ---------- */
/* 1) 어두운 테마에서 팝업(크림색 창) 글자가 밝은색을 물려받아 안 보이던 문제 → 팝업 안은 항상 진한 글자 */
.modal, .modal button, .modal .closebtn, .zoom .closebtn, .rowbtn { color: #3a2410; }
.modal .muted, .modal small { color: #8a6a3a; }
/* 2) 보상표 등급 칩: '다이아'가 두 줄로 꺾이던 문제 */
/* 3) 밝은 테마 시작 화면: 노란 글자·흰 안내 글씨가 크림 배경에 묻힘 */
:root[data-theme="light"] .title-name { color: #e2541b; text-shadow: 0 5px 0 #6b2a08, 0 0 24px rgba(255,255,255,.7); }
:root[data-theme="light"] .title-hint { color: #6b3a10; text-shadow: none; }
:root[data-theme="light"] .who { background: rgba(74,42,10,.75); }
.pointcard .pc-ico svg { width: 2.6em; height: 2.6em; display: block; margin: 0 auto; }

/* =========================================================
   도트 UI 시험 (html[data-ui="pixel"]) — 그림은 그대로, 글꼴·테두리·버튼만 도트 느낌
   - 둥근 모서리·흐린 그림자·그라데이션 대신: 각진 모서리 + 3px 진한 테두리 + 딱 떨어지는 그림자
   - 글꼴: 갈무리 (SIL OFL, 상업 사용 가능)
   ========================================================= */
:root[data-ui="pixel"] { --px-line: #2a1608; --px-shadow: 4px 4px 0 rgba(20,10,4,.45); }
:root[data-ui="pixel"][data-theme="dark"] { --px-line: #08070c; }
:root[data-ui="pixel"] body, :root[data-ui="pixel"] button, :root[data-ui="pixel"] input { font-family: 'Galmuri11', 'Noto Sans KR', sans-serif; }
:root[data-ui="pixel"] #logo .lg-name, :root[data-ui="pixel"] .title-name, :root[data-ui="pixel"] #btnPlay small, :root[data-ui="pixel"] #btnStart span,
:root[data-ui="pixel"] .glabel .gname, :root[data-ui="pixel"] .chip, :root[data-ui="pixel"] .gb-letter, :root[data-ui="pixel"] .gb-ribbon,
:root[data-ui="pixel"] .modal h2, :root[data-ui="pixel"] .banner span { font-family: 'Galmuri14', 'Galmuri11', sans-serif; font-weight: 700; letter-spacing: 0; }
:root[data-ui="pixel"] .pt-col b, :root[data-ui="pixel"] #betBox b, :root[data-ui="pixel"] .scorebox b, :root[data-ui="pixel"] #panelPlay .info b,
:root[data-ui="pixel"] .float, :root[data-ui="pixel"] .fin-score { font-family: 'Galmuri11', sans-serif; font-weight: 700; }
:root[data-ui="pixel"] .title-name { text-shadow: 4px 4px 0 #6b2a08; font-size: clamp(44px, 14vw, 60px); }
:root[data-ui="pixel"][data-theme="dark"] .title-name { text-shadow: 4px 4px 0 #3a1a04; }
/* 상자들: 각지게 + 진한 테두리 + 딱 떨어지는 그림자 */
:root[data-ui="pixel"] #pointsPill.pill, :root[data-ui="pixel"] .iconbtn, :root[data-ui="pixel"] #goal, :root[data-ui="pixel"] #gauge,
:root[data-ui="pixel"] #panel, :root[data-ui="pixel"] #tabbar, :root[data-ui="pixel"] .modal, :root[data-ui="pixel"] #btnPlay,
:root[data-ui="pixel"] .roundbtn, :root[data-ui="pixel"] .speedbtn, :root[data-ui="pixel"] #btnStart, :root[data-ui="pixel"] .mode-btn,
:root[data-ui="pixel"] .news-item, :root[data-ui="pixel"] #giftBadge, :root[data-ui="pixel"] .who {
  border-radius: 0 !important; border: 3px solid var(--px-line) !important; box-shadow: var(--px-shadow) !important; }
:root[data-ui="pixel"] #slot::before, :root[data-ui="pixel"] #board::before { border-radius: 0; border: 3px solid var(--px-line); box-shadow: var(--px-shadow); }
:root[data-ui="pixel"] .slot-cell::before, :root[data-ui="pixel"] .hole::before { border-radius: 0; }
:root[data-ui="pixel"] .slot-cell::before { box-shadow: inset 3px 3px 0 rgba(0,0,0,.18); }
:root[data-ui="pixel"] #gaugeTrack, :root[data-ui="pixel"] #gaugeFill, :root[data-ui="pixel"] .goal-bar, :root[data-ui="pixel"] .goal-bar i { border-radius: 0; }
:root[data-ui="pixel"] #gaugeTrack { border: 2px solid var(--px-line); }
:root[data-ui="pixel"] .glabel .gem, :root[data-ui="pixel"] .goal-gem { border-radius: 0; }
/* 버튼: 그라데이션 대신 평평한 색 + 아래 진한 줄 (누르면 내려감) */
:root[data-ui="pixel"] #btnPlay, :root[data-ui="pixel"] #btnStart { background: #f06a26; box-shadow: inset 0 -5px 0 #a63a10, var(--px-shadow) !important; }
:root[data-ui="pixel"] #btnPlay:active, :root[data-ui="pixel"] #btnStart:active { transform: translate(3px, 3px); box-shadow: inset 0 -2px 0 #a63a10 !important; }
:root[data-ui="pixel"] .roundbtn, :root[data-ui="pixel"] .speedbtn { box-shadow: inset 0 -4px 0 rgba(0,0,0,.25), var(--px-shadow) !important; }
:root[data-ui="pixel"] .chip, :root[data-ui="pixel"] .card-grade, :root[data-ui="pixel"] #modeBadge, :root[data-ui="pixel"] .medal { border-radius: 0 !important; }
:root[data-ui="pixel"] .modal button, :root[data-ui="pixel"] .rowbtn, :root[data-ui="pixel"] .closebtn, :root[data-ui="pixel"] .tabs button,
:root[data-ui="pixel"] .rrow2, :root[data-ui="pixel"] .themepick .seg button, :root[data-ui="pixel"] .rest-note { border-radius: 0 !important; }
:root[data-ui="pixel"] .closebtn { border: 3px solid var(--px-line); box-shadow: inset 0 -4px 0 #eadbc0; }
:root[data-ui="pixel"] .divider { background: repeating-linear-gradient(90deg, #c99a55 0 6px, transparent 6px 10px); }
:root[data-ui="pixel"] .divider span { transform: translateX(-50%); }
:root[data-ui="pixel"] .lantern, :root[data-ui="pixel"] .title-lantern { filter: drop-shadow(4px 4px 0 rgba(0,0,0,.35)); }
/* 도트 UI 다듬기: 제목은 굵은 갈무리11, 미터 이름 작게, 잔고 숫자 잘림 방지 */
:root[data-ui="pixel"] #logo .lg-name, :root[data-ui="pixel"] .title-name, :root[data-ui="pixel"] #btnPlay small, :root[data-ui="pixel"] #btnStart span,
:root[data-ui="pixel"] .chip, :root[data-ui="pixel"] .gb-letter, :root[data-ui="pixel"] .gb-ribbon, :root[data-ui="pixel"] .modal h2 { font-family: 'Galmuri11', sans-serif; font-weight: 700; }
:root[data-ui="pixel"] .glabel .gname { font-family: 'Galmuri11', sans-serif; font-weight: 700; font-size: 11px; }
:root[data-ui="pixel"] .glabel small { font-family: 'Galmuri9', 'Galmuri11', sans-serif; padding-left: 13px; }
/* 랭크 미터: 큰 알파벳 한 글자 */
.glabel .gname { font-size: 17px; line-height: 1; }
:root[data-ui="pixel"] .glabel .gname { font-size: 16px; }
.glabel small { padding-left: 14px; }
.glabel small { padding-left: 4px; flex-basis: auto; font-size: 10px; white-space: nowrap; }
.glabel { flex-wrap: nowrap; align-items: baseline; }
.glabel .gem { align-self: center; }
:root[data-ui="pixel"] .glabel small { padding-left: 3px; }
/* 미터 점수: 알파벳 아래 줄에 (좁은 칸에서 잘리지 않게) */
.glabel { flex-wrap: wrap; align-items: center; }
.glabel small, :root[data-ui="pixel"] .glabel small { flex-basis: 100%; padding-left: 0; margin-top: 1px; font-size: 11px; }
/* 미터 점수: 만 단위 줄임 없이 전체 숫자. 7자리 넘으면 글씨 조금 작게 */
.glabel small.long, :root[data-ui="pixel"] .glabel small.long { font-size: 9px; letter-spacing: -0.3px; }
#gaugeLabels { right: 2px; }

/* =========================================================
   레트로 다듬기 2차 (2026-11-14)
   ========================================================= */
/* 아이콘: 기본 스타일은 선 아이콘, 도트 스타일은 도트 아이콘 */
.ico-px { display: none; }
:root[data-ui="pixel"] .ico-px { display: block; }
:root[data-ui="pixel"] .ico-line { display: none; }

/* 세로 공간 확보: 탐지기~판 간격 24→14, 선물 배지를 '다음 등급' 줄 오른쪽으로 */
:root { --gap: 14px; }
#goal { margin-top: 8px; padding-right: 168px; position: relative; }
#giftBadge { top: 57px; bottom: auto; left: auto; right: -54px; transform: none; height: 36px; display: flex; align-items: center; padding: 0 12px; z-index: 12; }
#middle { margin-top: 12px; }
#panel { height: 84px; }

/* 아래 탭: 웹에서도 손가락으로 누르기 편하게 크게 */
#tabbar { height: 70px; margin-top: 10px; }
.tab svg { width: 30px; height: 30px; }
.tab small { font-size: 14px; margin-top: 2px; }
.iconbtn svg, .speedbtn svg { width: 26px; height: 26px; }
.maker-game { margin-top: 4px; font-size: 11px; line-height: 14px; }

/* 칸칸이 차는 미터 (도트 스타일): 매끈한 막대 대신 블록이 하나씩 쌓이는 모양 */
:root[data-ui="pixel"] #gaugeTrack { width: 12px; }
:root[data-ui="pixel"] #gaugeFill { background: repeating-linear-gradient(to top, #ffb03a 0 7px, #ff7a2a 7px 9px, transparent 9px 12px); box-shadow: none; transition: none; }
:root[data-ui="pixel"] .goal-bar i { background: repeating-linear-gradient(90deg, #ffd56a 0 8px, transparent 8px 11px); transition: none; }
:root[data-ui="pixel"] .goal-bar { height: 9px; background: rgba(255,255,255,.18); }
#giftBadge { gap: 5px; white-space: nowrap; }

/* =========================================================
   랜턴 기름관 게이지 (①+④): 액체가 차오름 · 지나간 등급 불 켜짐 · 등급 오를 때 번쩍 + 배지 '펑'
   ========================================================= */
#leftcol .lantern { top: 4px; width: 58px; transition: filter .2s; }
#gradeBadge { position: absolute; left: 50%; top: 92px; width: 50px; height: 50px; margin-left: -25px; transform: rotate(45deg); background: var(--gc, #4a3322); border: 3px solid #2a1608; box-shadow: 3px 3px 0 rgba(0,0,0,.4); display: flex; align-items: center; justify-content: center; }
:root[data-theme="dark"] #gradeBadge { border-color: #08070c; }
#gradeBadge span { transform: rotate(-45deg); font-family: 'Black Han Sans', sans-serif; font-size: 28px; line-height: 1; color: #fff; text-shadow: 2px 2px 0 rgba(0,0,0,.35); }
:root[data-ui="pixel"] #gradeBadge span { font-family: 'Galmuri11', sans-serif; font-weight: 700; }
#gradeBadge.lit { box-shadow: 3px 3px 0 rgba(0,0,0,.4), 0 0 18px var(--gc); }
#gradeBadge.pop { animation: gbPop .45s ease-out; }
@keyframes gbPop { 0% { transform: rotate(45deg) scale(1.75); } 55% { transform: rotate(45deg) scale(.9); } 100% { transform: rotate(45deg) scale(1); } }

/* 관 */
#gaugeTrack, :root[data-ui="pixel"] #gaugeTrack { left: 7px; width: 22px; border: 3px solid #2a1608; border-radius: 0; background: #241f33; overflow: hidden; }
:root[data-theme="dark"] #gaugeTrack { border-color: #08070c; }
#gaugeTrack::after { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: repeating-linear-gradient(to top, transparent 0 calc(100% / 9 - 2px), rgba(8,7,12,.55) calc(100% / 9 - 2px) calc(100% / 9)); }
#gaugeFill, :root[data-ui="pixel"] #gaugeFill { background: linear-gradient(to top, #e2541b, #ff9a2a 55%, #ffd56a); box-shadow: 0 0 16px rgba(255,150,40,.7); transition: height .12s ease-out; overflow: hidden; }
#gaugeFill::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: #fff3b0; }
#gaugeFill .bub { position: absolute; width: 4px; height: 4px; background: #fff6c0; bottom: -6px; animation: gbBub 2.2s linear infinite; }
#gaugeFill .b1 { left: 3px; } #gaugeFill .b2 { left: 10px; animation-delay: .8s; } #gaugeFill .b3 { left: 6px; animation-delay: 1.5s; }
@keyframes gbBub { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: .85; } 100% { transform: translateY(-160px); opacity: 0; } }
#gaugeFlash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 3; }
#gaugeFlash.go { animation: gbFlash .5s ease-out; }
@keyframes gbFlash { 0% { opacity: .95; } 100% { opacity: 0; } }

/* 등급 꼬리표: 지나간 등급은 그 색으로 불이 켜짐, 지금 등급은 크게 */
#gaugeLabels { left: 34px; }
.glabel .gem { display: none; }
.glabel .gname, :root[data-ui="pixel"] .glabel .gname { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 2px; font-size: 15px; border: 2px solid rgba(128,128,128,.4); color: var(--muted); background: transparent; transition: transform .2s; }
.glabel.got .gname { color: #fff; border-color: #2a1608; }
:root[data-theme="dark"] .glabel.got .gname { border-color: #08070c; }
.glabel.on .gname, :root[data-theme="dark"] .glabel.on .gname { color: #fff; transform: scale(1.25); transform-origin: left center; }
.glabel small { opacity: .55; }
.glabel.got small { opacity: 1; }
.glabel.pop .gname { animation: tagPop .45s ease-out; }
@keyframes tagPop { 0% { transform: scale(1.9); } 60% { transform: scale(1.1); } 100% { transform: scale(1.25); } }
#leftcol .lantern.flare { animation: lanFlare .5s ease-out; }
@keyframes lanFlare { 0% { transform: translateX(-50%) scale(1.25); filter: drop-shadow(0 0 30px #fff3b0) brightness(1.8); } 100% { transform: translateX(-50%) scale(1); } }
.glabel.got .gname { background: var(--gc); } .glabel.on .gname { box-shadow: 0 0 12px var(--gc); }
#leftcol, #gauge { width: 88px; } #middle { gap: 10px; }
/* 꼬리표 색: 도트 스타일 규칙보다 우선 */
:root .glabel.got .gname, :root[data-ui="pixel"] .glabel.got .gname { background: var(--gc); color: #fff; border-color: #2a1608; }
:root[data-theme="dark"] .glabel.got .gname { border-color: #08070c; }
:root .glabel.on .gname, :root[data-ui="pixel"] .glabel.on .gname { box-shadow: 0 0 12px var(--gc); transform: scale(1.25); transform-origin: left center; }
:root .glabel.pop .gname, :root[data-ui="pixel"] .glabel.pop .gname { animation: tagPop .45s ease-out; }
#leftcol .lantern { width: 64px; }

/* =========================================================
   통일 팔레트 ① 랜턴 호박빛 (2026-11-14) — 라이트 모드 없음, 밤 갱도 하나
   색은 이 6가지(+ 파생)만 씀. 등급 색·블록·상자·카드 그림은 정보/그림이라 예외.
   ========================================================= */
:root, :root[data-theme="light"], :root[data-theme="dark"] {
  --p-bg: #1a130d;        /* 바탕 — 2026-11-19 남색 #141623 → 짙은 갈색 (사용자 결정 '1 · 짙은 갈색') */
  --p-surface: #2a1d13;   /* 패널 (모든 창·칸) — 예전 #1f2235 */
  --p-well: #160f09;      /* 패널 안 움푹한 칸 — 예전 #0f111b */
  --p-raise: #3d2a1b;     /* 보조 버튼 — 예전 #2c3049 */
  --p-line: #0c0805;      /* 테두리·그림자 — 예전 #08090f */
  --p-text: #f3ead8;      /* 글자 */
  --p-muted: #c4a882;     /* 흐린 글자 — 예전 #a9a3bf */
  --p-accent: #ffad3b;    /* 강조: 채굴 버튼·중요 숫자·켜진 탭 */
  --p-accent-d: #d9661c;  /* 강조 그림자 */
  --p-on-accent: #1a1206; /* 강조 위 글자 */
  --p-info: #e9c48a;      /* 보조: MILD·정보·링크 — 예전 하늘색 #6cc6d9 (강조색은 주황 + 등급 색만) */
  --bgimg: url('../assets/v2/bg_dark.jpg');
  --bg-veil: linear-gradient(rgba(26,19,13,.70), rgba(26,19,13,.88));
  --ink: var(--p-text); --muted: var(--p-muted);
  --panel: var(--p-surface); --panel-line: var(--p-line); --panel-shadow: 3px 3px 0 rgba(0,0,0,.5);
  --cellbg: var(--p-well); --cellshadow: inset 2px 2px 0 rgba(0,0,0,.35);
  --frame: var(--p-well); --frame-line: 0 0 0 0 transparent; --hole: #0b0c14; --track: var(--p-well);
  --chipbg: var(--p-surface); --chipink: var(--p-text);
  --accent: var(--p-accent); --accent-ink: var(--p-on-accent); --accent-shadow: inset 0 -5px 0 var(--p-accent-d);
  --btn2: var(--p-raise); --tab-on: var(--p-accent); --glow: 0 0 12px rgba(255,170,60,.7);
  --px-line: var(--p-line); --px-shadow: 3px 3px 0 rgba(0,0,0,.5);
  color-scheme: dark;
}
html, body { background: var(--p-bg); color: var(--p-text); }

/* 상단·패널: 모두 같은 패널색 + 진한 테두리 */
#modeBadge.mild { background: var(--p-info); color: var(--p-bg); } #modeBadge.hard { background: var(--p-accent-d); color: #fff; }
#goal, :root[data-theme="dark"] #goal { background: var(--p-surface); color: var(--p-text); border: 3px solid var(--p-line); }
#goalText b { color: var(--p-accent); }
.goal-bar { background: var(--p-well); }
.goal-bar i { background: var(--p-accent); }
:root[data-ui="pixel"] .goal-bar i { background: repeating-linear-gradient(90deg, var(--p-accent) 0 8px, transparent 8px 11px); }
#giftBadge, #giftBadge.ready { background: var(--p-raise); color: var(--p-text); border: 3px solid var(--p-line); }
#giftBadge b, #giftBadge .mico { color: var(--p-accent); }
#giftBadge.ready { box-shadow: 0 0 12px var(--p-accent); }
#panel, #tabbar, #gauge, .iconbtn { border: 3px solid var(--p-line); }
#slot::before { border: 3px solid var(--p-line); }
#board::before { border: 3px solid var(--p-line); box-shadow: var(--panel-shadow); }
#gaugeTrack, :root[data-ui="pixel"] #gaugeTrack, :root[data-theme="dark"] #gaugeTrack { border-color: var(--p-line); background: var(--p-well); }
.scorebox b, .scorebox b.long, :root[data-theme="dark"] .scorebox b { color: var(--p-accent); }
#btnPlay, :root[data-ui="pixel"] #btnPlay, #btnStart, :root[data-ui="pixel"] #btnStart { background: var(--p-accent); color: var(--p-on-accent); box-shadow: inset 0 -5px 0 var(--p-accent-d), var(--px-shadow) !important; }
#btnPlay small, #btnStart span, :root[data-theme="light"] #btnStart span { color: var(--p-on-accent); }
.speedbtn.on { background: var(--p-accent); color: var(--p-on-accent); box-shadow: 0 0 12px var(--p-accent); }
.maker-game { color: var(--p-muted); }

/* 시작 화면 */
#title, :root[data-theme="dark"] #title { background: linear-gradient(rgba(20,22,35,.35), rgba(20,22,35,.9) 75%), var(--bgimg) center / cover no-repeat; }
.title-name, :root[data-theme="light"] .title-name { color: var(--p-accent); text-shadow: 4px 4px 0 #3a1d06, 0 0 24px rgba(255,170,60,.35); }
.title-hint, :root[data-theme="light"] .title-hint { color: var(--p-muted); text-shadow: none; }
.mode-btn { background: var(--p-surface); border: 3px solid var(--p-line); color: var(--p-text); }
.mode-btn small { color: var(--p-muted); }
.mode-btn[data-mode=mild] b { color: var(--p-info); } .mode-btn[data-mode=hard] b { color: var(--p-accent); }
.mode-btn .meter { background: var(--p-well); }
.mode-btn[data-mode=mild] .meter i.lit { background: var(--p-info); } .mode-btn[data-mode=hard] .meter i.lit { background: var(--p-accent); }
.mode-btn.on[data-mode=mild] { border-color: var(--p-info); box-shadow: 0 0 0 2px var(--p-info), 0 0 16px rgba(108,198,217,.5) !important; }
.mode-btn.on[data-mode=hard] { border-color: var(--p-accent); box-shadow: 0 0 0 2px var(--p-accent), 0 0 16px rgba(255,173,59,.5) !important; }
.who, :root[data-theme="light"] .who, #title .maker { background: var(--p-surface); color: var(--p-text); border: 3px solid var(--p-line); }
#title .maker b { color: var(--p-accent); }

/* 알림·업데이트 */
.news-item { background: var(--p-surface); color: var(--p-text); border: 3px solid var(--p-accent); box-shadow: 3px 3px 0 rgba(0,0,0,.5); }
.news-item .mico { color: var(--p-accent); }
.upd-done { background: var(--p-surface); border: 3px solid var(--p-accent); }
.upd-done b, .upd-done b .mico { color: var(--p-accent); }
#toast, body > #toast { background: var(--p-surface); color: var(--p-text); border: 2px solid var(--p-line); }

/* 팝업 (설정·보관함·보상표·랭킹·결과·출석): 크림색 창 → 패널색 창 */
#overlay { background: rgba(8,9,15,.7); }
.modal, .modal button, .modal .closebtn, .zoom .closebtn, .rowbtn { color: var(--p-text); }
.modal { background: var(--p-surface); border: 3px solid var(--p-line); box-shadow: 4px 4px 0 rgba(0,0,0,.55); }
.modal h2 { color: var(--p-accent); }
.modal .muted, .modal small, .muted { color: var(--p-muted); }
.note { color: var(--p-info); }
.divider { background: linear-gradient(90deg, transparent, var(--p-accent), transparent); }
:root[data-ui="pixel"] .divider { background: repeating-linear-gradient(90deg, var(--p-accent) 0 6px, transparent 6px 10px); }
.divider span { background: var(--p-accent); }
.closebtn, :root[data-ui="pixel"] .closebtn { background: var(--p-raise); border: 3px solid var(--p-line); box-shadow: inset 0 -4px 0 rgba(0,0,0,.3); }
.rowbtn, .rowbtn.big { background: var(--p-raise); border: 2px solid var(--p-line); }
.rowbtn.gold { background: var(--p-accent); color: var(--p-on-accent); }
.mico, .rowbtn .mico { color: var(--p-accent); }
.rowbtn.gold .mico { color: var(--p-on-accent); }
.tabs button, .dex-tiers button, .themepick .seg button { background: var(--p-raise); color: var(--p-muted); border: 2px solid var(--p-line); }
.tabs button.on, .dex-tiers button.on, .themepick .seg button.on { background: var(--p-accent); color: var(--p-on-accent); }
.slider input { accent-color: var(--p-accent); }
.tabbody h4, .steps li b, .steps2 b { color: var(--p-accent); }
.tbl th { background: var(--p-well); color: var(--p-muted); }
.tbl td, .itemrow, .rrow, .prow { border-color: var(--p-raise); }
.icbox .ic { background: var(--p-well); }
.icbox small { color: var(--p-muted); }
.rbtns button { background: var(--p-raise); border: 3px solid var(--p-line); color: var(--p-text); }
.rbtns button.red { background: var(--p-accent); border-color: var(--p-line); color: var(--p-on-accent); box-shadow: inset 0 -4px 0 var(--p-accent-d); }
.bagitem button { background: var(--p-accent); color: var(--p-on-accent); }
.cmp { background: var(--p-well); } .cmp b { color: var(--p-accent); }
.chargegrid button, .betlist button { background: var(--p-raise); border: 3px solid var(--p-line); color: var(--p-text); }
.betlist button.on { background: var(--p-accent); color: var(--p-on-accent); }
.inp { background: var(--p-well); color: var(--p-text); border: 3px solid var(--p-line); }
.dexcard small { color: var(--p-muted); }
.daily .dday { background: var(--p-well); border-color: var(--p-line); color: var(--p-text); }
.dday.today { border-color: var(--p-accent); box-shadow: 0 0 10px rgba(255,173,59,.5); }
.dday small { color: var(--p-muted); }
.zoom { background: rgba(8,9,15,.85); }

/* =========================================================
   결과 연출 (우리만의 것): ① 랜턴 감정 → ② 원석 깨기 → ③ 결과 창
   ========================================================= */
.fin2 { gap: 14px; text-align: center; }
.f2-rays { position: absolute; top: 4%; width: 460px; height: 460px; pointer-events: none;
  background: repeating-conic-gradient(color-mix(in srgb, var(--gc) 45%, transparent) 0 8deg, transparent 8deg 20deg);
  -webkit-mask: radial-gradient(circle, #000 18%, transparent 66%); mask: radial-gradient(circle, #000 18%, transparent 66%); animation: spinGlow 14s linear infinite; }
@keyframes f2LanIn { from { transform: translateY(-30px) scale(.7); opacity: 0; } }
:root[data-ui="pixel"] .f2-badge span, :root[data-ui="pixel"] .f2-title { font-family: 'Galmuri11', sans-serif; font-weight: 700; }
@keyframes f2Badge { 0% { transform: rotate(45deg) scale(0); } 100% { transform: rotate(45deg) scale(1); } }
.f2-title { position: relative; font: 400 34px/1.1 'Black Han Sans', sans-serif; color: var(--p-accent); text-shadow: 3px 3px 0 rgba(0,0,0,.5); }
.f2-title.small { font-size: 22px; color: var(--p-muted); }
.f2-score { position: relative; font-size: 18px; color: var(--p-text); font-weight: 700; }
.f2-score b { font-family: 'Do Hyeon', sans-serif; font-weight: 400; font-size: 34px; color: var(--p-accent); margin-left: 6px; }
:root[data-ui="pixel"] .f2-score b { font-family: 'Galmuri11', sans-serif; font-weight: 700; }
.f2-next { position: relative; font-size: 14px; color: var(--p-muted); }
.f2-next.top { color: var(--p-accent); font-size: 18px; font-weight: 900; }
@keyframes f2Hit1 { 0% { transform: scale(1.12) rotate(-5deg); } 40% { transform: translateX(8px) rotate(3deg); } 100% { transform: none; } }
@keyframes f2Hit2 { 0% { transform: scale(1.12) rotate(5deg); } 40% { transform: translateX(-8px) rotate(-3deg); } 100% { transform: none; } }
@keyframes f2Burst { to { transform: scale(1.5); opacity: 0; } }
.f2-flash { position: absolute; inset: 0; background: radial-gradient(circle, #fff 0%, var(--gc) 40%, transparent 70%); pointer-events: none; opacity: 0; animation: f2Flash .7s ease-out; }
@keyframes f2Flash { 0% { opacity: 1; } 100% { opacity: 0; } }
@keyframes f2Card { 0% { transform: scale(.2) rotateY(90deg); } 100% { transform: none; } }
/* 결과 창 등급 배지 */
.result .rname { color: var(--p-text); }
.result .rrow b { color: var(--p-accent); font-size: 18px; }
@media (prefers-reduced-motion: reduce) { .f2-rays { animation: none; } }

/* =========================================================
   상단 E (2026-11-14): 잔고 + 이번 주 순위 + 도감 진행 · 선물은 작은 상자 + 시간
   ========================================================= */
#topbar { height: 74px; gap: 8px; align-items: stretch; margin: 0; width: auto; }
#topbar > button, .hd-goals, .hd-side { font-family: inherit; }
.hd-money { flex: 1.25; position: relative; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 4px; padding: 0 12px;
  background: var(--p-surface); color: var(--p-text); border: 3px solid var(--p-line); box-shadow: 3px 3px 0 rgba(0,0,0,.5); text-align: left; }
.hd-lab { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--p-muted); }
#modeBadge, #modeBadge.mild, #modeBadge.hard { position: static; transform: none; border: 0; box-shadow: none; font: 900 10px/1.4 'Noto Sans KR', sans-serif; padding: 0 6px; }
#modeBadge.mild { background: var(--p-info); color: var(--p-bg); } #modeBadge.hard { background: var(--p-accent-d); color: #fff; }
#pointsText { font-family: 'Do Hyeon', sans-serif; font-weight: 400; font-size: 28px; line-height: 1; color: var(--p-accent); white-space: nowrap; }
:root[data-ui="pixel"] #pointsText { font-family: 'Galmuri11', sans-serif; font-weight: 700; font-size: 25px; }
.hd-money .plus { position: absolute; right: 6px; top: 4px; width: 22px; height: 22px; line-height: 22px; font-size: 18px; background: none; color: var(--p-muted); }
#giftBadge { display: none !important; }

.hd-goals { flex: 1; display: flex; flex-direction: column; background: var(--p-surface); border: 3px solid var(--p-line); box-shadow: 3px 3px 0 rgba(0,0,0,.5); }
.hd-rank, .hd-dex { flex: 1; display: flex; align-items: center; gap: 6px; padding: 0 10px; background: none; color: var(--p-text); min-width: 0; }
.hd-rank svg { width: 16px; height: 16px; color: var(--p-accent); flex-shrink: 0; }
.hd-rank small, .hd-dex small { font-size: 11px; color: var(--p-muted); white-space: nowrap; }
#rankText { margin-left: auto; font-family: 'Do Hyeon', sans-serif; font-weight: 400; font-size: 24px; line-height: 1; color: var(--p-text); white-space: nowrap; }
:root[data-ui="pixel"] #rankText { font-family: 'Galmuri11', sans-serif; font-weight: 700; font-size: 20px; }
#rankText.none { font-family: 'Noto Sans KR', sans-serif; font-size: 13px; font-weight: 900; color: var(--p-muted); }
.hd-dex { border-top: 2px solid var(--p-line); }
.hd-bar { flex: 1; height: 6px; background: var(--p-well); display: block; min-width: 20px; }
.hd-bar i { display: block; height: 100%; width: 0; background: var(--p-info); }
#dexText { font-family: 'Galmuri11', 'Do Hyeon', sans-serif; font-size: 11px; font-weight: 700; color: var(--p-info); white-space: nowrap; }

.hd-side { width: 44px; display: flex; flex-direction: column; align-items: center; justify-content: space-between; flex-shrink: 0; }
.hd-gift { position: relative; display: flex; flex-direction: column; align-items: center; background: none; padding: 0; }
.hd-gift img { width: 36px; height: 36px; object-fit: contain; filter: drop-shadow(2px 2px 0 rgba(0,0,0,.5)); }
#giftTime { margin-top: -4px; font-family: 'Galmuri11', monospace; font-size: 10px; font-weight: 700; color: var(--p-accent); background: var(--p-line); padding: 0 3px; }
.hd-side .iconbtn, :root[data-ui="pixel"] .hd-side .iconbtn { width: 30px; height: 24px; border-width: 2px !important; box-shadow: none !important; }
.hd-side .iconbtn svg { width: 14px; height: 14px; }
#middle { margin-top: 12px; }
body:not(.admin) .hd-money .plus { display: none; }

/* 휴대폰 스크린샷 점검 수정 (2026-11-14) */
/* 1) 이번 판 '10,000 pt'가 두 줄로 꺾이고 '이번 판' 글자가 테두리에 잘리던 문제 */
#betBox { min-width: 0; flex: 1; padding: 0; }
#betBox b, :root[data-ui="pixel"] #betBox b { white-space: nowrap; font-size: 22px; line-height: 1.1; }
#betBox small { line-height: 1.2; }
/* 2) 잔고 칸: '잔고' 글자가 위 테두리에 붙고 숫자가 아래로 쏠리던 문제 (예전 규칙 space-between 덮어씀) */
#pointsPill.hd-money { justify-content: center; gap: 6px; }
/* 3) 순위 밖일 때 '도전 중'이 숫자 크기로 크게 나오던 문제 */
:root[data-ui="pixel"] #rankText.none, #rankText.none { font-family: 'Galmuri11', 'Noto Sans KR', sans-serif; font-size: 13px; font-weight: 700; color: var(--p-muted); }

/* =========================================================
   휴대폰 점검 2차 (2026-11-14)
   1) 왼쪽 칸: 게이지를 위아래로 길게, 랜턴은 관 꼭대기, 등급 배지는 아래 빈자리(상자 줄 옆)
   2) 대기 중 탐지기 빈칸에 안내 문구
   3) 전체 높이 900 → 860 (휴대폰 브라우저에서 양옆 빈 띠 줄이기)
   ========================================================= */
#app { height: 860px; }
#topbar { height: 70px; }
#middle { margin-top: 8px; }
#panel { height: 78px; padding: 6px 12px; }
#tabbar { height: 64px; margin-top: 8px; }
.tab svg { width: 28px; height: 28px; }

/* 1) 왼쪽 칸 */
#leftcol { align-self: stretch; }
#leftcol .lantern { top: 0; width: 54px; z-index: 2; }
#gauge { top: 58px; bottom: 84px; height: auto; }
#gradeBadge { top: auto; bottom: 14px; }
#gauge::before { content: ''; position: absolute; left: 50%; top: -12px; width: 3px; height: 12px; margin-left: -1px; background: var(--p-line); }

/* 2) 대기 중 탐지기 안내 */
#slot::after { content: '채굴을 누르면\A곡괭이가 나와요'; white-space: pre; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center;
  font-family: 'Galmuri11', 'Noto Sans KR', sans-serif; font-weight: 700; font-size: 16px; line-height: 1.5; color: var(--p-muted); pointer-events: none; z-index: 3;
  background: url('../assets/items/pick3.png') 18% 50% / 44px no-repeat, url('../assets/items/tnt.png') 82% 50% / 40px no-repeat; transition: opacity .2s; }
#slot::after { background-blend-mode: normal; }
#app.playing #slot::after { opacity: 0; }
.reel::before, .reel::after { display: none; }   /* 2026-11-19 릴 위아래 갈색 그늘 뺌 — 릴을 치울 때 칸 모양이 바뀌어 끊겨 보이던 것 (칸 그림자가 이미 있음) */
#slot::after { padding-top: 46px; box-sizing: border-box; background: url('../assets/items/pick3.png') calc(50% - 26px) 26% / 38px no-repeat, url('../assets/items/tnt.png') calc(50% + 26px) 26% / 34px no-repeat; }

/* =========================================================
   휴대폰 점검 3차 (2026-11-14)
   ========================================================= */
/* 1) 배경: 어두운 막을 옅게 → 갱도 기둥·철길이 은은하게 보이게 */
#bg { background: linear-gradient(rgba(20,22,35,.42), rgba(20,22,35,.66)), url('../assets/v2/bg_dark.jpg') center / cover no-repeat; }
/* 2) 게이지 아래 등급 배지 없앰 → 게이지를 아래 끝까지 */
#gradeBadge { display: none !important; }
#gauge { bottom: 6px; }
/* 3) 작은 '?' 버튼 없앰 (하는 법은 설정 안에) · 선물 상자 키움 */
.hd-side #btnHelp { display: none; }
.hd-side { justify-content: center; width: 46px; }
.hd-gift img { width: 44px; height: 44px; }
#giftTime { font-size: 11px; }
/* 4) 대기 중: 관 바닥에 불씨가 일렁이고 랜턴이 살짝 깜빡임 */
#gaugeTrack::before { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 18px; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse at 50% 100%, rgba(255,173,59,.85), rgba(217,102,28,.35) 55%, transparent 75%); animation: ember 1.6s ease-in-out infinite; }
#app.playing #gaugeTrack::before { animation: none; opacity: 0; }
@keyframes ember { 0%, 100% { opacity: .45; transform: scaleY(.8); transform-origin: bottom; } 50% { opacity: 1; transform: scaleY(1.15); transform-origin: bottom; } }
#app:not(.playing) #leftcol .lantern { animation: lanFlicker 2.4s ease-in-out infinite; }
@keyframes lanFlicker { 0%, 100% { opacity: 1; } 45% { opacity: .82; } 55% { opacity: .95; } 70% { opacity: .86; } }
@media (prefers-reduced-motion: reduce) { #gaugeTrack::before, #app:not(.playing) #leftcol .lantern { animation: none; } }

/* =========================================================
   탐지기·갱도 다듬기 (2026-11-14)
   1) 탐지기 빈칸: 까만 구멍 → 한 톤 밝은 '홈(소켓)'
   2) 탐지기 ↔ 갱도 세로 레일 5줄 + 채굴 중 지금 줄 밝히기
   3) 테두리 이름표 '탐지기' · '갱도'
   ========================================================= */
#middle { margin-top: 14px; }
/* 1) 소켓 칸 */
#slot::before { background: var(--p-surface); }
.slot-cell::before, :root[data-ui="pixel"] .slot-cell::before { inset: 4px; border-radius: 0; background: #2a1d13;
  box-shadow: inset 3px 3px 0 rgba(0,0,0,.45), inset -2px -2px 0 rgba(255,255,255,.06); }
/* 2) 레일 */
/* 3) 이름표 */

/* =========================================================
   되돌림 + 다듬기 (2026-11-14)
   - 이름표·레일·줄 밝히기 삭제 (render.js 에서도 제거)
   - 배경 갱도 더 밝게
   - 탐지기 칸·블록 칸 나뉜 선이 잘 보이게
   ========================================================= */
#middle { margin-top: 8px; }
/* 배경: 어두운 막을 더 옅게 */
#bg { background: linear-gradient(rgba(20,22,35,.16), rgba(20,22,35,.40)), url('../assets/v2/bg_dark.jpg') center / cover no-repeat; }
/* 탐지기: 칸마다 밝은 테두리선 */
#slot::before { background: #4a3322; }
.slot-cell::before, :root[data-ui="pixel"] .slot-cell::before { inset: 2px; background: #22170f;
  box-shadow: inset 0 0 0 2px #555b7d, inset 4px 4px 0 rgba(0,0,0,.35); }
/* 블록판: 칸 사이 틈이 밝은 선으로 보이게 */
#board::before { background: #4a3322; }
.hole::before { inset: 2px; border-radius: 0; background: #11131e; box-shadow: inset 0 0 0 2px #555b7d, inset 0 4px 8px rgba(0,0,0,.6); }
.block { padding: 2px; }

/* =========================================================
   탐지기 · 갱도 틀을 재질로 구분 (2026-11-14)
   - 칸 구분이 흐렸던 이유: 선과 칸의 밝기가 비슷 + 틈이 얇음 + 두 틀이 같은 색
   - 탐지기 = 강철 탐지 기계 (리벳 · 청록 유리 화면 칸)
   - 갱도   = 나무 틀 (칸 사이 새까만 두꺼운 틈)
   ========================================================= */
/* 탐지기 (2026-11-19 사용자 결정 슬롯칸 목업 '1 · 나무 받침', https://claude.ai/artifact/BrDC6FfXkUZcvXFDrvDho6):
   얇은 나무 틀(6px) · 칸 사이 나무 줄 6px · 이음새마다 무쇠 못(.slot-studs) · 밝은 나무판 칸 + 가장자리 진한 그림자 → 아이템이 가운데에 떠 보임 */
#slot::before { inset: -6px; border: 3px solid #08090f; border-image: none; background: linear-gradient(#6b4426, #553419);
  box-shadow: inset 0 0 0 2px #8a5a32, 3px 3px 0 rgba(0,0,0,.5); }
.slot-cell::before, :root[data-ui="pixel"] .slot-cell::before { inset: 3px; border-radius: 2px;
  /* 가장자리 그림자를 box-shadow(큰 흐림) 대신 배경 그라데이션으로 — 일부 휴대폰에서 슬롯이 돈 뒤 큰 inset 그림자가 안 그려지던 것 (2026-11-19) */
  border: 1px solid #3e2614; box-shadow: none;
  background:
    linear-gradient(90deg, rgba(110,68,32,.62), rgba(110,68,32,0) 26%, rgba(110,68,32,0) 74%, rgba(110,68,32,.62)),
    linear-gradient(rgba(110,68,32,.62), rgba(110,68,32,0) 26%, rgba(110,68,32,0) 74%, rgba(110,68,32,.62)),
    linear-gradient(#f0d9ac, #e2c08a); }
.slot-studs { position: absolute; left: -6px; top: -6px; width: calc(100% + 12px); height: calc(100% + 12px); pointer-events: none; z-index: 3;
  background: radial-gradient(circle, #9aa0aa 0 2.6px, #2a2a2e 3.2px 4.4px, transparent 4.9px) calc(6px - var(--cell) / 2) calc(6px - var(--cell) / 2) / var(--cell) var(--cell); }
#slot::after { color: #4a2e18; text-shadow: 0 1px 0 rgba(255,240,210,.6); }

/* 갱도: 나무 틀 + 칸 사이 새까만 두꺼운 틈 — 2026-11-19 슬롯칸처럼 얇게 (바깥 10px → 6px) */
#board::before { inset: -6px; border: 3px solid #08090f; border-image: none;
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,.18) 0 2px, transparent 2px 24px),
    linear-gradient(#7a4f2c, #5a3820);
  box-shadow: inset 2px 2px 0 rgba(255,214,150,.25), inset -2px -2px 0 rgba(0,0,0,.4), 3px 3px 0 rgba(0,0,0,.5); }
#board { background: #07080d; }
.hole::before { inset: 0; border-radius: 0; background: #07080d; box-shadow: none; }
.block { padding: 3px; }
/* 2026-11-19: 블록 그림의 둥근 모서리를 살짝 잘라 네모에 가깝게 → 검은 칸과 겹치던 두 겹 테두리 없앰 (틈은 클로브 정도로 그대로) */
.block .blockimg { transform: scale(1.08); clip-path: inset(3.7% round 4px); filter: none; }

/* =========================================================
   왼쪽 게이지 = 갱도 나무 기둥 + 고리에 건 랜턴 (2026-11-14)
   - 등급 글자: 등급 색 칩 (못 간 등급도 색이 보이게 반투명, 도달하면 꽉 차고 빛남)
   - 점수 숫자: 밝고 굵게
   ========================================================= */
#gauge { top: 64px; bottom: 6px; border: 3px solid #08090f !important;
  background: repeating-linear-gradient(90deg, rgba(0,0,0,.16) 0 2px, transparent 2px 22px), linear-gradient(90deg, #6a4426, #7d5230 45%, #5a3820);
  box-shadow: inset 2px 2px 0 rgba(255,214,150,.22), inset -2px -2px 0 rgba(0,0,0,.4), 3px 3px 0 rgba(0,0,0,.5) !important; }
/* 랜턴: 기둥 꼭대기 고리에 걸림 */
#leftcol .lantern { top: 2px; width: 60px; }
#gauge::before { content: ''; position: absolute; left: 50%; top: -10px; width: 14px; height: 10px; margin-left: -7px; background: none;
  border: 3px solid #2a2016; border-bottom: 0; border-radius: 8px 8px 0 0; }
/* 관: 두껍게, 놋쇠 테 */
#gaugeTrack, :root[data-ui="pixel"] #gaugeTrack, :root[data-theme="dark"] #gaugeTrack { left: 6px; top: 8px; bottom: 8px; width: 24px; border: 3px solid #08090f; background: #0d0e16;
  box-shadow: 0 0 0 2px #b8893a; }
#gaugeLabels { left: 38px; right: 3px; top: 8px; bottom: 8px; }
/* 등급 칩 */
.glabel .gname, :root[data-ui="pixel"] .glabel .gname { background: var(--gc) !important; color: #fff !important; opacity: .42; min-width: 24px; height: 22px; font-size: 16px;
  border: 2px solid #08090f !important; text-shadow: 1px 1px 0 rgba(0,0,0,.5); }
:root .glabel.got .gname, :root[data-ui="pixel"] .glabel.got .gname { opacity: 1; }
:root .glabel.on .gname, :root[data-ui="pixel"] .glabel.on .gname { opacity: 1; box-shadow: 0 0 0 2px #fff3b0, 0 0 14px var(--gc); }
/* 점수 숫자 */
.glabel small, :root[data-ui="pixel"] .glabel small { opacity: 1 !important; color: #f3ead8; font-weight: 700; font-size: 11px; text-shadow: 1px 1px 0 #08090f; margin-top: 2px; }
.glabel:not(.got) small { color: #e2d3bb; }
.glabel .gname, :root[data-ui="pixel"] .glabel .gname { min-width: 26px; height: 24px; font-size: 18px; } #leftcol .lantern { width: 66px; top: 0; }

/* 게이지 등급 구분선·크기·정렬 (2026-11-14) */
.gline { position: absolute; left: 4px; right: 3px; height: 2px; margin-bottom: -1px; z-index: 1; pointer-events: none;
  background: rgba(255,226,170,.55); box-shadow: 0 1px 0 rgba(0,0,0,.55); }
#gaugeTrack { z-index: 2; }
#gaugeTrack::after { background: repeating-linear-gradient(to top, transparent 0 calc(100% / 9 - 2px), rgba(255,226,170,.6) calc(100% / 9 - 2px) calc(100% / 9)); }
#gaugeLabels { z-index: 3; }
.glabel { left: 0; right: 0; width: auto; flex-direction: column; flex-wrap: nowrap; align-items: center; gap: 1px; }
.glabel .gname, :root[data-ui="pixel"] .glabel .gname { min-width: 30px; height: 26px; font-size: 20px; padding: 0 3px; }
:root .glabel.on .gname, :root[data-ui="pixel"] .glabel.on .gname { transform: scale(1.15); transform-origin: center; }
.glabel small, :root[data-ui="pixel"] .glabel small { flex-basis: auto; padding: 1px 3px 0; margin: 0; font-size: 13px; line-height: 1.1; text-align: center; background: rgba(8,9,15,.55); }
.glabel small.long, :root[data-ui="pixel"] .glabel small.long { font-size: 10px; letter-spacing: -0.3px; }
/* 꼬리표는 경계선 사이 칸 가운데, 칸 바탕 번갈아 */
.gband { position: absolute; left: 34px; right: 3px; z-index: 0; pointer-events: none; background: rgba(0,0,0,.18); }
.gline { left: 34px; height: 3px; background: rgba(255,226,170,.75); box-shadow: 0 1px 0 rgba(0,0,0,.6), 0 -1px 0 rgba(0,0,0,.35); }
#gaugeLabels { top: 11px; bottom: 11px; }
/* 게이지 칸 맞춤: 관 눈금 = 이름표 경계선 (같은 선이 관 위를 지나감) */
#gaugeTrack::after { display: none; }
.gline { left: 4px; z-index: 3; }
#gaugeLabels { z-index: 4; }
/* 등급 칸 구분선·바탕 없앰 (사용자: 등급에는 구분선 필요 없음). 관 안 눈금만 짧게 남김 */
.gband { display: none; }
.gline { left: 9px; right: auto; width: 18px; height: 2px; background: rgba(255,226,170,.55); box-shadow: none; }

/* =========================================================
   게이지 = 레트로 LED 탑 (2026-11-14, 시안 ④ + 점수 가로 표기)
   ========================================================= */
#gaugeTrack, .gline, .gband, #gaugeFlash { display: none !important; }
#gauge { background: #08090f !important; box-shadow: 3px 3px 0 rgba(0,0,0,.5) !important; }
#gauge::before { border-color: #2a2016; }
#gaugeLabels { position: absolute; inset: 4px !important; left: 4px !important; right: 4px !important; top: 4px !important; bottom: 4px !important;
  display: flex; flex-direction: column-reverse; gap: 4px; z-index: 1; }
.gled { position: relative; flex: 1; min-height: 0; overflow: hidden; background: color-mix(in srgb, var(--gc) 20%, #0d0e16); border: 2px solid #20222e;
  display: flex; flex-direction: column; justify-content: center; padding: 0 6px; transition: transform .2s; }
.gled .gfill { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: var(--gc);
  box-shadow: inset 0 3px 0 rgba(255,255,255,.35), inset 0 -3px 0 rgba(0,0,0,.25); transition: height .12s ease-out; }
.gled .gname { position: relative; font: 700 26px/1 'Galmuri11', 'Black Han Sans', sans-serif; color: var(--gc); text-shadow: 2px 2px 0 rgba(0,0,0,.5); }
.gled small { position: relative; margin-top: 3px; font: 700 12px/1 'Galmuri11', 'Noto Sans KR', sans-serif; color: color-mix(in srgb, var(--gc) 60%, #f3ead8); white-space: nowrap; text-shadow: 1px 1px 0 rgba(0,0,0,.6); }
.gled small.long { font-size: 10px; letter-spacing: -0.3px; }
.gled.lit .gname, .gled.lit small { color: #fff; }
.gled.on { border-color: #fff3b0; box-shadow: 0 0 12px var(--gc); animation: ledBlink .6s steps(2) infinite; }
@keyframes ledBlink { 50% { border-color: var(--gc); } }
.gled.pop { animation: ledPop .45s ease-out, ledBlink .6s steps(2) .45s infinite; }
@keyframes ledPop { 0% { transform: scale(1.18); filter: brightness(1.8); } 100% { transform: none; filter: none; } }
@media (prefers-reduced-motion: reduce) { .gled.on, .gled.pop { animation: none; } }

/* =========================================================
   아깝다! 연출 (다음 등급까지 칸의 30% 이내일 때만): LED 블록 두 개 확대 + 모자란 점수
   ========================================================= */
.nm { gap: 18px; }
@keyframes nmZoom { from { transform: scale(.4); opacity: 0; } }
   /* 앱 안 브라우저 함정: forwards 금지, 끝 상태는 style 로 */
@keyframes nmShortIn { from { opacity: 0; transform: scale(2); } }
@keyframes nmShake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@keyframes nmNext { 50% { border-color: #fff3b0; } }
#overlay:has(.fin) { background: rgba(8,9,15,.9); }

/* =========================================================
   등급 엠블럼 + 등급별 연출 세기 + 잔고로 날아가는 코인 (2026-11-14)
   주의: 앱 안 브라우저 함정 → animation fill 'forwards' 쓰지 않음 (끝 상태는 style)
   ========================================================= */
.f2-emb { position: relative; width: 190px; height: 190px; display: flex; align-items: center; justify-content: center; animation: embDrop .55s cubic-bezier(.2,1.5,.4,1); }
.f2-emb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 6px 0 rgba(0,0,0,.35)) drop-shadow(0 0 22px var(--gc)); }
.f2-emb b { position: relative; font: 700 60px/1 'Galmuri11', 'Black Han Sans', sans-serif; color: #fff; text-shadow: 3px 3px 0 #08090f, -2px -2px 0 #08090f, 2px -2px 0 #08090f, -2px 2px 0 #08090f; }
@keyframes embDrop { 0% { transform: translateY(-160px) scale(.6); opacity: 0; } 70% { transform: translateY(8px) scale(1.06); opacity: 1; } 100% { transform: none; } }
.ft0 .f2-emb { width: 150px; height: 150px; animation-duration: .4s; }
.ft0 .f2-emb b { font-size: 48px; }
.ft3 .f2-emb { width: 230px; height: 230px; animation: embSlam .7s cubic-bezier(.2,1.6,.3,1); }
.ft3 .f2-emb b { font-size: 76px; }
@keyframes embSlam { 0% { transform: scale(3); opacity: 0; } 60% { transform: scale(.92); opacity: 1; } 100% { transform: none; } }
.f2-banner { position: relative; margin-top: -18px; padding: 4px 26px; font: 700 28px/1.2 'Galmuri11', 'Black Han Sans', sans-serif; letter-spacing: 3px; color: #fff;
  background: var(--gc); border: 3px solid #08090f; box-shadow: 4px 4px 0 rgba(0,0,0,.5); animation: bannerIn .5s .25s cubic-bezier(.2,1.5,.4,1) backwards; }
@keyframes bannerIn { from { transform: scaleX(0); } }
.ft3 .f2-banner { background: linear-gradient(90deg, #9b4dea, #ffad3b, #1f9fd6, #9b4dea); background-size: 300% 100%; animation: bannerIn .5s .25s cubic-bezier(.2,1.5,.4,1) backwards, bannerShine 1.6s linear infinite; }
@keyframes bannerShine { to { background-position: 300% 0; } }
.fin2.shake { animation: finShake .35s ease-in-out 2; }
@keyframes finShake { 25% { transform: translateX(-7px); } 75% { transform: translateX(7px); } }
/* 파편 */
@keyframes pFly { 0% { transform: translate(-50%,-50%) scale(1); opacity: 1; } 100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy) + 120px)) scale(.6) rotate(220deg); opacity: 0; } }
/* 결과 창 엠블럼 */
.r-emb { position: relative; width: 84px; height: 84px; display: flex; align-items: center; justify-content: center; margin: -4px 0 4px; }
.r-emb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 3px 0 rgba(0,0,0,.4)); }
.r-emb b { position: relative; font: 700 30px/1 'Galmuri11', 'Black Han Sans', sans-serif; color: #fff; text-shadow: 2px 2px 0 #08090f, -1px -1px 0 #08090f, 1px -1px 0 #08090f, -1px 1px 0 #08090f; }
/* 잔고로 날아가는 코인 */
.fly-coin { position: fixed; z-index: 300; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; pointer-events: none; opacity: 0;
  background: radial-gradient(circle at 35% 30%, #fff2a6, #ffad3b 55%, #b8660a); border: 2px solid #6b3a06; animation: coinFly .65s cubic-bezier(.5,0,.7,1); }
@keyframes coinFly { 0% { opacity: 1; transform: translate(0,0) scale(1.2); } 100% { opacity: 1; left: var(--tx); top: var(--ty); transform: scale(.6); } }
.hd-money.bump #pointsText { animation: ptBump .35s ease-out; }
@keyframes ptBump { 50% { transform: scale(1.12); color: #fff3b0; } }
@media (prefers-reduced-motion: reduce) { .f2-p, .fly-coin, .fin2.shake { animation: none; } }

/* =========================================================
   게이지 높이 맞춤 · 칸 간격 · 등불 아래로 (2026-11-14)
   - 탐지기 틀과 갱도 틀 사이 10px 틈: --gap 14 → 30 (틀 inset 10px × 2 + 10)
     ※ js/render.js 의 GAP 도 30 (둘이 항상 같아야 함)
   - 게이지 = 탐지기 틀 위쪽 끝 ~ 갱도 틀 아래쪽 끝 (틀 inset 10px 포함)
   - 게이지와 오른쪽 틀 사이 10px 틈 (#middle gap 20 = 틀 10 + 틈 10), 오른쪽 틀 10px 만큼 보정해 가운데 정렬
   - 등불은 왼쪽 아래 (상자 줄 옆)로. 나중에 바꿀 수 있게 img.lantern 하나 그대로
   - 늘어난 세로 16px: 상단바 -2 · 상자 줄 -4 · 판 -4 · 판 위 여백 -2 · 아래 탭 -4 · 남는 여백 2 (중간 위 여백 +4 는 틀이 상단바에 닿지 않게)
   ========================================================= */
:root { --gap: 30px; }
#topbar { height: 68px; }
#middle { margin-top: 12px; gap: 20px; }
#stagewrap { margin-right: 10px; }
#gauge { top: -10px; bottom: auto; height: calc(var(--cell) * 9 + var(--gap) + 20px); }
#gauge::before { display: none; }
#leftcol .lantern { top: auto; bottom: 0; width: 50px; }
#chests { height: 52px; }
.chest { height: 52px; }
#panel { margin-top: 8px; height: 74px; }
#tabbar { height: 60px; }

/* =========================================================
   왼쪽 아래 '지금 등급 엠블럼' (등불 대신, 2026-11-14)
   none = 회색 그림자 '?' / last = 지난 판 등급(흐리게 + '지난 판') / 채굴 중 = 지금 등급
   ========================================================= */
#gradeEmb { position: absolute; left: 50%; bottom: -2px; width: 58px; height: 58px; margin-left: -29px; display: flex; align-items: center; justify-content: center; z-index: 2; }
#gradeEmb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 2px 0 rgba(0,0,0,.45)); transition: filter .2s, opacity .2s; }
#gradeEmb b { position: relative; font: 700 22px/1 'Galmuri11', 'Black Han Sans', sans-serif; color: #fff; text-shadow: 2px 2px 0 #08090f, -1px -1px 0 #08090f, 1px -1px 0 #08090f, -1px 1px 0 #08090f; }
#gradeEmb small { display: none; position: absolute; bottom: -3px; left: 50%; transform: translateX(-50%); white-space: nowrap; padding: 0 4px;
  font: 700 9px/1.4 'Galmuri11', 'Noto Sans KR', sans-serif; color: var(--p-text); background: var(--p-line); }
#gradeEmb.none img { filter: grayscale(1) brightness(.45); opacity: .7; }
#gradeEmb.none b { color: var(--p-muted); }
#gradeEmb.last img { opacity: .55; filter: saturate(.6); }
#gradeEmb.last b { opacity: .8; }
#gradeEmb.last small { display: block; }
#gradeEmb.pop { animation: embNowPop .45s cubic-bezier(.2,1.6,.4,1); }
@keyframes embNowPop { 0% { transform: scale(1.7); filter: brightness(1.8); } 100% { transform: none; } }

/* =========================================================
   도감·포인트 경제 (2026-11-15): 칭호 배지 · 룰렛 버튼 · 무료 판 · 광부 등급 · 룰렛 창 · 도감 보상
   ※ 앱 안 브라우저(카톡·토스) 때문에 animation 에 forwards 쓰지 않음 (끝 상태는 style 로)
   ========================================================= */
.title-chip { display: inline-block; flex-shrink: 0; background: var(--p-accent); color: var(--p-on-accent); border: 2px solid var(--p-line);
  font: 700 10px/1.3 'Galmuri11', 'Noto Sans KR', sans-serif; padding: 1px 4px; white-space: nowrap; }
.rdot { position: absolute; top: -5px; right: -5px; width: 10px; height: 10px; background: #e3263f; border: 2px solid var(--p-line); z-index: 3; }
.rdot.num { width: auto; min-width: 17px; height: 17px; padding: 0 3px; display: grid; place-items: center; font: 700 10px/1 'Galmuri11', sans-serif; color: #fff; }
.rdot[hidden] { display: none; }
/* 상단 도감 칸: [칭호][광산][막대][n/50] */
#hdDex { position: relative; gap: 4px; padding: 0 6px; }
#hdDex small#dexMine { font-size: 10px; }
#hdDex .hd-bar { min-width: 14px; }
/* 오른쪽 열: 선물 상자 + 룰렛 버튼 */
.hd-side { justify-content: space-between; gap: 2px; width: 50px; }
.hd-gift img { width: 30px; height: 30px; }
#giftTime { margin-top: -6px; font-size: 10px; }
.hd-roul { position: relative; width: 48px; height: 28px; display: flex; align-items: center; justify-content: center; gap: 2px; padding: 0 2px;
  background: var(--p-raise); color: var(--p-muted); border: 2px solid var(--p-line); font-family: inherit; }
.hd-roul .roul-ico, .hd-roul .roul-ico svg { width: 16px; height: 16px; display: block; }
.hd-roul b { font: 700 10px/1 'Galmuri11', sans-serif; }
.hd-roul.ready { background: linear-gradient(#ffcf5a, #ff8a1f); color: #2a1600; box-shadow: inset 0 0 0 2px rgba(255,255,255,.25); animation: roulPulse 1.2s ease-in-out infinite; }
.hd-roul.ready::after { content: ''; position: absolute; inset: -5px; border: 2px solid var(--p-accent); opacity: 0; pointer-events: none; animation: roulRing 1.2s ease-out infinite; }
@keyframes roulPulse { 50% { transform: scale(1.08); } }
@keyframes roulRing { 0% { opacity: .9; transform: scale(.85); } 100% { opacity: 0; transform: scale(1.35); } }
.roul-tag { position: absolute; bottom: -9px; left: 50%; transform: translateX(-50%); background: var(--p-line); color: var(--p-accent); font: 700 8px/1.3 'Galmuri11', sans-serif; padding: 0 3px; white-space: nowrap; }
.roul-tag.freeplay { background: var(--p-accent); color: var(--p-on-accent); }
.roul-tag[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .hd-roul.ready, .hd-roul.ready::after { animation: none; } }
/* 무료 판: 판 칸 금색 테두리 */
#betBox.free { background: #3a2a0e; box-shadow: inset 0 0 0 3px var(--p-accent), 3px 3px 0 rgba(0,0,0,.5) !important; }
#betBox.free b { color: var(--p-accent); }
#betBox.free small { color: var(--p-accent); font-size: 11px; white-space: nowrap; }

/* 선물·출석·지원금: 기본 × 칭호 배율 = 합계 */
.calc { text-align: center; font: 700 14px/1.8 'Galmuri11', 'Noto Sans KR', sans-serif; margin: 8px 0; color: var(--p-text); }
.calc .x { color: var(--p-accent); }
.calc big { display: block; font-size: 24px; color: var(--p-accent); }
/* 광부 등급 창 */
.rankhead { display: flex; align-items: center; gap: 10px; padding: 8px; background: var(--p-well); border: 3px solid var(--p-line); text-align: left; }
.rk-badge { width: 46px; height: 46px; flex: 0 0 46px; display: grid; place-items: center; background: var(--p-accent); color: var(--p-on-accent); border: 3px solid var(--p-line); }
.rk-badge svg { width: 30px; height: 30px; }
.rk { flex: 1; min-width: 0; }
.rk b { font: 700 16px/1.2 'Galmuri11', sans-serif; color: var(--p-accent); }
.rk small b { font-size: 11px; color: var(--p-text); }
.modal .bar, .dexstrip .bar, .setrow .bar { display: block; height: 9px; background: var(--p-well); border: 1px solid #4a3322; margin: 5px 0 3px; }
.modal .bar i, .dexstrip .bar i, .setrow .bar i { display: block; height: 100%; background: var(--p-accent); }
.rankhead .bar { background: #08090f; }
.ladder { list-style: none; margin: 8px 0 0; padding: 0; font: 12px/1.4 'Galmuri11', sans-serif; text-align: left; }
.ladder li { display: flex; justify-content: space-between; padding: 5px 8px; border-bottom: 1px dashed #4a3322; color: var(--p-muted); }
.ladder li.done { color: var(--p-text); }
.ladder li.now { background: #3a2a0e; color: var(--p-accent); font-weight: 700; box-shadow: inset 3px 0 0 var(--p-accent); }
.ladder em { font-style: normal; font-variant-numeric: tabular-nums; }
/* 승급 축하 */
.modal.promo { overflow: hidden; }
.up { position: relative; text-align: center; padding: 4px 0; }
.up .rays { position: absolute; inset: -80%; background: repeating-conic-gradient(rgba(255,176,59,.2) 0 10deg, transparent 10deg 20deg); animation: upSpin 8s linear infinite; pointer-events: none; }
@keyframes upSpin { to { transform: rotate(1turn); } }
.up .inner { position: relative; }
.up .arrow { font-size: 13px; color: var(--p-muted); margin: 0; }
.big-title { font: 700 30px/1.2 'Galmuri11', 'Black Han Sans', sans-serif; color: var(--p-accent); text-shadow: 3px 3px 0 #000; margin: 4px 0; }
@media (prefers-reduced-motion: reduce) { .up .rays { animation: none; } }

/* 룰렛 창 */
.modal.roul .mbody { text-align: center; }
.wheelwrap { position: relative; width: 236px; max-width: 100%; aspect-ratio: 1; margin: 10px auto 6px; }
.wheel { position: absolute; inset: 0; border-radius: 50%; border: 4px solid #000; box-shadow: 0 0 0 3px var(--p-accent), 0 0 18px rgba(255,176,59,.55); transition: transform 3.2s cubic-bezier(.15,.85,.2,1); }
.wheel .lab { position: absolute; left: 50%; top: 50%; font: 700 10px/1 'Galmuri11', sans-serif; color: #1a1020; white-space: nowrap; transform-origin: 0 0; }
.wheel .lab.off { color: #9a94ad; }
.wheel .lab img { display: block; width: 20px; height: 20px; image-rendering: pixelated; filter: drop-shadow(1px 1px 0 rgba(0,0,0,.55)); }
.wheel .lab.off img { opacity: .35; filter: grayscale(1); }
.wheelwrap .pin { position: absolute; left: 50%; top: -10px; transform: translateX(-50%); width: 0; height: 0; border: 10px solid transparent; border-top: 16px solid #e3263f; filter: drop-shadow(0 2px 0 #000); z-index: 2; }
.wheelwrap .hub { position: absolute; inset: 38%; border-radius: 50%; background: var(--p-surface); border: 3px solid #000; display: grid; place-items: center; font: 700 11px/1.3 'Galmuri11', sans-serif; color: var(--p-accent); z-index: 1; text-align: center; }
.roul-res { margin: 6px 0; padding: 8px; background: var(--p-well); border: 3px solid var(--p-line); font-size: 12px; text-align: center; }
.roul-res b { color: var(--p-accent); font-size: 17px; }
.roul-res.sky { background: #3a2a5a; animation: skyFlash .5s ease-in-out 4; }
@keyframes skyFlash { 50% { box-shadow: inset 0 0 0 3px #fff, 0 0 22px #b48cff; } }
.modal.roul { position: relative; }
.roul-flash { position: absolute; inset: 0; background: #fff; pointer-events: none; opacity: 0; animation: roulFlash 1.6s ease-out; }
@keyframes roulFlash { 0% { opacity: .95; } 15% { opacity: 0; } 30% { opacity: .7; } 100% { opacity: 0; } }
.modal.roul.skyflash { box-shadow: 0 0 0 3px #fff, 0 0 40px #b48cff; }
.roul-pending { margin: 6px 0; padding: 8px; background: #3a2a0e; border: 3px solid var(--p-line); box-shadow: inset 0 0 0 2px var(--p-accent); font-size: 12px; }
.roul-pending b { color: var(--p-accent); }
/* 광고 흉내 */
.adsim { position: fixed; inset: 0; z-index: 400; background: rgba(0,0,0,.88); display: flex; align-items: center; justify-content: center; }
.adsim-box { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 24px 28px; background: var(--p-surface); border: 3px solid var(--p-accent); color: var(--p-text); font-family: 'Galmuri11', sans-serif; }
.adsim-n { font-size: 40px; font-weight: 700; color: var(--p-accent); }
.adsim-box small { color: var(--p-muted); font-size: 11px; }

/* 도감 화면 */
.dexcard.shardable .card-back { box-shadow: 0 0 0 2px var(--p-info), 0 0 8px rgba(108,198,217,.6); }
.dexcard.shardable { cursor: pointer; }
.dexcard.shardable small { color: var(--p-info); }
.dexcard.byshard small { color: var(--p-info); }

.modal [hidden], .hd-side [hidden] { display: none !important; }
.hd-roul { gap: 1px; padding: 0 1px; }
.hd-roul .roul-ico, .hd-roul .roul-ico svg { width: 14px; height: 14px; }
.hd-roul b { font-size: 9px; letter-spacing: -.5px; }
.hd-roul .rdot.num { top: -9px; right: -8px; min-width: 15px; height: 15px; font-size: 9px; }

/* =========================================================
   검토 반영 (2026-11-15): 페이지 안 확인 창 · 시간 선물 받기 · 룰렛 버튼 크게
   ========================================================= */
/* 확인 창 (window.confirm 대신, 열린 창 위에 겹침) */
.cfm { position: fixed; inset: 0; z-index: 350; background: rgba(8,9,15,.72); display: flex; align-items: center; justify-content: center; padding: 16px; }
.cfm-box { width: min(340px, 100%); padding: 16px; background: var(--p-surface); color: var(--p-text); border: 3px solid var(--p-accent); box-shadow: 4px 4px 0 rgba(0,0,0,.55); text-align: center; font: 14px/1.6 'Galmuri11', 'Noto Sans KR', sans-serif; }
.cfm-box p { margin: 0 0 12px; }
.cfm-box small { color: var(--p-muted); font-size: 11px; }
.cfm-box b { color: var(--p-accent); }
.cfm-box .rbtns { display: flex; gap: 8px; }
.cfm-box .rbtns button { flex: 1; padding: 10px; font: 700 14px/1 'Galmuri11', sans-serif; border: 3px solid var(--p-line); background: var(--p-raise); color: var(--p-text); }
.cfm-box .rbtns button.red { background: var(--p-accent); color: var(--p-on-accent); }
.modal b.gold { color: var(--p-accent); }
/* 시간 선물: 받을 수 있으면 상자가 통통 + '받기' */
.hd-gift.ready img { animation: giftBob 1s ease-in-out infinite; filter: drop-shadow(0 0 6px rgba(255,190,80,.95)); }
.hd-gift.ready #giftTime { background: var(--p-accent); color: var(--p-on-accent); }
@keyframes giftBob { 50% { transform: translateY(-3px) rotate(-6deg); } }
@media (prefers-reduced-motion: reduce) { .hd-gift.ready img { animation: none; } }

/* 룰렛 버튼 크게: 오른쪽 열을 넓히고 선물(위)·룰렛(아래) 반반 */
#topbar { overflow: visible; }
.hd-side { width: 62px; justify-content: space-between; gap: 3px; }
.hd-gift { flex-direction: row; gap: 2px; align-items: center; height: 26px; }
.hd-gift img { width: 26px; height: 26px; }
#giftTime { margin-top: 0; font-size: 10px; padding: 1px 3px; }
.hd-roul { width: 62px; height: 38px; gap: 3px; padding: 0 3px; border-width: 3px; flex-direction: row; }
.hd-roul .roul-ico, .hd-roul .roul-ico svg { width: 22px; height: 22px; }
.hd-roul b { font-size: 12px; letter-spacing: 0; }
.hd-roul.ready { background: linear-gradient(#ffe07a, #ff9a2a 60%, #e86a12); color: #2a1600; border-color: #3a1d06;
  box-shadow: 0 0 0 2px #fff3b0, 0 0 14px 3px rgba(255,190,70,.95); animation: roulPulse2 1.1s ease-in-out infinite; }
.hd-roul.ready::after { inset: -9px; border: 3px solid #ffd36a; animation: roulRing 1.1s ease-out infinite; }
.hd-roul.ready::before { content: '✦'; position: absolute; left: -9px; top: -8px; color: #fff6c8; font-size: 13px; text-shadow: 0 0 6px #ffcf5a; animation: roulTw 1.6s ease-in-out infinite; pointer-events: none; }
@keyframes roulPulse2 { 50% { transform: scale(1.1); box-shadow: 0 0 0 2px #fff3b0, 0 0 22px 7px rgba(255,200,80,1); } }
@keyframes roulTw { 0%, 100% { opacity: 0; transform: scale(.5); } 50% { opacity: 1; transform: scale(1.3); } }
.hd-roul .rdot.num { top: -10px; right: -9px; min-width: 18px; height: 18px; font-size: 11px; }
.roul-tag { bottom: -10px; font-size: 9px; }
@media (prefers-reduced-motion: reduce) { .hd-roul.ready::before { animation: none; opacity: 1; } }

/* 제목 아래 부제 (럭키 픽, 2026-11-16) */
#title .title-sub { position: relative; z-index: 2; margin-top: -4px; font-size: 15px; letter-spacing: .12em; color: #f4e3c0; opacity: .85; text-align: center; }

/* =========================================================
   등급 명판 (2026-11-18): 막대가 G부터 차오르고 눈금마다 불이 들어옴 → 엠블럼 등장
   주의: animation fill 'forwards' 안 씀 (끝 상태는 style·class 로)
   ========================================================= */
.g2 { justify-content: center; gap: 0; }
.g2-top { position: relative; min-height: 236px; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.g2-top .f2-rays { top: -40px; left: 50%; transform: translateX(-50%); }
.g2-top .f2-emb { margin-bottom: 4px; z-index: 1; }
.g2-top .f2-banner { margin-top: -10px; z-index: 2; }
.g2-plaque { position: relative; width: min(330px, 88vw); margin-top: 34px; padding: 14px 16px 16px; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: linear-gradient(#2a1f17, #1a120d); border: 3px solid #5a4330; border-radius: 14px; box-shadow: inset 0 2px 0 rgba(255,255,255,.06), 0 6px 0 rgba(0,0,0,.45); }
.g2-title { font: 400 28px/1.1 'Black Han Sans', sans-serif; color: var(--p-accent); text-shadow: 3px 3px 0 rgba(0,0,0,.5); }
:root[data-ui="pixel"] .g2-title { font-family: 'Galmuri11', sans-serif; font-weight: 700; }
.g2-bar { position: relative; width: calc(100% - 16px); height: 12px; margin: 24px 8px 6px; border-radius: 6px; background: rgba(255,255,255,.08); }
.g2-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 6px; background: linear-gradient(90deg, #7a4f2c, var(--gc)); }
.g2-dot { position: absolute; left: 0; top: 50%; width: 18px; height: 18px; box-sizing: border-box; border-radius: 50%; background: #fff; border: 3px solid var(--gc); transform: translate(-50%,-50%); box-shadow: 0 0 12px var(--gc); }
.g2-tick { position: absolute; top: -21px; transform: translateX(-50%); font: 700 11px/1 'Galmuri11', 'Black Han Sans', sans-serif; color: rgba(255,255,255,.35); transition: color .15s, transform .15s; }
.g2-tick::after { content: ''; position: absolute; left: 50%; top: 15px; width: 2px; height: 16px; background: rgba(255,255,255,.22); transform: translateX(-50%); }
.g2-tick.lit { color: #fff; transform: translateX(-50%) scale(1.25); text-shadow: 0 0 8px var(--tc); }
.g2-tick.lit::after { background: var(--tc); }
.g2-tick.miss { color: #ffd76a; animation: g2Miss .45s steps(2) 2; }
@keyframes g2Miss { 50% { transform: translateX(-50%) scale(1.5); } }
.g2-next { min-height: 20px; }
.g2-miss { color: #ff6b6b; margin-right: 4px; }
.g2-top-txt { color: var(--p-accent); }
.ft0 .g2-top { min-height: 190px; }
.ft3 .g2-top { min-height: 270px; }

/* 걸기 전 확인 창: 오늘은 다시 묻지 않기 (2026-11-18) */
.cfm-skip { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; color: var(--p-muted, #cfc3b0); margin: 8px 0 2px; }
.cfm-skip input { width: 16px; height: 16px; }

/* 결과 창 진행 칸: 도감 막대 + 세트 5칸 (2026-11-18 샘플 2) */
.result .pg { margin-top: 12px; /* 2026-11-19 NEW·보유 중 작은 표 자리 */ width: 100%; display: grid; gap: 6px; background: var(--p-raise, #332d3d); padding: 8px 10px; }
.pg-bar { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; font-size: 12.5px; }
.pg-track { height: 9px; background: #1b1820; border: 1px solid var(--p-line, #4a4157); position: relative; overflow: hidden; }
.pg-fill { position: absolute; top: 0; bottom: 0; left: 0; background: #ffd75a; }
.pg-plus { position: absolute; top: 0; bottom: 0; min-width: 3px; background: #6ee7a8; }
.pg-bar b { color: #ffd75a; }
.pg-slots { display: flex; gap: 4px; justify-content: center; }
.pg-slot { width: 36px; aspect-ratio: 480 / 702; position: relative; border: 2px solid var(--p-line, #4a4157); background: #1b1820; overflow: hidden; }
.pg-slot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pg-slot.miss img { filter: brightness(0) opacity(.5); }
.pg-slot span { position: absolute; inset: 0; display: grid; place-items: center; color: var(--p-muted, #aaa1b2); font-weight: 800; }
.pg-slot.new { border-color: #6ee7a8; box-shadow: 0 0 8px #6ee7a8; }
.pg-set { font-size: 12px; text-align: center; color: var(--p-muted, #cfc3b0); }
.pg-set b { color: var(--p-text, #f2ede5); }
.pg-set b.ok { color: #6ee7a8; }

/* 잔고 칸 '출석' 꼬리표: 오늘 출석 안 받았을 때만 (2026-11-18) */
.hd-money .att-tag { position: absolute; right: -4px; top: -6px; background: #e8574a; color: #fff; font-size: 11px; font-weight: 800; line-height: 1; padding: 3px 5px; border: 2px solid #2a1418; animation: attBob 1.2s ease-in-out infinite alternate; }
@keyframes attBob { from { transform: translateY(0); } to { transform: translateY(-2px); } }
@media (prefers-reduced-motion: reduce) { .hd-money .att-tag { animation: none; } }

/* ---------- 자랑하기 (2026-11-18, js/share.js) ---------- */
.rowbtn.sharebtn { display: flex; align-items: center; justify-content: center; gap: 2px; width: 100%; margin: 2px 0 8px; padding: 9px; background: var(--p-info); color: var(--p-line); border: 3px solid var(--p-line); font: 700 14px/1 'Galmuri11', sans-serif; box-shadow: inset 0 -4px 0 rgba(0,0,0,.25); }
.rowbtn.sharebtn .mico { color: var(--p-line); width: 18px; height: 18px; margin-right: 6px; }
/* 결과 창 (2026-11-19): [자랑] 작은 칸 + [확인 · +N pt] 한 줄 */
.result { position: relative; }
.result .r-acts { display: flex; gap: 6px; width: 100%; margin-top: 4px; }
.result .r-acts .r-take { flex: 1; width: auto; margin-top: 0; }
.result .r-brag { flex: 0 0 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 6px 4px; cursor: pointer;
  background: var(--p-info); color: var(--p-line); border: 3px solid var(--p-line); box-shadow: inset 0 -4px 0 rgba(0,0,0,.25), 3px 3px 0 rgba(0,0,0,.5); font: 700 11px/1 'Galmuri11', sans-serif; }
.result .r-brag .mico { width: 18px; height: 18px; margin: 0; color: var(--p-line); }
.result .r-brag small { color: var(--p-line); font-size: 11px; font-weight: 700; }
.result .r-brag:active { transform: translateY(2px); }
/* 도감: '등급별·세트' 줄 끝 [자랑] 칸 */
.dx-sub > div.dx-brag { flex: 0 0 auto; display: flex; align-items: center; gap: 4px; padding: 6px 10px; background: var(--p-info); color: var(--p-line); }
.dx-brag .mico { width: 14px; height: 14px; margin: 0; color: var(--p-line); }
.shv { position: fixed; inset: 0; z-index: 360; background: rgba(8,9,15,.82); display: flex; align-items: center; justify-content: center; padding: 12px; }
.shv-box { width: min(380px, 100%); max-height: 100%; overflow: auto; padding: 12px; background: var(--p-surface); color: var(--p-text); border: 3px solid var(--p-accent); box-shadow: 4px 4px 0 rgba(0,0,0,.55); text-align: center; font: 13px/1.6 'Galmuri11', 'Noto Sans KR', sans-serif; }
.shv-h { font-weight: 700; font-size: 15px; color: var(--p-accent); margin-bottom: 8px; }
.shv-img { display: block; width: 100%; height: auto; max-height: 58vh; object-fit: contain; border: 3px solid var(--p-line); -webkit-touch-callout: default; user-select: auto; pointer-events: auto; }
.shv-tip { margin: 8px 0 10px; color: var(--p-muted); }
.shv-tip b { color: var(--p-text); }
.shv .rbtns { display: flex; gap: 6px; }
.shv .rbtns button { flex: 1; padding: 10px 4px; font: 700 13px/1 'Galmuri11', sans-serif; border: 3px solid var(--p-line); background: var(--p-raise); color: var(--p-text); }
.shv .rbtns button.red { background: var(--p-accent); color: var(--p-on-accent); }

/* 2026-11-18 화면 정리 샘플 1: 덜어 내기 (보고 결정 — 되돌리려면 이 묶음과 index/main/bag/menu 변경을 되돌림) */
body.no-rank #hdRank { display: none !important; }   /* 2026-11-19 랭킹 탭은 다시 보임(보유 포인트 순위만), 리그 칸만 숨김 */
#btnPrizes { display: none !important; }
#makerGame { display: none !important; }
body:has(#mineMap:not([hidden])) #news { display: none; }          /* 지도 열렸을 땐 소식 띠 숨김 (제목과 겹침) */
.dx-prizes { margin-top: 10px; }
.maker-in { margin: 6px 0 2px; font-size: 13px; }
#tabbar { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }   /* 탭 4개 (광산·랭킹·도감·설정) 고르게 — 2026-11-19 랭킹 다시 */
body.no-rank .hd-goals { flex: 1.4; }
body.no-rank .hd-dex { border-top: 0; flex-wrap: wrap; align-content: center; row-gap: 4px; }
body.no-rank .hd-dex .hd-bar { flex: 1 1 60%; }

/* 2026-11-18 상단 B '광산 배너': 왼쪽 잔고(작게) · 가운데 광산 아이콘+이름(크게)과 칭호·도감 n/55 · 오른쪽 룰렛 아이콘 */
#topbar { align-items: center !important; }
#topbar #pointsPill { flex: 0 0 auto; padding: 4px 10px; gap: 2px; min-width: 0; }
#topbar #pointsPill #pointsText { font-size: 20px; }
#topbar .hd-goals { flex: 1 1 auto; background: none !important; border: 0 !important; box-shadow: none !important; justify-content: center; min-width: 0; }
#topbar #hdDex { flex-direction: column; justify-content: center; align-items: center; gap: 3px; padding: 0 4px; border: 0; background: none; flex-wrap: nowrap; }
#topbar #hdDex .hd-mine { display: flex; align-items: center; gap: 6px; max-width: 100%; }
#topbar #hdDex .hd-mine img { width: 28px; height: 28px; image-rendering: pixelated; flex-shrink: 0; }
#topbar #hdDex .hd-mine b { font-size: 22px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 2px 2px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000; }
#topbar #hdDex #dexMine, #topbar #hdDex .hd-bar { display: none; }
#topbar #hdDex #dexText { font-size: 12px; color: var(--p-accent); text-shadow: 1px 1px 0 #000; }
#topbar #hdDex #dexText::before { content: '도감 '; color: var(--p-text); }
#topbar #hdDex { display: grid !important; grid-template-columns: auto auto; justify-content: center; align-items: center; column-gap: 6px; row-gap: 2px; }
#topbar #hdDex .hd-mine { grid-column: 1 / -1; justify-self: center; }
#topbar #hdDex .title-chip { font-size: 10px; padding: 0 5px; }
#topbar .hd-side { width: auto; }
#topbar #btnRoulette { width: 52px; height: 52px; padding: 0; display: grid; place-items: center; }
#topbar #btnRoulette > b { display: none; }

/* =========================================================
   2026-11-18 등급 미터기 (레트로 미터기 B '부드럽게', 예전 LED 탑·지난 판 엠블럼 대신 — js/render.js buildGauge/setGauge)
   판 왼쪽 얇은 나무 기둥(폭 30px) 안에 돌 바탕 칸 8개(아래 G → 위 S), 칸 사이 나무 받침. 오른쪽에 등급 글자 + 시작 점수(항상).
   높이 = 블록판 나무 틀(#board::before, 위아래 10px 바깥)과 같게: 위아래 끝이 판과 맞음
   ========================================================= */
:root { --wood: #8a5a2b; --wood-hi: #c08a4a; --wood-dk: #4a2c14; --stone: #241a14; }
#middle { gap: 14px; }
#leftcol { width: 74px; }
#meter { position: absolute; left: 0; top: calc(var(--cell) * 3 + var(--gap) - 6px); height: calc(var(--cell) * 6 + 12px);   /* 2026-11-19 판 틀 6px 에 맞춤 */ width: 30px;
  display: flex; padding: 3px; background: var(--wood); border: 3px solid #000;
  box-shadow: inset 2px 0 0 var(--wood-hi), inset -2px 0 0 var(--wood-dk), 3px 3px 0 rgba(0,0,0,.5); image-rendering: pixelated; }
#meter .mt-col { flex: 1; display: flex; flex-direction: column-reverse; gap: 3px; }
.mt-seg { flex: 1; position: relative; background: var(--stone);
  background-image: linear-gradient(45deg, rgba(255,255,255,.04) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.04) 75%), linear-gradient(45deg, rgba(255,255,255,.04) 25%, transparent 25%, transparent 75%, rgba(255,255,255,.04) 75%);
  background-size: 6px 6px; background-position: 0 0, 3px 3px; box-shadow: inset 0 2px 0 rgba(0,0,0,.6); }
.mt-seg::after { content: ""; position: absolute; left: -3px; right: -3px; top: -3px; height: 3px; background: var(--wood-hi); box-shadow: 0 1px 0 var(--wood-dk); }   /* 칸 사이 나무 받침 */
.mt-seg:last-child::after { display: none; }
.mt-lv { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: var(--gc); box-shadow: inset 2px 2px 0 rgba(255,255,255,.35), inset -2px -2px 0 rgba(0,0,0,.3); }
.mt-seg.cur .mt-lv { animation: mtBlink .5s steps(2) infinite; }
@keyframes mtBlink { 50% { filter: brightness(1.45); } }
.mt-seg.pop { animation: mtPop .45s ease-out; }
@keyframes mtPop { 0% { filter: brightness(2.2); box-shadow: 0 0 10px var(--gc); } 100% { filter: none; } }
/* 곡괭이: 채움 꼭대기를 따라 올라감 (bottom 은 js) */
#meter .mt-pk { position: absolute; left: 50%; bottom: 0; width: 34px; height: 34px; z-index: 3; pointer-events: none; image-rendering: pixelated;
  transform: translate(-50%, 50%); filter: drop-shadow(0 0 4px #ffd75a) drop-shadow(1px 1px 0 #000); }
#meter .mt-pk.bob { animation: mtBob .4s steps(2) infinite; }
@keyframes mtBob { 50% { margin-bottom: 3px; } }
/* 오른쪽 글자 + 점수: 칸과 같은 간격이라 칸마다 줄이 맞음 */
#meter .mt-labs { position: absolute; left: calc(100% + 6px); top: 3px; bottom: 3px; width: 44px; display: flex; flex-direction: column-reverse; gap: 3px; pointer-events: none; }
.mt-lab { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; line-height: 1; color: #8d8698; font-family: 'Galmuri11', 'Noto Sans KR', sans-serif; text-shadow: 1px 1px 0 #000, -1px 0 0 #000, 0 -1px 0 #000; }
.mt-lab b { font-size: 17px; font-weight: 700; }
.mt-lab small { margin-top: 2px; font-size: 12px; font-weight: 700; white-space: nowrap; color: #c9c3d4; letter-spacing: -.3px; }
.mt-lab.on { color: var(--gc); } .mt-lab.on b { color: #fff; } .mt-lab.on small { color: var(--p-accent, #ffd54a); }
.mt-lab.now b { color: var(--gc); filter: brightness(1.35); }
.mt-lab.pop b { animation: mtLabPop .45s ease-out; }
@keyframes mtLabPop { 0% { transform: scale(1.8); } 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) { .mt-seg.cur .mt-lv, #meter .mt-pk.bob, .mt-seg.pop, .mt-lab.pop b { animation: none; } }

/* =========================================================
   2026-11-18 상단 글씨가 밝은 배경(풀숲·하늘)에 묻히던 것: 상단 뒤에 얇은 어두운 띠(위 → 아래로 옅어짐)
   '출석' 꼬리표는 잔고 칸 위 테두리에 걸치고, 잔고 글자 줄 오른쪽에 자리를 비워 MILD/HARD 를 안 가림
   ========================================================= */
#topbar { position: relative; }
#topbar::before { content: ''; position: absolute; left: -16px; right: -16px; top: -10px; bottom: -14px; z-index: -1; pointer-events: none;
  background: linear-gradient(rgba(8,9,15,.78), rgba(8,9,15,.55) 70%, rgba(8,9,15,0)); }
#topbar #hdDex .title-chip { box-shadow: 1px 1px 0 #000; }
#topbar #hdDex #dexText { text-shadow: 1px 1px 0 #000, -1px 0 0 #000, 0 -1px 0 #000; }
.hd-money .att-tag { top: -11px; right: -6px; font-size: 10px; padding: 2px 4px; }
#pointsPill:has(.att-tag:not([hidden])) .hd-lab { padding-right: 30px; }

/* 2026-11-18 결과 창: 큰 주황 버튼 하나 = 확인 · +N pt (자동으로 포인트로). '보관함에 두기'는 없앰 */
.result .r-take { width: 100%; margin-top: 4px; padding: 14px 10px; font: 700 18px/1 'Galmuri11', 'Noto Sans KR', sans-serif; cursor: pointer;
  background: var(--p-accent); color: var(--p-on-accent); border: 3px solid var(--p-line); box-shadow: inset 0 -4px 0 var(--p-accent-d), 3px 3px 0 rgba(0,0,0,.5); }
.result .r-take:active { transform: translateY(2px); box-shadow: inset 0 -2px 0 var(--p-accent-d); }

/* 2026-11-18 시작 화면 MILD/HARD 카드 숨김 (모드는 설정에서 고름, 처음 온 사람은 MILD) */
#title .mode-select { display: none !important; }
.set-mode { display: flex; align-items: stretch; gap: 6px; margin: 4px 0 8px; }
.set-mode > span { align-self: center; min-width: 34px; font: 700 13px/1 'Galmuri11', 'Noto Sans KR', sans-serif; color: var(--p-muted); }
.set-mode .sm-btn { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 4px; cursor: pointer;
  background: var(--p-raise); color: var(--p-muted); border: 3px solid var(--p-line); font-family: 'Galmuri11', 'Noto Sans KR', sans-serif; }
.set-mode .sm-btn b { font-size: 16px; } .set-mode .sm-btn small { font-size: 12px; }
.set-mode .sm-btn.mild.on { background: #2f8a1a; color: #fff; box-shadow: inset 0 -4px 0 rgba(0,0,0,.3); }
.set-mode .sm-btn.hard.on { background: #c81e3a; color: #fff; box-shadow: inset 0 -4px 0 rgba(0,0,0,.3); }
/* 넓은 화면: 상단 띠 양옆이 네모로 끊겨 보이지 않게 가장자리를 흐림 · 미터기 곡괭이는 조금 작게(칸 채움이 덜 가려지게) */
#topbar::before { -webkit-mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); }
#meter .mt-pk { width: 28px; height: 28px; left: 30%; }
#helpTabs { word-break: keep-all; }

/* ---------- 결과 창 연출 (2026-11-18, js/resultfx.js): 새 카드 N2 반짝 NEW! · 중복 D3 쪼개짐 ---------- */
.modal.resultm { position: relative; }
.rfx-layer { position: absolute; inset: 0; z-index: 5; pointer-events: none; overflow: hidden; }
.rfx-cv { position: absolute; z-index: 6; image-rendering: pixelated; image-rendering: crisp-edges; }
.rfx-crack { position: absolute; z-index: 4; overflow: visible; }
.rfx-crack path { fill: none; stroke: #fff; stroke-width: 3; stroke-linejoin: round; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 2px #9fd8ff); }
.rfx-layer .card.rfx-piece { position: absolute; z-index: 2; }   /* .card.fcard 의 position: relative 를 이김 */
.rfx-emb { position: absolute; z-index: 3; image-rendering: pixelated; filter: drop-shadow(2px 2px 0 #000); }
.rfx-shard { position: absolute; z-index: 7; width: 14px; height: 14px; transform: rotate(45deg); background: linear-gradient(135deg, #b9f0ff, #4fb6e0 60%, #2a6f9a); border: 2px solid #000; }
.rfx-shard.still { position: static; display: block; margin: 4px auto 6px; }
.modal.rfx-shake { animation: rfxShake .22s steps(4); }
@keyframes rfxShake { 25% { translate: -4px 2px; } 50% { translate: 3px -3px; } 75% { translate: -2px -1px; } }
.rfx-ribbon { position: absolute; left: 0; right: 0; z-index: 4; pointer-events: none; text-align: center; white-space: nowrap; padding: 5px 0 4px;
  font: 700 24px/1.2 'Galmuri11', 'Black Han Sans', sans-serif; color: #0f2a1c; background: #6ee7a8; border-top: 4px solid #000; border-bottom: 4px solid #000; box-shadow: 0 4px 0 rgba(0,0,0,.35); }
.rfx-ribbon b { color: #fff; text-shadow: 2px 2px 0 #0f2a1c; }
.rfx-ribbon.gold { background: #ffd25a; color: #2a1600; }
/* 2026-11-19: 띠가 카드를 계속 가려서 → 잠깐 뒤 카드 위쪽 가장자리의 작은 표로 줄어듦 (끝 상태는 class·style, fill 안 씀) */
.rfx-ribbon { transition: top .35s cubic-bezier(.3,1.3,.5,1), transform .35s cubic-bezier(.3,1.3,.5,1); }
.rfx-ribbon.tag { transform: scale(.48); }
.rfx-ribbon.gold b { text-shadow: 2px 2px 0 #6a3a00; }
.result .card.big.rfx-ghost { opacity: .22; filter: grayscale(1); }   /* 2026-11-19 부터 안 씀 (rfx-back + '보유 중' 표) */
.rfx-ribbon.dup { background: #8fd3ff; color: #0b2233; transition: none; }
.rfx-ribbon.dup b { text-shadow: 2px 2px 0 #0b2233; }
.pg-bar b { display: inline-block; }
.pg-shard { display: grid; gap: 4px; }
.pg-track.sh { height: 12px; }
.pg-fill.sh { background: #8fc8ff; }
.pg-shard .pg-bar b.sh-cnt { color: #8fc8ff; }
.pg-hint { font-size: 12px; text-align: center; color: var(--p-muted, #cfc3b0); }
.pg-hint b.ok { color: #8fc8ff; }
.rfx-tip { position: absolute; inset: 0; z-index: 10; display: grid; place-items: center; padding: 18px; background: rgba(8,8,12,.78); }
.rfx-tipbox { display: grid; gap: 6px; padding: 14px; text-align: center; background: var(--p-surface, #262230); color: var(--p-text, #f2ede5); border: 3px solid #8fc8ff; box-shadow: 4px 4px 0 rgba(0,0,0,.55);
  font: 13px/1.6 'Galmuri11', 'Noto Sans KR', sans-serif; word-break: keep-all; }
.rfx-tipbox p { margin: 0; }
.rfx-tipbox p b { color: #fff; }
.rfx-tiph { font-size: 19px; color: #8fc8ff; }
.rfx-cost { color: var(--p-muted, #aaa1b2); font-size: 12px; }
.rfx-cost span { white-space: nowrap; }
.rfx-tipbox .rfx-ok { margin-top: 4px; padding: 10px; cursor: pointer; font: 700 16px/1 'Galmuri11', 'Noto Sans KR', sans-serif; background: #8fc8ff; color: #0c2236 !important; border: 3px solid var(--p-line, #000); box-shadow: inset 0 -4px 0 rgba(0,0,0,.25); }
/* 조각 빨간 점 (2026-11-18): 조각으로 받을 수 있는 못 모은 카드가 있으면 아래 '도감' 탭·상단 도감 칸·광산 아이콘에 점, '?' 칸은 반짝 */
#tabbar #btnBag { position: relative; }
#btnBag .rdot { top: 4px; right: calc(50% - 22px); }
.th.none.shardable { animation: shGlow 1.1s ease-in-out infinite alternate; }
@keyframes shGlow { from { filter: brightness(1); } to { filter: brightness(1.5) drop-shadow(0 0 3px #8fc8ff); } }
@media (prefers-reduced-motion: reduce) { .th.none.shardable { animation: none; } }

.rfx-tip.fixed { position: fixed; z-index: 200; }   /* 결과 창이 먼저 닫혔을 때 첫 조각 안내 (2026-11-19) */

/* =========================================================
   2026-11-19 사용자 결정 '4 · 섞은 버전' (샘플 https://claude.ai/artifact/V4r2nzWtfi3UWCApbBLPwu)
   남색 판 → 잔고 칸·광산 버튼 칸(아래 판)은 슬롯 칸과 같은 밝은 나무판 + 진한 갈색 글자,
   하단 탭은 짙은 갈색(화면 아래를 묵직하게), [채굴] 버튼은 진한 갈색 테두리. 팝업 창은 아직 남색 그대로
   ========================================================= */
html body #topbar .hd-money, html body #panel {
  --p-surface: #ecd3a4; --p-well: #d9b98a; --p-raise: #f3e0b8; --p-text: #3a2312; --p-muted: #7a5636;
  --panel: #ecd3a4; --ink: #3a2312; --muted: #7a5636; }
html body #panel, html body #topbar .hd-money, html body #betBox { background: linear-gradient(#f0d9ac, #e2c08a) !important; }
html body #pointsText, html body #betText, html body #betBox b, html body #panelPlay .info b, html body #scoreText { color: #3a2312 !important; text-shadow: none !important; }
html body .hd-lab, html body #betBox small { color: #8a5a2b !important; text-shadow: none !important; }
html body #tabbar {
  --p-surface: #3a2616; --p-well: #22150b; --p-raise: #4c3220; --p-text: #f6e7cc; --p-muted: #c9ad86;
  --panel: #3a2616; --ink: #f6e7cc; --muted: #c9ad86; background: #3a2616 !important; }
html body #btnPlay { border: 3px solid #2a170a !important; box-shadow: inset 0 -5px 0 rgba(0,0,0,.25), 0 0 0 2px #2a170a, 3px 4px 0 rgba(0,0,0,.55) !important; }
html body #btnSpeed { background: #3a2616 !important; color: #f6e7cc !important; }   /* 판 중 빨리 감기 버튼도 남색 → 짙은 갈색 */

/* 2026-11-19 '1 · 짙은 갈색' 함께 (샘플 https://claude.ai/artifact/MqVCqKHvEX6kcfv8vJ8zii):
   팝업 안쪽 나무 테 · [채굴] 더 진한 주황 · 룰렛 버튼 깜빡임 끄고 갈색 + 주황 테두리 */
html body .modal { border: 3px solid #0c0805 !important; box-shadow: inset 0 0 0 3px #6b4426, inset 0 0 0 5px #2a170a, 4px 4px 0 rgba(0,0,0,.55) !important; }
html body #btnPlay { background: linear-gradient(#ffa63a, #f0700f) !important; }
html body #btnRoulette.ready, html body .hd-roul.ready { animation: none !important; background: linear-gradient(#5a3a22, #3d2a1b) !important; box-shadow: inset 0 0 0 2px #ffad3b, 3px 3px 0 rgba(0,0,0,.5) !important; }
html body #btnRoulette.ready::after, html body .hd-roul.ready::after { display: none !important; }

/* 2026-11-19 미터기 글자 키우고 읽기 쉽게: 어두운 바탕 칸 + 등급 글자는 늘 등급 색 + 숫자 밝게·크게 */
.mt-lab { justify-content: center; align-items: flex-start; }
.mt-lab b, .mt-lab small { background: rgba(12,8,5,.78); padding: 1px 4px; }
.mt-lab b { font-size: 18px; color: var(--gc); filter: brightness(1.25); }
.mt-lab small { margin-top: 1px; font-size: 13px; color: #f3ead8; }
.mt-lab.on b { color: #fff; filter: none; background: var(--gc); }
html body #modeBadge { background: #6b4426 !important; color: #fff1d6 !important; text-shadow: none !important; }   /* 밝은 잔고 칸 위 MILD 표시 */

/* =========================================================
   2026-11-19 화면 점검 ① 작은 글씨 키우기 — 휴대폰(390px)에선 판 전체가 약 0.89배로 줄어
   10~11px 글씨가 9px 대로 보였음. 정보 글씨는 최소 12px(판 안은 13px 근처)로
   ========================================================= */
html body #modeBadge, html body #modeBadge.mild, html body #modeBadge.hard { font-size: 11px; padding: 0 6px; }
html body #topbar #hdDex .title-chip { font-size: 12px; }
html body .hd-dex small, html body #dexText { font-size: 13px; }
html body .hd-money .att-tag { font-size: 11px; }
html body .tab small { font-size: 12px; }
/* 도감 창 */
html body .dx-rank { font-size: 13px; }
html body .dx-mine { font-size: 12px; } html body .dx-mine b { font-size: 13px; }
html body .dx-sum { font-size: 13px; }
html body .dx-stats span { font-size: 12px; }
html body .hint, html body .ghead, html body .dx-set .h { font-size: 12px; }
html body .cv-kv { font-size: 13px; } html body .cv-kv dd small { font-size: 12px; }
/* 보상표 */
html body .pr-bet { font-size: 12px; }
html body .pr-mline, html body .pr-row { font-size: 13px; }
html body .pr-row .cn, html body .pr-row .ar, html body .pr-cell b, html body .pr-view, html body .pr-mline .modetag { font-size: 12px; }
html body .pr-note { font-size: 11px; }
/* 결과 창 · 룰렛 설명 */
html body .pg-set, html body .pg-hint { font-size: 13px; }
html body .modal .note { font-size: 13px; }

/* 2026-11-19 사용자: 슬롯 안내 글씨('채굴을 누르면…') 없앰 — 신규 안내는 따로 튜토리얼로. 판 사이 슬롯은 빈 칸 그대로 (지난 판 결과 남기기는 해 보고 뺌) */
#slot::after { display: none !important; }

/* 2026-11-19 화면 점검: 보상표·하는 법 등 'tall' 창이 늘 화면 86% 높이라 내용이 짧으면 [닫기] 위가 크게 비었음 → 내용만큼, 길면 86% 까지 (스크롤) */
html body .modal.tall { height: auto; max-height: 86vh; }
/* 같은 날: 'tall' 창은 화면 위쪽에 붙이고 아래로만 늘어나게 — 탭·내용이 바뀌어도 제목·탭·판값 버튼이 제자리 (가운데 정렬이면 위아래로 같이 움직였음) */
html body #overlay:has(.modal.tall) { align-items: flex-start; padding-top: max(16px, 5vh); }

/* 2026-11-19 사용자 결정 보물상자 받침 '2 · 광차 레일' (목업 https://claude.ai/artifact/PaLtTzm8Nd65Qc6q8AS4Re):
   상자 아래 쇠 레일 두 줄 + 굵은 나무 침목 — "광산에서 실어 나르는 보물" */
html body #chests::after { display: block; content: ''; position: absolute; z-index: -1; border-radius: 0; border: 0;
  left: -12px; right: -12px; bottom: -8px; height: 20px;
  background:
    linear-gradient(#e2e5ec, #9aa0aa 55%, #5c6068) 0 3px / 100% 4px no-repeat,                     /* 앞쪽 레일 */
    linear-gradient(#1c1a18, #1c1a18) 0 7px / 100% 1px no-repeat,                                   /* 레일 그림자 */
    linear-gradient(#d2d6de, #8a9098 55%, #50545c) 0 12px / 100% 4px no-repeat,                     /* 뒤쪽 레일 */
    linear-gradient(#1c1a18, #1c1a18) 0 16px / 100% 1px no-repeat,
    repeating-linear-gradient(90deg, transparent 0 7px, #0c0805 7px 8px, #8a5a32 8px 9px, #6b4426 9px 18px, #0c0805 18px 19px, transparent 19px 30px) 0 0 / 100% 100% no-repeat;  /* 침목 */
  filter: drop-shadow(2px 2px 0 rgba(0,0,0,.55)); }
/* 같은 날: 레일 아래가 답답 → 상자 줄을 위로 6px 올리고 그만큼 아래에 여유 (전체 높이는 그대로) */
html body #chests { margin-top: 8px; margin-bottom: 6px; }

/* 2026-11-19 코인 → 남은 탐지로 날아갈 때 '+1' 글자 */
.spin-plus { position: fixed; z-index: 61; pointer-events: none; font: 700 22px/1 'Galmuri11', 'Black Han Sans', sans-serif; color: #ffe27a;
  text-shadow: -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 2px 2px 0 #000, 0 3px 0 #000; }
/* 2026-11-19 슬롯 아이템 약 10% 크게 (칸 안 여백 6px → 4px), 릴도 같게 */
html body .slot-item { inset: 4px; }
html body .reel-cell { padding: 4px; }

/* =========================================================
   2026-11-19 UI 재점검 ① 옛 색·모양 정리 (남색·하늘색·초록·둥근 버튼 → 갈색 팔레트·각진 도트)
   ========================================================= */
/* 둥근 알약 버튼(base.css .rbtns 24px) → 각진 버튼: 큰 판 확인·자랑 이미지 창 등 */
html body .rbtns button { border-radius: 0; }
/* 큰 판 확인 창: 두꺼운 주황 테두리 → 팝업과 같은 나무 테 */
html body .cfm-box { border: 3px solid #0c0805; box-shadow: inset 0 0 0 3px #6b4426, inset 0 0 0 5px #2a170a, 4px 4px 0 rgba(0,0,0,.55); padding: 18px 16px 16px; }
/* 첫 조각 안내: 하늘색 테두리·버튼 → 나무 테 + 주황 버튼 (제목만 조각 색으로 살짝) */
html body .rfx-tipbox { border: 3px solid #0c0805; box-shadow: inset 0 0 0 3px #6b4426, inset 0 0 0 5px #2a170a, 4px 4px 0 rgba(0,0,0,.55); padding: 16px; }
html body .rfx-tiph { color: var(--p-accent); }
html body .rfx-tipbox .rfx-ok { background: var(--p-accent); color: var(--p-on-accent) !important; box-shadow: inset 0 -4px 0 var(--p-accent-d); }
/* 하는 법 '그 밖에': 이름이 128px 칸이라 설명과 크게 벌어지던 것 → 이름 한 줄, 설명은 그 아래 */
html body .steps2 p { margin: 0 0 10px; }
html body .steps2 b { display: block; min-width: 0; margin-bottom: 1px; }
/* 설정 모드 버튼: 켜진 쪽 초록·빨강 → 다른 켜진 버튼(탭)과 같은 주황 */
html body .set-mode .sm-btn.mild.on, html body .set-mode .sm-btn.hard.on { background: var(--p-accent); color: var(--p-on-accent); box-shadow: inset 0 -4px 0 var(--p-accent-d); }
html body .set-mode .sm-btn.on small { color: #4a2a0a; }
/* 보상표 MILD/HARD 표: 초록·빨강 둥근 표 → 잔고 칸 MILD 표와 같은 갈색 네모 */
html body .modetag, html body .modetag.mild { border-radius: 0; background: #6b4426; color: #fff1d6; }
html body .modetag.hard { background: var(--p-accent-d); color: #fff; }
html body .roul-lead { margin: 6px 0 0; font-size: 16px; font-weight: 700; color: var(--p-text); }   /* 2026-11-19 룰렛 한 줄 설명 */
html body .roul-lead b { color: var(--p-accent); }

/* =========================================================
   2026-11-19 메인 화면 위쪽 (사용자 결정 시안 B3 — https://claude.ai/artifact/Xm5b1WdUZy9xXHaEFD8mbj 이후 다듬은 것)
   상단 = 광산 이름만 크게 + 바로 아래 이 광산 도감 수(카드 아이콘) · 칭호 칩·'도감' 글자는 뺌 (아래 탭·광산 이름과 말이 겹침)
   슬롯 왼쪽 빈칸 = 칭호 나무 명판(전체 도감 기준 다음 칭호까지) · 미터기 바로 위 = [확률]
   ========================================================= */
html body #topbar #hdDex .title-chip, html body #topbar #hdDex > small, html body #topbar #hdDex .hd-bar, html body #topbar #hdDex #dexText { display: none !important; }
html body #topbar #hdDex { display: flex !important; flex-direction: column !important; align-items: center !important; justify-content: center !important; gap: 3px !important; }
html body #topbar #hdDex .hd-mine img { width: 34px; height: 34px; }
html body #topbar #hdDex .hd-mine b { font-size: 28px; letter-spacing: .5px; }
.hd-dexbadge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px 2px 6px; background: rgba(12,8,5,.72); border: 2px solid #0c0805;
  font: 700 13px/1 'Galmuri11', sans-serif; color: #fff; white-space: nowrap; }
.hd-dexbadge b { font-size: 13px; color: #fff; }
.hd-dexbadge span { font-size: 11px; color: var(--p-muted); }
/* 작은 카드 모양 (도트) */
.hd-dexbadge i { position: relative; width: 10px; height: 13px; background: #3d2a1b; border: 2px solid var(--p-accent); box-sizing: border-box; }
.hd-dexbadge i::after { content: ''; position: absolute; left: 1px; right: 1px; top: 2px; height: 3px; background: var(--p-accent); opacity: .7; }
/* 칭호 명판: 슬롯(3칸 높이) 가운데 */
.title-plate { position: absolute; left: 1px; width: 72px; top: calc(var(--cell) * 1.5 - 4px); transform: translateY(-50%); z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 11px 4px 8px; cursor: pointer;
  background: linear-gradient(#7a4f2c, #5a3820); border: 3px solid #0c0805; border-radius: 0;
  box-shadow: inset 0 2px 0 rgba(255,214,150,.3), inset 0 -2px 0 rgba(0,0,0,.35), 3px 3px 0 rgba(0,0,0,.5); font-family: 'Galmuri11', 'Noto Sans KR', sans-serif; }
.title-plate::before, .title-plate::after { content: ''; position: absolute; top: 4px; width: 5px; height: 5px; border-radius: 50%; background: #9aa0aa; box-shadow: 0 0 0 1px #1c1a18; }
.title-plate::before { left: 4px; } .title-plate::after { right: 4px; }
.title-plate b { font-size: 15px; font-weight: 700; color: #ffe27a; white-space: nowrap; text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000; }
.title-plate .tp-bar { display: block; width: 56px; height: 7px; background: #2a170a; border: 1px solid #0c0805; }
.title-plate .tp-bar i { display: block; height: 100%; background: #8fe08a; }
.title-plate small { font-size: 10px; color: #f3d7a8; white-space: nowrap; }
.title-plate:active { transform: translateY(calc(-50% + 1px)); }
/* [확률]: 미터기 바로 위 */
.prob-btn { position: absolute; left: -2px; width: 38px; top: calc(var(--cell) * 3 + var(--gap) - 36px); height: 25px; z-index: 2; padding: 0; cursor: pointer;
  display: grid; place-items: center; font: 700 12px/1 'Galmuri11', sans-serif; color: var(--p-on-accent);
  background: var(--p-accent); border: 2px solid #0c0805; border-radius: 0; box-shadow: inset 0 -3px 0 var(--p-accent-d), 2px 2px 0 rgba(0,0,0,.5); }
.prob-btn:active { transform: translateY(1px); }

/* 2026-11-19 사용자 결정 '1 · 바깥 상자 없애기': 아래 판 안에 같은 색 상자가 겹쳐 보이던 것 → 판 테두리·바탕을 없애고 [광산 버튼]·[채굴]만 따로. 판 중 점수 칸은 한 상자로 */
html body #panel { background: none !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; }
html body #betBox { border: 3px solid #0c0805 !important; box-shadow: inset 0 2px 0 rgba(255,255,255,.35), inset 0 -4px 0 rgba(90,56,32,.35), 3px 3px 0 rgba(0,0,0,.5) !important; }
html body #panelPlay { background: linear-gradient(#f0d9ac, #e2c08a) !important; border: 3px solid #0c0805 !important; box-shadow: 3px 3px 0 rgba(0,0,0,.5) !important; padding: 6px 10px !important; }

/* 2026-11-19 프로필 창 (js/ui/profile.js) */
.pf2 { display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.pf-head { display: flex; gap: 12px; align-items: center; }
.pf-av { position: relative; flex: none; width: 80px; padding: 0; border: 4px solid var(--gc); background: var(--gc); box-shadow: 3px 3px 0 rgba(0,0,0,.5); cursor: pointer; border-radius: 0; }
.pf-av img { display: block; width: 100%; aspect-ratio: 480 / 702; object-fit: cover; }
.pf-av .pf-q { display: grid; place-items: center; aspect-ratio: 480 / 702; color: #6b5a48; font-size: 30px; font-weight: 700; background: #120d09; }
.pf-ed { position: absolute; right: -9px; bottom: -9px; width: 24px; height: 24px; display: grid; place-items: center; background: var(--p-accent); color: var(--p-on-accent); border: 2px solid #0c0805; font-size: 13px; font-weight: 700; }
.pf-who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; align-items: flex-start; }
.pf-nick { font-size: 19px; color: var(--p-text); }
.pf-title { cursor: pointer; font-size: 12px; }
.pf-bar { display: block; width: 100%; height: 7px; background: #000; border: 1px solid #0c0805; } .pf-bar i { display: block; height: 100%; background: #8fe08a; }
.pf-who small { color: var(--p-muted); font-size: 12px; }
.pf-best { display: flex; gap: 10px; align-items: center; background: var(--p-well); border: 2px solid #0c0805; padding: 7px; }
.pf-best img { width: 44px; border: 3px solid; flex: none; }
.pf-best div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pf-best b { font-size: 15px; color: var(--p-text); } .pf-best small { color: var(--p-muted); font-size: 12px; }
.pf-sec { color: var(--p-accent); font-weight: 700; } .pf-sec b { color: var(--p-text); }
.pf-mgrid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.pf-mg { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 4px 0 3px; background: var(--p-well); border: 2px solid #0c0805; font-size: 11px; color: var(--p-muted); }
.pf-mg img { width: 20px; height: 20px; image-rendering: pixelated; }
.pf-mg.done { box-shadow: inset 0 0 0 2px var(--p-accent); color: var(--p-text); } .pf-mg.zero { opacity: .4; }
.pf-badges { display: flex; flex-wrap: wrap; gap: 5px; }
.pf-none { margin: 0; color: var(--p-muted); font-size: 12px; }
/* 대표 카드 고르기 */
.av-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.av-tabs button { min-width: 38px; height: 32px; padding: 0 6px; display: grid; place-items: center; background: var(--p-raise); border: 2px solid #0c0805; color: var(--p-text); font-weight: 700; font-size: 12px; cursor: pointer; }
.av-tabs button.on { background: var(--p-accent); color: var(--p-on-accent); }
.av-tabs img { width: 20px; height: 20px; image-rendering: pixelated; }
.av-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-bottom: 8px; }
.av-pk { position: relative; padding: 0; border: 3px solid var(--gc); background: var(--gc); cursor: pointer; }
.av-pk img { display: block; width: 100%; aspect-ratio: 480 / 702; object-fit: cover; }
.av-pk span { position: absolute; left: 2px; top: 2px; padding: 0 3px; font-size: 10px; font-weight: 700; color: #fff; background: rgba(0,0,0,.65); }
.av-pk.on { box-shadow: 0 0 0 3px var(--p-accent), 0 0 10px rgba(255,173,59,.6); }
/* 2026-11-19 프로필 광산별 도감 = 게이지 2줄 */
.pf-mines { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px 12px; }
.pf-mr { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--p-muted); min-width: 0; }
.pf-mr img { width: 18px; height: 18px; image-rendering: pixelated; flex: none; }
.pf-mbar { flex: 1; min-width: 0; height: 7px; background: #000; border: 1px solid #0c0805; } .pf-mbar i { display: block; height: 100%; background: var(--p-accent); }
.pf-mr span { width: 38px; text-align: right; flex: none; }
.pf-mr.done .pf-mbar i { background: #8fe08a; } .pf-mr.done span { color: #8fe08a; }
.pf-mr.zero { opacity: .45; }
.pf-brag { margin: 2px 0 0 !important; }

/* =========================================================
   2026-11-19 시작 화면 1안 + 확률 시뮬 (js/ui/sim.js)
   ========================================================= */
#title .title-sub { border-radius: 0; background: #3d2a1b; color: var(--p-accent); border: 2px solid #0c0805; box-shadow: inset 0 2px 0 rgba(255,214,150,.15), 3px 3px 0 rgba(0,0,0,.55);
  font-family: 'Galmuri11', sans-serif; font-weight: 700; font-size: 14px; letter-spacing: .05em; padding: 5px 12px; }
#title .mode-select, #title .title-hint { display: none !important; }
#title .tm2 { position: relative; z-index: 3; display: flex; flex-direction: column; gap: 12px; width: min(90vw, 340px); margin-top: 6px; }
#title .tm2 * { font-family: 'Galmuri11', 'Noto Sans KR', sans-serif; box-sizing: border-box; }
#title .nail { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #9aa0aa; box-shadow: 0 0 0 1px #1c1a18; }
#title .nail.a { top: 4px; left: 4px; } #title .nail.b { top: 4px; right: 4px; } #title .nail.c { bottom: 4px; left: 4px; } #title .nail.d { bottom: 4px; right: 4px; }
html body #title #btnStart.ts-big { position: relative; width: 100%; height: 150px; margin: 0; padding: 12px 16px 12px 14px; display: flex; align-items: center; gap: 14px; text-align: left;
  border: 3px solid #0c0805; border-radius: 0; background: linear-gradient(#7a4f2c, #5a3820); outline: 3px solid var(--p-accent); outline-offset: -8px;
  box-shadow: inset 0 2px 0 rgba(255,214,150,.25), 4px 4px 0 rgba(0,0,0,.55); animation: none; cursor: pointer; }
#title #btnStart.ts-big::after { display: none; }
#title #btnStart.ts-big:active { transform: translateY(2px); }
#title .ts-art { position: relative; width: 112px; height: 112px; flex-shrink: 0; border: 3px solid #0c0805; background: #160f09; overflow: hidden; }
#title .ts-art i { position: absolute; left: 50%; top: 50%; width: 52px; height: 72px; margin: -36px 0 0 -26px; border: 2px solid #0c0805; background: #2a1d13 center / cover; box-shadow: 2px 2px 0 rgba(0,0,0,.6); }
#title .ts-tx { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
#title .ts-tx b { font-size: 26px; color: var(--p-accent); white-space: nowrap; line-height: 1.1; text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000, 0 2px 0 #000; }
#title .ts-tx small { font-size: 13px; color: #f0d9ac; } #title .ts-tx small em { font-style: normal; font-size: 18px; color: #fff; }
#title .ts-bar { display: block; height: 8px; background: #160f09; border: 2px solid #0c0805; } #title .ts-bar i { display: block; height: 100%; background: var(--p-accent); min-width: 2px; }
#title .go { position: absolute; right: 14px; bottom: 12px; font-size: 16px; color: var(--p-accent); }
#title #btnSim.ts-strip { position: relative; width: 100%; height: 52px; display: flex; align-items: center; gap: 10px; padding: 0 30px 0 12px; border: 3px solid #0c0805; border-radius: 0;
  background: #3d2a1b; box-shadow: inset 0 2px 0 rgba(255,214,150,.12), 4px 4px 0 rgba(0,0,0,.55); cursor: pointer; }
#title #btnSim img { width: 30px; image-rendering: pixelated; filter: drop-shadow(2px 2px 0 rgba(0,0,0,.6)); }
#title #btnSim b { font-size: 17px; color: #f0d9ac; white-space: nowrap; } #title #btnSim small { font-size: 11px; color: #b8a07a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#title #btnSim .go { bottom: auto; top: 50%; transform: translateY(-50%); }
#title .tm-maker { position: absolute; top: auto; bottom: 10px; left: 0; right: 0; text-align: center; font-size: 11px; color: rgba(240,217,172,.55); z-index: 3; background: none; border: 0; box-shadow: none; }
#title .tm-maker b { color: rgba(255,173,59,.75); font-weight: 400; }
#title #btnWho { font-size: 12px; padding: 4px 10px; }

/* 확률 시뮬: 평소엔 숨김 */
.sim-bet, .sim-tag, .sim-rec-btn, .sim-lock { display: none; }
body.sim .sim-bet { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 4px 8px 6px; background: linear-gradient(#f0d9ac, #e2c08a); border: 3px solid #0c0805; box-shadow: 3px 3px 0 rgba(0,0,0,.5); font-family: 'Galmuri11', sans-serif; }
body.sim .sim-bet small { font-size: 11px; color: #8a5a2b; }
body.sim .sim-bet span { display: flex; align-items: center; gap: 4px; }
body.sim .sim-bet b { font-size: 16px; color: #3a2312; min-width: 86px; text-align: center; white-space: nowrap; }
body.sim .sim-bet button { width: 24px; height: 24px; padding: 0; display: grid; place-items: center; font: 700 16px/1 'Galmuri11', sans-serif; color: #2a1600; background: var(--p-accent); border: 2px solid #0c0805; cursor: pointer; }
body.sim #pointsPill, body.sim #hdDexBadge, body.sim #btnRoulette, body.sim #titlePlate, body.sim #betBox { display: none !important; }
body.sim .sim-tag { display: inline-flex; align-items: center; gap: 6px; padding: 2px 4px 2px 8px; background: var(--p-accent); color: #2a1600; border: 2px solid #0c0805; font: 700 12px/1 'Galmuri11', sans-serif; }
body.sim .sim-tag #simExit { cursor: pointer; padding: 2px 6px; font: 700 11px/1 'Galmuri11', sans-serif; color: #f6e7cc; background: #3a2616; border: 2px solid #0c0805; cursor: pointer; }
body.sim .sim-lock { position: absolute; left: 1px; width: 72px; top: calc(var(--cell) * 1.5 - 4px); transform: translateY(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px 10px;
  background: #3a2616; border: 3px solid #0c0805; box-shadow: 3px 3px 0 rgba(0,0,0,.5); text-align: center; }
body.sim .sim-lock small { font: 700 10px/1.3 'Galmuri11', sans-serif; color: #c9ad86; }
body.sim .sim-rec-btn { flex: 1; min-width: 0; height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; cursor: pointer;
  background: linear-gradient(#f0d9ac, #e2c08a); border: 3px solid #0c0805; box-shadow: inset 0 2px 0 rgba(255,255,255,.35), inset 0 -4px 0 rgba(90,56,32,.35), 3px 3px 0 rgba(0,0,0,.5); font-family: 'Galmuri11', sans-serif; }
body.sim .sim-rec-btn small { font-size: 11px; color: #8a5a2b; } body.sim .sim-rec-btn span { font-size: 13px; color: #3a2312; } body.sim .sim-rec-btn b { font-size: 17px; }
body.sim #btnBag, body.sim #btnRank { opacity: .4; }
/* 누적 기록 표 */
.sim-rec { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.sr-kv { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 9px 10px; background: linear-gradient(#f0d9ac, #e2c08a); border: 2px solid #0c0805; color: #3a2312; }
.sr-kv b { text-align: right; } .sr-kv b.ac { color: #c25a00; font-size: 16px; }
.sr-h { display: flex; justify-content: space-between; color: var(--p-muted); font-size: 11px; padding: 4px 2px 0; }
.sr-row { display: grid; grid-template-columns: 24px 1fr 46px 48px; align-items: center; gap: 6px; }
.sr-row .gtag { min-width: 20px; height: 18px; font-size: 11px; }
.sr-bar { display: block; height: 9px; background: #000; border: 1px solid #0c0805; } .sr-bar i { display: block; height: 100%; min-width: 0; }
.sr-row b { text-align: right; font-size: 13px; } .sr-row small { text-align: right; color: var(--p-muted); font-size: 12px; }
.sr-note { margin: 4px 0 0; font-size: 11px; color: var(--p-muted); text-align: center; line-height: 1.5; }
/* 시뮬 결과 창 */
.sim-res .sim-line { font-size: 14px; color: var(--p-text); } .sim-res .sim-line b { color: var(--p-accent); }
.sim-res .sim-lure { width: 100%; padding: 8px; text-align: center; font-size: 13px; color: var(--p-muted); background: var(--p-well); border: 2px solid #0c0805; }
.sim-res .sim-lure b { color: #ffe27a; }
#title .ts-bar[hidden] { display: none; }   /* 처음 온 사람은 막대 숨김 */

/* ===== 2026-11-21 UI 점검 1~12 ===== */
/* 5. 시작 화면 제작자: 옛 .maker 의 가운데 옮김(translate)이 남아 왼쪽으로 잘리던 것 */
html body #title .tm-maker { transform: none; left: 0; right: 0; width: auto; padding: 0; }
/* 2. 잔고 칸: MILD 딱지 숨김(설정·보상표에 있음) · 출석 = 안쪽 모서리 빨간 점 */
html body #modeBadge { display: none; }
html body .hd-money .att-tag { top: 5px; right: 5px; width: 10px; height: 10px; padding: 0; font-size: 0; border: 2px solid #3a1a12; background: #e8574a; animation: attPulse 1.2s ease-in-out infinite alternate; }
@keyframes attPulse { from { transform: scale(1); } to { transform: scale(1.25); } }
@media (prefers-reduced-motion: reduce) { html body .hd-money .att-tag { animation: none; } }
/* 3. 첫 조각 안내: 화면을 덮지 않고 카드 아래 말풍선 */
html body .rfx-tip { inset: auto 10px 74px 10px; display: block; padding: 0; background: none; }
html body .rfx-tip.fixed { left: 50%; right: auto; bottom: 90px; width: min(340px, calc(100vw - 32px)); transform: translateX(-50%); }
html body .rfx-tipbox { position: relative; padding: 10px 12px; gap: 4px; font-size: 13px; line-height: 1.45; box-shadow: inset 0 0 0 3px #6b4426, inset 0 0 0 5px #2a170a, 0 6px 18px rgba(0,0,0,.6); }
html body .rfx-tipbox::before { content: ''; position: absolute; left: 50%; top: -11px; margin-left: -9px; border: 9px solid transparent; border-top: 0; border-bottom: 11px solid #0c0805; }
html body .rfx-tiph { font-size: 16px; }
html body .rfx-tipbox .rfx-shard { display: none; }
html body .rfx-tipbox .rfx-ok { padding: 8px; font-size: 14px; }
/* 6. 확률 시뮬: 잠긴 탭에 자물쇠 */
body.sim #btnBag, body.sim #btnRank { position: relative; }
body.sim #btnBag::after, body.sim #btnRank::after { content: ''; position: absolute; top: 4px; right: calc(50% - 24px); width: 14px; height: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 7' shape-rendering='crispEdges'%3E%3Cpath fill='%23ffad3b' d='M2 0h3v1H2zM1 1h1v2H1zM5 1h1v2H5zM0 3h7v4H0z'/%3E%3Cpath fill='%230c0805' d='M3 4h1v2H3z'/%3E%3C/svg%3E") center / contain no-repeat; image-rendering: pixelated; }
/* 7. 보상표 펼침: 카드별 확률 */
html body .pr-cell small { display: block; margin-top: 1px; font-size: 11px; color: var(--p-muted); }
/* 9. 탭 내용이 아래로 더 있을 때 */
.mbody.more::after, .tabbody.more::after { content: '▼ 아래로 더 있어요'; position: sticky; bottom: 0; display: block; margin-top: -34px; padding: 22px 0 4px; text-align: center; font: 700 11px/1 'Galmuri11', sans-serif; color: var(--p-accent); background: linear-gradient(rgba(42,29,19,0), var(--p-surface) 70%); pointer-events: none; }
/* 11. 결과 창 자랑 버튼 = 밝은 자랑 버튼 색 */
html body .result .r-brag { flex: 0 0 74px; background: var(--p-info); border: 3px solid var(--p-line); box-shadow: inset 0 -4px 0 rgba(0,0,0,.25); }
/* 12. 도감 요약 칩: 줄을 꽉 채워 혼자 남는 칩이 어색하지 않게 */
html body .dx-chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
html body .dx-chips:has(> :nth-child(4)), html body .dx-chips:not(:has(> :nth-child(3))) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
html body .dx-chips .chip { text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ===== 2026-11-21 튜토리얼 (js/ui/tutorial.js) ===== */
.tut { position: fixed; inset: 0; z-index: 400; }
.tut.passive { pointer-events: none; }
.tut-hole { position: fixed; border: 3px solid var(--p-accent); box-shadow: 0 0 0 9999px rgba(8,5,3,.72), 0 0 18px rgba(255,173,59,.7); pointer-events: none; animation: tutGlow 1s ease-in-out infinite alternate; }
@keyframes tutGlow { from { border-color: #ffad3b; } to { border-color: #ffe0a0; } }
.tut-arrow { position: fixed; width: 0; height: 0; margin-left: -12px; border: 12px solid transparent; border-bottom: 0; border-top: 16px solid var(--p-accent); filter: drop-shadow(2px 2px 0 #0c0805); pointer-events: none; animation: tutBob .6s ease-in-out infinite alternate; }
@keyframes tutBob { from { transform: translateY(-4px); } to { transform: translateY(4px); } }
.tut-bub { position: fixed; transform: translateX(-50%); word-break: keep-all; width: min(300px, calc(100vw - 32px)); padding: 12px 14px; text-align: center; font: 400 15px/1.5 'Galmuri11', 'Noto Sans KR', sans-serif; color: #3a2312;
  background: linear-gradient(#f0d9ac, #e2c08a); border: 3px solid #0c0805; box-shadow: inset 0 0 0 2px #fff3d6, 4px 4px 0 rgba(0,0,0,.55); }
.tut-bub p { margin: 0; } .tut-bub b { color: #b4480f; } .tut-bub small { display: block; margin-top: 6px; font-size: 12px; color: #6b4a2a; line-height: 1.45; }
.tut.passive .tut-bub { font-size: 14px; padding: 9px 12px; }
.tut-bub.nudge { animation: tutNudge .35s; }
@keyframes tutNudge { 25% { transform: translateX(calc(-50% - 6px)); } 75% { transform: translateX(calc(-50% + 6px)); } }
.tut-go { display: block; width: 100%; margin-top: 10px; padding: 10px; cursor: pointer; font: 700 16px/1 'Galmuri11', sans-serif; color: #2a1600; background: var(--p-accent); border: 3px solid #0c0805; box-shadow: inset 0 -4px 0 var(--p-accent-d); }
.tut-skip { position: fixed; right: 12px; bottom: calc(env(safe-area-inset-bottom, 0px) + 14px); padding: 8px 12px; cursor: pointer; font: 700 13px/1 'Galmuri11', sans-serif; color: #f0d9ac; background: rgba(26,19,13,.9); border: 2px solid #c4a882; }
.tut-testbadge { position: fixed; left: 8px; bottom: 8px; z-index: 450; padding: 4px 8px; font: 700 11px/1 'Galmuri11', sans-serif; color: #fff; background: #b02a2a; border: 2px solid #0c0805; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .tut-hole, .tut-arrow { animation: none; } }
.tut.cap .tut-bub { animation: tutPop .25s ease-out; }
@keyframes tutPop { from { transform: translateX(-50%) translateY(-8px) scale(.92); opacity: 0; } to { transform: translateX(-50%); opacity: 1; } }

/* ===== 2026-11-21 미터기 C안: 아직 못 간 등급 흐리게 · 지금 등급 크게 · 지금 칸 테두리 · 남은 점수 ===== */
#app.playing #meterLabs .mt-lab:not(.on) { opacity: .42; }
#app.playing #meterLabs .mt-lab.now b { display: inline-block; transform: scale(1.3); transform-origin: left center; text-shadow: 0 0 6px var(--gc), 2px 2px 0 #000; }
#meterCol .mt-seg.cur { outline: 2px solid #fff3d6; outline-offset: -1px; box-shadow: 0 0 8px var(--gc); }
.scorebox .sc-need { display: block; margin-top: 1px; font: 700 11px/1 'Galmuri11', sans-serif; color: #b4480f; white-space: nowrap; min-height: 11px; }
.scorebox .sc-need:empty { display: none; }

/* ===== 2026-11-21 배치 B: 오른쪽 위 프로필 · 명판(칭호만) · 그 아래 [출석][룰렛] ===== */
#topbar .hd-av { position: relative; width: 50px; height: 50px; padding: 0; cursor: pointer; overflow: hidden; background: #160f09; border: 3px solid #0c0805; box-shadow: inset 0 0 0 2px var(--gc, #6b4426), 2px 2px 0 rgba(0,0,0,.5); }
#topbar .hd-av .av-img, #topbar .hd-av .av-img img, #topbar .hd-av .av-img svg { display: block; width: 100%; height: 100%; }
#topbar .hd-av .av-img img { object-fit: cover; object-position: 50% 22%; }
#topbar .hd-av .av-img svg { padding: 6px 6px 14px; box-sizing: border-box; }
#topbar .hd-av small { position: absolute; left: 2px; right: 2px; bottom: 2px; font: 700 9px/1 'Galmuri11', sans-serif; color: #fff; background: rgba(12,8,5,.8); padding: 2px 0; text-align: center; }
#topbar .hd-av:active { transform: translateY(1px); }
html body .title-plate { top: 0; transform: none; height: 42px; padding: 8px 4px 6px; justify-content: center; }
html body .title-plate:active { transform: translateY(1px); }
html body .title-plate .tp-bar, html body .title-plate small { display: none; }
#leftcol .side-btns { position: absolute; left: 1px; top: 50px; width: 72px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; z-index: 2; }
#leftcol .side-btn { position: relative; width: auto; height: 44px; padding: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer; animation: none;
  font: 700 10px/1 'Galmuri11', sans-serif; color: #3a2312; background: linear-gradient(#f0d9ac, #e2c08a) !important; border: 3px solid #0c0805; box-shadow: inset 0 -3px 0 rgba(0,0,0,.18), 2px 2px 0 rgba(0,0,0,.5) !important; }
#leftcol .side-btn b { display: block !important; font-size: 10px; color: #3a2312; letter-spacing: -.3px; }
#leftcol .side-btn .sb-ico svg, #leftcol .side-btn .roul-ico, #leftcol .side-btn .roul-ico svg { width: 18px; height: 18px; display: block; }
#leftcol .side-btn.ready { box-shadow: inset 0 0 0 2px #ffad3b, 2px 2px 0 rgba(0,0,0,.5) !important; }
#leftcol .side-btn::before, #leftcol .side-btn::after { display: none !important; }
#leftcol .side-btn:active { transform: translateY(1px); }
#leftcol .side-btn .rdot { position: absolute; top: -6px; right: -6px; }
#leftcol .side-btn .rdot:not(.num) { width: 12px; height: 12px; min-width: 0; padding: 0; background: #e8574a; border: 2px solid #3a1a12; }
#leftcol .side-btn .rdot.num { top: -8px; right: -7px; min-width: 16px; height: 16px; font-size: 10px; }
#leftcol .side-btn .roul-tag { bottom: -9px; font-size: 8px; }
body.sim .side-btns { display: none !important; }
html body #leftcol #btnRoulette.side-btn, html body #leftcol #btnRoulette.side-btn.ready { background: linear-gradient(#f0d9ac, #e2c08a) !important; color: #3a2312; animation: none !important; }
html body #leftcol #btnRoulette.side-btn.ready { box-shadow: inset 0 0 0 2px #ffad3b, 2px 2px 0 rgba(0,0,0,.5) !important; }
.tut-bub .tut-tap { display: block; margin-top: 8px; font-size: 12px; color: #b4480f; animation: tutBlink 1s ease-in-out infinite alternate; }
@keyframes tutBlink { from { opacity: 1; } to { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .tut-bub .tut-tap { animation: none; } }

/* 2026-11-21 결과 명판: 못 간 등급 = 꺼진 글자 + 빨간 테두리 깜빡 (노란 '켜짐'처럼 안 보이게) · 튕김 · 'n점!' */
html body .g2-tick.miss { color: rgba(255,255,255,.4); text-shadow: none; animation: none; }   /* 2026-11-21 사용자: 빨간 테두리 없앰 (꺼진 글자 + 튕김만) */
@keyframes g2MissRed { 50% { outline-color: transparent; } }
.g2-dot.bump { animation: g2Bump .36s ease-out; }
@keyframes g2Bump { 0% { transform: translate(-50%,-50%) scaleX(.7); } 60% { transform: translate(-50%,-50%) scaleX(1.12); } 100% { transform: translate(-50%,-50%); } }
.g2-short { position: absolute; top: -50px; transform: translateX(-50%); white-space: nowrap; padding: 3px 6px; font: 700 12px/1 'Galmuri11', sans-serif; color: #fff; background: #e8574a; border: 2px solid #3a1a12; animation: g2Pop .3s ease-out; }
.g2-short::after { content: ''; position: absolute; left: 50%; bottom: -7px; margin-left: -5px; border: 5px solid transparent; border-bottom: 0; border-top: 6px solid #3a1a12; }
@keyframes g2Pop { from { transform: translateX(-50%) scale(.5); opacity: 0; } to { transform: translateX(-50%); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { html body .g2-tick.miss, .g2-dot.bump, .g2-short { animation: none; } }

/* 2026-11-21 S 뜸 들이기 (play.js finale): S 눈금 앞 멈칫 → 금빛으로 뚫음 */
.g2-dot.tense { animation: g2Tense .18s ease-in-out infinite alternate; }
@keyframes g2Tense { from { transform: translate(-50%,-50%) scale(1); box-shadow: 0 0 10px var(--gc); } to { transform: translate(-50%,-50%) scale(1.35); box-shadow: 0 0 22px #ffe27a; } }
.g2-bar.tense { animation: g2BarShake .09s linear infinite; }
@keyframes g2BarShake { 0% { transform: translateX(0); } 50% { transform: translateX(1px); } 100% { transform: translateX(-1px); } }
.g2-bar.burst::after { content: ''; position: absolute; right: 2%; top: 50%; width: 30px; height: 30px; margin: -15px -15px 0 0; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, #fff 0, #ffe27a 35%, rgba(255,173,59,0) 70%); animation: g2Burst .55s ease-out; opacity: 0; }
@keyframes g2Burst { 0% { transform: scale(.3); opacity: 1; } 100% { transform: scale(5); opacity: 0; } }
.fin2.sburst .g2-plaque { animation: g2PlaqueGlow .7s ease-out; }
@keyframes g2PlaqueGlow { 0% { box-shadow: 0 0 0 3px #ffe27a, 0 0 40px #ffad3b; } 100% { box-shadow: inset 0 2px 0 rgba(255,255,255,.06), 0 6px 0 rgba(0,0,0,.45); } }
@media (prefers-reduced-motion: reduce) { .g2-dot.tense, .g2-bar.tense, .g2-bar.burst::after, .fin2.sburst .g2-plaque { animation: none; } }

/* 2026-11-21 아깝다 클로즈업: 멈춘 곳 ~ 다음 눈금 사이를 벌려서 틈과 모자란 점수를 보여 줌 (차분한 색 — S 돌파 금빛과 구분) */
.g2-bar.g2-zoom .g2-tick { transition: none; }
.g2-gap { position: absolute; top: 50%; height: 4px; margin-top: -2px; transform: translateX(-50%); pointer-events: none;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.7) 0 4px, transparent 4px 8px); opacity: 0; transition: opacity .2s; }
.g2-gap b { position: absolute; left: 50%; top: 9px; transform: translateX(-50%); white-space: nowrap; font: 700 13px/1 'Galmuri11', sans-serif; color: #fff3d6; text-shadow: 1px 1px 0 #000; }
.g2-gap.on { opacity: 1; }

/* 2026-11-21 '처음 만날 때 한 번' 안내: 막 없이 가리키기만 (tutorial.js hintCheck) */
.tut.hint { pointer-events: none; }
.tut.hint .tut-hole { box-shadow: 0 0 14px rgba(255,173,59,.8); border-width: 2px; }
.tut.hint .tut-bub { width: min(250px, calc(100vw - 32px)); padding: 9px 12px; font-size: 14px; animation: tutPop .25s ease-out; }
.hint-glow { animation: hintGlow .5s ease-in-out 3 alternate; }
@keyframes hintGlow { from { filter: brightness(1); } to { filter: brightness(1.35) drop-shadow(0 0 6px #ffad3b); } }
@media (prefers-reduced-motion: reduce) { .hint-glow, .tut.hint .tut-bub { animation: none; } }
.tut-arrow.up { border-top: 0; border-bottom: 16px solid var(--p-accent); }

/* 2026-11-21 프로필 닉네임 = 이름 바꾸기 버튼 */
.pf2 .pf-nick { display: inline-flex; align-items: center; gap: 5px; padding: 0; background: none; border: 0; cursor: pointer; font-family: inherit; font-size: 19px; font-weight: 700; color: var(--p-text); text-align: left; }
.pf2 .pf-ned { font-size: 11px; color: var(--p-muted); }

/* 2026-11-22 대표 카드 미설정: 프로필 빈 칸에 '고르기' */
.pf-av .pf-q.pick { font-size: 14px; line-height: 1.5; text-align: center; color: #ffad3b; }

/* ===== 2026-11-22 광산 지도 A+C안 (시안 https://claude.ai/artifact/QDaGZgaDfVB6pPdkkSF5PL) ===== */
/* A: 첫 화면 [◀][지도 그림 · 광산 이동][▶] */
#mineNav { flex: 1; min-width: 0; display: flex; gap: 4px; align-items: stretch; }
#mineNav #betBox { flex: 1; flex-direction: row; gap: 8px; padding: 0 8px; justify-content: center; }
#betBox .bt-txt { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
#betBox .mapico { flex: none; width: 30px; height: 24px; border: 2px solid #2a170a; box-shadow: 1px 1px 0 rgba(0,0,0,.35);
  background: linear-gradient(135deg, transparent 0 30%, #5fae47 30% 46%, transparent 46% 58%, #c88a3a 58% 72%, transparent 72%), #4aa0de; image-rendering: pixelated; }
#betBox.free .mapico { display: none; }
#betBox.free .bt-txt { align-items: center; }
html body #mineNav .mine-arr { flex: none; width: 30px; height: 64px; padding: 0; display: grid; place-items: center; cursor: pointer;
  background: linear-gradient(#e6c992, #cfa76a); border: 3px solid #2a170a; box-shadow: inset 0 -4px 0 rgba(0,0,0,.2), 2px 3px 0 rgba(0,0,0,.5); }
#mineNav .mine-arr i { width: 0; height: 0; border-top: 8px solid transparent; border-bottom: 8px solid transparent; }
#mineL i { border-right: 10px solid #3b2612; }
#mineR i { border-left: 10px solid #3b2612; }
#mineNav .mine-arr.off { opacity: .45; }
#mineNav .mine-arr:active { transform: translateY(1px); }
#mineNav .mine-arr[hidden] { display: none; }
@media (max-width: 360px) { html body #mineNav .mine-arr { width: 24px; } #betBox .mapico { display: none; } }

/* C: 지도 이름표 = 어두운 명판 (읽기 쉽고 누르기 쉽게) · 지금(노랑 테) · 추천(초록 테 + 딱지) · 잠김(흐림 + 도트 자물쇠) */
#mineMap .mm-mark { background: rgba(20,13,8,.82); border: 2px solid #6b4426; box-shadow: 2px 2px 0 rgba(0,0,0,.55); padding: 4px 8px 3px; min-width: 56px; }
#mineMap .mm-mark.cur { border-color: var(--p-accent, #ffad3b); box-shadow: 0 0 0 2px #0c0805, 0 0 10px rgba(255,173,59,.6); }
#mineMap .mm-mark.rec { border-color: #7fd36b; }
#mineMap .mm-mark.rec::after { content: '추천'; position: absolute; top: -10px; right: -10px; padding: 1px 5px; font-size: 10px; font-weight: 700; line-height: 1.2; color: #0c2a08; background: #7fd36b; border: 2px solid #0c0805; }
#mineMap .mm-mark.locked { opacity: .72; }
#mineMap .mm-lock { display: inline-block; width: 9px; height: 8px; margin-right: 3px; vertical-align: -1px; background: #c9a774; border: 1px solid #000; position: relative; }
#mineMap .mm-lock::before { content: ''; position: absolute; left: 1px; top: -5px; width: 5px; height: 4px; border: 1px solid #000; border-bottom: 0; }
#mineMap .mm-band .mm-cur { width: 16px; height: 16px; vertical-align: -3px; image-rendering: pixelated; }
/* C: 누르면 아래에서 큰 창 */
html body #mineMap .mm-pop { align-items: flex-end; padding: 0; }
html body #mineMap .mm-card { width: min(520px, 100%); border-bottom: 0; text-align: left; padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0px)); }
#mineMap .mm-card h3 { text-align: center; }
#mineMap .mm-cdh { margin: 0 0 6px; font-size: 13px; color: var(--p-muted, #c4a882); }
#mineMap .mm-cds { display: flex; gap: 6px; margin-bottom: 12px; }
#mineMap .mm-cd { flex: 1; aspect-ratio: 480 / 702; max-width: 84px; display: grid; place-items: center; background: #120d09; border: 2px solid var(--gc); color: #6b5a48; font-weight: 700; font-size: 18px; overflow: hidden; }
#mineMap .mm-cd em { font-style: normal; display: block; font-size: 12px; color: var(--gc); line-height: 1; }
#mineMap .mm-cd img { width: 100%; height: 100%; object-fit: cover; }
html body #mineMap .mm-btns { justify-content: stretch; }
#mineMap .mm-btns button { flex: 1; }
#mineMap .mm-btns .mm-close { flex: .6; }

/* ===== 2026-11-22 작은 글씨 키우기 (사용자: "글씨 작은 것 찾아서 적당히") =====
   휴대폰(390px)에서 #app 이 약 0.88 배로 줄어드는 걸 감안해 실제 보이는 크기 ≈ 11~12px 이상이 되게.
   자리가 좁은 칸(출석·룰렛·프로필)은 칸 크기 안에서 되는 만큼만. */
html body #topbar .hd-av small { font-size: 13px; padding: 2px 0 1px; letter-spacing: -.5px; }
html body #leftcol .side-btn b { font-size: 13px; letter-spacing: -.6px; }
html body #leftcol .side-btn .rdot.num { font-size: 12px; min-width: 18px; height: 18px; }
html body #leftcol .side-btn .roul-tag { font-size: 10px; }
html body #hdDexBadge #hdDexN { font-size: 15px; }
html body #hdDexBadge #hdDexOf { font-size: 13px; }
html body #betBox #betSub { font-size: 13px; }
html body .scorebox .sc-need { font-size: 13px; min-height: 13px; }
html body #panelPlay .info small, html body .scorebox > small:not(.sc-need) { font-size: 13px; }
html body .hd-lab { font-size: 13px; }
html body #btnProb { font-size: 13px; }
html body #navHome small, html body #btnRank small, html body #btnBag small, html body #btnMenu small { font-size: 13px; }
html body #brag small { font-size: 13px; }
html body .pf-mr { font-size: 12px; }
html body .pf-who small { font-size: 13px; }
html body .bdg.sm i { font-size: 10px; }
html body #mineMap .mm-mark small { font-size: 12px; }
html body .dx-rank .title-chip { font-size: 12px; }
html body .dday small { font-size: 12px; }
html body .muted > small { font-size: 12px; }
html body .wheelwrap .hub { font-size: 13px; }
html body #title #btnSim small { font-size: 12px; }
html body .oss small { font-size: 11px; }

/* ===== 2026-11-22 확률 시뮬 점검 ===== */
body.sim #mineNav, body.sim #btnProfile { display: none !important; }            /* 광산 이동 칸 빈칸 · 프로필(2026-11-22 사용자: 시뮬에선 숨김) */
html body #toast { white-space: normal; max-width: calc(100vw - 32px); width: max-content; text-align: center; line-height: 1.4; box-sizing: border-box; }
html body.sim .sim-bet small, html body.sim .sim-rec-btn small { font-size: 12px; }
html body.sim .sim-lock small { font-size: 12px; }
html body.sim .sim-tag #simExit { font-size: 12px; }
.sim-rec .sr-clear.armed { background: #7a2a14; color: #fff; }
html body.sim .sim-lock small { word-break: keep-all; text-align: center; }

/* ---------- 미터기 시안 A (2026-11-22, https://claude.ai/artifact/Jt5JZGa2AC3bWwSqpMhbcz): 곡괭이 뺌 · 빈칸에 등급 색 흐리게 · 채움 꼭대기 빛 선 ---------- */
#meterCol .mt-seg::before { content: ""; position: absolute; inset: 0; background: var(--gc); opacity: .3; pointer-events: none; }   /* color-mix 대신 (옛 앱 안 브라우저) */
#meterCol .mt-seg.cur { outline: none; box-shadow: inset 0 2px 0 rgba(0,0,0,.6); }
#meterCol .mt-lv::before { content: ""; position: absolute; left: -2px; right: -2px; top: -2px; height: 4px; background: #fff8de; box-shadow: 0 0 8px 2px #fff3b0; opacity: 0; }
#meterCol .mt-seg.cur .mt-lv::before { opacity: 1; }

/* 2026-11-22 이름 바꾸기 하루 1번 막혔을 때 [바꾸기] 버튼이 밝게 보이던 것 → 눌리지 않는 버튼은 흐리게 */
html body .rowbtn:disabled, html body .rowbtn.gold:disabled { opacity: .45; filter: grayscale(.7); cursor: not-allowed; box-shadow: none; transform: none; }

/* 2026-11-22 창 통일 (사용자 '통일'): 모든 창을 같은 폭(400)·같은 위치(위에서 5vh)에 열고, 높이는 내용만큼(넘치면 86vh 안에서 스크롤).
   예전: 큰 창은 위에 붙고 작은 창은 가운데 · 작은 창만 폭 340 → 창마다 제목 자리·폭이 달랐음. 결과 창·정산·안내 연출은 그대로 가운데 */
html body #overlay { align-items: flex-start; padding-top: max(16px, 5vh); }
html body #overlay.mid, html body #overlay:has(.fin) { align-items: center; padding-top: 16px; }
html body .modal.small { max-width: 400px; }
html body .modal { max-height: 86vh; }

/* 2026-11-25 기록 지키기 (js/ui/save.js) */
#title #btnRecover { font-size: 12px; padding: 3px 10px; background: none; border: 0; box-shadow: none; color: rgba(240,217,172,.8); text-decoration: underline; text-underline-offset: 3px; }
.savem .sv-code { margin: 8px auto 4px; padding: 12px 6px; text-align: center; font-size: 24px; letter-spacing: 2px; color: var(--p-accent); background: var(--p-well); border: 3px solid var(--p-line); user-select: all; -webkit-user-select: all; white-space: nowrap; }
.savem .sv-in { text-align: center; font-size: 20px; letter-spacing: 1px; text-transform: uppercase; }
.savem .rbtns { display: flex; gap: 8px; justify-content: center; margin-top: 8px; }
.savem .rbtns button { flex: 1; padding: 10px 4px; font: 700 14px/1 'Galmuri11', sans-serif; border: 3px solid var(--p-line); background: var(--p-raise); color: var(--p-text); }
.savem .rbtns button.red { background: var(--p-accent); color: var(--p-on-accent); }
.savem .sv-links { display: flex; gap: 8px; justify-content: center; margin-top: 4px; }
.savem .sv-links button { background: none; border: 0; color: var(--p-muted, #c4a882); text-decoration: underline; text-underline-offset: 3px; font-size: 13px; padding: 6px; }
.savem .sv-links button:disabled { opacity: .4; }

/* 2026-11-28 공개 안전장치: 비공식 팬 게임 표시 + 문의 메일 (시작 화면 맨 아래 · 설정 창 제작자 아래). 두 덩어리로 끊어 좁은 폰에서 '·' 뒤에서만 줄바꿈 */
#title .title-legal { position: absolute; left: 8px; right: 8px; bottom: calc(env(safe-area-inset-bottom, 0px) + 8px); text-align: center; font-size: 10px; line-height: 14px; color: rgba(240,217,172,.5); z-index: 3; cursor: auto; }
#title .title-legal span, .legal-in span { white-space: nowrap; }
#title .title-legal a, .legal-in a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
html body #title .tm-maker { bottom: calc(env(safe-area-inset-bottom, 0px) + 40px); }
.legal-in { margin: 0 0 4px; font-size: 11px; line-height: 16px; }
@media (max-height: 720px) { html body #title .tm-maker { display: none; } #title { gap: 8px; } }   /* 키 작은 폰: 제작자 줄은 설정 창에도 있으니 빼서 겹침 막기 */
@media (max-height: 600px) { #title .title-legal { display: none; } }   /* 아주 낮은 화면(가로 등)은 단추와 겹치므로 빼고 설정 창 줄만 */
