/* cinema.css — 리디자인 「シネマ(영화 포스터)」 기본층(2026-11-14). 토큰·기본 요소. 담당 1 소유.
   시안: hana-mystery-design/02_cinema (index.html·NOTE.md). 기준 문서: docs/DESIGN_CINEMA.md · 쓰는 법: docs/CINEMA_STATUS.md 「담당 1」
   순서: app.css(옛 규칙, 옛 변수는 여기 토큰으로 이어 둠) → shop.css → cinema.css(이 파일) → cinema-<영역>.css(영역 담당) */

/* ───────── 1. 토큰 ───────── */
:root {
  --c-bg: #0b0a09; --c-bg2: #14110e; --c-surface: #1c1814; --c-surface2: #24201a; --c-line: rgba(244, 237, 225, .12);
  --c-line2: rgba(255, 232, 196, .18); /* 버튼 테두리·눈에 띄어야 하는 구분선 */
  --c-text: #f4ede1; --c-text2: #b9ad98; --c-text3: #7b7264; /* text3 은 장식·큰 글자만(작은 글자 대비 4.5:1 미달) */
  --c-gold: #e8b54d; --c-gold-hi: #ffd98a; --c-gold-deep: #9c7023; --c-amber: #f39a2b; --c-red: #e2483d; --c-green: #5fbf7a;
  --c-on-gold: #1d1405; /* 금색 바탕 위 글자 */
  --c-ink-print: #2a2420; /* 종이·폴라로이드처럼 밝은 「물건」 위 글자(밝은 바탕을 일부러 둔 곳만) */
  --c-glass: rgba(18, 15, 12, .52); --c-glass-solid: rgba(22, 18, 14, .94); /* backdrop-filter 못 쓰는 WebView 대체 */
  --c-glass-line: rgba(255, 226, 180, .16);
  --c-scrim: rgba(5, 4, 3, .62); /* 창 뒤 어두운 막 */
  --g-gold: linear-gradient(180deg, #ffd98a 0%, #e8b54d 48%, #c88f2c 100%);
  --g-sheet: linear-gradient(180deg, #1b1712 0%, #110e0b 40%);
  --blur: 20px;
  --f-title: "Shippori Mincho B1", "Shippori Mincho", "Noto Serif SC", serif;
  --f-ui: "Zen Kaku Gothic New", "Noto Sans KR", "Noto Sans SC", system-ui, sans-serif;
  --f-num: "Oswald", "Zen Kaku Gothic New", "Noto Sans KR", sans-serif;
  --r-card: 14px; --r-sheet: 22px; --r-pill: 999px;
  --shadow-card: 0 10px 30px rgba(0, 0, 0, .55);
  --shadow-gold: 0 10px 30px rgba(232, 170, 60, .35), inset 0 1px 0 rgba(255, 255, 255, .6);
  --c-grain: .07; /* 필름 그레인 세기. 주의: --grain 은 app.css 의 옛 이름(배경 그림 자리)이라 쓰지 않는다 */
}
/* 언어별 글꼴: 한국어는 한글 명조(Noto Serif KR)·고딕(Noto Sans KR), 중국어는 간체자 글꼴(일본 글꼴의 한자 모양이 섞이지 않게) */
html[data-lang='ko'] {
  --f-title: "Noto Serif KR", "Shippori Mincho B1", serif;
  --f-ui: "Noto Sans KR", "Zen Kaku Gothic New", system-ui, sans-serif;
  --f-num: "Oswald", "Noto Sans KR", sans-serif;
}
html[data-lang='zh'] {
  --f-title: "Noto Serif SC", "Noto Sans SC", serif;
  --f-ui: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --f-num: "Oswald", "Noto Sans SC", sans-serif;
}
html[data-lang='en'] { --f-title: "Shippori Mincho B1", Georgia, serif; }

/* ───────── 2. 바탕 · 필름 그레인 ───────── */
:root { color-scheme: only dark; background: var(--c-bg); }
body { background: var(--c-bg); color: var(--c-text); font-family: var(--f-ui), var(--f-sym), sans-serif; }
.app { background: var(--c-bg); color: var(--c-text); }
@media (min-aspect-ratio: 9/16) and (min-width: 600px) {
  body { background: radial-gradient(1200px 600px at 20% -10%, #2a1d0c 0%, transparent 60%), #050505; }
  .app { box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 30px 80px rgba(0, 0, 0, .7); }
}
/* 필름 그레인: 화면 전체 위에 한 장(누름은 통과). 스크롤해도 따라 움직이지 않게 fixed
   성능(PERF 11/30): 화면 전체 mix-blend-mode 레이어는 프레임마다 아래 화면 전체를 다시 섞어 휴대폰 WebView 가 느려진다(트레이스 합성 시간 −33%).
   어두운 화면에서 보이는 차이는 평균 밝기 0.8/255 뿐이라 마우스 기기(데스크톱)에서만 깐다 */
@media not ((hover: hover) and (pointer: fine)) { body::after { display: none !important; } }
body::after {
  content: ""; position: fixed; inset: 0; z-index: 2147483000; pointer-events: none;
  opacity: var(--c-grain); mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
@media print { body::after { display: none; } }
::selection { background: rgba(232, 181, 77, .38); color: var(--c-text); }
:focus-visible { outline-color: var(--c-gold); }
.app, .sheet-body, .panel { scrollbar-color: rgba(255, 232, 196, .22) transparent; }

/* ───────── 3. 유리 · 글자 도우미 ───────── */
/* 유리 판: 사진 위 단추·막대·패널. blur 를 못 쓰면 거의 불투명한 어두운 판 */
.c-glass { background: var(--c-glass-solid); border: 1px solid var(--c-glass-line); }
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .c-glass { background: var(--c-glass); -webkit-backdrop-filter: blur(var(--blur)) saturate(140%); backdrop-filter: blur(var(--blur)) saturate(140%); }
}
.c-title { font-family: var(--f-title), var(--f-sym), serif; font-weight: 800; letter-spacing: .06em; line-height: 1.2; }
.c-num { font-family: var(--f-num); font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
/* 작은 금색 머리말(「つづきから ─ 中級 05」): 앞에 호박색 점은 <i class="c-dot"></i> */
.c-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .18em; color: var(--c-gold); line-height: 1.4; }
.c-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--c-amber); box-shadow: 0 0 10px var(--c-amber); }
/* 구역 머리(「レベルをえらぶ ··· 解決 11 / 80」) */
.c-sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 12px; padding: 0 20px; }
.c-sec-h > h2, .c-sec-h > h3 { margin: 0; font-family: var(--f-title), serif; font-weight: 700; font-size: 19px; letter-spacing: .08em; line-height: 1.3; color: var(--c-text); }
.c-sec-h > span { font-size: 12px; color: var(--c-text2); letter-spacing: .06em; white-space: nowrap; }
/* 진행 막대: <div class="c-meter"><i style="width:42%"></i></div> */
.c-meter { height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.c-meter > i { display: block; height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--c-gold), var(--c-amber)); }
/* 작은 꼬리표(「1話 3〜5分」「プレイ中」) */
.c-tag { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; letter-spacing: .04em; line-height: 1.2; white-space: nowrap; color: var(--c-text); background: rgba(0, 0, 0, .5); border: 1px solid rgba(255, 255, 255, .14); }
.c-tag--now { background: var(--c-amber); color: #1d1203; border-color: transparent; }
.c-tag--gold { background: rgba(232, 181, 77, .12); color: var(--c-gold-hi); border-color: rgba(232, 181, 77, .35); }

/* ───────── 4. 버튼 ───────── */
.btn { font-family: var(--f-ui), sans-serif; font-weight: 700; letter-spacing: .06em; min-height: 48px; color: var(--c-text); }
.btn .ico { stroke-width: 2; }
/* 주 버튼 = 금색(「再開する」「ヒントを見る」) */
.btn--primary { background: var(--g-gold); color: var(--c-on-gold); box-shadow: var(--shadow-gold); }
.btn--primary:disabled { opacity: 1; background: rgba(255, 255, 255, .08); color: var(--c-text3); box-shadow: none; }
/* 보조 = 얇은 테두리, 유리 = 사진 위 */
.btn--ghost { background: transparent; color: var(--c-text); box-shadow: inset 0 0 0 1px var(--c-line2); }
.btn--glass { color: var(--c-text); background: var(--c-glass-solid); box-shadow: inset 0 0 0 1px var(--c-glass-line); }
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .btn--glass { background: var(--c-glass); -webkit-backdrop-filter: blur(var(--blur)) saturate(140%); backdrop-filter: blur(var(--blur)) saturate(140%); }
}
.btn--danger { background: var(--c-red); color: #fff; }
.btn--small { min-height: 44px; font-size: 14px; letter-spacing: .04em; }
.btn--lg { min-height: 54px; padding: 0 24px; font-size: 17px; letter-spacing: .08em; gap: 10px; }
.btn--lg .ico { width: 20px; height: 20px; }
/* 꺼진 자리(「ヒント2を見ると開きます」): 점선 */
.btn--off { background: transparent; color: var(--c-text2); box-shadow: none; border: 1px dashed rgba(255, 255, 255, .18); font-size: 13.5px; }
@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover:not(:disabled) { background: var(--g-gold); filter: brightness(1.06); }
  .btn--ghost:hover, .btn--glass:hover { background: rgba(255, 255, 255, .06); }
}
/* 동그란 아이콘 단추: 기본은 투명, 사진 위면 .icon-btn--glass(44px 유리 원) */
.icon-btn { color: var(--c-text); }
.icon-btn:active { background: rgba(255, 255, 255, .1); }
.icon-btn--glass { background: var(--c-glass-solid); box-shadow: inset 0 0 0 1px var(--c-glass-line); }
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .icon-btn--glass { background: var(--c-glass); -webkit-backdrop-filter: blur(var(--blur)) saturate(140%); backdrop-filter: blur(var(--blur)) saturate(140%); }
}
.icon-btn--gold { color: var(--c-gold-hi); }
/* 칩(장면·필터) · 분절 버튼(언어 등) */
.chip-btn { background: rgba(255, 255, 255, .06); color: var(--c-text); box-shadow: inset 0 0 0 1px var(--c-line2); }
.chip-btn.is-on { background: var(--g-gold); color: var(--c-on-gold); box-shadow: none; }
.chip-btn--ghost { background: transparent; box-shadow: none; }
.seg { background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px var(--c-line); }
.seg-btn { color: var(--c-text2); }
.seg-btn.is-on { background: var(--c-surface2); color: var(--c-gold-hi); box-shadow: inset 0 0 0 1px rgba(232, 181, 77, .35); }
.badge { font-family: var(--f-num); letter-spacing: .06em; }
.badge--free { color: var(--c-green); box-shadow: inset 0 0 0 1px rgba(95, 191, 122, .5); }
.badge--premium { color: var(--c-on-gold); background: var(--g-gold); box-shadow: none; }

