/* 까마귀거리 — the overlay over the 3D street.
   One theme: smoked dark glass over the bright daylight scene (the 산사 reference), sheets included; no light panels.
   One accent: emerald (a gem colour), only for live counts, prices, the "me" badge and focus.
   Shape rule: anything you press is a full pill; a sheet is 22px; anything inside a sheet (image, card, input) is 14px.
   Layers: name tags 4 · bars 5 · town menu 6 · sheets 20. Measured on phone widths by tools/ui.mjs. */
:root {
  --ink: #111113;
  --panel: #161619;
  --panel-2: #1f1f23;
  --panel-3: #2a2a2f;
  --glass: rgba(17, 17, 19, .64);
  --line: rgba(255, 255, 255, .1);
  --line-2: rgba(255, 255, 255, .18);
  --text: #f4f4f5;
  --text-2: #a1a1aa;
  --text-3: #8b8b94;
  --accent: #6ee7b7;
  --error: #fca5a5;
  --r-sheet: 22px;
  --r-inner: 14px;
  --font: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}
html, body { height: 100%; margin: 0; }
body {
  background: var(--ink); color: var(--text); font-family: var(--font); font-feature-settings: "ss06"; word-break: keep-all;
  -webkit-font-smoothing: antialiased; overflow: hidden; overscroll-behavior: none; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; }
#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
button, a, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ph { font-size: 1.25em; line-height: 1; }

/* ------------------------------------------------------------------ the start screen (until the first frame) */
.boot { position: fixed; inset: 0; z-index: 40; display: grid; place-content: center; justify-items: center; gap: 14px; padding: 24px; background: var(--ink); color: var(--text-2); text-align: center; transition: opacity .45s var(--ease); }
.boot .ph { font-size: 42px; color: var(--text); }
.boot p { margin: 0; font-size: .95rem; }
.boot-name { margin: -4px 0 0; font-size: 1.5rem; font-weight: 800; letter-spacing: -.03em; color: var(--text); }
.boot.gone { opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: no-preference) { .boot .ph { animation: bob 1.4s ease-in-out infinite alternate; } }
@keyframes bob { to { transform: translateY(-6px); } }

/* ------------------------------------------------------------------ glass */
.glass { background: var(--glass); border: 1px solid var(--line); color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 8px 24px rgba(8, 8, 10, .22);
  -webkit-backdrop-filter: blur(20px) saturate(1.4); backdrop-filter: blur(20px) saturate(1.4); }
@media (prefers-reduced-transparency: reduce) { .glass { background: var(--panel); -webkit-backdrop-filter: none; backdrop-filter: none; } }

/* ------------------------------------------------------------------ top bar */
.ui { position: fixed; left: 0; right: 0; display: flex; padding-inline: 14px; pointer-events: none; z-index: 5; }
.ui .glass, .ui button, .ui a { pointer-events: auto; }
.top { top: 0; padding-top: calc(var(--safe-t) + 12px); align-items: flex-start; justify-content: space-between; gap: 8px; }
.pill { display: flex; align-items: center; height: 48px; border-radius: 999px; padding: 0 6px; }
.mark { font-size: 22px; width: 36px; text-align: center; }
.townbtn { background: none; border: 0; padding: 0 4px 0 0; display: flex; align-items: center; gap: 3px; font-size: 1.06rem; font-weight: 700; letter-spacing: -.02em; }
.townbtn .ph { font-size: 14px; color: var(--text-2); }
.stat { display: flex; align-items: baseline; gap: 0; margin-left: 8px; padding: 0 12px 0 12px; border-left: 1px solid var(--line-2); font-size: .86rem; font-weight: 500; color: var(--text-2); white-space: nowrap; }
.stat em { font-style: normal; font-weight: 700; font-size: .98rem; color: var(--accent); font-variant-numeric: tabular-nums; margin-right: 1px; }
#open-count { margin-left: 4px; }
.stat .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--text-3); margin: 0 5px; align-self: center; }
.icons { padding: 0 4px; gap: 2px; }
.ic { width: 40px; height: 40px; border-radius: 999px; border: 0; background: transparent; display: grid; place-items: center; }
.ic .ph { font-size: 22px; }
.ic:active { background: rgba(255, 255, 255, .12); }
.pop { position: absolute; left: 14px; top: calc(var(--safe-t) + 68px); display: grid; gap: 2px; min-width: 240px; padding: 6px; border-radius: var(--r-sheet); z-index: 6; transform-origin: top left; }
.pop a { display: grid; gap: 2px; padding: 11px 14px; border-radius: var(--r-inner); text-decoration: none; }
.pop a b { font-weight: 700; font-size: 1rem; letter-spacing: -.01em; }
.pop a small { font-size: .8rem; color: var(--text-2); }
.pop a.on { background: rgba(255, 255, 255, .1); }
.ctx { position: absolute; right: 14px; top: calc(var(--safe-t) + 68px); display: grid; justify-items: end; gap: 8px; }
.ctx-btn { height: 44px; padding: 0 18px; border-radius: 999px; font-weight: 600; font-size: .94rem; white-space: nowrap; max-width: calc(100vw - 28px); overflow: hidden; text-overflow: ellipsis; }

