:root {
  color-scheme: dark;
  --bg: #0e0d13;
  --surface: #17161e;
  --surface-2: #201f29;
  --line: #2e2c3a;
  --text: #ecebf1;
  --muted: #a6a4b4;
  --gold: #e2b33f;
  --gold-soft: #f2d78a;
  --gold-ink: #1b1506;
  --rose: #ff7d93;
  /* 데이터 표현 색. 어두운 배경에서 색약 구분 검사를 통과한 순서입니다. */
  --series-1: #b5871f;
  --series-2: #3f8fd0;
  --series-3: #e0604a;
  --series-4: #8f6fe0;
  --radius: 14px;
  --wrap: 1120px;
  --head-h: 60px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
main a:not([class]) { color: var(--gold-soft); text-underline-offset: 3px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.35; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 12px; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0 0 12px; padding-left: 20px; }
li { margin-bottom: 6px; }
:focus-visible { outline: 2px solid var(--gold-soft); outline-offset: 2px; border-radius: 4px; }

.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 100; background: var(--gold); color: var(--gold-ink); padding: 8px 14px; border-radius: 8px; }

/* Header */
.site-head {
  position: sticky; top: 0; z-index: 40;
  background: rgba(23, 22, 30, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; gap: 20px; min-height: var(--head-h); }
.brand { display: inline-flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 800; text-decoration: none; white-space: nowrap; flex: none; }
.brand svg { width: 26px; height: 26px; }
.brand em { color: var(--gold); font-style: italic; }
.cat-nav { display: flex; gap: 4px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.cat-nav::-webkit-scrollbar { display: none; }
.cat-nav a {
  padding: 6px 11px; border-radius: 8px; font-size: 14.5px; color: var(--muted);
  text-decoration: none; white-space: nowrap;
}
.cat-nav a:hover { color: var(--text); background: var(--surface-2); }
.cat-nav a[aria-current="page"] { color: var(--gold-soft); background: var(--surface-2); font-weight: 600; }
.util-nav { display: flex; align-items: center; gap: 4px; flex: none; }
.util-nav a { padding: 6px 10px; font-size: 14px; color: var(--muted); text-decoration: none; white-space: nowrap; border-radius: 8px; }
.util-nav a:hover { color: var(--text); }
.age-badge {
  display: inline-grid; place-items: center; width: 28px; height: 28px; margin-left: 4px;
  border: 2px solid var(--rose); border-radius: 50%; color: var(--rose);
  font-size: 11.5px; font-weight: 800; line-height: 1; flex: none;
}

/* Price rings */
.rings { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; padding: 22px 0 18px; }
.ring { display: grid; justify-items: center; gap: 8px; text-decoration: none; text-align: center; min-width: 0; }
@property --p { syntax: '<number>'; inherits: true; initial-value: 0; }
.ring-disc {
  --p: var(--target, 0);
  width: 86px; height: 86px; border-radius: 50%; padding: 4px;
  background: conic-gradient(var(--series-1) calc(var(--p) * 1%), var(--line) 0);
  transition: --p 1.1s cubic-bezier(.2, .7, .2, 1), transform .2s ease;
}
html.js .ring:not(.in) .ring-disc { --p: 0; }
.ring:hover .ring-disc { transform: translateY(-3px) scale(1.04); }
.ring-disc span {
  display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--bg);
  font-size: 15px; font-weight: 800; color: var(--text); line-height: 1.1; font-variant-numeric: tabular-nums;
}
.rings-note { margin: -6px 0 12px; text-align: center; }
.ring-name { font-size: 13.5px; color: var(--text); font-weight: 600; }

/* Hero */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: linear-gradient(160deg, #221f33 0%, #17161e 55%, #131219 100%);
  border: 1px solid var(--line); border-radius: 18px;
  padding: 42px 36px 138px;
}
.hero-art { position: absolute; inset: auto 0 0 0; width: 100%; height: 150px; object-fit: cover; object-position: bottom; z-index: -1; opacity: .95; will-change: transform; }
.hero-art-back { height: 196px; opacity: .55; filter: brightness(1.5) saturate(.7); z-index: -2; }
.hero-moon { position: absolute; top: 28px; right: 42px; width: 92px; height: 92px; z-index: -3; opacity: .9; filter: drop-shadow(0 0 22px rgba(244, 227, 178, .45)); animation: moon-glow 8s ease-in-out infinite; }
.hero-stars {
  position: absolute; inset: 0 0 35% 0; z-index: -4; pointer-events: none;
  background-image:
    radial-gradient(1.4px 1.4px at 12% 22%, #fff, transparent), radial-gradient(1px 1px at 28% 58%, #fff, transparent),
    radial-gradient(1.6px 1.6px at 47% 18%, #fff, transparent), radial-gradient(1px 1px at 63% 42%, #fff, transparent),
    radial-gradient(1.3px 1.3px at 74% 12%, #fff, transparent), radial-gradient(1px 1px at 86% 60%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 36% 30%, #fff, transparent), radial-gradient(1px 1px at 92% 28%, #fff, transparent);
  animation: stars 5s ease-in-out infinite;
}
.hero-rotator { margin: -8px 0 20px !important; font-size: 15px !important; font-weight: 700; color: var(--gold-soft) !important; min-height: 1.75em; }
.hero-rotator span { display: inline-block; transition: opacity .25s ease, transform .25s ease; }
.hero-rotator span.out { opacity: 0; transform: translateY(-6px); }
@keyframes moon-glow { 50% { filter: drop-shadow(0 0 34px rgba(244, 227, 178, .7)); transform: translateY(-3px); } }
@keyframes stars { 50% { opacity: .35; } }
.hero h1 { font-size: clamp(30px, 5vw, 44px); line-height: 1.22; }
.hero h1 small { display: block; font-size: 1em; font-weight: 700; font-style: italic; color: var(--gold); }
.hero p { margin: 14px 0 22px; max-width: 620px; color: #d6d4df; font-size: 16.5px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 46px; padding: 10px 22px; border-radius: 10px; border: 1px solid transparent;
  font: inherit; font-size: 15px; font-weight: 700; text-decoration: none; cursor: pointer;
}
.btn-gold { background: var(--gold); color: var(--gold-ink); }
.btn-gold:hover { background: var(--gold-soft); }
.btn-line { border-color: #57546a; color: var(--text); background: rgba(14, 13, 19, .55); }
.btn-line:hover { border-color: var(--gold); }
.btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; pointer-events: none; }

/* Live status */
.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1.6; white-space: nowrap; background: rgba(14, 13, 19, .82); }
.pill.flash { animation: pill-flash 1.2s ease; }
@keyframes pill-flash { 15% { box-shadow: 0 0 0 4px rgba(242, 215, 138, .4); transform: scale(1.08); } }
.countdown { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.countdown.soon { color: #ffb066; }

/* Ticker */
.ticker { border-bottom: 1px solid var(--line); background: #121118; font-size: 13.5px; }
.ticker-inner { display: flex; align-items: center; gap: 12px; min-height: 36px; }
.ticker-clock { display: inline-flex; align-items: center; gap: 7px; flex: none; color: var(--muted); }
.ticker-clock time { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
html:not(.js) .ticker-clock, html:not(.js) .ticker-pause { display: none; }
.ticker-view { flex: 1; min-width: 0; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 28px), transparent); }
.ticker-track { display: flex; width: max-content; animation: ticker var(--ticker-duration, 30s) linear infinite; }
.ticker:hover .ticker-track, .ticker:focus-within .ticker-track, .ticker.paused .ticker-track { animation-play-state: paused; }
.ticker-item { padding: 0 22px; white-space: nowrap; text-decoration: none; color: var(--muted); position: relative; }
.ticker-item::before { content: ""; position: absolute; left: 0; top: 50%; width: 4px; height: 4px; margin-top: -2px; border-radius: 50%; background: var(--series-1); }
.ticker-item:hover { color: var(--text); }
.ticker-pause { display: grid; place-items: center; flex: none; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 7px; background: none; cursor: pointer; }
.ticker-pause svg { width: 15px; height: 15px; fill: none; stroke: var(--muted); stroke-width: 2.4; stroke-linecap: round; }
.ticker-pause:hover svg, .ticker-pause[aria-pressed="true"] svg { stroke: var(--gold-soft); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* Header motion */
.site-head { transition: box-shadow .25s ease, background-color .25s ease; view-transition-name: site-head; }
.site-head.scrolled { box-shadow: 0 8px 24px rgba(0, 0, 0, .4); background: rgba(14, 13, 19, .96); }
.scroll-progress { display: none; }
@supports (animation-timeline: scroll()) {
  .scroll-progress { display: block; position: fixed; inset: 0 0 auto 0; z-index: 60; height: 2px; background: var(--gold); transform-origin: 0 50%; animation: progress linear both; animation-timeline: scroll(); }
}
@keyframes progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.icon-btn { display: grid; place-items: center; width: 34px; height: 34px; padding: 0 !important; border-radius: 9px; }
.icon-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.icon-btn:hover { background: var(--surface-2); }

/* Reveal */
html.motion main .section:not(.in), html.motion .stack > section:not(.in), html.motion .rings-note:not(.in), html.motion .live-strip:not(.in), html.motion .side > *:not(.in) { opacity: 0; transform: translateY(18px); }
main .section, .stack > section, .rings-note, .live-strip, .side > * { transition: opacity .55s ease, transform .55s cubic-bezier(.2, .7, .2, 1); }
@view-transition { navigation: auto; }

/* Shop wall */
.tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 14px; }
html:not(.js) .tabs { display: none; }
.tabs button { min-height: 38px; padding: 6px 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; transition: color .15s ease, background-color .15s ease, border-color .15s ease; }
.tabs button span { font-size: 12px; opacity: .75; font-variant-numeric: tabular-nums; }
.tabs button:hover { color: var(--text); border-color: #57546a; }
.tabs button[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); font-weight: 700; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 8px; margin-left: auto; font-size: 14px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { position: relative; width: 38px; height: 22px; border-radius: 999px; background: var(--line); transition: background-color .2s ease; }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s cubic-bezier(.2, 1.4, .4, 1); }
.switch input:checked + .switch-track { background: #2f9e62; }
.switch input:checked + .switch-track::after { transform: translateX(16px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--gold-soft); outline-offset: 2px; }
html.js .shop-wall:not([data-ready]) .shop-wrap:nth-child(n+10) { display: none; }
.wall-more { display: flex; justify-content: center; margin-top: 14px; }
.wall-empty { padding: 20px 0; text-align: center; }

/* Personal */
.personal-group + .personal-group { margin-top: 16px; }
.personal-group h2 { font-size: 17px; margin-bottom: 9px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); text-decoration: none; font-size: 14px; transition: border-color .15s ease, transform .15s ease; }
.chip:hover { border-color: var(--gold); transform: translateY(-2px); }
.chip .pill { background: var(--surface-2); }

/* Zone map */
.zone-map { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 14px; align-items: stretch; }
.zone-figure { margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.zone-figure svg { width: 100%; height: auto; }
.zone-figure figcaption { margin-top: 6px; }
.zone-roads path { fill: none; stroke: var(--line); stroke-width: 2; }
.zone-roads text { fill: #77758a; font-size: 11px; }
.zone-node { cursor: pointer; outline: none; }
.zone-dot { fill: var(--surface-2); stroke: var(--series-1); stroke-width: 2; transition: fill .2s ease, stroke-width .2s ease; }
.zone-node:hover .zone-dot, .zone-node:focus-visible .zone-dot, .zone-node.is-selected .zone-dot { fill: var(--series-1); stroke-width: 3; }
.zone-pulse { fill: none; stroke: var(--series-1); stroke-width: 2; opacity: 0; transform-box: fill-box; transform-origin: center; }
.zone-node.is-live .zone-pulse { animation: zone-pulse 3s ease-out infinite; }
.zone-count { fill: var(--text); font-size: 17px; font-weight: 800; pointer-events: none; font-variant-numeric: tabular-nums; }
.zone-node:hover .zone-count, .zone-node:focus-visible .zone-count, .zone-node.is-selected .zone-count { fill: var(--gold-ink); }
.zone-name { fill: var(--text); font-size: 13px; font-weight: 600; pointer-events: none; paint-order: stroke; stroke: var(--surface); stroke-width: 4px; }
@keyframes zone-pulse { 0% { opacity: .7; transform: scale(1); } 80%, 100% { opacity: 0; transform: scale(1.5); } }
.zone-panels { min-width: 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
html:not(.js) .zone-panels { display: none; }
html:not(.js) .zone-map { grid-template-columns: minmax(0, 1fr); }
.zone-panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.zone-panel-head h3 { font-size: 17px; }
.zone-panel-head a { font-size: 13.5px; white-space: nowrap; }
.zone-list { list-style: none; margin: 0; padding: 0; max-height: 300px; overflow-y: auto; }
.zone-list li { margin: 0; border-bottom: 1px solid var(--line); }
.zone-list li:last-child { border-bottom: 0; }
main .zone-list a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; color: var(--text); text-decoration: none; font-size: 14.5px; }
main .zone-list a:hover { color: var(--gold-soft); }
.zone-list .pill { background: var(--surface-2); }
.panel-in { animation: panel-in .3s ease; }
@keyframes panel-in { from { opacity: 0; transform: translateX(8px); } }

/* Calculator motion */
.stepper { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; min-height: 42px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); overflow: hidden; }
.stepper button { height: 100%; min-height: 40px; padding: 0; border: 0; background: none; color: var(--text); font: inherit; font-size: 19px; cursor: pointer; transition: background-color .15s ease; }
.stepper button:hover:not(:disabled) { background: var(--line); }
.stepper button:disabled { color: #57546a; cursor: default; }
.stepper output { text-align: center; color: var(--text); font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.calc select[hidden], .race select[hidden] { display: none; }
.stack-bar { display: flex; gap: 2px; height: 10px; margin: 12px 0 14px; }
.seg { flex: 0 1 0; min-width: 0; transition: flex-grow .4s cubic-bezier(.2, .7, .2, 1); }
.seg[hidden] { display: none; }
.stack-bar .seg:first-child { border-radius: 4px 0 0 4px; }
.stack-bar .seg:last-child { border-radius: 0 4px 4px 0; }
.seg-1 { background: var(--series-1); }
.seg-2 { background: var(--series-2); }
.seg-3 { background: var(--series-3); }
.seg-4 { background: var(--series-4); }
.swatch { display: inline-block; width: 9px; height: 9px; margin-right: 6px; border-radius: 2px; }

/* Race bars */
.race-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.race-head h2 { font-size: 18px; margin: 0; }
.race-controls { display: grid; grid-template-columns: 140px 140px; gap: 10px; }
.race-controls label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.race-controls select { min-height: 42px; padding: 8px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font: inherit; }
.race-rows { display: grid; gap: 9px; margin-bottom: 10px; }
.race-row { display: grid; grid-template-columns: 84px minmax(0, 1fr) 120px; align-items: center; gap: 10px; font-size: 14.5px; }
main .race-row a { color: var(--text); text-decoration: none; }
main .race-row a:hover { color: var(--gold-soft); }
.race-track { height: 12px; }
.race-bar { display: block; height: 100%; border-radius: 0 4px 4px 0; background: var(--series-1); transition: width .5s cubic-bezier(.2, .7, .2, 1); }
.race-row b { text-align: right; font-variant-numeric: tabular-nums; }

/* Week chart */
.week { display: grid; gap: 5px; margin-top: 12px; }
.week-row { display: grid; grid-template-columns: 22px minmax(0, 1fr); align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); }
.week-row.is-today { color: var(--text); font-weight: 700; }
.week-track { position: relative; height: 14px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.week-seg { position: absolute; top: 2px; bottom: 2px; border-radius: 3px; background: var(--series-1); opacity: .62; }
.is-today .week-seg { opacity: 1; }
.week-now { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 6px rgba(255, 255, 255, .8); }
.week-axis { display: flex; justify-content: space-between; margin-left: 30px; font-size: 12px; color: var(--muted); }

/* Shop TOC */
.shop-title { display: flex; align-items: center; gap: 8px; }
.shop-title .fav { position: static; background: var(--surface-2); }
.toc { position: sticky; top: var(--head-h); z-index: 20; display: flex; align-items: center; gap: 2px; margin: 16px 0 0; padding: 6px 8px; border: 1px solid var(--line); border-radius: 12px; background: rgba(23, 22, 30, .94); backdrop-filter: blur(8px); overflow-x: auto; scrollbar-width: none; }
.toc::-webkit-scrollbar { display: none; }
main .toc a { flex: none; padding: 5px 11px; border-radius: 8px; color: var(--muted); font-size: 14px; text-decoration: none; transition: color .15s ease, background-color .15s ease; }
main .toc a:hover { color: var(--text); }
main .toc a.active { background: var(--surface-2); color: var(--gold-soft); font-weight: 600; }
.toc-name { flex: none; max-width: 0; overflow: hidden; white-space: nowrap; font-size: 14px; opacity: 0; transition: max-width .3s ease, opacity .3s ease, margin .3s ease; }
.toc.stuck .toc-name { max-width: 180px; margin-right: 8px; opacity: 1; }
.stack > section[id] { scroll-margin-top: calc(var(--head-h) + 62px); }
.toc ~ .with-side .side { top: calc(var(--head-h) + 62px); }
/* 업소 페이지는 모바일에서 소개를 먼저 보여 주고, 계산기는 목차로 이동한다 */
@media (max-width: 960px) { .toc ~ .with-side .side { top: auto; order: 0; } }
.side[id] { scroll-margin-top: calc(var(--head-h) + 62px); }

/* Search dialog */
.search-dialog { width: min(100% - 32px, 560px); margin: 12vh auto auto; padding: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--text); }
.search-dialog::backdrop { background: rgba(5, 5, 8, .66); backdrop-filter: blur(3px); }
.search-dialog[open] { animation: dialog-in .2s ease; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(-10px) scale(.98); } }
.search-dialog form { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.search-dialog input { flex: 1; min-width: 0; min-height: 42px; padding: 6px 8px; border: 0; background: none; color: var(--text); font: inherit; font-size: 17px; outline: none; }
.linklike-sm { padding: 6px 8px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 13.5px; cursor: pointer; }
.search-results { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow-y: auto; }
.search-results:empty { display: none; }
.search-results li { margin: 0; }
.search-results a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; border-radius: 9px; text-decoration: none; }
.search-results a.active, .search-results a:hover { background: var(--surface-2); }
.search-main { display: grid; min-width: 0; }
.search-main small { color: var(--muted); font-size: 12.5px; }
.search-results .pill { background: var(--surface-2); }
.search-none { padding: 14px 10px; color: var(--muted); }
.search-hint { padding: 12px 16px; margin: 0; }

/* Toasts */
.toasts { position: fixed; left: 20px; bottom: 20px; z-index: 40; display: grid; gap: 8px; width: min(100% - 40px, 340px); }
.toast { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--gold); border-radius: 12px; background: var(--surface); box-shadow: 0 12px 30px rgba(0, 0, 0, .5); text-decoration: none; font-size: 14px; animation: toast-in .35s cubic-bezier(.2, 1.2, .4, 1); transition: opacity .35s ease, transform .35s ease; }
.toast span { color: var(--muted); }
.toast.out { opacity: 0; transform: translateY(8px); }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px); } }
.live-online::before { content: "· "; }
.live-online[hidden] { display: none; }
.pill-open, .pill-free { color: #7fe3a4; }
.pill-normal { color: var(--gold-soft); }
.pill-busy { color: #ffb066; }
.pill-full { color: var(--rose); }
.pill-closed { color: var(--muted); }
.status-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0 0; }
.status-line .pill { background: var(--surface-2); font-size: 13px; }
.live-strip { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin-top: 12px; padding: 11px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-decoration: none; }
.live-strip:hover { border-color: var(--gold); }
.live-strip b { color: #7fe3a4; font-size: 18px; font-variant-numeric: tabular-nums; }
.live-dot { align-self: center; width: 9px; height: 9px; border-radius: 50%; background: #7fe3a4; animation: live-pulse 2s ease-in-out infinite; }
@keyframes live-pulse { 50% { opacity: .35; } }

/* Shop filter */
.filter { display: grid; grid-template-columns: minmax(180px, 2fr) repeat(3, minmax(110px, 1fr)) auto auto; gap: 10px; align-items: end; padding: 16px 18px; }
.filter label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.filter input[type="search"], .filter select {
  width: 100%; min-height: 42px; padding: 8px 10px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--text); font: inherit; font-size: 15px;
}
.filter .filter-check { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; font-size: 14px; color: var(--text); white-space: nowrap; }

/* Feed */
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.feed:empty { display: none; }
.feed li { margin: 0; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.feed li:last-child { padding-bottom: 0; border-bottom: 0; }
.feed p { margin: 3px 0 0; white-space: pre-line; color: #d6d4df; }
.feed-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 10px; }
.feed-new { animation: feed-in .5s ease; }
@keyframes feed-in { from { opacity: 0; transform: translateY(-4px); } }

/* Layout */
.section { padding: 34px 0 0; scroll-margin-top: calc(var(--head-h) + 12px); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h2, .sec-title { font-size: 22px; }
.section-head a { font-size: 14px; color: var(--gold-soft); white-space: nowrap; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; }
.card h2 { font-size: 20px; margin-bottom: 10px; }
.card p, .card li { color: #d6d4df; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; line-height: 1.6; }

.props { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.prop { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.prop h3 { font-size: 16px; color: var(--gold-soft); margin-bottom: 6px; }
.prop p { font-size: 14.5px; color: var(--muted); line-height: 1.65; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
caption { text-align: left; padding: 12px 16px 0; color: var(--muted); font-size: 13.5px; }
th, td { padding: 11px 14px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line); }
tr:last-child td, tr:last-child th { border-bottom: 0; }
thead th { font-size: 13px; color: var(--muted); font-weight: 600; }
tbody th, thead th:first-child { text-align: left; position: sticky; left: 0; background: var(--surface); font-weight: 600; }
main tbody th a { color: var(--text); text-decoration: none; }
main tbody th a:hover { color: var(--gold-soft); text-decoration: underline; }
td.total { color: var(--gold-soft); font-weight: 700; font-variant-numeric: tabular-nums; }
td { font-variant-numeric: tabular-nums; }

/* Contact */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.contact h2 { margin-bottom: 8px; }
.contact-num { font-size: 22px; font-weight: 800; color: var(--gold-soft); margin-bottom: 12px; }
.contact-btns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.contact-btns .btn { padding-inline: 8px; }
.todo { display: inline-block; color: var(--rose); border: 1px dashed var(--rose); border-radius: 6px; padding: 0 7px; font-size: .9em; }
.check li { list-style: none; position: relative; padding-left: 22px; margin-left: -20px; }
.check li::before { content: "✓"; position: absolute; left: 0; color: var(--gold); font-weight: 700; }

/* Shop cards */
.cat-block { margin-top: 24px; }
.cat-block:first-of-type { margin-top: 0; }
.cat-block > h3 { font-size: 17px; margin-bottom: 10px; display: flex; gap: 10px; align-items: baseline; justify-content: space-between; }
.cat-block > h3 a { font-size: 13.5px; font-weight: 500; color: var(--gold-soft); white-space: nowrap; }
.shop-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.shop-wrap { position: relative; display: flex; min-width: 0; }
.shop-wrap[hidden] { display: none; }
.shop { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; transition: border-color .2s ease, transform .25s cubic-bezier(.2, .7, .2, 1), box-shadow .25s ease; }
.shop::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .25s ease; background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 0), rgba(242, 215, 138, .13), transparent 70%); }
.shop:hover { border-color: var(--gold); transform: translateY(-4px); box-shadow: 0 14px 34px rgba(0, 0, 0, .45); }
.shop:hover::after { opacity: 1; }
.shop-art { position: relative; aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; }
.shop-art img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.shop:hover .shop-art img { transform: scale(1.07); }
.fav { position: absolute; top: 7px; right: 7px; z-index: 2; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: rgba(14, 13, 19, .72); cursor: pointer; }
.fav svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 1.8; transition: fill .2s ease, stroke .2s ease; }
.fav[aria-pressed="true"] svg { fill: var(--rose); stroke: var(--rose); }
.fav.pop svg { animation: fav-pop .4s cubic-bezier(.2, 1.6, .4, 1); }
html:not(.js) .fav { display: none; }
@keyframes fav-pop { 40% { transform: scale(1.35); } }
.tag { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; background: rgba(14, 13, 19, .78); color: var(--gold-soft); }
.tag-sample { color: var(--rose); }
.shop-tags { position: absolute; top: 9px; left: 9px; display: flex; gap: 5px; }
.shop-body { padding: 12px 14px 14px; display: grid; gap: 3px; }
.shop-body h3, .shop-body h4 { font-size: 16px; }
.shop-body p { font-size: 13.5px; line-height: 1.55; color: var(--muted); margin: 0; }
.shop-body .shop-meta { margin-top: 3px; font-size: 12.5px; color: var(--gold-soft); }
.shop-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.mini-tables { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; align-items: start; }
.prose .mini-tables { margin-top: 12px; }
.mini-tables table { font-size: 14px; }
.mini-tables th, .mini-tables td { padding: 8px 14px; }
.mini-tables caption { padding-bottom: 6px; }

a.plain, main a.plain { color: inherit; text-decoration: none; }
a.plain:hover, main a.plain:hover { color: var(--gold-soft); }
.zones { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 22px; }
.zone h3 { font-size: 15px; margin-bottom: 4px; }
.zone p { font-size: 14.5px; line-height: 1.8; }

/* Page */
.crumbs { padding: 16px 0 0; font-size: 13.5px; color: var(--muted); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }
.crumbs li { margin: 0; }
.crumbs li + li::before { content: "›"; margin-right: 6px; }
main .crumbs a { text-decoration: none; color: var(--muted); }
main .crumbs a:hover { color: var(--text); }
.page-head { padding: 12px 0 0; }
.page-head h1 { font-size: clamp(27px, 4vw, 36px); }
.page-head .lead { margin: 10px 0 0; max-width: 780px; color: #d6d4df; font-size: 16.5px; }
.with-side { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; padding-top: 24px; }
.side { position: sticky; top: calc(var(--head-h) + 14px); display: grid; gap: 12px; }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; min-width: 0; }
.prose h2 { font-size: 20px; margin-bottom: 10px; }
.prose li strong, .prose p strong { color: var(--text); }

/* Calculator */
.calc h2 { font-size: 17px; margin-bottom: 12px; }
.calc-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.calc-fields .full { grid-column: 1 / -1; }
.calc label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.calc label[hidden] { display: none; }
.calc select {
  width: 100%; min-height: 42px; padding: 8px 10px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font: inherit; font-size: 15px;
}
.calc dl { margin: 0; display: grid; gap: 7px; font-size: 14px; }
.calc dl > div { display: grid; grid-template-columns: 1fr auto; column-gap: 8px; }
.calc dt { color: var(--muted); }
.calc dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.calc dd.note { grid-column: 1 / -1; font-size: 12.5px; font-weight: 400; text-align: left; color: var(--muted); }
.calc-total { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.calc-total b { display: block; font-size: 25px; line-height: 1.3; color: var(--gold-soft); font-variant-numeric: tabular-nums; }
.calc-fine { margin-top: 10px; font-size: 12.5px; line-height: 1.55; color: var(--muted); }

/* Notice */
.notice { border: 1px solid #5c3440; background: #241821; border-radius: var(--radius); padding: 14px 18px; font-size: 14.5px; color: #f1d7dd; }
.notice strong { color: var(--rose); }

/* FAQ */
.faq { display: grid; gap: 8px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 0 18px; }
.faq summary { cursor: pointer; padding: 13px 0; font-weight: 600; font-size: 15.5px; }
.faq details[open] summary { color: var(--gold-soft); }
.faq details p { padding-bottom: 14px; color: #d6d4df; font-size: 15px; }
.faq h3 { display: inline; font-size: inherit; font-weight: inherit; }

.related { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.related a { display: block; padding: 13px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; text-decoration: none; }
.related a:hover { border-color: var(--gold); }
.related strong { display: block; color: var(--text); }
.related span { font-size: 13.5px; color: var(--gold-soft); }

.terms { display: grid; gap: 10px; margin: 0; }
.terms > div { display: grid; grid-template-columns: 68px 1fr; gap: 12px; }
.terms dt { font-weight: 700; color: var(--gold-soft); }
.terms dd { margin: 0; color: #d6d4df; }

.info-table { display: grid; gap: 8px; margin: 0; }
.info-table > div { display: grid; grid-template-columns: 90px 1fr; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.info-table > div:last-child { border-bottom: 0; padding-bottom: 0; }
.info-table dt { color: var(--muted); font-size: 14px; }
.info-table dd { margin: 0; }

.shop-hero { border-radius: 16px; overflow: hidden; height: 220px; border: 1px solid var(--line); background: var(--surface-2); margin-top: 14px; }
.shop-hero img { width: 100%; height: 100%; object-fit: cover; }

/* Footer */
.site-foot { margin-top: 56px; background: #000; border-top: 1px solid var(--line); padding: 34px 0 28px; font-size: 14px; color: var(--muted); }
.foot-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.site-foot h2 { font-size: 13.5px; color: var(--text); margin-bottom: 8px; }
.site-foot ul { list-style: none; padding: 0; margin: 0; }
.site-foot li { margin-bottom: 4px; }
.site-foot a { color: var(--muted); text-decoration: none; }
.site-foot a:hover { color: var(--text); }
.foot-legal { padding-top: 18px; font-size: 13px; line-height: 1.7; }
.foot-legal strong { color: var(--rose); }

/* Floating contact */
.fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 30;
  display: inline-flex; align-items: center; gap: 7px; padding: 12px 18px; border-radius: 999px;
  background: var(--gold); color: var(--gold-ink); font-size: 14.5px; font-weight: 800; text-decoration: none;
  box-shadow: 0 8px 26px rgba(0, 0, 0, .5);
}
.fab:hover { background: var(--gold-soft); }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .ticker-view { overflow-x: auto; }
  .ticker-track [aria-hidden="true"], .ticker-pause { display: none; }
  .scroll-progress { display: none !important; }
}

@media (max-width: 960px) {
  .with-side { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; order: -1; }
  .util-nav a:not(.icon-btn) { display: none; }
  .zone-map { grid-template-columns: minmax(0, 1fr); }
  .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .filter .filter-q { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  :root { --head-h: 96px; }
  .site-head .wrap { flex-wrap: wrap; gap: 0 12px; padding-top: 9px; }
  .brand { flex: 1; }
  .cat-nav { order: 3; flex: 0 0 100%; margin: 5px -4px 5px; }
  .rings { display: flex; overflow-x: auto; scrollbar-width: none; gap: 14px; padding: 18px 0 14px; scroll-snap-type: x proximity; }
  .rings::-webkit-scrollbar { display: none; }
  .ring { flex: 0 0 74px; scroll-snap-align: start; }
  .ring-disc { width: 70px; height: 70px; }
  .ring-disc span { font-size: 13px; }
  .ring-name { font-size: 12.5px; }
  .hero { padding: 28px 20px 112px; }
  .hero-art { height: 110px; }
  .hero-moon { top: 14px; right: 14px; width: 56px; height: 56px; }
  .btn-row .btn { flex: 1 1 100%; }
  .props, .contact { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 18px; }
  .shop-grid, .shop-grid-2, .zones { grid-template-columns: minmax(0, 1fr); }
  .filter { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 14px; }
  .filter .filter-submit { display: none; }
  .shop-hero { height: 150px; }
  .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fab { left: 16px; right: 16px; bottom: 12px; justify-content: center; }
  body { padding-bottom: 66px; }
  .toasts { left: 16px; right: 16px; bottom: 72px; width: auto; }
  .zone-name { font-size: 24px; stroke-width: 6px; }
  .zone-count { font-size: 30px; }
  .zone-roads text { display: none; }
  .zone-figure { padding: 10px; }
  .switch { margin-left: 4px; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .tabs button, .switch { flex: none; }
  .race-row { grid-template-columns: 70px minmax(0, 1fr) 100px; font-size: 13.5px; }
  .race-controls { grid-template-columns: 1fr 1fr; width: 100%; }
  .toc { margin-left: -4px; margin-right: -4px; }
  .ticker-clock { font-size: 12.5px; }
  .hero-art-back { height: 140px; }
}
