:root {
  color-scheme: light;
  --paper: #f6f5f0;
  --ink: #182d3a;
  --muted: #687474;
  --line: #dddfd7;
  --green: #27634a;
  --green-wash: #edf3ec;
  --amber: #89643a;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
body { margin: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button { font: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 5px; }
.page { width: min(1040px, calc(100% - 96px)); margin: 0 auto; padding: 68px 0 64px; }
.page-header { border-bottom: 2px solid var(--ink); padding-bottom: 20px; }
.heading-row, .meta-row, .update-meta { display: flex; align-items: center; justify-content: space-between; }
h1 { margin: 0; font-size: 38px; line-height: 1.2; font-weight: 650; letter-spacing: -.06em; }
.booking-link { display: inline-flex; gap: 12px; align-items: center; text-decoration: none; font-size: 15px; font-weight: 600; padding: 10px 0 10px 16px; }
.booking-link svg { width: 18px; height: 18px; transition: transform .15s ease; }
.booking-link:hover svg { transform: translate(2px, -2px); }
.meta-row { margin-top: 25px; gap: 16px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.meta-row p { margin: 0; }
.update-meta { gap: 18px; font-variant-numeric: tabular-nums; }
.schedule { border-left: 1px solid #c6ccc4; padding-left: 18px; }
.month { margin-top: 44px; }
.month h2 { margin: 0 0 19px; font-size: 22px; font-weight: 600; letter-spacing: -.045em; }
.rates { width: 100%; border-collapse: collapse; table-layout: fixed; font-variant-numeric: tabular-nums; }
.rates col:nth-child(1) { width: 25%; }
.rates col:nth-child(2) { width: 37%; }
.rates col:nth-child(3) { width: 21%; }
.rates col:nth-child(4) { width: 17%; }
.rates th { padding: 0 0 12px; text-align: left; font-size: 12px; color: var(--muted); font-weight: 500; border-bottom: 1px solid var(--line); }
.rates th:nth-child(n+3) { text-align: right; }
.rates td { padding: 22px 0; vertical-align: middle; border-bottom: 1px solid var(--line); }
.rates tbody tr { transition: background .15s; }
.rates tbody tr:hover { background: rgba(255,255,255,.5); }
.stay-dates { display: flex; align-items: center; gap: 9px; white-space: nowrap; }
.stay-dates time { display: inline-flex; gap: 5px; align-items: baseline; font-size: 16px; letter-spacing: -.025em; font-weight: 570; }
.weekday { color: var(--muted); font-size: 12px; font-weight: 400; }
.date-arrow { color: #99a19b; font-size: 14px; }
.room-hotel { display: block; font-size: 14px; line-height: 1.45; font-weight: 550; }
.room-name { margin: 3px 16px 0 0; font-size: 12px; color: var(--muted); line-height: 1.5; word-break: keep-all; }
.price-cell, .minimum-cell { text-align: right; }
.price { display: block; white-space: nowrap; font-size: 21px; font-weight: 600; line-height: 1.3; letter-spacing: -.045em; }
.currency { margin-left: 3px; font-size: 12px; font-weight: 400; letter-spacing: 0; }
.minimum { font-size: 15px; line-height: 1.4; white-space: nowrap; color: #7b8582; letter-spacing: -.025em; }
.minimum-cell.current-low .minimum { color: var(--green); }
.minimum-cell.current-low .minimum::before { content: ""; display: inline-block; width: 5px; height: 5px; margin: 0 7px 3px 0; border-radius: 100%; background: var(--green); }
.trend { margin: 5px 0 0; font-size: 11px; line-height: 1.4; white-space: nowrap; }
.trend.down { color: var(--green); }
.trend.above { color: var(--amber); }
.availability { color: var(--muted); font-size: 13px; line-height: 1.5; }
.row-unavailable .stay-dates { opacity: .65; }
.row-error .availability { color: var(--amber); }
.last-known { margin: 4px 12px 0 0; font-size: 11px; line-height: 1.5; color: var(--muted); }
.dash { display: block; color: #a8afaa; font-size: 20px; font-weight: 300; }
.notice { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 22px; padding: 14px 16px; background: #f1eadc; color: #705432; font-size: 13px; line-height: 1.5; border-radius: 4px; }
.retry { flex: 0 0 auto; border: 0; border-bottom: 1px solid currentColor; padding: 0 0 1px; color: inherit; background: none; cursor: pointer; font-size: 12px; }
.retry:disabled { opacity: .5; cursor: wait; }
.loading, .empty { padding: 58px 0; margin: 0; color: var(--muted); text-align: center; font-size: 14px; }
.loading::before { content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 100%; margin: 0 9px 2px 0; background: var(--green); animation: breathe 1.4s ease-in-out infinite; }
.archive { margin-top: 44px; border-top: 1px solid var(--line); color: var(--muted); }
.archive summary { cursor: pointer; padding-top: 20px; font-size: 13px; width: fit-content; }
.archive .month { opacity: .75; }
.archive .month h2 { font-size: 19px; }
@keyframes breathe { 50% { opacity: .25; } }

@media (max-width: 800px) {
  .page { width: calc(100% - 48px); padding-top: 40px; }
  .rates col:nth-child(1) { width: 29%; }
  .rates col:nth-child(2) { width: 32%; }
  .rates col:nth-child(3) { width: 23%; }
  .rates col:nth-child(4) { width: 16%; }
  .stay-dates { gap: 6px; }
  .stay-dates time { font-size: 14px; gap: 3px; }
  .weekday { font-size: 11px; }
  .price { font-size: 19px; }
  .minimum { font-size: 13px; }
  .minimum-cell.current-low .minimum::before { display: none; }
}

@media (max-width: 600px) {
  .page { width: calc(100% - 40px); padding: 34px 0 44px; }
  h1 { font-size: 30px; }
  .page-header { padding-bottom: 17px; }
  .booking-link { font-size: 14px; gap: 7px; }
  .meta-row { align-items: flex-start; margin-top: 22px; font-size: 11px; gap: 8px; }
  .update-meta { flex-wrap: wrap; justify-content: flex-end; gap: 2px 11px; }
  .schedule { padding-left: 11px; }
  .month { margin-top: 33px; }
  .month h2 { margin-bottom: 6px; font-size: 21px; }
  .rates, .rates tbody { display: block; }
  .rates colgroup, .rates thead { display: none; }
  .rates tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "date price" "room minimum"; gap: 8px 10px; padding: 21px 0; border-bottom: 1px solid var(--line); }
  .rates td { display: block; border: 0; padding: 0; }
  .dates-cell { grid-area: date; align-self: center; }
  .room-cell { grid-area: room; }
  .price-cell { grid-area: price; }
  .minimum-cell { grid-area: minimum; align-self: end; }
  .stay-dates { gap: 7px; }
  .stay-dates time { gap: 4px; font-size: 16px; }
  .weekday { font-size: 12px; }
  .date-arrow { font-size: 13px; }
  .room-hotel { font-size: 12px; display: inline; }
  .room-name { font-size: 11px; margin-top: 2px; margin-right: 0; }
  .price { font-size: 22px; }
  .currency { font-size: 11px; }
  .minimum { font-size: 11px; }
  .minimum::before { content: "최저 "; }
  .minimum-cell.current-low .minimum::before { content: "최저 "; display: inline; width: auto; height: auto; margin: 0; border-radius: 0; background: none; }
  .trend { margin-top: 4px; font-size: 10px; }
  .availability { font-size: 12px; }
  .last-known { margin-right: 0; font-size: 10px; }
  .notice { padding: 12px; font-size: 12px; gap: 10px; }
  .retry { font-size: 11px; }
  .archive { margin-top: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
