/* HoteLux VIP 요금 트래커 — "Guest Folio" 테마
   Porcelain(배경) · Lacquer(상단 바) · Ink(본문) · Brass(추천에만) · Fall/Rise(가격 방향, 항상 기호와 함께) */

:root {
  color-scheme: light;
  --page: #f5f7f5;          /* Porcelain */
  --surface: #ffffff;
  --surface-2: #eef2ef;
  --lacquer: #183a2e;
  --lacquer-ink: #f2f5f2;
  --lacquer-mute: #a9bdb3;
  --ink: #16201b;
  --ink-2: #44514a;
  --muted: #5f6b65;         /* 작은 글씨 대비: page 5.2:1, surface-2 4.9:1 */
  --rule: #dde4df;          /* 행 구분선 */
  --rule-strong: #b9c5be;
  --brass: #a9802f;
  --brass-ink: #86631f;     /* 황동색 작은 글씨용 (흰 배경 5.5:1). --brass 는 테두리·큰 숫자에만 */
  --brass-wash: rgba(169, 128, 47, 0.10);
  --rec-wash: rgba(169, 128, 47, 0.045);
  --fall: #16775a;
  --fall-wash: rgba(22, 119, 90, 0.09);
  --rise: #a3372f;
  --rise-wash: rgba(163, 55, 47, 0.08);
  --focus: #2a6fd6;
  --shadow: 0 12px 32px rgba(22, 32, 27, 0.16);

  /* 차트·히트맵(hotel.js)이 읽는 변수 — 이름 유지 */
  --grid: #e3e9e5;
  --axis: #c3cdc7;
  --border: rgba(22, 32, 27, 0.10);
  --accent: #1f6b52;
  --series-1: #1f6b52;
  --band: rgba(31, 107, 82, 0.13);
  --avg: #8a958f;
  --good: var(--fall);
  --bad: var(--rise);
  --good-bg: var(--fall-wash);
  --bad-bg: var(--rise-wash);
  --warn-bg: var(--brass-wash);
  /* 비교 3 등급 램프 (ordinal 검증 통과, 싼 날일수록 진한 녹색) */
  --g-very_cheap: #0b5f2e;
  --g-cheap: #2f8550;
  --g-normal: #55a572;
  --g-pricey: #84c098;
  --g-very_pricey: transparent;
  --g-ink-very_cheap: #ffffff;
  --g-ink-cheap: #ffffff;
  --g-ink-normal: #0b1a12;
  --g-ink-pricey: #0b1a12;
  --g-ink-very_pricey: #16201b;

  --sans: "Pretendard Variable", Pretendard, -apple-system, "Segoe UI", "Malgun Gothic", system-ui, sans-serif;
  /* 한글은 Newsreader에 없으므로 Pretendard로 이어지게 (한국어 호텔 이름) */
  --serif: "Newsreader", "Pretendard Variable", Pretendard, "Iowan Old Style", Georgia, serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #0e1411; --surface: #141c18; --surface-2: #1b2520;
    --lacquer: #1d3b30; --lacquer-ink: #edf2ee; --lacquer-mute: #93ab9f;
    --ink: #e6ece8; --ink-2: #b8c4bd; --muted: #8b9a92;
    --rule: #24302a; --rule-strong: #3a4842;
    --brass: #d2ae62; --brass-ink: #d2ae62; --brass-wash: rgba(210, 174, 98, 0.12); --rec-wash: rgba(210, 174, 98, 0.05);
    --fall: #3dbb8c; --fall-wash: rgba(61, 187, 140, 0.12);
    --rise: #e07a70; --rise-wash: rgba(224, 122, 112, 0.12);
    --focus: #6aa2ff; --shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
    --grid: #232d28; --axis: #3a4842; --border: rgba(230, 236, 232, 0.10);
    --accent: #5fc79d; --series-1: #5fc79d; --band: rgba(95, 199, 157, 0.16); --avg: #8b9a92;
    --g-very_cheap: #6fd897; --g-cheap: #46ad6c; --g-normal: #338a54; --g-pricey: #2b7046;
    --g-ink-very_cheap: #0b1a12; --g-ink-cheap: #0b1a12; --g-ink-normal: #ffffff;
    --g-ink-pricey: #ffffff; --g-ink-very_pricey: #e6ece8;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0e1411; --surface: #141c18; --surface-2: #1b2520;
  --lacquer: #1d3b30; --lacquer-ink: #edf2ee; --lacquer-mute: #93ab9f;
  --ink: #e6ece8; --ink-2: #b8c4bd; --muted: #8b9a92;
  --rule: #24302a; --rule-strong: #3a4842;
  --brass: #d2ae62; --brass-ink: #d2ae62; --brass-wash: rgba(210, 174, 98, 0.12); --rec-wash: rgba(210, 174, 98, 0.05);
  --fall: #3dbb8c; --fall-wash: rgba(61, 187, 140, 0.12);
  --rise: #e07a70; --rise-wash: rgba(224, 122, 112, 0.12);
  --focus: #6aa2ff; --shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  --grid: #232d28; --axis: #3a4842; --border: rgba(230, 236, 232, 0.10);
  --accent: #5fc79d; --series-1: #5fc79d; --band: rgba(95, 199, 157, 0.16); --avg: #8b9a92;
  --g-very_cheap: #6fd897; --g-cheap: #46ad6c; --g-normal: #338a54; --g-pricey: #2b7046;
  --g-ink-very_cheap: #0b1a12; --g-ink-cheap: #0b1a12; --g-ink-normal: #ffffff;
  --g-ink-pricey: #ffffff; --g-ink-very_pricey: #e6ece8;
}

