/* 크레파스 공책: 하얀 종이 바탕에 진한 남색 글씨. 로고 'もしもし'의 크레파스 네 색(노랑·빨강·초록·파랑)은
   로고와 작은 표시에만 쓰고, 버튼 같은 행동은 파랑 하나로 통일한다. 추리 게임방은 밤 료칸 색으로 따로 바뀐다.
   Layout: 휴대폰 한 손 기준의 한 열. 넓은 화면에서는 본문 640px, 홈은 1040px 안에서 2열. */
:root {
  --c-yellow: #f1c232;
  --c-red: #dc3b3b;
  --c-green: #3a9f78;
  --c-blue: #2e66d4;

  --night: #ffffff;
  --ink: #f6f7f9;
  --ink-2: #eceff3;
  --line: #e1e5eb;
  --paper: #1e2330;
  --mute: #5f6676;
  --lantern: var(--c-blue);
  --on-accent: #ffffff;
  --shu: var(--c-red);
  --ok: #2e8f66;
  --bad: #cf3535;
  --card-paper: #fffaf0;
  --card-ink: #1e2330;

  --display: "Jua", "M PLUS Rounded 1c", "Apple SD Gothic Neo", sans-serif;
  --display-weight: 400;
  --body: "IBM Plex Sans KR", "Zen Maru Gothic", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --ja: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Noto Sans JP", "Yu Gothic", sans-serif;
  --ja-display: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "Noto Sans JP", sans-serif;
  --hand: "Gaegu", "Jua", sans-serif;

  --fs-xs: 0.8125rem;
  --fs-s: 0.9375rem;
  --fs-m: 1.0625rem;
  --fs-l: 1.3125rem;
  --fs-xl: 1.75rem;
  --fs-2xl: 2.5rem;
  --fs-3xl: 3.5rem;

  --r: 14px;
  --gutter: clamp(16px, 4vw, 32px);
  color-scheme: light;
}

/* 추리 게임방: 밤의 료칸 */
body[data-view="room"] {
  --night: #0f1426;
  --ink: #171f38;
  --ink-2: #232c4b;
  --line: #2f3a5f;
  --paper: #ece5d3;
  --mute: #9aa1bd;
  --lantern: #f0b44c;
  --on-accent: #1a1406;
  --shu: #d4563a;
  --ok: #7fc8a0;
  --bad: #e58a78;
  --card-paper: #efe7d2;
  --card-ink: #1d1a14;
  --display: "Shippori Mincho B1", "Gowun Batang", "Noto Serif KR", serif;
  --display-weight: 700;
  --ja: "Zen Kaku Gothic New", "Zen Maru Gothic", "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  --ja-display: "Shippori Mincho B1", "Hiragino Mincho ProN", "Noto Serif JP", serif;
  --r: 6px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--night);
  color: var(--paper);
  font-family: var(--body);
  font-size: var(--fs-m);
  line-height: 1.65;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
:lang(ja) { font-family: var(--ja); word-break: normal; }
body { word-break: keep-all; overflow-wrap: break-word; }
h1, h2, h3 { font-family: var(--display); font-weight: var(--display-weight); line-height: 1.3; text-wrap: balance; margin: 0; }
p { margin: 0; }
a { color: var(--lantern); }
img, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--lantern); outline-offset: 2px; }
.tnum { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 640px; }

