/* 짬뽕지존 — 숯 검정 바탕 + 불꽃 빨강·주황. 간격 4의 배수, 모서리 14/20, 누르는 곳 최소 48px */
:root {
  --bg: #0e0d0c; --bg2: #151311; --card: #1b1916; --card2: #242019; --line: rgba(255, 240, 220, .09); --line2: rgba(255, 240, 220, .16);
  --text: #f6f0e8; --sub: #b9ada0; --dim: #7f746a;
  --red: #e3262b; --fire: #ff6a1a; --gold: #f5b13d; --ok: #47c486; --info: #6aa7ff;
  --grad: linear-gradient(135deg, #ff7a1a 0%, #e3262b 60%, #b3121a 100%);
  --r: 14px; --r2: 20px; --pad: 16px; --tab: 64px;
  --display: 'Black Han Sans', 'Pretendard Variable', sans-serif;
  color-scheme: dark;
}
body.night { --bg: #0a0c13; --bg2: #0f121b; --card: #151a26; --card2: #1b2132; --line: rgba(200, 215, 255, .09); --gold: #ffcf6b; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 'Pretendard Variable', Pretendard, -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif; letter-spacing: -.01em; -webkit-font-smoothing: antialiased; padding-bottom: calc(var(--tab) + env(safe-area-inset-bottom)); transition: background .6s; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -.02em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

/* 머리 */
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 var(--pad); background: rgba(14, 13, 12, .86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
body.night .top { background: rgba(10, 12, 19, .86); }
.logo { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.logo b { font-family: var(--display); font-weight: 400; font-size: 24px; color: var(--red); letter-spacing: 0; text-shadow: 0 0 18px rgba(227, 38, 43, .35); }
.logo small { font-size: 11px; color: var(--sub); font-weight: 600; }
.topnav { display: none; margin-left: auto; gap: 4px; }
.topnav a { padding: 8px 12px; border-radius: 10px; color: var(--sub); font-weight: 600; font-size: 15px; }
.topnav a.on, .topnav a:hover { color: var(--text); background: var(--card); }
.me-chip { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 99px; background: var(--card); border: 1px solid var(--line2); font-size: 14px; font-weight: 700; white-space: nowrap; }
.me-chip.in { border-color: rgba(255, 106, 26, .5); }
.me-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--fire); }
.demo-bar { background: #3a2a0c; color: #ffd98a; font-size: 12.5px; text-align: center; padding: 6px 12px; font-weight: 600; }

/* 아래 탭 */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr); height: calc(var(--tab) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: rgba(14, 13, 12, .94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
body.night .tabbar { background: rgba(10, 12, 19, .94); }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11.5px; font-weight: 600; color: var(--dim); }
.tabbar a.on { color: var(--text); }
.tabbar a.on .ic { background: var(--fire); }
@media (min-width: 900px) {
  .topnav { display: flex; }
  .me-chip { margin-left: 8px; }
  .tabbar { display: none; }
  body { padding-bottom: 0; }
}

/* 아이콘 (마스크) */
.ic { display: inline-block; width: 22px; height: 22px; background: currentColor; -webkit-mask: var(--m) center/contain no-repeat; mask: var(--m) center/contain no-repeat; flex: none; }
.ic-home { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3 2.5 11h2.8v9.5h5.2v-6h3v6h5.2V11h2.8z'/%3E%3C/svg%3E"); }
.ic-fire { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M13.5 1.5s.9 3.2-1.6 6.3c-1.5 1.9-3.9 3.5-3.9 7.1A6 6 0 0 0 20 15c0-2.7-1.3-4.5-2.4-5.6.1 1.6-.5 3-1.6 3.5.4-4.6-2.5-9.4-2.5-11.4zM12 21a3 3 0 0 1-3-3c0-2.1 1.9-3 2.4-5.2 1.4 1.3 3.6 2.9 3.6 5.2a3 3 0 0 1-3 3z'/%3E%3C/svg%3E"); }
.ic-pin { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a7.5 7.5 0 0 0-7.5 7.5C4.5 15 12 22 12 22s7.5-7 7.5-12.5A7.5 7.5 0 0 0 12 2zm0 10.2a2.7 2.7 0 1 1 0-5.4 2.7 2.7 0 0 1 0 5.4z'/%3E%3C/svg%3E"); }
.ic-table { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='7' cy='6' r='3'/%3E%3Ccircle cx='17' cy='6' r='3'/%3E%3Cpath d='M2 12h20v2.5H2zM4.5 15.5h2.5V22H4.5zm12.5 0h2.5V22H17zM1.5 11c.6-1.7 2.4-2.6 5.5-2.6s4.9.9 5 2.6zm11 0c.6-1.7 2.4-2.6 5.5-2.6s4.9.9 5 2.6z'/%3E%3C/svg%3E"); }
.ic-stamp { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a4 4 0 0 0-4 4c0 2.2 1.5 3.2 1.5 5H6a3 3 0 0 0-3 3v2h18v-2a3 3 0 0 0-3-3h-3.5c0-1.8 1.5-2.8 1.5-5a4 4 0 0 0-4-4zM4 18h16v3H4z'/%3E%3C/svg%3E"); }
.ic-card { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 2h14a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2zm2 5v2h10V7zm0 4v2h10v-2zm0 4v2h6v-2z'/%3E%3C/svg%3E"); }
.ic-book { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 3h7a2 2 0 0 1 2 2v16a2 2 0 0 0-2-2H4zm16 0h-5a2 2 0 0 0-2 2v16a2 2 0 0 1 2-2h5z'/%3E%3C/svg%3E"); }
.ic-note { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M2 5h20v14H2zm2 2v.5l8 5.5 8-5.5V7z'/%3E%3C/svg%3E"); }
.ic-phone { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8a15.1 15.1 0 0 0 6.6 6.6l2.2-2.2a1 1 0 0 1 1-.25 11.4 11.4 0 0 0 3.6.57 1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.45.57 3.6a1 1 0 0 1-.25 1z'/%3E%3C/svg%3E"); }
.ic-moon { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20.5 14.5A8.5 8.5 0 0 1 9.5 3.5a8.5 8.5 0 1 0 11 11z'/%3E%3C/svg%3E"); }
.ic-rain { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18 9.5A6 6 0 0 0 6.3 8 4.5 4.5 0 0 0 6.5 17H18a3.8 3.8 0 0 0 0-7.5zM8 19l-1 3h1.6l1-3zm4 0-1 3h1.6l1-3zm4 0-1 3h1.6l1-3z'/%3E%3C/svg%3E"); }
.ic-back { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M15.5 4 7.5 12l8 8 1.8-1.8L11 12l6.3-6.2z'/%3E%3C/svg%3E"); }
.ic-share { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18 16a3 3 0 0 0-2.4 1.2l-6.8-3.7a3 3 0 0 0 0-1l6.8-3.7A3 3 0 1 0 15 7l-6.8 3.7a3 3 0 1 0 0 2.6L15 17a3 3 0 1 0 3-1z'/%3E%3C/svg%3E"); }

/* 공통 틀 */
#view { display: block; max-width: 1080px; margin: 0 auto; outline: none; }
.wrap { padding: 20px var(--pad) 40px; }
.narrow { max-width: 560px; margin: 0 auto; }
.sec { margin-top: 28px; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.sec-h h2 { font-size: 20px; font-weight: 800; }
.sec-h a, .sec-h button { font-size: 14px; color: var(--sub); font-weight: 600; }
.eyebrow { font-size: 12.5px; font-weight: 800; letter-spacing: .06em; color: var(--fire); }
.muted { color: var(--sub); }
.dim { color: var(--dim); font-size: 13px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r2); padding: 18px; }
.card + .card { margin-top: 12px; }
.row { display: flex; align-items: center; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 12px; border-radius: 99px; background: var(--card2); border: 1px solid var(--line); font-size: 13.5px; font-weight: 600; color: var(--sub); }
.chip.hot { color: #ffd2b8; border-color: rgba(255, 106, 26, .45); background: rgba(255, 106, 26, .12); }
.chip.demo { color: #ffd98a; border-color: rgba(245, 177, 61, .45); background: rgba(245, 177, 61, .1); }
button.chip { cursor: pointer; }
button.chip.on { color: #fff; background: var(--red); border-color: var(--red); }
.tag-demo { display: inline-block; font-size: 11px; font-weight: 800; color: #1a1205; background: var(--gold); padding: 1px 7px; border-radius: 5px; vertical-align: 2px; margin-left: 6px; }

/* 단추 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 22px; border-radius: var(--r); font-weight: 800; font-size: 16.5px; background: var(--card2); border: 1px solid var(--line2); color: var(--text); transition: transform .12s, filter .12s; text-align: center; }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--grad); border: 0; color: #fff; box-shadow: 0 8px 28px -10px rgba(227, 38, 43, .7); }
.btn.kakao { background: #fee500; color: #191600; border: 0; }
.btn.ghost { background: transparent; }
.btn.block { display: flex; width: 100%; }
.btn.sm { min-height: 40px; padding: 0 14px; font-size: 14.5px; border-radius: 12px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btns { display: grid; gap: 10px; }
.btns.two { grid-template-columns: 1fr 1fr; }
.link { color: var(--gold); font-weight: 700; }

/* 홈 히어로 */
.hero { position: relative; min-height: 440px; display: flex; align-items: flex-end; overflow: hidden; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 62% 40%; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14, 13, 12, .1) 0%, rgba(14, 13, 12, .55) 45%, var(--bg) 96%); }
.hero-in { position: relative; z-index: 1; padding: 24px var(--pad) 8px; width: 100%; max-width: 640px; }
.hero h1 { font-family: var(--display); font-weight: 400; font-size: clamp(38px, 10vw, 60px); line-height: 1.08; letter-spacing: -.01em; margin: 10px 0 10px; }
.hero h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: #e2d6c9; font-size: 16px; margin-bottom: 18px; }
.hero .btns { grid-template-columns: 1fr 1fr; }
.hero .btns .primary { grid-column: 1 / -1; }
@media (min-width: 900px) { .hero { min-height: 520px; border-radius: 0 0 28px 28px; } .hero-in { padding: 40px 40px 32px; } }

/* 오늘의 짬뽕 지수 */
.index { position: relative; overflow: hidden; }
.index .num { font-family: var(--display); font-size: 72px; line-height: 1; letter-spacing: -.02em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.index .num small { font-size: 22px; color: var(--sub); -webkit-text-fill-color: var(--sub); margin-left: 4px; }
.gauge { height: 10px; border-radius: 99px; background: var(--card2); overflow: hidden; margin: 14px 0 12px; }
.gauge i { display: block; height: 100%; width: 0; background: var(--grad); border-radius: 99px; transition: width 1.2s cubic-bezier(.2, .8, .2, 1); }
.index .say { font-size: 18px; font-weight: 800; margin-top: 6px; }
.index .where { position: absolute; top: 16px; right: 16px; }

/* 개인 추천(조율기) */
.tuner { background: linear-gradient(135deg, rgba(255, 106, 26, .16), rgba(227, 38, 43, .06)); border-color: rgba(255, 106, 26, .35); }
.tuner .big { font-family: var(--display); font-size: 30px; line-height: 1.15; margin: 4px 0 6px; }

/* 맵기 사다리 */
.ladder { display: grid; gap: 8px; }
.rung { display: grid; grid-template-columns: 92px 1fr auto; align-items: center; gap: 12px; min-height: 58px; padding: 10px 14px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); text-align: left; width: 100%; }
.rung .lv { font-weight: 900; font-size: 15px; }
.rung .ds { color: var(--sub); font-size: 14px; }
.rung .flames { display: flex; gap: 2px; color: var(--fire); }
.rung .flames .ic { width: 15px; height: 15px; }
.rung .flames .off { color: #3b332c; }
.rung.on { border-color: var(--fire); background: rgba(255, 106, 26, .1); }
.rung[data-k=base] .lv { color: var(--gold); }
.rung[data-k=h1] .lv { color: #ff9a4d; }
.rung[data-k=h2] .lv { color: #ff6a1a; }
.rung[data-k=h3] .lv { color: #ff3d2e; }
.rung[data-k=h4] .lv { color: #ff1f3d; }

/* 기능 타일 */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { display: flex; flex-direction: column; gap: 8px; min-height: 132px; padding: 16px; border-radius: var(--r2); background: var(--card); border: 1px solid var(--line); }
.tile .ic { width: 28px; height: 28px; color: var(--fire); }
.tile b { font-size: 16.5px; }
.tile span { font-size: 13.5px; color: var(--sub); line-height: 1.45; }
@media (min-width: 900px) { .tiles { grid-template-columns: repeat(4, 1fr); } }

/* 메뉴 */
.hscroll { display: grid; grid-auto-flow: column; grid-auto-columns: 72%; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; margin: 0 calc(var(--pad) * -1); padding-left: var(--pad); padding-right: var(--pad); scrollbar-width: none; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { scroll-snap-align: start; }
@media (min-width: 900px) { .hscroll { grid-auto-columns: 30%; } }
.menu-card { border-radius: var(--r2); overflow: hidden; background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; }
.menu-card .ph { aspect-ratio: 16 / 10; background: #201b16; position: relative; overflow: hidden; }
.menu-card .ph img { width: 100%; height: 100%; object-fit: cover; }
.menu-card .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.menu-card b { font-size: 17px; }
.menu-card p { font-size: 13.5px; color: var(--sub); line-height: 1.45; }
.noph { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: radial-gradient(circle at 50% 60%, #3a1d12, #1c1612 70%); color: #8d6b55; font-size: 12px; font-weight: 700; }
.noph b { font-family: var(--display); font-weight: 400; font-size: 26px; color: #d9a07c; }
.grid-menu { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (min-width: 900px) { .grid-menu { grid-template-columns: repeat(4, 1fr); } }
.grid-menu .menu-card b { font-size: 15.5px; }
.grid-menu .menu-card p { font-size: 12.5px; }

/* 약속 */
.promises { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.promise { padding: 16px; border-radius: var(--r2); background: var(--card); border: 1px solid var(--line); }
.promise .no { font-family: var(--display); color: var(--red); font-size: 22px; }
.promise b { display: block; margin: 4px 0 2px; }
.promise p { font-size: 13.5px; color: var(--sub); }
@media (min-width: 900px) { .promises { grid-template-columns: repeat(4, 1fr); } }

/* 진단 */
.quiz { min-height: calc(100vh - 56px - var(--tab)); display: flex; flex-direction: column; }
.progress { height: 6px; background: var(--card2); border-radius: 99px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--grad); transition: width .4s; }
.qnum { margin-top: 26px; font-weight: 800; color: var(--fire); font-size: 14px; }
.qtext { font-size: 27px; font-weight: 900; margin: 6px 0 22px; line-height: 1.3; }
.opts { display: grid; gap: 10px; }
.opt { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 14px 18px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line2); font-size: 17px; font-weight: 700; text-align: left; transition: border-color .15s, background .15s, transform .1s; }
.opt:active { transform: scale(.985); }
.opt.on { border-color: var(--fire); background: rgba(255, 106, 26, .12); }
.opt .k { flex: none; width: 30px; height: 30px; border-radius: 9px; background: var(--card2); display: grid; place-items: center; font-size: 13px; color: var(--sub); }
.result-type { font-family: var(--display); font-size: clamp(40px, 11vw, 58px); line-height: 1.05; margin: 8px 0 10px; }
.result-type em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* 주문 카드·테이블 */
.order-line { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.order-line:first-child { border-top: 0; }
.order-line .nm { font-weight: 800; font-size: 17px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line2); border-radius: 12px; overflow: hidden; }
.qty button { width: 40px; height: 40px; font-size: 20px; font-weight: 700; }
.qty span { min-width: 28px; text-align: center; font-weight: 800; }
.lvpick { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; }
.lvpick button { min-height: 36px; padding: 0 12px; border-radius: 10px; background: var(--card2); border: 1px solid var(--line); font-size: 13.5px; font-weight: 700; color: var(--sub); }
.lvpick button.on { background: var(--red); border-color: var(--red); color: #fff; }
.show { position: fixed; inset: 0; z-index: 60; background: #000; color: #fff; display: flex; flex-direction: column; padding: max(24px, env(safe-area-inset-top)) 22px max(24px, env(safe-area-inset-bottom)); overflow-y: auto; }
.show .hd { font-size: 15px; color: #bbb; font-weight: 700; }
.show .item { font-size: clamp(30px, 8.5vw, 52px); font-weight: 900; line-height: 1.2; padding: 14px 0; border-bottom: 1px solid #222; }
.show .item small { display: block; font-size: .5em; color: var(--fire); font-weight: 800; margin-top: 4px; }
.show .close { margin-top: auto; padding-top: 24px; }
.table-code { font-family: var(--display); font-size: 44px; letter-spacing: .12em; color: var(--gold); }
.qr { background: #fff; padding: 10px; border-radius: 12px; width: 148px; height: 148px; flex: none; }
.qr img, .qr svg { width: 100%; height: 100%; }
.member { padding: 12px 0; border-top: 1px solid var(--line); }
.member:first-child { border-top: 0; }
.wheel { position: relative; width: 240px; height: 240px; margin: 12px auto; border-radius: 50%; border: 6px solid var(--card2); overflow: hidden; transition: transform 3.2s cubic-bezier(.12, .7, .1, 1); }
.wheel-pin { width: 0; height: 0; margin: 0 auto -18px; border: 12px solid transparent; border-top: 20px solid var(--gold); position: relative; z-index: 2; }

/* 매장 */
.search { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 16px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line2); }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font-size: 16px; }
.store { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 16px 0; border-top: 1px solid var(--line); }
.store:first-child { border-top: 0; }
.store .nm { font-weight: 800; font-size: 17px; }
.store .ad { font-size: 14px; color: var(--sub); }
.store .acts { grid-column: 1 / -1; display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.store .dist { font-weight: 800; color: var(--gold); font-size: 14px; white-space: nowrap; }
.badge24 { display: inline-block; font-size: 11px; font-weight: 900; padding: 2px 6px; border-radius: 6px; background: #20324f; color: #9cc2ff; margin-left: 6px; vertical-align: 2px; }
#map { height: 320px; border-radius: var(--r2); overflow: hidden; background: var(--card); border: 1px solid var(--line); }

/* 스탬프 */
.stampcard { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 14px 0 6px; }
.slot { aspect-ratio: 1; border-radius: 50%; border: 2px dashed #463b31; display: grid; place-items: center; font-weight: 800; color: #5b4d40; font-size: 14px; }
.slot.on { border: 3px solid var(--red); color: var(--red); background: radial-gradient(circle, rgba(227, 38, 43, .16), transparent 70%); transform: rotate(-12deg); font-family: var(--display); font-size: 15px; }
.seal { width: 168px; height: 168px; margin: 18px auto; border-radius: 50%; border: 6px double var(--red); color: var(--red); display: grid; place-items: center; text-align: center; font-family: var(--display); font-size: 30px; line-height: 1.05; transform: rotate(-14deg); animation: press .55s cubic-bezier(.2, 1.4, .4, 1) both; box-shadow: inset 0 0 30px rgba(227, 38, 43, .25); }
.seal small { display: block; font-family: 'Pretendard Variable', sans-serif; font-size: 12px; font-weight: 800; }
@keyframes press { from { transform: rotate(-14deg) scale(1.8); opacity: 0; } 60% { opacity: 1; } to { transform: rotate(-14deg) scale(1); opacity: 1; } }
.codebox { width: 100%; height: 76px; text-align: center; font-family: var(--display); font-size: 42px; letter-spacing: .3em; background: var(--card); border: 2px solid var(--line2); border-radius: var(--r2); outline: 0; padding-left: .3em; }
.codebox:focus { border-color: var(--fire); }
.letter { position: relative; padding: 22px 20px; border-radius: 6px; background: #f3e7d2; color: #2b2118; font-size: 17px; line-height: 1.6; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .6); transform: rotate(-1.2deg); animation: unfold .6s ease both; }
.letter small { display: block; margin-top: 10px; font-size: 12.5px; color: #7a6650; }
@keyframes unfold { from { transform: rotate(-1.2deg) scaleY(.2); opacity: 0; } to { transform: rotate(-1.2deg) scaleY(1); opacity: 1; } }
.feel { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.feel button { min-height: 64px; border-radius: var(--r); background: var(--card2); border: 1px solid var(--line2); font-weight: 800; font-size: 15px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.feel button small { font-size: 12px; color: var(--sub); font-weight: 600; }
.feel button.on { border-color: var(--fire); background: rgba(255, 106, 26, .14); }

/* 지갑 */
.level { display: flex; align-items: center; gap: 14px; }
.level .medal { width: 64px; height: 64px; flex: none; border-radius: 18px; background: var(--grad); display: grid; place-items: center; font-family: var(--display); font-size: 26px; color: #fff; box-shadow: 0 8px 24px -8px rgba(227, 38, 43, .7); }
.bar { height: 8px; border-radius: 99px; background: var(--card2); overflow: hidden; margin-top: 8px; }
.bar i { display: block; height: 100%; background: var(--grad); }
.coupon { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 18px; border-radius: var(--r2); background: linear-gradient(135deg, #2a1610, #1b1916); border: 1px solid rgba(255, 106, 26, .3); }
.coupon.used { opacity: .5; filter: grayscale(.8); }
.coupon .t { font-weight: 900; font-size: 18px; }
.coupon .code { font-family: var(--display); letter-spacing: .14em; color: var(--gold); font-size: 22px; }
.coupon::before, .coupon::after { content: ''; position: absolute; top: 50%; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); transform: translateY(-50%); }
.coupon::before { left: -9px; } .coupon::after { right: -9px; }
.hist { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.hist:first-child { border-top: 0; }
.hist .d { width: 48px; flex: none; text-align: center; font-weight: 800; color: var(--sub); font-size: 13px; line-height: 1.3; }
.hist .d b { display: block; color: var(--text); font-size: 20px; }

/* 도감 */
.dex { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
@media (min-width: 900px) { .dex { grid-template-columns: repeat(6, 1fr); } }
.dex-item { border-radius: var(--r); overflow: hidden; background: var(--card); border: 1px solid var(--line); }
.dex-item .ph { aspect-ratio: 1; position: relative; background: #1e1915; }
.dex-item .ph img { width: 100%; height: 100%; object-fit: cover; }
.dex-item.no .ph img { filter: grayscale(1) brightness(.25) blur(1px); }
.dex-item.no .ph::after { content: '?'; position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-size: 40px; color: #5d5047; }
.dex-item .nm { padding: 8px 8px 10px; font-size: 13px; font-weight: 800; line-height: 1.3; }
.dex-item .nm small { display: block; color: var(--sub); font-weight: 600; font-size: 11px; }

/* 폼 */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 14px; font-weight: 700; color: var(--sub); }
.input, textarea.input, select.input { width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 12px; background: var(--card); border: 1px solid var(--line2); outline: 0; font-size: 16px; }
.input:focus { border-color: var(--fire); }
textarea.input { min-height: 110px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; }
.check input { width: 22px; height: 22px; accent-color: var(--red); flex: none; margin-top: 1px; }

/* 이야기 */
.story-hero { position: relative; border-radius: var(--r2); overflow: hidden; min-height: 260px; display: flex; align-items: flex-end; }
.story-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.story-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 30%, rgba(0, 0, 0, .85)); }
.story-hero div { position: relative; z-index: 1; padding: 20px; }
.timeline { border-left: 2px solid var(--line2); margin-left: 8px; padding-left: 18px; display: grid; gap: 18px; }
.timeline div { position: relative; }
.timeline div::before { content: ''; position: absolute; left: -25px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--red); }
.timeline b { color: var(--gold); }
.legal { white-space: pre-wrap; font-size: 15px; line-height: 1.75; color: #ded3c7; }

/* 밤 */
.night-banner { background: linear-gradient(135deg, #18213a, #0f1320); border: 1px solid rgba(140, 170, 255, .25); }
.night-banner .ic { color: var(--gold); width: 28px; height: 28px; }

/* 아래 */
.foot { padding: 28px var(--pad) 36px; border-top: 1px solid var(--line); color: var(--dim); font-size: 12.5px; line-height: 1.8; margin-top: 36px; }
.foot a { color: var(--sub); font-weight: 600; }
.foot .links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 10px; }

/* 창·알림 */
.modal { position: fixed; inset: 0; z-index: 80; background: rgba(0, 0, 0, .65); display: flex; align-items: flex-end; justify-content: center; padding: 16px; animation: fade .18s; }
.modal .box { width: 100%; max-width: 440px; background: var(--card); border: 1px solid var(--line2); border-radius: 22px; padding: 22px; max-height: 88vh; overflow-y: auto; animation: up .22s cubic-bezier(.2, .8, .2, 1); }
.modal h3 { font-size: 20px; margin-bottom: 8px; }
@media (min-width: 600px) { .modal { align-items: center; } }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
.toast { position: fixed; left: 50%; bottom: calc(var(--tab) + 18px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px); z-index: 90; background: #f6f0e8; color: #17130f; font-weight: 700; font-size: 15px; padding: 12px 18px; border-radius: 14px; opacity: 0; pointer-events: none; transition: .25s; max-width: calc(100% - 32px); text-align: center; }
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (min-width: 900px) { .toast { bottom: 28px; } }
.empty { text-align: center; padding: 36px 16px; color: var(--sub); }
.empty b { display: block; color: var(--text); font-size: 17px; margin-bottom: 4px; }
.backlink { display: inline-flex; align-items: center; gap: 2px; color: var(--sub); font-weight: 700; font-size: 15px; margin-bottom: 8px; min-height: 40px; }
.skel { background: linear-gradient(90deg, var(--card), var(--card2), var(--card)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: var(--r2); }
@keyframes sk { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
