/* 유령 셀카 — 임시 디자인. 색·글꼴·크기는 모두 아래 변수로 모았다(Codex 화면 시안이 오면 여기를 바꾼다). */
:root {
  --c-bg: #14091f;
  --c-bg2: #2a1342;
  --c-panel: #2f1b4a;
  --c-panel-2: #432866;
  --c-text: #fff7ea;
  --c-sub: #cdb8ee;
  --c-accent: #ffd45a;
  --c-accent-d: #c8941a;
  --c-accent-text: #3a1d00;
  --c-hot: #ff6b5a;
  --c-hot-d: #b73a2e;
  --c-ok: #6ee7a8;
  --c-lock: #5a4a73;
  --font: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "PingFang SC", system-ui, sans-serif;
  --fs-title: 46px;
  --fs-h: 26px;
  --fs-body: 17px;
  --fs-small: 13px;
  --r-btn: 20px;
  --btn-h: 58px;
  /* 구역 높이(포인트). config.js 와 같은 값 */
  --safe-top: max(59px, env(safe-area-inset-top, 0px));   /* 기기 값이 있으면 그것, 없으면 고정 59 */
  --top-row: 56px;
  --buffer: 20px;
  --ad-h: 65px;
  --safe-bottom: max(34px, env(safe-area-inset-bottom, 0px));
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: #07030c; overflow: hidden; font-family: var(--font); color: var(--c-text); touch-action: none; user-select: none; -webkit-user-select: none; }
#viewport { position: fixed; inset: 0; overflow: hidden; }
#stage { position: absolute; left: 0; top: 0; width: 430px; height: 932px; transform-origin: 0 0; background: linear-gradient(180deg, var(--c-bg2), var(--c-bg)); overflow: hidden; }

/* ----- 구역 ----- */
#field { position: absolute; left: 0; top: calc(var(--safe-top) + var(--top-row)); width: 430px; height: calc(932px - var(--safe-top) - var(--top-row) - var(--buffer) - var(--ad-h) - var(--safe-bottom)); overflow: hidden; background: #000; }
#game { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#topbar { position: absolute; left: 0; top: var(--safe-top); width: 430px; height: var(--top-row); display: flex; align-items: center; justify-content: space-between; padding: 0 10px; gap: 8px; pointer-events: none; z-index: 6; }
#topbar > * { pointer-events: auto; }
#overlay { z-index: 4; position: absolute; left: 0; top: var(--safe-top); width: 430px; height: calc(932px - var(--safe-top) - var(--buffer) - var(--ad-h) - var(--safe-bottom)); display: none; }
#overlay.on { display: block; }
#adzone { position: absolute; left: 0; bottom: var(--safe-bottom); width: 430px; height: var(--ad-h); }
#ad { width: 100%; height: 100%; }
.ad-box { width: 100%; height: 100%; background: #6f6f78; color: #e9e9ee; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 800; letter-spacing: 4px; }

/* ----- 단추: 면으로 채운 굵은 모양 ----- */
.btn { appearance: none; border: 0; cursor: pointer; font-family: var(--font); font-weight: 900; font-size: var(--fs-body); color: var(--c-accent-text); background: var(--c-accent); border-radius: var(--r-btn); min-height: var(--btn-h); padding: 0 22px; box-shadow: 0 6px 0 var(--c-accent-d); display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--c-accent-d); }
.btn.alt { background: var(--c-panel-2); color: var(--c-text); box-shadow: 0 6px 0 #25123c; }
.btn.hot { background: var(--c-hot); color: #fff; box-shadow: 0 6px 0 var(--c-hot-d); }
.btn.big { min-height: 68px; font-size: 22px; width: 100%; }
.btn.round { width: 46px; height: 46px; min-height: 46px; padding: 0; border-radius: 50%; box-shadow: 0 4px 0 var(--c-accent-d); }
.btn.round.alt { box-shadow: 0 4px 0 #25123c; }
.btn[disabled], .btn.off { background: var(--c-lock); color: #a899c0; box-shadow: 0 6px 0 #3b2d52; }
.btn svg { width: 24px; height: 24px; fill: currentColor; flex: none; }
.btn.shutter { width: 72px; height: 72px; border-radius: 50%; padding: 0; background: #fff; box-shadow: 0 6px 0 #b9b2c9, 0 0 0 8px rgba(255,255,255,0.35); color: #3a1d00; }
.btn.shutter svg { width: 34px; height: 34px; }

/* ----- 메뉴 화면 ----- */
.screen { position: absolute; inset: 0; padding: 66px 18px 0; display: flex; flex-direction: column; background: linear-gradient(180deg, rgba(20,9,31,0.97), rgba(42,19,66,0.97)); overflow: hidden; }
.screen.clear { background: rgba(20,9,31,0.82); }
.screen h1 { margin: 0; font-size: var(--fs-title); font-weight: 900; letter-spacing: -1px; color: var(--c-accent); text-shadow: 0 5px 0 #6a3a00; text-align: center; }
.screen h2 { margin: 0 0 4px; font-size: var(--fs-h); font-weight: 900; text-align: center; }
.screen .sub { color: var(--c-sub); text-align: center; font-size: var(--fs-body); margin: 4px 0 0; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.title-art { height: 190px; display: flex; align-items: center; justify-content: center; }
.title-art canvas { width: 170px; height: 170px; }
.title-wrap { margin-top: 24px; display: flex; flex-direction: column; gap: 10px; }
.scroll { flex: 1; overflow-y: auto; padding: 8px 0 14px; touch-action: pan-y; scrollbar-width: none; }
.scroll::-webkit-scrollbar { display: none; }
.card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.card { background: var(--c-panel); border-radius: 22px; padding: 14px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; min-height: 150px; justify-content: center; border: 4px solid transparent; cursor: pointer; font-weight: 800; }
.card.sel { border-color: var(--c-accent); }
.card.locked { background: #261838; color: #7d6a99; cursor: default; }
.card .thumb { width: 84px; height: 84px; border-radius: 50%; background: var(--c-panel-2); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.card .thumb img { width: 118%; height: 118%; object-fit: cover; object-position: center 20%; }
.card .thumb svg { width: 44px; height: 44px; fill: #cdb8ee; }
.mcard { min-height: 108px; align-items: flex-start; text-align: left; padding: 12px 14px; position: relative; }
.mcard .num { font-size: 26px; font-weight: 900; color: var(--c-accent); line-height: 1; }
.mcard .nm { font-size: 15px; line-height: 1.25; }
.stars { display: flex; gap: 3px; }
.stars svg { width: 20px; height: 20px; fill: #3a2a55; stroke: #d9c8f5; stroke-width: 2.2; stroke-linejoin: round; }
.stars svg.on { fill: #ffd45a; stroke: #b7790a; }
.stars.big svg { width: 54px; height: 54px; }
.stars.big svg.on { animation: pop .5s both; }
@keyframes pop { from { transform: scale(0.2) rotate(-40deg); opacity: 0; } to { transform: scale(1) rotate(0); opacity: 1; } }
.dex-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.dex-cell { background: var(--c-panel); border-radius: 16px; padding: 6px 4px 8px; text-align: center; font-size: 11px; font-weight: 800; line-height: 1.2; min-height: 108px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.dex-cell canvas { width: 70px; height: 70px; }
.dex-cell.unk { color: #7d6a99; }
.row { display: flex; gap: 12px; align-items: center; }
.row > .btn { flex: 1; }
.opt { background: var(--c-panel); border-radius: 20px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.opt .lab { font-weight: 900; font-size: 18px; }
.avpick { display: flex; gap: 8px; flex-wrap: wrap; }
.avpick button { flex: none; width: 50px; height: 50px; border-radius: 50%; padding: 0; overflow: hidden; background: var(--c-panel-2); border: 4px solid transparent; cursor: pointer; }
.avpick button.on { border-color: var(--c-accent); }
.avpick img { width: 118%; height: 118%; object-fit: cover; object-position: center 20%; margin: -9% 0 0 -9%; display: block; }
.opt .note { color: var(--c-sub); font-size: var(--fs-small); }
.seg { display: flex; gap: 8px; }
.seg .btn { min-height: 48px; flex: 1; padding: 0 8px; box-shadow: 0 4px 0 #25123c; background: var(--c-panel-2); color: var(--c-text); }
.seg .btn.on { background: var(--c-accent); color: var(--c-accent-text); box-shadow: 0 4px 0 var(--c-accent-d); }
.privacy { margin-top: 6px; padding: 12px 14px; border-radius: 16px; background: #1c0f2e; color: var(--c-sub); font-size: 14px; font-weight: 700; text-align: center; }
.complete-body { margin-top: 24px; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.stat { display: flex; justify-content: space-between; width: 100%; background: var(--c-panel); border-radius: 16px; padding: 12px 16px; font-weight: 800; }
.newrow { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.newrow .nghost { background: var(--c-panel-2); border-radius: 16px; padding: 6px; font-size: 11px; font-weight: 800; text-align: center; width: 84px; }
.newrow canvas { width: 64px; height: 64px; }
.photo-img { width: 100%; max-height: 520px; object-fit: contain; border-radius: 20px; background: #000; }

/* ----- 놀이판 위 표시 ----- */
#hud { position: absolute; left: 0; top: 0; width: 100%; padding: 8px 12px; display: flex; flex-direction: column; gap: 6px; pointer-events: none; text-shadow: 0 2px 0 rgba(0,0,0,0.7); }
#hud .line { display: flex; justify-content: space-between; font-weight: 900; font-size: 18px; }
#hud .bar { height: 10px; border-radius: 6px; background: rgba(0,0,0,0.5); overflow: hidden; }
#hud .bar i { display: block; height: 100%; background: var(--c-accent); }
#field-tools { position: absolute; inset: 0; pointer-events: none; }
#field-tools > * { pointer-events: auto; }
.chips { position: absolute; left: 8px; right: 8px; top: 8px; display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: none; touch-action: pan-x; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; width: 56px; height: 56px; border-radius: 16px; background: rgba(47,27,74,0.92); border: 4px solid transparent; padding: 0; overflow: hidden; }
.chip.on { border-color: var(--c-accent); }
.chip canvas { width: 100%; height: 100%; display: block; }
.pose-hint { position: absolute; left: 0; right: 0; top: 140px; text-align: center; font-weight: 900; text-shadow: 0 2px 0 #000; font-size: 16px; pointer-events: none; }
.shutter-pos { position: absolute; right: 14px; top: 330px; }
#placeholder-tag { position: absolute; right: 8px; top: 8px; font-size: 11px; font-weight: 800; background: rgba(0,0,0,0.55); color: #ffd45a; padding: 3px 8px; border-radius: 10px; display: none; pointer-events: none; z-index: 3; }
#countdown { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; font-size: 150px; font-weight: 900; color: #fff; text-shadow: 0 8px 0 rgba(0,0,0,0.6); pointer-events: none; }
#flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
#flash.go { animation: flash .45s ease-out; }
@keyframes flash { 0% { opacity: 1; } 100% { opacity: 0; } }
#toast { z-index: 20; position: absolute; left: 20px; right: 20px; top: 120px; padding: 14px 16px; background: rgba(20,9,31,0.94); border-radius: 18px; font-weight: 800; text-align: center; font-size: 16px; display: none; z-index: 20; border: 4px solid var(--c-accent); }

/* ----- 가짜 얼굴 조작판 ----- */
.fake-panel { position: absolute; left: 8px; right: 8px; top: 64px; background: rgba(20,9,31,0.78); border-radius: 14px; padding: 6px 8px 6px; }
.fake-handle { appearance: none; border: 0; background: var(--c-panel-2); color: var(--c-accent); font: 900 11px var(--font); padding: 5px 10px; border-radius: 10px; }
.fake-panel.collapsed { right: auto; background: transparent; padding: 0; }
.fake-panel.collapsed .fake-body { display: none; }
.fake-body { margin-top: 4px; }
.fake-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 4px; }
.fake-btn { appearance: none; border: 0; border-radius: 8px; background: var(--c-panel-2); color: var(--c-text); font-size: 11px; font-weight: 800; padding: 6px 2px; font-family: var(--font); }
.fake-btn.on { background: var(--c-accent); color: var(--c-accent-text); }
.fake-hint { font-size: 10px; color: var(--c-sub); margin-top: 4px; }

/* 첫 미션 안내 */
#tip { position: absolute; left: 24px; right: 24px; top: 112px; padding: 12px 14px; border-radius: 18px; background: rgba(20,9,31,0.88); color: var(--c-accent); font-weight: 900; font-size: 19px; text-align: center; display: none; pointer-events: none; border: 4px solid var(--c-accent); z-index: 3; }

/* ===== 공포판 「마지막 방송」 ===== */
#adzone.dark #ad .ad-box { background: #000; color: #000; }
#adzone.dark { background: #000; }
.screen.black { background: #000; }
.screen.black-clear { background: rgba(0,0,0,0.88); }
.warn { justify-content: flex-start; }
.warn-count { color: #6d6d75; font-weight: 800; text-align: center; margin-top: 24px; }
.warn-t { color: #fff; font-size: 30px; margin-top: 56px !important; font-weight: 900; }
.warn-b { color: #e8e4dc; font-size: 19px; line-height: 1.6; text-align: center; margin: 28px 6px 0; font-weight: 600; }
.warn-ear { color: #6ee7a8; text-align: center; font-weight: 800; margin-top: 16px; min-height: 22px; }
.warn-dots { display: flex; gap: 10px; justify-content: center; margin-top: 34px; }
.warn-dots i { width: 12px; height: 12px; border-radius: 50%; background: #3a3a40; display: block; }
.warn-dots i.on { background: #fff; }
.warn-btn { margin-top: 34px; }
.htitle { align-items: stretch; }
.h-title { color: #f3efe6; font-size: 54px !important; text-shadow: 0 0 22px rgba(200,20,20,0.55) !important; margin-top: 110px !important; letter-spacing: 2px !important; }
.h-subtitle { color: #8d8a82; text-align: center; font-size: 15px; margin: 10px 0 0; letter-spacing: 6px; }
.h-rec-dot { position: absolute; left: 20px; top: 66px; display: flex; align-items: center; gap: 8px; color: #e8e4dc; font-weight: 900; }
.h-rec-dot i { width: 14px; height: 14px; border-radius: 50%; background: #e02020; animation: blink 1.1s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }
.htitle .title-wrap { margin-top: 70px; }
.btn.hot { background: #b3261e; color: #fff; box-shadow: 0 6px 0 #6e1410; }

/* 방송 화면 틀 */
.h-pill { display: inline-flex; align-items: center; gap: 7px; background: rgba(0,0,0,0.55); color: #fff; padding: 6px 12px; border-radius: 18px; font-weight: 900; font-size: 15px; text-shadow: 0 1px 0 #000; }
.h-rec .h-dot { width: 13px; height: 13px; border-radius: 50%; background: #ff2a2a; display: block; animation: blink 1s steps(2, start) infinite; }
.h-rec b { font-size: 14px; letter-spacing: 1px; }
.h-live { font-variant-numeric: tabular-nums; font-size: 14px; }
.h-right { display: flex; align-items: center; gap: 8px; }
.h-clock { color: #fff; font-weight: 900; font-size: 15px; text-shadow: 0 1px 0 #000; font-variant-numeric: tabular-nums; }
.h-batt { position: relative; width: 34px; height: 17px; border-radius: 4px; background: rgba(0,0,0,0.55); padding: 2px; }
.h-batt::after { content: ''; position: absolute; right: -4px; top: 5px; width: 3px; height: 7px; background: #cfcfcf; border-radius: 1px; }
.h-batt-fill { display: block; height: 100%; width: 100%; background: #e8e8e8; border-radius: 2px; }
.h-batt.low .h-batt-fill { background: #ff4b3a; }
.h-row { display: flex; gap: 8px; padding: 0; }
#hud:has(.h-row) { padding: 8px 10px; }
.h-ico { display: inline-flex; width: 18px; height: 18px; }
.h-ico svg { width: 100%; height: 100%; fill: #fff; }
.h-art { width: 18px; height: 18px; object-fit: contain; }
.h-heart .h-ico svg { fill: #ff4b5a; }
.h-heart.hot b { color: #ff7a6a; }
.h-heart .beat { animation: beat .35s ease-out; }
@keyframes beat { 0% { transform: scale(1); } 30% { transform: scale(1.45); } 100% { transform: scale(1); } }
.h-hint { position: absolute; left: 0; right: 0; top: 176px; text-align: center; color: #fff; font-weight: 800; font-size: 15px; text-shadow: 0 2px 0 #000, 0 0 8px #000; display: none; pointer-events: none; }
.h-chat { position: absolute; left: 8px; bottom: 10px; width: 290px; display: flex; flex-direction: column; gap: 4px; pointer-events: none; }
.h-cm { background: rgba(0,0,0,0.55); color: #fff; padding: 5px 10px; border-radius: 12px; font-size: 14px; line-height: 1.3; animation: cm-in .35s ease-out; transition: opacity 1.2s; }
.h-cm b { color: #ffd45a; font-weight: 900; }
.h-cm.old { opacity: 0.45; }
@keyframes cm-in { from { transform: translateY(18px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.h-flip { position: absolute; right: 10px; top: 300px; width: 58px !important; height: 58px !important; background: #fff; color: #3a1d00; animation: pulse 1s infinite alternate; }
@keyframes pulse { to { transform: scale(1.12); } }

#stage.black { background: #000; }
.h-end { position: absolute; left: 50%; top: 120px; transform: translateX(-50%); background: #b3261e; color: #fff; box-shadow: 0 6px 0 #6e1410; }
.screen.result .stat { margin-bottom: 8px; }
.res-t { margin-top: 20px !important; color: #fff; }
.res-rows { margin-top: 24px; }

/* 선물 알림 띠(중국 편, ANTIGRAVITY-020): 화면 위쪽(맨 위 12% 안). 아래쪽(광고 띠 근처)에는 단추를 두지 않는다. 면과 글자만. */
.h-gift { position: absolute; left: 84px; right: 10px; top: 38px; height: 40px; display: none; align-items: center; gap: 8px; padding: 4px 6px 4px 10px; background: rgba(14,9,9,0.86); border-radius: 8px; color: #fff; font-weight: 800; font-size: 13px; text-shadow: 0 1px 0 #000; pointer-events: auto; }
.h-gift .h-ico { width: 22px; height: 22px; flex: none; }
.h-gift .h-ico svg { fill: none; }
.h-gift-t { flex: 1; line-height: 1.2; }
.h-gift .h-gift-btn { min-width: 64px; min-height: 30px; height: 30px; padding: 0 12px; font-size: 14px; background: #b3261e; color: #fff; box-shadow: none; border-radius: 6px; }
/* 방울 단추(중국 편 대장전 구령 사이, CLAUDE-030): 화면 위쪽 왼쪽. 글자 단추. 아래쪽(광고 띠 근처)에는 단추를 두지 않는다. */
.h-bell { position: absolute; left: 10px; top: 128px; min-width: 64px; min-height: 36px; height: 36px; padding: 0 14px; font-size: 15px; background: #8a6a1e; color: #fff8dd; box-shadow: 0 4px 0 #4f3b0e; border-radius: 8px; }

/* 손전등 전지 띠·충전 단추·새 장면 표시·REPLAY 표시(미국 편, CLAUDE-034): 모두 화면 위쪽. 면과 글자만(가는 선 아이콘·이모지 없음). 아래쪽(광고 띠 근처)에는 단추를 두지 않는다. */
.h-lbar { position: absolute; left: 10px; top: 44px; width: 250px; height: 16px; background: rgba(0,0,0,0.62); border-radius: 4px; padding: 2px; box-sizing: border-box; pointer-events: none; display: none; }
.h-lbar-fill { display: block; height: 100%; width: 100%; background: #e8e0b4; border-radius: 2px; }
.h-lbar.low .h-lbar-fill { background: #ff6a4a; }
.h-lbar.charging .h-lbar-fill { background: #8fe3a6; }
.h-charge { position: absolute; left: 270px; top: 36px; min-width: 64px; min-height: 32px; height: 32px; padding: 0 14px; font-size: 14px; background: #3d4a3f; color: #eaf3e6; box-shadow: 0 3px 0 #1d251e; border-radius: 6px; }
.h-newscene { position: absolute; left: 10px; top: 64px; padding: 2px 8px; font-size: 13px; font-weight: 900; color: #fff3c8; background: rgba(60,40,10,0.7); border-radius: 4px; pointer-events: none; display: none; }
.h-at { color: #f3d98a; font-weight: 800; }
.h-rec.replay .h-dot { width: 12px; height: 13px; border-radius: 0; background: #e8e4dc; clip-path: polygon(0 0, 100% 50%, 0 100%); animation: none; }   /* ▶ 는 CSS 로 그린 세모 */

/* 공포판 제목 화면: 귀신 생방송 (CODEX-011 제목 화면 01) */
.screen.black.htitle { background: #000 url('assets/horror/title/title-art.jpg') center top / cover no-repeat; }
.htitle.lg-ko .h-title, .htitle.lg-en .h-title { height: 150px; color: transparent !important; text-shadow: none !important; background: center / contain no-repeat; margin-top: 84px !important; overflow: hidden; }
.htitle.lg-ko .h-title { background-image: url('assets/horror/title/logo-ko.webp'); }
.htitle.lg-en .h-title { background-image: url('assets/horror/title/logo-en.webp'); }
.htitle .h-subtitle { color: #b9b4a8; text-shadow: 0 1px 6px #000; letter-spacing: 3px; }
.htitle .btn { background: rgba(24,27,30,0.92) !important; border-color: #33383d !important; box-shadow: none !important; color: #ece8df !important; border-radius: 6px !important; }
.htitle .btn.hot { background: #a8261f !important; border-color: #c93a31 !important; }

/* 편 고르기(CLAUDE-015): 글자와 면만. 단추는 위~가운데에, 아래(광고 띠 근처)에는 두지 않는다 */
.eps { align-items: stretch; background: #000 url('assets/horror/title/title-art.jpg') center top / cover no-repeat; }
.eps .eps-t { margin-top: 44px; color: #f3efe6; text-shadow: 0 2px 8px #000; }
.eps .eps-ready { margin-top: 26px; gap: 12px; }
.eps .btn.ep span { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.eps .btn.ep { display: flex; justify-content: flex-start; min-height: 76px; padding: 10px 18px; background: rgba(24,27,30,0.92); border: 1px solid #33383d; box-shadow: none; color: #ece8df; border-radius: 6px; text-align: left; }
.eps .btn.ep .ep-t { font-size: 22px; font-weight: 900; }
.eps .btn.ep .ep-s { font-size: 15px; font-style: normal; font-weight: 700; color: #b9b4a8; }
.eps .eps-soon { margin-top: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.eps .ep-soon { display: flex; flex-direction: column; gap: 2px; padding: 8px 14px; min-height: 46px; background: rgba(16,18,20,0.7); border: 1px solid #23272b; border-radius: 6px; color: #6f6c64; opacity: 0.6; }
.eps .ep-soon .ep-t { font-size: 16px; font-weight: 900; }
.eps .ep-soon .ep-s { font-size: 12px; font-style: normal; font-weight: 700; }
.eps .eps-back { margin-top: 22px; }
.eps .eps-back .btn { background: rgba(24,27,30,0.92); border: 1px solid #33383d; box-shadow: none; color: #ece8df; border-radius: 6px; }
.h-hint.low { top: 232px; }

/* 오프닝 영상(CLAUDE-029): 덮개(#overlay)와 같은 자리·크기. 제목 배경 그림과 같은 방식(위 가운데 기준, 채우고 자름)이라 끝 프레임이 제목 화면과 맞는다. 광고 띠는 건드리지 않는다. */
.opening { position: absolute; left: 0; top: var(--safe-top); width: 430px; height: calc(932px - var(--safe-top) - var(--buffer) - var(--ad-h) - var(--safe-bottom)); z-index: 8; background: #000; overflow: hidden; }
.opening-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; background: #000; display: block; }
.opening-skip { position: absolute; right: 12px; top: 64px; appearance: none; border: 0; border-radius: 6px; padding: 8px 14px; min-height: 36px; font-family: var(--font); font-size: 14px; font-weight: 800; color: #ece8df; background: rgba(24,27,30,0.78); cursor: pointer; }

/* 방송 시험(CLAUDE-036): 단추는 모두 화면 위쪽~가운데. 아래 광고 띠 근처에는 두지 않는다. */
.screen.rehearsal { justify-content: center; align-items: center; text-align: center; gap: 12px; padding-top: 0; }
.screen.rehearsal .rh-p { max-width: 330px; line-height: 1.5; }
.screen.rehearsal .rh-start { width: 260px; margin-top: 18px; }
.btn.rh-skip { margin-left: auto; min-height: 46px; padding: 0 16px; font-size: 15px; box-shadow: 0 4px 0 #25123c; }
.btn.rh-yes { position: absolute; left: 155px; top: 112px; width: 120px; min-height: 56px; font-size: 22px; }

/* 귀신 도감 · 오늘의 괴담(CLAUDE-038): 단추는 상단 줄과 가운데에만. 아래 광고 띠 근처에는 두지 않는다. 면과 글자만(이모지·가는 선 아이콘 없음). */
.htitle .title-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.htitle .btn.tr-btn { min-height: 62px; padding: 6px 8px; font-size: 15px; }
.btn.tr-btn span { display: flex; flex-direction: column; align-items: center; gap: 3px; line-height: 1.2; }
.btn.tr-btn .tr-t { font-size: 18px; font-weight: 900; }
.btn.tr-btn .tr-s { font-size: 12px; font-style: normal; font-weight: 700; color: #b9b4a8; }
.btn.dx-back, .btn.dx-gc { min-height: 46px; padding: 0 16px; font-size: 15px; box-shadow: 0 4px 0 #25123c; }
.btn.dx-gc { margin-left: auto; }
.screen.dexb { padding-top: 62px; }
.dexb .gd-t { margin-top: 0; color: #f3efe6; }
.dexb .gd-count { font-size: 24px; font-weight: 900; color: #fff; margin-top: 2px; }
.dexb .gd-sub { font-size: 13px; margin-top: 0; }
.dexb .gd-scroll { flex: 1; min-height: 0; margin-top: 10px; overflow-y: auto; overflow-x: hidden; touch-action: pan-y; -webkit-overflow-scrolling: touch; }
.dexb .gd-scroll::after { content: ''; display: block; height: 20px; }
.dexb .gd-ep { margin: 10px 2px 6px; color: #b9b4a8; font-weight: 900; font-size: 14px; letter-spacing: 2px; }
.dexb .gd-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gd-cell { appearance: none; border: 1px solid #2c3136; background: #101214; border-radius: 6px; padding: 0; color: #ece8df; font-family: var(--font); display: flex; flex-direction: column; align-items: stretch; text-align: center; overflow: hidden; min-height: 132px; cursor: pointer; }
.gd-cell.locked { cursor: default; justify-content: flex-start; }
.gd-black { display: block; height: 84px; background: #000; }
.gd-imgbox { display: block; height: 84px; overflow: hidden; background: #000; }
.gd-img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; filter: brightness(0.42) contrast(1.05); display: block; }
.gd-cell.beaten .gd-img { filter: brightness(0.6) contrast(1.05); }
.gd-name { display: block; font-size: 13px; font-weight: 900; padding: 6px 4px 0; line-height: 1.25; }
.gd-weak { display: block; font-style: normal; font-size: 11px; font-weight: 700; color: #e0b86a; padding: 2px 4px 6px; }
.gd-cell.locked .gd-name { color: #5d6166; font-size: 18px; padding-top: 12px; }
.gd-card { position: absolute; inset: 0; z-index: 9; background: rgba(0,0,0,0.96); display: flex; flex-direction: column; }
.gd-big { width: 100%; height: 330px; object-fit: cover; object-position: center 20%; filter: brightness(0.72); display: block; flex: none; }
.btn.gd-close { position: absolute; right: 12px; top: 10px; min-height: 42px; padding: 0 16px; font-size: 15px; box-shadow: 0 4px 0 #25123c; }
.gd-body { padding: 14px 18px 0; overflow-y: auto; touch-action: pan-y; }
.gd-cname { margin: 0 0 8px; font-size: 24px; font-weight: 900; text-align: center; color: #f3efe6; }
.gd-lore { margin: 0 0 14px; font-size: 16px; line-height: 1.55; color: #cfcac0; text-align: center; }
.gd-row { margin: 0 0 8px; font-size: 15px; }
.gd-v { color: #e0b86a; }
.dailyscr { align-items: stretch; padding-top: 62px; }
.dailyscr .dl-t { margin-top: 0; color: #f3efe6; }
.dailyscr .dl-locked { margin-top: 28px; font-size: 18px; line-height: 1.5; padding: 0 12px; }
.dailyscr .dl-have { font-size: 26px; font-weight: 900; color: #fff; }
.dailyscr .dl-v { margin: 14px 0 0; text-align: center; font-size: 26px; font-weight: 900; color: #e0b86a; }
.dailyscr .dl-vd { margin: 4px 0 14px; }
.dailyscr .dl-flag.on { color: #8ee0a8; }
.dailyscr .dl-meta { margin: 8px 0 14px; font-size: 14px; }
.dailyscr .dl-start { margin: 0 auto; width: 260px; min-height: 60px; }
.dailyscr .dl-scene { margin-top: 18px; font-size: 13px; letter-spacing: 2px; }
.dailyscr .dl-card { margin: 8px auto 0; width: 260px; border: 1px solid #2c3136; border-radius: 6px; overflow: hidden; background: #101214; text-align: center; }
.dailyscr .dl-img { width: 100%; height: 130px; object-fit: cover; object-position: center 22%; filter: brightness(0.5); display: block; }
.dailyscr .dl-name { display: block; padding: 8px 6px; font-size: 15px; font-weight: 900; }
.dailyres .dl-note { margin-top: 12px; font-size: 14px; }

/* CODEX-042 web: use the full game height; site advertising owns its own layout. */
:root { --ad-h: 0px; }
#adzone, #ad { display: none !important; }
body:has(#pw-gate) #viewport { visibility: hidden; }
#web-loading { position: fixed; inset: 0; z-index: 20000; display: flex; flex-direction: column; gap: 20px; align-items: center; justify-content: center; color: #fff; background: #08080e; font: 700 22px system-ui; }
#web-loading button { font: inherit; padding: 16px; }

/* Camera-free photographer controls: above the command and ghost target. */
.h-boss-alt { position: absolute; left: 10px; right: 90px; top: 52px; display: none; flex-wrap: wrap; gap: 8px; }
.h-boss-alt small { width: 100%; color: #fff; font-size: 13px; line-height: 1.4; text-shadow: 0 2px 2px #000; }
.h-boss-alt .btn { min-height: 44px; padding: 8px 16px; font-size: 15px; touch-action: none; user-select: none; }