/* ---------- 기본 */
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--page);
  color: var(--ink);
  font: 400 14px/1.5 var(--sans);
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration-color: var(--rule-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
.num, .tnum, table.data td.num { font-variant-numeric: tabular-nums; }
.small { font-size: 12px; color: var(--muted); }
.ink2 { color: var(--ink-2); }
.serif { font-family: var(--serif); font-optical-sizing: auto; letter-spacing: 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

select, input[type="date"], input[type="search"], button {
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--rule-strong); border-radius: 8px; padding: 6px 10px; min-height: 34px;
}
button { cursor: pointer; }
button:hover, select:hover { border-color: var(--ink-2); }
input[type="checkbox"] { accent-color: var(--lacquer); width: 16px; height: 16px; }

/* ---------- 상단 바 (Lacquer) */
header.top {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 14px 28px; background: var(--lacquer); color: var(--lacquer-ink);
  /* 넓은 화면: 좌우 끝을 main 본문(최대 1440px, 안쪽 24px)과 맞춘다. 메리어트 탭도 같은 폭 */
  padding-inline: max(24px, calc((100% - 1392px) / 2));
}
header.top h1 { margin: 0; font: 600 17px/1.2 var(--sans); letter-spacing: -0.01em; }
/* 대표 이름 「이때다」: 두 탭(hotel-lux, marriott-rates) 같은 모양 */
header.top h1 a { color: inherit; text-decoration: none; }
header.top h1 .brand { font-family: var(--sans); font-weight: 800; font-size: 22px; letter-spacing: -0.04em; margin-right: 10px; }
header.top h1 .tagline { font-weight: 500; font-size: 14px; color: var(--lacquer-mute); }
@media (max-width: 480px) { header.top h1 .tagline { display: none; } }
header.top .sub { color: var(--lacquer-mute); font-size: 12.5px; }
header.top .spacer { flex: 1; }
header.top .asof { color: var(--lacquer-mute); font-size: 12.5px; white-space: nowrap; }
header.top .asof[hidden] { display: none; }
header.top label { display: inline-flex; align-items: center; gap: 6px; color: var(--lacquer-mute); font-size: 12.5px; }
header.top label[hidden] { display: none; }
header.top select, header.top button {
  background: transparent; color: var(--lacquer-ink); border-color: rgba(255, 255, 255, 0.28);
}
header.top select option { color: #16201b; background: #fff; }
header.top button:hover, header.top select:hover { border-color: rgba(255, 255, 255, 0.6); }
header.top .theme { width: 34px; padding: 0; }
header.top select.pref { max-width: 170px; }

/* ---------- 사이트 탭: VIP 요금(이 프로젝트) | 메리어트(/marriott/ → marriott-rates 프로젝트, vercel.json rewrite)
   marriott-rates public/static/style.css에 같은 규칙이 있다 */
.site-tabs { background: var(--lacquer); border-top: 1px solid rgba(255, 255, 255, 0.12); }
.site-tabs .in { max-width: 1440px; margin: 0 auto; padding: 0 24px; display: flex; gap: 4px; overflow-x: auto; }
.site-tabs a {
  padding: 9px 14px 8px; color: var(--lacquer-mute); text-decoration: none; font-size: 13.5px; white-space: nowrap;
  border-bottom: 2px solid transparent;
}
.site-tabs a:hover { color: var(--lacquer-ink); }
.site-tabs a[aria-current="page"] { color: var(--lacquer-ink); border-bottom-color: var(--brass); font-weight: 600; }
@media (max-width: 760px) { .site-tabs .in { padding: 0 8px; } .site-tabs a { padding: 8px 10px 7px; font-size: 13px; } }
.site-tabs .in { align-items: center; }
.site-tabs .basis { margin-left: auto; font-size: 12px; color: var(--lacquer-mute); white-space: nowrap; padding-left: 12px; }
@media (max-width: 760px) { .site-tabs .basis { display: none; } }
.xlink { display: inline-block; margin-top: 8px; font-size: 13px; color: var(--accent); text-decoration: underline dotted; text-underline-offset: 3px; }
.xlink:hover { text-decoration: underline; }
.xlink[hidden] { display: none; }

main { max-width: 1440px; margin: 0 auto; padding: 14px 24px 48px; }

/* ---------- 오늘의 원장 (요약 한 줄) */
.ledger {
  display: flex; align-items: stretch; flex-wrap: wrap;
  border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule-strong);
  margin-bottom: 18px;
}
.ledger .lg { padding: 12px 22px 12px 0; margin-right: 22px; border-right: 1px solid var(--rule); min-width: 0; }
.ledger .lg:last-child { border-right: 0; margin-right: 0; }
.ledger .lg-title { display: flex; flex-direction: column; justify-content: center; padding-right: 26px; }
.ledger .lg-title b { font: 650 17px/1.2 var(--sans); letter-spacing: -0.01em; }
.ledger .lg-title span { font-size: 12px; color: var(--muted); margin-top: 2px; }
.ledger .v { font: 650 26px/1.1 var(--sans); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.ledger .k { font-size: 12.5px; color: var(--ink-2); margin-top: 3px; }
.ledger .h { font-size: 11.5px; color: var(--muted); }
.ledger .lg.is-rec .v { color: var(--brass); }
.ledger .lg.is-fall .v { color: var(--fall); }
.ledger .v .arr { font-size: 15px; margin-right: 3px; vertical-align: 2px; }

/* ---------- 오늘 눈에 띄는 변화 */
.tip { display: flex; gap: 10px; align-items: baseline; margin: 10px 0 12px; padding: 7px 12px; font-size: 13px; color: var(--ink-2);
  background: var(--brass-wash); border-left: 3px solid var(--brass); border-radius: 4px 8px 8px 4px; }
.tip b { font: 700 11px/1 var(--sans); letter-spacing: 0.08em; color: var(--brass-ink); flex: none; }
.grouptog { align-self: end; padding-bottom: 6px; white-space: nowrap; }
.stay { margin-top: 4px; padding: 3px 8px; border-radius: 6px; background: var(--brass-wash); font-size: 12px; color: var(--ink); text-align: right; }
.stay b { display: block; font-weight: 650; }
.stay .small { color: var(--ink-2); }
.stay-detail { margin: 0 0 12px; padding: 8px 12px; border-left: 3px solid var(--brass); background: var(--brass-wash); border-radius: 4px 8px 8px 4px; font-size: 13px; }
.stay-detail:empty { display: none; }
.room { font-size: 11.5px; color: var(--muted); margin-top: 2px; max-width: 320px; margin-left: auto; }
.perks { margin-top: 3px; display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.perk { font-size: 11px; padding: 1px 6px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); }
.perk.no { color: var(--muted); }
.pricerange { display: inline-block; vertical-align: top; min-width: 250px; }
.pricerange .pr-top { white-space: nowrap; }
.pricerange .pr-top input { width: 96px; }
.rs { position: relative; height: 24px; margin: 6px 9px 0; }
.rs::before { content: ""; position: absolute; left: 0; right: 0; top: 10px; height: 4px; border-radius: 2px; background: var(--rule-strong); }
.rs-fill { position: absolute; top: 10px; height: 4px; border-radius: 2px; background: var(--accent); }
.rs input[type=range] { position: absolute; left: -9px; top: 0; width: calc(100% + 18px); height: 24px; margin: 0; padding: 0;
  background: none; border: 0; pointer-events: none; -webkit-appearance: none; appearance: none; }
.rs input[type=range]::-webkit-slider-runnable-track { background: transparent; height: 24px; }
.rs input[type=range]::-moz-range-track { background: transparent; }
.rs input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 18px; height: 18px; margin-top: 3px;
  border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); cursor: grab; }
