/* CONCONTOWN BI: BLUE #12325B / PINK #FF8FA9 / GRAY #A3A6AA / WHITE #FFFFFF
   신호등은 색과 문구를 함께 쓴다. 적색은 혼잡 경고에만, 핑크는 브랜드 강조에만 사용한다. */
:root {
  --blue: #12325b;
  --pink: #ff8fa9;
  --pink-soft: #ffe9ef;
  --pink-faint: #fff6f8;
  --gray: #a3a6aa;
  --line: #e9e6ea;
  --bg: #f5f2f4;
  --paper: #fffdfd;
  --text: #1c2a44;
  --muted: #6c7385;
  --red: #e5484d;
  --yellow: #f2b01e;
  --green: #35a56a;
  --radius: 16px;
  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", "Meiryo", "Noto Sans JP", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Malgun Gothic", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", Consolas, "Roboto Mono", monospace;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.center { text-align: center; }
.pad { padding: 28px 0; }
.small { font-size: 13px; }
.muted { color: var(--muted); }
.light { color: #d9e2f2; }
.strong { font-weight: 700; margin: 0 0 14px; }
.mono { font: 600 11px/1.5 var(--mono); letter-spacing: 1.2px; }

.page { max-width: 460px; min-height: 100vh; margin: 0 auto; background: var(--paper); padding: 0 22px 28px; box-shadow: 0 0 0 1px #f0ecee; }
.top { height: 62px; display: flex; align-items: center; justify-content: space-between; }
.top .logo { display: block; line-height: 0; }
.top img { width: 146px; height: auto; display: block; }
#lang { appearance: none; border: 0; background: transparent; font-weight: 700; font-size: 13px; padding: 8px 6px; color: var(--blue); cursor: pointer; }
#lang:focus-visible, .btn:focus-visible, .mv:focus-visible, .link:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid var(--pink); outline-offset: 2px; }
footer { text-align: center; margin-top: 30px; color: #8a8490; font: 10px/1.4 var(--mono); letter-spacing: 1.4px; }

/* 첫 화면 히어로 */
.hero { position: relative; margin: 0 -22px; min-height: clamp(340px, 52svh, 470px); padding: 22px; color: #fff; display: flex; flex-direction: column;
  background: #14233e url("/assets/hero.jpg") center 92% / cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 18, 40, .35), rgba(10, 18, 40, 0) 38%, rgba(10, 18, 40, .55)); pointer-events: none; }
.hero > * { position: relative; z-index: 1; }
.hero-meta { color: #d2ef87; font: 700 10px/1.5 var(--mono); letter-spacing: 2px; }
.tour-logo { display: block; width: min(77%, 285px); height: auto; margin: 26px 0 0; filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .35)); }
.hero-foot { margin-top: auto; border-top: 1px solid rgba(255, 255, 255, .45); padding-top: 9px; display: flex; justify-content: space-between; align-items: center; text-shadow: 0 1px 5px #000; }
.hero-foot b { font: 700 10px/1.5 var(--mono); letter-spacing: 1.4px; }
.hero-foot span { font: 8px/1.4 var(--mono); letter-spacing: .5px; }

.eyebrow { margin: 24px 0 4px; color: #6e5a66; font: 700 10px/1.5 var(--mono); letter-spacing: 2px; }
.lead { font-size: 25px; line-height: 1.35; margin: 4px 0 8px; font-weight: 800; letter-spacing: -.5px; color: var(--blue); }
.sub { font-size: 18px; margin: 10px 0 6px; color: var(--blue); }
.desc { color: #4b5368; font-size: 14.5px; margin: 6px 0 18px; }
.label { margin: 14px 0 2px; font-size: 12px; color: var(--muted); }
.masked { font-size: 28px; font-weight: 800; letter-spacing: 4px; color: var(--blue); margin: 2px 0 8px; }

/* 버튼 */
.btn { display: block; width: 100%; min-height: 52px; padding: 14px 18px; border: 1px solid var(--blue); border-radius: 14px; font-weight: 800; font-size: 16px; text-align: left; text-decoration: none; margin: 10px 0; transition: transform .08s, opacity .15s; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--blue); color: #fff; }
.btn.alt { background: var(--pink-soft); color: var(--blue); border-color: var(--pink-soft); }
.btn.ghost { background: #fff; color: var(--blue); }
.btn.arrow::after { content: "→"; float: right; }
.btn:disabled { opacity: .45; cursor: default; }
.btn.add { background: #fff; color: var(--blue); border: 1.5px dashed var(--pink); text-align: center; min-height: 48px; }
.link { background: none; border: 0; padding: 12px 4px; color: var(--blue); text-decoration: underline; text-underline-offset: 3px; font-size: 14px; min-height: 44px; }
.link:disabled { color: var(--gray); text-decoration: none; }
input[type=text], input[type=email] { display: block; width: 100%; min-height: 52px; padding: 12px 14px; border: 1.5px solid #d7d3da; border-radius: 12px; background: #fff; margin: 8px 0; font-size: 16px; }
input.code { text-align: center; letter-spacing: 10px; font-size: 26px; font-weight: 800; font-family: var(--mono); }

/* 알림 */
.notice { padding: 12px 14px; border-radius: 12px; font-size: 14px; margin: 12px 0; }
.notice.error { background: #fdecec; color: #9b1c1f; }
.notice.warn { background: #fff4d8; color: #7a5300; }
.notice.ok { background: #e6f6ed; color: #17653d; }
.toast { position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 20px); max-width: min(92vw, 420px); background: #1c2a44; color: #fff; padding: 12px 16px; border-radius: 12px; font-size: 14px; opacity: 0; pointer-events: none; transition: .25s; z-index: 50; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: #9b1c1f; }

/* 행사 카드 */
.ev-card { position: relative; display: block; text-decoration: none; margin: 12px 0; padding: 16px 18px 15px 20px; background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--pink); border-radius: var(--radius); box-shadow: 0 1px 0 rgba(18, 50, 91, .04); }
.ev-top { display: flex; justify-content: space-between; color: var(--muted); }
.arrow-ico { font-size: 20px; color: #8a90a0; line-height: 1; }
.ev-name { font-size: 26px; font-weight: 800; color: var(--blue); margin: 4px 0 6px; }
.ev-meta { display: flex; gap: 10px; align-items: center; font-size: 14px; color: #4b5368; }
.ev-counts { margin-top: 8px; font-size: 13px; color: var(--muted); }
.chip { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; background: #eef1e8; color: #3a5a2a; }
.chip.open { background: var(--pink-soft); color: #a3294b; }
.chip.upcoming, .chip.unset { background: #eceef2; color: #5a6173; }
.chip.closed { background: #efeff1; color: #7a7f8c; }
.chip.on-dark { background: rgba(255, 255, 255, .16); color: #fff; }

/* 타이머 */
.timer { margin: 12px 0 16px; padding: 14px 16px; border-radius: var(--radius); background: linear-gradient(135deg, #12325b, #27497f); color: #fff; }
.timer.closed { background: linear-gradient(135deg, #4a5167, #6a7186); }
.timer.upcoming { background: linear-gradient(135deg, #3b4f78, #5a6c94); }
.timer-row { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.tick { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.timer p { margin: 6px 0 0; }

/* 순위 카드 */
.card { margin: 12px 0; padding: 16px 16px 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.card.ranked { border-left: 5px solid var(--pink); }
.card.unranked { background: #fcfbfc; }
.card-head { display: flex; align-items: center; margin-bottom: 8px; }
.rank-badge { display: inline-block; padding: 3px 12px; border-radius: 999px; background: var(--pink); color: #fff; font-weight: 800; font-size: 13px; }
.rank-badge.none { background: #eceef2; color: #5a6173; }
.plan { display: flex; align-items: baseline; gap: 12px; }
.plan .code { font-size: 28px; font-weight: 800; color: var(--blue); letter-spacing: -.5px; }
.plan .room { font-size: 18px; font-weight: 800; color: var(--blue); }
.meta { margin-top: 4px; font-size: 14px; color: #4b5368; }
.meta.hotel { font-weight: 700; }
.meta.mono { color: var(--muted); }
.signal { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: #f6f6f8; }
.signal .dot { flex: none; width: 16px; height: 16px; border-radius: 50%; margin-top: 4px; background: var(--gray); box-shadow: 0 0 0 4px rgba(163, 166, 170, .2); }
.sig-text { display: flex; flex-direction: column; font-size: 13px; line-height: 1.45; }
.sig-text strong { font-size: 14px; }
.sig-text small { font-size: 11px; color: var(--muted); font-weight: 700; letter-spacing: .3px; }
.signal.hotel-low { margin-top: 10px; }
.sig-red { background: #fdeeee; } .sig-red .dot { background: var(--red); box-shadow: 0 0 0 4px rgba(229, 72, 77, .2); }
.sig-yellow { background: #fff6dc; } .sig-yellow .dot { background: var(--yellow); box-shadow: 0 0 0 4px rgba(242, 176, 30, .25); }
.sig-green { background: #e9f6ef; } .sig-green .dot { background: var(--green); box-shadow: 0 0 0 4px rgba(53, 165, 106, .2); }
.card-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.mv-row { display: flex; gap: 10px; }
.mv { width: 52px; height: 48px; border: 1.5px solid #cdd3df; background: #f2f5fa; color: var(--blue); border-radius: 12px; font-size: 22px; font-weight: 800; }
.mv:disabled { opacity: .35; cursor: default; }
.mv:not(:disabled):active { background: var(--pink-soft); border-color: var(--pink); }
.divider { height: 1px; background: var(--line); margin: 22px 0 8px; }
.row-links { display: flex; justify-content: space-between; margin-top: 12px; }
.spacer { height: 96px; }

/* 저장 막대: 모바일 화면 하단에 고정 */
.savebar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; align-items: center; gap: 12px; justify-content: space-between; max-width: 460px; margin: 0 auto; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); background: rgba(255, 253, 253, .96); backdrop-filter: blur(8px); border-top: 1px solid var(--line); box-shadow: 0 -6px 18px rgba(18, 50, 91, .08); }
.savebar .state { font-size: 13px; font-weight: 700; color: var(--muted); }
.savebar .state.dirty { color: #a3294b; }
.savebar .save { width: auto; min-width: 170px; text-align: center; margin: 0; }

/* 튜토리얼 */
.tut-art { margin: 8px 0 4px; padding: 14px; border-radius: 20px; background: var(--pink-faint); border: 1px solid var(--pink-soft); }
.tut-art svg { display: block; width: 100%; height: auto; max-height: 220px; }
.dots { display: flex; gap: 8px; justify-content: center; margin: 8px 0 14px; }
.dots span { width: 8px; height: 8px; border-radius: 50%; background: #dcd8de; }
.dots span.on { background: var(--pink); width: 22px; border-radius: 6px; }

dialog.dlg { border: 0; border-radius: 16px; padding: 22px; width: min(360px, 90vw); color: var(--text); }
dialog.dlg::backdrop { background: rgba(18, 36, 64, .55); }
.dlg-actions { display: flex; gap: 10px; }
.dlg-actions .btn { margin: 0; text-align: center; }

@media (min-width: 700px) { body { padding: 24px 0; } .page { border-radius: 24px; min-height: calc(100vh - 48px); overflow: hidden; } .savebar { border-radius: 16px 16px 0 0; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