/* ---------- ruby & translation ---------- */
ruby { ruby-position: over; }
rt { font-size: 0.5em; color: var(--mute); font-family: var(--ja); letter-spacing: 0; }
.paper rt { color: #6d6658; }
body.no-furi rt { display: none; }
.jl { display: grid; gap: 2px; }
.jl .ja { font-size: var(--fs-m); line-height: 2; }
.jl .ko { font-size: var(--fs-s); color: var(--mute); line-height: 1.5; }
.paper .jl .ko { color: #5c5547; }
.jl .tr-btn { display: none; justify-self: start; border: 0; background: none; padding: 2px 0; color: var(--lantern); font-size: var(--fs-xs); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.paper .jl .tr-btn { color: #8a5a12; }
body.tr-tap .jl .ko { display: none; }
body.tr-tap .jl .tr-btn { display: inline-block; }
body.tr-tap .jl.open .ko { display: block; }
body.tr-tap .jl.open .tr-btn { display: none; }

/* ---------- buttons & controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 18px; border-radius: var(--r);
  border: 1px solid var(--lantern); background: var(--lantern); color: var(--on-accent);
  font-weight: 600; font-size: var(--fs-s); text-decoration: none; cursor: pointer;
  transition: transform .12s ease, background .12s ease;
}
.btn:hover { background: color-mix(in srgb, var(--lantern) 86%, var(--paper)); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--paper); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--lantern); color: var(--lantern); }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: var(--fs-xs); }
.btn.block { width: 100%; }
.btn.danger { background: transparent; color: var(--bad); border-color: color-mix(in srgb, var(--bad) 50%, transparent); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

.field { display: grid; gap: 6px; }
.field label, .label { font-size: var(--fs-xs); color: var(--mute); }
.input {
  width: 100%; min-height: 48px; padding: 10px 14px; border-radius: var(--r);
  border: 1px solid var(--line); background: var(--night); color: var(--paper);
}
.input:focus { border-color: var(--lantern); outline: none; }
.input.code { font-family: var(--display); font-size: var(--fs-xl); letter-spacing: .3em; text-transform: uppercase; text-align: center; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line); background: transparent; color: var(--paper);
  border-radius: 999px; padding: 6px 14px; font-size: var(--fs-xs); cursor: pointer; min-height: 34px;
}
.chip[aria-pressed="true"], .chip.on { background: var(--paper); color: var(--night); border-color: var(--paper); }
.pill { display: inline-block; font-size: var(--fs-xs); padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--mute); white-space: nowrap; }
.pill.sample { border-color: color-mix(in srgb, var(--shu) 60%, transparent); color: #f0a08c; }
.pill.ok { border-color: color-mix(in srgb, var(--ok) 60%, transparent); color: var(--ok); }
.pill.bad { border-color: color-mix(in srgb, var(--bad) 60%, transparent); color: var(--bad); }
.pill.live { border-color: var(--lantern); color: var(--lantern); }

.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.seg button { border: 0; background: transparent; padding: 6px 12px; font-size: var(--fs-xs); color: var(--mute); cursor: pointer; min-height: 34px; }
.seg button[aria-pressed="true"] { background: var(--ink-2); color: var(--paper); }

/* grid 자식이 넓은 표 때문에 화면 밖으로 밀려나지 않게 */
.room-body > *, .stack > *, .stack-s > *, .ev-stage > *, .gacha > *, .q > *, .hero .wrap > *, .join-grid > *, .games > * { min-width: 0; }
.card { background: var(--ink); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.stack { display: grid; gap: 16px; }
.stack-s { display: grid; gap: 8px; }
.muted { color: var(--mute); }
.small { font-size: var(--fs-s); }
.xs { font-size: var(--fs-xs); }

/* ---------- header / footer ---------- */
.site-head { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--night) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--paper); }
.brand b { font-family: var(--display); font-size: var(--fs-m); }
.brand #brand-ja { font-size: var(--fs-xs); color: var(--mute); }
.nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.nav a { color: var(--mute); text-decoration: none; padding: 8px 10px; font-size: var(--fs-s); white-space: nowrap; border-radius: var(--r); }
.nav a[aria-current="page"], .nav a:hover { color: var(--paper); }
.nav a.cta { color: var(--lantern); }
@media (max-width: 560px) {
  .site-head .wrap { flex-wrap: wrap; padding-top: 8px; gap: 0; }
  .brand #brand-ja { display: none; }
  .nav { width: 100%; margin: 0 -10px; }
}
body[data-view="room"] .site-head { position: static; }
.site-foot { border-top: 1px solid var(--line); margin-top: 72px; padding: 32px 0 48px; color: var(--mute); font-size: var(--fs-xs); }
.site-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }

/* ---------- home: hero ---------- */
.hero { position: relative; padding: 48px 0 40px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "copy tate" "demo demo"; gap: 28px 20px; align-items: start; }
.hero-copy { grid-area: copy; display: grid; gap: 18px; }
.eyebrow { font-size: var(--fs-xs); color: var(--mute); letter-spacing: .08em; }
.eyebrow .ja { font-family: var(--ja-display); color: var(--lantern); }
.hero h1 { font-size: clamp(2rem, 7vw, var(--fs-3xl)); letter-spacing: -0.01em; }
.hero .lede { color: var(--mute); max-width: 34em; }
.hero-tate {
  grid-area: tate; position: relative;
  writing-mode: vertical-rl; font-family: var(--ja-display); font-weight: 800;
  font-size: clamp(1.75rem, 6vw, 3rem); line-height: 1.25; letter-spacing: .12em; color: var(--paper);
  padding: 8px 4px; margin-top: 4px;
}
.hero-tate::before {
  content: ""; position: absolute; inset: -40% -120%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--lantern) 26%, transparent), transparent 70%);
  animation: lantern 5s ease-in-out infinite;
}
.hero-tate em { font-style: normal; color: var(--lantern); }
@keyframes lantern { 0%, 100% { opacity: .75; } 45% { opacity: 1; } 60% { opacity: .82; } }
.hero-demo { grid-area: demo; }
@media (min-width: 900px) {
  .hero { padding: 72px 0 56px; }
  .hero .wrap { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) auto; grid-template-areas: "copy demo tate"; gap: 40px; align-items: center; }
}
.hero-tate, .hero-copy > * { animation: rise .7s ease both; }
.hero-copy > *:nth-child(2) { animation-delay: .08s; }
.hero-copy > *:nth-child(3) { animation-delay: .16s; }
.hero-copy > *:nth-child(4) { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- paper clue card (the one bright object on the night page) ---------- */
.paper {
  position: relative; background: var(--card-paper); color: var(--card-ink);
  border-radius: 3px; padding: 22px 20px 18px;
  border: 1px solid color-mix(in srgb, var(--card-paper) 80%, #b9a77a);
  box-shadow: 0 1px 0 rgba(255,255,255,.4) inset, 0 14px 30px -18px rgba(20,24,34,.45);
}
.paper .who { font-size: var(--fs-xs); color: #6d6658; }
.paper h3 { font-size: var(--fs-l); color: var(--card-ink); }
.stamp {
  position: absolute; top: 14px; right: 14px; width: 44px; height: 44px;
  display: grid; place-items: center; border: 2px solid var(--shu); color: var(--shu);
  border-radius: 4px; font-family: var(--ja-display); font-weight: 800; font-size: 1.35rem;
  transform: rotate(8deg); opacity: .85;
}
.paper .jl .ja { color: var(--card-ink); }
.paper-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-top: 14px; padding-top: 12px; border-top: 1px dashed rgba(60,50,30,.25); }
.paper .seg { border-color: rgba(60,50,30,.3); }
.paper .seg button { color: #6d6658; }
.paper .seg button[aria-pressed="true"] { background: var(--card-ink); color: var(--card-paper); }
.demo-caption { margin-top: 12px; font-size: var(--fs-xs); color: var(--mute); }

/* ---------- home sections ---------- */
.section { padding: 56px 0 8px; }
.sec-head { display: grid; gap: 6px; margin-bottom: 24px; }
.sec-head .ja { font-family: var(--ja-display); color: var(--lantern); font-size: var(--fs-s); letter-spacing: .2em; }
.sec-head h2 { font-size: clamp(1.5rem, 4.5vw, var(--fs-2xl)); }
.sec-head p { color: var(--mute); max-width: 40em; }

.daily { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 16px 0; }
.daily .wrap { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; }
.daily .tag { font-family: var(--ja-display); color: var(--lantern); font-size: var(--fs-s); }
.daily .phrase { font-size: var(--fs-l); }
.daily .use { color: var(--mute); font-size: var(--fs-s); }

.pillars { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.pillar { border-top: 2px solid var(--lantern); padding-top: 14px; display: grid; gap: 6px; }
.pillar h3 { font-size: var(--fs-l); }
.pillar p { color: var(--mute); font-size: var(--fs-s); }

.levels { margin-top: 28px; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.level { padding: 16px; display: grid; gap: 4px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0; }
.level b { font-family: var(--display); font-size: var(--fs-m); }
.level span { font-size: var(--fs-xs); color: var(--mute); }
.level .meter { display: flex; gap: 3px; margin: 2px 0 4px; }
.level .meter i { width: 18px; height: 4px; border-radius: 2px; background: var(--line); }
.level .meter i.on { background: var(--lantern); }

.games { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.game { display: grid; gap: 14px; align-content: start; }
.game-top { display: flex; gap: 14px; align-items: flex-start; }
.plate {
  flex: none; width: 64px; height: 84px; display: grid; place-items: center;
  border: 2px solid #8a6a3a; border-radius: 4px; background: linear-gradient(180deg, #3a2a18, #2a1e12);
  color: #f3dfb6; font-family: var(--display); font-weight: 800; font-size: 1.35rem; letter-spacing: .02em;
  box-shadow: inset 0 0 0 3px #2a1e12, inset 0 0 0 4px #6b5230;
}
.plate.alt { background: linear-gradient(180deg, #1d2b2a, #142020); border-color: #4b7a6f; color: #cfe8df; box-shadow: inset 0 0 0 3px #142020, inset 0 0 0 4px #3c6259; font-family: var(--ja-display); font-size: 1.1rem; writing-mode: vertical-rl; }
.plate.soon { background: transparent; border-style: dashed; border-color: var(--line); color: var(--mute); box-shadow: none; }
.game h3 { font-size: var(--fs-l); }
.game .ja-title { font-family: var(--ja-display); font-size: var(--fs-s); color: var(--mute); }
.meta { display: flex; flex-wrap: wrap; gap: 6px; }
.game p { color: var(--mute); font-size: var(--fs-s); }
.game.soon { border-style: dashed; background: transparent; }

.flow { display: grid; gap: 0; border-left: 1px solid var(--line); margin-left: 28px; }
.flow li { list-style: none; position: relative; padding: 0 0 18px 22px; display: grid; gap: 2px; }
.flow li::before { content: ""; position: absolute; left: -5px; top: 9px; width: 9px; height: 9px; border-radius: 50%; background: var(--night); border: 2px solid var(--lantern); }
.flow .min { position: absolute; left: -60px; top: 0; width: 46px; text-align: right; font-size: var(--fs-xs); color: var(--mute); }
.flow b { font-weight: 600; }
.flow span { color: var(--mute); font-size: var(--fs-s); }
.flow-bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; margin: 0 0 26px; gap: 2px; }
.flow-bar i { display: block; background: var(--ink-2); }
.flow-bar i:nth-child(4), .flow-bar i:nth-child(5) { background: color-mix(in srgb, var(--lantern) 55%, var(--ink-2)); }
.flow-bar i:last-child { background: var(--lantern); }

.records { display: grid; gap: 14px; }
.record { display: grid; grid-template-columns: 88px 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.record:first-child { border-top: 1px solid var(--line); }
.record time { font-family: var(--display); font-size: var(--fs-s); color: var(--lantern); }
.record h3 { font-size: var(--fs-m); font-family: var(--body); font-weight: 600; }
.record .body { display: grid; gap: 6px; }
.record p { color: var(--mute); font-size: var(--fs-s); }
.record img { border-radius: var(--r); margin-top: 6px; }

.join-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); align-items: start; }
.details { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; margin: 0; }
.details dt { color: var(--mute); font-size: var(--fs-s); }
.details dd { margin: 0; font-size: var(--fs-s); }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: "+"; color: var(--lantern); font-family: var(--display); }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--mute); font-size: var(--fs-s); margin-top: 8px; }

/* ---------- play (lobby) ---------- */
.page { padding-top: 32px; padding-bottom: 40px; }
.page-title { display: grid; gap: 6px; margin-bottom: 24px; }
.page-title h1 { font-size: clamp(1.75rem, 6vw, var(--fs-2xl)); }
.page-title .ja { font-family: var(--ja-display); color: var(--lantern); font-size: var(--fs-s); letter-spacing: .2em; }
.notice { border: 1px solid var(--line); border-left: 3px solid var(--lantern); border-radius: var(--r); padding: 14px 16px; font-size: var(--fs-s); color: var(--mute); background: var(--ink); }
.notice b { color: var(--paper); }
.notice.err { border-left-color: var(--bad); }
.pick { display: grid; gap: 10px; }
.pick label { display: flex; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: var(--r); padding: 12px; cursor: pointer; }
.pick input { accent-color: var(--lantern); width: 18px; height: 18px; }
.pick label:has(input:checked) { border-color: var(--lantern); background: color-mix(in srgb, var(--lantern) 6%, transparent); }
.steps { counter-reset: s; display: grid; gap: 10px; padding: 0; margin: 0; }
.steps li { list-style: none; counter-increment: s; display: grid; grid-template-columns: 28px 1fr; gap: 10px; font-size: var(--fs-s); color: var(--mute); }
.steps li::before { content: counter(s); font-family: var(--display); color: var(--lantern); font-weight: 700; }

/* ---------- room ---------- */
.room { padding-bottom: 96px; }
.room-head { position: sticky; top: 0; z-index: 15; background: color-mix(in srgb, var(--night) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.room-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; padding-top: 8px; padding-bottom: 8px; }
.room-head .t { display: grid; line-height: 1.3; min-width: 0; }
.room-head .t small { font-family: var(--ja-display); color: var(--mute); font-size: var(--fs-xs); }
.room-head .t b { font-family: var(--display); font-size: var(--fs-m); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clock { text-align: right; display: grid; line-height: 1.25; flex: none; }
.clock b { font-family: var(--display); font-size: var(--fs-l); font-variant-numeric: tabular-nums; color: var(--lantern); }
.clock small { font-size: var(--fs-xs); color: var(--mute); }
.room-body { padding-top: 20px; display: grid; gap: 16px; }
.prefs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: color-mix(in srgb, var(--ink) 96%, transparent); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
}
.tabbar .wrap { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; max-width: 640px; }
.tabbar button { border: 0; background: none; color: var(--mute); padding: 10px 4px 12px; font-size: var(--fs-xs); display: grid; justify-items: center; gap: 2px; cursor: pointer; position: relative; min-height: 58px; }
.tabbar button .k { font-family: var(--ja-display); font-size: var(--fs-m); line-height: 1.2; }
.tabbar button[aria-selected="true"] { color: var(--lantern); }
.tabbar button[aria-selected="true"]::before { content: ""; position: absolute; top: 0; left: 25%; right: 25%; height: 2px; background: var(--lantern); }
.tabbar .dot { position: absolute; top: 8px; right: calc(50% - 22px); width: 8px; height: 8px; border-radius: 50%; background: var(--shu); }

.bigcode { font-family: var(--display); font-size: clamp(2.5rem, 12vw, 3.75rem); letter-spacing: .25em; font-weight: 800; color: var(--lantern); line-height: 1; padding-left: .25em; }
.invite { display: grid; gap: 16px; justify-items: center; text-align: center; }
.qr { background: #fff; border: 1px solid var(--line); padding: 10px; border-radius: var(--r); width: min(220px, 70vw); line-height: 0; }
.qr svg { width: 100%; height: auto; }
.linkbox { display: flex; gap: 8px; width: 100%; }
.linkbox input { flex: 1; min-width: 0; font-size: var(--fs-xs); min-height: 40px; }

.plist { display: grid; gap: 0; }
.plist li { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.plist li:last-child { border-bottom: 0; }
.plist .nm { display: grid; line-height: 1.35; min-width: 0; }
.plist .nm b { font-weight: 600; }
.plist .nm small { color: var(--mute); font-size: var(--fs-xs); }
.plist .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
ul.plist { padding: 0; margin: 0; }

.role-card .title { font-size: var(--fs-xs); color: #6d6658; }
.role-card .name { font-family: var(--ja-display); font-size: var(--fs-xl); font-weight: 800; line-height: 1.6; }
.role-card .name-ko { font-size: var(--fs-s); color: #5c5547; }
.role-card .about { font-size: var(--fs-s); color: #3d382e; }
.role-card .sect { font-size: var(--fs-xs); color: #8a3a26; letter-spacing: .1em; margin-top: 6px; font-weight: 600; }
.role-card ol { margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: c; }
.role-card ol li { list-style: none; counter-increment: c; display: grid; grid-template-columns: 22px 1fr; gap: 6px; }
.role-card ol li::before { content: counter(c); font-family: var(--display); font-weight: 800; color: var(--shu); line-height: 2; }
.role-card .acting { border-left: 3px solid var(--shu); padding: 6px 10px; font-size: var(--fs-s); color: #3d382e; background: rgba(212,86,58,.06); }
.partner { font-size: var(--fs-s); color: var(--lantern); }

.ev-stage { display: grid; gap: 14px; }
.ev-stage > h3 { font-size: var(--fs-l); display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ev-stage > h3 small { font-family: var(--ja-display); font-size: var(--fs-xs); color: var(--mute); font-weight: 400; }
.ev-item h4 { margin: 0 0 8px; font-size: var(--fs-m); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.ev-item h4 small { font-weight: 400; color: var(--mute); font-size: var(--fs-xs); }
.ev-lines { display: grid; gap: 10px; }
.tablewrap { overflow-x: auto; }
table.reg { width: 100%; border-collapse: collapse; font-size: var(--fs-s); min-width: 420px; }
table.reg th, table.reg td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); line-height: 1.9; }
table.reg th { color: var(--mute); font-weight: 500; font-size: var(--fs-xs); }
table.reg td:first-child { font-family: var(--display); font-weight: 700; color: var(--lantern); }
table.reg tr.hl td { background: color-mix(in srgb, var(--lantern) 7%, transparent); }
.map svg { display: block; width: 100%; height: auto; }
.map text { font-family: var(--ja); fill: var(--paper); }

.phr-cat { display: grid; gap: 10px; }
.phr-cat h3 { font-size: var(--fs-m); display: flex; gap: 10px; align-items: baseline; }
.phr-cat h3 small { font-family: var(--ja-display); color: var(--mute); font-weight: 400; font-size: var(--fs-xs); }
.phr { display: grid; grid-template-columns: 36px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.phr:last-child { border-bottom: 0; }
.lv { font-family: var(--ja-display); font-size: var(--fs-xs); color: var(--lantern); border: 1px solid color-mix(in srgb, var(--lantern) 45%, transparent); border-radius: 4px; height: 24px; display: grid; place-items: center; margin-top: 6px; }
.words { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.word { border: 1px solid var(--line); border-radius: var(--r); padding: 8px 10px; display: grid; }
.word .ja { font-size: var(--fs-m); line-height: 1.9; }
.word .ko { font-size: var(--fs-xs); color: var(--mute); }

.q { display: grid; gap: 12px; }
.q-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.q-no { font-family: var(--display); color: var(--lantern); font-weight: 800; }
.opts { display: grid; gap: 8px; }
.opt {
  text-align: left; border: 1px solid var(--line); background: var(--night); border-radius: var(--r);
  padding: 10px 12px; cursor: pointer; display: grid; grid-template-columns: 26px 1fr; gap: 8px; align-items: start; min-height: 48px;
}
.opt .mark { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); margin-top: 6px; display: grid; place-items: center; }
.opt[aria-pressed="true"] { border-color: var(--lantern); background: color-mix(in srgb, var(--lantern) 8%, var(--night)); }
.opt[aria-pressed="true"] .mark { border-color: var(--lantern); }
.opt[aria-pressed="true"] .mark::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--lantern); }
.opt[disabled] { cursor: default; }
.opt.correct { border-color: var(--ok); }
.opt.wrong { border-color: var(--bad); }
.opt .jl .ja { line-height: 1.9; }
.who-picked { font-size: var(--fs-xs); color: var(--mute); }
.progress { height: 6px; border-radius: 3px; background: var(--ink-2); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--lantern); }

.timeline { display: grid; gap: 0; padding: 0; margin: 0; }
.timeline li { list-style: none; display: grid; grid-template-columns: 56px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.timeline li .m { font-size: var(--fs-xs); color: var(--mute); padding-top: 2px; }
.timeline li b { font-weight: 600; font-size: var(--fs-s); }
.timeline li p { font-size: var(--fs-s); color: var(--mute); margin-top: 4px; }
.timeline li.now { border-left: 3px solid var(--lantern); padding-left: 10px; margin-left: -13px; }
.timeline li.now b { color: var(--lantern); }
.timeline li.done b { color: var(--mute); font-weight: 400; }
.hint-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.hint-row:last-child { border-bottom: 0; }

.result-hero { text-align: center; display: grid; gap: 10px; justify-items: center; padding: 12px 0; }
.result-hero .score { font-family: var(--display); font-size: clamp(3rem, 16vw, 5rem); color: var(--lantern); line-height: 1; font-weight: 800; }
.result-hero .rank { font-family: var(--ja-display); font-size: var(--fs-xl); font-weight: 800; }

.demo-bar { background: color-mix(in srgb, var(--lantern) 14%, var(--night)); border-bottom: 1px solid var(--lantern); font-size: var(--fs-s); }
.demo-bar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 48px; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }

/* ---------- gacha ---------- */
.gacha { display: grid; gap: 20px; }
.machine { display: grid; justify-items: center; gap: 14px; padding: 8px 0; }
.dome {
  position: relative; width: 210px; height: 170px; border-radius: 105px 105px 14px 14px;
  border: 2px solid var(--line); background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.08), transparent 55%), var(--ink);
  overflow: hidden;
}
.dome .cap { position: absolute; width: 38px; height: 38px; border-radius: 50%; border: 2px solid rgba(0,0,0,.25); }
.dome .cap::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 50%; border-radius: 0 0 19px 19px; background: #e9e2cf; }
.dome.spin .cap { animation: jiggle .5s ease-in-out 2; }
@keyframes jiggle { 0%,100% { transform: translate(0,0) rotate(0); } 25% { transform: translate(4px,-6px) rotate(20deg); } 75% { transform: translate(-5px,3px) rotate(-15deg); } }
.machine-base { width: 230px; display: flex; justify-content: space-between; align-items: center; background: var(--ink-2); border-radius: var(--r); padding: 10px 14px; border: 1px solid var(--line); }
.knob { width: 54px; height: 54px; border-radius: 50%; border: 0; background: var(--lantern); color: var(--on-accent); font-family: var(--ja-display); font-weight: 800; cursor: pointer; font-size: var(--fs-s); box-shadow: inset 0 -4px 0 rgba(0,0,0,.2); }
.knob.turn { animation: turn .6s ease; }
@keyframes turn { to { transform: rotate(360deg); } }
.slot { width: 56px; height: 34px; border-radius: 6px; background: var(--night); border: 1px solid var(--line); }
.topic-card { animation: drop .45s cubic-bezier(.2,.9,.3,1.2) both; }
@keyframes drop { from { opacity: 0; transform: translateY(-14px) scale(.98); } to { opacity: 1; transform: none; } }
.topic-card .q .ja { font-size: var(--fs-l); line-height: 2; }
.topic-card .hint { border-top: 1px dashed rgba(60,50,30,.25); padding-top: 10px; display: grid; gap: 2px; }
.topic-card .hint small { font-size: var(--fs-xs); color: #6d6658; }
.timer { display: flex; align-items: center; gap: 14px; }
.ring { width: 64px; height: 64px; }
.ring circle { fill: none; stroke-width: 6; }
.ring .bg { stroke: var(--ink-2); }
.ring .fg { stroke: var(--lantern); stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke-dashoffset 1s linear; }
.ring text { fill: var(--paper); font-family: var(--display); font-size: 18px; font-weight: 700; text-anchor: middle; dominant-baseline: central; }
.hist { display: grid; gap: 6px; padding: 0; margin: 0; }
.hist li { list-style: none; font-size: var(--fs-s); color: var(--mute); border-bottom: 1px solid var(--line); padding: 8px 0; }

/* ---------- toast & dialog ---------- */
#toasts { position: fixed; top: 12px; left: 0; right: 0; z-index: 60; display: grid; justify-items: center; gap: 8px; pointer-events: none; padding: 0 12px; }
.toast { pointer-events: auto; max-width: 520px; width: 100%; background: var(--card-paper); color: var(--card-ink); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 16px; box-shadow: 0 14px 30px -12px rgba(0,0,0,.6); font-size: var(--fs-s); animation: drop .3s ease both; border-left: 4px solid var(--lantern); }
.toast .jl .ja { color: var(--card-ink); }
.toast .jl .ko { color: #5c5547; }
.toast rt { color: #6d6658; }
.modal-back { position: fixed; inset: 0; z-index: 70; background: rgba(20,24,34,.5); display: grid; place-items: center; padding: 20px; }
.modal { width: 100%; max-width: 420px; background: var(--ink); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; display: grid; gap: 14px; }
.modal h2 { font-size: var(--fs-l); }
.modal p { color: var(--mute); font-size: var(--fs-s); }
.modal .btn-row { justify-content: flex-end; }

.loading { padding: 80px 0; text-align: center; color: var(--mute); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ───────── 회원제 화면 ───────── */
.demo-strip { background: color-mix(in srgb, var(--lantern) 10%, var(--night)); border-bottom: 1px solid color-mix(in srgb, var(--lantern) 40%, transparent); font-size: var(--fs-xs); color: var(--paper); }
.demo-strip .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding-top: 8px; padding-bottom: 8px; }
.demo-strip .btn.small { min-height: 30px; padding: 4px 10px; }
body[data-view="room"] .demo-strip { display: none; }
.h-s { font-size: var(--fs-l); display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.h-m { font-size: var(--fs-xl); }
textarea.input { min-height: 0; resize: vertical; line-height: 1.6; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--mute) 50%), linear-gradient(135deg, var(--mute) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }

.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row2 > * { min-width: 0; }
@media (max-width: 420px) { .row2 { grid-template-columns: 1fr; } }
fieldset[disabled] { opacity: .4; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: var(--fs-s); }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--lantern); flex: none; }
.chip-check { position: relative; cursor: pointer; }
.chip-check input { position: absolute; opacity: 0; pointer-events: none; }
.chip-check span { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: var(--fs-xs); min-height: 36px; }
.chip-check input:checked + span { background: var(--paper); color: var(--night); border-color: var(--paper); }
.chip-check input:checked + span rt { color: inherit; opacity: .7; }
.chip-check input:focus-visible + span { outline: 2px solid var(--lantern); outline-offset: 2px; }
.consent-box summary { cursor: pointer; font-size: var(--fs-xs); color: var(--lantern); }
table.consent { width: 100%; border-collapse: collapse; font-size: var(--fs-s); margin: 10px 0; }
table.consent th, table.consent td { text-align: left; vertical-align: top; padding: 8px 10px; border: 1px solid var(--line); }
table.consent th { width: 28%; color: var(--mute); font-weight: 500; background: var(--ink-2); }
.notice.ok { border-left-color: var(--ok); }
.ok-text { color: var(--ok); }
.bad-text { color: var(--bad); }
.ok-card { border-color: color-mix(in srgb, var(--ok) 50%, var(--line)); }

.meetups { display: grid; gap: 12px; }
.card.meetup { display: grid; grid-template-columns: 64px 1fr; gap: 16px; text-decoration: none; color: inherit; transition: border-color .15s; }
.card.meetup:hover { border-color: var(--lantern); }
.card.meetup h3 { font-size: var(--fs-l); }
.date { display: grid; justify-items: center; align-content: start; border-right: 1px solid var(--line); padding-right: 14px; line-height: 1.1; }
.date span { font-size: var(--fs-xs); color: var(--mute); }
.date b { font-family: var(--display); font-size: 2rem; color: var(--lantern); }
.prog { display: inline-flex; gap: 10px; align-items: center; }
.prog > span:last-child { display: grid; line-height: 1.35; }
.prog small { font-size: var(--fs-xs); color: var(--mute); }
.plate.mini { width: 34px; height: 44px; font-size: .8rem; box-shadow: inset 0 0 0 2px #2a1e12, inset 0 0 0 3px #6b5230; }

.reviews { display: grid; gap: 12px; }
.review { border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: grid; gap: 8px; background: var(--ink); }
.review p { font-size: var(--fs-s); white-space: pre-line; }
.review-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; align-items: baseline; }
.review.is-hidden { opacity: .65; border-style: dashed; }
.stars { color: #e3a90c; letter-spacing: 1px; }
.stars .off { color: var(--line); }
.review-sum { display: flex; justify-content: space-between; align-items: center; }
.review-sum .big { font-family: var(--display); font-size: var(--fs-2xl); color: var(--lantern); margin-right: 10px; font-weight: 800; }
.plist .msg { color: var(--paper); font-style: italic; }
.plist .nm a { color: var(--paper); text-decoration: none; }
.plist .nm a:hover { color: var(--lantern); }
.plist.members .acts { flex-direction: column; align-items: stretch; }
.bul { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; color: var(--mute); }
.flow.compact li { padding-bottom: 8px; }
.steps li > span b { color: var(--paper); }

.legal h2 { font-size: var(--fs-l); margin: 32px 0 10px; }
.legal h3 { font-size: var(--fs-m); margin: 16px 0 6px; font-family: var(--body); }
.legal p, .legal li { font-size: var(--fs-s); color: var(--mute); }
.legal p + p { margin-top: 8px; }
.legal ul { padding-left: 1.2em; display: grid; gap: 4px; }

.checkin-ok { text-align: left; }
.stamp-big { width: 96px; height: 96px; display: grid; place-items: center; border: 3px solid var(--shu); color: var(--shu); border-radius: 8px; font-family: var(--ja-display); font-weight: 800; font-size: 1.6rem; transform: rotate(-8deg); margin: 8px 0 20px; animation: stampin .4s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes stampin { from { transform: rotate(-8deg) scale(1.6); opacity: 0; } to { transform: rotate(-8deg) scale(1); opacity: 1; } }

/* ───────── 레벨 테스트 ───────── */
body.no-furi .force-furi rt { display: revert; }
.lt-text { font-size: clamp(1.4rem, 6vw, 1.9rem); line-height: 2; font-family: var(--ja); }
.lt-opts .lt-ja { font-size: var(--fs-l); font-family: var(--ja); line-height: 1.9; }
.lt-opts .btn { justify-self: start; }
.lt-q .opt { align-items: center; }
.lt-q .opt .mark { margin-top: 0; }
.lt-bar { display: grid; grid-template-columns: 48px 1fr 72px; gap: 12px; align-items: center; }
.lt-bar .xs { text-align: right; }
.linklike { border: 0; background: none; color: var(--lantern); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 0; font: inherit; justify-self: start; }
.lt-play { justify-self: start; }
.btn.stacked { flex-direction: column; gap: 2px; padding-top: 8px; padding-bottom: 8px; }


/* ───────── 모시모시 브랜드 ───────── */
.wordmark { display: inline-flex; font-family: "M PLUS Rounded 1c", var(--ja-display); font-weight: 800; line-height: 1; letter-spacing: -0.03em; filter: url(#crayon); }
.wordmark i { font-style: normal; display: inline-block; }
.wordmark i:nth-child(1) { color: var(--c-yellow); transform: rotate(-5deg); }
.wordmark i:nth-child(2) { color: var(--c-red); transform: rotate(4deg) translateY(3%); }
.wordmark i:nth-child(3) { color: var(--c-green); transform: rotate(-3deg); }
.wordmark i:nth-child(4) { color: var(--c-blue); transform: rotate(5deg) translateY(2%); }
.wordmark.sm { font-size: 1.4rem; }
.wordmark.xl { font-size: clamp(4.2rem, 21vw, 8.5rem); margin: 0 0 4px -4px; }
.brand b { font-family: var(--display); font-weight: var(--display-weight); font-size: var(--fs-l); }
.site-head { background: color-mix(in srgb, var(--night) 92%, transparent); }

.hero-mm { padding: 36px 0 40px; }
.hero-mm .wrap { grid-template-columns: minmax(0, 1fr); grid-template-areas: "copy" "demo"; gap: 32px; }
.hero-mm .hero-copy { gap: 14px; }
.hero-mm h1 { font-size: clamp(1.9rem, 7.5vw, 3.1rem); line-height: 1.25; }
.hero-mm .lede { color: var(--mute); }
.eyebrow.hand { font-family: var(--hand); font-size: 1.25rem; letter-spacing: 0; color: var(--mute); }
.hero-chat { grid-area: demo; }
@media (min-width: 900px) {
  .hero-mm { padding: 64px 0 56px; }
  .hero-mm .wrap { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); grid-template-areas: "copy demo"; align-items: center; gap: 56px; }
}
.bio { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.bio li { display: flex; gap: 10px; align-items: center; font-size: var(--fs-s); }
.bio li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--c-yellow); }
.bio li:nth-child(2)::before { background: var(--c-red); }
.bio li:nth-child(3)::before { background: var(--c-green); }
.bio li:nth-child(4)::before { background: var(--c-blue); }

.chat { display: grid; gap: 10px; padding: 18px; border-radius: 24px; background: var(--ink); border: 1px solid var(--line); }
.chat-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.chat-top .hand { font-family: var(--hand); font-size: 1.15rem; color: var(--mute); }
.bubble { max-width: 90%; padding: 10px 14px; border-radius: 20px; background: #fff; border: 1px solid var(--line); }
.bubble.them { justify-self: start; border-bottom-left-radius: 6px; }
.bubble.me { justify-self: end; background: color-mix(in srgb, var(--c-blue) 9%, #fff); border-color: color-mix(in srgb, var(--c-blue) 22%, #fff); border-bottom-right-radius: 6px; }
.bubble .jl .ja { line-height: 2; font-size: var(--fs-m); }
.bubble .who { display: block; font-size: var(--fs-xs); color: var(--mute); margin-bottom: 2px; }
.chat-cap { font-size: var(--fs-xs); color: var(--mute); }

.sec-head.y .ja { color: #b48600; }
.sec-head.r .ja { color: var(--c-red); }
.sec-head.g .ja { color: var(--c-green); }
.sec-head.b .ja { color: var(--c-blue); }
.pillar:nth-child(1) { border-top-color: var(--c-yellow); }
.pillar:nth-child(2) { border-top-color: var(--c-red); }
.pillar:nth-child(3) { border-top-color: var(--c-green); }
.daily { background: var(--ink); border-color: var(--line); }
.daily .tag { color: var(--c-red); font-family: var(--ja-display); }
.insta { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.insta .wordmark { font-size: 2.2rem; }

/* ───────── 후기 사진 ───────── */
.ph-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ph-grid > p { grid-column: 1 / -1; }
.ph { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--ink-2); }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-x { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(20,24,34,.72); color: #fff; font-size: 18px; line-height: 1; cursor: pointer; }
.rv-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 6px; }
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
@media (min-width: 700px) { .gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.rv-photo { padding: 0; border: 0; background: var(--ink-2); border-radius: 10px; overflow: hidden; aspect-ratio: 1; cursor: zoom-in; }
.rv-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s ease; }
.rv-photo:hover img { transform: scale(1.04); }
.lightbox { position: fixed; inset: 0; z-index: 80; background: rgba(12,14,20,.88); display: grid; place-items: center; padding: 20px; }
.lightbox figure { margin: 0; display: grid; gap: 10px; justify-items: center; max-width: min(960px, 100%); }
.lightbox img { max-width: 100%; max-height: 80vh; border-radius: 10px; }
.lightbox figcaption { color: #e9ecf2; font-size: var(--fs-s); }
.lightbox-x { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 26px; cursor: pointer; }

/* ───────── 일본어 듣기 버튼 ───────── */
.say { display: inline-grid; place-items: center; width: 28px; height: 28px; margin-left: 6px; vertical-align: middle; border-radius: 50%; border: 1px solid var(--line); background: var(--night); color: var(--lantern); cursor: pointer; padding: 0; line-height: 1; }
.say:hover { border-color: var(--lantern); }
.say.on { background: var(--lantern); color: var(--on-accent); }
.paper .say { background: #fff; border-color: rgba(60,50,30,.25); color: #8a5a12; }
html.no-tts .say, html.no-tts .tts-only { display: none !important; }
.fee-row { display: flex; gap: 6px; align-items: center; }
.fee-row .input { flex: 1; min-width: 0; }
/* ───────── 가입 승인 ───────── */
.pending-notice { border-left-color: var(--c-yellow, #f2c94c); }
.pending-box { border-left: 3px solid var(--c-yellow, #f2c94c); }
.notice-btn { display: block; width: 100%; text-align: left; cursor: pointer; font: inherit; font-size: var(--fs-s); }
.notice-btn:hover { border-color: var(--lantern); }
.btn.danger-text { color: var(--bad); }
.linklike { border: 0; background: none; padding: 0; color: var(--lantern); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font: inherit; }
.pending-box .plist li { flex-direction: column; align-items: stretch; gap: 10px; }
.pending-box .plist .acts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.pending-box .plist .acts .btn { justify-content: center; text-align: center; padding-inline: 6px; }

/* ───────── 추리게임 (료칸 203호 살인사건) ───────── */
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.stamp.two { font-size: .85rem; letter-spacing: -.05em; }
.code-input { font-size: 1.6rem; letter-spacing: .3em; text-transform: uppercase; text-align: center; font-family: var(--display); }
.cast-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.cast-list li { display: flex; gap: 10px; align-items: flex-start; font-size: var(--fs-s); line-height: 1.6; }
.cast-letter { flex: none; width: 30px; height: 30px; border-radius: 6px; display: grid; place-items: center; font-family: var(--display); font-weight: 800; background: var(--ink-2); color: var(--lantern); border: 1px solid var(--line); }

/* 참가자: 캐릭터 고르기 */
.cast-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.cast { display: flex; gap: 10px; align-items: flex-start; text-align: left; padding: 12px; border-radius: var(--r); border: 1px solid var(--line); background: var(--ink); color: var(--paper); cursor: pointer; font: inherit; min-height: 96px; }
.cast-body { display: grid; gap: 1px; min-width: 0; line-height: 1.45; }
.cast-body b { font-size: var(--fs-s); }
.cast-body small { font-size: var(--fs-xs); color: var(--mute); }
.cast-who { margin-top: 4px; color: var(--lantern) !important; }
.cast.me { border-color: var(--lantern); background: color-mix(in srgb, var(--lantern) 12%, var(--ink)); }
.cast.me .cast-letter { background: var(--lantern); color: var(--on-accent); }
.cast[disabled] { opacity: .45; cursor: not-allowed; }
.cast[disabled] .cast-who { color: var(--mute) !important; }

/* 참가자: 역할 카드 */
.role-cover { display: grid; gap: 6px; justify-items: center; text-align: center; width: 100%; min-height: 220px; place-content: center; cursor: pointer; font: inherit; color: var(--card-ink); }
.role-cover b { font-family: var(--display); font-size: var(--fs-xl); }
.role-cover small { color: #6d6658; font-size: var(--fs-s); }
.role-card .verdict { margin: 6px 0 4px; padding: 10px 12px; border-radius: 4px; font-weight: 700; font-size: var(--fs-s); background: rgba(46,143,102,.12); color: #1f6b4b; border: 1px solid rgba(46,143,102,.35); }
.role-card .verdict.is-culprit { background: rgba(212,86,58,.12); color: #9c2f18; border-color: rgba(212,86,58,.45); }
.role-card p:not(.title):not(.name):not(.name-ko):not(.sect):not(.verdict) { font-size: var(--fs-s); color: #3d382e; }
.clock b.warn { color: var(--bad); }
.tabbar button .k rt { font-size: .45em; }

/* 중앙 화면 (노트북 → TV) */
body[data-tv] .site-head, body[data-tv] .site-foot, body[data-tv] .demo-strip { display: none; }
body[data-tv] { font-size: clamp(16px, 1.15vw, 22px); }
.tv { min-height: 100vh; display: grid; gap: 2.4vh; padding: 2.4vh 3vw 3vh; align-content: start; }
.tv-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.tv-title { display: flex; align-items: center; gap: 14px; }
.tv-title h1 { font-size: clamp(1.4rem, 2.2vw, 2.4rem); }
.tv-title p { color: var(--mute); font-size: var(--fs-s); }
.tv-plate { font-family: var(--display); font-weight: 800; font-size: clamp(1.2rem, 1.8vw, 2rem); border: 2px solid var(--shu); color: var(--shu); padding: 4px 10px; border-radius: 4px; transform: rotate(-4deg); }
.tv-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tv-code-s { font-family: var(--display); color: var(--mute); letter-spacing: .15em; margin-right: 6px; }
.tv-label { font-size: var(--fs-s); color: var(--mute); letter-spacing: .1em; }
.tv-sub { font-size: var(--fs-s); color: var(--mute); }
.tv-grid { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(0, 2.2fr); gap: 3vw; align-items: start; }
.tv-join { display: grid; justify-items: center; gap: 12px; text-align: center; background: var(--ink); border: 1px solid var(--line); border-radius: var(--r); padding: 24px 16px; }
.tv-join .qr { width: min(260px, 22vw); }
.tv-code { font-family: var(--display); font-weight: 800; color: var(--lantern); font-size: clamp(2.4rem, 4.4vw, 5.2rem); letter-spacing: .12em; padding-left: .12em; line-height: 1; white-space: nowrap; }
.tv-cast { display: grid; gap: 12px; }
.tv-cast-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.tv-cast-head h2 { font-size: clamp(1.2rem, 1.8vw, 2rem); }
.tv-slots { display: grid; gap: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tv-slot { position: relative; display: flex; gap: 12px; padding: 14px; border-radius: var(--r); border: 1px dashed var(--line); background: color-mix(in srgb, var(--ink) 60%, transparent); }
.tv-slot.taken { border-style: solid; background: var(--ink); }
.tv-slot.ready { border-color: var(--ok); }
.tv-letter { flex: none; width: 2.2em; height: 2.2em; display: grid; place-items: center; border-radius: 6px; font-family: var(--display); font-weight: 800; font-size: 1.3em; background: var(--ink-2); color: var(--lantern); }
.tv-slot.ready .tv-letter { background: var(--ok); color: var(--night); }
.tv-slot-body { display: grid; gap: 2px; line-height: 1.4; min-width: 0; }
.tv-slot-body small { color: var(--mute); font-size: .85em; }
.tv-who { margin-top: 4px; font-size: .9em; color: var(--paper); }
.tv-slot:not(.taken) .tv-who { color: var(--mute); }
.tv-x { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); background: var(--night); color: var(--mute); cursor: pointer; line-height: 1; font-size: 16px; }
.tv-x:hover { color: var(--bad); border-color: var(--bad); }
.tv-x.inline { position: static; width: 22px; height: 22px; font-size: 13px; vertical-align: middle; }
.tv-intro .jl .ja { font-size: clamp(1.1rem, 1.6vw, 1.8rem); line-height: 2.1; }
.tv-intro .jl .ko { font-size: clamp(.95rem, 1.1vw, 1.25rem); }
.tv-intro { display: grid; gap: 16px; max-width: 72em; }
.tv-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.tv-start { font-size: 1.2em; min-height: 56px; padding-inline: 32px; }
.tv-sched { max-width: 760px; }
.tv-sched-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 12px 0; }
.tv-sched-grid label { display: grid; gap: 4px; font-size: var(--fs-xs); color: var(--mute); }
.tv-main { display: grid; justify-items: center; text-align: center; gap: 1.6vh; padding-top: 2vh; }
.tv-step { color: var(--mute); letter-spacing: .2em; }
.tv-phase { font-size: clamp(2.2rem, 5vw, 5.5rem); line-height: 1.1; }
.tv-phase-ja { font-family: var(--ja-display); color: var(--mute); font-size: clamp(1.1rem, 2vw, 2.2rem); }
.tv-timer { font-family: var(--display); font-weight: 800; font-size: clamp(5rem, 17vw, 16rem); line-height: 1; color: var(--paper); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.tv-play.warn-1 .tv-timer { color: var(--lantern); }
.tv-play.warn-2 .tv-timer { color: var(--bad); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }
.tv-progress { display: flex; width: min(1100px, 92vw); gap: 4px; }
.tv-progress i { position: relative; height: 10px; border-radius: 5px; background: var(--ink-2); }
.tv-progress i.done { background: color-mix(in srgb, var(--lantern) 45%, var(--ink-2)); }
.tv-progress i.now { background: var(--lantern); }
.tv-progress span { position: absolute; top: 14px; left: 0; right: 0; font-style: normal; font-size: .72em; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.tv-progress i.now span { color: var(--paper); }
.tv-notice { margin-top: 3vh; font-size: clamp(1.05rem, 1.6vw, 1.8rem); max-width: 50em; color: var(--paper); }
.tv-players { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: auto; }
.tv-chip { border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: .9em; display: inline-flex; gap: 6px; align-items: center; }
.tv-chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.tv-chip.off { color: var(--mute); }
.tv-chip.off::before { background: var(--mute); }
.tv-paused { position: fixed; inset: 0; z-index: 40; display: grid; place-content: center; gap: 12px; text-align: center; background: rgba(10,14,28,.78); backdrop-filter: blur(4px); pointer-events: none; }
.tv-paused b { font-family: var(--display); font-size: clamp(3rem, 9vw, 8rem); color: var(--lantern); }
.tv-paused span { color: var(--paper); font-size: 1.2em; }
.tv-top { position: relative; z-index: 45; }
@media (max-width: 900px) {
  .tv-grid { grid-template-columns: 1fr; }
  .tv-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tv-join .qr { width: min(220px, 60vw); }
  .tv-sched-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 사건 도입 장면 (중앙 화면 · 휴대폰 공통) */
.op { position: relative; overflow: hidden; border-radius: var(--r); background: radial-gradient(120% 90% at 70% 20%, #2a2f4a 0%, var(--ink) 55%, #0b0e19 100%); color: var(--paper); }
.op-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.op-shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(8,10,20,.94) 0%, rgba(8,10,20,.6) 45%, rgba(8,10,20,.1) 100%); }
.op-text { position: relative; display: grid; gap: 10px; }
.op-kicker { font-size: var(--fs-xs); letter-spacing: .14em; color: var(--lantern); margin: 0; }
.op-title { margin: 0; }
.op-sub { color: var(--mute); margin: 0; }
.op .jl .ja { color: var(--paper); }
.op .jl .ko { color: #c9c4b6; }
.op-name { display: grid; gap: 4px; margin: 0; }
.op-name small { font-size: .55em; color: var(--mute); font-weight: 500; }
.op-name.sm { font-size: 1.15em; }
.op-tag { display: inline-block; margin: 0; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); font-size: var(--fs-xs); color: var(--lantern); justify-self: start; }
.op-who { margin: 0; font-size: var(--fs-s); color: var(--mute); }
.op-victim { display: flex; gap: 14px; align-items: center; margin-top: 6px; }
.op-face { width: 100%; height: 100%; object-fit: cover; display: block; }
.op-face.sm { width: 72px; height: 96px; border-radius: 6px; flex: none; border: 1px solid var(--line); }
.op-portrait { position: relative; aspect-ratio: 3 / 4; border-radius: var(--r); overflow: hidden; background: var(--ink-2); border: 1px solid var(--line); }
.op-letter { position: absolute; left: 8px; top: 8px; width: 34px; height: 34px; border-radius: 6px; display: grid; place-items: center; font-family: var(--display); font-weight: 800; background: rgba(8,10,20,.75); color: var(--lantern); }
.op-cast { display: grid; grid-template-columns: 110px 1fr; gap: 14px; align-items: start; padding: 14px; background: var(--ink); }
.op-body { display: grid; gap: 8px; min-width: 0; }
.op-rules { margin: 4px 0 0; padding-left: 1.2em; display: grid; gap: 6px; font-size: var(--fs-s); color: var(--paper); }
.op-check { padding: 28px 18px; text-align: center; display: grid; gap: 8px; }
.op-dots { display: flex; gap: 5px; justify-content: center; flex-wrap: wrap; }
.op-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-2); border: 1px solid var(--line); }
.op-dots i.done { background: color-mix(in srgb, var(--lantern) 45%, var(--ink-2)); }
.op-dots i.now { background: var(--lantern); border-color: var(--lantern); }

/* 휴대폰: 그림 위, 글 아래 */
.op-phone { display: grid; gap: 10px; }
.op-phone .op:not(.op-cast):not(.op-check) { display: grid; }
.op-phone .op-bg { position: static; aspect-ratio: 16 / 9; height: auto; }
.op-phone .op-shade { display: none; }
.op-phone .op-text { padding: 14px; }
.op-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.op-recap summary { cursor: pointer; font-weight: 700; }
.op-recap .cast-list { margin-top: 12px; grid-template-columns: 1fr; }

/* 중앙 화면: 장면을 크게 */
.tv-op-stage { display: grid; gap: 1.6vh; }
.tv-op-head { display: flex; justify-content: space-between; align-items: baseline; color: var(--mute); font-size: 1.1em; letter-spacing: .08em; }
.tv-op-head #tv-timer { font-family: var(--display); font-weight: 800; font-size: 2.2em; color: var(--paper); }
.tv-op.warn-2 #tv-timer { color: var(--bad); }
.tv .op { min-height: 68vh; display: flex; align-items: flex-end; }
.tv .op-text { padding: 5vh 4vw; max-width: 72em; gap: 1.6vh; }
.tv .op-kicker { font-size: clamp(.9rem, 1.2vw, 1.4rem); }
.tv .op .jl .ja { font-size: clamp(1.5rem, 2.8vw, 3.2rem); line-height: 1.9; }
.tv .op .jl .ko { font-size: clamp(1rem, 1.4vw, 1.7rem); }
.tv .op .tr-btn { display: none; }
.tv .op-name { font-size: clamp(2rem, 4vw, 4.6rem); }
.tv .op-tag { font-size: clamp(.9rem, 1.2vw, 1.4rem); }
.tv .op-who { font-size: clamp(1rem, 1.4vw, 1.6rem); }
.tv .op-face.sm { width: 12vh; height: 16vh; }
.tv .op-rules { font-size: clamp(1rem, 1.5vw, 1.7rem); gap: 1vh; }
.tv .op-cast { grid-template-columns: minmax(220px, 46vh) 1fr; gap: 4vw; padding: 4vh 4vw; align-items: center; }
.tv .op-cast .op-portrait { max-height: 62vh; }
.tv .op-letter { width: 3rem; height: 3rem; font-size: 1.6rem; }
.tv .op-check { justify-content: center; align-content: center; }
.tv .op-check .op-title { font-size: clamp(2rem, 4vw, 4.4rem); }
.tv .op-dots i { width: 12px; height: 12px; }
.tv .op.op-cast { display: grid; }
.op-vic .op-letter { color: var(--paper); }
.tts-steps { margin: 8px 0 14px; padding-left: 1.3em; display: grid; gap: 8px; font-size: var(--fs-s); line-height: 1.65; }
.prefs .linklike { align-self: center; }

/* 추리게임 그림 */
.game-banner { display: block; width: calc(100% + 2 * var(--pad, 20px)); max-width: none; margin: calc(-1 * var(--pad, 20px)) calc(-1 * var(--pad, 20px)) 4px; aspect-ratio: 16 / 7; object-fit: cover; border-radius: var(--r) var(--r) 0 0; }
.cast-face { position: relative; flex: none; width: 52px; height: 69px; border-radius: 6px; overflow: hidden; background: var(--ink-2); border: 1px solid var(--line); display: block; }
.cast-face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cast-face b { position: absolute; left: 3px; top: 3px; min-width: 20px; height: 20px; padding: 0 4px; border-radius: 4px; display: grid; place-items: center; font-family: var(--display); font-size: 12px; background: rgba(8,10,20,.78); color: var(--lantern); }
.cast-face.sm { width: 40px; height: 53px; }
.cast.me .cast-face { border-color: var(--lantern); box-shadow: 0 0 0 2px var(--lantern); }
.role-face { float: right; width: 92px; height: 123px; object-fit: cover; border-radius: 4px; margin: 0 0 8px 12px; border: 1px solid rgba(0,0,0,.15); box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.tv-face { position: relative; flex: none; width: 4.2em; height: 5.6em; border-radius: 6px; overflow: hidden; background: var(--ink-2); }
.tv-face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tv-face b { position: absolute; left: 4px; top: 4px; width: 1.6em; height: 1.6em; border-radius: 4px; display: grid; place-items: center; font-family: var(--display); background: rgba(8,10,20,.8); color: var(--lantern); }
.tv-slot.ready .tv-face { box-shadow: 0 0 0 3px var(--ok); }
.tv-slot:not(.taken) .tv-face img { opacity: .45; filter: grayscale(.6); }
.tv-lobby { position: relative; }
.tv-lobby::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(rgba(10,13,26,.62), rgba(10,13,26,.9) 70%), var(--tv-bg, none) center / cover no-repeat; }
/* 추리게임: 수색·증거·조합·심문·투표·진상 (휴대폰) */
.loc-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.loc-tab { position: relative; display: grid; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; padding: 0; background: var(--ink); color: var(--paper); cursor: pointer; font: inherit; text-align: left; }
.loc-tab img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; opacity: .7; }
.loc-tab span { display: grid; padding: 4px 8px 6px; line-height: 1.3; }
.loc-tab b { font-size: var(--fs-xs); }
.loc-tab small { font-size: 11px; color: var(--mute); }
.loc-tab small rt { font-size: .6em; }
.loc-tab[aria-selected="true"] { border-color: var(--lantern); box-shadow: 0 0 0 1px var(--lantern); }
.loc-tab[aria-selected="true"] img { opacity: 1; }
.loc-scene { position: relative; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: var(--ink-2); aspect-ratio: 16 / 9; }
.loc-scene > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.hot { position: absolute; padding: 0; border: 1.5px dashed rgba(240, 180, 76, .75); background: rgba(240, 180, 76, .08); border-radius: 6px; cursor: pointer; min-width: 22px; min-height: 22px; }
.hot i { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 700; background: rgba(8, 10, 20, .82); color: var(--lantern); border: 1px solid var(--lantern); }
.hot:hover, .hot:focus-visible { background: rgba(240, 180, 76, .22); outline: none; }
.hot.found { border-style: solid; border-color: var(--ok); }
.hot.found i { color: var(--night); background: var(--ok); border-color: var(--ok); }
.hot.locked { border-color: var(--shu); }
.hot.locked i { color: #fff; background: var(--shu); border-color: var(--shu); }
.hot.empty, .hot.seen { border-color: rgba(154, 161, 189, .5); background: none; }
.hot.empty i, .hot.seen i { color: var(--mute); border-color: var(--mute); }
.hot[disabled] { cursor: default; border-style: dotted; background: none; }
.spot-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.spot { width: 100%; display: flex; gap: 10px; align-items: center; text-align: left; font: inherit; color: var(--paper); background: var(--ink); border: 1px solid var(--line); border-radius: var(--r); padding: 8px 12px; min-height: 48px; cursor: pointer; }
.spot > i { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 700; border: 1px solid var(--lantern); color: var(--lantern); }
.spot > span { display: grid; min-width: 0; flex: 1; line-height: 1.5; }
.spot > span b { font-weight: 500; font-family: var(--ja); }
.spot > span small { font-size: var(--fs-xs); color: var(--mute); }
.spot > em { font-style: normal; font-size: var(--fs-xs); color: var(--mute); white-space: nowrap; }
.spot.found > i { background: var(--ok); border-color: var(--ok); color: var(--night); }
.spot.found > em { color: var(--ok); }
.spot.locked > i { background: var(--shu); border-color: var(--shu); color: #fff; }
.spot.locked > em { color: var(--bad); }
.spot.empty { opacity: .6; }
.spot[disabled] { cursor: default; opacity: .75; }
.mg-sheet-wrap { position: fixed; inset: 0; z-index: 60; display: grid; align-items: end; }
.mg-sheet-back { position: absolute; inset: 0; border: 0; padding: 0; background: rgba(5, 8, 18, .66); cursor: pointer; }
.mg-sheet { position: relative; width: min(640px, 100%); margin: 0 auto; max-height: 86vh; overflow: auto; background: var(--night); border: 1px solid var(--line); border-bottom: 0; border-radius: 14px 14px 0 0; padding: 18px var(--gutter) calc(18px + env(safe-area-inset-bottom)); display: grid; gap: 12px; animation: sheetup .22s ease-out both; }
@keyframes sheetup { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.mg-sheet .h-s small { font-size: var(--fs-xs); color: var(--mute); font-weight: 400; }
.sheet-k { margin: 0; font-size: var(--fs-xs); letter-spacing: .12em; color: var(--lantern); }
.sheet-flag { margin: 0; font-weight: 700; font-size: var(--fs-s); }
.sheet-flag.ok { color: var(--ok); }
.sheet-flag.lock, .sheet-flag.bad { color: var(--bad); }
.tx { margin: 0; font-size: var(--fs-s); line-height: 1.7; }
.ev-list { display: grid; gap: 12px; }
.ev-card { padding: 16px 16px 14px; display: grid; gap: 6px; }
.ev-card .stamp { width: 36px; height: 36px; font-size: 1.1rem; top: 10px; right: 10px; }
.ev-kind { margin: 0; font-size: var(--fs-xs); color: #6d6658; padding-right: 44px; }
.ev-title { margin: 0; font-size: var(--fs-m); color: var(--card-ink); padding-right: 44px; line-height: 1.5; }
.ev-title small { font-size: var(--fs-xs); color: #6d6658; font-weight: 400; }
.ev-card .tx { color: #3d382e; }
.ev-card .paper-tools { margin-top: 6px; padding-top: 10px; }
.ev-by { font-size: var(--fs-xs); color: #6d6658; }
.cmb-list { display: grid; gap: 6px; }
.cmb { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; cursor: pointer; background: var(--ink); }
.cmb input { accent-color: var(--lantern); width: 20px; height: 20px; flex: none; }
.cmb span { display: grid; line-height: 1.45; min-width: 0; }
.cmb small { font-size: var(--fs-xs); color: var(--mute); }
.cmb:has(input:checked) { border-color: var(--lantern); background: color-mix(in srgb, var(--lantern) 10%, var(--ink)); }
.cmb:has(input:disabled) { opacity: .6; cursor: default; }
.who-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; }
.who { display: flex; gap: 8px; align-items: center; text-align: left; font: inherit; color: var(--paper); background: var(--ink); border: 1px solid var(--line); border-radius: var(--r); padding: 6px 8px; cursor: pointer; min-height: 60px; }
.who > span:last-child { display: grid; line-height: 1.35; min-width: 0; }
.who b { font-size: var(--fs-xs); }
.who small { font-size: 11px; color: var(--mute); }
.who.on { border-color: var(--lantern); background: color-mix(in srgb, var(--lantern) 12%, var(--ink)); }
.talk-to { display: flex; gap: 12px; align-items: center; }
.talk-to p { margin: 0; }
.qcards { display: grid; gap: 10px; }
.qcard { display: grid; gap: 8px; border: 1px solid var(--line); border-left: 3px solid var(--lantern); border-radius: var(--r); padding: 12px 14px; background: var(--ink); }
.qcard.is-ev { border-left-color: var(--shu); }
.qcard .qline .ja { font-size: var(--fs-l); line-height: 1.9; }
.qcard > .btn { justify-self: start; }
.answer { display: grid; gap: 4px; border-top: 1px dashed var(--line); padding-top: 8px; }
.answer-who { font-size: var(--fs-xs); color: var(--lantern); }
.truth-wait { text-align: center; padding: 32px 18px; }
.verdict-card.team { border-color: var(--ok); }
.verdict-card.culprit { border-color: var(--shu); }
.verdict-card.team .h-m { color: var(--ok); }
.verdict-card.culprit .h-m { color: var(--bad); }
.truth-culprit { display: flex; gap: 12px; align-items: center; }
.truth-culprit p { margin: 0; }
.truth-culprit .cast-face { width: 72px; height: 96px; }
.mine-line { margin: 0; font-weight: 700; }
.tally { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tally li { display: grid; grid-template-columns: auto minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.tally-face { position: relative; width: 36px; height: 48px; border-radius: 5px; overflow: hidden; background: var(--ink-2); display: block; }
.tally-face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tally-face b { position: absolute; left: 2px; top: 2px; font-size: 11px; padding: 0 4px; border-radius: 3px; background: rgba(8,10,20,.8); color: var(--lantern); }
.tally-name { display: grid; line-height: 1.3; min-width: 0; }
.tally-name b { font-size: var(--fs-s); }
.tally-name small { font-size: var(--fs-xs); color: var(--mute); }
.tally-bar { height: 10px; border-radius: 5px; background: var(--ink-2); overflow: hidden; }
.tally-bar i { display: block; height: 100%; background: var(--mute); border-radius: 5px; transition: width .8s ease; }
.tally li.top .tally-bar i { background: var(--lantern); }
.tally li.is-culprit .tally-name b { color: var(--bad); }
.tally li.is-culprit .tally-face { box-shadow: 0 0 0 2px var(--shu); }
.tally-n { font-weight: 700; min-width: 2.6em; text-align: right; }
.solution section { display: grid; gap: 6px; }
.sol-h { margin: 6px 0 0; font-size: var(--fs-xs); letter-spacing: .12em; color: var(--lantern); font-weight: 700; }
.sol-tl, .sol-de { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.sol-tl li { display: grid; grid-template-columns: 4.2em 1fr; gap: 10px; align-items: baseline; }
.sol-tl b { color: var(--lantern); font-family: var(--display); }
.sol-de { counter-reset: d; }
.sol-de li { counter-increment: d; display: grid; grid-template-columns: 1.6em 1fr; gap: 6px; }
.sol-de li::before { content: counter(d); font-family: var(--display); font-weight: 800; color: var(--shu); }
/* 중앙 화면: 공용 증거판·투표 수·진상 */
.tv .jl .ko { display: block; }
.tv .jl .tr-btn { display: none; }
.tv-body { display: grid; gap: 3vw; align-items: start; }
.tv-play.with-board .tv-body { grid-template-columns: minmax(0, 1fr) minmax(280px, 28vw); }
.tv-play.with-board .tv-timer { font-size: clamp(4.5rem, 13vw, 13rem); }
.tv-play.with-board .tv-progress { width: 100%; }
.tv-board { background: var(--ink); border: 1px solid var(--line); border-radius: var(--r); padding: 2vh 1.4vw; display: grid; gap: 1.2vh; align-self: stretch; align-content: start; }
.tv-board h3 { display: flex; justify-content: space-between; align-items: baseline; font-size: 1.15em; }
.tv-board h3 span { color: var(--lantern); font-family: var(--display); }
.tv-board ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .8vh; }
.tv-board li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: .8vh .6vw; border-radius: 6px; background: var(--ink-2); animation: rise .5s ease both; }
.tv-kind { width: 1.8em; height: 1.8em; display: grid; place-items: center; border: 2px solid var(--shu); color: var(--shu); border-radius: 4px; font-family: var(--ja-display); font-weight: 800; font-size: .9em; }
.tv-ev { min-width: 0; line-height: 1.4; }
.tv-ev small { color: var(--mute); }
.tv-by { font-family: var(--display); color: var(--lantern); }
.tv-votes { font-size: clamp(1.4rem, 2.6vw, 3rem); color: var(--paper); }
.tv-votes b { font-family: var(--display); color: var(--lantern); font-size: 1.5em; }
.tv-truth { align-content: start; }
.tt-tally { width: min(1000px, 92vw); justify-self: center; display: grid; gap: 3vh; padding-top: 4vh; }
.tt-tally h2, .tt-sol .tt-k { font-size: clamp(1.6rem, 3vw, 3.2rem); }
.tv .tally { gap: 1.6vh; }
.tv .tally li { gap: 1.4vw; }
.tv .tally-face { width: 3.4em; height: 4.5em; }
.tv .tally-name b { font-size: 1.3em; }
.tv .tally-bar { height: 1.2em; border-radius: .6em; }
.tv .tally-n { font-size: 1.5em; font-family: var(--display); }
.tt-tally .tally li.top .tally-bar i { background: var(--paper); }
.tt-sus { font-family: var(--display); font-size: clamp(2rem, 4vw, 4.4rem); color: var(--lantern); text-align: center; animation: pulse 1.4s ease-in-out infinite; }
.tt-reveal { display: grid; grid-template-columns: auto 1fr; gap: 3vw; align-items: center; }
.tt-reveal.big { width: min(1300px, 94vw); justify-self: center; padding-top: 3vh; animation: rise .6s ease both; }
.tt-face { position: relative; width: 16vh; aspect-ratio: 3 / 4; border-radius: 8px; overflow: hidden; background: var(--ink-2); border: 3px solid var(--shu); }
.tt-reveal.big .tt-face { width: min(46vh, 34vw); animation: popin .5s cubic-bezier(.2,1.4,.4,1) .2s both; }
@keyframes popin { from { transform: scale(1.25); opacity: 0; } to { transform: none; opacity: 1; } }
.tt-face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tt-face b { position: absolute; left: 6px; top: 6px; padding: 2px 10px; border-radius: 4px; background: rgba(8,10,20,.82); color: var(--lantern); font-family: var(--display); font-size: 1.3em; }
.tt-who { display: grid; gap: 1vh; min-width: 0; }
.tt-who p { margin: 0; }
.tt-k { color: var(--mute); letter-spacing: .14em; font-size: 1.1em; margin: 0; }
.tt-who h2 { font-size: clamp(1.8rem, 3.4vw, 3.6rem); line-height: 1.15; color: var(--bad); }
.tt-reveal.big .tt-who h2 { font-size: clamp(2.6rem, 6vw, 6.4rem); }
.tt-ja { font-family: var(--ja-display); color: var(--mute); font-size: 1.3em; }
.tt-player { font-size: 1.2em; }
.tt-verdict { display: inline-grid; justify-self: start; gap: 2px; padding: 1vh 1.4vw; border-radius: 6px; border: 2px solid; margin-top: 1vh; }
.tt-verdict b { font-family: var(--display); font-size: clamp(1.4rem, 2.6vw, 3rem); }
.tt-verdict span { font-family: var(--ja-display); font-size: .95em; }
.tt-verdict.team { border-color: var(--ok); color: var(--ok); }
.tt-verdict.culprit { border-color: var(--shu); color: var(--bad); }
.tt-why { font-size: 1.15em; color: var(--paper); }
.tt-right { color: var(--mute); }
.tt-right b { color: var(--paper); }
.tt-grid { display: grid; grid-template-columns: minmax(300px, 34vw) minmax(0, 1fr); gap: 3vw; align-items: start; }
.tt-side { display: grid; gap: 3vh; position: sticky; top: 2vh; }
.tt-side .tt-reveal { grid-template-columns: auto 1fr; gap: 1.4vw; }
.tt-side .tt-verdict b { font-size: 1.5em; }
.tt-mini .tally-face { width: 2.4em; height: 3.2em; }
.tt-mini .tally-name b { font-size: 1em; }
.tt-mini .tally-n { font-size: 1.1em; }
.tt-sol { display: grid; gap: 1.6vh; max-height: calc(100vh - 16vh); overflow: auto; padding-right: 1vw; }
.tv .solution { gap: 2.4vh; }
.tv .sol-h { font-size: 1em; }
.tv .solution .tx { font-size: 1.2em; }
.tv .solution .jl .ja { font-size: 1.3em; line-height: 1.9; }
.tv .solution .jl .ko { font-size: 1.05em; }
@media (max-width: 900px) {
  .tv-play.with-board .tv-body, .tt-grid, .tt-reveal { grid-template-columns: 1fr; }
}
.tt-side .tt-face { width: 11vh; }
.tt-side .tt-who h2 { font-size: clamp(1.5rem, 2.4vw, 2.6rem); }
.tt-side .tt-verdict { padding: .6vh 1vw; }
.tt-mini .tally { gap: .7vh; }
.tt-mini .tally-face { width: 2em; height: 2.6em; }
/* 운영 조절 (중앙 화면 창 · 휴대폰 리모컨 공통) */
.sched-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.sched-grid label { display: grid; gap: 4px; font-size: var(--fs-xs); color: var(--mute); }
.sched-grid label.past { opacity: .5; }
.now-ctl { display: grid; gap: 10px; }
.now-ctl-k { margin: 0; font-size: var(--fs-s); color: var(--mute); }
.now-ctl-k b { color: var(--paper); }
.now-ctl-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.now-ctl-row .btn { padding-inline: 4px; }
.now-ctl.big .now-ctl-row .btn { min-height: 48px; font-size: var(--fs-s); }
.now-ctl.big > .btn { min-height: 56px; font-size: var(--fs-m); }
.tv-panel { position: relative; z-index: 46; display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); align-items: start; max-width: 1200px; }
.tv-panel .sched-form { border: 0; padding: 0; background: none; }
.tv-panel:not(.card) { grid-template-columns: 1fr; }
.tv-remote { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; max-width: 760px; }
.tv-remote .qr { width: 200px; background: #fff; padding: 10px; border-radius: 8px; }
.tv-hint { display: block; text-decoration: none; color: var(--paper); }
.tv-sched .sched-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 760px) {
  .tv-panel, .tv-remote { grid-template-columns: 1fr; }
  .tv-tools .btn.small { padding: 6px 10px; }
  .tv-sched .sched-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.remote .h-m .tnum { letter-spacing: .1em; color: var(--lantern); }
.rm-now { text-align: center; display: grid; gap: 4px; justify-items: center; }
.rm-now.paused { border-color: var(--lantern); }
.rm-step { margin: 0; color: var(--mute); letter-spacing: .2em; font-size: var(--fs-xs); }
.rm-phase { font-size: var(--fs-xl); line-height: 1.3; }
.rm-phase small { display: block; font-size: var(--fs-xs); color: var(--mute); font-family: var(--ja-display); font-weight: 400; }
.rm-timer { font-family: var(--display); font-weight: 800; font-size: 4.2rem; line-height: 1.05; color: var(--paper); }
.rm-now.paused .rm-timer { color: var(--lantern); }
.rm-progress { width: 100%; margin-top: 8px; }
.rm-progress i { height: 8px; }
.rm-row { display: grid; }
.rm-big { min-height: 60px; font-size: var(--fs-m); width: 100%; }
.rm-players { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.rm-players li { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--ink); }
.rm-players li > b { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 5px; background: var(--ink-2); color: var(--lantern); font-family: var(--display); }
.rm-players li > span { flex: 1; display: grid; line-height: 1.35; min-width: 0; }
.rm-players li small { font-size: var(--fs-xs); color: var(--mute); }
.rm-players li.off > span { opacity: .6; }
.remote details summary { cursor: pointer; font-weight: 700; }

/* 프로그램 페이지: 대표 프로그램 크게 */
.game.feature { --pad: 28px; padding: var(--pad); }
.game.feature .game-banner { aspect-ratio: 16 / 9; }
.game.feature .h-l { font-size: clamp(26px, 5vw, 38px); line-height: 1.2; margin: 0; }
.game.feature p { font-size: 17px; }

/* 홈: 다가오는 모임 카드 (프로그램 이미지 포함) */
.up-list { display: grid; gap: 16px; }
.up-card { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); padding: 0; overflow: hidden; color: inherit; text-decoration: none; transition: transform .15s, box-shadow .15s; }
.up-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.up-card img, .up-card .up-ph { width: 100%; height: 100%; min-height: 220px; object-fit: cover; display: block; }
.up-ph { display: grid; place-items: center; font-size: 42px; letter-spacing: .1em; background: var(--line); color: var(--muted, #888); }
.up-body { padding: 24px; align-content: center; }
.up-body h3 { font-size: 22px; margin: 0; }
.up-go { justify-self: start; margin-top: 6px; }
@media (max-width: 720px) { .up-card { grid-template-columns: 1fr; } .up-card img, .up-card .up-ph { min-height: 0; aspect-ratio: 16 / 9; } }
/* 모임 목록 카드 이미지 */
.card.meetup.has-img { position: relative; }
.meetup-img { grid-column: 1 / -1; width: calc(100% + 40px); max-width: none; margin: -20px -20px 4px; aspect-ratio: 16 / 7; object-fit: cover; border-radius: var(--r) var(--r) 0 0; display: block; }

.mf-photo { position: relative; max-width: 360px; }
.mf-photo img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--r); }
.mf-photo .ph-x { position: absolute; top: 6px; right: 6px; }