.rs input[type=range]::-moz-range-thumb { pointer-events: auto; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); cursor: grab; }
.rs input[type=range]:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--accent); outline-offset: 2px; }
.pricerange .small { margin-top: 2px; color: var(--muted); }
.hl { margin-bottom: 20px; }
.hl-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.hl-head h2 { margin: 0; font: 650 16px/1.3 var(--sans); letter-spacing: -0.01em; }
.hl-sub { font-size: 12.5px; color: var(--muted); }
.hl-toggle { margin-left: auto; font-size: 12.5px; min-height: 28px; padding: 3px 10px; }
.hl.collapsed .hl-list { display: none; }
.hl-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.hl-card {
  display: flex; flex-direction: column; gap: 3px; padding: 12px 14px 10px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--rule); border-top: 2px solid var(--ink); border-radius: 4px 4px 10px 10px;
  min-width: 0;
}
.hl-card:hover { border-color: var(--rule-strong); border-top-color: var(--ink); background: var(--surface-2); }
.hl-card.is-rec { border-top-color: var(--brass); }
.hl-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.hl-top .hname { font-size: 15.5px; }
.hl-top .keytag { margin: 0; flex: none; }
.hl-meta { font-size: 12px; color: var(--muted); }
.hl-date { margin-top: 2px; font-size: 13px; }
.hl-date .hl-meta { margin-left: 4px; }
.hl-date .badge.off { margin: 0 0 0 4px; }
.hl-price { display: flex; align-items: baseline; gap: 10px; margin-top: 2px; }
.hl-was { font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.hl-why { list-style: none; margin: 6px 0 0; padding: 6px 0 0; border-top: 1px dashed var(--rule); display: flex; flex-wrap: wrap; gap: 4px 10px; }
.hl-why li { font-size: 12px; color: var(--ink-2); }
.hl-card.extra { display: none; }
.hl.all .hl-card.extra { display: flex; }
.hl.all .hl-more { display: none; }
.hl-more { grid-column: 1 / -1; justify-self: start; font-size: 12.5px; min-height: 30px; padding: 4px 12px; }
.hl-empty { margin: 0; padding: 16px 18px; background: var(--surface); border: 1px dashed var(--rule-strong); border-radius: 10px; color: var(--ink-2); font-size: 13px; grid-column: 1 / -1; }
@media (max-width: 1100px) { .hl-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- 보드 (필터 + 표) */
.board { background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; }
.filterbar {
  position: sticky; top: 0; z-index: 15; background: var(--surface);
  border-bottom: 1px solid var(--rule); border-radius: 12px 12px 0 0; padding: 14px 18px 10px;
}
.fb-toggle { display: none; align-items: center; justify-content: space-between; width: 100%; margin-bottom: 8px; padding: 9px 12px; font: 600 14px/1.2 var(--sans);
  color: var(--ink); background: var(--surface-2); border: 1px solid var(--rule-strong); border-radius: 8px; cursor: pointer; }
.fb-toggle::after { content: "▾"; }
.filterbar.open > .fb-toggle::after { content: "▴"; }
.filterbar .row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filterbar label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.opts { margin-top: 10px; }
.opts > summary {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer; list-style: none;
  font-size: 13px; color: var(--ink-2); padding: 4px 0;
}
.opts > summary::-webkit-details-marker { display: none; }
.opts > summary::before { content: "▸"; transition: transform .15s; }
.opts[open] > summary::before { transform: rotate(90deg); }
.opts .row { padding: 8px 0 2px; gap: 14px; }
.opts .hint { font-size: 12px; color: var(--muted); }

.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--rule-strong); background: var(--surface); color: var(--ink-2);
  font-size: 13px; cursor: pointer; user-select: none;
}
.chip:hover { border-color: var(--ink-2); }
.chip[aria-pressed="true"] { background: var(--lacquer); border-color: var(--lacquer); color: var(--lacquer-ink); }
.chip .n { font-variant-numeric: tabular-nums; font-size: 12px; opacity: .72; }

