@font-face { font-family: 'Galmuri11'; src: url('../fonts/Galmuri11.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Galmuri11'; src: url('../fonts/Galmuri11-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'FusionHan'; src: url('../fonts/FusionPixel12-Han.woff2') format('woff2'); font-display: swap; }
/* 트래블 메이커 — 세로 폰 화면 먼저. 색은 테마마다 몇 개만. */
:root {
  /* 강조는 굵기 대신 색 (도트 글꼴은 굵게 하면 뭉개진다): 이름·제목 주황, 숫자·시각 하늘, 돈 나감 빨강, 좋은 일 초록 */
  --hl-name: #f6b04a; --hl-num: #7fd0ff; --hl-bad: #ff6b6b; --hl-good: #57d68d;
  --accent: #7fb2ff;
  --bg: #0d0f18; --fg: #e8ecf6; --muted: #8e96ad; --card: #191c2a; --line: #2a2f45;
  --btn: #262a3d; --btnfg: #e8ecf6; --pri: var(--accent); --prifg: #0d0f18;
  --outer: #06070b;
}
body.th-title, body.th-dark, body.th-ending { --bg: #0d0f18; --fg: #e8ecf6; --muted: #8e96ad; --card: #171a27; --line: #2a2f45; --btn: #242838; --btnfg: #e8ecf6; }
body.th-night { --bg: #0f111a; --fg: #e3e7f2; --muted: #8890a8; --card: #1a1d2c; --line: #2c3148; --btn: #252a3e; --btnfg: #e3e7f2; }
body.th-dawn, body.th-dawn2, body.th-day, body.th-arrive { --hl-name: #c0631a; --hl-num: #1f6fc4; --hl-bad: #c8323a; --hl-good: #23864f; }
body.th-dawn, body.th-dawn2 { --bg: #f1e7e3; --fg: #2a2436; --muted: #7b7088; --card: #fff8f3; --line: #e3d3cc; --btn: #e6d9d6; --btnfg: #2a2436; --prifg: #1b1e2c; --outer: #3a3446; }
body.th-day { --bg: #f5f7fa; --fg: #1b2230; --muted: #66728a; --card: #ffffff; --line: #d6dee8; --btn: #e4eaf2; --btnfg: #1b2230; --pri: #2f6fde; --prifg: #fff; --outer: #c9d3df; }
body.th-arrive { --bg: #f8f3ea; --fg: #2b2620; --muted: #7f7466; --card: #fffdf8; --line: #e6dccb; --btn: #ede3d2; --btnfg: #2b2620; --pri: #b8312f; --prifg: #fff; --outer: #d8ccb8; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--outer);
  color: var(--fg);
  font-family: 'Galmuri11', 'FusionHan', system-ui, sans-serif;
  font-size: 16px; line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
  transition: background .4s;
}
.app {
  position: relative; max-width: 430px; margin: 0 auto; height: 100dvh;
  display: flex; flex-direction: column; background: var(--bg); overflow: hidden;
  transition: background .4s;
}
#stage { flex: 1; overflow-y: auto; overflow-x: hidden; }
[hidden] { display: none !important; }
button, input { font: inherit; color: inherit; cursor: pointer; }
.ic { display: inline-block; vertical-align: middle; flex-shrink: 0; }
.muted { color: var(--muted); }
code { font-size: 12px; background: var(--btn); padding: 1px 4px; border-radius: 4px; }

/* HUD */
#hud {
  display: grid; grid-template-columns: auto 1fr auto auto auto; gap: 10px; align-items: center;
  padding: 8px 14px; background: var(--card); border-bottom: 1px solid var(--line); font-size: 13px;
}
.h-clock { display: flex; flex-direction: column; line-height: 1.1; }
.h-clock b { font-size: 20px; font-variant-numeric: tabular-nums; letter-spacing: .5px; }
.h-day { font-size: 10px; color: var(--muted); }
.h-money { display: flex; align-items: center; gap: 4px; justify-content: flex-end; font-variant-numeric: tabular-nums; }
.h-money [data-test="money"] { white-space: nowrap; }   /* "564,000원" 의 "원" 이 다음 줄로 떨어지지 않게 */
.h-stam { display: flex; align-items: center; gap: 4px; color: #e0525a; }
.h-stam i { width: 38px; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; display: block; }
.h-stam em { display: block; height: 100%; background: #e0525a; }
.h-stam span, .h-batt span { color: var(--fg); font-variant-numeric: tabular-nums; }
.h-batt { display: flex; align-items: center; gap: 3px; }
.h-snd { pointer-events: auto; cursor: pointer; margin-right: -4px; }

/* 장면 */
.scene { display: flex; justify-content: center; }
.scene-svg { display: block; width: 100%; height: auto; max-height: 56vh; max-height: 56dvh; }
.scene.room-wrap .scene-svg { max-height: 62dvh; }
.scene.intro .scene-svg { max-height: 62dvh; }
.spot { cursor: pointer; }
.spot:hover rect:first-child { fill-opacity: .06; }
.panel { padding: 14px 16px 22px; }
.panel.dark { background: var(--bg); }
.lines p { margin: 0 0 8px; }
.lines p:last-child { color: var(--hl-name); }
.lines .ev { display: block; font-weight: 400; color: var(--fg); background: var(--card); border-left: 3px solid #e0a526; padding: 8px 10px; border-radius: 4px; }
.info { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; font-size: 14px; }
.info span { font-size: 11px; color: var(--muted); margin-right: 4px; }

.btns { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.btn {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  min-height: 46px; padding: 10px 16px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--btn); color: var(--btnfg); text-align: left; font-weight: 400;
}
.btn small { font-weight: 400; color: var(--muted); font-size: 12px; text-align: right; }
.btn.primary { background: var(--pri); color: var(--prifg); border-color: transparent; }
.btn.primary small { color: inherit; opacity: .8; }
.btn.ghost { background: transparent; }
.btn:disabled { opacity: .4; cursor: default; }

/* 처음 화면 */
.title-wrap { padding: 0 0 24px; text-align: center; }
.title-art .scene-svg { max-height: 46dvh; margin: 0 auto; }
.title-wrap h1 { margin: 16px 0 0; font-size: 30px; letter-spacing: 2px; }
.title-wrap .sub { margin: 2px 0 8px; color: var(--muted); }
.title-wrap .btns { padding: 0 24px; }
.title-wrap .btn { justify-content: center; }
.seed { font-size: 12px; color: var(--muted); margin-top: 16px; padding: 0 16px; }
.list-wrap { padding: 20px 16px 28px; }
.list-wrap h2 { margin: 0 0 4px; font-size: 20px; }
.note { color: var(--muted); margin: 0 0 14px; font-size: 14px; }
.end-list { list-style: none; padding: 0; margin: 12px 0; display: flex; flex-direction: column; gap: 8px; }
.end-list li { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.end-list li b { margin-right: 6px; }
.end-list li small { display: block; color: var(--muted); }
.end-list li.good { border-color: #3fae6a; }
.end-list li.locked { color: var(--muted); display: flex; align-items: center; gap: 6px; }

/* 캐릭터 고르기 */
.chars { display: flex; flex-direction: column; gap: 10px; }
.char {
  display: flex; gap: 12px; align-items: center; text-align: left; padding: 8px; border-radius: 14px;
  background: var(--card); border: 2px solid var(--line);
}
.char.on { border-color: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 25%, transparent); }
.char-pic svg { display: block; border-radius: 10px; }
.char-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.char-txt b { font-size: 17px; }
.char-txt span { font-size: 13px; color: var(--muted); }
.char-txt em { font-style: normal; font-size: 13px; color: var(--c); font-weight: 400; }

/* 모니터 */
.monitor { padding: 18px 12px 24px; background: radial-gradient(ellipse at 50% 30%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%), #07080d; min-height: 100%; }
.bezel { background: #050609; border-radius: 10px; padding: 10px; box-shadow: 0 0 40px color-mix(in srgb, var(--accent) 35%, transparent); }
.browser { background: #f4f6fa; color: #1b2230; border-radius: 4px; padding: 0 0 10px; overflow: hidden; }
.browser .bar { display: flex; align-items: center; gap: 5px; padding: 8px 10px; background: #dde3ec; font-size: 12px; color: #4a5468; }
.browser .bar i { width: 9px; height: 9px; border-radius: 50%; background: #b5bfcd; display: block; }
.browser .bar span { margin-left: 6px; }
.route { padding: 12px 12px 4px; }
.route b { display: block; font-size: 15px; }
.route small { color: #66728a; }
.budget { margin: 4px 12px 8px; font-size: 13px; color: #2f6fde; font-weight: 400; }
.flight {
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 2px 8px;
  width: calc(100% - 20px); margin: 8px 10px 0; padding: 10px 12px; text-align: left;
  background: #fff; border: 1px solid #d6dee8; border-radius: 8px; color: #1b2230;
}
.flight:hover { border-color: #2f6fde; }
.f-time b { font-size: 18px; }
.f-time small { color: #66728a; margin-left: 4px; font-size: 11px; }
.f-air { grid-column: 1; font-size: 12px; color: #4a5468; }
.f-air em { font-style: normal; color: #d9603b; }
.f-air small { display: block; color: #66728a; }
.f-price { grid-column: 2; grid-row: 1 / 3; align-self: center; font-weight: 400; font-size: 16px; color: #1b2230; }
.desk-edge { margin: 14px -12px 0; }
.desk-svg { display: block; width: 100%; height: auto; }
.close-link { display: block; margin: 18px auto 0; background: none; border: 0; color: #8e96ad; text-decoration: underline; font-size: 14px; }

/* 컷 */
.cut { min-height: 100%; display: flex; flex-direction: column; justify-content: center; padding: 40px 28px; gap: 6px; }
.cut p { margin: 0 0 8px; font-size: 16px; }
.cut .big { font-size: 26px; font-weight: 400; font-variant-numeric: tabular-nums; }
.cut.sleep { text-align: center; }
.zzz { color: var(--accent); margin: 10px 0; }

/* 방 */
.room-screen { display: flex; flex-direction: column; min-height: 100%; }
.say { flex: 1; min-height: 52px; padding: 10px 16px; font-size: 14px; background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.room-bar { display: flex; align-items: flex-end; gap: 8px; padding: 8px 12px 12px; }
.rb {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--btn); color: var(--btnfg); font-size: 13px; font-weight: 400;
}
.rb.go { background: var(--pri); color: var(--prifg); border-color: transparent; }
.rb.phone-btn { flex: 0 0 auto; background: transparent; border: 0; padding: 0; }
.th-night .rb .ic, .th-dark .rb .ic { filter: brightness(1.1); }

/* 시트 */
#sheet { position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; justify-content: flex-end; }
.sheet-bg { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); }
.sheet-card {
  position: relative; background: var(--card); color: var(--fg); border-radius: 18px 18px 0 0;
  padding: 18px 16px 22px; max-height: 82%; overflow-y: auto; animation: up .18s ease-out;
}
.sheet-card h3 { margin: 0 0 6px; font-size: 18px; }
.sheet-card p { margin: 0 0 8px; }
.clue { background: #f2d65a; color: #3a3210; padding: 8px 10px; border-radius: 4px; transform: rotate(-.6deg); font-size: 14px; }
@keyframes up { from { transform: translateY(30px); opacity: .4; } to { transform: none; opacity: 1; } }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.tiles.small { grid-template-columns: repeat(4, 1fr); }
.tile {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--btn); color: var(--btnfg); font-size: 12px; text-align: center; line-height: 1.25;
}
.item-head { display: flex; gap: 12px; align-items: flex-start; }
.item-head h3 { margin-top: 2px; }
.bagrow { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.bagbtn {
  display: flex; gap: 8px; align-items: center; padding: 8px 10px; text-align: left;
  border-radius: 12px; border: 1px solid var(--line); background: var(--btn); color: var(--btnfg);
}
.bagbtn span { display: flex; flex-direction: column; line-height: 1.2; }
.bagbtn small { color: var(--muted); font-size: 11px; }
.bagbtn.on { border: 2px solid var(--accent); }
.bagbtn:disabled { opacity: .45; cursor: default; }
.bagbtn.on:disabled { opacity: 1; }
.bagsec { margin: 10px 0; }
.bagsec-h { display: flex; align-items: center; gap: 8px; }
.bagsec-h small { color: var(--muted); }

/* 폰 */
#phone { position: absolute; inset: 0; z-index: 30; display: flex; justify-content: center; align-items: flex-end; }
.ph-bg { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); }
.ph-body { position: relative; width: 86%; max-width: 340px; height: 90%; animation: lift .22s ease-out; }
@keyframes lift { from { transform: translateY(60%); } to { transform: none; } }
.ph-screen {
  position: absolute; inset: 0 0 40px 0; background: #10131c; border: 8px solid #050608; border-radius: 30px;
  color: #e8ecf6; display: flex; flex-direction: column; overflow: hidden; z-index: 1;
}
.ph-hand {
  position: absolute; left: -16px; width: 46%; bottom: -14px; height: 54px; z-index: 2; pointer-events: none;
  background: var(--hand); border-radius: 30px 46px 0 0;
}
.ph-hand::after { content: ''; position: absolute; left: -6px; bottom: 0; width: 46%; height: 30px; background: var(--sleeve); border-radius: 8px 8px 0 0; }
.ph-fingers {
  position: absolute; right: -12px; bottom: 96px; width: 22px; height: 30px; z-index: 2; pointer-events: none;
  border-radius: 12px; background: var(--hand); box-shadow: 0 36px 0 var(--hand), 0 -36px 0 var(--hand);
}
.ph-status { display: flex; justify-content: space-between; align-items: center; padding: 8px 16px 4px; font-size: 12px; }
.ph-content { flex: 1; overflow-y: auto; padding: 6px 12px 12px; font-size: 14px; }
.ph-down { margin: 0 12px 12px; padding: 10px; border-radius: 12px; border: 0; background: #252a3d; color: #e8ecf6; font-weight: 400; }
.ph-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 6px; margin-top: 10px; }
.papp { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; background: none; border: 0; color: #e8ecf6; font-size: 11px; }
.app-ic { width: 50px; height: 50px; border-radius: 14px; display: flex; align-items: center; justify-content: center; }
.a-mail { background: #3b6fd8; } .a-msg { background: #fee500; } .a-news { background: #e0525a; }
.d8l { padding: 4px 2px; } .d8-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 6px; background: none; border: 0; border-bottom: 1px solid #23283a; text-align: left; color: #e8ecf6; font-size: 12px; }
.d8-ava { flex: none; border-radius: 50%; overflow: hidden; display: block; } .d8-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; } .d8-mid b small { color: #8e96ad; font-weight: 400; } .d8-mid span { color: #aeb5c8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d8-r { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; } .d8-r small { color: #8e96ad; } .d8-badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #ff4f9a; color: #fff; font-size: 11px; font-style: normal; display: flex; align-items: center; justify-content: center; }
.d8c { padding: 6px 4px 12px; display: flex; flex-direction: column; gap: 6px; } .d8c-top { display: flex; justify-content: center; margin: 4px 0 8px; } .d8-m { align-self: flex-start; max-width: 86%; background: #232838; border-radius: 12px 12px 12px 3px; padding: 7px 10px; } .d8-m p { margin: 0; font-size: 13px; } .d8-m small { color: #ff8fc0; font-size: 11px; }
.d8-mid b { background: none; padding: 0; color: #e8ecf6; font-weight: 400; }
.d8-think { margin: 10px 2px 2px; padding-left: 8px; border-left: 2px solid #ff4f9a; color: #e8ecf6; font-size: 13px; }
.a-date8 { background: #fff; } .d8 { text-align: center; padding: 18px 8px; } .d8-logo { width: 96px; height: 96px; margin: 6px auto 14px; border-radius: 24px; background: #fff; display: flex; align-items: center; justify-content: center; } .d8-near { font-size: 15px; color: #ff8fc0; }
.a-map { background: #3f9e72; } .a-gallery { background: #c9a03a; } .a-alipay { background: #1677ff; } .a-entry { background: #b8312f; } .a-esim { background: #8a6bd1; } .a-alarm { background: #d65a3b; } .papp .a-shorts { background: #2a2e45; }
.papp .dot { position: absolute; top: -2px; right: 8px; width: 12px; height: 12px; border-radius: 50%; background: #57d68d; border: 2px solid #10131c; }
.ph-noti { display: flex; flex-direction: column; gap: 6px; }
.noti { background: rgba(255, 255, 255, .1); border-radius: 12px; padding: 8px 10px; font-size: 13px; }
.noti b { display: block; font-size: 11px; color: #a9b2c9; }
.noti.warn { background: rgba(224, 82, 90, .25); margin-top: 6px; }
.ph-head { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.ic-btn { background: none; border: 0; color: #e8ecf6; padding: 4px; display: flex; }
.row { display: block; width: 100%; text-align: left; background: rgba(255, 255, 255, .06); border: 0; border-radius: 10px; padding: 8px 10px; margin-bottom: 6px; color: #e8ecf6; }
.row b { display: block; font-size: 12px; color: #a9b2c9; }
.mail h4 { margin: 0 0 8px; font-size: 14px; }
.mail p { margin: 0 0 6px; font-size: 13px; padding-left: 8px; border-left: 2px solid #3b6fd8; }
.chat { margin-bottom: 12px; }
.chat b { font-size: 12px; color: #a9b2c9; }
.bubble { background: #252a3d; border-radius: 12px 12px 12px 2px; padding: 6px 10px; margin: 4px 0; width: fit-content; max-width: 90%; }
.news p { margin: 0; padding: 8px 0; border-bottom: 1px solid #252a3d; font-size: 13px; }
.task p { margin: 0 0 10px; }
.task .btn { width: 100%; }
.pad { padding: 0 2px; }
.alarm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.chip { padding: 10px 0; border-radius: 10px; border: 1px solid #2c3148; background: #1c2030; color: #e8ecf6; font-variant-numeric: tabular-nums; }
.chip.on { background: #d65a3b; border-color: #d65a3b; }
.ph-dead { text-align: center; padding-top: 60px; }
/* 갤러리 앱: 사진 목록(네모 칸 셋씩) → 한 장 크게 + 찍은 때·곳 + 한 줄 */
.gal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; }
.gal-th { padding: 0; border: 0; background: #1c2030; aspect-ratio: 1; overflow: hidden; border-radius: 4px; display: block; }
.gal-th svg { display: block; width: 100%; height: 100%; }
.gal-one svg { display: block; width: 100%; height: auto; max-height: 56dvh; border-radius: 8px; background: #000; }
.gal-cap { margin: 8px 0 2px; font-size: 12px; color: #a9b2c9; }
.gal-note { margin: 0; font-size: 14px; line-height: 1.5; }
.ph-content > .fine { color: #8e96ad; font-size: 11px; margin: 8px 2px 0; }
/* 지도 앱: 손으로 그린 동네 지도 + 누른 곳의 시간표 */
.gmap svg { display: block; width: 100%; height: auto; border-radius: 10px; }
.gmap svg [data-act] { cursor: pointer; }
.gm-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 8px 0; }
.gm-tabs .chip { padding: 8px 0; font-size: 12px; }
.gm-tabs .chip.on { background: #3f9e72; border-color: #3f9e72; }
.gm-info { font-size: 12px; line-height: 1.5; }
.gm-info h4 { margin: 0 0 4px; font-size: 16px; color: #f6b04a; }
.gm-info h4 small { font-size: 12px; color: #a9b2c9; }
.gm-info p { margin: 0 0 6px; }
.gm-info b { color: #7fd0ff; background: rgba(127, 208, 255, .14); }
.gm-tt { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; margin: 0 0 8px; padding: 8px 10px; background: rgba(255, 255, 255, .06); border-radius: 10px; }
.gm-tt dt { color: #a9b2c9; } .gm-tt dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.gm-eta { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.gm-eta li { background: rgba(255, 255, 255, .06); border-radius: 10px; padding: 6px 10px; }
.gm-eta li span { display: block; color: #a9b2c9; font-size: 11px; }
.gm-eta em { font-style: normal; } .gm-eta em.ok { color: #57d68d; } .gm-eta em.warn { color: #ff6b6b; }
.gm-info .fine { color: #8e96ad; font-size: 11px; }
.papp .badge { position: absolute; top: -4px; right: 6px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: #f2463b; color: #fff; font-size: 12px; font-style: normal; line-height: 18px; text-align: center; border: 2px solid #10131c; box-sizing: content-box; }

/* 카톡 (게임 속 메신저): 노란 강조, 대화방 목록 → 대화방. 로고·상표 그림은 쓰지 않는다 */
.ph-screen.kt-light { background: #fff; color: #191919; }
.ph-screen.kt-blue { background: #b2c7d9; color: #191919; }
.ph-screen.kt-light .ph-down, .ph-screen.kt-blue .ph-down { background: #f1f1f1; color: #191919; }
.ph-content.kt-on { padding: 0; display: flex; flex-direction: column; font-size: 12px; }
.kt { flex: 1; display: flex; flex-direction: column; color: #191919; }
.kt b { background: none; color: inherit; padding: 0; }
.kt-head { margin: 0; padding: 4px 8px 8px; position: sticky; top: 0; z-index: 1; background: #fff; }
.kt-head .ic-btn { color: #191919; }
.kt-head b { font-size: 16px; }
.kt-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 14px; background: none; border: 0; text-align: left; color: #191919; font-size: 12px; }
.kt-row:active { background: #f3f3f3; }
.kt-pf { flex: none; width: 40px; height: 40px; border-radius: 15px; color: #fff; font-size: 16px; display: flex; align-items: center; justify-content: center; }
.kt-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.kt-mid b { font-size: 12px; }
.kt-mid span { color: #777; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kt-r { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; align-self: flex-start; padding-top: 2px; }
.kt-r small { color: #999; font-size: 12px; }
.kt-badge { min-width: 12px; height: 18px; padding: 0 3px; border-radius: 9px; background: #f2463b; color: #fff; font-style: normal; font-size: 12px; line-height: 18px; text-align: center; }
.kt-room .kt-head { background: #b2c7d9; }
.kt-msgs { flex: 1; padding: 0 10px 8px; }
.kt-date { margin: 8px auto 10px; width: fit-content; padding: 2px 12px; border-radius: 12px; background: rgba(0, 0, 0, .14); color: #fff; font-size: 12px; }
.kt-m { display: flex; align-items: flex-end; gap: 4px; margin-top: 4px; }
.kt-m.first { align-items: flex-start; margin-top: 8px; }
.kt-m .kt-pf { width: 32px; height: 32px; border-radius: 12px; font-size: 12px; }
.kt-m .kt-pf.none { visibility: hidden; height: 0; }
.kt-col { display: flex; flex-direction: column; gap: 2px; min-width: 0; max-width: 80%; }
.kt .kt-name { font-size: 12px; color: #4a5664; }
.kt-line { display: flex; align-items: flex-end; gap: 4px; }
.kt-b { margin: 0; padding: 6px 9px; border-radius: 4px 12px 12px 12px; background: #fff; color: #191919; font-size: 12px; line-height: 1.45; word-break: keep-all; overflow-wrap: anywhere; }
.kt-m small { flex: none; color: #556270; font-size: 12px; transform: scale(.84); transform-origin: left bottom; white-space: nowrap; }
.kt-m.me { justify-content: flex-end; margin-top: 8px; }
.kt-m.me .kt-b { background: #fee500; border-radius: 12px 4px 12px 12px; max-width: 75%; }
.kt-m.me small { transform-origin: right bottom; }
.kt-input { display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: #fff; }
.kt-input span { flex: 1; color: #aaa; padding: 6px 10px; border-radius: 16px; background: #f4f4f4; }
.kt-input i { font-style: normal; padding: 6px 10px; border-radius: 8px; background: #fee500; color: #3c1e1e; opacity: .5; }

/* 이동 */
.map-wrap { background: #e9eef2; }
.trs { display: flex; flex-direction: column; gap: 10px; }
.tr {
  display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; text-align: left;
  padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--fg);
}
.tr span { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.tr small { color: var(--muted); font-size: 12px; }
.tr span b { align-self: flex-start; }   /* 세로로 쌓는 칸(flex)이라 강조 띠가 줄 끝까지 늘어났다 — 글자 폭에 맞춘다 */
.tr .tr-r b { align-self: flex-end; }
.tr-r { text-align: right; }

/* 결과 · 엔딩 */
.result p { margin: 0 0 8px; }
.end-badge { display: inline-block; padding: 6px 12px; border-radius: 20px; font-weight: 400; margin: 4px 0 12px; }
.end-badge.good { background: #3fae6a; color: #fff; }
.stats { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 6px; }   /* 가운데(남은 예산)는 글자만큼 — 넓은 화면의 좁은 칸에서 「812,600 / 원」으로 갈라지지 않게 */
.stats div { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 6px; text-align: center; }
.stats small { display: block; font-size: 10px; color: var(--muted); }
.stats b { font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.result h3 { margin: 16px 0 6px; font-size: 16px; }
.fc { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.fc li { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.fc li .ic { margin-top: 2px; }
details { margin: 14px 0 8px; }
summary { cursor: pointer; color: var(--muted); }
.logl { list-style: none; padding: 0; margin: 8px 0; font-size: 13px; }
.logl b { font-variant-numeric: tabular-nums; margin-right: 6px; }
.ending { padding: 28px 20px; text-align: center; }
.ending-art { width: 100%; max-width: 300px; border-radius: 12px; }
.end-no { margin: 14px 0 0; color: var(--accent); font-weight: 400; letter-spacing: 1px; }
.ending h2 { margin: 2px 0 10px; font-size: 24px; }
.ending .btn { justify-content: center; }

/* 수하물 작은 글씨 · 돈 빠져나감 */
.f-bag { color: #2f6fde !important; font-weight: 400; }
.fine { display: block; font-size: 10.5px !important; color: #8a93a6 !important; line-height: 1.3; }
.sheet-card .fine, .task .fine { font-size: 11px !important; }
.warn { color: #e0525a; font-weight: 400; }
.h-money { position: relative; }
.money-pop {
  position: absolute; right: 0; top: 100%; font-size: 13px; font-weight: 400; color: #e0525a;
  background: var(--card); padding: 1px 6px; border-radius: 6px; animation: pop 1.6s ease-out forwards; pointer-events: none; white-space: nowrap;
}
.money-pop.plus { color: #3fae6a; }
@keyframes pop { 0% { opacity: 0; transform: translateY(-6px); } 15% { opacity: 1; transform: none; } 75% { opacity: 1; } 100% { opacity: 0; transform: translateY(10px); } }

/* 방: 기본 세로 화면 — 장면(3:4) · 설명 칸 · 가방 줄 · 할 일 (스크롤 없이) */
.room-screen { height: 100%; display: flex; flex-direction: column; gap: 8px; padding: 8px 12px 10px; }
.frame {
  position: relative; flex: 0 0 auto; align-self: center; overflow: hidden; border-radius: 12px; border: 1px solid var(--line);
  width: min(100%, calc((100dvh - 330px) * 0.7407)); aspect-ratio: 800 / 1080; container-type: inline-size; background: #0b0c1c;
}
.room-img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; user-select: none; transition: transform .6s cubic-bezier(.6,0,.2,1), filter .6s; transform-origin: var(--o); }
.frame.zoom .room-img { transform: scale(var(--z)); filter: blur(5px) brightness(.45) !important; }
.morning-light { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(160deg, rgba(255, 214, 160, .28), rgba(255, 240, 220, .05) 60%); }
.hot { position: absolute; padding: 0; background: none; border: 0; border-radius: 8px; cursor: pointer; }
.hot::after { content: ''; position: absolute; inset: -2px; border-radius: 9px; border: 2px solid #f6b04a; box-shadow: 0 0 10px rgba(246, 176, 74, .55); opacity: 0; transition: opacity .15s; }
.hot.sel::after { opacity: 1; }
.frame.zoom .hot { display: none; }
/* 다가가서 본 화면 */
.close { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 3cqw; padding: 4cqw; line-height: 1.45; font-size: 3.1cqw; opacity: 0; transition: opacity .3s .3s; }
.frame.zoom .close { opacity: 1; }
.back { align-self: center; font-size: 3.4cqw; font-weight: 400; color: #0b0c1c; background: #f6b04a; border: 0; border-radius: 6cqw; padding: 1.8cqw 5cqw; }
.mon { background: #07080f; border: 1px solid #2a2d55; border-radius: 2.6cqw; padding: 1.6cqw; box-shadow: 0 0 14cqw rgba(120, 200, 255, .32); }
.mon.off { background: #05060a; box-shadow: none; color: #8e96ad; text-align: center; padding: 8cqw 4cqw; display: flex; flex-direction: column; align-items: center; gap: 3cqw; }
.win { background: #f4f8ff; color: #14213d; border-radius: 1.4cqw; overflow: hidden; }
.wurl { background: #cfd7ea; color: #51607e; font-size: 2.3cqw; padding: 1cqw 2cqw; }
.wsite { background: #1f6feb; color: #fff; display: flex; gap: 3cqw; align-items: center; padding: 1.4cqw 2.4cqw; font-size: 2.6cqw; }
.wsite b { font-size: 3.4cqw; margin-right: auto; }
.wbody { padding: 2.2cqw 2.4cqw 2.6cqw; display: flex; flex-direction: column; gap: 1.6cqw; }
.wdone { display: flex; align-items: center; gap: 1.4cqw; font-weight: 400; font-size: 3.4cqw; }
.wdone .ic { width: 4.4cqw; height: 4.4cqw; }
.wticket { background: #fff; border: 1px solid #c9dcf2; border-radius: 1.6cqw; padding: 1.8cqw 2.4cqw; }
.wroute { display: flex; align-items: center; gap: 2cqw; font-size: 5cqw; font-weight: 400; }
.wroute span { flex: 1; text-align: center; color: #8fb2de; font-size: 3cqw; }
.wticket dl { margin: 1cqw 0 0; display: grid; grid-template-columns: auto 1fr; gap: .4cqw 2.4cqw; font-size: 2.7cqw; }
.wticket dt { color: #51607e; } .wticket dd { margin: 0; font-weight: 400; }
.wfine { margin: 0; padding: 0; list-style: none; color: #8792b0; font-size: 2.2cqw; line-height: 1.5; }
.wacts { display: flex; gap: 1.6cqw; flex-wrap: wrap; }
.mbtn { border: 1px solid #1f6feb; color: #1f6feb; background: #fff; border-radius: 1.4cqw; padding: 1.2cqw 2cqw; font-size: 2.7cqw; font-weight: 400; display: flex; gap: 1.6cqw; align-items: center; }
.mbtn em { font-style: normal; color: #d2414f; }
.mbtn:disabled { opacity: .45; }
.mchg { display: flex; flex-direction: column; gap: 1.2cqw; }
.mchg .mbtn { justify-content: space-between; }
.mchg small { color: #8792b0; font-size: 2.2cqw; }
.cal { align-self: center; width: 82cqw; background: #f1eff7; color: #2a2740; border-radius: 1cqw; overflow: hidden; transform: rotate(-1.2deg); box-shadow: 0 2cqw 6cqw rgba(0, 0, 0, .55); position: relative; }
.calhead { background: #d2414f; color: #fff; display: flex; align-items: baseline; gap: 2.4cqw; padding: 2.4cqw 4cqw 2cqw; }
.calhead b { font-size: 9cqw; line-height: 1; } .calhead span { font-size: 3cqw; letter-spacing: .12em; }
.cal .grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); padding: 2cqw 2.4cqw 3cqw; }
.cal .w { font-size: 2.5cqw; color: #8a86a6; text-align: center; padding-bottom: 1.2cqw; border-bottom: 1px solid #d6d2e4; margin-bottom: 1cqw; }
.cal .d { position: relative; height: 10.4cqw; padding: .8cqw 1.2cqw; font-size: 3.6cqw; font-weight: 400; border-bottom: 1px solid #e3e0ee; }
.cal .sun { color: #d2414f; }
.cal .x::after { content: ''; position: absolute; left: .4cqw; top: .6cqw; width: 6cqw; height: 6cqw; opacity: .8;
  background: linear-gradient(to top right, transparent 45%, #6a6688 45% 55%, transparent 55%), linear-gradient(to top left, transparent 45%, #6a6688 45% 55%, transparent 55%); }
.cal .go::before { content: ''; position: absolute; left: -.6cqw; top: -.4cqw; width: 8cqw; height: 7.4cqw; border: .7cqw solid #d2414f; border-radius: 50%; transform: rotate(-8deg); }
.cal .n { position: absolute; left: 1cqw; right: .4cqw; bottom: .4cqw; font-weight: 400; font-size: 2.8cqw; line-height: 1; color: #3c55a8; transform: rotate(-4deg); white-space: nowrap; }
.cal .go .n { color: #d2414f; }
.cal .d.r .n { left: auto; right: .6cqw; text-align: right; transform-origin: right bottom; }
.pin { position: absolute; left: 50%; top: 1cqw; width: 2.6cqw; height: 2.6cqw; margin-left: -1.3cqw; border-radius: 50%; background: #8a86a6; }
/* 인트로 결제 · 캐릭터 */
.paid-box { background: #f4f8ff; color: #14213d; border-radius: 12px; padding: 18px; text-align: center; box-shadow: 0 0 40px color-mix(in srgb, var(--accent) 35%, transparent); }
.paid-box b { display: block; font-size: 18px; margin: 6px 0; }
.paid-box p { margin: 2px 0; color: #51607e; font-size: 14px; }
.paid-box .big { color: #d2414f; font-size: 26px; font-weight: 400; }
.char-txt .quote { font-style: normal; color: var(--fg) !important; opacity: .8; }
.char-txt .bagnote { font-size: 12px !important; }
.d-sub { font-size: 12.5px; color: var(--muted); }
.dbtn.go { background: var(--pri); color: var(--prifg); border-color: transparent; }
.cut.late { text-align: center; }
.alarm-big { font-size: 22px; color: #ffb36b; }
.desc {
  flex: 1 0 150px; min-height: 150px; max-height: 210px; overflow-y: auto; background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 5px; font-size: 14px;
}
.desc h2 { margin: 0; font-size: 15px; color: var(--accent); }
.th-dawn .desc h2 { color: #b85a1e; }
.desc h2 small { font-size: 11px; color: var(--muted); font-weight: 400; margin-left: 4px; }
.desc p { margin: 0; line-height: 1.5; }
.desc .clue { margin: 2px 0; }
.d-note { font-size: 12.5px; color: var(--muted); border-left: 2px solid var(--accent); padding-left: 6px; }
.d-hint { font-size: 12.5px; color: var(--muted); margin-top: auto !important; }
.d-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 4px; }
.dbtn {
  padding: 7px 11px; border-radius: 9px; border: 1px solid var(--line); background: var(--btn); color: var(--btnfg);
  font-size: 13px; font-weight: 400;
}
.dbtn small { font-weight: 400; color: var(--muted); }
.dbtn.go small { color: var(--prifg); opacity: .85; }   /* 빨간 단추 위의 값·시간: 회색 글씨는 잘 안 읽혔다 */
.dbtn:disabled { opacity: .45; cursor: default; }
.dbtn.here { border-style: dashed; color: var(--muted); font-weight: 400; background: transparent; }
.dbtn.ghost { background: transparent; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip2 { display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px 4px 5px; border-radius: 14px; border: 1px solid var(--line); background: var(--btn); color: var(--btnfg); font-size: 12.5px; }
.bagrow2 { flex: 0 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 6px; }
.bagcell {
  display: flex; align-items: center; gap: 4px; padding: 6px 6px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--card); color: var(--muted); font-size: 12px; min-width: 0;
}
.bagcell span { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bagcell b { color: var(--fg); font-size: 15px; font-variant-numeric: tabular-nums; }
.bagcell.on { border-color: var(--accent); }
.room-acts { flex: 0 0 auto; display: flex; gap: 6px; }
.ra {
  position: relative; flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 6px;
  border-radius: 10px; border: 1px solid var(--line); background: var(--btn); color: var(--btnfg); font-size: 14px; font-weight: 400;
}
.ra.go { background: var(--pri); color: var(--prifg); border-color: transparent; }
.ra-dot { position: absolute; top: 6px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: #e0525a; }

/* 결제 화면: 세 표 */
.paid-box.fares { text-align: left; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.fare-route { font-size: 12px; color: #51607e; margin: 0 0 2px; }
.fare { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; text-align: left; padding: 10px; border-radius: 10px; border: 2px solid #d6dee8; background: #fff; color: #14213d; }
.fare.on { border-color: #1f6feb; background: #eef4ff; }
.fare .radio { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #8792b0; }
.fare.on .radio { border: 5px solid #1f6feb; }
.fare span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fare b { font-size: 16px; }
.fare em { font-style: normal; font-size: 12px; color: #fff; background: #d2414f; border-radius: 4px; padding: 0 4px; width: fit-content; }
.fare small { font-size: 12px; color: #51607e; line-height: 1.4; }
.fare strong { font-size: 16px; color: #d2414f; white-space: nowrap; }
.paybtn { justify-content: center; font-size: 18px; min-height: 56px; }
.wnote { font-size: 2.4cqw; color: #8792b0; align-self: center; }

/* 장면 그림 (인라인 SVG) */
.loading { min-height: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.scene-inline { display: block; width: 100%; height: 100%; }
.scene .scene-inline { height: auto; max-height: 56dvh; aspect-ratio: 800 / 1080; width: auto; max-width: 100%; margin: 0 auto; }
.scene.intro .scene-inline { max-height: 62dvh; }
.room-img .scene-inline { width: 100%; height: 100%; }
.char-pic .scene-inline { width: 96px; height: 96px; border-radius: 10px; }
/* 처음 화면: 그림 위에 로고 */
.title-art { position: relative; width: min(100%, calc((100dvh - 190px) * 0.7407)); margin: 0 auto; aspect-ratio: 800 / 1080; }
.title-art .scene-inline { width: 100%; height: 100%; }
.title-logo { position: absolute; left: 0; right: 0; top: 3%; padding: 0 6%; pointer-events: none; }
.title-logo .scene-inline { height: auto; aspect-ratio: 800 / 280; }
.logo-text { margin: 0; font-size: 32px; font-weight: 400; letter-spacing: 2px; color: #fff; text-shadow: 0 2px 0 #0b0c1c, 0 0 18px rgba(127, 178, 255, .6); }
.logo-sub { margin: 2px 0 0; color: #c9d3f0; font-size: 14px; text-shadow: 0 1px 0 #0b0c1c; }
.title-wrap .btns { margin-top: 10px; }
.title-wrap .seed { font-size: 11px; margin-top: 10px; }
/* 공항 장면: 가방 줄이 없으니 그림을 조금 크게, 설명 칸은 남는 만큼 */
.room-screen.air .frame { width: min(100%, calc((100dvh - 300px) * 0.7407)); }
.room-screen.air .desc { max-height: none; flex: 1 1 auto; min-height: 0; }
/* 꼭 골라야 할 것이 있으면 그림을 줄여 단추가 다 보이게 */
.room-screen.air.choosing .frame { width: min(100%, calc((100dvh - 470px) * 0.7407)); }
.desc .btns { margin-top: 4px; gap: 6px; }
.desc .btn { min-height: 0; padding: 8px 12px; font-size: 14px; }
.desc .lines p { margin: 0 0 4px; }
.frame.look .room-img { transform-origin: 0 0; transition: transform .5s cubic-bezier(.6,0,.2,1); }
.frame.look .hot { display: none; }
.look-back { position: absolute; left: 50%; bottom: 3%; transform: translateX(-50%); }
/* 단계 앱 */
.steps { margin: 6px 0; padding-left: 20px; font-size: 13px; color: var(--muted); }
.steps li.done { color: #3fae6a; text-decoration: line-through; }
.steps li.now { color: inherit; font-weight: 400; }
.qr { display: block; margin: 8px auto; image-rendering: pixelated; border: 6px solid #fff; border-radius: 4px; }
.mail .fine { font-size: 11px; color: #8792b0; }

/* 굵은 글씨 없음: 강조는 색과 옅은 띠로 */
b, strong, h1, h2, h3, h4, th, dt, dd { font-weight: 400; }
b, strong { color: var(--hl-num); background: color-mix(in srgb, var(--hl-num) 14%, transparent); border-radius: 4px; padding: 0 3px; }
h1, h2, h3 { color: var(--hl-name); }
h2 { font-size: 18px; } h3 { font-size: 18px; }
.desc h2 { font-size: 15px; color: var(--hl-name); }
.h-clock b, .cut .big, .alarm-big { color: var(--hl-num); background: none; padding: 0; }
.money-pop, .warn { color: var(--hl-bad); }
.money-pop.plus { color: var(--hl-good); }
.btn.primary, .dbtn.go, .ra.go { box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .18); }
.fare b, .paid-box b { color: inherit; background: none; padding: 0; }
.fc li.good span { color: var(--hl-good); } .fc li.bad span { color: inherit; }
.end-badge.good { color: var(--hl-good); }
.lines .ev { color: var(--hl-name); }
.btn b { background: none; padding: 0; }
.pcover { display: block; align-self: center; width: 62cqw; height: auto; filter: drop-shadow(0 2cqw 4cqw rgba(0, 0, 0, .55)); }

/* ===== 화면 채우기 (설계 8장): 기둥 폭 = min(화면 폭, (높이 − 글씨 창) × 800/1080), 그림은 기둥 폭에 꽉 ===== */
:root { --textbox: clamp(140px, 22dvh, 200px); }
body { background: #05060a; padding: 0; }
.app { max-width: none; width: min(100vw, calc((100dvh - var(--textbox)) * 800 / 1080)); }
#hud { padding-top: max(8px, env(safe-area-inset-top)); }
#hud.over {
  position: absolute; left: 0; right: 0; top: 0; z-index: 5; border: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(6, 7, 12, .72), rgba(6, 7, 12, .35) 70%, rgba(6, 7, 12, 0));
  color: #f2f4fa; --fg: #f2f4fa; --muted: #c7cde0; --line: rgba(255, 255, 255, .25); padding-bottom: 18px;
}
#hud.over .h-clock b { color: #9fdcff; }
.room-screen, .room-screen.air { height: 100%; padding: 0; gap: 0; position: relative; }
.frame, .room-screen.air .frame, .room-screen.air.choosing .frame {
  width: 100%; border: 0; border-radius: 0; flex: 0 0 auto; align-self: stretch;
}
.dbox { flex: 1 1 auto; min-height: var(--textbox); display: flex; flex-direction: column; gap: 6px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: var(--bg); overflow: hidden; }
.dbox .desc, .room-screen.air .dbox .desc { flex: 1 1 0; min-height: 0; max-height: none; padding: 8px 10px; gap: 4px; font-size: 13.5px; }
.desc .d-acts { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.desc .d-acts .dbtn { flex: 0 0 auto; white-space: nowrap; }
/* 공항·상하이 장면: 할 수 있는 일 단추는 옆으로 밀지 않고 줄을 바꿔 다 보이게 — 값·시간·막차가 붙은 긴 단추가 화면 밖으로 잘리고, 셋째 단추(폰을 본다 · 민수에게)가 안 보였다 */
.room-screen.air .desc .d-acts { flex-wrap: wrap; overflow-x: visible; }
.room-screen.air .desc .d-acts .dbtn { flex: 0 1 auto; white-space: normal; text-align: left; max-width: 100%; }
.bagrow2 { gap: 4px; }
.bagcell { padding: 3px 5px; font-size: 11px; border-radius: 8px; }
.bagcell b { font-size: 13px; }
/* 꼭 골라야 할 것이 있으면 글씨 창이 그림 아랫부분 위로 올라온다 (그림은 그대로) */
.room-screen.air.choosing .dbox { position: absolute; left: 0; right: 0; bottom: 0; max-height: 64%; min-height: 0; box-shadow: 0 -8px 24px rgba(0, 0, 0, .35); border-radius: 14px 14px 0 0; }
.room-screen.air.choosing .dbox .desc { flex: 1 1 auto; overflow-y: auto; }
/* 처음 화면: 그림을 꽉, 단추는 그 아래 */
.title-art { width: 100%; }
.title-wrap { padding-bottom: 16px; }

/* ===== 넓은 화면 (설계 04 3장): 폰보다 넓으면(가로:세로 ≥ 4:5, 폭 600px 이상) 그림은 왼쪽, 글씨 창은 오른쪽 =====
   폴드 펼친 화면(760×840 · 840×760), 태블릿, 데스크톱. 세로 폰(390×844 · 412×915 · 폴드 겉화면 344×882)은 위의 세로 배치 그대로. */
.split, .title-side { display: contents; }
@media (min-aspect-ratio: 4/5) and (min-width: 600px) {
  :root { --pic: 56cqw; --read: 560px; }
  .app { width: 100vw; }
  /* 상태 줄은 그림 위에 겹치지 않고 맨 위에 가로로 */
  /* 바탕이 늘 어두우니 글씨도 늘 밝게 (밝은 테마의 교통 고르기·이동 지도·도착 결과에서 돈·체력·배터리 글씨가 어두운 바탕에 어두운 글씨였다) */
  #hud, #hud.over {
    position: relative; background: #0b0d16; border-bottom: 1px solid rgba(255, 255, 255, .08); padding: 8px 20px; padding-top: max(8px, env(safe-area-inset-top));
    color: #f2f4fa; --fg: #f2f4fa; --muted: #c7cde0; --line: rgba(255, 255, 255, .25);
  }
  #hud .h-clock b { color: #9fdcff; }
  /* 방 · 공항: 그림(800:1080)은 남은 높이에 맞추되 폭의 56% 까지, 글씨 창은 남은 폭(읽기 좋은 폭까지) */
  .room-screen, .room-screen.air { flex-direction: row; justify-content: center; align-items: stretch; container-type: size; }
  .frame, .room-screen.air .frame, .room-screen.air.choosing .frame { width: min(var(--pic), 100cqh * 800 / 1080); align-self: center; }
  .dbox, .room-screen.air.choosing .dbox {
    position: static; flex: 0 1 var(--read); min-width: 0; min-height: 0; max-height: none; height: 100%;
    gap: 10px; padding: 14px 16px calc(14px + env(safe-area-inset-bottom)); box-shadow: none; border-radius: 0;
  }
  .dbox .desc, .room-screen.air .dbox .desc, .room-screen.air.choosing .dbox .desc { flex: 1 1 0; overflow-y: auto; padding: 12px 14px; gap: 6px; font-size: 15px; }
  .desc h2 { font-size: 16px; }
  .desc .d-acts { flex-wrap: wrap; overflow-x: visible; }
  .dbtn { font-size: 14px; padding: 8px 12px; }
  .desc .btn { font-size: 15px; }
  .bagrow2 { gap: 6px; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
  .bagcell { padding: 6px 8px; font-size: 13px; border-radius: 10px; }
  .bagcell b { font-size: 15px; }
  /* 그림 + 글 (인트로, 공항 가는 길 지도, 도착 결과) */
  .split { display: flex; height: 100%; justify-content: center; align-items: center; container-type: size; }
  .split > .scene { flex: 0 0 auto; width: min(var(--pic), 100cqh * 800 / 1080); }
  .split > .map-wrap { width: min(var(--pic), 100cqh * 360 / 420); align-self: stretch; display: flex; align-items: center; }
  .split > .scene .scene-inline, .split > .scene .scene-svg { width: 100%; height: auto; max-width: none; max-height: none; }
  .split > .panel { flex: 0 1 var(--read); min-width: 0; max-height: 100%; overflow-y: auto; padding: 20px 24px; align-self: center; }
  /* 처음 화면: 그림 왼쪽, 단추 오른쪽 */
  .title-wrap { display: flex; height: 100%; align-items: center; justify-content: center; padding: 0; container-type: size; }
  .title-art { flex: 0 0 auto; width: min(var(--pic), 100cqh * 800 / 1080); margin: 0; }
  .title-side { display: flex; flex-direction: column; justify-content: center; flex: 0 1 440px; min-width: 0; padding: 24px 28px; }
  .title-side .btns { padding: 0; }
  /* 그림이 없는 화면은 읽기 좋은 폭으로 가운데 */
  .list-wrap, .cut, .ending, .monitor { max-width: 640px; margin: 0 auto; }
  .ending { min-height: 100%; display: flex; flex-direction: column; justify-content: center; }
  .ending-art { max-width: 420px; align-self: center; }
  .sheet-card { width: min(100%, var(--read)); margin: 0 auto; border-radius: 18px 18px 0 0; }
  .ph-body { max-height: 780px; }
}

/* 체크인 카운터: 여권을 내미는 손이 아래에서 올라왔다가 내려간다(1초, game.js HAND_MS). 그동안은 그림을 누를 수 없다.
   움직임 줄이기(prefers-reduced-motion)에서는 움직이지 않고 그냥 보였다 사라진다. ?fast=1 은 기다리지 않는다. */
.room-img [data-hand].hand-in { animation: handIn 1s ease-in-out both; }
@keyframes handIn { 0% { transform: translateY(400px); } 25%, 75% { transform: none; } 100% { transform: translateY(400px); } }
@media (prefers-reduced-motion: reduce) { .room-img [data-hand].hand-in { animation: none; } }
.frame.busy .hot { pointer-events: none; }

/* ===== 여행 책 「처음 가는 上海」 (설계 04 6-4) =====
   세로 폰: 책 한 쪽이 화면을 채우고, 아래에 남은 시간 한 줄과 넘기기 단추. 쪽 안의 글은 넘치지 않게 쓴다(390×844 시험).
   넓은 화면: 책은 왼쪽(폭 470px 까지), 오른쪽에 차례 · 남은 시간 · 단추. 바탕은 기내 좌석 색. */
.book-screen {
  position: relative; height: 100%; display: flex; flex-direction: column; gap: 6px; padding: 8px 8px 0;
  background: radial-gradient(ellipse at 50% 0%, #4d5568, #2c3240 70%); color: #2e3a4f;
}
.bk-wrap { flex: 1 1 0; min-height: 0; display: flex; justify-content: center; }
.bk-page {
  --band: #3d7f8c; --paper: #f6efdc; --ink: #2e3a4f; --faded: #857a63; --rule: #ddd0b2;
  position: relative; width: 100%; max-width: 470px; height: 100%; display: flex; flex-direction: column; overflow: hidden;
  background: linear-gradient(90deg, #e9dfc6 0, var(--paper) 14px, var(--paper) calc(100% - 4px), #efe5cd 100%);
  color: var(--ink); border-radius: 2px 7px 7px 2px; font-size: 12px; line-height: 1.5;
  box-shadow: 0 2px 0 #e2d6ba, 0 4px 0 #d3c6a6, 0 5px 0 #bfb08c, 0 10px 20px rgba(0, 0, 0, .4);
  animation: bkIn .16s ease-out;
}
@keyframes bkIn { from { opacity: .5; transform: translateX(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .bk-page { animation: none; } }
.bk-page svg.bk-svg { display: block; width: 100%; height: auto; }
.bk-page b, .bk-page strong { background: none; padding: 0; border-radius: 0; color: inherit; }
.bk-band { display: flex; align-items: center; gap: 8px; background: var(--band); color: #fffaf0; padding: 4px 12px 4px 16px; font-size: 12px; flex: none; }
.bk-band-n { font-size: 18px; line-height: 1; min-width: 14px; }
.bk-band-t { flex: 1; }
.bk-band-p { font-size: 10px; opacity: .8; }
.bk-body { flex: 1 1 0; min-height: 0; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; padding: 6px 14px 2px 18px; }
.bk-body > * { flex: none; }
/* 쪽의 마지막 상자·말 상자·곁말은 쪽 아래에 붙인다 (인쇄된 안내서처럼, 남는 자리는 가운데로) */
.bk-body > .bk-box:last-child, .bk-body > .bk-phr:last-child, .bk-body > .bk-aside:last-child { margin-top: auto; }
.bk-title { margin: 2px 0 5px; font-size: 16px; font-weight: 400; color: var(--band); border-bottom: 1px dashed var(--band); padding-bottom: 2px; }
.bk-h { margin: 6px 0 2px; font-size: 13px; font-weight: 400; color: var(--band); }
.bk-p { margin: 0 0 5px; }
.bk-aside { margin: 3px 0 5px; padding-left: 7px; border-left: 2px solid #d3c29a; color: var(--faded); font-size: 11px; }
.bk-fig { margin: 0 0 5px; }
.bk-fig svg { border-radius: 2px; box-shadow: 0 0 0 1px rgba(46, 58, 79, .12); }
.bk-fig figcaption { margin-top: 2px; font-size: 10px; color: var(--faded); }
.bk-box { margin: 5px 0; padding: 4px 8px 5px; border: 1.5px solid var(--band); border-radius: 4px; background: rgba(255, 255, 255, .45); }
.bk-box-h { display: block; color: var(--band); font-size: 12px; }
.bk-tip .bk-box-h::before { content: '알아 두기 · '; font-size: 10px; opacity: .8; }
.bk-box.bk-warn { border-color: #c4473a; background: #fbe8e0; }
.bk-warn .bk-box-h { color: #b23a2e; }
.bk-warn .bk-box-h::before { content: '주의 · '; font-size: 10px; opacity: .8; }
.bk-box p { margin: 1px 0 0; }
.bk-list { margin: 0 0 5px; padding-left: 13px; }
.bk-list li { margin: 0 0 2px; }
.bk-list li::marker { color: var(--band); }
.bk-table { width: 100%; border-collapse: collapse; margin: 2px 0 5px; font-size: 11px; line-height: 1.35; }
.bk-table th { background: var(--band); color: #fffaf0; font-weight: 400; text-align: left; padding: 2px 5px; }
.bk-table td { border-bottom: 1px solid var(--rule); padding: 2px 5px; vertical-align: top; }
.bk-table tr:nth-child(even) td { background: rgba(255, 255, 255, .35); }
.bk-note { margin: -3px 0 5px; font-size: 10px; color: var(--faded); }
.bk-phr { position: relative; margin: 7px 0 5px; padding: 6px 8px 4px; border: 1px dashed var(--band); border-radius: 4px; background: #fffaf0; }
.bk-phr-h { position: absolute; top: -8px; left: 8px; padding: 0 4px; background: var(--paper); color: var(--band); font-size: 10px; line-height: 14px; }
.bk-phr div { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 6px; padding: 1px 0; }
.bk-phr div + div { border-top: 1px dotted var(--rule); }
.bk-phr .zh { font-size: 13px; }
.bk-phr i { font-style: normal; font-size: 10px; color: var(--band); }
.bk-phr .ko { flex: 1 0 auto; text-align: right; font-size: 11px; color: var(--faded); }
.bk-shop { margin: 4px 0; padding: 3px 8px; border-left: 4px solid var(--band); background: rgba(255, 255, 255, .45); }
.bk-shop-n { display: block; color: var(--band); font-size: 13px; }
.bk-shop small { display: block; font-size: 10px; color: var(--faded); line-height: 1.35; }
.bk-shop p { margin: 1px 0 0; }
.bk-day { display: flex; gap: 8px; margin: 5px 0; }
.bk-day-h { flex: none; width: 34px; display: flex; flex-direction: column; align-items: center; padding-top: 2px; }
.bk-day-d { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--band); color: #fffaf0; font-weight: 400; font-size: 14px; }
.bk-day-h small { font-size: 10px; color: var(--faded); margin-top: 1px; }
.bk-day dl { flex: 1; margin: 0; display: grid; grid-template-columns: auto 1fr; column-gap: 8px; border-left: 1px solid var(--rule); padding-left: 8px; }
.bk-day dt { width: 58px; color: var(--band); font-size: 11px; }
.bk-day dd { margin: 0 0 2px; }
.bk-foot { flex: none; display: flex; justify-content: space-between; align-items: center; padding: 2px 14px 5px 18px; font-size: 10px; color: #a09579; }
.bk-foot span:first-child { order: 0; min-width: 20px; }
.bk-foot i { order: 1; font-style: normal; }
.bk-foot span:nth-child(2) { order: 2; min-width: 20px; text-align: right; }
/* 표지 · 차례 */
.bk-page.cover { background: #efe3c6; justify-content: center; }
.bk-page.cover svg.bk-svg { height: 100%; }
.bk-page.toc { padding: 8px 14px 0 18px; }
.bk-run { font-size: 10px; color: #a09579; text-align: center; border-bottom: 1px solid var(--rule); padding-bottom: 3px; }
.bk-toc-h { margin: 10px 0 0; font-size: 24px; font-weight: 400; color: #c4473a; }
.bk-toc { flex: 1 1 0; min-height: 0; overflow-y: auto; }
.bk-toc-row { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 50px; padding: 6px 2px; border: 0; border-bottom: 1px dotted #cdbf9e; background: none; color: inherit; text-align: left; }
.bk-toc-row:not(:disabled):active { background: rgba(0, 0, 0, .04); }
.bk-toc-row:disabled { cursor: default; color: inherit; }
.bk-toc-n { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--band); color: #fffaf0; font-size: 14px; }
.bk-toc-t { flex: 1; display: flex; flex-direction: column; font-size: 14px; line-height: 1.3; }
.bk-toc-t small { font-size: 10px; color: var(--faded); }
.bk-st { flex: none; font-style: normal; font-size: 10px; padding: 1px 6px; border-radius: 8px; background: #e6dcc4; color: var(--faded); }
.bk-st.done { background: #3a9a60; color: #fff; }
.bk-st.half { background: #efd28f; color: #5a4a1a; }
.bk-toc-p { flex: none; width: 20px; text-align: right; font-size: 11px; color: #a09579; }
.book-screen.home .bk-toc-n { opacity: .75; }
/* 아래 (세로 폰): 남은 시간 · 단추 */
.bk-side { flex: none; padding: 2px 0 calc(8px + env(safe-area-inset-bottom)); }
.bk-time { margin: 0 0 5px; text-align: center; font-size: 11px; color: #dfe4f0; }
.bk-side-toc { display: none; }
.bk-nav { display: flex; gap: 6px; }
.bk-btn {
  flex: 1; min-height: 42px; display: flex; align-items: center; justify-content: center; gap: 3px; padding: 4px 6px;
  border-radius: 10px; border: 1px solid rgba(255, 255, 255, .16); background: #4a5266; color: #f2f4fa; font-size: 14px; line-height: 1.1;
}
.bk-btn small { font-size: 10px; opacity: .8; }
.bk-btn.pri { flex: 1.5; background: #e8c26a; color: #2b2410; border-color: transparent; }
.bk-btn.ghost { background: transparent; }
.bk-btn .flip .ic { transform: scaleX(-1); }
.bk-btn:disabled { opacity: .38; cursor: default; }
.bk-stop { position: absolute; inset: 0; z-index: 5; display: flex; align-items: flex-end; background: rgba(10, 14, 24, .55); }
.bk-stop > div { margin: 0 10px calc(84px + env(safe-area-inset-bottom)); padding: 14px 16px; border-radius: 14px; background: var(--card); color: var(--fg); box-shadow: 0 8px 24px rgba(0, 0, 0, .4); animation: up .18s ease-out; }
.bk-stop p { margin: 0 0 10px; font-size: 14px; }
@media (min-aspect-ratio: 4/5) and (min-width: 600px) {
  .book-screen { flex-direction: row; justify-content: center; align-items: stretch; gap: 18px; padding: 14px 20px; container-type: size; }
  .bk-wrap { flex: 0 0 auto; width: min(56cqw, 100cqh * 0.58, 460px); }
  .bk-page { max-width: none; }
  .bk-side { flex: 0 1 320px; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 0; }
  .bk-time { text-align: left; font-size: 13px; }
  .bk-side-toc { display: flex; flex-direction: column; gap: 4px; }
  .bk-side-row {
    display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .1);
    background: rgba(255, 255, 255, .06); color: #e8ecf6; text-align: left; font-size: 13px;
  }
  .bk-side-row span { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--band); color: #fff; font-size: 11px; flex: none; }
  .bk-side-row small { margin-left: auto; font-size: 11px; color: #b9c0d3; }
  .bk-side-row.done small { color: #8fe0ad; }
  .bk-side-row.on { border-color: #e8c26a; }
  .bk-side-row:disabled { cursor: default; opacity: .7; }
  .bk-nav { flex-wrap: wrap; }
  .bk-stop { align-items: center; justify-content: center; }
  .bk-stop > div { margin: 0; max-width: 460px; }
}

/* ===== 여행지 스탯 (design-06 1-3): 푸둥부터 상태 줄 아래에 아이콘 + 막대 네 개, 숫자 없음 ===== */
.h-gap { width: 0; }
.h-stats { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: -2px; }
.h-stats .g { display: flex; align-items: center; gap: 5px; min-width: 0; color: var(--fg); }
.h-stats .g .px { width: 13px; height: 13px; opacity: .9; }
.h-stats .g i { flex: 1 1 auto; height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; display: block; }
.h-stats .g em { display: block; height: 100%; border-radius: 3px; background: var(--g, #9fdcff); transition: width .4s; }
.h-stats .g-stamina { --g: #e0525a; }
.h-stats .g-full { --g: #e8b84a; }
.h-stats .g-fun { --g: #7fd0ff; }
.h-stats .g-mental { --g: #b99cff; }
.h-stats .g.low em { background: var(--hl-bad, #ff6b6b); }
.h-stats .g.low .px { color: var(--hl-bad, #ff6b6b); }
.h-stats .g.dn i { animation: gDn 1.2s ease-out; }
.h-stats .g.up i { animation: gUp 1.2s ease-out; }
@keyframes gDn { 0%, 40% { box-shadow: 0 0 0 2px #ff6b6b; } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes gUp { 0%, 40% { box-shadow: 0 0 0 2px #57d68d; } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .h-stats .g i { animation: none !important; } }
.r-stats { margin: 8px 0 4px; padding: 8px 10px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.r-stats .h-stats { margin: 0; }
.h-stats.big .g .px { width: 16px; height: 16px; }
.h-stats.big .g i { height: 7px; }
.next-up { color: var(--hl-name); }

/* 심사대의 영어 대사: 영어 그대로 + 작은 한국어 풀이 */
.en-say { color: var(--hl-num); }
.me-say { color: var(--hl-name); }
.gloss { display: block; font-size: 11.5px; color: var(--muted); }
/* 그림 위에 겹친 상태 줄이 두 줄이 되면 그림자도 조금 더 길고 진하게 (막대가 간판 글씨와 섞이지 않게) */
#hud.over.four { background: linear-gradient(to bottom, rgba(6, 7, 12, .9), rgba(6, 7, 12, .82) 78%, rgba(6, 7, 12, 0)); padding-bottom: 22px; }   /* 스탯 막대가 그림 속 글자와 겹쳐 안 읽히지 않게 막대 줄까지 어둡게 */
@media (min-aspect-ratio: 4/5) and (min-width: 600px) { #hud.over.four { background: #0b0d16; padding-bottom: 8px; } }
