:root {
  --bg: #16181D; --panel: #22252C; --line: #2E3139; --frame: #2B2E35;
  --text: #F1F2F4; --muted: #B9BCC4; --dim: #9EA1AA;
  --amber: #F2A33A; --card: #F4F5F7; --ink: #1B1A1F; --ink-2: #4A4C55;
  --sky: #9CCBEA; --win: #2A2C33; --lamp: #3A3F48; --shade: 1;
  --led-font: 'Doto', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --latin: 'Archivo', system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); }
body { font-family: 'Noto Sans KR', 'Archivo', system-ui, sans-serif; -webkit-font-smoothing: antialiased; word-break: keep-all; overflow-wrap: anywhere; }
button { font: inherit; cursor: pointer; }
button:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
p { margin: 0; }
[hidden] { display: none !important; }

#app { max-width: 480px; margin: 0 auto; min-height: 100dvh; position: relative;
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
.screen { min-height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

/* LED 전광판 */
.led { background: #050505; border: 2px solid var(--frame); border-radius: 6px; margin: 14px 14px 0;
  padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; color: var(--amber); transition: color .6s; }
.led-row { display: flex; justify-content: space-between; gap: 12px; font-family: var(--led-font); font-weight: 900; font-size: 14px; letter-spacing: .06em; }
.led-big { font-family: var(--led-font); font-weight: 900; font-size: clamp(20px, 7.4vw, 30px); letter-spacing: .03em; line-height: 1.15;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.led-big.two { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.1; }
.led.quiet { color: #B08646; }
.led.quiet .led-big { font-weight: 700; font-size: 18px; padding: 4px 0; }

/* 창문 */
.window { position: relative; flex: 1 1 0; min-height: 200px; max-height: 60dvh; margin-top: 0; overflow: hidden;
  background: var(--sky); transition: background-color 2s; }
.sun { position: absolute; width: 58px; height: 58px; border-radius: 50%; left: 64%; top: 30%; background: #F6D36B; transition: top 2s, background-color 2s, opacity 2s; }
.scene { position: absolute; left: 0; right: 0; bottom: 0; height: 300px; }
.layer { position: absolute; inset: 0; }
/* 어둡기: 움직이는 그림에 filter를 걸면 휴대폰이 매 프레임 다시 칠해서 끊김 → 위에 반투명 막을 얹는다 */
.shade { position: absolute; inset: 0; pointer-events: none; background: #0A0E18; opacity: calc(1 - var(--shade)); transition: opacity 2s; z-index: 1; }
.track { display: flex; width: max-content; will-change: transform; }
.track svg { display: block; flex: none; }
.back .track { animation: drift 60s linear infinite; }
.front .track { animation: drift 22s linear infinite; }
.skyline .track { animation: drift 300s linear infinite; }   /* 멀리 있는 스카이라인은 아주 천천히 */
.window.stopped .track { animation-play-state: paused; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .back .track { animation-duration: 180s; }
  .front .track { animation-duration: 66s; }
}
.landmark { position: absolute; left: 0; bottom: 30px; width: 280px; height: 340px; will-change: transform; visibility: hidden; transform: translateX(var(--lm-to, 0px)); }
.landmark.on { visibility: visible; }
/* 랜드마크 이동: 구간마다 한 번만 설정하고 이후엔 CSS가 알아서 (매 프레임 자바스크립트 X) */
.landmark.run { animation: lm var(--lm-dur, 20s) linear both; animation-delay: var(--lm-delay, 0s); }
@keyframes lm { from { transform: translateX(var(--lm-from)); } to { transform: translateX(var(--lm-to)); } }
.landmark svg { display: block; }
.frame { position: absolute; inset: 0; border: 14px solid var(--frame); border-top-width: 12px; pointer-events: none; }
.mullion { position: absolute; top: 0; bottom: 0; left: 62%; width: 8px; background: var(--frame); }
.wall, .pole, .occupant { display: none; }
/* 통로 자리 */
/* 통로 자리: 창틀은 얇게(풍경은 거의 다 보이게), 차이는 '창 앞에 있는 것'(기둥·뒷모습·손잡이 끈)으로 */
.window.aisle .frame { border-width: 14px 20px 24px; border-color: var(--panel); }
.window.aisle .wall { display: block; position: absolute; left: 20px; right: 20px; top: 14px; bottom: 24px; border: 6px solid var(--frame); pointer-events: none; }
.window.aisle .mullion { display: none; }
.window.aisle .pole { display: block; position: absolute; top: 0; bottom: 0; right: 8px; width: 8px; background: #E0B23A; }
/* 창가 사람 뒷모습: 창문 아래에 머리·어깨만 살짝 (승객 줄과 겹쳐 보이지 않게 작게) */
.window.aisle.occupied .occupant { display: block; position: absolute; left: 44px; bottom: -22px; width: 74px; animation: bob 5s steps(2, end) infinite; }
.occupant svg { display: block; width: 100%; height: auto; }
@keyframes bob { 0%, 70%, 100% { transform: translateY(0); } 78% { transform: translateY(4px); } 86% { transform: translateY(0); } 92% { transform: translateX(3px); } }

/* 아래 패널 */
.panel { flex: none; min-height: 404px; box-sizing: border-box; padding: 12px 20px 14px; display: flex; flex-direction: column; gap: 9px; }
.status-row { display: flex; align-items: center; gap: 12px; }
.mini-seats { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; width: min(168px, 38vw); flex: none; }
.mini-seats i { height: 8px; border-radius: 2px; background: #3A3D45; }
.mini-seats i.t { background: var(--amber); }
.mini-seats i.m { background: var(--text); }
.riders { flex: 1; min-width: 0; font-size: 13px; color: #D3D5DB; line-height: 1.3; }
.icon-btn { width: 44px; height: 44px; border-radius: 6px; border: 1.5px solid #3A3D45; background: transparent; color: var(--muted); display: grid; place-items: center; flex: none; }
.icon-btn .w1, .icon-btn .w2, .icon-btn .badge { display: none; }
.icon-btn[aria-pressed="true"] { color: var(--amber); border-color: var(--amber); }
.icon-btn[aria-pressed="true"] .mute { display: none; }
/* (Phase 2) 소리 버튼 세 단계: 전체(물결 둘) · 방송만(물결 하나 + 작은 '빼기' 표시 = 배경 뺌) · 끔(×) */
#soundBtn[data-mode="all"] .w1, #soundBtn[data-mode="all"] .w2 { display: inline; }
#soundBtn[data-mode="voice"] .w1, #soundBtn[data-mode="voice"] .badge { display: inline; }
.stop-line { font-size: 13px; color: var(--muted); }
.neighbor-line { font-size: 12px; color: var(--dim); }

.card { background: var(--card); color: var(--ink); border-radius: 8px; padding: 15px 16px; display: flex; flex-direction: column; gap: 10px; }
.card.enter { animation: rise .5s ease-out; }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
.card .es { font-family: var(--latin); font-size: 22px; font-weight: 600; line-height: 1.25; }
.card .ko { font-size: 14px; color: var(--ink-2); }
.card-stop { font-family: var(--latin); font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.card { gap: 6px; }
.card-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.btn-listen { height: 44px; padding: 0 16px; border: none; border-radius: 6px; background: var(--ink); color: var(--amber); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 8px; }
.btn-ghost { height: 44px; padding: 0 16px; border: 1.5px solid #C9CBD2; border-radius: 6px; background: transparent; color: var(--ink); font-size: 14px; }
.btn-ghost.wide { width: 100%; border-color: #3A3D45; color: #D3D5DB; }
.btn-outline { align-self: flex-start; height: 44px; padding: 0 16px; border: 1.5px solid #4A4D56; border-radius: 6px; background: transparent; color: var(--amber); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 8px; }
.btn-text { background: none; border: none; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; min-height: 44px; padding: 0 4px; }
.btn-primary { height: 52px; border: none; border-radius: 8px; background: var(--amber); color: var(--bg); font-weight: 700; font-size: 16px; width: 100%; }
.btn-primary:disabled { background: #3A3D45; color: var(--dim); cursor: default; }
body.hide-ko .ko { visibility: hidden; }

/* 옆자리 승객 */
.talk { display: flex; flex-direction: column; gap: 12px; animation: rise .5s ease-out; }
.talk-row { display: flex; gap: 12px; align-items: flex-start; }
.avatar { width: 52px; height: 58px; flex: none; }
.avatar svg { display: block; }
.bubble { flex: 1; background: var(--card); color: var(--ink); border-radius: 4px 12px 12px 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.bubble .es { font-family: var(--latin); font-size: 19px; font-weight: 600; line-height: 1.3; }
.bubble .ko { font-size: 13px; color: var(--ink-2); }
.talk-options { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; padding-left: 64px; }
.talk-options button { overflow-wrap: normal; word-break: keep-all; font-size: 13px !important; height: 44px; border: 1.5px solid var(--amber); border-radius: 6px; background: transparent; color: var(--amber); font-family: var(--latin); font-weight: 600; font-size: 14px; padding: 0 6px; }
.talk-options button[aria-pressed="true"] { background: var(--amber); color: var(--bg); }
.talk-options button:disabled:not([aria-pressed="true"]) { opacity: .4; }

/* 종점 */
.terminal { display: flex; flex-direction: column; gap: 12px; padding-top: 6px; animation: rise .8s ease-out; }
.eyebrow { font-family: var(--latin); font-size: 11px; font-weight: 600; letter-spacing: .14em; color: var(--dim); }
.terminal .es.big { font-family: var(--latin); font-size: clamp(26px, 8vw, 32px); font-weight: 600; line-height: 1.2; }
.terminal .ko { font-size: 17px; line-height: 1.5; color: #D3D5DB; }

.foot-btns { display: flex; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
.foot-row { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--line); padding-top: 6px; }

/* 좌석 선택 */
.board-head { padding: 18px 22px 0; display: flex; flex-direction: column; gap: 4px; }
.board-head h1 { margin: 0; font-size: 22px; font-weight: 700; }
.board-head p { font-size: 13px; }
.seatmap { margin: 16px 22px 0; background: var(--panel); border-radius: 10px; padding: 16px 22px; display: flex; flex-direction: column; gap: 10px; }
.seat-labels, .seat-grid { display: grid; grid-template-columns: 19fr 19fr 10fr 19fr 19fr; column-gap: 8px; }
.seat-labels { font-size: 11px; color: var(--dim); text-align: center; }
.seat-grid { row-gap: 6px; }
.seat-grid button { aspect-ratio: 14 / 12; border: none; background: none; padding: 0; border-radius: 0; image-rendering: pixelated; }
.seat-grid button svg { display: block; width: 100%; height: 100%; }
.seat-grid button.t { cursor: not-allowed; }
@media (hover: hover) { .seat-grid button:not(.t):hover svg { filter: brightness(1.15); } }   /* 터치 폰에선 눌린 뒤 남는 hover가 잔상을 만들어서 마우스 기기에서만 */
.legend { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.board-foot { margin-top: auto; padding: 16px 22px 22px; display: flex; flex-direction: column; gap: 8px; }
.hint { font-size: 13px; color: #D3D5DB; }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--text); color: var(--ink);
  padding: 12px 16px; border-radius: 8px; font-size: 14px; max-width: calc(100% - 40px); z-index: 10; }

/* 승차 */
.stop-scene, .cabin { position: relative; height: clamp(260px, 54dvh, 470px); overflow: hidden; background: var(--sky); flex: none; }
.cabin { display: none; background: var(--panel); }
#stop[data-stage="tap"] .stop-scene, #stop[data-stage="ticket"] .stop-scene { display: none; }
#stop[data-stage="tap"] .cabin, #stop[data-stage="ticket"] .cabin { display: block; }
.stop-street { position: absolute; left: -120px; bottom: 0; height: 300px; }
.stop-street svg, .cabin-street svg { display: block; }
.stop-pole { position: absolute; left: 30px; bottom: 30px; width: 8px; height: min(360px, 76%); background: var(--frame); }
.stop-sign { position: absolute; left: 14px; top: 8%; width: max-content; min-width: 196px; max-width: calc(100% - 28px); background: #0B5CAD; color: #fff; border-radius: 4px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.stop-sign-label { font-family: var(--latin); font-size: 11px; font-weight: 600; letter-spacing: .12em; }
.stop-sign-name { font-family: var(--latin); font-size: 21px; font-weight: 800; line-height: 1.2; }
.stop-sign-line { font-family: var(--latin); font-size: 12px; display: flex; align-items: center; gap: 6px; }
.stop-sign-line b { background: #fff; color: #0B5CAD; font-weight: 800; font-size: 14px; padding: 1px 7px; border-radius: 3px; }
.stop-led { position: absolute; left: 14px; top: calc(8% + var(--sign-h, 104px) + 8px); background: #050505; border: 2px solid var(--frame); border-radius: 4px; padding: 8px 12px; font-family: var(--led-font); font-weight: 900; color: var(--amber); font-size: 16px; letter-spacing: .06em; }
.bus-front { position: absolute; left: calc(50% - 110px); bottom: 22px; width: min(300px, 70vw); transform: translateX(130vw); transition: transform 1.6s cubic-bezier(.2,.7,.25,1); }
.bus-front svg { display: block; width: 100%; height: auto; }
#stop[data-stage="arrive"] .bus-front { transform: none; }
@media (prefers-reduced-motion: reduce) { .bus-front { transition: none; } }
.cabin-window { position: absolute; left: 0; right: 0; top: 0; height: 42%; background: var(--sky); overflow: hidden; }
.cabin-street { position: absolute; left: -300px; bottom: -60px; height: 300px; }
.cabin-wall { position: absolute; left: 0; right: 0; top: 42%; height: 14px; background: var(--frame); }
.driver { position: absolute; left: 30px; top: calc(42% - 40px); width: 120px; height: 150px; }
.validator { position: absolute; right: 30px; bottom: 34px; width: 120px; height: 150px; background: #C9D34A; border-radius: 8px; display: flex; flex-direction: column; align-items: center; gap: 10px; padding-top: 16px; }
.validator span { width: 96px; height: 52px; background: #050505; border-radius: 4px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-family: var(--led-font); font-weight: 900; color: #F2A33A; font-size: 10px; line-height: 1.05; text-align: center; padding: 0 4px; box-sizing: border-box; }
.validator span em { font-style: normal; }
.validator span.ok { color: #7CE08A; font-size: 15px; }
.validator span.ok .vcard { display: none; }
.validator i { width: 70px; height: 8px; background: var(--frame); border-radius: 2px; }
.ticket { position: absolute; right: 40px; bottom: -70px; width: 100px; height: 64px; background: var(--card); border-radius: 4px; transform: rotate(-8deg); display: flex; flex-direction: column; overflow: hidden; transition: bottom .5s ease-out; }
.ticket.in { bottom: 20px; }
.ticket b { background: #0B5CAD; color: #fff; font-family: var(--latin); font-size: 9px; font-weight: 800; padding: 4px 6px; letter-spacing: .08em; }
.ticket span { font-family: var(--latin); font-size: 9px; color: var(--ink); padding: 4px 6px; }
.stop-panel { flex: 1; padding: 24px 24px 28px; display: flex; flex-direction: column; }
.stop-panel > div { flex: 1; display: flex; flex-direction: column; gap: 14px; }
.stop-title { margin: 0; font-size: 24px; font-weight: 700; line-height: 1.35; }
.stop-intro { font-size: 14px; color: var(--muted); line-height: 1.6; }
#stopArrive .btn-primary, .reply-row { margin-top: auto; }
.driver-bubble { background: var(--card); color: var(--ink); border-radius: 12px 12px 12px 4px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.driver-bubble .es { font-family: var(--latin); font-size: 22px; font-weight: 600; }
.driver-bubble .ko { font-size: 13px; color: var(--ink-2); }
.board-bubble { margin: 16px 22px 0; }
.board-bubble .es { font-size: 17px; }
.reply-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.reply-row button { font-family: var(--latin); }
.btn-outline-wide { height: 52px; border: 1.5px solid #4A4D56; border-radius: 8px; background: transparent; color: var(--text); font-weight: 700; font-size: 16px; }

/* 마드리드 날씨 (html[data-wx]) */
.clouds, .wx { position: absolute; inset: 0; pointer-events: none; display: none; }
html[data-wx="cloudy"] .clouds, html[data-wx="rain"] .clouds, html[data-wx="storm"] .clouds, html[data-wx="snow"] .clouds { display: block; }
.clouds i { position: absolute; height: 26px; border-radius: 13px; background: #D7DADF; opacity: .85; animation: cloud 90s linear infinite; will-change: transform; }
.clouds i::before { content: ""; position: absolute; left: 22%; top: -14px; width: 46%; height: 26px; border-radius: 13px; background: inherit; }
.clouds i:nth-child(1) { width: 120px; top: 12%; left: 10%; animation-duration: 120s; }
.clouds i:nth-child(2) { width: 90px; top: 24%; left: 55%; animation-duration: 95s; animation-delay: -40s; }
.clouds i:nth-child(3) { width: 150px; top: 6%; left: 75%; animation-duration: 140s; animation-delay: -80s; }
html[data-wx="rain"] .clouds i, html[data-wx="storm"] .clouds i { background: #9EA4AD; }
@keyframes cloud { from { transform: translateX(0); } to { transform: translateX(-140vw); } }
html[data-wx="rain"] .wx, html[data-wx="storm"] .wx, html[data-wx="snow"] .wx { display: block; overflow: hidden; }
.wx::before { content: ""; position: absolute; left: -10%; right: -10%; top: -280px; bottom: 0; will-change: transform; }
html[data-wx="rain"] .wx::before, html[data-wx="storm"] .wx::before {
  background-image: repeating-linear-gradient(102deg, transparent 0 22px, rgba(225,232,242,.32) 22px 23px, transparent 23px 47px),
                    repeating-linear-gradient(98deg, transparent 0 31px, rgba(225,232,242,.22) 31px 32px, transparent 32px 61px);
  background-size: 100% 140px, 100% 280px;
  animation: fall .6s linear infinite;
}
@keyframes fall { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-30px, 140px, 0); } }
html[data-wx="storm"] .wx::after { content: ""; position: absolute; inset: 0; background: #fff; opacity: 0; animation: flash 11s infinite; }
@keyframes flash { 0%, 93%, 100% { opacity: 0; } 94% { opacity: .55; } 95% { opacity: 0; } 96% { opacity: .35; } }
html[data-wx="snow"] .wx::before {
  background-image: radial-gradient(circle, rgba(255,255,255,.95) 0 2px, transparent 2.5px), radial-gradient(circle, rgba(255,255,255,.8) 0 1.5px, transparent 2px);
  background-size: 70px 70px, 35px 35px;
  animation: snowfall 7s linear infinite;
}
@keyframes snowfall { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(20px, 140px, 0); } }
html[data-wx="fog"] .wx { display: block; background: rgba(214,218,224,.5); }
@media (prefers-reduced-motion: reduce) { .wx::before, .clouds i, .wx::after, .landmark.run { animation: none !important; } }
.window .clouds, .window .wx { z-index: 1; }
.window .shade { z-index: 1; }
.window .frame, .window .mullion, .window .wall, .window .pole, .window .occupant { z-index: 2; }

/* 맞은편 승객 줄 */
.pax-wrap { flex: none; display: flex; align-items: flex-end; gap: 6px; padding: 30px 10px 6px 12px; background: var(--panel); border-top: 4px solid var(--frame); }
.pax-row { flex: 1; min-width: 0; display: flex; justify-content: space-between; align-items: flex-end; gap: 4px; }
.slot { position: relative; flex: 0 1 58px; min-width: 0; padding: 0; border: none; background: none; color: inherit; cursor: pointer; display: flex; flex-direction: column; align-items: stretch; touch-action: manipulation; }
.slot.empty, .slot.me { cursor: default; }
.slot .art svg { display: block; width: 100%; height: auto; }
.slot .tag { display: block; height: 14px; margin-top: 2px; font: 600 10px var(--latin); color: var(--dim); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot.me .tag { color: var(--amber); }
/* 흰 테두리는 그림(SVG)에 외곽선으로 그리지 않고 위에 얹는 틀로 — 아이폰(사파리)에서 잔상이 남지 않게 */
.slot.me .art { position: relative; }
.slot.me .art::after { content: ""; position: absolute; inset: 0; border: 2px solid var(--text); pointer-events: none; }
.slot.more .art { opacity: .45; }
.slot .plus { position: absolute; left: 0; right: 0; top: 34%; text-align: center; font: 800 15px var(--latin); color: var(--text); }
.slot:not(.empty):not(.me):active .art { transform: translateY(1px); }
.slot:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
/* 머리 위 말풍선: 평소 '나', 인사·대답 때는 그 말 */
.bub { position: absolute; left: 50%; bottom: calc(100% - 6px); transform: translateX(-50%); z-index: 3; width: max-content; max-width: 150px; background: var(--text); color: var(--ink);
  padding: 3px 7px; border-radius: 3px; box-shadow: 0 0 0 2px var(--bg); font: 700 11px var(--latin); line-height: 1.25; text-align: center; pointer-events: none; }
.bub::after { content: ""; position: absolute; left: 50%; bottom: -6px; margin-left: -4px; border: 4px solid transparent; border-top: 6px solid var(--text); border-bottom: 0; }
.bub small { display: block; font: 500 9.5px 'Noto Sans KR', sans-serif; color: var(--ink-2); }
.bub.me-tag { font-family: 'Noto Sans KR', sans-serif; padding: 2px 7px; }
.slot:first-child .bub { left: 0; transform: none; } .slot:first-child .bub::after { left: 22px; }
.slot:last-child .bub { left: auto; right: 0; transform: none; } .slot:last-child .bub::after { left: auto; right: 18px; }
.bub.pop { animation: rise .3s ease-out; }
/* 내리는 나: 일어나서 문 쪽으로 */
.slot.leaving .art { animation: leave 1.8s ease-in forwards; }
@keyframes leave { 0% { transform: none; } 25% { transform: translateY(-6px); } 100% { transform: translate(260px, -6px); opacity: 0; } }
/* 하차 버튼 */
.stop-btn { flex: none; width: 52px; display: flex; flex-direction: column; align-items: center; gap: 3px; background: none; border: none; padding: 0 0 16px; cursor: pointer; touch-action: manipulation; }
.stop-btn i { width: 46px; height: 46px; border-radius: 50%; background: #C9CBD2; display: grid; place-items: center; transition: box-shadow .2s; }
.stop-btn b { width: 34px; height: 34px; border-radius: 50%; background: #B8392E; color: #fff; display: grid; place-items: center; font: 900 8px var(--led-font); letter-spacing: .04em; }
.stop-btn span { font: 700 9px var(--latin); letter-spacing: .1em; color: var(--dim); }
.stop-btn[aria-pressed="true"] i { background: var(--amber); box-shadow: 0 0 0 5px rgba(229,72,58,.35), 0 0 16px rgba(229,72,58,.8); }
.stop-btn[aria-pressed="true"] b { background: #E5483A; }
.stop-btn[aria-pressed="true"] span { color: var(--amber); }
.stop-btn:disabled { opacity: .35; cursor: default; }
.pax-2 > g, .pax-3 > g, .pax-read > g, .pax-blink > g, .pax-yawn > g { animation-timing-function: steps(1, end); animation-iteration-count: infinite; animation-delay: var(--d, 0s); }
.pax-2 > .f1 { animation-name: pa; animation-duration: 3.6s; } .pax-2 > .f2 { animation-name: pb; animation-duration: 3.6s; }
.pax-2.fast > g { animation-duration: 1.4s; }
@keyframes pa { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }
@keyframes pb { 0% { opacity: 0; } 50% { opacity: 1; } 100% { opacity: 0; } }
.pax-blink > .f1 { animation-name: ka; animation-duration: 4s; } .pax-blink > .f2 { animation-name: kb; animation-duration: 4s; }
@keyframes ka { 0% { opacity: 1; } 92% { opacity: 0; } 97% { opacity: 1; } }
@keyframes kb { 0% { opacity: 0; } 92% { opacity: 1; } 97% { opacity: 0; } }
.pax-yawn > .f1 { animation-name: ya; animation-duration: 6s; } .pax-yawn > .f2 { animation-name: yb; animation-duration: 6s; }
@keyframes ya { 0% { opacity: 1; } 70% { opacity: 0; } 90% { opacity: 1; } }
@keyframes yb { 0% { opacity: 0; } 70% { opacity: 1; } 90% { opacity: 0; } }
.pax-3 > .f1 { animation-name: z1; animation-duration: 5s; } .pax-3 > .f2 { animation-name: z2; animation-duration: 5s; } .pax-3 > .f3 { animation-name: z3; animation-duration: 5s; }
@keyframes z1 { 0% { opacity: 1; } 40% { opacity: 0; } 100% { opacity: 0; } }
@keyframes z2 { 0% { opacity: 0; } 40% { opacity: 1; } 85% { opacity: 0; } }
@keyframes z3 { 0% { opacity: 0; } 85% { opacity: 1; } 100% { opacity: 1; } }
.pax-read > .f1 { animation-name: r1; animation-duration: 6s; } .pax-read > .f2 { animation-name: r2; animation-duration: 6s; } .pax-read > .f3 { animation-name: r3; animation-duration: 6s; }
@keyframes r1 { 0% { opacity: 1; } 20% { opacity: 0; } 40% { opacity: 1; } 60% { opacity: 0; } 100% { opacity: 0; } }
@keyframes r2 { 0% { opacity: 0; } 20% { opacity: 1; } 40% { opacity: 0; } 60% { opacity: 1; } 85% { opacity: 0; } }
@keyframes r3 { 0% { opacity: 0; } 85% { opacity: 1; } 100% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .pax-row g, .occupant { animation: none !important; } .pax-row g.f2, .pax-row g.f3 { display: none; } }

/* 도로는 건물과 따로 — 랜드마크가 지나갈 때 건물 줄만 비켜준다 */
.road { position: absolute; left: 0; right: 0; bottom: 0; height: 32px; background: #4A4B52; border-top: 4px solid #C9CBD2; }
.layer.back { transition: opacity 1.6s ease; }   /* 랜드마크에서 건물이 비켜날 때 천천히 (깜박임처럼 보이지 않게) */
.window.plaza .layer.back { opacity: 0; }

/* 승차: 문 열림 전환 → 단말기·승차권 → 삑 */
.cabin { animation: doorOpen .55s ease-out both; }
@keyframes doorOpen { from { clip-path: inset(0 50% 0 50%); } to { clip-path: inset(0 0 0 0); } }
#stop[data-stage="tap"] .validator { box-shadow: 0 0 0 0 rgba(124,224,138,.0); animation: vpulse 1.4s ease-out infinite; }
@keyframes vpulse { 0% { box-shadow: 0 0 0 0 rgba(124,224,138,.55); } 80%, 100% { box-shadow: 0 0 0 14px rgba(124,224,138,0); } }
.validator.flash { animation: vflash .5s ease-out; }
@keyframes vflash { 0% { box-shadow: 0 0 0 0 rgba(124,224,138,.9); background: #E4F28A; } 100% { box-shadow: 0 0 0 26px rgba(124,224,138,0); background: #C9D34A; } }
.stop-tap { align-items: center; justify-content: center; }
.ticket-card { width: 220px; height: 136px; border: none; padding: 0; border-radius: 6px; background: var(--card); color: var(--ink); display: flex; flex-direction: column; text-align: left; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255,255,255,.06); animation: bobT 2.2s ease-in-out infinite; transition: transform .38s cubic-bezier(.3,.7,.2,1), opacity .2s; touch-action: manipulation; }
.ticket-card b { background: #0B5CAD; color: #fff; font-family: var(--latin); font-size: 12px; font-weight: 800; letter-spacing: .12em; padding: 10px 14px; }
.ticket-card .tc-route { display: flex; align-items: center; gap: 8px; padding: 14px 14px 0; font-family: var(--latin); font-size: 12px; color: var(--ink-2); }
.ticket-card .tc-route strong { flex: none; white-space: nowrap; background: #0B5CAD; color: #fff; font-size: 18px; padding: 2px 8px; border-radius: 3px; }
.ticket-card .tc-foot { margin-top: auto; padding: 0 14px 12px; font-family: var(--latin); font-size: 11px; letter-spacing: .1em; color: var(--dim); }
@keyframes bobT { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-8px) rotate(-2deg); } }
.ticket-card.fly { animation: none; }
.driver-bubble.enter, .reply-row.enter { animation: rise .45s ease-out both; }
.reply-row.enter { animation-delay: .25s; }
@media (prefers-reduced-motion: reduce) { .cabin, .ticket-card, #stop[data-stage="tap"] .validator { animation: none !important; } }

/* 승객 줄의 나: 좌석표처럼 흰 테두리 */
.pax-2.talk > g { animation-duration: .36s; }

/* 전광판: 하차 요청 */
.led-req { color: #FF5A4A; text-shadow: 0 0 6px rgba(255,90,74,.75); white-space: nowrap; }
/* 이름 고르기 */
.name-pick { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.name-q { margin: 0; font-size: 17px; font-weight: 700; }
.name-chips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.name-chips button { height: 38px; border: 1.5px solid #4A4D56; border-radius: 6px; background: transparent; color: var(--text); font: 600 14px var(--latin); padding: 0 2px; }
.name-chips button[aria-checked="true"] { background: var(--amber); border-color: var(--amber); color: var(--bg); }
.ticket-card .tc-name { padding: 6px 14px 0; font: 600 11px var(--latin); letter-spacing: .08em; color: var(--ink-2); }
.ticket-card .tc-name em { font-style: normal; font-size: 15px; letter-spacing: 0; color: var(--ink); }
.ticket-card { height: 150px; }
.btn-inline { background: none; border: none; padding: 4px 2px; color: var(--muted); font: inherit; text-decoration: underline; text-underline-offset: 3px; min-height: 32px; }
.btn-inline b { color: var(--amber); font-family: var(--latin); }
/* 인사 받기 */
.greet-in { background: var(--panel); border-radius: 8px; padding: 12px 14px; box-shadow: 0 0 0 1.5px var(--amber); display: flex; flex-direction: column; gap: 8px; animation: rise .35s ease-out; }
.greet-in p { margin: 0; font-size: 13px; } .greet-in b { color: var(--amber); font-family: var(--latin); }
.greet-replies { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.greet-replies button { min-height: 52px; border: 1.5px solid var(--amber); border-radius: 6px; background: transparent; color: var(--amber); font: 700 12.5px var(--latin); padding: 4px 4px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.greet-replies small { font: 400 10px 'Noto Sans KR', sans-serif; color: var(--muted); }
.greet-timer { height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; }
.greet-timer i { display: block; height: 100%; background: var(--amber); transform-origin: left; animation: shrink 10s linear forwards; }
@keyframes shrink { from { transform: scaleX(1); } to { transform: scaleX(0); } }
/* 하차 요청 안내 */
.bell-note { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: #2A1716; border: 1.5px solid #E5483A; border-radius: 8px; padding: 6px 6px 6px 14px; font-size: 14px; }
.bell-note b { font-family: var(--latin); }
.bell-note .btn-text { flex: none; white-space: nowrap; }
/* 하차 화면: 인도 */
.sidewalk { position: relative; height: clamp(300px, 52dvh, 470px); background: var(--sky); overflow: hidden; flex: none; }
.sw-street { position: absolute; left: -380px; bottom: 60px; height: 300px; opacity: .55; }
.sw-street svg { display: block; }
.sw-walk { position: absolute; left: 0; right: 0; bottom: 0; height: 64px; background: #C9C3B6; border-top: 4px solid #9E978A; }
.sw-sign { position: absolute; left: 22px; top: 8%; background: #0B5CAD; color: #fff; border-radius: 4px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; max-width: calc(100% - 44px); }
.sw-sign span { font: 600 10px var(--latin); letter-spacing: .12em; } .sw-sign b { font: 800 19px var(--latin); line-height: 1.15; }
.sw-bus { position: absolute; left: 0; bottom: 64px; width: 330px; animation: busAway 3.4s cubic-bezier(.5,0,.8,.6) .3s forwards; }
.sw-bus svg { display: block; width: 100%; height: auto; }
@keyframes busAway { from { transform: translateX(10%); } to { transform: translateX(-130%); } }
.sw-me { position: absolute; right: 22%; bottom: 30px; width: 54px; animation: stepOff .7s ease-out both; }
.sw-me svg { display: block; width: 100%; height: auto; }
@keyframes stepOff { from { transform: translate(-40px, -14px); opacity: 0; } to { transform: none; opacity: 1; } }
.alight-panel { flex: 1; padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; }
.alight-panel .es.big { font-family: var(--latin); font-size: clamp(24px, 7.4vw, 30px); font-weight: 600; line-height: 1.2; }
.alight-panel .ko { font-size: 16px; color: #D3D5DB; }
.alight-more { margin-top: auto; display: flex; flex-direction: column; gap: 8px; animation: rise .5s ease-out; }
.alight-more .trip { margin: 0 0 6px; font-size: 13px; color: var(--muted); line-height: 1.6; }
/* 이름 바꾸기 창 */
.sheet { position: fixed; inset: 0; z-index: 20; background: rgba(8,9,12,.6); display: flex; align-items: flex-end; justify-content: center; }
.sheet-box { width: 100%; max-width: 480px; background: var(--panel); border-radius: 12px 12px 0 0; padding: 18px 20px calc(20px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 12px; }
/* 좌석표: 파란 EMT 의자, 한 화면에 */
.seat-grid { row-gap: 2px; }
.seat-grid button { height: clamp(34px, calc((100dvh - 466px) / 9), 60px); aspect-ratio: auto; }
.seat-grid button svg { width: 100%; height: 100%; }
.seat-grid button { position: relative; }
.seat-grid button.m::after, .seat-grid button[aria-pressed="true"]::after { content: ""; position: absolute; inset: 0; border: 2px solid var(--text); pointer-events: none; }
.seatmap { padding: 10px 18px 12px; gap: 6px; margin-top: 10px; }
.board-head { padding-top: 10px; }
.board-head h1 { font-size: 20px; }
.board-foot { padding-top: 8px; padding-bottom: 12px; gap: 6px; }
.board-foot .btn-text { min-height: 36px; }
.board-bubble { margin-top: 8px; padding: 7px 12px; flex-direction: row; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.board-bubble .es { font-size: 15px; }
.board-bubble .ko { font-size: 12px; }
@media (prefers-reduced-motion: reduce) { .sw-bus, .sw-me, .slot.leaving .art, .greet-timer i { animation-duration: .01s !important; } }

/* 대답 뒤 'Gracias' 하나 */
.talk-options button.thanks { grid-column: 1 / -1; height: 48px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.talk-options button.thanks small { font: 400 12px 'Noto Sans KR', sans-serif; color: var(--muted); }

/* ---------- 창밖 이야기 ---------- */
/* 하늘: 별 (밤), 무지개 (비 갠 뒤), 비행기 — 모두 건물 뒤 */
.stars { position: absolute; left: 0; right: 0; top: 0; height: 62%; opacity: 0; transition: opacity 3s; pointer-events: none; will-change: opacity; }
.window[data-sky="night"] .stars { opacity: 1; }
.window[data-sky="dusk"] .stars, .window[data-sky="dawn"] .stars { opacity: .35; }
.rainbow { position: absolute; left: 4%; right: 4%; top: 2%; height: 70%; opacity: 0; transition: opacity 4s; pointer-events: none; }
.rainbow.on { opacity: 1; }
.plane { position: absolute; left: 0; top: 9%; width: 150px; visibility: hidden; will-change: transform; pointer-events: none; }
.plane.fly { visibility: visible; animation: planeFly 16s linear both; animation-delay: var(--pd, 0s); }
@keyframes planeFly { from { transform: translateX(-160px); } to { transform: translateX(calc(var(--ww, 400px) + 20px)) translateY(-6px); } }
.sun svg { display: block; }
/* 거리: 가끔만 보이는 장면 (거리 악사·비둘기) — 랜드마크처럼 흘러감 */
.rare { position: absolute; left: 0; bottom: 30px; visibility: hidden; will-change: transform; z-index: 1; }
.rare.run { visibility: visible; animation: lm var(--lm-dur, 20s) linear both; animation-delay: var(--lm-delay, 0s); }
.rare svg { display: block; }
/* 비둘기 떼: 그림 전체가 한꺼번에 날아오름 (안쪽 SVG를 움직이면 휴대폰이 매 프레임 다시 계산해서 통째로) */
.rare.run.pigeons svg { animation: fly 2.6s ease-in forwards; animation-delay: var(--fly-at, 6s); will-change: transform; }
@keyframes fly { to { transform: translate(-30px, -70px); opacity: 0; } }
.landmark .confetti { position: absolute; left: 20px; top: 40px; pointer-events: none; will-change: transform; animation: confetti 3s linear infinite; }
.landmark .confetti svg { display: block; }
@keyframes confetti { from { transform: translate(0, 0); } to { transform: translate(-6px, 60px); } }
/* 반대편 차선으로 스쳐 가는 차 */
.passing { position: absolute; left: 0; bottom: 2px; visibility: hidden; will-change: transform; z-index: 1; }
.passing.go { visibility: visible; animation: pass var(--pass-dur, 2.4s) linear both; }
@keyframes pass { from { transform: translateX(calc(var(--sww, var(--ww, 400px)) + 10px)); } to { transform: translateX(-200px); } }
.passing svg { display: block; }
/* '오늘 운이 좋아요' 알림 */
.luck { position: absolute; left: 50%; top: 18px; transform: translateX(-50%); z-index: 4; background: var(--text); color: var(--ink); font: 700 12px 'Noto Sans KR', sans-serif; padding: 5px 10px; border-radius: 4px; white-space: nowrap; box-shadow: 0 2px 8px rgba(0,0,0,.25); animation: rise .4s ease-out; max-width: calc(100% - 40px); overflow: hidden; text-overflow: ellipsis; }
@media (prefers-reduced-motion: reduce) { .landmark .confetti, .rare.run.pigeons svg { animation: none !important; } .passing.go, .plane.fly { animation: none !important; visibility: hidden; } }

/* ---------- 계절과 기념일 ---------- */
.window { --leaf: #5E7A3A; --leaf2: #6E8C45; --bloom: transparent; }
.lights { position: absolute; left: 0; right: 0; top: 0; height: 28%; z-index: 2; pointer-events: none; opacity: .55; transition: opacity 3s; }
.window[data-sky="night"] .lights, .window[data-sky="dusk"] .lights, .window[data-sky="overcast"] .lights { opacity: 1; }
.banderines { position: absolute; left: 0; right: 0; top: 0; height: 18%; z-index: 2; pointer-events: none; }
.leaves { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.leaves > div { position: absolute; left: 0; right: 0; top: -100%; height: 200%; will-change: transform; animation: leafFall 14s linear infinite; }
@keyframes leafFall { from { transform: translateY(0); } to { transform: translateY(50%); } }
.leaves svg { display: block; width: 100%; height: 50%; }
.parade.run { visibility: visible; }
/* ---------- 비 오는 날 창문: 김 서림 + 손가락 낙서 ---------- */
.fog { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; touch-action: none; cursor: crosshair; opacity: .46; }   /* (Phase 2) 김 서림 진하기는 여기서 한 번만 — 캔버스 안은 꽉 채워도 이 이상 짙어지지 않음 */
.fog-hint { position: absolute; left: 50%; bottom: 46px; transform: translateX(-50%); z-index: 4; background: rgba(5,5,5,.6); color: #F1F2F4; font: 500 12px 'Noto Sans KR', sans-serif; padding: 5px 10px; border-radius: 12px; white-space: nowrap; pointer-events: none; animation: rise .4s ease-out; }
/* ---------- 랜드마크 기념사진 ---------- */
#ride { position: relative; }
.cam-btn { position: absolute; right: 26px; z-index: 6; width: 50px; height: 50px; border-radius: 50%; border: none; background: rgba(5,5,5,.72); box-shadow: 0 0 0 2px var(--amber); display: grid; place-items: center; cursor: pointer; animation: rise .35s ease-out; touch-action: manipulation; }
.cam-btn:active { transform: scale(.94); }
.flash { position: absolute; inset: 0; z-index: 5; background: #fff; opacity: 0; pointer-events: none; }
.flash.on { animation: flashOn .6s ease-out; }
@keyframes flashOn { 0% { opacity: .95; } 100% { opacity: 0; } }
.photo-box { align-items: stretch; }
.photo-box img { display: block; width: min(100%, 340px); height: auto; margin: 0 auto; transform: rotate(-1.5deg); box-shadow: 0 10px 30px rgba(0,0,0,.45); }
.photo-actions { display: flex; gap: 8px; margin-top: 6px; }
.photo-actions button { flex: 1; }
@media (prefers-reduced-motion: reduce) { .leaves > div { animation: none !important; } .flash.on { animation: none !important; } }

/* 좌석표 아래: '그대로 앉아 있기'와 '서서 가기'를 한 줄에 (한 화면에 들어오게) */
.foot-alt { display: flex; justify-content: center; gap: 18px; }
.foot-alt .btn-text { flex: none; }
/* 사진 창: 저장·공유 버튼은 같은 크기, 가운데 정렬 (공유는 테두리만) */
.photo-actions button { box-sizing: border-box; flex: 1 1 0; min-width: 0; height: 52px; min-height: 52px; padding: 0 12px; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 700; border-radius: 10px; }
.photo-actions .btn-outline { color: var(--text); border: 1.5px solid #4A4D56; background: transparent; }
.photo-actions .btn-primary { border: 1.5px solid transparent; }   /* 공유 버튼 테두리만큼 → 두 버튼 폭이 정확히 같게 */
/* 이름 고르기: 이름마다 얼굴 */
.name-chips { gap: 5px; }
.name-chips button { display: flex; align-items: center; justify-content: flex-start; gap: 2px; padding: 0 3px; height: 40px; overflow: hidden; white-space: nowrap; font-size: 12px; letter-spacing: -.01em; }
.name-chips button svg { width: 18px; height: 21px; flex: none; display: block; }
.name-chips button span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* 이름 고르기(첫 방문): 정류장에 서서 인사하는 나 — 뒤 거리는 옅은 안개, 나는 테두리·그림자로 또렷하게 */
.stop-haze { position: absolute; inset: 0; background: rgba(220,232,242,.42); pointer-events: none; }
.stop-me { position: absolute; right: 16%; bottom: 10px; width: 76px; z-index: 2; animation: rise .35s ease-out; }
.stop-me-art svg { display: block; width: 100%; height: auto; filter: drop-shadow(2px 0 0 #16181D) drop-shadow(-2px 0 0 #16181D) drop-shadow(0 2px 0 #16181D) drop-shadow(0 -2px 0 #16181D); }
.stop-me-shadow { position: absolute; left: -8px; right: -8px; bottom: -4px; height: 12px; border-radius: 50%; background: rgba(0,0,0,.28); }
.stop-me-bub { position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); background: var(--text); color: var(--ink); font: 800 13px var(--latin); padding: 4px 10px; border-radius: 4px; box-shadow: 0 0 0 2px var(--bg); white-space: nowrap; }
.stop-me-bub::after { content: ""; position: absolute; left: 50%; bottom: -6px; margin-left: -4px; border: 4px solid transparent; border-top: 6px solid var(--text); border-bottom: 0; }
.stop-me.pop .stop-me-art { animation: hop .3s ease-out; }
@keyframes hop { 0% { transform: translateY(0); } 40% { transform: translateY(-8px); } 100% { transform: translateY(0); } }
/* 이름 고르는 동안엔 거리 그림을 조금 낮춰서 '이 이름으로 타기'까지 한 화면에 */
#stop.naming .stop-scene { height: clamp(210px, 33dvh, 330px); }
#stop.naming .stop-intro { font-size: 13px; line-height: 1.5; margin: 0; }
@media (max-width: 379px) {
  .name-chips button { font-size: 11px; letter-spacing: -.02em; }
  .name-chips button svg { width: 15px; height: 18px; }
}
#stop.naming .stop-title { font-size: 19px; }
@media (max-height: 820px) {
  #stop.naming .stop-scene { height: clamp(190px, 29dvh, 300px); }
  .name-chips button { height: 36px; }
  #stop.naming .name-pick { gap: 8px; }
}

/* 통로 자리 소품: 천장 손잡이 끈 (버스를 따라 살짝 흔들림) */
.straps { display: none; position: absolute; left: 20px; right: 20px; top: 0; height: 74px; z-index: 3; pointer-events: none; }
.window.aisle .straps { display: block; }
.straps .rail { position: absolute; left: 0; right: 0; top: 6px; height: 5px; background: #9EA1AA; border-bottom: 2px solid #6B6E78; }
.straps .strap { position: absolute; top: 9px; width: 18px; height: 60px; transform-origin: 50% 0; animation: sway 3.2s ease-in-out infinite; will-change: transform; }
.straps .strap svg { display: block; width: 100%; height: 100%; }
.straps .strap:nth-child(2) { left: 22%; animation-delay: -.4s; }
.straps .strap:nth-child(3) { left: 50%; animation-delay: -1.3s; }
.straps .strap:nth-child(4) { left: 74%; animation-delay: -2.1s; }
@keyframes sway { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
@media (prefers-reduced-motion: reduce) { .straps .strap { animation: none; } }

/* 전광판: 긴 정류장 이름은 옆으로 흘러감 (실제 EMT 버스처럼) */
.led-big.marquee { overflow: hidden; text-overflow: clip; white-space: nowrap; }
.led-big .mq { display: inline-block; white-space: nowrap; will-change: transform; animation: mq var(--mq-dur, 10s) linear infinite; }
.led-big .mq::after { content: attr(data-t); padding-left: var(--mq-gap, 60px); }
@keyframes mq { 0%, 12% { transform: translateX(0); } 100% { transform: translateX(calc(-1 * var(--mq-shift, 300px))); } }
@media (prefers-reduced-motion: reduce) { .led-big .mq { animation: none; } .led-big.marquee { text-overflow: ellipsis; } }
/* 상황 문장 카드: 제목('MAÑANA · 아침')을 따뜻한 색으로 — 정류장 이름과 구분 */
.card.situation .card-stop { color: #B8661C; }

/* 화면이 옆으로 넘치지 않게 (안드로이드 큰 글자·화면 확대) */
html, body { overflow-x: hidden; overflow-x: clip; max-width: 100%; }
#app { overflow-x: clip; }
/* 휴대폰 글자 크기 재기용 (보이지 않음) */
.tz-probe { position: absolute; left: -999px; top: -999px; visibility: hidden; font: 400 100px/1 monospace; }
/* 글자가 크게 설정된 휴대폰: 한 줄을 지켜야 하는 곳 */
html.tz-big .led-row { flex-wrap: nowrap; white-space: nowrap; gap: 6px; letter-spacing: .02em; }
html.tz-big .led-row > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
html.tz-big .led-row > #ledClock { flex: none; }   /* 시각·아이콘은 줄지 않고, 넘치면 노선 쪽이 '…' */
html.tz-big .stop-btn span { letter-spacing: 0; white-space: nowrap; font-size: 8px; }
html.tz-big .slot .tag { letter-spacing: -.02em; font-size: 9px; }
html.tz-big .riders, html.tz-big .stop-line, html.tz-big .neighbor-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.tz-big .window { min-height: 170px; }

/* ---------- 2단계: 정류장 쉼터·신호 대기·북적이는 거리 ---------- */
/* 쉼터·신호등: 길을 따라 다가와 서고, 다시 흘러감 (transform만 — 휴대폰에서 부드럽게) */
.stopper { position: absolute; left: 0; bottom: 30px; z-index: 1; will-change: transform; pointer-events: none; }
.stopper.in { animation: stopIn var(--dur, 6s) cubic-bezier(0, 0, .58, 1) both; animation-delay: var(--delay, 0s); }
.stopper.hold { transform: translateX(var(--at)); }
.stopper.out { animation: stopOut var(--dur, 6s) linear both; animation-delay: var(--delay, 0s); }
@keyframes stopIn { from { transform: translateX(var(--from)); } to { transform: translateX(var(--at)); } }
@keyframes stopOut { from { transform: translateX(var(--at)); } to { transform: translateX(var(--to)); } }
.stopper svg { display: block; }
#shelter .art { position: relative; }
#shelter .waiters > div { position: absolute; bottom: 0; transition: transform 1.8s ease-in, opacity 1.8s ease-in; }
#shelter.boarding .waiters > div { transform: translateX(150px); opacity: 0; }   /* 버스 문 쪽으로 걸어가 탐 */
#signal { bottom: 0; }
#signal .zebra { position: absolute; left: 30px; bottom: 0; }
#signal .sigpole { position: absolute; left: 0; bottom: 30px; }
#signal .crossers { position: absolute; left: 40px; bottom: 30px; width: 200px; height: 60px; }
#signal .crossers > div { position: absolute; bottom: 0; transition: transform 3.4s linear; }
#signal.walk .crossers > div { transform: translateX(-120px); }   /* 보행자 초록불: 길을 건넘 */
#signal.green .sig-red { fill: #4A1F1F; } #signal.green .sig-green { fill: #3FCF6A; } #signal.green .ped { fill: #E5483A; }
@keyframes passR { from { transform: translateX(-240px); } to { transform: translateX(calc(var(--sww, var(--ww, 400px)) + 20px)); } }
.passing.go.overtake { animation-name: passR; }
.passing.go.slow { animation-timing-function: linear; }
@media (prefers-reduced-motion: reduce) { .stopper.in, .stopper.out { animation: none !important; } #shelter .waiters > div, #signal .crossers > div { transition: none !important; } }

/* 기사님이 손을 몇 번 흔들고 멈춤 (손목 쪽을 축으로) */
#driverAvatar .wave-hand { transform-box: view-box; transform-origin: 102px 75px; animation: driverWave .45s ease-in-out 6 alternate; }
@keyframes driverWave { from { transform: rotate(-10deg); } to { transform: rotate(12deg); } }
@media (prefers-reduced-motion: reduce) { #driverAvatar .wave-hand { animation: none; } }

/* 전광판 시각 앞 해·달 (글자 색 그대로) */
.led-ico { width: .95em; height: .95em; vertical-align: -.12em; margin-right: .3em; fill: currentColor; }
/* 해 뜨기 1시간 전쯤: 밤하늘이 푸르스름한 새벽빛으로 (건물 뒤, 별·달 흐리게) */
.window .predawn { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 6s ease; will-change: opacity;
  background: linear-gradient(to bottom, rgba(45,75,150,.6) 0%, rgba(105,105,185,.6) 40%, rgba(235,145,110,.55) 72%); }
.window[data-predawn="1"] .predawn { opacity: 1; }
.window[data-predawn="1"] .stars { opacity: .4; }
/* 전광판 윗줄은 항상 한 줄: 좁은 휴대폰에선 글자 간격을 줄이고, 그래도 넘치면 왼쪽(노선)만 '…' — 시각·아이콘은 늘 다 보이게 */
.led-row > span { white-space: nowrap; }
.led-row > #ledRoute { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.led-row > #ledClock { flex: none; }
@media (max-width: 360px) { .led-row { letter-spacing: .02em; gap: 6px; } }

/* ---------- 랜드마크 방문 ---------- */
#visit { position: relative; display: flex; flex-direction: column; min-height: 100%; background: var(--bg, #16181D); }
#visit[hidden] { display: none; }
.visit-top { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px 8px; font-size: 13px; color: #9EA1AA; }
.visit-album { background: none; border: 1px solid #3A3D45; color: #C9CBD2; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 12.5px; }
.visit-scene svg { display: block; width: 100%; height: auto; }
.visit-body { padding: 14px 18px 8px; }
.visit-name { font-size: 23px; font-weight: 800; margin: 0; letter-spacing: -.01em; }
.visit-sub { font-size: 13px; color: #9EA1AA; margin: 3px 0 10px; }
.visit-es { font-size: 17px; font-weight: 700; margin: 0; line-height: 1.4; }
.visit-ko { font-size: 14px; color: #C9CBD2; margin: 4px 0 0; line-height: 1.5; }
.visit-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.vchip { background: none; border: 1px solid #3A3D45; color: #F1F2F4; border-radius: 999px; padding: 8px 12px; font: inherit; font-size: 13px; }
.vchip.on { border-color: #E8A23A; color: #F2A33A; }
.visit-bus { margin: auto 12px 12px; background: #1E2127; border-radius: 16px; padding: 12px; }
.visit-led { background: #050505; border-radius: 8px; padding: 8px 12px; font-family: var(--led-font); font-weight: 900; color: #F2A33A; font-size: 14px; display: flex; justify-content: space-between; letter-spacing: .05em; }
.visit-btns { display: flex; gap: 8px; margin-top: 10px; }
.vbtn { flex: 1; border: 0; border-radius: 12px; padding: 11px 8px; background: #E8A23A; color: #1B1A1F; font: inherit; text-align: center; }
.vbtn b { display: block; font-size: 14px; }
.vbtn small { display: block; font-size: 11px; opacity: .8; margin-top: 2px; }
.vbtn.ghost { background: transparent; border: 1px solid #3A3D45; color: #F1F2F4; }
.vbtn.waiting { background: #2B2E35; color: #F2A33A; }
.vbtn[hidden] { display: none; }
.real-box { max-width: 420px; }
.real-photo { position: relative; border-radius: 12px; overflow: hidden; background: #2B2E35; aspect-ratio: 4 / 3; }
.real-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.real-tag { position: absolute; left: 10px; top: 10px; background: rgba(0,0,0,.5); color: #fff; border-radius: 999px; padding: 4px 10px; font-size: 12px; }
.real-box h3 { margin: 12px 0 0; font-size: 19px; }
.real-sub { margin: 2px 0 0; color: #9EA1AA; font-size: 13px; }
.real-how { background: #1E2127; border-radius: 12px; padding: 10px 12px; font-size: 13.5px; line-height: 1.5; margin: 10px 0 6px; }
.real-map { color: #F2A33A; font-size: 13px; text-decoration: none; }
.real-map[hidden] { display: none; }
.real-credit { font-size: 11px; color: #7E828C; margin: 10px 0 4px; }
.album-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.album-cell { border-radius: 10px; overflow: hidden; background: #22252D; aspect-ratio: 13 / 10; position: relative; display: flex; align-items: center; justify-content: center; color: #5A5F68; font-size: 28px; font-weight: 800; }
.album-cell svg { width: 100%; height: 100%; display: block; }
.album-cell span { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.55); color: #F1F2F4; font-size: 10.5px; font-weight: 600; padding: 3px 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.visit-trip { margin: 10px 0 0; font-size: 12.5px; color: #9EA1AA; }

/* ---------- 노선 막대 (자리 정하기) · 노선표 ---------- */
.route-strip { display: block; width: calc(100% - 28px); margin: 2px 14px 2px; background: #1E2127; border: 0; border-radius: 10px; padding: 4px 10px 5px; color: inherit; font: inherit; text-align: left; }
.rs-row { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.rs-open { color: #F2A33A; font-weight: 600; font-size: 11.5px; flex: none; }
.rs-top { display: flex; justify-content: space-between; font-size: 11.5px; color: #9EA1AA; }
.rs-top b { color: #F2A33A; font-weight: 600; }
.rs-line { position: relative; display: flex; justify-content: space-between; align-items: center; margin: 14px 3px 3px; height: 9px; background: linear-gradient(#C4302B, #C4302B) center / 100% 3px no-repeat; }
.rs-line i { width: 7px; height: 7px; border-radius: 50%; background: #F4F5F7; border: 2px solid #C4302B; box-sizing: border-box; flex: none; }
.rs-line i.past { background: #5A5F68; border-color: #5A5F68; }
.rs-line i.now { width: 10px; height: 10px; background: #F2A33A; border-color: #F2A33A; }
.rs-bus { position: absolute; top: -17px; font-size: 13px; transform: translateX(-50%); transition: left 1s linear; }
.rs-now { display: block; min-width: 0; font-size: 11.5px; color: #C9CBD2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rs-now b { color: #F1F2F4; }
.route-box { background: #F4F5F7; color: #1B1A1F; max-height: 86vh; display: flex; flex-direction: column; }
.route-head { display: flex; gap: 10px; align-items: center; border-bottom: 2px solid #C4302B; padding-bottom: 10px; }
.route-head b { display: block; font-size: 14px; } .route-head small { font-size: 11px; color: #6E7378; }
.route-badge { background: #C4302B; color: #fff; font-weight: 800; border-radius: 6px; padding: 4px 8px; font-size: 15px; }
.route-list { list-style: none; margin: 0; padding: 6px 0 4px 6px; overflow-y: auto; background: linear-gradient(#C4302B, #C4302B) 11px 0 / 3px 100% no-repeat; }
.route-list li { display: flex; align-items: center; gap: 8px; min-height: 22px; font-size: 12.5px; }
.route-list li::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid #C4302B; box-sizing: border-box; flex: none; }
.route-list li.past { color: #9EA1AA; } .route-list li.past::before { border-color: #9EA1AA; background: #DADCE0; }
.route-list li.next { font-weight: 800; } .route-list li.next::before { background: #F2A33A; border-color: #F2A33A; }
.route-list .here { background: #1B1A1F; color: #F2A33A; border-radius: 999px; padding: 1px 8px; font-size: 10.5px; font-weight: 700; white-space: nowrap; }
.route-list .nx { color: #C4302B; font-size: 10.5px; font-weight: 700; } .route-list .tg { color: #6E7378; font-size: 10.5px; }
.route-box .btn-text { color: #4A4C55; }

.real-credit a { color: #9EA1AA; text-decoration: none; }

.trip .nw { white-space: nowrap; }

/* ---------- 앨범 버튼 (자리 고르기 제목 옆 · 내린 뒤) ---------- */
.board-title-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.board-title-row h1 { margin: 0; min-width: 0; }
.album-chip { flex: none; background: none; border: 1px solid #E8A23A; color: #F2A33A; border-radius: 999px; padding: 5px 11px; font: inherit; font-size: 12.5px; white-space: nowrap; }
/* (p3-43) 앨범 · 내 셀러를 한 줄에 두 칸 (전엔 두 줄이라 사이가 크게 벌어졌음) */
.alight-chips { display: flex; gap: 8px; margin: 8px 0 12px; }
.alight-chips .album-chip { flex: 1 1 0; min-width: 0; padding: 8px 10px; text-align: center; overflow: hidden; text-overflow: ellipsis; }
.alight-chips .album-chip[hidden] { display: none; }
.album-hint { margin: -2px 0 6px; font-size: 12px; color: #9EA1AA; text-align: center; }
.album-cell.found { cursor: pointer; }
.album-cell span small { display: block; font-weight: 400; opacity: .8; font-size: 10px; }
.photo-note { margin: 0 0 8px; text-align: center; font-weight: 700; font-size: 14px; color: #F1F2F4; }
button.album-cell { border: 0; padding: 0; font: inherit; color: inherit; width: 100%; }

/* ---------- Phase 2 · 창밖 3단계 ---------- */
/* 왼쪽 창: 버스 차선 → 중앙분리대 → 건너편 차선 → 건너편 거리 (멀어서 작고 느리게) */
.layer.far, .farroad, .layer.median { display: none; }
#ride[data-side="left"] .layer.back, #ride[data-side="left"] .layer.front, #ride[data-side="left"] .road, #ride[data-side="left"] #shelter { display: none !important; }
#ride[data-side="left"] .layer.far, #ride[data-side="left"] .farroad, #ride[data-side="left"] .layer.median { display: block; }
.window { --far-b: 100px; --far-s: .55; --road-top: 118px; --onc-b: 74px; --onc-s: .72; }
.window[data-district="lavapies"] { --far-b: 74px; --far-s: .78; --road-top: 98px; --onc-b: 40px; --onc-s: .95; }
.window[data-district="castellana"], .window[data-district="chamartin"] { --onc-b: 66px; --onc-s: .85; }
.layer.far { inset: auto auto var(--far-b) 0; height: 300px; transform: scale(var(--far-s)); transform-origin: left bottom; transition: opacity 1.6s ease; }
.layer.far .track { animation: drift 95s linear infinite; }
.window.plaza .layer.far { opacity: 0; }
.farroad { position: absolute; left: 0; right: 0; bottom: 34px; height: calc(var(--road-top) - 34px); background: #55565D; border-top: 3px solid #C9CBD2; }
.layer.median { z-index: 1; }
.layer.median .track { animation: drift 22s linear infinite; }
@media (prefers-reduced-motion: reduce) { .layer.far .track { animation-duration: 285s; } .layer.median .track { animation-duration: 66s; } }
/* 건너편 랜드마크·거리 장면은 멀리 작게 (건너편 인도 높이) */
#ride[data-side="left"] .landmark, #ride[data-side="left"] .rare { bottom: var(--road-top); }
#ride[data-side="left"] .landmark svg, #ride[data-side="left"] .rare svg { transform: scale(var(--far-s)); transform-origin: left bottom; }
#ride[data-side="left"] #signal { z-index: 2; }   /* 횡단보도는 분리대 앞까지 */
/* 마주 오는 차: 분리대 너머 건너편 차선 / 앞지르는 오토바이: 바로 옆 차선 */
#ride[data-side="left"] .passing.far { bottom: var(--onc-b); }
#ride[data-side="left"] .passing.far svg { transform: scale(var(--onc-s)); transform-origin: left bottom; }
#ride[data-side="left"] .passing.near { z-index: 2; }

/* 해 질 녘 햇살: 창밖 빛줄기(양쪽 창) + 버스 안 줄무늬(해가 있는 왼쪽 창만) — 둘 다 은은하게 */
.rays { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; opacity: 0; transition: opacity 4s ease; }
.rays::before { content: ""; position: absolute; inset: -20% -40%; background: repeating-linear-gradient(115deg, transparent 0 90px, rgba(255, 205, 140, .3) 90px 124px, transparent 124px 230px); }
#ride[data-beam="1"] .rays::before { animation: rayPulse 7s ease-in-out infinite; will-change: opacity; }   /* 보일 때만 움직임 (안 보일 땐 휴대폰 일 없음) */
@keyframes rayPulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
#ride[data-beam="1"] .rays { opacity: .8; }
.beams { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; opacity: 0; transition: opacity 4s ease; }
.beams::before { content: ""; position: absolute; top: -10%; bottom: -10%; left: -160px; width: calc(100% + 720px);
  background: repeating-linear-gradient(90deg, transparent 0 70px, rgba(255, 196, 120, .34) 70px 120px, transparent 120px 170px, rgba(255, 196, 120, .22) 170px 196px, transparent 196px 260px);
  transform: skewX(-14deg); }
#ride[data-beam="1"][data-side="left"] .beams::before { animation: beamDrift 4.8s linear infinite; will-change: transform; }
@keyframes beamDrift { from { transform: skewX(-14deg) translateX(0); } to { transform: skewX(-14deg) translateX(-260px); } }
#ride[data-beam="1"][data-side="left"] .beams { opacity: .55; }
#ride.stopped .beams::before { animation-play-state: paused; }
.pax-wrap { position: relative; }
.beams.in { z-index: 1; }

/* 밤 유리창: 버스 안 천장 불빛 + 내 모습이 희미하게 비침 (창가 크게 · 통로 작고 흐리게 · 서 있으면 서 있는 모습) */
.refl, .ceil-refl { position: absolute; z-index: 2; pointer-events: none; opacity: 0; transition: opacity 3s ease; }
.refl { right: 8%; bottom: -6px; width: 120px; }   /* 정해진 크기 (뒤집기·흐려짐은 그림 안에서 — reflSVG) */
.refl svg { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.refl g { animation: none !important; }
.refl g.f2, .refl g.f3 { display: none; }   /* 눈 깜박임 없이 가만히 */
#ride[data-pose="aisle"] .refl { right: 22%; bottom: 4px; width: 72px; }
#ride[data-pose="stand"] .refl { right: 16%; bottom: 0; width: 46px; }
.ceil-refl { left: 0; right: 0; top: 18px; height: 8px; background: repeating-linear-gradient(90deg, rgba(255, 240, 200, .55) 0 64px, transparent 64px 120px); }
#ride[data-night="1"] .refl { opacity: .26; }
#ride[data-night="1"][data-pose="aisle"] .refl { opacity: .14; }
#ride[data-night="1"][data-pose="stand"] .refl { opacity: .2; }
#ride[data-night="1"] .ceil-refl { opacity: .45; }
@media (prefers-reduced-motion: reduce) { .rays::before, .beams::before { animation: none !important; } }

/* (Phase 2) 자리 고르기: "이 자리에 앉기"를 화면 아래에 붙여 늘 보이게 (좌석표만 스크롤) */
.board-foot { position: sticky; bottom: 0; z-index: 5; background: var(--bg); box-shadow: 0 -10px 14px -6px rgba(0, 0, 0, .55);
  padding-bottom: max(12px, env(safe-area-inset-bottom, 0px)); }
/* (Phase 2) 내릴 때: 빈 의자는 제자리에 남고 나만 일어나 문 쪽으로 */
.slot .seat-left { position: absolute; left: 0; right: 0; top: 0; pointer-events: none; }
.slot .seat-left svg { display: block; width: 100%; height: auto; }
.slot.leaving .art::after { display: none; }

/* ---------- (Phase 2) 스페인어 게임 ---------- */
.game-btn { flex: none; margin-right: auto; background: var(--amber); color: #16181D; font: 700 13px 'Noto Sans KR', sans-serif; border: 0; border-radius: 999px; padding: 6px 12px; cursor: pointer; white-space: nowrap; }
.game-btn:active { transform: translateY(1px); }
.game { position: fixed; inset: 0; z-index: 60; background: var(--bg); color: var(--text); overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: env(safe-area-inset-top, 0px) 0 calc(16px + env(safe-area-inset-bottom, 0px)); }
.game > * { max-width: 480px; margin-left: auto; margin-right: auto; }
body.game-open { overflow: hidden; }
.g-top { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: var(--bg); }
.g-led { flex: 1; min-width: 0; background: #000; color: var(--amber); border-radius: 10px; padding: 8px 10px; font: 700 12px var(--led-font); letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-x { flex: none; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; font: 500 13px 'Noto Sans KR', sans-serif; cursor: pointer; }
.g-head { padding: 4px 18px 0; }
.g-head h2 { margin: 0; font-size: 20px; }
.g-head p { margin: 4px 0 0; font-size: 13px; color: var(--dim); }
.g-bar { height: 8px; border-radius: 4px; background: var(--line); margin: 10px 0 4px; overflow: hidden; }
.g-bar i { display: block; height: 100%; background: var(--amber); transition: width .4s; }
.g-units { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px 4px; }
.g-unit.soon { opacity: .55; }
.g-unit.soon p { margin: 0; font-size: 12px; color: var(--dim); }
.g-st.now b { border: 2px solid var(--amber); color: var(--amber); }
.g-st.done b { border: 2px solid #D9473F; color: #D9473F; background: rgba(217, 71, 63, .1); transform: rotate(-12deg); }
.g-st.gold b { border: 2px solid #E8B84A; color: #E8B84A; background: rgba(232, 184, 74, .14); transform: rotate(-12deg); }
.g-st.lock { cursor: default; opacity: .55; }
.g-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 8px; padding: 12px 14px; }
.g-board button { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 12px; padding: 8px 4px; cursor: pointer; font-family: 'Noto Sans KR', sans-serif; }
.g-board b { display: block; font: 700 24px var(--latin); }
.g-board span { display: block; font: 600 13px var(--latin); color: var(--amber); }
.g-board small { font-size: 11px; color: var(--dim); }
.g-board button:active { background: #2E3139; }
.g-back, .g-again { display: block; margin: 14px auto 0; background: none; border: 0; color: var(--muted); font: 500 14px 'Noto Sans KR', sans-serif; text-decoration: underline; cursor: pointer; }
.g-q { padding: 2px 18px 8px; display: flex; flex-direction: column; min-height: calc(100dvh - 90px); }
.g-qtop { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 12px; color: var(--dim); margin: 6px 0 12px; }
.g-dots { display: flex; gap: 4px; flex: none; }
.g-dots i { width: 18px; height: 5px; border-radius: 3px; background: var(--line); }
.g-dots i.on { background: var(--amber); }
.g-dots i.cur { background: var(--text); }
.g-qtext { font-size: 19px; font-weight: 700; line-height: 1.45; margin: 6px 0 14px; white-space: pre-line; }   /* 설명 뒤 예문은 다음 줄 (문제 글의 \n) */
.g-listen { align-self: flex-start; background: #000; color: var(--amber); border: 1px solid var(--line); border-radius: 999px; padding: 9px 16px; font: 700 14px 'Noto Sans KR', sans-serif; cursor: pointer; margin-bottom: 14px; }
.g-ox { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: auto; }
.g-ox button { height: 100px; border-radius: 16px; border: 2px solid var(--line); background: var(--panel); color: var(--text); font: 700 40px var(--latin); cursor: pointer; }
.g-ox.two button { height: 64px; font-size: 26px; }
.g-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 4px 0 14px; }
.g-pair button { height: 60px; border-radius: 14px; border: 1px solid var(--line); background: #000; color: var(--amber); font: 700 18px var(--latin); cursor: pointer; }
.g-ch { display: flex; flex-direction: column; gap: 10px; margin-top: auto; }
.g-ch button { text-align: left; padding: 13px 14px; border-radius: 12px; border: 2px solid var(--line); background: var(--panel); color: var(--text); font: 600 16px var(--latin), 'Noto Sans KR', sans-serif; cursor: pointer; }
.g-ox button.right, .g-ch button.right { border-color: #4CAF50; background: rgba(76, 175, 80, .16); }
.g-ox button.wrong, .g-ch button.wrong { border-color: #D9473F; opacity: .75; }
.g-ox button:disabled, .g-ch button:disabled { cursor: default; color: var(--text); }
.g-fb { margin-top: 14px; border-radius: 12px; padding: 11px 12px; font-size: 14px; line-height: 1.55; }
.g-fb.ok { background: rgba(76, 175, 80, .14); border: 1px solid #4CAF50; }
.g-fb.ok b { color: #8BD18E; }
.g-fb.no { background: rgba(217, 71, 63, .12); border: 1px solid #D9473F; }
.g-fb.no b { color: #F08A84; }
.g-next { display: block; width: 100%; height: 50px; margin-top: 14px; border: 0; border-radius: 12px; background: var(--amber); color: #16181D; font: 700 16px 'Noto Sans KR', sans-serif; cursor: pointer; }
.g-res { padding: 12px 18px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.g-rl { margin: 6px 0 0; font-size: 13px; color: var(--dim); }
.g-res h2 { margin: 4px 0 0; font-size: 24px; }
.g-bigst { width: 112px; height: 112px; border-radius: 50%; display: grid; place-items: center; transform: rotate(-12deg); font: 700 13px/1.35 'Noto Sans KR', sans-serif; margin: 18px 0 16px; border: 4px solid #D9473F; color: #D9473F; }
.g-bigst.gold { border-color: #E8B84A; color: #E8B84A; }
.g-bigst.new { animation: stampIn .5s cubic-bezier(.2, 1.6, .5, 1) both; }
@keyframes stampIn { from { transform: rotate(-30deg) scale(1.8); opacity: 0; } to { transform: rotate(-12deg) scale(1); opacity: 1; } }
.g-juan { display: flex; gap: 10px; align-items: center; background: var(--card); color: var(--ink); border-radius: 12px; padding: 8px 12px; text-align: left; font-size: 14px; margin: 4px 0 6px; width: 100%; }
.g-juan svg { width: 40px; height: auto; flex: none; }
.g-juan span { color: var(--ink-2); font-size: 12px; }
@media (prefers-reduced-motion: reduce) { .g-bigst.new { animation: none; } }

/* (Phase 2) 게임 단원 요약 노트 · 문제 화면의 "← 목록" */
.g-back-top { flex: none; }
.g-sumbody { padding: 10px 14px 4px; display: flex; flex-direction: column; gap: 10px; }
.g-sec p { margin: 0 0 8px; font-size: 14px; line-height: 1.6; color: var(--text); }
.g-sec table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 6px; }
.g-sec td { padding: 6px 6px; border-top: 1px solid var(--line); vertical-align: top; }
.g-sec td:first-child { color: var(--dim); width: 40%; }
.g-ex b { display: block; font: 600 15px var(--latin), 'Noto Sans KR', sans-serif; }
.g-ex small { display: block; font-size: 12px; color: var(--dim); }
.g-ex:active { background: #22252C; }
.g-lock { text-align: center; color: var(--dim); font-size: 13px; margin: 6px 0 0; }

/* (Phase 2) 게임 위쪽 노선도 · 수료 도장 · 졸업장 */
.g-head-route { position: relative; }
.g-route { position: relative; height: 58px; margin: 18px 0 2px; }
.g-line { position: absolute; left: 6%; right: 6%; top: 13px; height: 4px; background: var(--line); border-radius: 2px; }
.g-line i { display: block; height: 100%; background: #D9473F; border-radius: 2px; transition: width .5s; }
.g-stop { position: absolute; top: 4px; width: 22px; height: 22px; border-radius: 50%; background: var(--bg); border: 3px solid #4A4D57; transform: translateX(-50%); display: grid; place-items: center; color: #fff; font: 800 11px/1 'Noto Sans KR', sans-serif; }
.g-stop.on { border-color: #D9473F; background: #D9473F; }
.g-stop.cur { border-color: var(--amber); }
.g-stl { position: absolute; top: 30px; transform: translateX(-50%); font-size: 10px; color: var(--dim); text-align: center; line-height: 1.25; white-space: nowrap; }
.g-stl b { display: block; font-size: 11px; color: var(--muted); }
.g-bus { position: absolute; top: -14px; transform: translateX(-50%); font-size: 16px; }
.g-hecho { position: absolute; right: 16px; top: 14px; width: 72px; height: 72px;   /* 위 전광판·버스로 버튼과 겹치지 않게 */ border-radius: 50%; border: 3px solid #D9473F; color: #D9473F; background: rgba(217, 71, 63, .1); display: grid; place-items: center; text-align: center; font: 800 12px/1.2 'Noto Sans KR', sans-serif; transform: rotate(-14deg); cursor: pointer; padding: 0; }
.g-hecho b { font-size: 13px; letter-spacing: .04em; }
.g-dip-wrap { padding: 8px 18px 4px; display: flex; flex-direction: column; align-items: stretch; text-align: center; }
.g-diploma { background: #F7F1E3; color: #2B2418; border-radius: 10px; padding: 18px 14px 14px; border: 4px double #B08A3E; margin: 8px 0 4px; }
.g-diploma .t { font: 700 12px 'Noto Sans KR', sans-serif; letter-spacing: .22em; color: #8A6A2A; }
.g-diploma h3 { margin: 6px 0 2px; font: 700 22px Georgia, 'Times New Roman', serif; }
.g-diploma .ko { font-size: 12px; color: #6B5A3E; }
.g-diploma .me { width: 72px; margin: 12px auto 6px; }
.g-diploma .me svg { display: block; width: 100%; height: auto; }
.g-diploma .nm { display: inline-block; font: 700 19px Georgia, 'Times New Roman', serif; border-bottom: 1px solid #B08A3E; padding: 0 14px 3px; }
.g-diploma .ft { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 14px; font-size: 11px; color: #6B5A3E; text-align: left; line-height: 1.4; }
.g-diploma .ft span:last-child { text-align: right; }
.g-diploma .seal { width: 50px; height: 50px; border-radius: 50%; border: 2px solid #C4302B; color: #C4302B; display: grid; place-items: center; text-align: center; font: 800 10px/1.1 sans-serif; transform: rotate(-12deg); }
.album-cell.dip { background: #F7F1E3; color: #2B2418; border: 2px solid #E8B84A; }

/* (Phase 2) 게임 목록 A안 · 요약 새 디자인 */
.g-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px 14px 0; }
.g-review, .g-alpha, .g-review-off { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 58px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: 600 14px 'Noto Sans KR', sans-serif; text-align: left; cursor: pointer; }
.g-review { border-color: var(--amber); }
.g-review b { color: var(--amber); font-size: 13px; }
.g-review-off { cursor: default; color: var(--dim); }
.g-alpha small, .g-review-off small { font-size: 11px; font-weight: 400; color: var(--dim); }
.g-unit { display: flex; gap: 11px; align-items: flex-start; background: var(--panel); border-radius: 12px; padding: 11px 12px; }
.g-unit.cur { box-shadow: inset 0 0 0 1.5px var(--amber); }
.g-unit.lock { opacity: .55; }
.g-no { flex: none; width: 36px; height: 36px; border-radius: 8px; background: #C4302B; color: #fff; display: grid; place-items: center; font: 800 16px 'Noto Sans KR', sans-serif; }
.g-unit.lock .g-no { background: #3A3D45; }
.g-unit.full .g-no { background: #2F7A3E; }
.g-ubody { flex: 1; min-width: 0; }
.g-unit h3 { margin: 0; font-size: 15px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.g-ues { margin: 1px 0 8px; font-size: 11px; color: var(--dim); }
.g-sum { flex: none; width: 34px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: none; font-size: 15px; cursor: pointer; }
.g-stamps { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.g-st { background: none; border: 0; padding: 0; cursor: pointer; }
.g-st b { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 700 11px 'Noto Sans KR', sans-serif; border: 2px dashed #4A4D57; color: var(--dim); }
.g-st.lock { cursor: default; }
.g-cnt { margin-left: auto; font-size: 11px; color: var(--dim); }
.g-nextline { display: block; width: 100%; margin-top: 9px; padding: 8px 10px; border-radius: 9px; border: 0; background: rgba(242, 163, 58, .14); color: var(--amber); font: 700 13px 'Noto Sans KR', sans-serif; text-align: left; cursor: pointer; }
.g-sumhead { width: calc(100% - 28px); max-width: 452px; margin: 4px auto 0; border-radius: 14px; padding: 14px; background: var(--panel); border-top: 4px solid var(--amber); color: var(--text); }   /* PC에서도 가운데 · 차분한 색 */
.g-sumhead small { font-size: 11px; letter-spacing: .14em; color: var(--amber); font-weight: 700; }
.g-sumhead h2 { margin: 3px 0 2px; font-size: 20px; }
.g-sumhead p { margin: 0; font-size: 12px; color: var(--dim); }
.g-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.g-chips button { border: 0; border-radius: 999px; padding: 4px 10px; background: rgba(242, 163, 58, .14); color: var(--amber); font: 600 11px 'Noto Sans KR', sans-serif; cursor: pointer; }
.g-sec { background: var(--panel); border-radius: 12px; padding: 12px 13px; scroll-margin-top: 70px; }
.g-sec h3 { margin: 0 0 8px; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.g-sec h3 i { font-style: normal; flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--amber); color: #16181D; display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.g-sec table { border-radius: 8px; overflow: hidden; }
.g-sec td { border-top: 0; background: #1B1D23; }
.g-sec tr:nth-child(odd) td { background: #262931; }
.g-sec td b { color: var(--amber); }
.g-exs { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.g-ex { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: var(--bg); border: 0; border-radius: 10px; color: var(--text); padding: 8px 10px; cursor: pointer; font-family: 'Noto Sans KR', sans-serif; }
.g-ex i { font-style: normal; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--amber); color: #16181D; display: grid; place-items: center; font-size: 11px; }
.g-tip { margin: 0; background: var(--card); color: var(--ink); border-radius: 12px; padding: 11px 13px; font-size: 14px; line-height: 1.5; }

/* (Phase 2) 앨범 새 디자인 */
#albumTitle { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; }
#albumTitle small { font-size: 11px; letter-spacing: .16em; color: var(--dim); font-weight: 600; }
#albumTitle em { font-style: normal; font-size: 12px; color: var(--dim); font-weight: 500; }
.album-prog { display: block; width: 140px; height: 6px; border-radius: 3px; background: #3A3D45; overflow: hidden; margin-top: 4px; }
.album-prog i { display: block; height: 100%; background: var(--amber); }
.album-grid { gap: 12px 10px; align-items: stretch; justify-items: stretch; }   /* 못 찾은 칸도 폴라로이드와 같은 높이 */
.album-cell { aspect-ratio: auto; min-height: 0; background: none; border: 1.5px dashed #4A4D57; border-radius: 8px; flex-direction: column; gap: 2px; padding: 14px 4px; color: #6E7180; overflow: visible; }
.album-cell > b { font-size: 22px; line-height: 1; }
.album-cell .hint { position: static; background: none; color: #8A8D96; font-size: 10px; font-weight: 500; text-align: center; white-space: normal; line-height: 1.3; padding: 0 2px; }
.album-cell.found { background: #F4F5F7; border: 0; padding: 5px 5px 0; border-radius: 6px; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); align-items: stretch; gap: 0; }
.album-cell.found:nth-child(3n+1) { transform: rotate(-1.5deg); }
.album-cell.found:nth-child(3n+2) { transform: rotate(1deg); }
.album-cell.found:nth-child(3n) { transform: rotate(-.6deg); }
.album-cell .pic { position: static; display: block; aspect-ratio: 13 / 10; overflow: hidden; border-radius: 3px; background: none; padding: 0; }
.album-cell .pic svg { width: 100%; height: 100%; display: block; }
.album-cell .cap { position: static; background: none; color: #1B1A1F; font-size: 10px; font-weight: 700; padding: 4px 1px 6px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.album-cell .cap small { color: #6B6E78; font-weight: 500; opacity: 1; font-size: 9.5px; }
.album-cell.dip { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 10px; background: #F7F1E3; border: 2px solid #E8B84A; border-radius: 8px; padding: 6px 12px; transform: none; }
.album-cell.dip .pic { width: 34px; aspect-ratio: 16 / 34; flex: none; }
.album-cell.dip .cap { font-size: 12px; color: #2B2418; padding: 0; white-space: normal; }
.album-cell.dip.off { background: none; border: 1.5px dashed #4A4D57; padding: 12px; }
.album-cell.dip.off .cap { color: #8A8D96; }
.album-cell.dip.off .cap small { color: #6E7180; }

/* (Phase 2) 아래에서 올라오는 시트가 화면보다 길면 안에서 스크롤 (앨범이 위로 잘리고 아래로만 밀리던 문제) */
.sheet-box { max-height: calc(100dvh - env(safe-area-inset-top, 0px) - 16px); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }

/* 다 마치면 수료 도장 자리를 비워 노선도와 겹치지 않게 */
.g-head-route.all .g-route { margin-top: 34px; }
.g-head-route.all .g-hecho { top: 8px; width: 68px; height: 68px; }

/* 결과 화면: "다시 하기 · 목록으로"를 한 줄에 */
.g-links { display: flex; justify-content: center; align-items: center; gap: 22px; margin-top: 14px; flex-wrap: wrap; }
.g-links .g-again, .g-links .g-back { margin: 0; }

/* (Phase 2) 스크롤 막대가 어두운 화면에서 하얗게 튀지 않게 — 얇고 어두운 색 (PC 크롬·엣지·파이어폭스) */
html, .sheet-box, .game { scrollbar-width: thin; scrollbar-color: #3A3D45 transparent; }
.sheet-box::-webkit-scrollbar, .game::-webkit-scrollbar, html::-webkit-scrollbar { width: 8px; height: 8px; }
.sheet-box::-webkit-scrollbar-track, .game::-webkit-scrollbar-track, html::-webkit-scrollbar-track { background: transparent; }
.sheet-box::-webkit-scrollbar-thumb, .game::-webkit-scrollbar-thumb, html::-webkit-scrollbar-thumb { background: #3A3D45; border-radius: 4px; }
.sheet-box::-webkit-scrollbar-thumb:hover, .game::-webkit-scrollbar-thumb:hover, html::-webkit-scrollbar-thumb:hover { background: #4A4D57; }
.sheet-box::-webkit-scrollbar-button, .game::-webkit-scrollbar-button, html::-webkit-scrollbar-button { display: none; height: 0; }
/* 휴대폰·태블릿(손가락 화면)에선 스크롤 막대를 아예 숨김 — 안드로이드 크롬은 막대 색 지정을 무시하고 밝은 회색으로 그려서 */
@media (pointer: coarse) {
  html, body, .sheet-box, .game, .seat-scroll { scrollbar-width: none; }
  html::-webkit-scrollbar, body::-webkit-scrollbar, .sheet-box::-webkit-scrollbar, .game::-webkit-scrollbar { display: none; width: 0; height: 0; }
}

/* (Phase 2) 휴대폰(터치)에서는 스크롤할 때 잠깐 뜨는 밝은 회색 막대를 아예 숨김 — 안드로이드 크롬·토스 앱 웹뷰는 막대 색을 바꿀 수 없어서 */
@media (pointer: coarse) {
  * { scrollbar-width: none; }
  *::-webkit-scrollbar { display: none; width: 0; height: 0; }
}

/* (Phase 2) 휴대폰(손가락으로 스크롤하는 기기): 스크롤 막대를 아예 숨김 — 안드로이드 크롬은 스크롤할 때 밝은 회색 막대를 잠깐 띄움
   (PC는 위의 얇고 어두운 막대 그대로) */
@media (pointer: coarse) {
  html, body, .sheet-box, .game, .board-scroll { scrollbar-width: none; }
  html::-webkit-scrollbar, body::-webkit-scrollbar, .sheet-box::-webkit-scrollbar, .game::-webkit-scrollbar { display: none; width: 0; height: 0; }
}
/* 삼성 인터넷 등 예전 크로미엄 기반 브라우저: scrollbar-width를 모르면 ::-webkit-scrollbar로 숨김 — 모든 칸에 */
@media (pointer: coarse) {
  @supports not (scrollbar-width: none) {
    *::-webkit-scrollbar { display: none !important; width: 0 !important; height: 0 !important; background: transparent !important; }
  }
  * { scrollbar-width: none; }
}

/* (Phase 2) 정류장 이벤트: 가게 안 + 직원 얼굴 대화 창 */
.shop-box { padding: 0 0 calc(14px + env(safe-area-inset-bottom, 0px)); gap: 10px; overflow-x: hidden; }
.shop-scene { position: relative; aspect-ratio: 150 / 95; max-height: 46dvh; overflow: hidden; border-radius: 12px 12px 0 0; background: #000; }
.shop-art svg { display: block; width: 100%; height: 100%; }
.shop-hd { position: absolute; left: 10px; right: 10px; top: 10px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.shop-hd b, .shop-hd span { background: rgba(0, 0, 0, .58); color: #F1F2F4; border-radius: 999px; padding: 4px 10px; font-size: 12px; }
.shop-say { position: absolute; left: 50%; right: 10px; top: 42px; background: #F4F5F7; color: #1B1A1F; border-radius: 14px 14px 14px 4px; padding: 9px 11px; box-shadow: 0 2px 8px rgba(0,0,0,.25); animation: rise .3s ease-out; }
.shop-say b { display: block; font: 700 15px/1.35 var(--latin), 'Noto Sans KR', sans-serif; }
.shop-say small { display: block; margin-top: 3px; font-size: 12px; color: #4A4C55; line-height: 1.4; }
.shop-me { align-self: flex-end; max-width: 82%; margin: 0 16px; background: #3A2E1C; color: #F1F2F4; border-radius: 14px 4px 14px 14px; padding: 8px 11px; }
.shop-me b { display: block; font: 600 14px var(--latin), 'Noto Sans KR', sans-serif; }
.shop-me small { display: block; color: #C9B48E; font-size: 12px; margin-top: 2px; }
.shop-again { align-self: flex-start; margin: 0 16px; background: none; border: 0; color: var(--amber); font: 600 13px 'Noto Sans KR', sans-serif; cursor: pointer; padding: 2px 0; }
.shop-choices { display: flex; flex-direction: column; gap: 8px; padding: 0 16px; }
.shop-choices button { text-align: left; border: 1.5px solid var(--amber); background: none; color: var(--text); border-radius: 12px; padding: 10px 12px; cursor: pointer; font-family: 'Noto Sans KR', sans-serif; }
.shop-choices button b { display: block; font: 600 15px var(--latin), 'Noto Sans KR', sans-serif; }
.shop-choices button small { display: block; color: var(--dim); font-size: 12px; margin-top: 2px; }
.shop-choices button:disabled { opacity: .45; cursor: default; }
#shopClose { margin: 0 16px; width: auto; align-self: stretch; box-sizing: border-box; }   /* 너비 100% + 양옆 여백으로 오른쪽이 넘치던 것 고침 */
#shopLeave { align-self: center; }
.shop-chip { border-color: var(--amber) !important; color: var(--amber) !important; }
.rastro-btn { display: block; width: 100%; margin: 10px 0 0; }
.rastro-btn.closed { border-style: dashed; border-color: #4A4D57; color: var(--dim); font-weight: 500; cursor: default; }

/* (Phase 2) 14번 정류장 15초 장면 — 세 미술관, 같은 마드리드 */
.dream { position: fixed; inset: 0; z-index: 70; background: #000; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; overflow: hidden; }
.dream-stage { position: relative; width: 100%; max-width: 720px; aspect-ratio: 320 / 200; max-height: 62dvh; overflow: hidden; }
@media (orientation: portrait) { .dream-stage { aspect-ratio: 320 / 212; max-height: 58dvh; } }   /* 세로 화면에서도 양옆 문이 잘리지 않게 거의 원래 비율 */
.dream-scene { position: absolute; inset: 0; opacity: 0; transform: scale(1.12); filter: blur(6px); transition: opacity 1s ease, filter 1.1s ease; }
.dream-scene svg { display: block; width: 100%; height: 100%; }
.dream-scene.on { opacity: 1; filter: none; animation: dreamZoom 4.6s ease-out forwards; }
.dream-scene.was { opacity: 0; filter: blur(8px); transform: scale(1.18); transition: opacity .9s ease, filter .9s ease, transform .9s ease; }
@keyframes dreamZoom { from { transform: scale(1.12); } to { transform: scale(1); } }
.dream-flash { position: absolute; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(circle at 50% 50%, #FFF4D0, rgba(255, 244, 208, 0) 70%); }
.dream-flash.go { animation: dreamFlash .9s ease-out; }
@keyframes dreamFlash { 0% { opacity: 0; } 25% { opacity: .85; } 100% { opacity: 0; } }
/* 장면별 작은 움직임 */
.ds1.on .d-door { animation: dreamGlow 1.6s ease-in-out infinite alternate; transform-origin: center; transform-box: fill-box; }
.ds1.on .d2 { animation-delay: .3s; } .ds1.on .d3 { animation-delay: .6s; }
@keyframes dreamGlow { from { opacity: .75; } to { opacity: 1; } }
.ds2.on .d-candle rect { animation: dreamFlicker .35s steps(2) infinite alternate; }
.ds2.on .d-candle rect:nth-child(2n) { animation-duration: .5s; }
@keyframes dreamFlicker { from { opacity: .55; } to { opacity: 1; } }
.d-cloud { animation: dreamDrift 9s linear infinite alternate; }
@keyframes dreamDrift { from { transform: translateX(-8px); } to { transform: translateX(10px); } }
.ds3.on .d-dabs { animation: dreamSway 2.4s ease-in-out infinite alternate; transform-origin: center; }
@keyframes dreamSway { from { transform: translate(-2px, 1px) rotate(-.4deg); } to { transform: translate(2px, -1px) rotate(.4deg); } }
.ds4.on .d-blocks > * { animation: dreamSnap .5s cubic-bezier(.2, 1.4, .5, 1) both; }
.ds4.on .d-blocks > *:nth-child(1) { animation-delay: .15s; } .ds4.on .d-blocks > *:nth-child(2) { animation-delay: .3s; } .ds4.on .d-blocks > *:nth-child(3) { animation-delay: .45s; }
.ds4.on .d-blocks > *:nth-child(4) { animation-delay: .6s; } .ds4.on .d-blocks > *:nth-child(5) { animation-delay: .75s; } .ds4.on .d-blocks > *:nth-child(6) { animation-delay: .9s; }
@keyframes dreamSnap { from { transform: translateY(60px); opacity: 0; } to { transform: none; opacity: 1; } }
.ds4.on .d-sun { animation: dreamRise 1.2s ease-out both; }
@keyframes dreamRise { from { transform: translateY(40px); } to { transform: none; } }
.ds5.on .d-map { animation: dreamGlow 1s ease-in-out infinite alternate; }
.dream-cap { width: 100%; max-width: 720px; min-height: 86px; padding: 16px 20px 0; text-align: center; color: #F1F2F4; opacity: 0; }
.dream-cap.in { animation: rise .5s ease-out forwards; }
.dream-cap b { display: block; font: 600 20px/1.35 Georgia, 'Times New Roman', serif; font-style: italic; }
.dream-cap small { display: block; margin-top: 6px; font-size: 14px; color: #B9BCC4; }
.dream-skip { position: absolute; left: 0; right: 0; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); text-align: center; font-size: 12px; color: #6E7180; }
@media (prefers-reduced-motion: reduce) { .dream-scene.on, .dream-scene .d-cloud, .ds3.on .d-dabs, .ds4.on .d-blocks > *, .ds4.on .d-sun { animation: none; } .dream-scene { transition: opacity .3s; filter: none; transform: none; } }

/* 15초 장면 끝: 천천히 어두워지며 닫힘 */
.dream .dream-stage, .dream .dream-cap, .dream .dream-skip { transition: opacity 2.2s ease; }
.dream.out .dream-stage, .dream.out .dream-cap, .dream.out .dream-skip { opacity: 0; }
.dream { transition: opacity .7s ease; }
.dream.gone { opacity: 0; }

/* 벼룩시장 대화: 다른 가게처럼 아래에서 반쯤 올라오고, 뒤 배경은 벼룩시장 거리 그림 (버스 도착 장면이 비치지 않게) */
.sheet.solid { background: var(--bg); }
.shop-back { position: absolute; inset: 0; max-width: 480px; margin: 0 auto; overflow: hidden; }
.shop-back svg { display: block; width: 100%; height: 100%; }
.shop-back::after { content: ""; position: absolute; inset: 0; background: rgba(8, 9, 12, .28); }
#shopSheet .sheet-box { position: relative; }

/* 내린 화면: "듣기" 옆에 "유럽의 문 구경하기"(종점) */
.alight-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.alight-acts .btn-outline { width: auto; margin: 0; }

/* (Phase 2) 정류장 화면 다시: ① 쉼터 ② 옆모습 버스가 들어와 문이 열림 ③ 버스 안(계기판·운전대·칸막이·손잡이 봉·계단) */
.stop-shelter { position: absolute; right: 2%; bottom: 0; width: min(78%, 360px); pointer-events: none; transition: opacity .4s ease; }
.stop-shelter svg { display: block; width: 100%; height: auto; }
#stop[data-stage="arrive"] .stop-shelter { opacity: .25; }
.bus-front { left: 50%; width: min(92%, 420px); bottom: 6px; transform: translateX(-180%); transition: transform 1.4s cubic-bezier(.15,.75,.25,1); margin-left: calc(min(92%, 420px) / -2); }
#stop[data-stage="arrive"] .bus-front { transform: none; }
.bus-front .door-l, .bus-front .door-r { transition: transform .55s ease-out; }
.bus-front.open .door-l { transform: translateX(-23px); }
.bus-front.open .door-r { transform: translateX(23px); }
#boardBusBtn { margin-top: 4px; }
#boardBusBtn:disabled { opacity: .45; }
@media (prefers-reduced-motion: reduce) { .bus-front .door-l, .bus-front .door-r { transition: none; } }

/* 첫 탑승 안내 쪽지 */
.tip-stop { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; padding: 10px 12px; border-radius: 12px; background: #2B2418; border: 1.5px solid var(--amber); color: var(--text); animation: rise .4s ease-out; }
.tip-stop p { margin: 0; flex: 1; font-size: 13px; line-height: 1.5; }
.tip-stop p b { color: var(--amber); }
.tip-stop button { flex: none; border: 0; border-radius: 8px; padding: 7px 10px; background: var(--amber); color: #16181D; font: 700 12px 'Noto Sans KR', sans-serif; cursor: pointer; }

/* 첫 탑승 안내 중엔 게임 버튼이 살짝 반짝 */
#gameBtn.hint { animation: gameHint 1.1s ease-in-out infinite alternate; }
@keyframes gameHint { from { box-shadow: 0 0 0 0 rgba(242, 163, 58, .0); } to { box-shadow: 0 0 0 5px rgba(242, 163, 58, .45); } }
@media (prefers-reduced-motion: reduce) { #gameBtn.hint { animation: none; outline: 2px solid var(--amber); } }

/* (Phase 2 v112) 버스 안 두 컷: ① 승차권 찍기 — 단말기만 크게 ② 초록불 뒤 — 기사님 정면(운전대·계기판) */
#stop[data-stage="tap"] .cabin-window { height: 34%; }
#stop[data-stage="tap"] .cabin-wall { top: 34%; }
#stop[data-stage="tap"] .driver, #stop[data-stage="tap"] .cab-wheel, #stop[data-stage="tap"] .cab-dash, #stop[data-stage="tap"] .cab-ok { display: none; }
#stop[data-stage="tap"] .validator { left: 50%; right: auto; top: calc(34% + 34px); bottom: auto; width: 168px; height: 196px; margin-left: -84px; padding-top: 24px; gap: 16px; }
#stop[data-stage="tap"] .validator span { width: 132px; height: 72px; font-size: 13px; }
#stop[data-stage="tap"] .validator i { width: 96px; height: 10px; }
.cab-pole { position: absolute; top: calc(34% + 14px); bottom: 0; left: 14%; width: 8px; background: #F2C14E; border-radius: 3px; }
#stop[data-stage="ticket"] .cabin-window { height: 62%; }
#stop[data-stage="ticket"] .cabin-wall { top: 62%; }
#stop[data-stage="ticket"] .validator, #stop[data-stage="ticket"] .ticket, #stop[data-stage="ticket"] .cab-pole { display: none; }
#stop[data-stage="ticket"] .cabin { animation: cabSwap .45s ease-out both; }
@keyframes cabSwap { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }
#stop[data-stage="ticket"] .driver { left: 50%; top: auto; bottom: 64px; width: min(56%, 230px); height: auto; aspect-ratio: 32 / 36; margin-left: calc(min(56%, 230px) / -2); }
.driver svg { display: block; width: 100%; height: 100%; }
.driver .wave { transform-origin: 28px 26px; transform-box: view-box; }
#stop[data-stage="ticket"] .driver .wave { animation: dWave .5s ease-in-out 3 alternate; }
@keyframes dWave { from { transform: rotate(-14deg); } to { transform: rotate(14deg); } }
.cab-wheel { display: none; position: absolute; left: 50%; bottom: 18px; width: 120px; height: 120px; margin-left: -60px; border: 11px solid #1B1A1F; border-radius: 50%; box-sizing: border-box; clip-path: inset(0 0 46% 0); }
.cab-dash { display: none; position: absolute; left: 0; right: 0; bottom: 0; height: 44px; background: #2B2418; align-items: center; gap: 10px; padding: 0 16px; box-sizing: border-box; }
.cab-dash i { width: 34px; height: 12px; background: rgba(242, 163, 58, .8); border-radius: 2px; }
.cab-dash i + i { width: 18px; background: rgba(139, 209, 142, .8); }
.cab-dash b { flex: 1; height: 8px; background: #4A4D57; border-radius: 2px; }
#stop[data-stage="ticket"] .cab-wheel { display: block; }
#stop[data-stage="ticket"] .cab-dash { display: flex; }
.cab-ok { position: absolute; right: 14px; top: 14px; padding: 6px 12px 6px 10px; border-radius: 999px; background: #7CE08A; color: #0E2A14; font: 800 13px/1 var(--latin, 'Inter', Arial), 'Noto Sans KR', sans-serif; letter-spacing: .04em; box-shadow: 0 2px 6px rgba(0,0,0,.25); -webkit-font-smoothing: antialiased; }   /* 또렷한 글씨로 (도트 글꼴은 작게 쓰면 뭉개짐) */
@media (prefers-reduced-motion: reduce) { #stop[data-stage="ticket"] .cabin, #stop[data-stage="ticket"] .driver .wave { animation: none; } }

/* (Phase 2) 통로의 신문 아저씨 + 펼친 신문 HOY (그림 없이 글자 목록) */
.seatmap { position: relative; }
.news-vendor { position: absolute; left: 50%; width: 46px; margin-left: -23px; background: none; border: 0; padding: 0; cursor: pointer; z-index: 2; display: flex; flex-direction: column; align-items: center; }
.aisle-tuna { position: absolute; left: 50%; width: 44px; margin-left: -22px; background: none; border: 0; padding: 0; cursor: pointer; z-index: 3; line-height: 0; }
.aisle-tuna .at-art svg { display: block; margin: 0 auto; }
.aisle-tuna .flip { transform: scaleX(-1); }
.aisle-tuna.sit::after { content: '¡Miau!'; position: absolute; left: 50%; bottom: 100%; transform: translateX(-50%); white-space: nowrap; background: #FFF7E6; color: #2B2118; border-radius: 8px; padding: 1px 6px; font: 700 10px var(--latin, Arial), sans-serif; line-height: 1.5; margin-bottom: 2px; opacity: 0; animation: atBub 4s ease-in-out 1s infinite; }
@keyframes atBub { 0%, 60%, 100% { opacity: 0; } 70%, 90% { opacity: 1; } }
.news-vendor .nv-art { display: block; width: 40px; filter: drop-shadow(0 2px 0 rgba(0,0,0,.35)); }
.news-vendor .nv-art svg { display: block; width: 100%; height: auto; }
.news-vendor .nv-bub { white-space: nowrap; background: #F4F5F7; color: #1B1A1F; border-radius: 8px; padding: 2px 6px; font: 700 10px var(--latin, Arial), sans-serif; margin-bottom: 3px; position: relative; }
.news-vendor .nv-bub::after { content: ""; position: absolute; left: 50%; bottom: -4px; margin-left: -4px; border: 4px solid transparent; border-bottom: 0; border-top-color: #F4F5F7; }
.news-vendor.new .nv-bub { animation: nvPulse 1.2s ease-in-out infinite alternate; }
@keyframes nvPulse { from { box-shadow: 0 0 0 0 rgba(242,163,58,0); } to { box-shadow: 0 0 0 4px rgba(242,163,58,.55); } }
.news-sheet { align-items: center; background: rgba(8, 9, 12, .78); }
.news-wrap { width: min(92vw, 360px); display: flex; flex-direction: column; align-items: stretch; animation: rise .35s ease-out; }
.paper { background: #ECE7DC; color: #141414; padding: 12px 14px 9px; font-family: Georgia, 'Times New Roman', serif; transform: rotate(-1.4deg); position: relative; box-shadow: 0 14px 26px rgba(0,0,0,.6); border-bottom: 6px solid #D6D0C2; border-right: 2px solid #DCD6C8; }
.paper::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 12px; margin-top: -6px; background: linear-gradient(rgba(0,0,0,0), rgba(0,0,0,.07), rgba(255,255,255,.35), rgba(0,0,0,0)); pointer-events: none; }
.pp-mh { display: flex; align-items: stretch; gap: 8px; border-bottom: 3px solid #141414; padding-bottom: 6px; }
.pp-lg { background: #D22B2B; color: #fff; font: 900 28px/1 'Arial Black', Arial, sans-serif; padding: 5px 8px; letter-spacing: -1px; }
.pp-dt { flex: 1; font: 600 10px/1.35 Arial, sans-serif; align-self: flex-end; text-transform: uppercase; color: #333; }
.pp-it { display: flex; gap: 10px; align-items: baseline; width: 100%; text-align: left; background: none; border: 0; border-top: 1px solid #141414; padding: 11px 4px; color: inherit; cursor: pointer; }
.pp-it:first-child { border-top: 0; }
.pp-it .n { flex: none; width: 18px; font: 900 18px 'Arial Black', Arial, sans-serif; color: #D22B2B; }
.pp-it .k { display: block; font: 700 9px Arial, sans-serif; letter-spacing: .1em; color: #D22B2B; text-transform: uppercase; }
.pp-it h4 { margin: 2px 0 0; font: 800 17px/1.18 Georgia, serif; }
.pp-it.lead h4 { font-size: 21px; line-height: 1.1; }
.pp-it.sel { outline: 2px solid #F2A33A; outline-offset: 1px; background: rgba(242,163,58,.12); }
.pp-ft { display: flex; justify-content: space-between; border-top: 3px solid #141414; padding-top: 4px; font: 600 9px Arial, sans-serif; color: #555; }
.pp-note { position: relative; align-self: flex-end; margin: -14px 6px 0 0; width: 72%; background: #FBE79A; color: #2B2418; padding: 11px 12px 9px; font: 500 14px/1.5 'Noto Sans KR', sans-serif; transform: rotate(2.5deg); box-shadow: 0 6px 12px rgba(0,0,0,.45); transition: transform .25s ease, margin .25s ease; }
.pp-note.left { align-self: flex-start; margin: -14px 0 0 6px; transform: rotate(-2deg); }
.pp-note::before { content: ""; position: absolute; left: 50%; top: -8px; width: 42px; height: 14px; margin-left: -21px; background: rgba(255,255,255,.55); transform: rotate(-4deg); }
.pp-acts { display: flex; gap: 12px; align-items: center; margin-top: 6px; }
.pp-acts button { border: 0; border-radius: 999px; padding: 3px 10px; background: #F2A33A; color: #16181D; font: 700 12px 'Noto Sans KR', sans-serif; cursor: pointer; }
.pp-acts a { color: #8A5A12; font: 700 12px 'Noto Sans KR', sans-serif; text-decoration: none; }
#newsClose { align-self: center; margin-top: 16px; color: #B9BCC4; }
@media (prefers-reduced-motion: reduce) { .news-vendor.new .nv-bub, .news-wrap { animation: none; } }
.pp-it.aviso .k { color: #E07A10; }
.pp-it.aviso .k::before { content: "⚠ "; }
.pp-art { flex: none; width: 54px; height: 43px; align-self: flex-end; margin-bottom: -3px; }
.pp-art svg { display: block; width: 100%; height: 100%; }

/* (Phase 2) 창이 길 때만(.window.tall — 높이가 너비의 0.9배 이상, 아이패드 등): 위쪽 하늘을 높은 구름·새 떼·노을 띠로 조금 채움 */
.high-sky { position: absolute; left: 0; right: 0; top: 0; height: 46%; pointer-events: none; display: none; overflow: hidden; z-index: 0; --hs-cloud: rgba(244, 245, 247, .78); }
.window.tall .high-sky { display: block; }
.hs-cloud { position: absolute; left: 0; height: 12px; background:
  linear-gradient(var(--hs-cloud), var(--hs-cloud)) 25% 0 / 34% 34% no-repeat,
  linear-gradient(var(--hs-cloud), var(--hs-cloud)) 12% 50% / 76% 34% no-repeat,
  linear-gradient(var(--hs-cloud), var(--hs-cloud)) 0 100% / 100% 34% no-repeat; image-rendering: pixelated; animation: hsDrift linear infinite; }
.hs-cloud.c1 { top: 10%; width: 190px; height: 18px; animation-duration: 150s; animation-delay: -40s; }
.hs-cloud.c2 { top: 27%; width: 110px; height: 12px; opacity: .85; animation-duration: 200s; animation-delay: -150s; }
.hs-cloud.c3 { top: 46%; width: 230px; height: 20px; opacity: .7; animation-duration: 260s; animation-delay: -70s; }
.hs-cloud.c4 { top: 18%; width: 140px; height: 14px; opacity: .75; animation-duration: 175s; animation-delay: -110s; }
.hs-cloud.c5 { top: 62%; width: 160px; height: 14px; opacity: .55; animation-duration: 300s; animation-delay: -220s; }
@keyframes hsDrift { from { transform: translateX(-180px); } to { transform: translateX(calc(100vw + 40px)); } }
.hs-birds { position: absolute; top: 22%; left: 0; width: 70px; height: 24px; animation: hsBirds 32s linear infinite; animation-delay: -4s; opacity: .7; }
.hs-birds i { position: absolute; width: 8px; height: 3px; border-top: 2px solid #2B2E35; border-radius: 50% 50% 0 0; }
.hs-birds i::after { content: ""; position: absolute; left: 7px; top: -2px; width: 8px; height: 3px; border-top: 2px solid #2B2E35; border-radius: 50% 50% 0 0; }
.hs-birds i:nth-child(1) { left: 0; top: 10px; } .hs-birds i:nth-child(2) { left: 14px; top: 4px; } .hs-birds i:nth-child(3) { left: 28px; top: 12px; } .hs-birds i:nth-child(4) { left: 44px; top: 6px; } .hs-birds i:nth-child(5) { left: 56px; top: 16px; }
.hs-birds i { animation: hsFlap .6s steps(2) infinite alternate; } .hs-birds i:nth-child(2n) { animation-delay: .3s; }
@keyframes hsFlap { from { transform: scaleY(1); } to { transform: scaleY(.4) translateY(2px); } }
@keyframes hsBirds { 0% { transform: translate(-90px, 12px); } 45% { transform: translate(calc(100vw + 20px), -6px); } 100% { transform: translate(calc(100vw + 20px), -6px); } }
.hs-dusk { position: absolute; inset: 0; opacity: 0; background: linear-gradient(to bottom, rgba(242, 140, 90, 0) 20%, rgba(242, 150, 100, .28) 70%, rgba(247, 190, 120, .38)); transition: opacity 2s ease; }
.window[data-sky="dusk"] .hs-dusk, .window[data-sky="dawn"] .hs-dusk { opacity: 1; }
/* 날씨·시간대에 맞춤: 흐림·비·폭풍·눈은 회색 구름·새 없음, 밤은 어두운 구름·새 없음, 노을엔 분홍빛 구름 */
html[data-wx="cloudy"] .high-sky, html[data-wx="snow"] .high-sky { --hs-cloud: rgba(200, 203, 210, .7); }
html[data-wx="rain"] .high-sky, html[data-wx="storm"] .high-sky { --hs-cloud: rgba(150, 156, 166, .6); }
html[data-wx="rain"] .hs-birds, html[data-wx="storm"] .hs-birds, html[data-wx="snow"] .hs-birds, html[data-wx="fog"] .high-sky, .window[data-sky="night"] .hs-birds { display: none; }
.window[data-sky="night"] .high-sky { --hs-cloud: rgba(70, 76, 96, .55); }
.window[data-sky="dusk"] .high-sky, .window[data-sky="dawn"] .high-sky { --hs-cloud: rgba(247, 196, 176, .7); }
@media (prefers-reduced-motion: reduce) { .hs-cloud, .hs-birds, .hs-birds i { animation: none; } .hs-birds { display: none; } .hs-cloud.c1 { transform: translateX(20vw); } .hs-cloud.c2 { transform: translateX(55vw); } .hs-cloud.c3 { transform: translateX(8vw); } }

/* (Phase 2) 실제 사진 창: 콜론 광장 조각 Julia 안내 */
.real-extra { margin-top: 4px; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px; background: rgba(0,0,0,.18); text-align: left; }
.rx-hd { font-size: 11px; letter-spacing: .12em; color: var(--dim); text-transform: uppercase; }
.rx-hd b { color: var(--amber); letter-spacing: .06em; }
.rx-es { display: flex; gap: 10px; align-items: flex-start; margin-top: 8px; }
.rx-es p { margin: 0; flex: 1; font: 700 15px/1.35 var(--latin), sans-serif; }
.rx-es button { flex: none; width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--amber); color: #16181D; font-size: 12px; cursor: pointer; }
.rx-ko { margin: 4px 0 0; font-size: 13px; color: #B9BCC4; }
.rx-meta { margin: 8px 0 0; font-size: 12px; color: var(--dim); line-height: 1.5; }
.rx-link { display: inline-block; margin-top: 6px; color: var(--amber); font-size: 13px; font-weight: 700; text-decoration: none; }

/* (Phase 3) 크리스마스 시즌: 추운 날 옅은 김 + 창에 찍는 도장 도구 */
.fog.soft { opacity: .3; }
.fog-tools { position: absolute; left: 8px; bottom: 8px; z-index: 6; display: flex; gap: 4px; background: rgba(22, 24, 29, .55); border-radius: 999px; padding: 4px; }
.fog-tools button { width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; font-size: 15px; line-height: 1; cursor: pointer; }
.fog-tools button.on { background: #F2A33A; color: #16181D; }

/* (Phase 3) 오늘의 창밖 카드 버튼 — 창 오른쪽 위 */
.win-snap { position: absolute; right: 10px; top: 10px; z-index: 6; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(22, 24, 29, .55); color: #fff; font-size: 17px; line-height: 1; cursor: pointer; }
.win-snap:active { transform: scale(.94); }
.pp-it.navidad .k { color: #2F7A3E; }
.pp-it.navidad .k::before { content: "🎄 "; }

/* (Phase 3) 와인 수업 La Bodega del 27 — 어두운 나무·와인색, 도트 가게 주인, 분필 표시 */
.board-title-row .wine-chip { margin-left: 6px; }
.wine-chip { border-color: #B5525A; color: #F0A3A8; }
.wine { position: fixed; inset: 0; z-index: 60; background: #1A1512; color: #F1EDE6; overflow-y: auto; padding: calc(10px + env(safe-area-inset-top, 0px)) 14px calc(24px + env(safe-area-inset-bottom, 0px)); font-family: 'Noto Sans KR', sans-serif; }
.wine > * { max-width: 460px; margin-left: auto; margin-right: auto; }
.wn-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.wn-top b { font: 800 18px Georgia, serif; } .wn-top small { color: #C9B79C; font-size: 12px; flex: 1; text-align: center; }
.wn-x, .wn-back { background: none; border: 0; color: #C9B79C; font-size: 15px; cursor: pointer; padding: 6px; }
.wn-av { flex: none; width: 64px; height: 64px; image-rendering: pixelated; }
.wn-av svg { width: 100%; height: 100%; display: block; }
.wn-pilar, .wn-talk { display: flex; gap: 10px; align-items: flex-start; }
.wn-board { flex: 1; background: #1F3A2E; border: 5px solid #6B4E3A; border-radius: 4px; padding: 8px 10px; font-family: 'Gaegu', 'Nanum Pen Script', 'Noto Sans KR', cursive; box-shadow: inset 0 0 18px rgba(0,0,0,.35); }
.wn-board small { color: #A9C2B0; font-size: 12px; } .wn-board b { display: block; font-size: 17px; margin: 2px 0; color: #F2D36B; } .wn-board p { margin: 0; font-size: 15px; line-height: 1.35; color: #EDEBE3; }
.wn-today { display: flex; align-items: center; justify-content: space-between; width: 100%; margin: 12px auto; background: #7A1F2B; color: #F1EDE6; border: 0; border-radius: 12px; padding: 12px 14px; text-align: left; cursor: pointer; }
.wn-today b { font-size: 15px; } .wn-today small { display: block; color: #F0C9CC; font-size: 12px; margin-top: 2px; } .wn-today i { font-style: normal; font-size: 22px; }
.wn-today small em { display: block; font-style: normal; color: #F6DDE0; }   /* (p3-45) "먼저 1챕터부터"는 다음 줄에 */
.wn-cap { font-size: 12px; color: #C9B79C; margin: 4px auto 6px; }
.shelf { display: block; width: 100%; text-align: left; background: #2A211B; border: 0; border-radius: 8px; padding: 8px 10px 0; margin: 0 auto 8px; color: inherit; cursor: pointer; }
.shelf.lock { opacity: .45; cursor: default; }
.sh-nm { display: flex; justify-content: space-between; font-size: 13px; } .sh-nm em { font-style: normal; color: #C9B79C; font-size: 12px; }
.sh-row { display: flex; gap: 6px; align-items: flex-end; height: 44px; margin-top: 4px; border-bottom: 6px solid #5A3E2E; margin-left: -10px; margin-right: -10px; padding: 0 10px; }
.wb { width: 21px; height: 42px; } .wb svg { width: 100%; height: 100%; display: block; }
.wb.empty { border: 1.5px dashed #5A4A3E; border-radius: 4px 4px 0 0; height: 30px; }
.wn-note { font-size: 11px; color: #8A7A66; margin-top: 12px; }
.wn-bub { flex: 1; background: #FFF8E8; color: #2B2418; border-radius: 12px; padding: 9px 11px; position: relative; min-height: 46px; }
.wn-bub::before { content: ""; position: absolute; left: -8px; top: 20px; border: 8px solid transparent; border-left: 0; border-right-color: #FFF8E8; }
.wn-bub b { display: block; font: 800 15px Georgia, serif; color: #7A1F2B; } .wn-bub span { font-size: 13px; }
.wn-stage { position: relative; margin: 14px auto 0; padding: 14px 40px; background: radial-gradient(ellipse at center, #3A2A20, #1A1512 70%); border-radius: 12px; }
.wl { background: #EFE7D6; color: #2B2418; text-align: center; font-family: Georgia, serif; padding: 14px 10px; border-radius: 3px; box-shadow: 4px 5px 0 rgba(0,0,0,.4); position: relative; }
.wl.wl-blanco, .wl.wl-cava { background: #F7F1E3; }
.wl > div { padding: 2px 4px; border-radius: 3px; transition: background .2s; }
.wl > div.lit { background: rgba(242, 211, 107, .45); }
.wl-maker { font-weight: 700; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.wl-big { font-weight: 900; font-size: 26px; color: #7A1F2B; margin: 4px 0; letter-spacing: .02em; }
.wl-region { font-size: 14px; letter-spacing: .16em; text-transform: uppercase; }
.wl-do { font: 10px Arial, sans-serif; color: #5A4A3E; margin-top: 2px; }
.wl-year { font: 700 15px Arial, sans-serif; margin-top: 6px; }
.wl-extra { font: italic 700 13px Georgia, serif; color: #2F5A3E; margin-top: 2px; }
.wl-bottled { font: 10px Arial, sans-serif; color: #5A4A3E; margin-top: 4px; }
.wl-abv { font: 10px Arial, sans-serif; color: #5A4A3E; margin-top: 4px; }
.wl.sm { padding: 6px 3px; box-shadow: 2px 2px 0 rgba(0,0,0,.4); } .wl.sm > div { font-size: 9px !important; letter-spacing: .02em; margin: 0; padding: 0; } .wl.sm .wl-big { font-size: 11px !important; } .wl.sm .wl-maker { display: none; }
.wn-chalk { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.ch-ring, .ch-arrow { fill: none; stroke: #F4F1EA; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 600; stroke-dashoffset: 600; animation: chDraw .6s ease-out forwards; filter: drop-shadow(0 0 1px rgba(0,0,0,.6)); }
@keyframes chDraw { to { stroke-dashoffset: 0; } }
.ch-num { fill: #F2A33A; } .ch-numt { fill: #1A1512; font: 900 12px Arial; text-anchor: middle; }
.wn-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px auto 0; }
.wn-chip { border: 2px solid #6B4E3A; background: #2A211B; color: #E8D6B8; border-radius: 6px; padding: 6px 11px; font: 700 13px 'Noto Sans KR', sans-serif; cursor: pointer; }
.wn-chip.seen { border-color: #8A6A4A; } .wn-chip.on { background: #F2A33A; border-color: #F2A33A; color: #1A1512; }
.wn-info { margin: 10px auto 0; background: #F4EDE0; color: #2B2418; border-radius: 10px; padding: 10px 12px; font-size: 13.5px; line-height: 1.55; }
.wn-go { display: block; width: 100%; margin: 12px auto 0; border: 0; border-radius: 12px; padding: 12px; background: #F2A33A; color: #1A1512; font: 800 15px 'Noto Sans KR', sans-serif; cursor: pointer; }
.wn-go:disabled { opacity: .4; cursor: default; }
.wn-anat { list-style: none; padding: 0; margin: 12px auto 0; } .wn-anat li { display: flex; gap: 8px; margin-bottom: 8px; font-size: 13px; line-height: 1.5; }
.wn-anat i { flex: none; width: 22px; height: 22px; border-radius: 50%; background: #F2A33A; color: #1A1512; font: 900 12px Arial; font-style: normal; display: grid; place-items: center; }
.wn-case { background: #2A211B; border-radius: 10px; padding: 10px 12px; font-size: 14px; line-height: 1.55; } .wn-case small { display: block; color: #C9B79C; font-size: 11px; letter-spacing: .08em; }
.wn-shelf { display: flex; gap: 8px; margin: 12px auto 0; }
.wn-pick { flex: 1; background: #2A211B; border: 2px solid transparent; border-radius: 10px; padding: 8px 5px; cursor: pointer; color: inherit; }
.wn-pick.right { border-color: #7CC08A; } .wn-pick.wrong { border-color: #D9534F; animation: wnShake .3s; }
@keyframes wnShake { 30% { transform: translateX(-4px); } 60% { transform: translateX(4px); } }
.wn-pb { display: block; width: 36px; height: 76px; margin: 0 auto 6px; } .wn-pb svg { width: 100%; height: 100%; display: block; }
.wn-res { margin: 12px auto 0; border-radius: 10px; padding: 10px 12px; font-size: 13.5px; line-height: 1.55; position: relative; }
.wn-res.yes { background: #E8F3EA; color: #1F3A26; } .wn-res.no { background: #3A2A20; color: #F0C9CC; }
.wn-stamp { display: inline-block; margin: 8px 0 0; border: 3px solid #A3302A; color: #A3302A; font: 900 15px Georgia, serif; letter-spacing: .12em; padding: 2px 10px; transform: rotate(-8deg); }
@media (prefers-reduced-motion: reduce) { .ch-ring, .ch-arrow { animation: none; stroke-dashoffset: 0; } }

/* (p3-09) 라벨을 병에 붙여 보여 줌 — 네모난 도트 병 */
.wbt { display: flex; flex-direction: column; align-items: center; margin: 0 auto; }
.wbt i { display: block; }
.wbt-cap { width: 30px; height: 16px; background: var(--cap); }
.wbt-neck { width: 30px; height: 40px; background: #2B2E35; box-shadow: inset 6px 0 0 rgba(255,255,255,.06); }
.wbt-sh { width: 96px; height: 24px; background: var(--g1); }
.wbt-body { width: 196px; padding: 30px 12px 46px; background: var(--g1); position: relative; box-sizing: border-box; box-shadow: 6px 8px 0 rgba(0,0,0,.35); }
.wbt-body::before { content: ""; position: absolute; left: 10px; top: 10px; bottom: 12px; width: 8px; background: var(--g2); opacity: .55; }
.wbt-body .wl { position: relative; box-shadow: 2px 3px 0 rgba(0,0,0,.35); padding: 12px 6px; }
.wbt-body .wl-big { font-size: 22px; }
.wbt-body .wl-region { font-size: 12px; } .wbt-body .wl-maker { font-size: 10.5px; }
.wn-stage { padding: 14px 10px 18px; }
.wbt.sm .wbt-cap { width: 10px; height: 6px; } .wbt.sm .wbt-neck { width: 10px; height: 16px; } .wbt.sm .wbt-sh { width: 30px; height: 8px; }
.wbt.sm .wbt-body { width: 62px; padding: 12px 5px 18px; box-shadow: 3px 4px 0 rgba(0,0,0,.35); } .wbt.sm .wbt-body::before { left: 4px; top: 4px; width: 3px; }
.wbt.sm .wl { padding: 5px 2px; }
.wn-pick { padding: 10px 4px 12px; }
/* (p3-09) 진열대 병은 조금 더 크게 */
.wbt.sm .wbt-cap { width: 12px; height: 7px; } .wbt.sm .wbt-neck { width: 12px; height: 20px; } .wbt.sm .wbt-sh { width: 38px; height: 10px; }
.wbt.sm .wbt-body { width: 82px; padding: 14px 6px 24px; }
.wl.sm .wl-big { font-size: 12.5px !important; } .wl.sm > div { font-size: 10px !important; }

/* (p3-10) 와인: 가게 장면(셀러) · 손에 든 병(단계) · 병 모양 다듬기 */
.wn-shop { position: relative; height: 210px; margin: 0 auto 4px; border-radius: 10px; overflow: hidden; background: #4A3324; }
.wn-wall { position: absolute; inset: 0; background:
  linear-gradient(#6B4A32, #6B4A32) 0 64px / 100% 6px no-repeat, linear-gradient(#6B4A32, #6B4A32) 0 126px / 100% 6px no-repeat,
  repeating-linear-gradient(90deg, transparent 0 6px, #2A0F14 6px 13px, transparent 13px 17px, #B7C47A 17px 23px, transparent 23px 28px, #2A0F14 28px 35px, transparent 35px 40px, #E8A2A0 40px 45px, transparent 45px 52px) 0 36px / 100% 28px no-repeat,
  repeating-linear-gradient(90deg, transparent 0 9px, #2A0F14 9px 16px, transparent 16px 22px, #2F4A2E 22px 29px, transparent 29px 36px, #2A0F14 36px 43px, transparent 43px 54px) 0 98px / 100% 28px no-repeat; opacity: .9; }
.wn-shop .wn-board { position: absolute; left: 12px; top: 12px; width: 58%; }
.wn-owner { position: absolute; right: 6px; bottom: 26px; width: 120px; height: 108px; image-rendering: pixelated; }
.wn-owner svg { width: 100%; height: 100%; display: block; }
.wn-counter { position: absolute; left: 0; right: 0; bottom: 0; height: 34px; background: linear-gradient(#8A5E3E 0 6px, #5A3B26 6px); box-shadow: 0 -2px 0 rgba(0,0,0,.3); }
.wn-av.face { width: 58px; height: 34px; margin-top: 6px; }
.wn-stage.hold { overflow: hidden; padding: 18px 10px 26px; background: #1E1611; }
.wn-blur { position: absolute; inset: -10px; background:
  linear-gradient(#6B4A32, #6B4A32) 0 70px / 100% 5px no-repeat, linear-gradient(#6B4A32, #6B4A32) 0 230px / 100% 5px no-repeat,
  repeating-linear-gradient(90deg, transparent 0 14px, #4A1C24 14px 26px, transparent 26px 40px, #5A6B3A 40px 52px, transparent 52px 66px, #7A5A5A 66px 78px, transparent 78px 92px) 0 20px / 100% 50px no-repeat,
  repeating-linear-gradient(90deg, transparent 0 20px, #4A1C24 20px 32px, transparent 32px 50px, #2F4A2E 50px 62px, transparent 62px 80px) 0 180px / 100% 50px no-repeat;
  filter: blur(3px); opacity: .5; }
.wn-stage.hold .wbt { position: relative; transform: rotate(-5deg); transform-origin: 50% 85%; }
.wn-hand { position: absolute; left: calc(50% + 62px); bottom: 34px; width: 96px; height: 70px; image-rendering: pixelated; z-index: 2; transform: rotate(-5deg); }
.wn-hand svg { width: 100%; height: 100%; display: block; }
/* 병 모양: 금박 캡슐 · 경사진 어깨 · 유리의 빛과 그림자 · 테두리 있는 라벨 */
.wbt-cap { height: 22px !important; background: linear-gradient(90deg, rgba(255,255,255,.25) 0 20%, transparent 20% 75%, rgba(0,0,0,.25) 75%), var(--cap) !important; box-shadow: inset 0 -4px 0 #C9A35A; }
.wbt-neck { background: linear-gradient(90deg, #4A4D57 0 22%, #2B2E35 22% 78%, #1B1A1F 78%) !important; }
.wbt-sh { width: 196px !important; height: 34px !important; clip-path: polygon(34% 0, 66% 0, 100% 100%, 0 100%); background: linear-gradient(90deg, var(--g2) 0 10%, var(--g1) 10% 82%, rgba(0,0,0,.45) 82%), var(--g1) !important; }
.wbt-body { background: linear-gradient(90deg, var(--g2) 0 7%, var(--g1) 7% 84%, rgba(0,0,0,.4) 84%), var(--g1) !important; border-radius: 0 0 8px 8px; }
.wbt-body::before { display: none; }
.wbt-body .wl { outline: 1.5px solid #B9A47C; outline-offset: -5px; }
.wbt-body .wl::before { content: "❦"; display: block; color: #9A7A4A; font-size: 12px; line-height: 1; margin-bottom: 4px; }
.wbt.sm .wbt-sh { width: 82px !important; height: 14px !important; } .wbt.sm .wbt-cap { height: 9px !important; box-shadow: inset 0 -2px 0 #C9A35A; }
.wbt.sm .wbt-body .wl::before { font-size: 8px; margin-bottom: 1px; } .wbt.sm .wbt-body .wl { outline-offset: -3px; outline-width: 1px; }
.wbt-body .wl::before { margin-bottom: 7px; } .wbt.sm .wbt-body .wl::before { margin-bottom: 2px; } .wn-av.face { width: 64px; height: 38px; }

/* (p3-11) 정교한 도트 병 — 병 그림(SVG) 위에 라벨 글자를 겹침 */
.wbt2 { position: relative; height: 400px; aspect-ratio: 30 / 64; margin: 0 auto; image-rendering: pixelated; filter: drop-shadow(6px 8px 0 rgba(0,0,0,.35)); }
.wbt2 > svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.wl-on { position: absolute; display: flex; }
.wl-on .wl { flex: 1; background: none !important; box-shadow: none !important; outline: none !important; padding: 6% 4% !important; display: flex; flex-direction: column; justify-content: center; border-radius: 0; }
.wl-on .wl::before { content: "❦"; display: block; color: #9A7A4A; font-size: 11px; line-height: 1; margin-bottom: 4px; }
.wl-on .wl > div { font-size: 10px; }
.wl-on .wl .wl-big { font-size: 19px; margin: 3px 0; } .wl-on .wl .wl-region { font-size: 11px; } .wl-on .wl .wl-maker { font-size: 9.5px; } .wl-on .wl .wl-year { font-size: 13px; }
.wl-on .wl .wl-big { padding: 0 6px; box-sizing: border-box; }   /* (p3-45) 큰 글씨가 라벨 안쪽 테두리선에 닿지 않게 */
.wl-on .wbt2.sm .wl .wl-big, .wbt2.sm .wl-on .wl .wl-big { padding: 0 1px; }   /* 작은 병은 자리가 좁아 여백 최소 */
.wbt2.cava .wl { color: #E8D9A8; } .wbt2.cava .wl .wl-big { color: #E8C878; } .wbt2.cava .wl .wl-extra { color: #E8D9A8; } .wbt2.cava .wl .wl-do, .wbt2.cava .wl .wl-abv { color: #BFB08A; } .wbt2.cava .wl::before { color: #C9A35A; }
.wbt2.c-blanco .wl .wl-big { color: #2F5A3E; }
.wbt2.sm { height: 175px; filter: drop-shadow(3px 4px 0 rgba(0,0,0,.35)); }   /* (p3-45) C안: 진열대 작은 병 150→175px */
.wbt2.sm .wl { padding: 4% 2% !important; } .wbt2.sm .wl::before { display: none; }   /* 작은 병은 맨 위 작은 장식 뺌 */
.wbt2.sm .wl > div { font-size: 9px !important; font-style: normal !important; font-weight: 700; letter-spacing: 0 !important; } .wbt2.sm .wl .wl-big { font-size: 11px !important; }   /* 기울임 빼고 굵게 · 9 / 11px */
.wn-stage.hold .wbt2 { transform: rotate(-5deg); transform-origin: 50% 85%; }
.wn-hand { left: calc(50% + 52px); bottom: 40px; }
@media (max-height: 760px) { .wbt2 { height: 340px; } }

/* (p3-12) 시음 따라 하기 */
.wn-dots { display: flex; gap: 5px; margin: 0 auto 10px; } .wn-dots i { flex: 1; height: 4px; border-radius: 2px; background: #3A2E26; } .wn-dots i.on { background: #F2A33A; }
.wn-cata { text-align: center; margin: 12px auto 0; }
.wn-glassbtn, .wn-swirl { background: none; border: 0; padding: 0; width: 150px; height: 220px; margin: 0 auto; display: block; cursor: pointer; touch-action: none; }
.wn-glass { width: 100%; height: 100%; transition: transform .6s ease; } .wn-glass.tilt { transform: rotate(-38deg); }
.wn-swirl .wine-liq { transform-origin: 20px 20px; transform: rotate(var(--sw, 0deg)) skewX(calc(var(--sw, 0deg) / 30)); }
.wn-swirl.spun { filter: drop-shadow(0 0 10px rgba(242, 163, 58, .6)); }
.wn-hint { color: #C9B79C; font-size: 13px; margin: 8px 0 0; }
.wn-sliders { margin: 12px auto 0; display: grid; gap: 10px; } .wn-sliders label { display: grid; gap: 4px; font-size: 13px; } .wn-sliders i { color: #C9B79C; font-style: normal; font-size: 11px; } .wn-sliders input { width: 100%; accent-color: #F2A33A; }
.wn-note { margin: 4px auto 0; background: #F6EEDC; color: #2E2016; border-radius: 4px; padding: 14px 16px; position: relative; transform: rotate(-.8deg); box-shadow: 0 5px 0 rgba(0,0,0,.35); font-size: 14px; line-height: 1.6; }
.wn-note small { color: #8A6A2E; font-size: 11px; letter-spacing: .06em; } .wn-note b { display: block; font: 900 18px Georgia, serif; color: #7A1F2B; margin: 2px 0 6px; }
.wn-note p { margin: 2px 0; } .wn-note i { font-style: normal; font-weight: 700; display: inline-block; min-width: 46px; color: #5A4A3E; }
.wn-note .wn-stamp { position: absolute; right: 12px; bottom: 10px; }
.win-snap { right: auto; left: 10px; }   /* (p3-12) 랜드마크 사진 버튼(오른쪽)과 겹치지 않게 왼쪽 위로 */

/* (p3-13) 시음 따라 하기 다시 */
.wn-scene { display: block; width: 100%; background: #2A1D16; border: 0; border-radius: 12px; padding: 0 0 8px; margin: 10px auto 0; cursor: pointer; overflow: hidden; color: inherit; }
.wn-scene svg { display: block; width: 100%; height: auto; }
.wn-scene .wn-hint { display: block; margin-top: 2px; }
.wn-strip { display: flex; margin: 10px auto 0; border-radius: 6px; overflow: hidden; }
.wn-strip button { flex: 1; border: 0; color: #fff; padding: 12px 2px 6px; font: 700 12px 'Noto Sans KR', sans-serif; cursor: pointer; }
.wn-strip button small { display: block; font-size: 10px; opacity: .8; font-weight: 400; } .wn-strip button.on { outline: 3px solid #F2C14E; outline-offset: -3px; }
.wn-scale { font-size: 12px; color: #C9B79C; margin: 5px auto 0; }
.wn-swirl { width: 230px; margin: 10px auto 0; touch-action: none; cursor: grab; } .wn-swirl svg { display: block; width: 100%; height: auto; }
.wn-swirl .sw-wave { transform-origin: 98px 100px; transform: rotate(var(--sw, 0deg)); }
.wn-swirl .sw-tears { opacity: 0; transition: opacity 1.2s; } .wn-swirl.spun .sw-tears { opacity: .8; animation: tears 2.4s ease-in infinite; }
@keyframes tears { from { transform: translateY(-4px); } to { transform: translateY(6px); } }
.wn-aroma { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px auto 0; }
.wn-aroma button { background: #3A2A20; border: 2px solid #5A4030; border-radius: 10px; padding: 10px 6px 8px; color: #F1EDE6; cursor: pointer; }
.wn-aroma button.on { border-color: #F2A33A; background: #4A3424; }
.wn-aroma svg { display: block; width: 52px; height: 40px; margin: 0 auto 4px; image-rendering: pixelated; } .wn-aroma b { display: block; font: 800 13px Georgia, serif; } .wn-aroma small { color: #C9B79C; font-size: 11px; }
.chalk-note { display: block; font-family: 'Gaegu', 'Nanum Pen Script', cursive; font-size: 17px; color: #7A5A12; margin-bottom: 2px; }
.wn-meters { display: grid; gap: 10px; margin: 12px auto 0; }
.wn-meter { display: grid; grid-template-columns: 74px 1fr; gap: 2px 8px; align-items: center; font-size: 13px; }
.wn-meter .mt-c { display: flex; gap: 4px; } .wn-meter .mt-c button { flex: 1; height: 26px; border-radius: 5px; border: 1.5px solid #5A4030; background: #3A2A20; cursor: pointer; }
.wn-meter .mt-c button.on { background: #B8262B; border-color: #B8262B; }
.wn-meter .mt-e { grid-column: 2; display: flex; justify-content: space-between; font-size: 11px; color: #C9B79C; } .wn-meter .mt-e i { font-style: normal; }
.wn-hold { display: grid; place-items: center; width: 170px; height: 170px; margin: 18px auto 6px; border-radius: 50%; border: 0; cursor: pointer; touch-action: none;
  background: conic-gradient(#F2A33A calc(var(--p) * 360deg), #3A2A20 0); }
.wn-hold > span { display: grid; place-items: center; width: 138px; height: 138px; border-radius: 50%; background: #2A1D16; color: #F1EDE6; font-size: 14px; }
.wn-hold b { font: 900 40px Georgia, serif; color: #F2C14E; line-height: 1; } .wn-hold small { color: #C9B79C; font-size: 12px; }
.wn-hold.on { box-shadow: 0 0 0 6px rgba(242, 163, 58, .2); }
.wn-ficha { margin: 4px auto 0; background: #F6EEDC; color: #2E2016; border-radius: 3px; padding: 14px 16px 16px; position: relative; transform: rotate(-.8deg); box-shadow: 0 5px 0 rgba(0,0,0,.35); font-size: 13.5px; line-height: 1.7;
  background-image: repeating-linear-gradient(transparent 0 22px, rgba(122, 31, 43, .08) 22px 23px); }
.wn-ficha small { color: #8A6A2E; font-size: 11px; letter-spacing: .04em; } .wn-ficha b { display: block; font: 900 19px Georgia, serif; color: #7A1F2B; margin: 2px 0 6px; }
.wn-ficha p { margin: 0; } .wn-ficha i { font-style: italic; font-weight: 700; display: inline-block; width: 46px; color: #5A4A3E; font-family: Georgia, serif; }
.wn-ficha .sw { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; margin-right: 5px; }
.wn-ficha .wn-stamp { position: absolute; right: 12px; bottom: 12px; margin: 0; }

/* (p3-14) 오늘의 한 병 다시 읽기 · 수료 카드 */
.wl-on .wl > div.masked { color: transparent !important; background: repeating-linear-gradient(45deg, #C9B48A 0 4px, #B9A47C 4px 8px) !important; border-radius: 3px; }
.wn-review { display: grid; gap: 8px; margin: 12px auto 0; }
.wn-review button { border: 2px solid #6B4E3A; background: #2A211B; color: #F1EDE6; border-radius: 10px; padding: 11px; font: 700 15px Georgia, serif; cursor: pointer; }
.wn-review button.right { border-color: #7CC08A; background: #24382A; } .wn-review button.wrong { border-color: #D9534F; }
.wn-next { margin: 6px 0 0; font-size: 12px; color: #5A6B4A; } .wn-res.no .wn-next { color: #C9B79C; }
.wn-dip { margin-top: 4px; }

/* (p3-18) 창밖 카드 버튼: 작은 알약 모양(창틀 위 스티커처럼) */
.win-snap { width: auto; height: 28px; padding: 0 10px 0 8px; border-radius: 999px; background: rgba(244, 241, 234, .92); color: #2B2418; font: 700 12px 'Noto Sans KR', sans-serif; display: flex; align-items: center; gap: 4px; box-shadow: 0 2px 0 rgba(0,0,0,.25); left: 10px; top: 10px; }
.win-snap .ws-l { font-size: 12px; }

/* (p3-18) Pretendard — 와인 수업 글꼴 (앱 안에 넣음, OFL) */
@font-face { font-family: 'Pretendard'; src: url('fonts/Pretendard-Regular.subset.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Pretendard'; src: url('fonts/Pretendard-Bold.subset.woff2') format('woff2'); font-weight: 700 900; font-display: swap; }
.wine, .wine button, .wine .wn-info, .wine .wn-bub span, .wine .sh-nm, .wine .wn-case { font-family: 'Pretendard', 'Noto Sans KR', system-ui, sans-serif; }
.wine .wn-board, .wine .chalk-note { font-family: 'Gaegu', 'Nanum Pen Script', cursive; }
/* 자리 고르기: 앨범·🍷 한 묶음 */
.board-chips { display: flex; gap: 6px; flex: none; } .board-title-row .board-chips .wine-chip { margin-left: 0; }
/* 다시 듣기 */
.wn-bub { padding-right: 38px; cursor: pointer; } .wn-say { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: #F2E3C4; color: #7A1F2B; width: 28px; height: 28px; border-radius: 50%; font-size: 13px; cursor: pointer; }
/* 어디를 누를지: 칩 크게(가격표) · 첫 칩 반짝 · 라벨의 배울 칸 점선 */
.wn-chip { padding: 9px 14px 9px 18px; font-size: 14px; clip-path: polygon(10px 0, 100% 0, 100% 100%, 10px 100%, 0 50%); border-radius: 0; background: #D8B27A; color: #3B2414; border: 0; }
.wn-chip.on { background: #F2C14E; color: #2A1D16; } .wn-chip.seen { background: #C9A06A; }
.wn-chip.hint { animation: chipHint 1.1s ease-in-out infinite alternate; } @keyframes chipHint { from { filter: brightness(1) drop-shadow(0 0 0 rgba(242,193,78,0)); } to { filter: brightness(1.25) drop-shadow(0 0 6px rgba(242,193,78,.9)); } }
.wl-on .wl > div.tap { outline: 1.5px dashed rgba(122, 31, 43, .55); outline-offset: 1px; cursor: pointer; border-radius: 2px; }
/* 다시 읽기: 가린 칸 */
.wl-on .wl > div.masked { position: relative; color: transparent !important; background: rgba(242, 193, 78, .25) !important; outline: 2px dashed #A3302A !important; animation: qBlink 1.2s ease-in-out infinite alternate; }
.wl-on .wl > div.masked::after { content: attr(data-q); position: absolute; inset: 0; display: grid; place-items: center; color: #A3302A; font: 900 13px 'Pretendard', sans-serif; letter-spacing: 0; }
@keyframes qBlink { from { outline-color: #A3302A; } to { outline-color: rgba(163, 48, 42, .3); } }
/* 챕터 꼬리표 · 단계 목록 */
.wn-tag { display: inline-block; margin: 0 auto 8px; background: #3A2A20; color: #F2D36B; border-radius: 999px; padding: 4px 10px; font-size: 12px; }
.wn-step { display: flex; align-items: center; gap: 10px; width: 100%; background: #2A211B; border: 0; border-radius: 10px; padding: 8px 12px; margin: 0 auto 8px; color: inherit; text-align: left; cursor: pointer; }
.wn-step .wb { width: 22px; height: 44px; } .wn-step b { display: block; font-size: 14px; } .wn-step small { color: #7CC08A; font-size: 12px; } .wn-step i { margin-left: auto; font-style: normal; color: #C9B79C; font-size: 20px; } .wn-step > span:nth-child(2) { flex: 1; }
.wb.done { cursor: pointer; }

/* (p3-21) 칠판도 Pretendard(손글씨가 어색해서) · 스피커 버튼 또렷하게 · 정리 버튼 대기 모양 · 안내 아이콘 */
.wine .wn-board, .wine .chalk-note { font-family: 'Pretendard', 'Noto Sans KR', sans-serif !important; }
.wn-board b { font-size: 15px; } .wn-board p { font-size: 13.5px; line-height: 1.5; } .chalk-note { font-size: 14px !important; font-weight: 700; }
.wn-say { background: #7A1F2B !important; width: 30px !important; height: 30px !important; display: grid; place-items: center; box-shadow: 0 2px 0 rgba(0,0,0,.25); }
.wn-go.wait { background: #6B4E2A; color: #E8D6B8; }
.wn-ico { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #7A1F2B; vertical-align: -5px; margin-right: 6px; }

/* (p3-21) 손: 병 안쪽에 붙여 함께 기울어짐 — 따로 돌려서 뭉개지던 것 */
.wbt2 .wn-hand { position: absolute; left: 70%; top: 70%; width: 48%; height: auto; aspect-ratio: 20 / 14; transform: none; z-index: 2; image-rendering: pixelated; filter: drop-shadow(2px 3px 0 rgba(0,0,0,.3)); }
.wbt2 .wn-hand svg { width: 100%; height: 100%; display: block; }
.wbt2 .wn-hand { left: 74%; top: 84%; width: 44%; }   /* 라벨을 가리지 않게 아래쪽을 받쳐 듦 */
.wine > .wn-tag { display: block; width: fit-content; max-width: 460px; margin: 0 auto 10px; }   /* (p3-22) 넓은 화면에서 왼쪽 끝으로 가던 것 — 가운데 위에 */

/* (p3-23) 창밖 카드 버튼: 와인색 알약 + 흰 도트 카메라 + 흰 글씨 (이모지가 흐릿하던 것) */
.win-snap { background: #B8262B !important; color: #fff !important; height: 30px; padding: 0 12px 0 9px; gap: 6px; font: 800 12.5px 'Pretendard', 'Noto Sans KR', sans-serif; box-shadow: 0 2px 0 rgba(0,0,0,.35), inset 0 0 0 1.5px rgba(255,255,255,.35); }
.win-snap .ws-i { width: 15px; height: 13px; image-rendering: pixelated; display: block; }
.win-snap:hover { filter: brightness(1.08); }

/* (p3-24) 승객 말풍선을 창의 도장 도구·버튼보다 위로 · 말풍선이 있는 동안 도구는 흐리게 */
.pax-row .bub { z-index: 9; }
.fog-tools { transition: opacity .25s; } .fog-tools.dim { opacity: .18; pointer-events: none; }

/* (p3-25) 단어 칩 = 번호 알약(A안) · 위에서 손가락이 가리킴 · 안내 화살표 아이콘은 뺌 */
.wn-chips { position: relative; padding-top: 30px; }
.wn-chip { clip-path: none !important; border-radius: 999px !important; display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px 8px 8px !important; background: transparent !important; color: #F1EDE6 !important; border: 1.5px solid #8A6A4A !important; font: 700 14px 'Pretendard', 'Noto Sans KR', sans-serif !important; }
.wn-chip i { font-style: normal; width: 21px; height: 21px; border-radius: 50%; background: #3A2A20; color: #F2C14E; font: 800 12px 'Pretendard', sans-serif; display: grid; place-items: center; }
.wn-chip.seen { border-color: #6B4E3A !important; color: #C9B79C !important; } .wn-chip.seen i { background: #2F5A3E; color: #fff; }
.wn-chip.on { background: #F2C14E !important; border-color: #F2C14E !important; color: #1A1512 !important; } .wn-chip.on i { background: #7A1F2B; color: #fff; }
.wn-chip.hint { animation: none !important; }
.wn-point { position: absolute; top: 2px; left: 0; width: 28px; height: 19px; pointer-events: none; image-rendering: pixelated; animation: pointBob .7s ease-in-out infinite alternate; transition: left .25s; filter: drop-shadow(1px 2px 0 rgba(0,0,0,.4)); }
.wn-point svg { width: 100%; height: 100%; display: block; } .wn-point[hidden] { display: none; }
@keyframes pointBob { from { transform: translateY(0); } to { transform: translateY(5px); } }
@media (prefers-reduced-motion: reduce) { .wn-point { animation: none; } }
.wn-chips { padding-top: 38px; } .wn-point { width: 24px; height: 32px; top: 0; }
/* (p3-26) 라벨의 배울 칸 점선을 또렷하게 — 크림 라벨엔 진한 와인색, 카바의 검은 라벨엔 금색 */
.wl-on .wl > div.tap { outline: 2px dashed #A3302A !important; outline-offset: 2px; background: rgba(242, 193, 78, .18); }
.wbt2.cava .wl-on .wl > div.tap, .wbt2.cava .wl > div.tap { outline-color: #F2C14E !important; background: rgba(242, 193, 78, .14); }
.wl-on .wl > div.tap.lit { background: rgba(242, 211, 107, .5); }

/* (p3-27) 병만 똑바로 — 손을 빼고 기울기 없이 (라벨에 집중, 글씨가 가장 읽기 쉽게) */
.wn-stage.hold .wbt2, .wn-stage.hold .wbt { transform: none !important; }
.wn-hand { display: none !important; }

/* (p3-28) 라벨 큰 글씨: 단어 중간에서 끊지 않기 (줄은 띄어쓰기에서만) */
.wl .wl-big { overflow-wrap: normal; word-break: keep-all; hyphens: none; line-height: 1.1; }
.wl-on .wl { overflow: hidden; }

/* (p3-28) 칩을 가리키는 깜빡이는 화살표 */
.wn-point { width: 24px !important; height: 20px !important; top: 8px !important; image-rendering: auto; filter: drop-shadow(0 0 4px rgba(242, 193, 78, .7)) !important; animation: arrowBlink 1s ease-in-out infinite !important; }
@keyframes arrowBlink { 0%, 100% { opacity: 1; transform: translateY(0); } 50% { opacity: .25; transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { .wn-point { animation: none !important; } }
/* (p3-29) 창밖 카드 버튼 = 창문에 붙인 스티커 (빨간 알약이 부자연스럽다는 의견) — 크림색 종이, 살짝 기울고 테이프 */
.win-snap { background: rgba(246, 241, 230, .93) !important; color: #3B2A1E !important; border-radius: 6px !important; height: 28px; padding: 0 10px 0 8px; transform: rotate(-3deg); box-shadow: 0 1px 0 rgba(255,255,255,.5) inset, 1px 2px 3px rgba(0,0,0,.25) !important; font: 800 12px 'Pretendard', 'Noto Sans KR', sans-serif; }
.win-snap::before { content: ""; position: absolute; left: 50%; top: -5px; width: 26px; height: 9px; margin-left: -13px; background: rgba(255, 240, 200, .55); transform: rotate(4deg); border-radius: 1px; }
.win-snap .ws-i rect[fill="#fff"] { fill: #3B2A1E; }
.win-snap .ws-i rect[fill="#B8262B"] { fill: #F6F1E6; }
.win-snap:active { transform: rotate(-3deg) scale(.95); }
/* (p3-30) 창밖 카드 버튼 = 버스 창에 붙은 안내 스티커 (비상구 스티커처럼): 마드리드 시내버스(EMT) 파랑, 둥근 끝, 흰 테두리 선, 흰 글씨 · 기울기·테이프 없음 */
.win-snap { background: #1D5CA8 !important; color: #fff !important; border-radius: 999px !important; transform: none !important; height: 28px; padding: 0 13px 0 10px; box-shadow: inset 0 0 0 2px #1D5CA8, inset 0 0 0 3.5px rgba(255,255,255,.92), 0 1px 1px rgba(0,0,0,.18) !important; font: 800 12px 'Pretendard', 'Noto Sans KR', sans-serif; letter-spacing: .02em; opacity: .95; }
.win-snap::before { content: none !important; }
.win-snap .ws-i rect[fill="#fff"] { fill: #fff; }
.win-snap .ws-i rect[fill="#B8262B"] { fill: #1D5CA8; }
.win-snap:active { transform: scale(.95) !important; }
/* (p3-31) 창밖 카드 스티커: 테두리 없이 한 겹, 연한 모래색 (파랑·이중 테두리가 튄다는 의견) */
.win-snap { background: rgba(237, 230, 216, .9) !important; color: #4A3B2E !important; box-shadow: 0 1px 2px rgba(0,0,0,.18) !important; opacity: 1; }
.win-snap .ws-i rect[fill="#fff"] { fill: #4A3B2E; }
.win-snap .ws-i rect[fill="#B8262B"] { fill: #EDE6D8; }

/* (p3-34) 설명 맨 위: 칩 이름 · 라벨에 쓰인 스페인어 */
.wn-ih { display: block; margin-bottom: 4px; } .wn-es { color: #7A1F2B; font-family: Georgia, serif; }
.wn-anat .wn-es { color: #F2C14E; }

/* (p3-35) 넓은 화면에서 안내 문구가 왼쪽 끝으로 가던 것 → 가운데 */
.wine .wn-hint { display: block; max-width: 460px; margin: 8px auto 0 !important; text-align: center; }
.wn-swirl { display: block; }

/* (p3-36) 오늘의 한 병 + 랜덤 퀴즈 나란히 · 선반 📖 노트 · 따라 해 보기 카드 · 요약 노트 종이 */
.wn-pair { display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; margin: 12px auto; }
.wn-pair .wn-today { margin: 0; }
.wn-quizbtn { background: #2F4A2E; color: #F1EDE6; border: 0; border-radius: 12px; padding: 12px; text-align: left; cursor: pointer; font-family: 'Pretendard', sans-serif; }
.wn-quizbtn b { font-size: 15px; } .wn-quizbtn small { display: block; color: #CFE3C8; font-size: 12px; margin-top: 2px; }
.shelf-wrap { position: relative; }
.wn-notebtn { position: absolute; right: 10px; top: 6px; background: #F6EEDC; color: #7A1F2B; border: 0; border-radius: 6px; padding: 3px 8px; font: 800 12px 'Pretendard', sans-serif; cursor: pointer; }
.shelf-wrap .sh-nm em { margin-right: 64px; }
.wn-how { margin: 14px auto 0; background: #F6EEDC; color: #2E2016; border-radius: 12px; padding: 16px; display: flex; gap: 14px; align-items: flex-start; min-height: 150px; }
.wn-how svg { flex: none; width: 64px; height: 64px; image-rendering: pixelated; background: #2A211B; border-radius: 10px; padding: 6px; }
.wn-how p { margin: 0; font-size: 15px; line-height: 1.65; }
.wn-sheet { margin: 4px auto 0; background: #F6EEDC; color: #2E2016; border-radius: 4px; padding: 14px 14px 16px; background-image: repeating-linear-gradient(transparent 0 25px, rgba(122,31,43,.07) 25px 26px); box-shadow: 0 4px 0 rgba(0,0,0,.35); }
.wn-sheet h3 { margin: 0; font: 900 19px Georgia, serif; color: #7A1F2B; } .wn-sub { font-size: 12px; color: #8A6A2E; margin: 2px 0 10px; }
.wn-words { width: 100%; border-collapse: collapse; font-size: 13.5px; } .wn-words td { padding: 6px 4px; border-bottom: 1px dashed #D9C7A0; vertical-align: middle; }
.wn-words .es { font: 700 14.5px Georgia, serif; width: 40%; } .wn-words .ko { font-weight: 700; } .wn-words .at { font-size: 11px; color: #8A6A2E; text-align: right; white-space: nowrap; }
.wn-sec { font: 800 12px 'Pretendard', sans-serif; color: #7A1F2B; margin: 14px 0 6px; border-bottom: 1.5px solid #D9C7A0; padding-bottom: 3px; }
.wn-sheet ol { margin: 0; padding-left: 18px; font-size: 13.5px; line-height: 1.65; } .wn-left { font-size: 12px; color: #8A6A2E; margin: 10px 0 0; }
.wn-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px auto 0; } .wn-two .wn-go { margin: 0; } .wn-go.ghost { background: transparent; border: 1.5px solid #6B4E3A; color: #F1EDE6; }
.wn-review.ox { grid-template-columns: 1fr 1fr; } .wn-review.ox button { font-size: 28px; padding: 18px; }

/* (p3-38) 요약 노트 표 머리줄 — 오른쪽 칸이 무엇인지 */
.wn-words th { font: 700 11px 'Pretendard', sans-serif; color: #8A6A2E; text-align: left; padding: 0 4px 4px; border-bottom: 1.5px solid #D9C7A0; } .wn-words th:last-child { text-align: right; }

/* (p3-38) 요약 노트 다시: 줄 배경·점선 없이 깔끔한 표 + 읽는 법 + 듣기 · 랜덤 퀴즈 버튼 색(나무색+금테) · 아래 안내 문구 */
.wn-sheet { background-image: none !important; border-radius: 12px; padding: 16px; box-shadow: 0 3px 0 rgba(0,0,0,.3); }
.wn-words { display: grid; gap: 0; margin-top: 4px; }
.wn-wh, .wn-wr { display: grid; grid-template-columns: 1.35fr 1fr auto; gap: 8px; align-items: center; padding: 8px 6px; }
.wn-wh { font: 700 11px 'Pretendard', sans-serif; color: #8A6A2E; border-bottom: 1.5px solid #D9C7A0; padding-top: 2px; }
.wn-wr:nth-child(even) { background: rgba(217, 199, 160, .22); border-radius: 6px; }
.wn-wr .es { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 6px; }
.wn-wr .es b { font: 700 15px Georgia, serif; color: #2E2016; } .wn-wr .es i { font-style: normal; font-size: 12px; color: #7A1F2B; }
.wn-sayw { border: 0; background: #7A1F2B; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; padding: 0; flex: none; }
.wn-sayw svg { width: 12px; height: 12px; }
.wn-wr .ko { font-weight: 700; font-size: 13.5px; } .wn-wr .at { font-size: 11px; color: #8A6A2E; white-space: nowrap; text-align: right; }
.wn-sheet ol { padding-left: 20px; } .wn-sec { border-bottom: 0 !important; margin-top: 16px; }
.wn-quizbtn { background: #3A2A20 !important; border: 1.5px solid #C9A35A !important; }
.wn-quizbtn small { color: #E8D6B8 !important; }
.wn-dice { width: 16px; height: 16px; vertical-align: -2px; margin-right: 6px; image-rendering: pixelated; }
.wn-foot { margin: 14px auto 4px; padding-top: 10px; border-top: 1px solid #3A2E26; text-align: center; font-size: 11.5px; color: #8A7A66; }
/* (p3-38) 선반 이름 줄: 진행(1/3)과 📖 노트 버튼 사이 띄우기 (영어 "Note"가 더 넓음) · 노트 첫 칸 넓게 */
.shelf-wrap .sh-nm { padding-right: 84px; } .shelf-wrap .sh-nm em { margin-right: 0 !important; }
.wn-wh, .wn-wr { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr) auto; }
.wn-wr .es b { white-space: nowrap; }
/* 노트 단어 칸: 1줄 스페인어 · 2줄 읽는 법 + 🔊 (늘 같은 모양) */
.wn-wr .es { display: block; } .wn-wr .es b { display: block; white-space: normal; }
.wn-wr .rd { display: flex; align-items: center; gap: 6px; margin-top: 3px; } .wn-wr .rd i { white-space: nowrap; }

/* (p3-39) 라벨의 배울 칸 = 번호 배지(A) + 반짝이(E) — 점선 테두리는 뺌 (칸이 붙어 있으면 겹쳐 보이던 것) */
.wl-on .wl > div.tap { outline: none !important; background: none !important; position: relative; }
.wl-on .wl > div.tap::before { content: attr(data-n); position: absolute; left: -2px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; border-radius: 50%; background: #F2A33A; color: #1A1512; font: 800 10px/16px 'Pretendard', sans-serif; text-align: center; box-shadow: 0 0 0 2px rgba(27, 26, 31, .85); letter-spacing: 0; font-style: normal; }
.wl-on .wl > div.tap:not(.seen)::after { content: "✦"; position: absolute; right: -2px; top: 50%; transform: translateY(-50%); color: #E0A030; font: 700 13px/1 sans-serif; text-shadow: 0 0 4px rgba(242, 193, 78, .9), 0 0 1px #3B2414; animation: zoneSpark 1.1s ease-in-out infinite; letter-spacing: 0; font-style: normal; }
.wl-on .wl > div.tap.seen::before { background: #2F5A3E; color: #fff; }
.wl-on .wl > div.tap.lit { background: rgba(242, 211, 107, .45) !important; border-radius: 3px; }
@keyframes zoneSpark { 0%, 100% { opacity: 1; } 50% { opacity: .2; } }
@media (prefers-reduced-motion: reduce) { .wl-on .wl > div.tap:not(.seen)::after { animation: none; } }
.wl-on .wl > div.tap::before { left: 0; } .wl-on .wl > div.tap:not(.seen)::after { right: 0; }   /* 배지·반짝이를 칸 안쪽에 (글씨 맞추기가 넘친다고 잘못 보던 것) */
.wl-on .wl > div.tap { padding-left: 19px !important; padding-right: 15px !important; }   /* 배지·반짝이 자리를 비워 글씨를 가리지 않게 (넘치면 글씨 맞추기가 줄임) */
.wl-on .wl > div.tap:not(.seen)::after { color: #D08A10; text-shadow: 0 0 3px rgba(255, 220, 140, .9); }
.wbt2.cava .wl-on .wl > div.tap:not(.seen)::after { color: #F2C14E; }

/* (p3-40) 요약 노트 = C안 「여행 수첩」: 가죽 수첩 — 왼쪽 접힌 자국, 오른쪽 와인색 고무줄, 위 노란 마스킹 테이프
   단어 한 줄 = 스페인어(와인색 세리프) · 읽기(한글, 작게) · 🔊 · 뜻(오른쪽, 굵게), 줄 사이 옅은 실선 하나 · 긴 단어는 띄어쓰기에서만 줄바꿈 */
.wn-cuad { position: relative; container-type: inline-size; margin-top: 16px; background: #F3E9D2; background-image: linear-gradient(90deg, rgba(110, 76, 40, .16) 0 9px, rgba(110, 76, 40, .05) 9px 13px, transparent 13px) !important;
  border-radius: 6px 12px 12px 6px; padding: 24px 34px 18px 22px; box-shadow: inset 2px 0 0 rgba(255, 255, 255, .35), 0 3px 0 rgba(0, 0, 0, .35), 0 8px 18px rgba(0, 0, 0, .25); }
.wn-cuad::before { content: ""; position: absolute; left: 12px; top: 0; bottom: 0; width: 1px; background: rgba(110, 76, 40, .22); box-shadow: 1px 0 0 rgba(255, 255, 255, .5); }
.wn-cuad .wn-tape { position: absolute; top: -9px; left: 50%; width: 92px; height: 22px; margin-left: -46px; transform: rotate(-2.5deg); background: rgba(236, 200, 92, .78); box-shadow: 0 1px 2px rgba(0, 0, 0, .18); }
.wn-cuad .wn-band { position: absolute; top: 0; bottom: 0; right: 12px; width: 9px; background: linear-gradient(90deg, #6E2530, #9A4049 45%, #7E2C36); box-shadow: 1px 0 2px rgba(0, 0, 0, .25); }
.wn-cuad h3 { margin: 0; font: 700 21px Georgia, 'Times New Roman', serif; color: #2E2016; letter-spacing: 0; }
.wn-cuad .wn-sub { font-size: 12.5px; color: #8A6A2E; margin: 3px 0 10px; word-break: keep-all; }
/* 폰(수첩 안쪽 폭 380px 미만): 읽기는 스페인어 바로 아래 작게 — 네 칸을 한 줄에 두면 뜻이 3~4줄로 쪼개져서 */
.wn-cuad .wn-words { display: grid; grid-template-columns: minmax(min-content, 1.3fr) 30px minmax(76px, 1fr); column-gap: 8px; margin: 0; }
.wn-cuad .wn-wr { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; align-items: center; padding: 9px 0; border-bottom: 1px solid rgba(122, 31, 43, .16); background: none !important; border-radius: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.wn-cuad .wn-wr:focus-visible { outline: 2px solid #C9A35A; outline-offset: 2px; }
.wn-cuad .wn-wr .es { display: block; width: auto; font: 700 17px/1.25 Georgia, 'Times New Roman', serif; color: #7A1F2B; word-break: keep-all; overflow-wrap: normal; hyphens: none; white-space: normal; }
.wn-cuad .wn-wr.on .es { text-decoration: underline 1.5px rgba(122, 31, 43, .45); text-underline-offset: 3px; }
.wn-cuad .wn-wr .rd { font-style: normal; font-size: 12px; line-height: 1.35; color: #8A6A2E; word-break: keep-all; overflow-wrap: normal; }
.wn-cuad .wn-wr .ko { font: 800 14px/1.35 'Pretendard', sans-serif; color: #2E2016; text-align: right; word-break: keep-all; overflow-wrap: normal; }
.wn-cuad .wn-wr .es { grid-column: 1; grid-row: 1; } .wn-cuad .wn-wr .rd { grid-column: 1; grid-row: 2; margin-top: 2px; }
.wn-cuad .wn-wr .wn-sayw { grid-column: 2; grid-row: 1 / span 2; } .wn-cuad .wn-wr .ko { grid-column: 3; grid-row: 1 / span 2; } .wn-cuad .wn-wr .wn-memo { grid-row: 3; }
/* (p3-40) 🔊 A안 「선 동그라미」: 종이색 + 와인색 테두리·스피커 */
.wn-cuad .wn-sayw { width: 30px; height: 30px; padding: 0; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: #FBF5E8 !important; box-shadow: inset 0 0 0 1.5px #7A1F2B !important; cursor: pointer; }
.wn-cuad .wn-sayw svg { width: 19px; height: 19px; } .wn-cuad .wn-sayw:active { background: #EAD9C2 !important; }
.wn-cuad .wn-memo { grid-column: 1 / -1; justify-self: start; margin-top: 7px; padding: 4px 10px; font-size: 12px; color: #5A4020; background: #FFF6C9; border-radius: 3px; box-shadow: 0 1px 2px rgba(0, 0, 0, .15); transform: rotate(-.6deg); }
.wn-cuad .wn-memo[hidden] { display: none; }
.wn-cuad .wn-tip { margin: 8px 0 0; font-size: 11.5px; color: #9A8058; }
.wn-cuad .wn-rem { list-style: none; margin: 14px 0 0; padding: 0; font-size: 14px; line-height: 1.6; color: #2E2016; }
.wn-cuad .wn-rem li { display: flex; gap: 6px; margin: 3px 0; word-break: keep-all; } .wn-cuad .wn-rem .n { flex: none; color: #2E2016; }
.wn-cuad .wn-rem b { color: #7A1F2B; font-weight: 800; }
/* 넓은 수첩(PC·아이패드): 시안 C 그대로 한 줄 = 스페인어 · 읽기 · 🔊 · 뜻 */
@container (min-width: 380px) {
  .wn-cuad .wn-words { grid-template-columns: minmax(min-content, 40fr) minmax(0, 24fr) 30px minmax(0, 30fr); }
  .wn-cuad .wn-words.en { grid-template-columns: minmax(min-content, 50fr) 30px minmax(0, 40fr); }
  .wn-cuad .wn-wr .es, .wn-cuad .wn-wr .rd, .wn-cuad .wn-wr .wn-sayw, .wn-cuad .wn-wr .ko { grid-column: auto; grid-row: 1; margin-top: 0; }
  .wn-cuad .wn-wr .wn-memo { grid-row: 2; }
}
@supports not (grid-template-columns: subgrid) { .wn-cuad .wn-wr { grid-template-columns: inherit; } }
@media (max-width: 370px) { .wn-cuad { padding: 22px 30px 16px 20px; } .wn-cuad .wn-band { right: 10px; } .wn-cuad .wn-wr .es { font-size: 16px; } .wn-cuad .wn-words { column-gap: 6px; } }

/* (p3-40) 진행(0/3)·🔒을 늘 오른쪽 끝에 — 📖 노트 버튼이 있을 때만 그 자리를 비움 (전엔 노트가 없어도 비워 숫자가 가운데 떠 보였음) */
.shelf-wrap .sh-nm { padding-right: 0; } .shelf-wrap.has-note .sh-nm { padding-right: 84px; }

/* (p3-40) 랜덤 퀴즈 = A안 「별책 부록 책자」 — 요약 노트(수첩)와 한 세트: 종이색 + 노란 테이프 + 오른쪽 도트 책자 */
.wn-quizbtn { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 12px 10px 12px 12px; background: #F3E9D2 !important; border: 0 !important; box-shadow: inset 3px 0 0 #C9B48A, 0 3px 0 rgba(0, 0, 0, .35); }
.wn-quizbtn b { color: #7A1F2B; } .wn-quizbtn small { color: #8A6A2E !important; }
.wn-quizbtn::before { content: ""; position: absolute; top: -4px; left: 14px; width: 38px; height: 12px; background: rgba(236, 200, 92, .8); transform: rotate(-4deg); pointer-events: none; }
.wn-quizbtn .wn-qbook { flex: none; width: 44px; height: 44px; image-rendering: pixelated; }
.wn-quizbtn:active { background: #EAD9C2 !important; }

/* (p3-41) 랜덤 퀴즈 B안: 고른 답은 꽉 찬 색(맞음 초록 · 틀림 빨강) + 틀리면 정답에 꼬리표 · 결과 띠 · 다음 문제 버튼 · 진행 점 */
.wn-review.qz button { position: relative; }
.wn-review.qz button.right { background: #2F6B4A !important; border-color: #7FD3A4 !important; color: #fff !important; opacity: 1 !important; }
.wn-review.qz button.wrong { background: #6E2228 !important; border-color: #E07070 !important; color: #fff !important; opacity: 1 !important; }
.wn-shelf.qz .wn-pick { position: relative; }
.wn-shelf.qz .wn-pick.right { background: rgba(47, 107, 74, .55) !important; box-shadow: inset 0 0 0 3px #7FD3A4 !important; opacity: 1 !important; }
.wn-shelf.qz .wn-pick.wrong { background: rgba(110, 34, 40, .55) !important; box-shadow: inset 0 0 0 3px #E07070 !important; opacity: 1 !important; }
.qz .wn-ans { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); padding: 3px 9px; border-radius: 999px; background: #DFF3E6; color: #2F6B4A; font: 800 12.5px 'Pretendard', sans-serif; }
.wn-shelf.qz .wn-ans { top: 8px; transform: none; right: 50%; margin-right: -24px; }
.wn-qres { display: flex; gap: 12px; align-items: center; margin: 12px auto 0; padding: 12px 14px; border-radius: 14px; color: #fff; font-family: 'Pretendard', sans-serif; }
.wn-qres.ok { background: #2F6B4A; } .wn-qres.no { background: #6E2228; }
.sh-rec.new { background: #E0533F; color: #fff; letter-spacing: .06em; }   /* (p3-45) 수료 뒤 새 단계 */
.g-new { display: block; font: 800 9px 'Pretendard', sans-serif; color: #fff; background: #E0533F; border-radius: 4px; padding: 1px 4px; margin-top: 2px; font-style: normal; }
.okring { display: inline-block; width: .8em; height: .8em; border: .17em solid #F2C46B; border-radius: 50%; box-sizing: border-box; vertical-align: -.06em; }   /* (p3-45) 맞음 = 노란 고리 */
.wn-qres .big { flex: none; width: 40px; text-align: center; font: 900 30px/1 'Pretendard', sans-serif; }
.wn-qres b { display: block; font-size: 16.5px; } .wn-qres div > span { display: block; font-size: 13px; line-height: 1.45; opacity: .92; margin-top: 2px; word-break: keep-all; }
.wn-qnext { margin-top: 10px; }
.wn-qdots { display: inline-flex; gap: 5px; margin-left: 6px; vertical-align: middle; }
.wn-qdots i { width: 9px; height: 9px; border-radius: 50%; background: #4A3A30; display: inline-block; }
.wn-qdots i.ok { background: #7FD3A4; } .wn-qdots i.no { background: #E07070; } .wn-qdots i.now { box-shadow: 0 0 0 2px #F2D36B; }
.wn-qsum { display: flex; justify-content: center; gap: 6px; margin: 12px auto 4px; flex-wrap: wrap; }
.wn-qsum span { padding: 5px 10px; border-radius: 999px; font: 700 13px 'Pretendard', sans-serif; color: #fff; }
.wn-qsum .ok { background: #2F6B4A; } .wn-qsum .no { background: #6E2228; }

/* (p3-43) 와인 셀러: 잠금 없음 · 순서는 "추천" 꼬리표로 */
.sh-rec { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: #F2A23B; color: #2A1A08; font: 800 10.5px/1.5 'Pretendard', sans-serif; vertical-align: 2px; }
.g-st.open b { border-style: solid; border-color: #6A6D78; color: #C9CCD4; }   /* (p3-43) 아직 안 푼 단계도 바로 누를 수 있음 */
/* (p3-43) 🍷 내 셀러 = 버스 화면 아래 🎮 게임 바로 옆 (자리 고르기 머리줄에서 옮김) */
.foot-left { display: flex; gap: 8px; align-items: center; margin-right: auto; }
.foot-left .game-btn { margin-right: 0; }
.foot-wine { flex: none; background: none; border: 1.5px solid #B5525A; color: #F0A3A8; border-radius: 999px; padding: 5px 12px; font: 700 13px 'Noto Sans KR', sans-serif; cursor: pointer; }
.foot-wine:active { transform: translateY(1px); }

/* (p3-44) "왜" 설명 묶음: 제목 + 목록 (시안 wine-5-1-why) */
.wn-res .wn-why{display:block;margin-top:2px}
.wn-why .why-lead{margin:0}
.wn-why .why-sec{margin:10px 0 0;padding:8px 10px;border-radius:10px;background:rgba(255,255,255,.55)}
.wn-why .why-sec b{display:block;color:#7A1F2B;font-size:14px;margin-bottom:4px}
.wn-why .why-sec ul{margin:0;padding-left:18px}
.wn-why .why-sec li{margin:3px 0;line-height:1.5}
.wn-why .why-tail{margin:10px 0 0;font-weight:600}

/* (p3-44) 소믈리에 도전 — 셀러 맨 아래(B안 자리) · A안 띠 모양 */
.som-row { display: grid; grid-template-columns: 1fr 1.3fr; gap: 8px; margin: 12px auto 6px; }   /* (p3-45) PC에서도 가운데 */
.som-row.one { grid-template-columns: 1fr; }
.som-band { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 14px; border: 1.5px solid #C9A35A; background: linear-gradient(90deg, #2B1A10, #3A2414); color: #F3E6C8; text-align: left; font: inherit; cursor: pointer; min-width: 0; }
.som-band > span { min-width: 0; }
.som-band b { display: block; font-size: 15.5px; color: #F2C46B; }
.som-band small { display: block; font-size: 11.5px; opacity: .85; margin-top: 2px; line-height: 1.35; }
.som-band > i { margin-left: auto; font-style: normal; font-size: 20px; color: #F2C46B; }
.som-row:not(.one) .som-band { padding: 10px; gap: 8px; }
.som-medal { width: 40px; height: 40px; flex: none; }
.som-dip { display: flex !important; align-items: center; gap: 8px; margin: 0 !important; border-radius: 14px; border: 0; background: #F2A93B; color: #2A1A10; padding: 10px; font: inherit; text-align: left; cursor: pointer; min-width: 0; }
.som-dip b { display: block; font-size: 15.5px; } .som-dip small { display: block; font-size: 11.5px; opacity: .8; line-height: 1.35; } .som-dip .cap { font-size: 26px; }
.som-real { margin: 8px auto 10px; font-size: 12px; color: #CDBBA0; text-align: center; line-height: 1.5; } .som-real b { color: #F3E6C8; }
.wn-review.som4 { display: flex; flex-direction: column; gap: 8px; }
.wn-review.som4 button { text-align: left; padding: 12px 14px; font-size: 15px; line-height: 1.45; min-height: 0; width: 100%; white-space: normal; }
.wn-review.som4 button > i { font-style: normal; color: #C9A35A; margin-right: 6px; font-weight: 800; }
.wn-review.som4 button.right > i, .wn-review.som4 button.wrong > i { color: inherit; }
.wn-qres .som-tip { display: block; margin-top: 6px; font-size: 12.5px; opacity: .9; }
.wn-qdots.som { gap: 3px; } .wn-qdots.som i { width: 7px; height: 7px; }
.som-stamp { display: flex; align-items: center; gap: 14px; margin: 12px auto; padding: 14px; border-radius: 14px; background: #F3E6C8; color: #3A2414; }
.som-stamp b { display: block; font-size: 17px; } .som-stamp small { font-size: 12px; opacity: .8; line-height: 1.5; }
.som-stamp.none { background: #2A211B; color: #E8D9C0; }
.som-big { width: 72px; height: 72px; flex: none; }
.som-miss li { margin: 6px 0; line-height: 1.5; }
.som-ref { margin-left: 4px; padding: 2px 8px; border-radius: 999px; border: 0; background: #F3E6C8; color: #4A2A1C; font: 700 11.5px 'Pretendard', sans-serif; cursor: pointer; }
.som-stage .wbt2 { height: 430px; }
/* (p3-44) 노선 줄: 긴 정류장 이름은 한 줄 그대로 두고 글씨를 조금 줄여 맞춤(app.js fitRsNow) — 두 줄로 늘리면 자리 고르기 화면이 한 화면을 넘음 */
.bub.me-tag { white-space: nowrap; min-width: max-content; }

/* (v128) 레코드점 「Discos 27」 — 주크박스 + 네온 열 선택(B+) + 곡 목록 + 누른 곡 아래 펼치는 유튜브 플레이어(D) */
.discos { position: fixed; inset: 0; z-index: 70; background: #1E1A1C; color: #F4EEE2; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
.discos > * { max-width: 520px; margin-left: auto; margin-right: auto; }
.dc-top { display: flex; align-items: center; justify-content: space-between; padding: calc(10px + env(safe-area-inset-top, 0px)) 12px 4px; }
.dc-back, .dc-x { background: none; border: 0; color: #B9B0A8; font: 14px/1 'Courier New', monospace; padding: 10px 8px; min-width: 44px; min-height: 44px; cursor: pointer; }
.dc-x { font-size: 18px; }
.dc-logo { font: 900 italic 22px/1 Georgia, 'Times New Roman', serif; color: #F2C14E; letter-spacing: 1px; text-shadow: 2px 2px 0 #7A1F2B; }
.dc-stage { display: block; width: 100%; height: auto; max-height: 34dvh; background: #241E22; }
.dc-lt { animation: dcTw 1.2s steps(2) infinite; } .dc-lt.l1 { animation-delay: .4s; } .dc-lt.l2 { animation-delay: .8s; }
@keyframes dcTw { 50% { opacity: .35; } }
/* 네온 열 선택: 꺼진 유리관도 보이고 고른 것만 켜짐 */
.dc-sel { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 10px !important; padding: 10px 6px; width: calc(100% - 24px); background: #231C20; border: 3px solid #3A3036; border-radius: 10px; box-shadow: inset 0 0 0 1px #120E10; }
.dc-tab { background: none; border: 0; cursor: pointer; padding: 6px 2px; display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 44px; color: inherit; }
.dc-tab b { font: 900 italic clamp(16px, 5vw, 22px)/1 Georgia, 'Times New Roman', serif; letter-spacing: .5px; color: transparent; -webkit-text-stroke: 1px #6E5F66; white-space: nowrap; }
.dc-tab small { font-size: 11px; color: #9C9096; border: 1px solid #4A3E44; border-radius: 4px; padding: 3px 6px; white-space: nowrap; }
.dc-tab.on b { color: #E6FBFF; -webkit-text-stroke: 0; text-shadow: 0 0 4px #5FE0FF, 0 0 10px #22B8F0, 0 0 18px #1590D8; }
.dc-tab.on small { background: #22B8F0; border-color: #22B8F0; color: #08202C; font-weight: 700; box-shadow: 0 0 8px #22B8F0; }
.dc-tab:focus-visible { outline: 2px solid #F2C14E; outline-offset: 2px; border-radius: 6px; }
/* 곡 목록: 회색 틀 안 크림색 띠 */
.dc-list { margin-top: 10px !important; width: calc(100% - 24px); padding: 6px; background: #B9BCC4; border-radius: 10px; box-shadow: inset 0 0 0 3px #8E9199; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.dc-list.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dc-row { display: flex; align-items: center; gap: 6px; width: 100%; min-height: 48px; padding: 6px 8px; text-align: center; cursor: pointer; background: #FFFBF0; color: #2B2418; border: 0; border-top: 3px solid #C86A9A; border-bottom: 3px solid #C86A9A; font: 13px/1.25 'Courier New', monospace; }
.dc-row i { font-style: normal; font-size: 11px; color: #8E8378; min-width: 22px; text-align: left; }
.dc-row span { flex: 1; min-width: 0; }
.dc-row b { display: block; font-weight: 700; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.dc-row small { display: block; font-size: 11px; color: #6E655C; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dc-row em { font-style: normal; font-size: 10px; font-weight: 700; color: #FFF; background: #C4453B; border-radius: 3px; padding: 2px 4px; white-space: nowrap; }
.dc-row.on { background: #FFF1B8; outline: 3px solid #F2A93B; outline-offset: -3px; }
.dc-row.season:not(.on) { background: #FFF6DA; }
.dc-row:focus-visible { outline: 3px solid #22B8F0; outline-offset: -3px; }
/* 펼친 칸: 플레이어(16:9, 최소 200px · 위에 아무것도 겹치지 않음) + SONANDO + 한마디 + 접기 */
.dc-open { grid-column: 1 / -1; background: #FFF6D6; border: 3px solid #F2A93B; padding: 10px; color: #2B2418; animation: rise .25s ease-out; }
.dc-player { position: relative; width: 100%; aspect-ratio: 16 / 9; min-height: 204px; background: #000; }
.dc-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.dc-noplay { display: flex; align-items: center; justify-content: center; min-height: 120px; padding: 16px; text-align: center; background: #2A2226; color: #E9E1D8; font-size: 14px; line-height: 1.5; }
.dc-son { margin: 10px 0 8px; font-size: 12px; font-weight: 800; color: #B0305A; letter-spacing: .3px; }
.dc-note { background: #F8E7A0; border-radius: 4px; padding: 10px 12px; font-size: 13px; line-height: 1.6; }
.dc-note b { display: block; color: #8A3A1E; font-size: 12px; margin-bottom: 2px; }
.dc-fold { display: block; margin: 8px 0 0 auto; background: none; border: 0; color: #5A4E44; font-size: 13px; font-weight: 700; padding: 8px 4px; min-height: 40px; cursor: pointer; }
.dc-empty { grid-column: 1 / -1; margin: 0; padding: 24px 12px; text-align: center; color: #3A3036; background: #FFFBF0; font-size: 14px; line-height: 1.5; }
.dc-foot { margin-top: 12px !important; width: calc(100% - 24px); font-size: 12px; line-height: 1.5; color: #9C9096; }
@media (max-width: 360px) { .dc-list.two { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .dc-lt, .dc-open { animation: none; } }
.dc-song { display: block; margin-top: 6px; font-style: normal; font-size: 12px; font-weight: 700; color: #6E4A2E; }
/* (v128) 버스 옆자리 Ana: 오늘의 TOP 1 카드 (곡 제목은 글자로만 · 소리로 안 읽음) */
.ana-top { margin: 10px 0 2px; padding: 9px 12px; border-radius: 10px; background: #231C20; color: #F4EEE2; display: flex; align-items: center; gap: 10px; border: 2px solid #22B8F0; box-shadow: 0 0 8px rgba(34, 184, 240, .45); }
.ana-top[hidden] { display: none; }
.ana-top i { font-style: normal; font-size: 22px; }
.ana-top div { min-width: 0; }
.ana-top small { display: block; font-size: 11px; color: #7FD6F5; font-weight: 700; letter-spacing: .3px; }
.ana-top b { display: block; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ana-top span { display: block; font-size: 12px; color: #C9BFC4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* (v128) 와인 챕터 11 「타파스와 안주」: 칠판(pizarra) · 접시 크기 · 하몽 꼬리표 · 만체고 라벨 — 와인 라벨 칸과 같은 data-z 칸(.tz) */
.tp-board { position: relative; width: min(100%, 330px); margin: 0 auto; }
.tp-frame { background: #24402F; border: 8px solid #6B4430; box-shadow: inset 0 0 0 2px #1A2E22, 0 6px 14px rgba(0, 0, 0, .45); padding: 12px 12px 10px 18px; color: #EEE8D6; font-family: Georgia, 'Times New Roman', serif; }
.tp-ledge { display: block; height: 10px; margin: 0 6px; background: #5A3824; }
.tp-board h4 { margin: 0; text-align: center; font: italic 700 24px/1.1 Georgia, serif; letter-spacing: 1px; }
.tp-sub { display: block; text-align: center; font: italic 12px Georgia, serif; color: #C9D6C6; margin-bottom: 6px; }
.tp-grid { display: grid; grid-template-columns: 1fr 140px; row-gap: 0; align-items: end; }
.tp-head { grid-column: 2; display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; white-space: nowrap; font: 700 9px/1.2 'Pretendard', sans-serif; letter-spacing: .4px; padding: 2px 0 4px; }
.tp-dish { grid-column: 1; display: flex; flex-direction: column; font: italic 15px Georgia, serif; padding-left: 10px; }
.tp-dish span, .tp-checks span { height: 30px; line-height: 30px; border-bottom: 1px dashed rgba(238, 232, 214, .25); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-checks { grid-column: 2; display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; font: 700 17px/30px 'Pretendard', sans-serif; color: #F4F0E2; }
.tp-casa { margin-top: 10px; padding: 6px 4px; border: 1.5px dashed rgba(238, 232, 214, .55); text-align: center; font: italic 13px Georgia, serif; }
.tp-casa b { color: #F2C14E; }
.tp-pairs { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.tp-pair { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; padding: 8px 6px 8px 14px; border-bottom: 1px dashed rgba(238, 232, 214, .25); font: italic 15px Georgia, serif; }
.tp-pair em { font-style: normal; color: #C9D6C6; }
.tp-pair b { font: 700 14px 'Pretendard', sans-serif; color: #F2C14E; text-align: right; }
/* 접시 크기 (11-2 고르기) */
.tp-plate { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.tp-sign { background: #24402F; border: 3px solid #6B4430; color: #EEE8D6; padding: 4px 6px; min-width: 76px; text-align: center; }
.tp-sign small { display: block; font: italic 11px Georgia, serif; color: #C9D6C6; }
.tp-sign b { display: block; font: 800 13px/1.2 'Pretendard', sans-serif; letter-spacing: .3px; white-space: nowrap; }
.tp-platesvg { width: 96px; height: auto; display: block; }
/* 하몽 다리 + 꼬리표 */
.tp-ham { position: relative; display: flex; align-items: center; justify-content: center; gap: 4px; min-height: 250px; }
.tp-hamsvg { width: 132px; height: auto; display: block; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .45)); }
.tp-tag { width: 150px; background: #F6EEDC; color: #2B2418; border: 1px solid #C9B48A; padding: 8px 8px 6px; text-align: center; box-shadow: 0 4px 10px rgba(0, 0, 0, .4); transform: rotate(2deg); font-family: Georgia, serif; }
.tp-tag small { display: block; font: 700 9px 'Pretendard', sans-serif; letter-spacing: 1px; color: #5A4E44; }
.tp-feed { font: 700 22px/1.15 Georgia, serif; color: #7A1F2B; padding: 0 10px; }
.tp-breed { font: 700 14px/1.3 Georgia, serif; padding: 0 10px; }
.tp-band { display: flex; flex-direction: column; align-items: stretch; gap: 3px; margin-top: 5px; font: 11px 'Pretendard', sans-serif; color: #5A4E44; }
.tp-band i { display: block; height: 9px; border: 1px solid #8A8378; }
.tp-ham.sm { flex-direction: column; min-height: 0; gap: 2px; }
.tp-ham.sm .tp-hamsvg { width: 60px; filter: none; }
.tp-ham.sm .tp-tag { width: 100%; padding: 4px 3px; transform: none; box-shadow: none; }
.tp-ham.sm .tp-tag small { display: none; }
.tp-ham.sm .tp-feed { font-size: 12px; } .tp-ham.sm .tp-breed { font-size: 10px; } .tp-ham.sm .tp-band span { display: none; }
/* 만체고 */
.tp-cheese { position: relative; width: min(100%, 300px); margin: 0 auto; }
.tp-chsvg { width: 100%; height: auto; display: block; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .45)); }
.tz.tp-rind { position: absolute; left: 3%; top: 34%; width: 14%; height: 58%; color: transparent; font-size: 1px; }
.tp-clabel { position: absolute; left: 20%; top: 38%; width: 48%; background: #F6EEDC; color: #2B2418; border: 1px solid #C9B48A; text-align: center; padding: 4px 4px 3px; font-family: Georgia, serif; box-shadow: 0 3px 8px rgba(0, 0, 0, .35); }
.tp-clabel small { display: block; font: 700 8px 'Pretendard', sans-serif; letter-spacing: 1px; }
.tp-cname { font: 700 16px/1.1 Georgia, serif; color: #7A1F2B; padding: 0 2px 0 12px; white-space: nowrap; }
.tp-cage { font: 700 13px/1.25 Georgia, serif; color: #2F5A3E; }
.tp-clabel em { display: block; font: 8.5px 'Pretendard', sans-serif; color: #5A4E44; font-style: normal; }
.tp-cheese.sm .tp-clabel { position: static; width: 100%; margin-top: 4px; box-shadow: none; padding: 3px 2px; }
.tp-cheese.sm .tp-cname { font-size: 10px; } .tp-cheese.sm .tp-cage { font-size: 11px; } .tp-cheese.sm .tp-clabel em, .tp-cheese.sm .tp-clabel small { display: none; }
/* 칸(.tz): 번호 배지 · 반짝이 · 짚기 · 가리기 (와인 라벨 칸과 같은 모양) */
.tz { position: relative; border-radius: 3px; }
.tz.tap { cursor: pointer; outline: 2px dashed rgba(242, 163, 58, .8); outline-offset: 1px; }
.tz.tap::before { content: attr(data-n); position: absolute; left: -9px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; border-radius: 50%; background: #F2A33A; color: #1A1512; font: 800 10px/16px 'Pretendard', sans-serif; text-align: center; box-shadow: 0 0 0 2px rgba(27, 26, 31, .85); font-style: normal; z-index: 2; }
.tz.tap.seen::before { background: #2F5A3E; color: #fff; }
.tz.tap:not(.seen)::after { content: "✦"; position: absolute; right: -7px; top: -7px; color: #F2C14E; font: 700 13px/1 sans-serif; text-shadow: 0 0 4px rgba(242, 193, 78, .9); animation: zoneSpark 1.1s ease-in-out infinite; font-style: normal; }
.tz.lit { background: rgba(242, 211, 107, .35) !important; }
.tz.masked { color: transparent !important; background: rgba(242, 193, 78, .25) !important; outline: 2px dashed #A3302A !important; animation: qBlink 1.2s ease-in-out infinite alternate; }
.tz.masked * { visibility: hidden; }
.tz.masked::after { content: attr(data-q); position: absolute; inset: 0; display: grid; place-items: center; color: #F2C14E; font: 900 13px 'Pretendard', sans-serif; text-shadow: 0 1px 2px #000; visibility: visible; }
.tp-tag .tz.masked::after, .tp-clabel .tz.masked::after { color: #A3302A; text-shadow: none; }
@media (prefers-reduced-motion: reduce) { .tz.tap:not(.seen)::after, .tz.masked { animation: none; } }
/* (v128) TRADICIÓN 줄: '이번 달' 표는 오른쪽 위 구석에 작게 (장르 이름이 두 줄로 꺾이지 않게) */
.dc-row { position: relative; }
.dc-row.season em { position: absolute; top: -11px; right: 4px; z-index: 1; font-size: 9px; padding: 1px 4px; }
/* (v128) 곡 목록 글자 A안 「또렷한 글자」(2026-11-16 확정): 곡 이름 = 앱 글씨 굵게 · 가수/장르 뜻 = 와인빛 분홍 · 번호 = 검은 동그라미에 금색 */
.dc-row { font-family: 'Pretendard', sans-serif; }
.dc-row b { font: 800 14px/1.25 'Pretendard', sans-serif; color: #2B1A14; letter-spacing: -.2px; }
.dc-row small { font: 600 11.5px/1.3 'Pretendard', sans-serif; color: #A3305A; }
.dc-row i { width: 22px; height: 22px; min-width: 22px; border-radius: 50%; background: #2B1A14; color: #F2C14E; display: grid; place-items: center; font: 800 9.5px 'Pretendard', sans-serif; text-align: center; flex: none; }
/* (v128) 꼬리표·치즈 라벨 글씨는 한 줄로 (넘치면 글씨 맞추기가 줄임) */
.tp-feed, .tp-breed, .tp-cname, .tp-cage, .tp-sign b { white-space: nowrap; }
.tp-tag { width: 164px; }
.tz.tp-feed, .tz.tp-breed { padding-left: 12px; padding-right: 12px; }   /* 번호 배지 자리를 늘 비워 둠 (칸이 눌릴 때 폭이 바뀌지 않게) */
/* (v128) 💿 레코드점 바로 가기: 아이콘만 · 레코드점 네온과 같은 하늘색 테두리 · 보이는 크기 34px, 누르는 범위 44px */
.foot-disco { position: relative; flex: none; width: 34px; height: 34px; padding: 0; border-radius: 50%; background: none; border: 1.5px solid #22B8F0; box-shadow: 0 0 6px rgba(34, 184, 240, .35); font-size: 17px; line-height: 1; display: grid; place-items: center; cursor: pointer; }
.foot-disco::after { content: ""; position: absolute; inset: -5px; }
.foot-disco:active { transform: translateY(1px); }
.foot-disco[hidden] { display: none; }
#changeSeatBtn { white-space: nowrap; }

.foot-disco svg { display: block; }   /* (v128) 💿 이모지 대신 도트 그림 — PC(윈도) 이모지가 작고 아래로 치우쳐 보이던 것 */
/* (v128) A안: 오른쪽 위 닫기 = ✕ 하나 (게임 · 와인 · 디스코 같은 모양) */
.g-close { flex: none; background: none; border: 0; color: #C9C2B8; font-size: 20px; line-height: 1; width: 44px; height: 40px; cursor: pointer; }
.dc-top { padding-left: 16px; }
.dc-x { font-size: 20px; }
/* (v128-1) 「자동재생」 알약 버튼 — 게임·와인 위쪽 ✕ 바로 왼쪽. 켜짐 주황 · 꺼짐 회색 (글자는 그대로라 폭이 안 바뀜) */
.ap-btn { flex: none; display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 12px 0 9px; border-radius: 17px; border: 1.5px solid #F2A33A; background: rgba(242, 163, 58, .12); color: #F2A33A; font-family: inherit; font-size: 13px; font-weight: 700; line-height: 1; white-space: nowrap; cursor: pointer; }
.ap-btn svg { flex: none; }
.ap-btn.off { border-color: #4A4D55; background: transparent; color: #9A9DA6; }
.wn-right { display: inline-flex; align-items: center; gap: 4px; flex: none; }
/* (v128-2) TOP 10 순위 변화 — 가수 줄 앞 작은 알약 (▲ 초록 · ▼ 빨강 · NEW 노랑 · – 회색) + 목록 위 한 줄 */
.dc-row small mark.dc-rk { display: inline-block; vertical-align: 1px; margin-right: 4px; padding: 2px 5px; border-radius: 7px; font: 800 10.5px/1 'Pretendard', sans-serif; }
.dc-row small mark.dc-rk.up { color: #1F8A4C; background: #E3F4E9; }
.dc-row small mark.dc-rk.dn { color: #B4383A; background: #FBE7E7; }
.dc-row small mark.dc-rk.new { color: #2B1A14; background: #F2C14E; }
.dc-row small mark.dc-rk.eq { color: #9A9DA6; background: transparent; padding: 2px 2px; }
.dc-rkcap { margin: 10px auto -4px !important; width: calc(100% - 24px); text-align: right; font: 600 11.5px/1.3 'Pretendard', sans-serif; color: #A3305A; }
/* (v128-3) 시작 화면 소리 고르기 — 「버스에 타기」 바로 아래 두 칸 (고른 쪽 주황 테두리) */
.start-snd { display: flex; gap: 4px; margin-top: -6px; padding: 4px; border: 1.5px solid #3A3D45; border-radius: 14px; background: #1F2128; }
.start-snd[hidden] { display: none; }
.start-snd button { flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px; height: 44px; border: 0; border-radius: 10px; background: transparent; color: #8A8D96; font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; }
.start-snd button.on { background: #2B2E36; color: var(--amber); box-shadow: inset 0 0 0 1.5px var(--amber); }
.start-snd svg { flex: none; }
.name-pick .start-snd { margin-top: -2px; }
.stop-tap .start-snd { width: 100%; max-width: 340px; margin-top: 10px; }
/* (v128-4) 닫기 ✕ A안: 게임·와인·레코드점 위쪽 ✕를 40px 네모 버튼으로 (테두리 + 굵은 ✕) · 누르는 범위는 44px */
.g-close, .wn-x, .dc-x, .tn-x { position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; width: 40px; height: 40px; min-width: 40px; min-height: 40px; padding: 0; margin: 0; background: transparent; border: 2px solid var(--hd-line, rgba(255, 255, 255, .38)); border-radius: 6px; color: var(--hd-ink, #F1F2F4); font: 700 19px/1 system-ui, -apple-system, 'Segoe UI', sans-serif; cursor: pointer; }
.g-close::after, .wn-x::after, .dc-x::after, .tn-x::after { content: ''; position: absolute; inset: -4px; }
.g-close:active, .wn-x:active, .dc-x:active { background: var(--hd-tint, rgba(255, 255, 255, .14)); }
.g-close:focus-visible, .wn-x:focus-visible, .dc-x:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
/* (v129) 스페인 와인 지도 — 셀러 벽(배운 산지 와인색 · 아직은 점선) · 「이 병은 어디서?」 후보 ①②③ */
.wn-map { margin: 14px auto 6px; padding: 10px 10px 12px; border-radius: 14px; background: #2A1F1A; border: 1.5px solid #4A3A30; }
.wn-maphd { display: flex; justify-content: space-between; align-items: baseline; margin: 0 2px 6px; color: #F3E6C8; font-size: 14px; }
.wn-maphd em { font-style: normal; color: #F2A33A; font-weight: 700; font-size: 13px; }
.wn-mapbox, .wn-qmap { display: block; }
.wn-mapname { font: 700 5.6px Georgia, 'Times New Roman', serif; fill: #F3E3C8; stroke: #2A201C; stroke-width: 1.8px; paint-order: stroke; pointer-events: none; }   /* (v129-1) 배운 산지 이름 */
.sp-map { display: block; width: 100%; height: auto; shape-rendering: crispEdges; }
.sp-mk { cursor: pointer; outline: none; }
.sp-mk .sp-box { stroke: transparent; }
.sp-mk.hit.sel .sp-box, .sp-mk.hit:focus-visible .sp-box { stroke: #F2A33A; }
.sp-mk.cand .sp-box { stroke: #F2A33A; }
.sp-mk.cand text { fill: #F2A33A; }
.sp-mk.cand.right .sp-box { stroke: #7FD3A4; stroke-dasharray: 0; } .sp-mk.cand.right text { fill: #7FD3A4; }
.sp-mk.cand.wrong .sp-box { stroke: #E07070; } .sp-mk.cand.wrong text { fill: #E07070; }
.wn-maptip { margin-top: 8px; min-height: 40px; padding: 8px 10px; border-radius: 10px; background: #F4EDE2; color: #2A1F1A; font-size: 13px; line-height: 1.5; }
.wn-maptip b { font-family: Georgia, serif; } .wn-maptip span { display: block; }
.wn-mapref { margin-top: 4px; padding: 4px 10px; min-height: 30px; border-radius: 8px; border: 1.5px solid #7A1F2B; background: transparent; color: #7A1F2B; font: 700 12px 'Pretendard', sans-serif; cursor: pointer; }
.wn-qmap { margin: 10px auto 0; padding: 8px; border-radius: 12px; background: #2A1F1A; }
.wn-review.wq { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.wn-review.wq button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 4px; min-height: 48px; font-size: 16px; }
.wn-review.wq button i { font-style: normal; } .wn-review.wq .wq-nm { font-size: 12px; font-weight: 700; line-height: 1.25; word-break: keep-all; }
.wq-row { display: flex; align-items: center; gap: 12px; margin: 10px auto 0; padding: 8px 12px; border-radius: 12px; background: #2A1F1A; }
.wq-bottle { flex: none; } .wq-bottle > * { margin: 0 auto; }
.wq-row .som-real { margin: 0; text-align: left; } .wq-row .som-real small { color: #B9AFA5; }
.wn-review.wq .wn-ans { display: none; }
/* (v128-6) 머리 줄 버튼 A안 「금테 선」: ✕ · 자동재생 = 속은 비우고 그 화면 간판 색 선 (크기 그대로 · ✕ 40px · 자동재생 높이 40px)
   와인 = 간판 금테 · 레코드점 = Discos 27 노란 금색 · 게임 = 주황(v128-7) · 자동재생 꺼짐은 같은 색을 흐리게 */
#wine { --hd-line: #C9A86A; --hd-ink: #E8CF98; --hd-tint: rgba(201, 168, 106, .16); --hd-dim: rgba(201, 168, 106, .45); --hd-dimink: #A99470; }
#discos { --hd-line: #E8B84A; --hd-ink: #E8B84A; --hd-tint: rgba(232, 184, 74, .16); }
#game { --hd-line: #F2A33A; --hd-ink: #F2A33A; --hd-tint: rgba(242, 163, 58, .14); --hd-dim: rgba(242, 163, 58, .45); --hd-dimink: #B98642; }   /* (v128-7) 은회색은 꺼진 것 같아서 → 게임 강조색 주황(전광판 글자 · 지금 단원 테두리와 같은 색) */
#wine .ap-btn, #game .ap-btn { height: 40px; padding: 0 13px 0 10px; border-radius: 20px; border: 2px solid var(--hd-line); background: var(--hd-tint); color: var(--hd-ink); }
#wine .ap-btn.off, #game .ap-btn.off { border-color: var(--hd-dim); background: transparent; color: var(--hd-dimink); }
/* (v129) 게임 8단원 지도 문제 — 와인 지도와 같은 도트 지도(어두운 회색 땅) · 후보 ①②③ · 카나리아 네모 · 순례길 노란 점선 */
.g-map { margin: 10px 0 0; padding: 8px; border-radius: 12px; background: #1B1E24; border: 1px solid #2E323B; }
.nm-pl { cursor: pointer; outline: none; }   /* (v129-1) 요약 노트 지도 */
.nm-pl .nm-dot { fill: #F2A33A; stroke: #1B1E24; stroke-width: .8; }
.nm-pl.cam .nm-dot { fill: #F4D03F; }
.nm-pl text { font-weight: 700; fill: #EDE6DA; stroke: #1B1E24; stroke-width: 1.6px; paint-order: stroke; }
.nm-pl.on text, .nm-pl:focus-visible text { fill: #F2A33A; }
.nm-pl.on .nm-dot { stroke: #fff; stroke-width: 1.2; }
.nm-comp text { fill: #9AA3B2; } .nm-comp path { stroke: #9AA3B2; }
.g-nmlg { display: flex; gap: 14px; flex-wrap: wrap; margin: 8px 2px 0; font-size: 12px; color: #B8BFCB; }
.g-nmlg b { display: inline-block; width: 9px; height: 9px; margin-right: 5px; vertical-align: -1px; background: #F2A33A; }
.g-nmlg b.cam { background: #F4D03F; }
.g-nmtip { margin: 8px 0 0; min-height: 40px; padding: 8px 10px; border-radius: 10px; background: #23262E; color: #C9CFD9; font-size: 13px; line-height: 1.5; }
.g-nmtip b { color: #F2A33A; } .g-nmtip span { display: block; color: #E8E4DC; }
.g-mapch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.g-mapch button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; padding: 8px 4px; border-radius: 12px; border: 1.5px solid #4A4D55; background: #22252C; color: #F1F2F4; font: 700 17px/1.2 inherit; cursor: pointer; }
.g-mapch button i { font-style: normal; } .g-mapch .g-mapnm { font-size: 12px; line-height: 1.25; word-break: keep-all; }
.g-mapch button.right { border-color: #7FD3A4; background: #1F3A2C; } .g-mapch button.wrong { border-color: #E07070; background: #3A2024; }

/* ---------- (v130) 숨은 정류장 · Mia와 「Tuna의 숫자 서커스」 — 서커스 무대 ---------- */
.tuna { position: fixed; inset: 0; z-index: 70; background: #2A1418; color: #F3E6D8; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
#tuna { --hd-line: #F2A33A; --hd-ink: #F2A33A; }
.tuna > * { max-width: 520px; margin-left: auto; margin-right: auto; }
/* 위: 간판 · 시계 · 닫기 */
.tn-top { position: sticky; top: 0; z-index: 8; display: flex; align-items: center; gap: 8px; padding: calc(24px + env(safe-area-inset-top, 0px)) 12px 10px; background: #1A1012; }
.tn-sign { flex: 1; min-width: 0; position: relative; overflow: hidden; background: #B8303C; border: 3px solid #241A1C; padding: 5px 10px 6px; box-shadow: inset 0 0 0 2px #E8C25A; }
.tn-sign::before { content: ''; position: absolute; inset: 3px; background: radial-gradient(circle, #FFE9A0 2px, transparent 2.5px) 0 0/12px 12px; pointer-events: none; -webkit-mask: linear-gradient(#000 0 0) top/100% 4px no-repeat, linear-gradient(#000 0 0) bottom/100% 4px no-repeat; mask: linear-gradient(#000 0 0) top/100% 4px no-repeat, linear-gradient(#000 0 0) bottom/100% 4px no-repeat; }
.tn-sign small { display: block; color: #FFE9A0; font-weight: 800; font-size: 9px; font-family: var(--led-font); letter-spacing: 3px; }
.tn-sign.has-peek { overflow: visible; }
.tn-peekdeco { position: absolute; right: 6px; top: -27px; line-height: 0; z-index: 2; }
.tn-deco { position: absolute; right: 6px; bottom: -6px; display: flex; align-items: flex-end; gap: 2px; line-height: 0; }
.tn-deco svg:first-child { margin-bottom: 9px; }
.tn-sign b { display: block; color: #FFF4DC; font-weight: 800; font-size: 17px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tn-clock, .tn-sco { background: #050404; border: 3px solid #3A2A26; padding: 3px 8px; text-align: center; min-width: 60px; }
.tn-clock small, .tn-sco small { display: block; color: #8A6A4A; font-weight: 700; font-size: 8px; font-family: var(--led-font); letter-spacing: 2px; }
.tn-clock b, .tn-sco b { color: #FF9E2C; font-weight: 800; font-size: 20px; line-height: 1; font-family: var(--led-font); font-variant-numeric: tabular-nums; text-shadow: 0 0 6px rgba(255, 140, 30, .6); }
.tn-sco b { font-size: 24px; color: #FFB03A; }
.tn-body { padding: 0 0 0; }
.tn-body > :not(.tn-stage):not(.tn-play):not(.tn-bar):not(.tn-tl) { margin-left: 14px; margin-right: 14px; }
.tn-body.play { display: flex; flex-direction: column; min-height: calc(100dvh - 66px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 24px); }
.tn-play { flex: 1; display: flex; flex-direction: column; } .tn-play > .tn-stage { flex: 1; height: auto; min-height: 450px; }
.tn-tl { height: 4px; background: #241A1C; } .tn-tl i { display: block; height: 100%; width: 100%; background: #F2A33A; }
/* 무대 */
.tn-stage { position: relative; height: 470px; background: #3E1E26; overflow: hidden; }
.tn-stage.intro { height: 330px; } .tn-stage.end { height: 330px; }
.tn-val { position: absolute; left: 0; right: 0; top: 0; height: 26px; background: repeating-linear-gradient(90deg, #B83A48 0 20px, #9A2A38 20px 40px); z-index: 3; }
.tn-val::after { content: ''; position: absolute; left: 0; right: 0; bottom: -10px; height: 10px; background: radial-gradient(circle at 10px 0, #B83A48 9px, transparent 10px) 0 0/20px 10px repeat-x; }
.tn-val::before { content: ''; position: absolute; left: 0; right: 0; top: 4px; height: 6px; background: radial-gradient(circle, #FFE9A0 2.5px, transparent 3px) 0 0/20px 6px repeat-x; z-index: 4; animation: tnBulb 1.2s steps(2) infinite; }
@keyframes tnBulb { 50% { background-position: 10px 0; } }
.tn-cur { position: absolute; top: 0; bottom: 0; width: 30px; background: repeating-linear-gradient(90deg, #A3303E 0 8px, #7E2030 8px 12px); z-index: 2; }
.tn-cur.l { left: 0; } .tn-cur.r { right: 0; }
.tn-floor { position: absolute; left: 0; right: 0; bottom: 0; height: 74px; background: repeating-linear-gradient(90deg, #8A6440 0 46px, #7A5636 46px 48px); border-top: 4px solid #A47A4E; }
.tn-mia { position: absolute; left: 34px; top: 34px; z-index: 4; line-height: 0; }
.tn-bub { position: absolute; left: 118px; right: 36px; top: 50px; z-index: 5; pointer-events: none; }
.tn-bub:empty { display: none; }
.tn-bub b { display: inline-block; background: #FFF7E6; color: #2B2118; border-radius: 12px; padding: 7px 12px; font-family: Georgia, serif; font-weight: 700; font-size: 19px; box-shadow: 0 2px 0 rgba(0, 0, 0, .3); }
.tn-bub small { display: block; width: max-content; max-width: 100%; margin-top: 4px; padding: 4px 10px; border-radius: 10px; font-size: 12px; line-height: 1.4; color: #7A6A58; background: rgba(255, 247, 230, .92); }
.tn-stage.intro .tn-bub { top: 46px; }
.tn-tuna { line-height: 0; }
/* 공연 시작 전 (처음) · 끝: 조명 아래 바닥에 선 Mia */
.tn-beam { position: absolute; left: 50%; top: 0; bottom: 0; width: 300px; transform: translateX(-50%); z-index: 1; pointer-events: none; background: linear-gradient(rgba(255, 238, 180, .22), rgba(255, 238, 180, .06)); clip-path: polygon(42% 0, 58% 0, 100% 100%, 0 100%); }
.tn-stage.intro .tn-beam { animation: tnBeam .6s ease-out .9s both; }
@keyframes tnBeam { from { opacity: 0; } }
.tn-foot { position: absolute; left: 30px; right: 30px; bottom: 68px; height: 6px; z-index: 3; background: radial-gradient(circle, #FFE9A0 2.4px, transparent 3px) 0 0/22px 6px repeat-x; filter: drop-shadow(0 0 3px #FFD27A); }
.tn-mia.floor { top: auto; bottom: 40px; z-index: 3; }
.tn-stage.intro .tn-mia.floor { left: calc(50% - 76px); }
.tn-stage .tn-tuna.seat { position: absolute; left: calc(50% + 2px); bottom: 40px; z-index: 3; }
.tn-bub.mid { left: 40px; right: 40px; top: 40px; text-align: center; }
.tn-bub.mid small { margin-left: auto; margin-right: auto; }
.tn-stage.intro .tn-bub { animation: tnBeam .3s ease-out 1s both; }
/* 막: 들어오면 가운데에서 양옆으로 열림 */
.tn-drape { position: absolute; top: 0; bottom: 0; width: 51%; z-index: 6; background: repeating-linear-gradient(90deg, #B83A48 0 14px, #8E2430 14px 22px); box-shadow: inset 0 -10px 0 #6E1A26; }
.tn-drape.l { left: 0; animation: tnOpenL 1s cubic-bezier(.6, 0, .3, 1) .15s forwards; transform-origin: left top; }
.tn-drape.r { right: 0; animation: tnOpenR 1s cubic-bezier(.6, 0, .3, 1) .15s forwards; transform-origin: right top; }
@keyframes tnOpenL { to { transform: translateX(-94%) scaleX(.6); } }
@keyframes tnOpenR { to { transform: translateX(94%) scaleX(.6); } }
@media (prefers-reduced-motion: reduce) { .tn-drape { display: none; } .tn-stage.intro .tn-beam, .tn-stage.intro .tn-bub { animation: none; } }
/* 끝: 왼쪽에서 걸어와 뒹구는 Tuna 옆에 섬 */
.tn-stage.end .tn-mia.floor { left: 34px; transition: left 1.5s linear; }
.tn-stage.end .tn-mia.floor.go { left: calc(50% - 96px); }
.tn-mia.walk { animation: tnBob .3s steps(2) infinite; }
@keyframes tnBob { 50% { transform: translateY(-3px); } }
.tn-stage.end .tn-bub { left: 50px; right: 30px; top: 40px; }
.tn-stage.end .tn-bub.near { left: calc(50% - 120px); }
.tn-tuna .flip { transform: scaleX(-1); }
.tn-stage .tn-tuna.peek { position: absolute; right: 12px; bottom: 74px; z-index: 1; transform-origin: right bottom; animation: tnPeek 2.4s ease-in-out infinite alternate; }
@keyframes tnPeek { from { transform: translateX(0) rotate(-6deg); } to { transform: translateX(-8px) rotate(-10deg); } }
/* 공 놀이: 받침대 위 공 6개 */
.tn-pad { position: absolute; left: 34px; right: 34px; top: max(200px, 35%); z-index: 3; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 2px; justify-items: center; }
.tn-coin { width: 66px; height: 86px; padding: 0; border: 0; background: transparent; cursor: pointer; line-height: 0; touch-action: manipulation; transition: transform .15s, opacity .15s, filter .15s; }
.tn-coin:active { transform: translateY(2px); }
.tn-coin text { font-family: var(--led-font); }
.tn-coin.ok { transform: translateY(-7px); filter: drop-shadow(0 0 0 #FFF4C0) drop-shadow(0 0 5px #FFF4C0); }
.tn-coin.ng { opacity: .45; transform: rotate(-8deg); }
/* 틀렸을 때: 정답 공만 또렷하게 — 나머지 흐리게 · 정답 공 통통 튀고 위에 초록 화살표 */
.tn-coin { position: relative; }
.tn-pad.miss .tn-coin:not(.ok) { opacity: .3; filter: grayscale(.6); }
.tn-pad.miss .tn-coin.ok { opacity: 1; filter: drop-shadow(0 0 0 #7CFF8A) drop-shadow(0 0 6px #7CFF8A); animation: tnAns .45s ease-in-out infinite alternate; z-index: 2; }
.tn-pad.miss .tn-coin.ok::before { content: ''; position: absolute; left: 50%; top: -18px; width: 20px; height: 14px; transform: translateX(-50%); background: #4CC46A; clip-path: polygon(0 0, 100% 0, 50% 100%); filter: drop-shadow(0 0 0 #14301C); }
@keyframes tnAns { from { transform: translateY(-4px); } to { transform: translateY(-12px); } }
.tn-coin:disabled { cursor: default; }
.tn-pawbg { position: absolute; inset: 26px 30px 0; z-index: 1; pointer-events: none; }
.tn-pawbg i { position: absolute; line-height: 0; opacity: .16; transition: opacity .6s; }
.tn-pawbg i.new { opacity: .45; animation: tnStamp .35s ease-out; }
.tn-pawbg i.out { opacity: 0; }
@keyframes tnStamp { from { opacity: 0; scale: 1.6; } 60% { opacity: .6; scale: .92; } }
.tn-tw { position: absolute; bottom: 40px; z-index: 4; transition: left .13s linear; }
.tn-tw .tn-tuna { position: relative; }
.tn-mkbox { position: absolute; left: 50%; bottom: 100%; margin-bottom: 4px; transform: translateX(-50%); z-index: 6; line-height: 0; }
.tn-mkbox.O, .tn-mkbox.X { animation: tnPop .25s ease-out; }
@keyframes tnPop { from { transform: translateX(-50%) scale(.4); } to { transform: translateX(-50%); } }
.tn-tuna[data-f="up"] { animation: tnHop .35s ease-out; }
@keyframes tnHop { 40% { transform: translateY(-10px); } }
.tn-roll { position: absolute; left: 0; top: 0; z-index: 6; line-height: 0; pointer-events: none; }
/* 아래: 점수 · 발바닥 · 다시 듣기 */
.tn-bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: #241A1C; border-top: 3px solid #E8C25A; }
.tn-mid { flex: 1; min-width: 0; }
.tn-mid small { display: block; color: #B8A898; font-size: 11px; margin-bottom: 3px; white-space: nowrap; }
.tn-paws { display: flex; gap: 5px; }
.tn-bonus { color: #FFE078; font-size: 17px; }
.tn-re { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 52px; padding: 5px 8px; border: 3px solid #F2A33A; background: #3A2A26; color: #F2A33A; cursor: pointer; line-height: 1; font-family: inherit; }
.tn-re small { font-size: 10px; font-weight: 700; white-space: nowrap; }
.tn-re em { font-style: normal; font-size: 9px; color: #D8C0A0; white-space: nowrap; }
.tn-re svg rect { animation: tnDot 1.2s steps(1) infinite; } .tn-re svg .d2 { animation-delay: .2s; } .tn-re svg .d3 { animation-delay: .4s; }
@keyframes tnDot { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .tn-re svg rect { animation: none; } }
.tn-snd.off { color: #8A6A5A; border-color: #6A4A44; }
.tn-snd.nudge { animation: tnNudge .5s ease-in-out; }
@keyframes tnNudge { 20%, 60% { transform: translateX(-3px); } 40%, 80% { transform: translateX(3px); } }
.tn-re:active { transform: translateY(1px); }
.tn-banner { position: absolute; left: 34px; right: 34px; top: 196px; z-index: 7; padding: 8px 6px; background: #F2C14E; color: #241A1C; text-align: center; border: 3px solid #241A1C; animation: tnPopB .25s ease-out; }
@keyframes tnPopB { from { transform: scale(.5); } to { transform: none; } }
.tn-banner b { display: block; font-size: 18px; } .tn-banner span { font-size: 13px; font-weight: 700; }
/* 보너스: 소품 숨바꼭질 */
.tn-spots { position: absolute; left: 34px; right: 34px; top: max(200px, 36%); z-index: 3; display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px 2px; justify-items: center; }
.tn-spot { position: relative; width: 84px; height: 88px; padding: 0; border: 0; background: transparent; cursor: pointer; line-height: 0; display: flex; align-items: flex-end; justify-content: center; touch-action: manipulation; }
.tn-pp { position: relative; z-index: 2; }
.tn-tag { white-space: nowrap; position: absolute; bottom: -14px; left: 50%; transform: translateX(-50%); z-index: 3; background: #FFF7E6; color: #2B1C14; border: 3px solid #241A1C; border-radius: 8px; padding: 0 8px; font-weight: 800; font-size: 18px; line-height: 1.3; font-family: var(--led-font); }
.tn-peek { position: absolute; left: 50%; bottom: 50px; z-index: 1; transform: translate(-50%, 30px); opacity: 0; transition: transform .2s ease-out, opacity .1s; }
.tn-peek svg { width: 66px; height: auto; }
.tn-spot.ok .tn-peek { transform: translate(-50%, 0); opacity: 1; }
.tn-spot.shake .tn-pp { animation: tnShake .3s linear; } .tn-spot.ng .tn-pp { transform: rotate(-8deg); opacity: .6; }
@keyframes tnShake { 25% { transform: translateX(-4px) rotate(-4deg); } 75% { transform: translateX(4px) rotate(4deg); } }
.tn-plus { position: absolute; right: -6px; top: -8px; z-index: 4; color: #FFE078; font-size: 24px; line-height: 1; text-shadow: 0 2px 0 #3C2414; animation: tnPopB .25s ease-out; }
/* 처음 · 끝 */
.tn-info { display: flex; gap: 10px; align-items: stretch; margin-top: 14px; margin-bottom: 4px; }
.tn-rules { flex: 1; min-width: 0; padding: 10px 12px; background: #3E1E26; border: 3px solid #241A1C; }
.tn-rules h3 { margin: 0 0 6px; color: #F2A33A; font-size: 14px; }
.tn-rules ul { list-style: none; margin: 0; padding: 0; } .tn-rules li { display: flex; gap: 6px; font-size: 13px; line-height: 1.5; color: #E8DCCC; margin-bottom: 3px; } .tn-rules li span { flex: none; width: 18px; text-align: center; } .tn-rules b { color: #FFE078; }
.tn-sco.tn-best { flex: none; width: 88px; display: flex; flex-direction: column; justify-content: center; align-items: center; margin: 0; padding: 8px 4px; }
.tn-sco.tn-best small { margin-bottom: 8px; letter-spacing: 1px; }
.tn-sco.tn-best b { display: block; line-height: 1; font-size: 34px; color: #7CFF8A; text-shadow: 0 0 8px rgba(100, 255, 120, .6); }
.tn-sco.tn-best em { font-style: normal; font-size: 11px; color: #B8A898; margin-top: 4px; }
.tn-rule { margin-top: 14px; margin-bottom: 6px; font-size: 15px; line-height: 1.6; color: #E8DCCC; }
.tn-rule span { font-size: 13px; color: #B8A898; }
.tn-go { display: block; width: calc(100% - 28px); margin-top: 12px; padding: 14px; border: 3px solid #241A1C; background: #F2A33A; color: #241A1C; font-weight: 800; font-size: 18px; font-family: inherit; cursor: pointer; box-shadow: 0 3px 0 #241A1C; }
.tn-go.small { width: auto; margin: 0; padding: 0 16px; font-size: 15px; box-shadow: none; }
.tn-go:disabled { opacity: .5; }
.tn-link { display: block; width: calc(100% - 28px); margin-top: 8px; padding: 12px; border: 2px solid #5A3A3A; background: transparent; color: #E8DCCC; font-weight: 700; font-size: 15px; font-family: inherit; cursor: pointer; }
.tn-tw.roll { left: calc(50% - 30px); bottom: 40px; }
.tn-result { display: flex; flex-direction: column; align-items: center; margin-top: 14px; }
.tn-sco.big { padding: 4px 18px; } .tn-sco.big b { font-size: 32px; }
.tn-final { margin: 0; }
.tn-sub { margin: 8px 0 12px; text-align: center; color: #D8C8B8; font-size: 14px; } .tn-sub b { color: #FFE078; }
.tn-save { padding: 12px; background: #3E1E26; border: 3px solid #241A1C; }
.tn-save label { display: block; margin-bottom: 8px; font-weight: 700; font-size: 15px; }
.tn-row { display: flex; gap: 8px; } .tn-row input { flex: 1; min-width: 0; padding: 11px 12px; border: 2px solid #241A1C; background: #FFF7E6; color: #2B1C14; font-size: 16px; font-family: inherit; }
.tn-msg { min-height: 18px; margin: 6px 2px 0; font-size: 13px; color: #FFB4A8; }
/* 명예의 전당: 시상대 · LED 판 · 입장권 */
.tn-body.hall { padding-top: 10px; }
.tn-list { list-style: none; padding: 0; }
.tn-list > li { list-style: none; }
.tn-load { padding: 30px 10px; text-align: center; color: #B8A898; }
.tn-podium ol, .tn-ledbox ol { list-style: none; margin: 0; padding: 0; }
.tn-podium > ol { position: relative; height: 268px; background: #3E1E26; border: 3px solid #241A1C; overflow: hidden; }
.tn-podium > ol::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 14px; z-index: 2; background: repeating-linear-gradient(90deg, #B83A48 0 16px, #9A2A38 16px 32px); }
.tn-podium > ol::after { content: ''; position: absolute; left: 0; right: 0; top: 3px; height: 6px; z-index: 3; background: radial-gradient(circle, #FFE9A0 2px, transparent 2.6px) 0 0/16px 6px repeat-x; }
.tn-cf { position: absolute; width: 4px; height: 4px; z-index: 1; }
.tn-dais { position: absolute; left: 3%; right: 3%; bottom: 0; height: 16px; background: #6A4A30; border: 3px solid #241A1C; border-bottom: 0; box-shadow: inset 0 3px 0 #8A6440; z-index: 1; }
.tn-list li.pod { position: absolute; bottom: 16px; width: 31%; display: flex; flex-direction: column; align-items: center; z-index: 2; }
.pod.p1 { left: 50%; transform: translateX(-50%); } .pod.p2 { left: 3.5%; } .pod.p3 { right: 3.5%; }
.tn-beam2 { position: absolute; left: 50%; bottom: 0; width: 150%; height: 400px; transform: translateX(-50%); z-index: -1; pointer-events: none; background: linear-gradient(rgba(255, 238, 180, .26), rgba(255, 238, 180, .04)); clip-path: polygon(42% 0, 58% 0, 100% 100%, 0 100%); }
.tn-face { position: relative; line-height: 0; margin-bottom: 2px; }
.pod.empty .tn-face svg { filter: brightness(0); opacity: .35; }
.pod.empty .tn-face b { position: absolute; left: 50%; top: 30%; transform: translateX(-50%); color: #F2C14E; font-family: Georgia, serif; font-size: 22px; line-height: 1; }
.pod.empty .tn-plate, .pod.empty .tn-plate b { color: #8A6A5A; text-shadow: none; }
.tn-plate { width: 100%; max-width: 104px; margin-bottom: 4px; background: #050404; border: 2px solid #241A1C; padding: 2px 0; text-align: center; font-family: var(--led-font); font-weight: 700; font-size: 12px; line-height: 1.25; color: #FF9E2C; text-shadow: 0 0 4px rgba(255, 140, 30, .6); }
.tn-plate b { display: block; color: #FFC24A; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 3px; } .tn-plate em { font-style: normal; }
.pod.me .tn-plate b, .pod.me .tn-plate em { color: #7CFF8A; text-shadow: 0 0 6px rgba(100, 255, 120, .6); }
/* 받침: 금·은·동 · 세로 줄무늬 · 위아래 테 · 가운데 메달 */
.tn-blk { --c: #E0B040; --hi: #FFE08A; --sh: #B08020; --md: #FFF4C0; width: 100%; box-sizing: border-box; background: repeating-linear-gradient(90deg, var(--c) 0 12px, var(--hi) 12px 14px); border: 3px solid #241A1C; border-bottom: 0; box-shadow: inset 0 6px 0 var(--hi), inset 0 -6px 0 var(--sh); display: flex; justify-content: center; align-items: flex-start; padding-top: 10px; }
.pod.p2 .tn-blk { --c: #B8B8C4; --hi: #E8E8F0; --sh: #8A8A98; --md: #F4F4F8; } .pod.p3 .tn-blk { --c: #B87A48; --hi: #DCA878; --sh: #8A5530; --md: #F6D2A8; }
.tn-blk i { width: 26px; height: 26px; box-sizing: border-box; border-radius: 50%; background: var(--md); border: 3px solid #241A1C; box-shadow: 0 0 0 3px var(--c); display: flex; align-items: center; justify-content: center; font-style: normal; color: #241A1C; font-family: system-ui, -apple-system, 'Segoe UI', sans-serif; font-weight: 900; font-size: 14px; line-height: 1; font-variant-numeric: lining-nums tabular-nums; padding-top: 1px; }
.pod.p1 .tn-blk { height: 82px; } .pod.p2 .tn-blk { height: 58px; } .pod.p3 .tn-blk { height: 44px; padding-top: 7px; }
.pod.p3 .tn-blk i { width: 24px; height: 24px; font-size: 13px; }
.pod.empty .tn-blk { opacity: .55; } .pod.empty .tn-blk i { opacity: 1; }
.tn-ledbox { position: relative; margin-top: 10px; background: #B8303C; border: 3px solid #241A1C; padding: 10px; }
.tn-ledbox::before { content: ''; position: absolute; inset: 2px; background: radial-gradient(circle, #FFE9A0 2.4px, transparent 3px) 0 0/14px 14px; pointer-events: none; -webkit-mask: linear-gradient(#000 0 0) top/100% 7px no-repeat, linear-gradient(#000 0 0) bottom/100% 7px no-repeat, linear-gradient(#000 0 0) left/7px 100% no-repeat, linear-gradient(#000 0 0) right/7px 100% no-repeat; mask: linear-gradient(#000 0 0) top/100% 7px no-repeat, linear-gradient(#000 0 0) bottom/100% 7px no-repeat, linear-gradient(#000 0 0) left/7px 100% no-repeat, linear-gradient(#000 0 0) right/7px 100% no-repeat; }
.tn-ledh { display: block; position: relative; text-align: center; color: #FFE9A0; font-weight: 800; font-size: 12px; font-family: var(--led-font); letter-spacing: 2px; margin-bottom: 6px; }
.tn-ledbox > ol { position: relative; background: #050404; border: 3px solid #241A1C; padding: 6px 10px; }
.tn-list li.tn-r4 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 34px; color: #FF9E2C; font-family: var(--led-font); font-weight: 700; font-size: 16px; text-shadow: 0 0 5px rgba(255, 140, 30, .55); border-bottom: 1px dashed #2A1E18; }
.tn-list li.tn-r4:last-child { border-bottom: 0; }
.tn-r4 i { font-style: normal; width: 22px; color: #FFD27A; text-align: right; }
.tn-r4 b { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .tn-r4 em { font-style: normal; }
.tn-list li.tn-r4.me { color: #7CFF8A; text-shadow: 0 0 6px rgba(100, 255, 120, .6); } .tn-r4.me i { color: #7CFF8A; }
.tn-ask { width: 100%; display: flex; gap: 8px; align-items: center; justify-content: flex-end; font-family: inherit; font-size: 13px; color: #E8DCCC; text-shadow: none; }
.tn-ask button { border: 2px solid #F2A33A; background: transparent; color: #F2A33A; padding: 4px 10px; font-weight: 700; font-size: 13px; font-family: inherit; cursor: pointer; }
.tn-gone { color: #B8A898; font-size: 13px; font-family: inherit; text-shadow: none; }
.tn-list li.pod.gone { height: 70px; justify-content: flex-end; } .tn-list li.pod.gone .tn-gone { margin-bottom: 14px; background: #1A1012; padding: 4px; text-align: center; }
.tn-mine { margin-top: 12px; }
.tn-ticket { display: flex; align-items: center; position: relative; height: 64px; background: #FBF1DC; color: #3A2418; }
.tn-ticket::before, .tn-ticket::after { content: ''; position: absolute; top: 50%; width: 16px; height: 16px; border-radius: 50%; background: #2A1418; transform: translateY(-50%); } .tn-ticket::before { left: -8px; } .tn-ticket::after { right: -8px; }
.tn-ticket .no { width: 74px; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; border-right: 2px dashed #C9A97C; background: #B8303C; color: #FFF4DC; font-family: Georgia, serif; font-weight: 800; font-size: 24px; }
.tn-ticket .no small, .tn-ticket .nm small { font-family: inherit; font-size: 10px; font-weight: 700; color: #FBE9C8; letter-spacing: 1px; }
.tn-ticket .nm { flex: 1; min-width: 0; padding: 0 12px; font-weight: 800; font-size: 17px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } .tn-ticket .nm small { display: block; color: #8A6A4A; letter-spacing: 0; white-space: normal; }
.tn-ticket .sc { padding-right: 18px; font-family: Georgia, serif; font-weight: 800; font-size: 24px; color: #B8303C; }
.tn-total { color: #B8A898; font-size: 14px; text-align: center; }
/* 버스 안 예고: 10번에서 Tuna가 탐 → 11번 가는 동안 좌석 줄 아래를 걷다 빈 자리에 앉음 */
.tuna-tease { position: absolute; inset: 0; z-index: 6; pointer-events: none; }
.tuna-tease .tt-cat { position: absolute; left: -40px; bottom: 0; line-height: 0; transition: left .12s linear; z-index: 2; }
.tuna-tease .tt-cat .flip { transform: scaleX(-1); }
.tuna-tease .tt-cat.hop { animation: ttHop .26s ease-out; }
@keyframes ttHop { 50% { transform: translateY(-14px); } }
.tuna-tease .tt-cat.sit { transition: none; animation: tnPopS .25s ease-out; }
@keyframes tnPopS { from { transform: translateY(-8px); } }
.tuna-tease .tt-bub { position: absolute; left: 12px; bottom: calc(100% + 6px); margin: 0; max-width: 176px; padding: 5px 8px; border-radius: 9px; background: #FFF7E6; color: #2B2118; font-size: 12px; line-height: 1.35; box-shadow: 0 2px 0 rgba(0, 0, 0, .25); }
.tuna-tease .tt-bub b { display: block; font-size: 13px; }

/* (v130-3) 게임 중 Mia: 커튼·천막에서 떨어뜨림 · 좁은 핀 조명 + 발밑 빛 웅덩이 */
.tn-stage.ball .tn-mia { left: 66px; top: 50px; }
.tn-stage.ball .tn-mia::before { content: ''; position: absolute; left: 50%; top: -50px; width: 110px; height: 226px; transform: translateX(-50%); background: linear-gradient(rgba(255, 240, 190, .30), rgba(255, 240, 190, .10)); clip-path: polygon(38% 0, 62% 0, 100% 100%, 0 100%); z-index: -1; pointer-events: none; }
.tn-stage.ball .tn-mia::after { content: ''; position: absolute; left: -22px; right: -22px; bottom: -8px; height: 16px; border-radius: 50%; background: radial-gradient(ellipse, rgba(255, 240, 190, .55), rgba(255, 240, 190, 0) 70%); z-index: -1; pointer-events: none; }
.tn-stage.ball .tn-bub { left: 172px; right: 34px; top: 58px; }
.tn-stage.ball .tn-pad { top: max(226px, 37%); }
/* (v131) 8단원 요약 노트 — 17개 지역 지도 · 축구 카드 */
.rg-map .rg-c { transition: opacity .2s; }
.rg-map.hl .rg-c:not(.on) { opacity: .25; }
.rg-hit, .rg-lb { cursor: pointer; outline: none; }
.rg-pill rect { fill: #FFF7E6; stroke: #1E2027; stroke-width: .7; }
.rg-pill text { fill: #1E2027; font-weight: 800; }
.rg-num circle { fill: #1E2027; stroke: #FFF7E6; stroke-width: 1; }
.rg-num text { fill: #FFF7E6; font-weight: 800; }
.rg-map.hl .rg-lb:not(.on) { opacity: .35; }
.rg-lb.on rect, .rg-lb.on circle, .rg-lb:focus-visible rect, .rg-lb:focus-visible circle { stroke: #F2A33A; stroke-width: 1.4; }
.g-rglg { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.g-rglg button { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px 5px 6px; border-radius: 999px; border: 1px solid #3A3F4A; background: #23262E; color: #E8E4DC; font: inherit; font-size: 12px; cursor: pointer; }
.g-rglg button i { width: 14px; height: 14px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-size: 9px; font-weight: 800; color: #1E2027; }
.g-rglg button.on { border-color: #F2A33A; background: #3A2F22; }
.g-foot { margin: 10px 0 0; display: grid; gap: 8px; }
.gf-team { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border-radius: 12px; background: #23262E; border: 1px solid #2E323B; color: #E8E4DC; font: inherit; text-align: left; cursor: pointer; }
.gf-band { width: 10px; align-self: stretch; border-radius: 4px; flex: none; }
.gf-team b { display: block; font-size: 15px; } .gf-team small { display: block; color: #B8BFCB; font-size: 12px; line-height: 1.5; }
.gf-vs, .gf-bus { margin: 0 !important; }
.gf-vs { padding: 10px 12px; border-radius: 12px; background: #2A2320; border: 1px dashed #6A5240; color: #E8E4DC; font-size: 13px; line-height: 1.5; }
.gf-vs b { color: #F2A33A; }
.gf-bus { padding: 9px 12px; border-radius: 12px; background: #1F2A22; border: 1px solid #2E4A36; color: #DDEBDD; font-size: 13px; line-height: 1.5; }

/* (핫픽스 v129-3) 크리스마스 조형물 전구 반짝 (밤) */
.xl-tw { animation: xltw 1.6s steps(2) infinite; } .xl-tw2 { animation: xltw 1.6s steps(2) .8s infinite; }
@keyframes xltw { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .xl-tw, .xl-tw2 { animation: none; } }
/* (v131-4) 작은 폰(≤380px): 간판 제목 자리를 넓힘 — 시계·버튼·여백을 조금씩 줄임 */
@media (max-width: 380px) {
  .tn-top { gap: 5px; padding-left: 8px; padding-right: 8px; }
  .tn-sign { padding-left: 7px; padding-right: 7px; }
  .tn-top .tn-clock { min-width: 50px; padding: 3px 5px; }
  .tn-top .tn-clock b { font-size: 17px; }
  .tn-top .tn-x, .tn-top .tn-snd { width: 34px; height: 34px; min-width: 34px; min-height: 34px; }
}

/* (v131-9 B안) 시벨레스 밤 조명: 김 서린 창 너머로도 빛이 번져 보이게 (시청 커튼·메니나·트리) */
.xmas-lm.xl-glow { filter: drop-shadow(0 0 2px #FFE08A) drop-shadow(0 0 6px #FFB940); }

/* (v131-10) 랜덤 퀴즈 「라벨 읽기」: 값은 그대로 보이고 칸만 표시 */
.wl-on .wl > div.qsee { position: relative; outline: 2px dashed #A3302A !important; background: rgba(242, 193, 78, .3) !important; border-radius: 3px; animation: qBlink 1.2s ease-in-out infinite alternate; }
@media (prefers-reduced-motion: reduce) { .wl-on .wl > div.qsee { animation: none; } }