/* ---------- 비교 표 */
.table-wrap { overflow-x: auto; }
.sortbar { display: none; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th {
  position: sticky; top: 0; background: var(--surface); z-index: 1;
  text-align: left; font-weight: 500; font-size: 12px; color: var(--muted);
  padding: 10px 12px; border-bottom: 1px solid var(--rule-strong); white-space: nowrap; cursor: pointer;
}
table.data th.num { text-align: right; }
table.data th[data-sort]::after { content: " ↕"; opacity: .3; }
table.data th.asc::after { content: " ↑"; opacity: 1; }
table.data th.desc::after { content: " ↓"; opacity: 1; }
table.data td { padding: 6px 10px; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.data td.num { text-align: right; }
table.data tbody tr:hover td { background: var(--surface-2); }
table.data tr.rec td:first-child { box-shadow: inset 3px 0 0 var(--brass); }
table.data tr.rec td { background: var(--rec-wash); }
table.data tr.rec:hover td { background: var(--surface-2); }

@media (min-width: 761px) {   /* PC 표: 호텔명 열이 좁아져 줄바꿈되지 않게 폭을 확보 */
  table.data td.c-hotel { min-width: 230px; width: 24%; }
  table.data td.c-ci { white-space: nowrap; width: 150px; }
  table.data td.c-price { min-width: 250px; }
  table.data td.c-price .price-local, table.data td.c-price .asof { white-space: nowrap; }
  table.data td.c-offer { width: 200px; }
  table.data td.c-link { white-space: nowrap; width: 1%; }
}
.hname { font: 500 16px/1.25 var(--serif); font-optical-sizing: auto; text-decoration: underline dotted var(--muted); text-underline-offset: 4px; }
.hname:hover { text-decoration: underline; }
.hmeta { font-size: 12px; color: var(--muted); margin-top: 3px; }
.ci { font-weight: 550; font-variant-numeric: tabular-nums; white-space: nowrap; }
.price { font: 650 18px/1.15 var(--sans); font-variant-numeric: tabular-nums; letter-spacing: -0.015em; }
.c-price .price-local, .c-price .asof { display: inline; margin: 0; font-size: 12px; }
.c-price .asof::before { content: " · "; }
.c-price .stay { display: block; width: fit-content; margin: 3px 0 0 auto; padding: 1px 8px; text-align: right; }
.c-price .stay .small { display: none; }
.c-price .stay b { display: inline; font-size: 12px; }
.c-price .perks { margin-top: 3px; }
.price-local { font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; margin-top: 2px; }
.rate { font-size: 11.5px; color: var(--muted); margin-top: 3px; max-width: 220px; margin-left: auto; }
.na-text { color: var(--muted); font-size: 13px; }
.btn-book { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 8px; font: 600 13.5px/1.2 var(--sans); text-decoration: none; white-space: nowrap;
  background: var(--lacquer); color: var(--lacquer-ink); border: 1px solid var(--accent); box-shadow: 0 1px 2px rgba(0, 0, 0, .15); }
.btn-book:hover { background: var(--accent); color: #fff; }
.btn-book:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ext { display: inline-flex; align-items: center; justify-content: center; height: 28px; padding: 0 10px; border: 1px solid var(--rule-strong); border-radius: 6px; text-decoration: none; color: var(--ink-2); background: var(--surface); font-size: 12.5px; white-space: nowrap; }
.ext:hover { background: var(--surface-2); color: var(--ink); border-color: var(--ink-2); }

.asof { font-size: 11.5px; color: var(--ink-2); margin-top: 2px; font-variant-numeric: tabular-nums; }
.asof.is-cal { color: var(--muted); font-style: italic; }
.src-live { display: inline-block; font-size: 10.5px; font-weight: 650; color: var(--fall); border: 1px solid currentColor;
  border-radius: 4px; padding: 0 5px; margin-left: 4px; vertical-align: 1px; }
.src-note { margin: 10px 0 0; font-size: 12.5px; color: var(--ink-2); max-width: 900px; }
.src-note.is-cal { color: var(--muted); }   /* .cal 은 히트맵 달력 격자 클래스라 쓰지 않는다 */

/* 가격 방향: 색 + 기호 + 부호 */
.delta { display: inline-flex; align-items: baseline; gap: 5px; font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.delta .arr { font-size: 11px; }
.delta.down { color: var(--fall); }
.delta.up { color: var(--rise); }
.delta.flat, .delta.na { color: var(--muted); font-weight: 500; }
.dsub { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; margin-top: 2px; white-space: nowrap; }
.dnote { font-size: 11.5px; color: var(--muted); }

/* ③ 날짜 간 위치 미터 */
.meter { display: inline-grid; grid-template-columns: repeat(5, 12px); gap: 2px; vertical-align: middle; }
.meter i { height: 8px; border-radius: 2px; background: var(--surface-2); border: 1px solid var(--rule); }
.meter i.on { border-color: transparent; }
.rank { display: flex; align-items: center; gap: 8px; white-space: nowrap; font-weight: 550; }
.rank-sub { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; margin-top: 3px; white-space: nowrap; }

/* 배지 */
.badge {
  display: inline-block; font-size: 11.5px; line-height: 1; padding: 4px 7px; border-radius: 5px;
  border: 1px solid var(--rule-strong); color: var(--ink-2); white-space: nowrap; margin: 0 3px 3px 0;
}
.badge.offer { border-color: var(--lacquer); color: var(--lacquer); background: transparent; }
:root[data-theme="dark"] .badge.offer { border-color: var(--accent); color: var(--accent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .badge.offer { border-color: var(--accent); color: var(--accent); } }
.badge.off { border-color: transparent; background: var(--surface-2); color: var(--ink-2); margin-top: 4px; }
.badge.low { border-color: transparent; background: var(--brass-wash); color: var(--ink); }
/* 추천: 황동 룸키 태그 (이 사이트에서 황동색을 쓰는 유일한 요소) */
.keytag {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px 3px 7px; margin: 0 4px 4px 0;
  border: 1px solid var(--brass); border-radius: 4px 11px 11px 4px; color: var(--brass-ink);
  font-size: 11.5px; font-weight: 650; line-height: 1.3; white-space: nowrap;
}
.keytag::before { content: ""; width: 5px; height: 5px; border-radius: 50%; border: 1.5px solid currentColor; }
.badge.rec { border-color: var(--brass); color: var(--brass); }

.pill { display: inline-block; padding: 2px 7px; border-radius: 4px; font-size: 12px; white-space: nowrap; }
.pill.cheaper { background: var(--fall-wash); color: var(--fall); }
.pill.pricier { background: var(--rise-wash); color: var(--rise); }
.pill.similar, .pill.insufficient, .pill.unavailable { background: var(--surface-2); color: var(--ink-2); }
.grade { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.grade i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; border: 1px solid var(--border); }

.more { padding: 14px; text-align: center; border-top: 1px solid var(--rule); }
.more button { padding: 8px 18px; }
.empty { color: var(--muted); padding: 40px 12px; text-align: center; }
.asof.is-stale { color: var(--brass-ink); }
.foot.notice { margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--rule); }
.foot { font-size: 12px; color: var(--muted); max-width: 900px; line-height: 1.7; margin-top: 16px; }

/* ---------- 다중 선택 */
.ms { position: relative; display: inline-block; }
.ms-btn { display: inline-flex; gap: 6px; align-items: center; max-width: 300px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-btn .ms-label { color: var(--muted); }
.ms-btn[aria-expanded="true"] { border-color: var(--lacquer); box-shadow: 0 0 0 1px var(--lacquer); }
.ms-panel {
  position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; width: 310px; max-height: 400px;
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--rule-strong);
  border-radius: 10px; box-shadow: var(--shadow); padding: 10px;
  animation: ms-in .14s ease-out;
}
@keyframes ms-in { from { opacity: 0; transform: translateY(-4px); } }
.ms-panel[hidden] { display: none; }
.ms-actions { display: flex; gap: 6px; align-items: center; margin-bottom: 8px; }
.ms-actions button { font-size: 12px; padding: 3px 9px; min-height: 28px; }
.ms-actions .ms-count { margin-left: auto; font-variant-numeric: tabular-nums; }
.ms-search { margin-bottom: 8px; }
.ms-list { overflow: auto; }
.ms .ms-item { display: flex; gap: 8px; align-items: center; width: 100%; padding: 6px 6px; border-radius: 6px; cursor: pointer; font-size: 13px; color: var(--ink); }
.ms .ms-item:hover { background: var(--surface-2); }
.ms-group { font-size: 11.5px; color: var(--muted); padding: 8px 6px 2px; font-weight: 600; }

/* ---------- 호텔 상세 */
.hotel-head { margin-bottom: 18px; padding-bottom: 14px; border-bottom: 2px solid var(--ink); }
.hotel-head h2 { margin: 0 0 4px; font: 500 32px/1.15 var(--serif); font-optical-sizing: auto; letter-spacing: -0.005em; }
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; padding: 18px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 1000px) { .layout { grid-template-columns: 1fr; } }
.months { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.month h4 { margin: 0 0 6px; font: 600 13.5px/1.2 var(--sans); color: var(--ink); }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal .wd { font-size: 10.5px; color: var(--muted); text-align: center; padding-bottom: 2px; }
.cell {
  position: relative; height: 42px; border-radius: 5px; border: 1px solid var(--border);
  background: var(--g-very_pricey); font-size: 10.5px; padding: 3px 4px; cursor: pointer;
  display: flex; flex-direction: column; justify-content: space-between; overflow: hidden;
  font-variant-numeric: tabular-nums;
}
.cell .d { opacity: .85; }
.cell .p { font-weight: 650; text-align: right; }
.cell .m { position: absolute; top: 2px; right: 4px; font-size: 10px; font-weight: 700; }
.cell .star { position: absolute; bottom: 3px; left: 4px; font-size: 10px; line-height: 1; }
.cell.est, .legend i.est { outline: 1.5px dashed var(--ink-2); outline-offset: -3px; }
.cell.na { background: repeating-linear-gradient(45deg, transparent 0 4px, var(--grid) 4px 5px); color: var(--muted); cursor: default; }
.cell.empty { border: none; background: none; cursor: default; }
.cell.sel { box-shadow: 0 0 0 2px var(--ink); }
.cell.off .d { font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); margin: 10px 0 16px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.lg-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; width: 100%; }
.lg-label { font-weight: 600; color: var(--ink); }
.lg-reset { font: inherit; font-size: 12px; color: var(--ink-2); background: none; border: 0; text-decoration: underline; cursor: pointer; padding: 3px 4px; }
.lg-sub { color: var(--muted); }
.lg-btn { display: inline-flex; align-items: center; gap: 5px; font: inherit; color: inherit; cursor: pointer; padding: 3px 9px;
  background: var(--surface); border: 1px solid var(--rule-strong); border-radius: 999px; box-shadow: 0 1px 1px rgba(0, 0, 0, .08); }
.lg-btn:hover { background: var(--surface-2); }
.lg-btn.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); font-weight: 600; }
.cell.dim { opacity: 0.18; }
.legend i { width: 14px; height: 14px; border-radius: 3px; border: 1px solid var(--border); display: inline-block; }
.cmp3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-bottom: 18px; border-top: 1px solid var(--rule-strong); border-bottom: 1px solid var(--rule); }
.cmp3 .card { padding: 12px 14px 12px 0; border: 0; border-radius: 0; background: none; }
.cmp3 .card + .card { padding-left: 14px; border-left: 1px solid var(--rule); }
.cmp3 .t { font-size: 12px; color: var(--muted); }
.cmp3 .v { font-size: 18px; font-weight: 650; margin: 4px 0; font-variant-numeric: tabular-nums; }
.cmp3 .s { font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .cmp3 { grid-template-columns: 1fr; }
  .cmp3 .card + .card { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); }
}
.chart-box { position: relative; height: 260px; }
.chart-box.small { height: 180px; }
#tip {
  position: fixed; pointer-events: none; z-index: 40; background: var(--surface); color: var(--ink);
  border: 1px solid var(--rule-strong); border-radius: 8px; padding: 8px 10px; font-size: 12px;
  box-shadow: var(--shadow); display: none; max-width: 260px; font-variant-numeric: tabular-nums;
}