/* ───────── 5. 상단 바(공통) ───────── */
/* 플레이·안내 화면 위 막대. 사진 위에 띄우는 모양은 영역 파일에서(.play--escape .bar 등) */
.bar { background: linear-gradient(180deg, rgba(11, 10, 9, .96), rgba(11, 10, 9, .86)); border-bottom: 1px solid var(--c-line); color: var(--c-text); }
.bar-kicker { font-family: var(--f-ui), sans-serif; font-size: 11px; font-weight: 700; letter-spacing: .16em; color: var(--c-gold); }
.bar-name { font-family: var(--f-title), var(--f-sym), serif; font-weight: 800; letter-spacing: .06em; }
.clock { font-family: var(--f-num); font-weight: 500; font-size: 17px; letter-spacing: .04em; padding: 4px 12px; border-radius: var(--r-pill); background: rgba(0, 0, 0, .45); color: var(--c-gold-hi); box-shadow: inset 0 0 0 1px var(--c-glass-line); }

/* ───────── 6. 시트(아래에서 올라오는 창) ───────── */
.sheet-back { background: var(--c-scrim); }
.sheet {
  background: var(--g-sheet); color: var(--c-text);
  border-radius: 26px 26px 0 0; border-top: 1px solid rgba(255, 217, 138, .28);
  box-shadow: 0 -20px 60px rgba(0, 0, 0, .6);
}
.sheet::before { top: 9px; width: 40px; height: 5px; margin-left: -20px; border-radius: 3px; background: rgba(255, 255, 255, .22); }
.sheet-head { padding: 22px 10px 4px 22px; }
.sheet-kicker { font-family: var(--f-ui), sans-serif; font-size: 11px; font-weight: 700; letter-spacing: .18em; color: var(--c-gold); }
.sheet-title { font-family: var(--f-title), var(--f-sym), serif; font-weight: 800; font-size: 22px; letter-spacing: .06em; line-height: 1.3; color: var(--c-text); }
.sheet-lead { color: var(--c-text2); }
.sheet-x { color: var(--c-text2); }
/* 창 안의 카드 */
.c-card { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: 16px; }
.c-card--gold { background: linear-gradient(180deg, rgba(232, 181, 77, .10), rgba(232, 181, 77, .04)); border-color: rgba(232, 181, 77, .25); }
.menu-row { border-bottom-color: var(--c-line); color: var(--c-text); }
.menu-val { font-family: var(--f-num); color: var(--c-text2); }
.menu-row--danger { color: var(--c-red); }
@media (prefers-reduced-motion: reduce) { .sheet-root .sheet, .sheet-back { transition: none; } }

/* ───────── 7. 알림 · 로딩 ───────── */
.toast {
  background: var(--c-glass-solid); color: var(--c-text);
  border: 1px solid rgba(232, 181, 77, .35); border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .55);
  font-family: var(--f-ui), sans-serif; letter-spacing: .02em;
}
.toast--clue { background: var(--c-glass-solid); color: var(--c-text); box-shadow: 0 12px 30px rgba(0, 0, 0, .55); }
.toast--clue::before { content: '● '; color: var(--c-amber); font-size: .8em; vertical-align: .08em; }
.loading { font-family: var(--f-num); letter-spacing: .12em; color: var(--c-text2); }
.loading-dot { background: var(--c-amber); box-shadow: 0 0 10px var(--c-amber); }
.flash { background: #fff6e2; }
