/* 한지 같은 반투명 패널 + 단청에서 가져온 먹색·청록·주홍 */
:root {
  --ink: #2b2420;
  --ink-soft: #6a5f57;
  --paper: rgba(250, 246, 238, 0.86);
  --paper-solid: #f8f3ea;
  --line: rgba(60, 45, 35, 0.14);
  --jade: #2f6f62;
  --jade-soft: #e3efe9;
  --vermilion: #b8463f;
  --gold: #c9953a;
  --display: "Gowun Batang", "Nanum Myeongjo", serif;
  --body: "Gowun Dodum", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --radius: 18px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #1c1410; color: var(--ink); font-family: var(--body); -webkit-tap-highlight-color: transparent; word-break: keep-all; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--jade); outline-offset: 2px; }
#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
#fade { position: fixed; inset: 0; background: #120d0a; opacity: 0; pointer-events: none; transition: opacity .45s ease; z-index: 40; }
#fade.on { opacity: 1; }

.glass { background: var(--paper); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); border: 1px solid rgba(255,255,255,.6); box-shadow: 0 6px 24px rgba(30, 20, 10, .14); }
/* 모든 버튼 아래 붙는 가장 작은 설명 문구 */
button .lbl { display: inline-flex; gap: 6px; align-items: center; }
button .cap { display: block; font-size: 10px; line-height: 1.3; font-weight: 400; letter-spacing: 0; opacity: .66; margin-top: 2px; white-space: normal; }
.primary, .ghost { display: grid; justify-items: center; }
.primary { background: var(--jade); color: #fdfaf3; padding: 14px 22px; border-radius: 999px; font-weight: 600; letter-spacing: .01em; transition: transform .15s, background .15s; }
.primary:hover { background: #255a50; }
.primary:active { transform: scale(.98); }
.ghost { padding: 13px 22px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.5); }
.ghost.small { padding: 8px 12px; font-size: 13px; }
.wide { width: 100%; }
.link { color: var(--jade); text-decoration: underline; text-underline-offset: 3px; padding: 4px; }
.muted { color: var(--ink-soft); }
.small { font-size: 12.5px; }
.eyebrow { font-size: 12px; letter-spacing: .18em; color: var(--ink-soft); margin: 0 0 6px; }
.row { display: flex; gap: 8px; align-items: center; }
.between { justify-content: space-between; }
.icon-btn { min-width: 44px; padding: 5px 7px 4px; border-radius: 14px; display: grid; justify-items: center; font-size: 16px; line-height: 1.1; }
.icon-btn .cap { margin-top: 1px; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.panel-head h2 { font-family: var(--display); font-size: 24px; margin: 0; }

.screen { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }

/* 첫 화면 */
#intro { background: linear-gradient(180deg, rgba(20,14,10,.05), rgba(20,14,10,.55)); }
.intro-card { max-width: 440px; width: 100%; padding: 34px 28px 26px; border-radius: 26px; background: var(--paper); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.intro-card h1 { font-family: var(--display); font-weight: 700; font-size: 40px; line-height: 1.2; letter-spacing: .02em; margin: 0 0 10px; color: var(--ink); text-wrap: balance; }
.lead { font-size: 16px; line-height: 1.7; margin: 0 0 22px; color: var(--ink-soft); }
.intro-actions { display: grid; gap: 10px; }
.fine { font-size: 12.5px; line-height: 1.6; color: var(--ink-soft); margin: 16px 0 0; }
.fine.credit { font-size: 10px; margin-top: 8px; opacity: .8; }
.link { display: inline-grid; justify-items: start; }
.place .cap-line { font-size: 10px; color: var(--ink-soft); opacity: .7; margin-top: 4px; }

/* 캐릭터 꾸미기 */
#creator { background: rgba(20, 14, 10, .45); }
.creator { width: min(960px, 100%); max-height: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-radius: 26px; overflow: hidden; background: var(--paper-solid); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.preview-wrap { position: relative; background: radial-gradient(circle at 50% 40%, #fbf2df, #e7d8bd); min-height: 320px; }
#preview { width: 100%; height: 100%; display: block; touch-action: none; }
.hint { position: absolute; bottom: 10px; width: 100%; text-align: center; font-size: 12px; color: var(--ink-soft); margin: 0; }
.options { padding: 22px; overflow-y: auto; max-height: 86vh; display: grid; gap: 16px; align-content: start; }
.field { display: grid; gap: 6px; font-size: 13px; color: var(--ink-soft); }
.field input, .field textarea { font: inherit; font-size: 16px; color: var(--ink); padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line); background: #fff; width: 100%; min-width: 0; resize: none; }
.group h3 { font-size: 13px; font-weight: 400; color: var(--ink-soft); margin: 0 0 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 8px 13px 7px; border-radius: 14px; border: 1px solid var(--line); background: #fff; font-size: 14px; display: grid; justify-items: start; text-align: left; }
.chip[aria-pressed="true"] { border-color: var(--jade); background: var(--jade-soft); color: #1f4d44; font-weight: 600; }
.chip .dot { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(0,0,0,.1); }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--jade); }

/* 위치 고르기 */
#places { background: rgba(20, 14, 10, .45); }
.places { width: min(980px, 100%); max-height: 100%; overflow-y: auto; padding: 24px; border-radius: 26px; background: var(--paper-solid); box-shadow: 0 20px 60px rgba(0,0,0,.3); display: grid; gap: 18px; }
.place-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.place { text-align: left; border-radius: 20px; overflow: hidden; background: #fff; border: 1px solid var(--line); display: grid; grid-template-rows: auto 1fr; transition: transform .15s, box-shadow .15s; }
.place:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.place canvas { width: 100%; aspect-ratio: 4 / 3; display: block; }
.place .body { padding: 14px 16px 16px; display: grid; gap: 4px; }
.place h3 { font-family: var(--display); font-size: 21px; margin: 0; }
.place .where { font-size: 13px; color: var(--jade); }
.place p { margin: 2px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--ink-soft); }
.place .stay { font-size: 12px; color: var(--ink-soft); margin-top: 6px; }

/* HUD */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 10; }
#hud > * { pointer-events: auto; }
.hud-top { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; gap: 8px; padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left)); pointer-events: none; }
.hud-top > * { pointer-events: auto; }
.hud-left, .hud-right { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hud-right { justify-content: flex-end; }
.chip-btn { border-radius: 18px; padding: 7px 14px 6px; font-size: 14px; display: grid; justify-items: start; white-space: nowrap; }
.chip-btn b { font-family: var(--display); font-size: 15px; }
.mini { border-radius: 999px; padding: 8px 13px; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
#toasts { position: absolute; top: calc(max(12px, env(safe-area-inset-top)) + 54px); left: max(12px, env(safe-area-inset-left)); display: grid; gap: 6px; pointer-events: none; max-width: min(420px, calc(100% - 24px)); }
.toast { background: rgba(40, 32, 26, .62); color: #fbf6ec; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding: 10px 16px; border-radius: 999px; font-size: 14px; animation: toast-in .3s ease both; justify-self: start; }
.toast.out { animation: toast-out .4s ease both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-6px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-6px); } }
.menu { position: absolute; right: max(12px, env(safe-area-inset-right)); top: calc(max(12px, env(safe-area-inset-top)) + 52px); border-radius: 16px; padding: 6px; display: grid; min-width: 180px; }
.menu button { display: grid; text-align: left; padding: 9px 14px; border-radius: 10px; font-size: 14px; }
.menu button:hover { background: rgba(0,0,0,.05); }
#actions { position: absolute; bottom: max(14px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); display: flex; gap: 2px; padding: 6px; border-radius: 22px; max-width: calc(100% - 24px); overflow-x: auto; scrollbar-width: none; }
#actions::-webkit-scrollbar { display: none; }
.act .cap { max-width: 66px; text-align: center; margin-top: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.act { display: grid; justify-items: center; align-content: start; gap: 2px; min-width: 70px; padding: 7px 6px 6px; border-radius: 16px; font-size: 12px; color: var(--ink); }
.act svg { width: 26px; height: 26px; }
.act:hover { background: rgba(0,0,0,.05); }
.act[aria-pressed="true"] { background: var(--jade); color: #fff; }
#context-btns { position: absolute; bottom: calc(max(14px, env(safe-area-inset-bottom)) + 142px); left: 50%; transform: translateX(-50%); display: flex; gap: 8px; pointer-events: none; }
.ctx { display: grid; justify-items: center; pointer-events: auto; border-radius: 18px; padding: 9px 18px 7px; font-size: 14px; font-weight: 600; white-space: nowrap; }
#btn-wish { background: #fff6e4; border-color: #e8c98a; }
#bae-counter { position: absolute; top: 50%; right: max(14px, env(safe-area-inset-right)); transform: translateY(-50%); border-radius: 18px; padding: 12px 16px; text-align: center; font-variant-numeric: tabular-nums; }
#bae-counter b { display: block; font-family: var(--display); font-size: 30px; }
#guest-bar { position: absolute; bottom: max(14px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); border-radius: 999px; padding: 10px 16px; font-size: 14px; white-space: nowrap; }
#joystick { position: absolute; left: max(18px, env(safe-area-inset-left)); bottom: calc(max(14px, env(safe-area-inset-bottom)) + 84px); width: 110px; height: 110px; border-radius: 50%; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.4); display: none; touch-action: none; }
#joystick .knob { position: absolute; left: 35px; top: 35px; width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.75); }
@media (pointer: coarse) { #joystick { display: block; } }

/* 모달 */
.modal { position: fixed; inset: 0; z-index: 30; background: rgba(20, 14, 10, .35); display: grid; place-items: center; padding: 16px; }
.sheet { width: min(440px, 100%); max-height: 88vh; overflow-y: auto; background: rgba(248, 244, 236, .94); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-radius: 24px; padding: 22px; display: grid; gap: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.sub { margin: 0; color: var(--ink-soft); font-size: 14px; line-height: 1.55; }
.server-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.server { text-align: left; padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: rgba(255,255,255,.55); display: grid; gap: 4px; }
.server b { font-size: 15px; }
.server span { font-size: 13px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.server.current { border-color: #e2b778; background: #fbf0dd; }
.server.full { opacity: .5; cursor: not-allowed; }
.wish-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.wish-list li { padding: 12px 14px; border-radius: 14px; background: #fff; border: 1px solid var(--line); font-size: 14px; line-height: 1.5; }
.wish-list li small { display: block; color: var(--ink-soft); margin-top: 4px; }

/* ───────── 로딩 시안 1~5 (뒤에서 두물머리 풍경이 돈다) ───────── */
#loading { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; --p: 0; color: var(--ink); }
#loading .ld { display: none; }
#loading[data-v="1"] .ld1, #loading[data-v="2"] .ld2, #loading[data-v="3"] .ld3, #loading[data-v="4"] .ld4, #loading[data-v="5"] .ld5 { display: grid; }
.ld-msg { margin: 0; font-size: 13px; color: var(--ink-soft); }
.ld-credit { position: absolute; bottom: max(10px, env(safe-area-inset-bottom)); left: 0; right: 0; text-align: center; font-size: 10px; color: rgba(255,255,255,.85); text-shadow: 0 1px 2px rgba(0,0,0,.4); margin: 0; padding: 0 16px; }
/* 1 족자: 한지 카드 가운데, 가는 진행선 */
.ld1 { gap: 10px; justify-items: center; text-align: center; padding: 34px 40px 28px; border-radius: 26px; background: var(--paper); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 20px 60px rgba(0,0,0,.2); }
.ld1 h1 { font-family: var(--display); font-size: clamp(30px, 6vw, 44px); margin: 0; }
.ld1 .bar { width: min(260px, 60vw); height: 3px; border-radius: 3px; background: rgba(60,45,35,.12); overflow: hidden; }
.ld1 .bar i { display: block; height: 100%; width: calc(var(--p) * 100%); background: var(--jade); transition: width .4s ease; }
/* 2 새벽 안개: 큰 제목이 왼쪽 아래에 */
#loading[data-v="2"] { place-items: end start; background: linear-gradient(180deg, transparent 40%, rgba(250,244,234,.85)); }
.ld2 { gap: 6px; padding: 0 0 48px 6vw; }
.ld2 h1 { font-family: var(--display); font-size: clamp(44px, 9vw, 96px); line-height: 1.05; margin: 0 0 12px; letter-spacing: .02em; }
.ld2 .ld-pct { font-size: 13px; color: var(--jade); font-variant-numeric: tabular-nums; }
/* 3 현판과 향: 향이 타들어 가며 진행 */
.ld3 { justify-items: center; gap: 10px; }
.plaque { padding: 16px 44px; background: #2a1d16; border: 8px solid #2f7d6d; outline: 3px solid #b8463f; outline-offset: -14px; box-shadow: 0 16px 40px rgba(0,0,0,.35); }
.plaque span { font-family: var(--display); font-weight: 700; font-size: clamp(40px, 8vw, 64px); color: #e8c35a; letter-spacing: .2em; }
.ld3 .sub { margin: 0; font-family: var(--display); font-size: 20px; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.4); letter-spacing: .3em; }
.incense { position: relative; width: 6px; height: 120px; margin-top: 8px; }
.incense .stick { position: absolute; left: 1px; bottom: 0; width: 4px; height: calc((1 - var(--p)) * 100% + 6px); background: linear-gradient(#8a5a3c, #5a3826); border-radius: 2px; transition: height .4s; }
.incense .ember { position: absolute; left: -1px; bottom: calc((1 - var(--p)) * 100%); width: 8px; height: 8px; border-radius: 50%; background: #ff8a3a; box-shadow: 0 0 10px 3px rgba(255,140,60,.7); transition: bottom .4s; }
.incense::before { content: ""; position: absolute; left: -10px; bottom: calc((1 - var(--p)) * 100% + 8px); width: 26px; height: 40px; border-radius: 50%; border-left: 2px solid rgba(255,255,255,.6); filter: blur(1px); animation: smoke 3s ease-in-out infinite; transition: bottom .4s; }
@keyframes smoke { 50% { transform: translateX(6px) scaleY(1.1); opacity: .5; } }
.ld3 .ld-msg { color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
/* 4 연등: 진행할수록 연등에 불이 켜진다 */
#loading[data-v="4"] { background: radial-gradient(ellipse at 50% 40%, rgba(30,20,16,.15), rgba(30,20,16,.6)); }
.ld4 { justify-items: center; gap: 18px; text-align: center; }
.ld4 h1 { font-family: var(--display); font-size: clamp(30px, 6vw, 48px); color: #fff8ea; margin: 0; text-shadow: 0 2px 10px rgba(0,0,0,.4); }
.lanterns { display: flex; gap: clamp(10px, 3vw, 22px); }
.lanterns i { width: 30px; height: 34px; border-radius: 48% 48% 42% 42%; background: #6b5a4e; position: relative; transition: background .4s, box-shadow .4s; }
.lanterns i::before { content: ""; position: absolute; left: 50%; top: -22px; width: 1px; height: 22px; background: rgba(255,255,255,.5); }
.lanterns i::after { content: ""; position: absolute; left: 50%; bottom: -12px; width: 2px; height: 10px; margin-left: -1px; background: #f2e6c8; }
.lanterns i.on:nth-child(odd) { background: #f08aa0; box-shadow: 0 0 22px 6px rgba(240,138,160,.55); }
.lanterns i.on:nth-child(even) { background: #f2c45a; box-shadow: 0 0 22px 6px rgba(242,196,90,.55); }
.ld4 .ld-msg { color: #f6ecd8; }
/* 5 오늘의 한 줄: 문장과 둥근 진행 */
.ld5 { justify-items: center; gap: 14px; text-align: center; max-width: 520px; padding: 30px 32px; border-radius: 26px; background: rgba(250,246,238,.78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.ld5 blockquote { margin: 0; font-family: var(--display); font-size: clamp(22px, 4.4vw, 30px); line-height: 1.5; text-wrap: balance; }
.ring { position: relative; width: 52px; height: 52px; display: grid; place-items: center; }
.ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring circle { fill: none; stroke: rgba(60,45,35,.12); stroke-width: 3; }
.ring circle.fg { stroke: var(--jade); stroke-dasharray: 106.8; stroke-dashoffset: calc(106.8 * (1 - var(--p))); transition: stroke-dashoffset .4s; stroke-linecap: round; }
.ring b { font-size: 11px; font-variant-numeric: tabular-nums; color: var(--ink-soft); }

/* ───────── 장소 바꾸기 ───────── */
#scene-bar { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(max(14px, env(safe-area-inset-bottom)) + 84px); display: flex; gap: 2px; padding: 4px; border-radius: 18px; }
#scene-bar button { display: grid; justify-items: center; padding: 6px 12px 5px; border-radius: 14px; font-size: 13.5px; }
#scene-bar button[aria-pressed="true"] { background: var(--jade); color: #fff; }
#scene-bar button:hover:not([aria-pressed="true"]) { background: rgba(0,0,0,.05); }
#sched-chip .lbl { font-size: 13px; font-variant-numeric: tabular-nums; }

/* 첫 방문 안내 */
#welcome, #sched-ask { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(max(14px, env(safe-area-inset-bottom)) + 206px); width: min(460px, calc(100% - 24px)); border-radius: 20px; padding: 16px 18px; display: grid; gap: 6px; }
#welcome p { margin: 0; font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; }
#welcome .row, #sched-ask .row { flex-wrap: wrap; margin-top: 4px; }
#sched-ask b { font-family: var(--display); font-size: 17px; }
#welcome[hidden], #sched-ask[hidden] { display: none; }

/* 크게 보기 (화면보호기): 알림 말고는 모두 숨겨요 */
body.calm #hud > :not(#toasts) { display: none !important; }
.small-btn { padding: 9px 14px 7px; font-size: 13.5px; }

/* 시간표 */
.wide-sheet { width: min(620px, 100%); }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--jade); }
.sched-rows { display: grid; gap: 8px; }
.sched-row { display: grid; grid-template-columns: auto auto auto minmax(80px, 1fr) minmax(70px, 1fr) auto; gap: 6px; align-items: center; }
.sched-row input, .sched-row select { font: inherit; font-size: 14px; padding: 8px 9px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink); min-width: 0; }
.row.wrap { flex-wrap: wrap; }
.timeline { display: grid; gap: 4px; }
.tl-bar { position: relative; height: 22px; border-radius: 8px; background: rgba(60,45,35,.08); overflow: hidden; }
.tl-bar i { position: absolute; top: 0; bottom: 0; }
.tl-bar em { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--ink); }
.tl-ticks { position: relative; height: 14px; font-size: 10px; color: var(--ink-soft); }
.tl-ticks span { position: absolute; transform: translateX(-50%); }
.tl-ticks span:first-child { transform: none; } .tl-ticks span:last-child { transform: translateX(-100%); }
.tl-legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; color: var(--ink-soft); }
.tl-legend b { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }

/* 기록 */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stats > p { grid-column: 1 / -1; margin: 0; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; display: grid; }
.stat small { font-size: 11.5px; color: var(--ink-soft); }
.stat b { font-family: var(--display); font-size: 20px; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
#record-table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
#record-table th, #record-table td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
#record-table th:first-child, #record-table td:first-child { text-align: left; }
#record-table th { font-weight: 400; color: var(--ink-soft); font-size: 12px; }

@media (max-width: 760px) {
  #scene-bar button { padding: 5px 9px 4px; font-size: 13px; }
  .sched-row { grid-template-columns: 1fr auto 1fr; }
  .sched-row select, .sched-row input[type="text"] { grid-column: span 1; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .creator { grid-template-columns: 1fr; grid-template-rows: 38vh 1fr; height: 100%; }
  .options { max-height: none; }
  .place-list { grid-template-columns: 1fr; }
  .intro-card h1 { font-size: 32px; }
  .chip-btn { padding: 8px 12px; font-size: 13px; }
  .hud-top { flex-direction: column; }
  .hud-right { justify-content: flex-start; }
  #toasts { top: calc(max(12px, env(safe-area-inset-top)) + 100px); }
  .act { min-width: 52px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ───────── 관리자 ───────── */
/* 아래 오른쪽 구석의 거의 투명한 버튼 */
#admin-btn { position: absolute; right: max(10px, env(safe-area-inset-right)); bottom: max(6px, env(safe-area-inset-bottom)); font-size: 10px; padding: 4px 8px; border-radius: 8px; color: #fff; opacity: .12; transition: opacity .2s; }
#admin-btn:hover, #admin-btn:focus-visible { opacity: .6; }
body.admin #admin-btn { opacity: .5; }
/* 방문 수·접속 인원·누적 숫자는 관리자에게만 */
body:not(.admin) #hud-people,
body:not(.admin) .server span,
body:not(.admin) .server-note,
body:not(.admin) .place .stay { display: none !important; }
.admin-err { min-height: 1.2em; margin: 4px 0 8px; color: var(--vermilion); font-size: 13px; }
.admin-h { font-size: 13px; font-weight: 600; margin: 8px 0 0; }
.admin-bars { display: flex; align-items: flex-end; gap: 4px; height: 90px; padding-top: 4px; }
.admin-bars div { flex: 1; height: 100%; display: grid; grid-template-rows: 1fr auto; align-items: end; min-width: 0; }
.admin-bars i { display: block; background: var(--jade); border-radius: 4px 4px 0 0; min-height: 2px; }
.admin-bars span { font-size: 10px; color: var(--ink-soft); text-align: center; font-variant-numeric: tabular-nums; }
.admin-rooms { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 14px; }
.admin-rooms li { display: flex; justify-content: space-between; padding: 6px 10px; background: #fff; border-radius: 10px; border: 1px solid var(--line); }
#admin-panel { display: grid; gap: 10px; }
#admin-panel .stats { grid-template-columns: repeat(3, 1fr); }
.menu-links { margin: 6px 0 2px; padding: 8px 14px 4px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--ink-soft); }
.menu-links a { color: inherit; }
.ld-credit a { color: inherit; }
/* 디자인 고르기: 지금 쓰는 디자인 표시 */
.place.current { border-color: var(--jade); box-shadow: 0 0 0 2px var(--jade); }
#design-chip b { font-family: var(--display); }
/* 족자 문구 고르기 */
.scroll-row { display: grid; grid-template-columns: auto minmax(90px, 1fr) minmax(110px, 1.4fr) auto; gap: 6px; align-items: center; }
.scroll-row input[type="text"] { font: inherit; font-size: 14px; padding: 8px 9px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink); min-width: 0; }
.scroll-row input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--jade); }

/* 장소 줄·동작 줄: 큰 글자만, 작은 설명은 커서를 올리면 말풍선으로 (js/tip.js) */
#actions .cap, #scene-bar .cap { display: none; }
#actions .act { min-width: 54px; padding: 8px 6px 7px; }
#scene-bar button { padding: 8px 14px; }
#tip { position: fixed; z-index: 60; pointer-events: none; padding: 6px 10px; border-radius: 9px; background: rgba(40, 32, 26, .9); color: #fbf6ec; font-size: 12px; line-height: 1.35; white-space: nowrap; box-shadow: 0 4px 14px rgba(0,0,0,.2); }