/* ---------- 모바일: 표 → 카드 */
@media (max-width: 760px) {
  header.top { padding: 8px 12px; gap: 8px; }
  header.top .sub { display: none; }
  header.top label > span { display: none; }   /* 좁은 화면: 선택 상자만 */
  header.top select.pref { max-width: 120px; }
  main { padding: 8px 8px 32px; }
  .ledger { display: grid; grid-template-columns: repeat(4, 1fr); }
  .ledger .lg { padding: 8px 0 8px 10px; margin: 0; border-right: 0; border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); min-width: 0; }
  .ledger .lg:nth-child(2) { border-left: 0; padding-left: 0; }
  .ledger .lg-title { grid-column: 1 / -1; border: 0; padding: 8px 0 6px; flex-direction: row; justify-content: flex-start; align-items: baseline; gap: 10px; }
  .ledger .lg-title b { font-size: 15px; }
  .ledger .v { font-size: 18px; }
  .ledger .k { font-size: 11px; line-height: 1.25; }
  .ledger .h { display: none; }
  .tip { margin: 6px 0 8px; padding: 5px 10px; font-size: 12px; }
  .filterbar > .fb-toggle { display: flex; }
  .filterbar:not(.open) > .row.more-filters, .filterbar:not(.open) > .opts { display: none; }
  .filterbar.open > .row.more-filters { flex-wrap: wrap; overflow: visible; }
  .filterbar { position: static; padding: 12px; }
  .filterbar > .row.more-filters { padding-bottom: 4px; }
  /* 기본 보기 카드: 호텔 / 날짜 + 가격 / 취소 / 조식·혜택 / 확인일 + 예약 */
  table.data.simple tr { grid-template-columns: minmax(0, 1fr) auto; }
  table.data.simple td.c-hotel { grid-column: 1 / -1; grid-row: 1; }
  table.data.simple td.c-ci { grid-column: 1; grid-row: 2; }
  table.data.simple td.c-price { grid-column: 2; grid-row: 2 / span 2; }
  table.data.simple td.c-cancel { grid-column: 1; grid-row: 3; margin-top: 2px; }
  table.data.simple td.c-perks { grid-column: 1 / -1; grid-row: 4; margin-top: 2px; }
  table.data.simple td.c-checked { grid-column: 1; grid-row: 5; align-self: center; }
  table.data.simple td.c-link { grid-column: 2; grid-row: 5; }
  table.data.simple td.c-perks .room { display: none; }
  table.data.simple tr.sub td.c-hotel { display: none; }
  table.data.simple tr.sub { padding-left: 22px; }
  .ms { position: static; }
  .ms-panel {   /* 바텀 시트 */
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: auto; max-height: 72vh;
    border-radius: 14px 14px 0 0; padding: 14px 16px 20px; animation: sheet-in .18s ease-out;
  }
  @keyframes sheet-in { from { transform: translateY(24px); opacity: 0; } }
  .ms .ms-item { padding: 10px 6px; font-size: 14px; }

  .hl-list { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; padding-bottom: 6px; }
  .hl-card, .hl-card.extra { display: flex; flex: 0 0 82%; scroll-snap-align: start; }
  .hl-more { display: none; }
  .hl-sub { width: 100%; order: 3; }

  .sortbar { display: flex; gap: 6px; margin: 0 0 8px; overflow-x: auto; }
  .sortbar button { flex: none; padding: 5px 11px; font-size: 13px; border-radius: 999px; border: 1px solid var(--rule-strong); background: var(--surface); color: var(--ink-2); cursor: pointer; }
  .sortbar button[aria-pressed="true"] { background: var(--lacquer); border-color: var(--lacquer); color: var(--lacquer-ink); }
  table.data thead { display: none; }
  table.data, table.data tbody, table.data tr, table.data td { display: block; width: 100%; }
  /* 카드: 호텔명+↗ / 날짜+가격 / 신호(전일·평균·위치) 한 줄 / 오퍼 배지 */
  table.data tr {
    display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto auto; align-items: start; column-gap: 8px; row-gap: 0;
    padding: 6px 12px 6px; border-bottom: 1px solid var(--rule);
  }
  table.data td { border: 0; padding: 0; background: none !important; width: auto; }
  table.data tr.rec { box-shadow: inset 3px 0 0 var(--brass); background: var(--rec-wash); }
  table.data tr.rec td:first-child { box-shadow: none; }
  table.data td.c-hotel { grid-column: 1 / -1; grid-row: 1; min-width: 0; }
  table.data td.c-link { grid-column: 5; grid-row: 4; align-self: center; margin-top: 3px; width: auto; }
  table.data td.c-link .ext { height: 24px; padding: 0 8px; font-size: 12px; }
  table.data td.c-ci { grid-column: 1; grid-row: 2; min-width: 0; margin-top: 0; font-size: 12.5px; white-space: nowrap; }
  table.data td.c-ci .ci { font-weight: 500; }
  table.data td.c-price { grid-column: 4 / 6; grid-row: 2 / span 2; text-align: right; margin-top: 0; }
  table.data td.c-prev, table.data td.c-win, table.data td.c-rank {
    grid-row: 4; display: inline-flex; align-items: baseline; gap: 4px; align-self: center;
    margin-top: 3px; padding: 1px 7px; border-radius: 6px; background: var(--surface-2);
  }
  table.data td.c-prev { grid-column: 1; }
  table.data td.c-win { grid-column: 2; }
  table.data td.c-rank { grid-column: 4; justify-self: end; }
  table.data td.c-prev.is-empty, table.data td.c-win.is-empty, table.data td.c-rank.is-empty { display: none; }
  table.data td[data-label]::before { content: attr(data-label); font-size: 11px; color: var(--muted); flex: none; }
  table.data td.c-prev > div, table.data td.c-win > div, table.data td.c-rank > div { display: inline-flex; align-items: baseline; gap: 4px; flex-wrap: wrap; }
  table.data td .dsub, table.data td .dnote, table.data td .rank-sub { display: none; }
  table.data td.c-offer { grid-column: 2 / 4; grid-row: 2; padding: 0; margin-top: 1px; white-space: nowrap; }
  table.data td.c-offer .badge { margin: 0 3px 0 0; padding: 2px 5px; font-size: 10.5px; letter-spacing: -0.02em; }
  table.data td.c-offer:not(:has(.badge.offer, .keytag)) { display: none; }
  table.data td.c-offer .badge:not(.offer) { display: none; }   /* HoteLux Exclusive·Virtuoso 배지는 숨김 */
  table.data td.c-hotel .hmeta { display: none; }
  table.data td.c-price .price { font-size: 17px; }
  table.data td.c-price .price-local, table.data td.c-price .asof:not(.is-stale), table.data td.c-price .room { display: none; }
  table.data td.c-price .stay { margin-top: 1px; padding: 0 6px; }
  table.data td.c-price .stay b { font-size: 11.5px; letter-spacing: -0.02em; }
  table.data td.c-price .perks { margin-top: 1px; }
  .rate { max-width: 160px; }
  .hname { font-size: 16px; }
  .hotel-head h2 { font-size: 26px; }
  .card { padding: 14px; }
}
.room { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- 1-1 세금 기준 배지 */
.taxb { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 4px; font: 600 10.5px/1.5 var(--sans);
  color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--rule); vertical-align: 2px; white-space: nowrap; letter-spacing: 0; }