/* ------------------------------------------------------------------ name tags over the crows */
#tags { position: fixed; inset: 0; pointer-events: none; z-index: 4; }
.tag { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 6px; padding: 4px 12px 4px 4px; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(17, 17, 19, .62); color: var(--text); font-size: .84rem; font-weight: 600; letter-spacing: -.01em; white-space: nowrap;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); will-change: transform; transition: opacity .3s; margin-top: -6px; }
.tag:not(.me) { padding-left: 12px; font-weight: 500; color: #e4e4e7; }
.tag b { width: 22px; height: 22px; border-radius: 999px; background: var(--accent); color: var(--ink); display: grid; place-items: center; font-size: .72rem; font-weight: 700; }
.tag.me { pointer-events: auto; cursor: pointer; margin-top: -8px; }
.tag.npc { padding-left: 9px; gap: 5px; }
.tag.npc .ph { font-size: 15px; color: var(--text-2); }

/* ------------------------------------------------------------------ hint */
.hint { position: fixed; left: 50%; top: calc(var(--safe-t) + 122px); transform: translateX(-50%); margin: 0; z-index: 5;
  max-width: min(32ch, calc(100vw - 32px)); padding: 10px 16px; border-radius: var(--r-inner); font-size: .88rem; line-height: 1.5; text-align: center; transition: opacity .6s var(--ease); }
.hint.faded { opacity: 0; pointer-events: none; }

/* ------------------------------------------------------------------ walking pad + the action bar */
.pad { position: fixed; left: 16px; bottom: calc(var(--safe-b) + 100px); z-index: 5; width: 104px; height: 104px; border-radius: 999px; display: grid; place-items: center; touch-action: none; pointer-events: auto;
  background: rgba(17, 17, 19, .26); border: 1px solid rgba(255, 255, 255, .22); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.knob { width: 44px; height: 44px; border-radius: 999px; background: rgba(244, 244, 245, .94); box-shadow: 0 4px 14px rgba(8, 8, 10, .3); transition: transform .05s; }
.bottom { bottom: 0; padding-bottom: calc(var(--safe-b) + 14px); justify-content: center; }
.acts { display: grid; grid-template-columns: repeat(4, 1fr); width: min(100%, 420px); height: 66px; border-radius: 999px; padding: 0 8px; }
.acts button { display: grid; place-items: center; align-content: center; gap: 3px; background: none; border: 0; border-radius: 999px; font-size: .76rem; font-weight: 600; color: #e4e4e7; transition: transform .15s var(--ease); }
.acts button .ph { font-size: 24px; color: var(--text); }
.acts button:active { transform: scale(.94); }

/* ------------------------------------------------------------------ sheets */
.sheet { position: fixed; inset: 0; z-index: 20; display: flex; align-items: flex-end; justify-content: center; padding: 12px 12px calc(var(--safe-b) + 12px); background: rgba(8, 8, 10, .5); }
.card { position: relative; box-sizing: border-box; width: 100%; max-width: 460px; max-height: 84vh; overflow: auto; overscroll-behavior: contain; border-radius: var(--r-sheet); padding: 24px 20px 20px;
  background: var(--panel); border: 1px solid var(--line); box-shadow: 0 -10px 40px rgba(0, 0, 0, .35); scrollbar-width: none; }
.card::-webkit-scrollbar { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .sheet { animation: dim .24s var(--ease); }
  .card { animation: rise .42s var(--ease); }
  .pop, .ctx-btn { animation: pop .26s var(--ease); }
}
@keyframes dim { from { background: rgba(8, 8, 10, 0); } }
@keyframes rise { from { transform: translateY(24px); opacity: 0; } }
@keyframes pop { from { transform: scale(.96) translateY(-4px); opacity: 0; } }
.close { position: absolute; right: 14px; top: 14px; width: 36px; height: 36px; border-radius: 999px; border: 0; background: var(--panel-2); color: var(--text); display: grid; place-items: center; z-index: 2; }
.close .ph { font-size: 18px; }
.card h2 { margin: 0 44px 0 0; font-size: 1.4rem; font-weight: 700; letter-spacing: -.025em; line-height: 1.3; }
.card h3.sub { margin: 26px 0 4px; font-size: 1.02rem; font-weight: 700; letter-spacing: -.015em; }
.meta { margin: 4px 0 0; font-size: .82rem; color: var(--text-2); }
.lede { margin: 10px 0 16px; color: var(--text-2); font-size: .94rem; line-height: 1.6; }
.help { margin: 0 0 12px; color: var(--text-2); font-size: .84rem; line-height: 1.55; }
.about { margin: -4px 0 18px; padding: 14px 16px; border-radius: var(--r-inner); background: var(--panel-2); color: #d4d4d8; font-size: .9rem; line-height: 1.7; white-space: pre-wrap; }

/* buttons: primary = off-white pill with ink text; ghost = outlined pill */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 50px; padding: 0 20px; border-radius: 999px; border: 1px solid transparent; font-weight: 700; font-size: .98rem; letter-spacing: -.01em; text-decoration: none; white-space: nowrap; transition: transform .15s var(--ease), opacity .2s; box-sizing: border-box; }
.btn .ph { font-size: 20px; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; }
.btn.primary { background: var(--text); color: var(--ink); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn.wide { display: flex; width: 100%; }
.btn.icon { width: 50px; padding: 0; flex: 0 0 50px; }                 /* a share button: the icon alone, still a pill */
.cta-row:has(.btn.icon) { grid-template-columns: 1.15fr 1fr 50px; }
.pbar { display: grid; grid-template-columns: 1fr 50px; gap: 8px; }
.share-site { margin-top: 22px; }
.cta-row { display: grid; grid-template-columns: 1.15fr 1fr; gap: 8px; }
.mine { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 8px; margin-top: 8px; }
.mine .btn { height: 44px; font-size: .9rem; padding: 0 10px; }
.link { display: block; width: 100%; margin-top: 8px; padding: 12px; background: none; border: 0; font-size: .88rem; color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; }
.link.inline { width: auto; margin: 6px 0 0; padding: 4px 0; text-align: left; }
.report { display: block; margin: 16px auto 0; background: none; border: 0; font-size: .8rem; color: var(--text-3); text-decoration: underline; text-underline-offset: 3px; }
.report:disabled { text-decoration: none; cursor: default; }

/* the shop: logo + name, then its products — one large and the rest beside each other (a product grid, shaped by how many) */
.shop-title { display: flex; align-items: center; gap: 12px; margin-right: 44px; }
.shop-title h2 { margin: 0; }
#shop-logo, #product-logo { width: 44px; height: 44px; flex: 0 0 44px; object-fit: contain; border-radius: var(--r-inner); background: var(--panel-2); }
.shelf { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.shelf .pcard:only-child, .shelf[data-count="3"] .pcard:first-child { grid-column: 1 / -1; }
.pcard { display: flex; flex-direction: column; justify-content: flex-start; align-self: start; padding: 0; border: 0; background: none; text-align: left; transition: transform .2s var(--ease); }   /* (a button centres its content: top-align it, so cards with and without a price line up) */
.pcard:active { transform: scale(.98); }
.pcard .pic { position: relative; aspect-ratio: 4 / 5; border-radius: var(--r-inner); overflow: hidden; background: var(--panel-2); display: grid; place-items: center; }
.shelf[data-count="3"] .pcard:first-child .pic, .shelf .pcard:only-child .pic { aspect-ratio: 4 / 3; }
.pcard .pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }   /* (pinned to the box: a percentage height inside an aspect-ratio grid box doesn't resolve, and the photo then hung from the top) */
.pcard .pic .ph { font-size: 34px; color: var(--text-3); }
.pcard b { display: block; margin: 9px 2px 1px; font-weight: 600; font-size: .94rem; letter-spacing: -.01em; }
.pcard small { display: block; margin: 0 2px; font-size: .84rem; font-weight: 600; color: var(--accent); }

/* one product: a tall sheet with a fixed top bar and a fixed inquiry button, the page scrolling between them */
.sheet.tall { padding-top: calc(var(--safe-t) + 12px); }
.card.product { display: flex; flex-direction: column; padding: 0; max-height: none; height: 100%; overflow: hidden; }
.ptop { display: flex; align-items: center; gap: 10px; padding: 14px 64px 12px 16px; font-weight: 600; font-size: .92rem; color: var(--text-2); border-bottom: 1px solid var(--line); }
.ptop #product-logo { width: 32px; height: 32px; flex-basis: 32px; border-radius: 10px; }
.ptop .close { top: 9px; }
.pscroll { flex: 1; overflow: auto; overscroll-behavior: contain; padding: 16px 16px 24px; scrollbar-width: none; }
.pscroll::-webkit-scrollbar { display: none; }
/* the photo at its own ratio (no letterbox bands); only a very tall one is held to 62% of the screen */
.phero { border-radius: var(--r-inner); overflow: hidden; background: var(--panel-2); display: grid; place-items: center; margin: 0 0 18px; min-height: 120px; }
.phero img { width: 100%; height: auto; max-height: 62vh; object-fit: contain; display: block; }
.phero:has(.nophoto:not([hidden])) { aspect-ratio: 4 / 3; }
.phero img[hidden] { display: none; }
.nophoto { font-size: 48px; color: var(--text-3); }
.card.product h2 { margin: 0; font-size: 1.3rem; }
.price { margin: 6px 0 0; font-size: 1.06rem; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.pdesc { margin: 16px 0 0; font-size: .94rem; line-height: 1.75; color: #d4d4d8; white-space: pre-wrap; }
.pdetail { display: block; width: 100%; margin: 22px 0 0; border-radius: var(--r-inner); }
.pmore-wrap { margin-top: 28px; }
.pmore-wrap h3 { margin: 0 0 10px; font-size: .94rem; font-weight: 700; }
.pmore { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pbar { padding: 12px 16px calc(var(--safe-b) * 0 + 14px); border-top: 1px solid var(--line); background: var(--panel); }

/* the café menu */
.menu-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.menu-list button { height: 56px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel-2); font-weight: 600; font-size: .96rem; transition: transform .15s var(--ease); }
.menu-list button:active { transform: scale(.97); }

/* the how-to list */
.how { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 16px; }
.how li { display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start; }
.how .ph { width: 36px; height: 36px; border-radius: 999px; background: var(--panel-2); display: grid; place-items: center; font-size: 19px; }
.how p { margin: 0; font-size: .9rem; line-height: 1.6; color: var(--text-2); }
.how b { display: block; color: var(--text); font-weight: 700; font-size: .94rem; margin-bottom: 1px; }

/* forms: label above the field, helper text under it */
.field { display: block; margin: 16px 0 6px; font-size: .84rem; font-weight: 600; color: #d4d4d8; }
.field small { font-weight: 500; color: var(--text-3); margin-left: 4px; }
.card input, .card textarea { display: block; width: 100%; box-sizing: border-box; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: var(--r-inner); background: var(--panel-2); color: var(--text); font-size: 1rem; line-height: 1.5; user-select: text; -webkit-user-select: text; }
.card textarea { resize: vertical; min-height: 76px; font-size: .94rem; }
.card input::placeholder, .card textarea::placeholder { color: var(--text-3); }
.card input:focus, .card textarea:focus { outline: none; border-color: var(--accent); }
.name-row { display: flex; gap: 8px; margin-bottom: 18px; }
.name-row input { flex: 1; font-size: 1.1rem; font-weight: 600; }
.reroll { width: 52px; flex: 0 0 52px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--panel-2); display: grid; place-items: center; transition: transform .2s var(--ease); }
.reroll .ph { font-size: 22px; }
.reroll:active { transform: rotate(-20deg) scale(.95); }
.group { margin-top: 4px; }
.logo-field { display: grid; grid-template-columns: 76px 1fr; align-items: center; gap: 14px; margin-top: 14px; }
.logo-field p { margin: 0; color: var(--text-2); font-size: .82rem; line-height: 1.5; }
.pic.logo-pick, .pform .pic { display: grid; place-items: center; align-content: center; gap: 2px; margin: 0; border-radius: var(--r-inner); border: 1px dashed var(--line-2); background: var(--panel-2) center / cover no-repeat; color: var(--text-2); font-size: .76rem; cursor: pointer; }
.pic.logo-pick { width: 76px; height: 76px; background-size: contain; }
.pic .ph { font-size: 20px; }
.pic.has { border-style: solid; }
.pic.has .ph, .pic.has span { display: none; }
.products { display: grid; gap: 12px; }
.pform { border: 1px solid var(--line); border-radius: var(--r-inner); padding: 14px; background: rgba(255, 255, 255, .02); }
.pform .ptitle { margin: 0 0 10px; font-size: .86rem; font-weight: 700; color: var(--text-2); }
.pform .prow { display: grid; grid-template-columns: 92px 1fr; gap: 12px; }
.pform .pic { width: 92px; height: 115px; }
.pform .field { margin: 0 0 6px; }
.pform .field + input { margin-bottom: 10px; }
.pform .prow .field:first-child { margin-top: 0; }
.pform textarea { min-height: 70px; }
.detail-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.detail-pick { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel-2); font-size: .86rem; font-weight: 600; cursor: pointer; }
.detail-pick .ph { font-size: 18px; }
.detail-pick.has { border-color: var(--accent); color: var(--accent); }
.detail-row .link { width: auto; margin: 0; padding: 4px 0; }
.notice { margin-top: 26px; padding: 14px 16px; border-radius: var(--r-inner); background: var(--panel-2); border: 1px solid var(--line); }
.notice .ntitle { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: .9rem; font-weight: 700; }
.notice .ntitle .ph { font-size: 18px; color: var(--text-2); }
.notice ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.notice li { font-size: .84rem; line-height: 1.55; color: #d4d4d8; }
.msg { min-height: 1.4em; margin: 18px 0 10px; color: var(--error); font-size: .88rem; text-align: center; }
.fine { margin: 12px 0 0; font-size: .78rem; color: var(--text-3); line-height: 1.55; }
.deco { display: grid; gap: 16px; margin-top: 12px; }
.deco-row { display: grid; gap: 8px; font-size: .84rem; font-weight: 600; color: #d4d4d8; }   /* label above, the choices across the full width */
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatches button { width: 28px; height: 28px; border-radius: 999px; border: 0; background: var(--c); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.swatches button.on { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--text); }
.deco .chips { display: flex; gap: 6px; flex-wrap: wrap; }
.deco .chips button { height: 34px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; font-size: .82rem; font-weight: 500; color: #d4d4d8; }
.deco .chips button.on { background: var(--text); border-color: var(--text); color: var(--ink); font-weight: 700; }

/* the open shops: "가게 N" in the top bar is the button; the sheet lists both towns, this one first */
.shopsbtn { display: inline-flex; align-items: baseline; padding: 0; border: 0; background: none; color: inherit; font: inherit; }
.shopsbtn .ph { align-self: center; margin-left: 1px; font-size: 11px; color: var(--text-3); }
.shop-list { display: grid; gap: 8px; margin-top: 18px; }
.slabel { display: flex; align-items: baseline; gap: 8px; margin: 10px 2px 2px; font-size: .9rem; font-weight: 700; }
.slabel:first-child { margin-top: 0; }
.slabel small { font-size: .78rem; font-weight: 500; color: var(--text-3); }
.srow { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px; width: 100%; padding: 10px 14px 10px 10px; border-radius: var(--r-inner); border: 1px solid var(--line); background: var(--panel-2); text-align: left; transition: transform .15s var(--ease); }
.srow:active { transform: scale(.98); }
.slogo { width: 44px; height: 44px; border-radius: 10px; background: var(--panel-3); display: grid; place-items: center; overflow: hidden; }
.slogo img { width: 100%; height: 100%; object-fit: contain; }
.slogo:has(img), #shop-logo, #product-logo { background: #f4f4f5; }   /* (a logo is usually dark lettering: on a light tile it reads) */
.slogo .ph { font-size: 20px; color: var(--text-2); }
.stxt { display: grid; gap: 2px; min-width: 0; }
.stxt b { font-size: .96rem; font-weight: 700; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stxt small { font-size: .8rem; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srow > .ph { font-size: 18px; color: var(--text-2); }
.queue-box { display: grid; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.queue-box p { margin: 0; font-size: .86rem; line-height: 1.6; color: var(--text-2); }
.queue-box p b { color: var(--text); font-weight: 700; }
.sempty { margin: 0 2px; padding: 14px; border-radius: var(--r-inner); border: 1px dashed var(--line-2); font-size: .86rem; color: var(--text-2); }

/* 뭄무: their wordmark (their own white vector) over the title, the facts as the how-to list */
.brandmark { display: block; width: auto; height: 22px; margin: 2px 0 18px; }
.how.facts { margin: 4px 0 22px; }

/* the subway: line roundels in the lines' own colours (data, not decoration), the destinations as rows */
.lines { display: inline-flex; gap: 4px; }
.roundel { width: 26px; height: 26px; border-radius: 999px; background: var(--lc); color: #fff; display: grid; place-items: center; font-size: .8rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.station-title { display: flex; align-items: center; gap: 12px; margin-right: 44px; }
.station-title h2 { margin: 0; }
.dests { display: grid; gap: 8px; }
.dest { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border-radius: var(--r-inner); border: 1px solid var(--line-2); background: var(--panel-2); text-align: left; transition: transform .15s var(--ease); }
.dest:active { transform: scale(.98); }
.dest .txt { display: grid; gap: 3px; min-width: 0; }
.dest b { font-size: 1.05rem; font-weight: 700; letter-spacing: -.015em; }
.dest small { font-size: .82rem; color: var(--text-2); }
.dest > .ph { font-size: 20px; color: var(--text-2); }

/* the ride: the tunnel's dark, its lamps going by, the train moving along the line to the other town */
.ride { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 24px; background: #0c0c0e; overflow: hidden; }
.tunnel { position: absolute; inset: 0; }   /* (out of the grid: the card alone is centred) */
.tunnel i { position: absolute; left: 0; width: 200%; height: 3px; border-radius: 2px; background: repeating-linear-gradient(90deg, transparent 0 220px, rgba(255, 222, 170, .7) 220px 320px, transparent 320px 440px); }
.tunnel i:nth-child(1) { top: 18%; }
.tunnel i:nth-child(2) { top: 26%; height: 1px; opacity: .45; }
.tunnel i:nth-child(3) { top: 80%; height: 2px; opacity: .5; }
.ride-card { position: relative; box-sizing: border-box; width: min(100%, 380px); padding: 22px 20px 24px; border-radius: var(--r-sheet); background: var(--panel); border: 1px solid var(--line); }
.ride-dir { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: .86rem; font-weight: 600; color: var(--text-2); }
.ride-card h2 { margin: 0 0 22px; font-size: 1.4rem; font-weight: 700; letter-spacing: -.025em; line-height: 1.3; }
.route { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; font-size: .86rem; font-weight: 600; color: var(--text-2); }
.route > span:last-child { color: var(--text); }
.track { position: relative; height: 2px; border-radius: 2px; background: var(--line-2); }
.track .fill { position: absolute; inset: 0; border-radius: 2px; background: var(--accent); transform-origin: left; transform: scaleX(1); }
.track .runner { position: absolute; inset: 0; transform: translateX(100%); }
.track .runner .ph { position: absolute; left: 0; top: 50%; transform: translate(-50%, -50%); padding: 3px; border-radius: 999px; background: var(--panel); font-size: 18px; color: var(--text); }
@media (prefers-reduced-motion: no-preference) {
  .tunnel i { animation: lamps .55s linear infinite; }
  .tunnel i:nth-child(2) { animation-duration: .8s; }
  .tunnel i:nth-child(3) { animation-duration: .4s; }
  .ride:not([hidden]) .ride-card { animation: rise .42s var(--ease); }
  .ride:not([hidden]) .fill { animation: fill var(--ride, 2.8s) var(--ease) both; }
  .ride:not([hidden]) .runner { animation: run var(--ride, 2.8s) var(--ease) both; }
}
@keyframes lamps { to { transform: translateX(-440px); } }
@keyframes fill { from { transform: scaleX(0); } }
@keyframes run { from { transform: translateX(0); } }

@media (max-width: 400px) {
  .pill { height: 44px; }
  .townbtn { font-size: 1rem; }
  .stat { font-size: .8rem; padding: 0 10px; margin-left: 6px; }
  .ic { width: 36px; height: 36px; }
  .acts { height: 62px; }
  .pad { width: 96px; height: 96px; bottom: calc(var(--safe-b) + 94px); }
  .cta-row { grid-template-columns: 1fr 1fr; }
  .btn { padding: 0 14px; font-size: .94rem; }
}
@media (max-width: 370px) {   /* (after the 400px rules, so these win) the narrowest phones: the top bar's two pills must still fit side by side */
  .shopsbtn .ph { display: none; }
  .stat { padding: 0 8px; }
  .ic { width: 34px; }
}
