/* hotel-calendar */
:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #22252a;
  --muted: #6b7078;
  --line: #e4e1da;
  --accent: #1f6f5c;
  --low-bg: #fff1c7;
  --low-text: #7a4b00;
  --sun: #c0392b;
  --sat: #2563a8;
  --past: #b9bcc2;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #16181b;
    --surface: #1e2125;
    --text: #e8e6e1;
    --muted: #9aa0a8;
    --line: #33373d;
    --accent: #6cc4ab;
    --low-bg: #4a3a12;
    --low-text: #ffd98a;
    --sun: #f08a7e;
    --sat: #8ab6ec;
    --past: #555a61;
  }
}
:root[data-theme="dark"] {
  --bg: #16181b; --surface: #1e2125; --text: #e8e6e1; --muted: #9aa0a8; --line: #33373d;
  --accent: #6cc4ab; --low-bg: #4a3a12; --low-text: #ffd98a; --sun: #f08a7e; --sat: #8ab6ec; --past: #555a61;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", sans-serif;
  line-height: 1.7;
  font-size: 16px;
}
a { color: var(--accent); }
main, .site-head, .site-foot { max-width: 920px; margin: 0 auto; padding: 0 16px; }

.site-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-top: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.site-name { font-weight: 700; color: var(--text); text-decoration: none; }
.site-head { flex-wrap: wrap; }
.site-nav { font-size: 14px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.contact-form { width: 100%; height: 1150px; border: 1px solid var(--line); border-radius: 8px; background: #fff; margin-top: 8px; }

h1 { font-size: 1.5rem; line-height: 1.4; margin: 24px 0 8px; }
h2 { font-size: 1.15rem; margin: 28px 0 10px; }
h3 { font-size: 1rem; margin: 0 0 8px; }
.lead { color: var(--muted); margin: 0 0 8px; }
.caveat { font-size: 14px; color: var(--muted); margin: 0 0 8px; }
.fetched { font-size: 14px; color: var(--muted); margin: 0 0 2px; }
.disclaimer { font-size: 12px; color: var(--muted); margin: 0 0 16px; line-height: 1.6; }
.note { font-size: 14px; color: var(--muted); }
.na { color: var(--muted); }

/* 安い日 */
.best ol { margin: 0; padding-left: 1.6em; }
.best li { padding: 4px 0; }
.best .price { font-weight: 700; font-size: 1.1rem; }
.best .meal { font-size: 14px; color: var(--muted); }
.member { display: inline-block; font-size: 12px; padding: 0 6px; border: 1px solid var(--accent); color: var(--accent); border-radius: 4px; margin-left: 4px; }

/* カレンダー */
.months { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin-top: 16px; }
.month { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.mlow { font-weight: 400; font-size: 13px; color: var(--muted); margin-left: 6px; }
.cal { width: 100%; border-collapse: collapse; table-layout: fixed; }
.cal th { font-size: 12px; font-weight: 400; color: var(--muted); padding: 2px 0; }
.cal td { border-top: 1px solid var(--line); height: 48px; padding: 0; text-align: center; vertical-align: top; }
.cal td > a, .cal td > .cell { display: block; height: 100%; padding: 3px 0; text-decoration: none; color: inherit; }
.cal td a:hover { background: var(--bg); }
.cal .day { display: block; font-size: 12px; line-height: 1.2; }
.cal .p { display: block; font-size: 12px; line-height: 1.4; font-weight: 600; }
.cal .sun .day, .cal th.sun { color: var(--sun); }
.cal .sat .day, .cal th.sat { color: var(--sat); }
.cal .past .day { color: var(--past); }
.cal .low { background: var(--low-bg); }
.cal .low .p { color: var(--low-text); }

/* トップの一覧 */
.hotels { list-style: none; margin: 0; padding: 0; }
.hotels li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.hotels .pref { font-size: 13px; color: var(--muted); grid-column: 1; }
.hotels .sum { grid-column: 2; grid-row: 1 / span 2; align-self: center; text-align: right; }
.hotels .price { font-weight: 700; }
.hotels .date { font-size: 13px; color: var(--muted); display: block; }

/* 安い日（ホテルのページ）と、近いうちに泊まるなら（トップ） */
.best { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 24px; }
.near ul.nojs-limit li:nth-child(n+11) { display: none; }  /* JavaScript が動かないときも10件まで */
ul.nojs-limit5 li:nth-child(n+6) { display: none; }

/* 連休と週末 */
.period { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 2px 14px 8px; margin: 16px 0; }
.period h2 { margin: 12px 0 2px; }
.period.weekend h2 { font-size: 1rem; }
.period .stay { font-size: 13px; color: var(--muted); margin: 0 0 4px; }
.period .stay a { margin-right: 6px; }
.hotels .each { grid-column: 1 / span 2; font-size: 12px; color: var(--muted); }
.hotels .neardate { color: inherit; }

/* お気に入りと見張り（static/watch.js） */
.watch-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 14px; }
.watch-tools button, .watch-card button { font: inherit; font-size: 13px; padding: 3px 10px; border: 1px solid var(--accent); border-radius: 4px; background: var(--surface); color: var(--accent); cursor: pointer; }
.watch-msg { color: var(--low-text); }
.cal td.watched { box-shadow: inset 0 0 0 2px var(--accent); }
.cal td.watched .day::after { content: " ★"; color: var(--accent); }
.cal td.dropped, .cal td.opened { background: #dff3ea; }
body.picking .cal td[data-d] { cursor: pointer; }
body.picking .cal td[data-d]:hover { box-shadow: inset 0 0 0 2px var(--accent); }
.hotels .hname { grid-column: 1; }
.watch-btn { font: inherit; font-size: 16px; line-height: 1; margin-left: 6px; padding: 0 4px; border: 0; background: none; color: var(--accent); cursor: pointer; }
.watch-card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 4px 14px 10px; margin: 14px 0; }
.watch-card h2 { margin: 10px 0 2px; font-size: 1.05rem; }
.watch-head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.favmark { color: var(--accent); font-size: 13px; }
.watch-dates { list-style: none; margin: 6px 0; padding: 0; }
.watch-dates li { display: grid; grid-template-columns: 6.5em 1fr auto; gap: 0 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.watch-dates .wnow { font-weight: 700; }
.watch-dates .wjudge { font-size: 13px; color: var(--muted); }
.watch-dates .wstart { grid-column: 2; font-size: 12px; color: var(--muted); }
.watch-dates .unwatch { grid-column: 3; grid-row: 1 / span 2; }
.watch-dates li.dropped .wjudge, .watch-dates li.opened .wjudge { color: #fff; background: var(--accent); border-radius: 4px; padding: 0 6px; justify-self: start; }
.watch-actions { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; font-size: 14px; margin: 8px 0 0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cal td.dropped, :root:not([data-theme="light"]) .cal td.opened { background: #1f3d33; } }

/* 日付から探す（static/datepick.js） */
.h1sub { font-size: 1rem; font-weight: 400; color: var(--muted); }
.datepick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 4px; font-size: 14px; }
.datepick input, .datepick button { font: inherit; padding: 4px 8px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--text); }
.datepick button { cursor: pointer; background: var(--accent); border-color: var(--accent); color: #fff; }
.datelinks { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 4px 0 12px; font-size: 14px; }

/* トップのブランドの選択欄（static/filter.js） */
.filter { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 4px 14px 12px; margin-top: 16px; }
.filter summary { cursor: pointer; font-weight: 700; padding: 8px 0; }
.filter[open] summary { margin-bottom: 4px; }
.filter .sel { font-weight: 400; font-size: 14px; color: var(--muted); margin-left: 6px; }
.filter.narrowed .sel { color: var(--low-text); }
.filter fieldset { border: 0; border-top: 1px solid var(--line); margin: 0; padding: 6px 0 8px; }
.filter fieldset:first-of-type { border-top: 0; }
.filter legend { padding: 0; font-weight: 700; font-size: 14px; }
.filter fieldset > label { display: inline-block; font-size: 14px; margin: 2px 14px 2px 0; white-space: nowrap; }
.filter .count { font-size: 12px; color: var(--muted); margin-left: 3px; }
.filter-foot { margin: 6px 0 0; font-size: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filter-foot button { font: inherit; font-size: 13px; padding: 2px 10px; border: 1px solid var(--line); border-radius: 4px; background: var(--bg); color: var(--text); cursor: pointer; }
.filter-foot .shown { color: var(--muted); }
[hidden] { display: none !important; }

/* 24時間を過ぎた料金は隠す（static/expire.js） */
.expired .cal .p:not(.na), .expired .best, .expired .fetched { visibility: hidden; }
.expired .cal td a { pointer-events: none; }
li.expired .sum { visibility: hidden; }
.expired-note { background: var(--low-bg); color: var(--low-text); padding: 8px 12px; border-radius: 6px; }

.site-foot { margin-top: 40px; padding-top: 16px; padding-bottom: 32px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.credit { margin-top: 8px; }

@media (max-width: 480px) {
  h1 { font-size: 1.3rem; }
  .cal td { height: 44px; }
  .cal .p { font-size: 11px; }
}