table.data th .taxb { font-weight: 500; }
.taxb.m-only { display: none; }

/* ---------- 1-4 같은 상품 / 최저 상품 바뀜 / 비교 불가 */
.pc { font-size: 11.5px; margin-top: 2px; white-space: nowrap; color: var(--muted); }
.pc.changed { color: var(--brass-ink); font-weight: 600; }
.pc.changed::before { content: "⇄ "; }
.hl-price { flex-wrap: wrap; row-gap: 2px; }
.hl-price .pc { margin: 0; flex-basis: 100%; }
table.data th[data-sort="prev"], table.data th[data-sort="window"], table.data th[data-sort="cross"] { white-space: normal; min-width: 96px; }
@media (max-width: 760px) { table.data td .pc { margin: 0 0 0 4px; } }

/* ---------- 1-5 연박 예상 배지 */
.est-badge { display: inline-block; padding: 0 5px; margin-right: 5px; border: 1px dashed var(--ink-2); border-radius: 4px;
  font: 600 10.5px/1.5 var(--sans); color: var(--ink-2); vertical-align: 1px; }
.stay-detail > div + div { margin-top: 3px; }

/* ---------- 2-1 요약 접기, 필터 첫 줄, 보기 전환 */
.ov-bar { display: flex; justify-content: flex-end; margin: 0 0 6px; }
.ov-toggle { font-size: 12.5px; min-height: 28px; padding: 3px 10px; }
.ov-body[hidden] { display: none; }
.lg-title .lg-hotels { font-size: 12px; color: var(--ink-2); margin-top: 4px; }
.filterbar > .row.primary { margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px dashed var(--rule); }
.filterbar .period input[type="date"] { min-height: 34px; }
.fixed { font-size: 12.5px; color: var(--ink-2); padding: 4px 9px; border-radius: 999px; background: var(--surface-2); white-space: nowrap; }
.viewtog { display: inline-flex; margin-left: auto; border: 1px solid var(--rule-strong); border-radius: 8px; overflow: hidden; }
.viewtog button { border: 0; border-radius: 0; min-height: 32px; padding: 5px 12px; font-size: 13px; color: var(--ink-2); background: var(--surface); }
.viewtog button + button { border-left: 1px solid var(--rule-strong); }
.viewtog button[aria-pressed="true"] { background: var(--lacquer); color: var(--lacquer-ink); font-weight: 600; }
.pr-l { gap: 4px !important; }
.pr-l > span { font-size: 12px; color: var(--muted); }
.help { font-size: 12px; color: var(--muted); align-self: center; }

/* ---------- 2-2 기본 보기 표 */
table.data th[data-sort]:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
table.data.simple td.c-cancel, table.data.simple td.c-checked { white-space: nowrap; }
table.data.simple td.c-perks { min-width: 220px; }
.perks.left { justify-content: flex-start; }
.room.left { margin-left: 0; }
.offers:empty { display: none; }
.offers { margin-top: 3px; }
.expand { display: inline-block; margin-top: 4px; min-height: 26px; padding: 2px 9px; font-size: 12px; color: var(--ink-2); border-radius: 999px; }
.expand[aria-expanded="true"] { background: var(--surface-2); }
table.data tr.sub td { background: var(--surface-2); }
table.data tr.sub .price { font-size: 15px; }

/* ---------- 1-7 브랜드 / 로열티 / 네트워크 */
.h-chain { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 8px 0 0; font-size: 13px; }
.h-chain div { display: flex; gap: 6px; }
.h-chain dt { color: var(--muted); }
.h-chain dd { margin: 0; color: var(--ink); font-weight: 550; }

/* ---------- 2-4 호텔 상세: 선택한 날짜 카드 + 혜택 */
.sel-card { margin-bottom: 18px; }
.sel-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 22px; align-items: start; }
@media (max-width: 1000px) { .sel-grid { grid-template-columns: 1fr; } }
.sel-title { font: 650 15px/1.3 var(--sans); margin-bottom: 6px; }
.sel-p { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px; }
.price.big { font-size: 28px; }
.sel-main .perks { margin: 6px 0 4px; }
.sel-main .asof { margin-top: 4px; font-size: 12.5px; }
.sel-main .stay-detail { margin-top: 12px; }
.sel-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 12px 0 4px; }
.sel-actions .xlink { margin-top: 0; }
.benefits h3 { margin: 0 0 6px; font: 650 15px/1.3 var(--sans); }
.benefits h4 { margin: 10px 0 4px; font: 600 12.5px/1.3 var(--sans); color: var(--ink-2); }
.benefits ul { list-style: none; margin: 0; padding: 0; }
.benefits li.bf { padding: 5px 0; border-bottom: 1px dashed var(--rule); font-size: 13px; line-height: 1.5; }
.bf-g { display: inline-block; min-width: 54px; margin-right: 6px; padding: 0 6px; border-radius: 4px; font-size: 11px; font-weight: 600; text-align: center; }
.bf-g.g-guaranteed { background: var(--fall-wash); color: var(--fall); }
.bf-g.g-on_availability, .bf-g.g-check_hotel { background: var(--surface-2); color: var(--ink-2); border: 1px dashed var(--rule-strong); }
.bf-k { font-weight: 600; }
.bf-src { display: block; margin-top: 1px; }
.bf-src a { color: inherit; }
.b-note { margin: 8px 0 0; }

/* ---------- 1-11 하단 */
.site-foot { margin-top: 16px; }
.site-foot .foot { margin-top: 6px; }

/* 모바일 덮어쓰기 (위 기본 규칙보다 뒤에 와야 한다) */
@media (max-width: 760px) {
  .filterbar > .row.primary { margin-bottom: 8px; padding-bottom: 8px; gap: 6px 8px; }
  .filterbar .period input[type="date"] { padding: 4px 6px; max-width: 140px; }
  .viewtog { margin-left: 0; }
  .ov-bar { margin: 4px 0 6px; }
  .taxb.m-only { display: inline-block; margin: 0 0 0 4px; }
  .help { width: 100%; }
}
