:root {
  --primary: #0057FF;
  --primary-dark: #0043CC;
  --accent: #FF6600;
  --bg: #F5F7FA;
  --card-bg: #ffffff;
  --text: #1A1A2E;
  --muted: #6B7280;
  --border: #E5E7EB;
  --header-bg: #ffffff;
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.06);
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-hover: 0 6px 24px rgba(0,87,255,0.13);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-pill: 999px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ===== Header ===== */
.site-header {
  background: var(--header-bg);
  color: var(--text);
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.header-tagline {
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.site-header .logo {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--primary);
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
}

.site-header .logo .logo-img {
  display: block;
  height: 34px;
  width: auto;
}

.site-header .logo .sub {
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-left: 1.6ch;
}

.search-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.search-tabs a, .search-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--muted);
  font-size: 0.83rem;
  letter-spacing: 0.03em;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.search-tabs a:hover, .search-tabs button:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #F0F5FF;
}

.search-tabs a.active, .search-tabs button.active {
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  border-color: var(--primary);
}

/* ===== Back link & page mode tabs ===== */
.back-link {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--primary);
  margin-bottom: 2px;
}

.back-link:hover {
  text-decoration: underline;
}

.page-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 10px 0 16px;
}

.page-tabs a {
  display: inline-flex;
  align-items: center;
  padding: 7px 18px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--muted);
  font-size: 0.83rem;
  letter-spacing: 0.03em;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.page-tabs a:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #F0F5FF;
}

.page-tabs a.active {
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  border-color: var(--primary);
}

/* ===== Layout ===== */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 20px;
}

.breadcrumb {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 16px;
}

.breadcrumb a {
  color: var(--primary);
}

.breadcrumb a:hover {
  text-decoration: underline;
}

h1.page-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin: 0 0 6px;
  color: var(--text);
}

.page-lead {
  color: var(--muted);
  margin: 0 0 20px;
  font-size: 0.9rem;
}

/* ===== Region blocks (top page) ===== */
.region-block {
  background: var(--card-bg);
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 24px;
  margin-bottom: 16px;
}

.region-block h2 {
  margin: 0 0 14px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text);
  border-bottom: 2px solid var(--bg);
  padding-bottom: 10px;
}

.pref-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pref-grid a {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 7px 14px;
  background: var(--bg);
  border: 1.5px solid transparent;
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.pref-grid a:hover {
  background: #F0F5FF;
  border-color: var(--primary);
  color: var(--primary);
}

.pref-grid a .count {
  font-size: 0.75rem;
  color: var(--muted);
}

.pref-grid a:hover .count {
  color: rgba(255, 255, 255, 0.75);
}

/* ===== Prefecture page lists ===== */
.list-section {
  background: var(--card-bg);
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 24px;
  margin-bottom: 16px;
}

.list-section h2 {
  margin: 0 0 12px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text);
}

.list-section h2 a {
  color: var(--primary);
}

.list-section h2 a:hover {
  text-decoration: underline;
}

.pref-all-section {
  display: inline-block;
  padding: 10px 18px;
}

.pref-all-section h2 {
  margin: 0;
}

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.area-city-group {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 6px;
}
.area-city-group:last-child {
  margin-bottom: 0;
}
.area-city-label {
  flex: 0 0 auto;
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  padding-top: 7px;
  white-space: nowrap;
  text-align: right;
}
.area-city-label a {
  color: var(--primary);
}
.area-city-label a:hover {
  text-decoration: underline;
}
.area-city-group .chip-grid {
  flex: 1;
}

.chip-grid a {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 6px 14px;
  background: var(--bg);
  border: 1.5px solid transparent;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.chip-grid a:hover {
  background: #F0F5FF;
  border-color: var(--primary);
  color: var(--primary);
}

.chip-grid a .count {
  font-size: 0.72rem;
  color: var(--muted);
}

.chip-grid a:hover .count {
  color: rgba(255, 255, 255, 0.75);
}

/* ===== Results toolbar ===== */
.results-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  background: var(--card-bg);
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 20px;
  margin-bottom: 16px;
}

.results-count {
  font-weight: bold;
}

.sort-control {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sort-control label {
  font-size: 0.85rem;
  color: var(--muted);
}

.checkbox-control label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  color: var(--muted);
  cursor: pointer;
}

.sort-control select,
.sort-control input[type="date"] {
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
}

.sort-control input[type="date"] {
  padding: 6px 4px;
  width: 8.5em;
}

.toolbar-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-left: auto;
  visibility: hidden;
}
.toolbar-controls.ready {
  visibility: visible;
}

/* ===== Hotel cards (table-like layout) ===== */
.hotel-list-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 17px 6px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: bold;
}

.hotel-list-header .hotel-col-rating {
  color: var(--muted);
}

.hotel-col-price .price-badge .label {
  display: none;
}

.hotel-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hotel-card {
  display: block;
  background: var(--card-bg);
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px;
  transition: box-shadow 0.2s, transform 0.15s;
}

.hotel-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.hotel-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.hotel-col {
  min-width: 0;
}

.hotel-col-thumb {
  flex: 0 0 56px;
}

.hotel-col-name {
  flex: 1 1 auto;
}

.hotel-col-rating {
  flex: 0 0 130px;
  font-size: 0.85rem;
  color: #e0a000;
}

.hotel-col-price {
  flex: 0 0 130px;
}

.hotel-thumb {
  width: 56px;
  height: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
  font-weight: bold;
  letter-spacing: 0.05em;
}

.hotel-thumb-img {
  object-fit: cover;
  background: #f0f0f0;
}

.hotel-name {
  font-size: 1.05rem;
  font-weight: bold;
  margin: 0 0 4px;
}

.hotel-access {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0;
}

.hotel-card > .hotel-plans {
  margin-top: 10px;
}

.price-badge {
  background: #F5F7FA;
  border: none;
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 0.8rem;
}

.price-badge .label {
  color: var(--muted);
  display: block;
  font-size: 0.7rem;
}

.price-badge .value {
  color: var(--primary);
  font-weight: bold;
  font-size: 1rem;
  white-space: nowrap;
}

.price-badge.stay {
  border-color: var(--accent);
}

.price-badge.stay .value {
  color: var(--accent);
}

.price-badge.empty .value {
  color: var(--muted);
  font-weight: normal;
}

.hotel-plans {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 8px;
}

.plan-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  font-size: 0.78rem;
  border-bottom: 1px solid var(--border);
}

.plan-row:last-child {
  border-bottom: none;
}

.plan-row-header {
  color: var(--muted);
  padding: 0 10px 6px;
  font-size: 0.7rem;
  border-bottom: 1px solid var(--border);
}
/* ヘッダの「料金」ラベルは左寄せ＋他ラベルと同色・同じ太さ。
   滞在時間・検索結果の両ヘッダ共通（データ行の金額は左寄せ・青・太字でヘッダと縦に揃う） */
.plan-row-header .plan-price {
  text-align: left;
  color: var(--muted);
  font-weight: normal;
}
/* ① 滞在時間セクションの「滞在時間」列はインデントを詰めて左寄せ（ヘッダ・データとも。検索画面は従来どおり） */
.stay-time-section .plan-hours {
  margin-left: 0;
  text-align: left;
}

/* 時間軸の凡例（固定24hモード）。一覧先頭に1回だけ表示し、スクロール中も上部に固定。
 * カード(padding:18px)と同じ左右余白にして、各ホテルのバー列と横位置を揃える。 */
.plans-legend {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 8px 18px 0;
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}
.plans-legend .plan-row-header {
  border-bottom: none;
  padding-bottom: 8px;
}
.plans-legend .plan-hours {
  font-weight: 600;
}

.plan-kind {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plan-price {
  flex: 0 0 80px;
  color: var(--primary);
  font-weight: bold;
  text-align: left;                 /* 左寄せ＋等幅数字で ￥ の縦位置を揃える */
  font-variant-numeric: tabular-nums;
}

.plan-hours {
  flex: 0 0 6em;
  margin-left: 20px;
  margin-right: 0;
  color: var(--muted);
  white-space: nowrap;
  text-align: left;
}
.plan-hours-dur {
  flex: 0 0 2.8em;
  color: var(--muted);
  white-space: nowrap;
  text-align: right;
  margin-left: 0px;
  margin-right: 6px;
}

.plan-bar-stack {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  gap: 3px;
  line-height: 1;
  justify-content: center;
}

/* 旧スタイル（■セル）バックアップ:
.plan-bar {
  flex: 0 0 auto;
  display: flex;
  font-family: monospace;
  line-height: 1;
}
.plan-bar .plan-cell {
  display: inline-block;
  width: 16px;
  flex-shrink: 0;
  text-align: center;
  color: var(--accent);
}
.plan-row-header .plan-cell {
  color: var(--muted);
}
*/

/* 案A: 縦区切り線バー（データ行） */
.plan-bar:not(.plan-bar-header) {
  flex: 0 0 auto;
  position: relative;
  width: 192px;
  height: 8px;
  background: #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
  align-self: center;
  display: block;
}
.plan-bar:not(.plan-bar-header)::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to right,
    transparent 0,
    transparent calc(48px - 1px),
    rgba(255, 255, 255, 0.6) calc(48px - 1px),
    rgba(255, 255, 255, 0.6) 48px
  );
  pointer-events: none;
}
.plan-bar-fill {
  display: block;
  height: 100%;
  background: #60A5FA;
  border-radius: 4px;
  min-width: 4px;
}

/* ヘッダー行の3時間ごとの時刻ラベル */
.plan-bar-header {
  flex: 0 0 auto;
  position: relative;
  width: 192px;
  height: 14px;
  display: block;
}
.plan-header-tick {
  position: absolute;
  font-size: 0.65rem;
  color: var(--muted);
  white-space: nowrap;
  line-height: 14px;
}

.hotel-plans.plan-empty {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  padding: 5px 0;
}

.no-results {
  text-align: center;
  color: var(--muted);
  padding: 40px 0;
}

/* ===== 広告スロット（A8等のバナー） ===== */
.ad-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: 16px 0;
}
.ad-slot a {
  line-height: 0;
  max-width: 100%;
}
.ad-slot img {
  max-width: 100%;
  height: auto;
}
.ad-label {
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.08em;
}
.footer-pr a {
  color: var(--primary);
  text-decoration: underline;
}
.footer-pr .ad-label {
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0 4px;
  margin-right: 4px;
}

/* ===== 広告: PC左右レール（スカイスクレイパー） ===== */
.ad-rail {
  position: fixed;
  top: 80px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.ad-rail-left { left: 12px; }
.ad-rail-right { right: 12px; }
.ad-rail .ad-label { font-size: 0.6rem; }
.ad-rail img { display: block; }
/* 念のため：幅が足りない画面ではレールを出さない（JS未対応ブラウザ対策） */
@media (max-width: 1439px) { .ad-rail { display: none; } }

/* ===== 広告: モバイル下部固定バナー ===== */
.ad-mobile-sticky {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 52px;
  padding: 2px 0;
  background: rgba(255, 255, 255, 0.97);
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
}
.ad-mobile-sticky img { max-width: 100%; height: auto; display: block; }
.ad-close {
  position: absolute;
  top: -24px; right: 8px;
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
  font-size: 15px;
  line-height: 22px;
  text-align: center;
  padding: 0;
  cursor: pointer;
}
/* 下部固定バナーぶん、フッターが隠れないよう余白を確保 */
body.has-sticky-ad { padding-bottom: 58px; }
@media (min-width: 601px) { .ad-mobile-sticky { display: none; } }

/* ===== 楽天市場 サイドレール用商品カード ===== */
.rail-rakuten-banner { width: 160px; box-sizing: border-box; }
.rail-rakuten-banner img { max-width: 100%; height: auto; display: block; }
.rakuten-rail-card {
  width: 160px;
  border: 1px solid #e0c0c0;
  border-radius: 4px;
  background: #fff;
  box-sizing: border-box;
  margin-bottom: 4px;
  display: flex;
  flex-direction: column;
}
.rakuten-rail-card .ad-label { margin: 4px 6px 2px; }
.rakuten-rail-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px;
  text-decoration: none;
  gap: 4px;
}
.rakuten-rail-link:hover { background: #fff8f8; border-radius: 4px; }
.rakuten-rail-img { border-radius: 2px; object-fit: cover; }
.rakuten-rail-title {
  font-size: 10px;
  color: #333;
  text-align: center;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rakuten-rail-price {
  font-size: 12px;
  color: #c00;
  font-weight: bold;
  text-align: center;
}

/* ===== 楽天市場 商品カードグリッド ===== */
.rakuten-products .rakuten-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.rakuten-card {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 8px;
  flex: 1 1 260px;
  max-width: 300px;
  background: #fff;
  box-sizing: border-box;
}
.rakuten-card-img {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 2px;
}
.rakuten-card-body {
  flex: 1;
  font-size: 11px;
  min-width: 0;
}
.rakuten-card-title {
  display: block;
  font-size: 11px;
  color: #333;
  text-decoration: none;
  line-height: 1.4;
  margin-bottom: 4px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
.rakuten-card-title:hover { text-decoration: underline; color: #c00; }
.rakuten-card-price {
  font-size: 13px;
  color: #c00;
  font-weight: bold;
  margin: 0 0 2px;
}
.rakuten-card-reviews {
  font-size: 10px;
  color: #666;
  margin: 0;
}
@media (max-width: 480px) {
  .rakuten-card { flex: 1 1 100%; max-width: 100%; }
}

/* ===== ローディングスピナー（画面遷移・データ読込中） ===== */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px 0;
  color: var(--muted);
  font-size: 0.85rem;
}
.spinner {
  width: 42px;
  height: 42px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== Hotel detail page ===== */
.hotel-detail-header {
  background: var(--card-bg);
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 16px;
}

.hotel-detail-header .hotel-thumb {
  flex: 0 0 200px;
  height: 140px;
  font-size: 2.4rem;
  border-radius: var(--radius);
}

.hotel-detail-header .head-flex {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.hotel-detail-header h1 {
  margin: 0 0 8px;
  border: none;
  padding: 0;
  font-size: 1.5rem;
  letter-spacing: 0.04em;
}

.hotel-info {
  flex: 1 1 auto;
  min-width: 0;
}

.hotel-side {
  flex: 0 0 160px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

.hotel-side .hotel-prices {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hotel-links {
  flex: 0 0 160px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

.hotel-links .external-link {
  margin-top: 0;
  text-align: center;
}

.hotel-map-section {
  margin-bottom: 16px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hotel-map {
  display: block;
  width: 100%;
  height: 320px;
  border: none;
}

.detail-section {
  background: var(--card-bg);
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 22px;
  margin-bottom: 16px;
}

.detail-section h2 {
  margin: 0 0 10px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

/* 近隣のホテル（内部リンク） */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.related-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s, transform 0.15s;
}
.related-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.related-card .hotel-thumb {
  flex: 0 0 56px;
}
.related-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.related-name {
  font-weight: bold;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.related-meta {
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-section pre {
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 0.88rem;
  margin: 0;
}

/* 運営者情報・プライバシーポリシー等の本文 */
.detail-section p {
  font-size: 0.9rem;
  line-height: 1.8;
  margin: 0 0 10px;
}
.detail-section p:last-child {
  margin-bottom: 0;
}
.info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.info-table th,
.info-table td {
  text-align: left;
  vertical-align: top;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}
.info-table th {
  width: 9em;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}
.info-table tr:last-child th,
.info-table tr:last-child td {
  border-bottom: none;
}
.footer-nav {
  margin-top: 14px;
}
.footer-nav a {
  color: var(--muted);
  text-decoration: underline;
}
.footer-copy {
  margin-top: 6px;
  color: var(--muted);
}

.plans-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.plans-table th {
  text-align: left;
  color: var(--muted);
  font-weight: 600;
  padding: 4px 10px 6px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.plans-table td {
  padding: 5px 10px;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}
.plans-table tr:last-child td {
  border-bottom: none;
}
.plans-table .col-week {
  white-space: nowrap;
}
.plans-table .col-price {
  white-space: nowrap;
  text-align: left;
  color: var(--primary);
  font-weight: bold;
  padding-right: 24px;
}
.plans-table .col-tz1 {
  white-space: nowrap;
}
.plans-mobile {
  display: none;
}
.pm-group {
  margin-bottom: 14px;
}
.pm-group:last-child {
  margin-bottom: 0;
}
.pm-kind {
  font-size: 0.85rem;
  font-weight: 700;
  padding: 3px 0 5px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2px;
}
.pm-table {
  width: 100%;
  table-layout: fixed; /* 列幅を固定し、内容が画面幅を超えてはみ出さないようにする */
  border-collapse: collapse;
  font-size: 0.83rem;
}
.pm-table td {
  padding: 4px 6px;
  vertical-align: middle;
  border-bottom: 1px solid var(--border);
}
.pm-table tr:last-child td {
  border-bottom: none;
}
.pm-week {
  width: 36%;
  white-space: normal;       /* 曜日は折り返し可（長い「平日(月~金・祝前日)」対応） */
  word-break: break-all;
}
.pm-price {
  width: 26%;
  white-space: nowrap;
  text-align: right;
  color: var(--primary);
  font-weight: bold;
  padding-right: 12px;       /* 「〜」と時間帯の間に余白を確保（1万円超でも被らない） */
}
.pm-tz {
  width: 38%;
  font-size: 0.78rem;
  padding-left: 10px;
}
.pm-tz1 {
  display: block;
}
.pm-tz2 {
  display: block;
  color: var(--muted);
  font-size: 0.73rem;
}
.tz1-start {
  display: inline-block;
  width: 2.5em;
  text-align: left;
  font-variant-numeric: tabular-nums;
  vertical-align: top;
}
.tz1-sep {
  display: inline-block;
  width: 1.6em;
  text-align: center;
  vertical-align: top;
}
.tz1-end {
  display: inline-block;
  min-width: 3.8em;
  text-align: left;
  font-variant-numeric: tabular-nums;
  vertical-align: top;
}

/* ===== 滞在可能時間セクション（ホテル詳細：選択日時で利用可能なプラン） ===== */
.stay-time-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 14px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
  margin-bottom: 10px;
}
.stay-time-head h2 {
  margin: 0;
  border-bottom: none;
  padding-bottom: 0;
}
.stay-time-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}
.stay-time-list {
  display: flex;
  flex-direction: column;
}
.stay-time-empty {
  margin: 4px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.external-link {
  display: inline-block;
  margin-top: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  background: var(--primary);
  color: #fff;
  font-size: 0.83rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: background 0.15s, box-shadow 0.15s;
}

.external-link:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(0,87,255,0.25);
}

/* ===== Footer ===== */
.site-footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  padding: 28px 0;
  background: #fff;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}

@media (max-width: 600px) {
  /* ===== Header ===== */
  .search-tabs a,
  .search-tabs button {
    padding: 7px 10px;
    font-size: 0.78rem;
  }

  /* ===== Page mode tabs — 常に1行・均等幅 ===== */
  .page-tabs {
    flex-wrap: nowrap;
    gap: 3px;
  }
  .page-tabs a {
    flex: 1 1 0;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    justify-content: center;
    font-size: 0.7rem;
    padding: 6px 4px;
  }

  /* ===== Toolbar — チェックイン・時刻を同じ行に ===== */
  .toolbar-controls {
    width: 100%;
    margin-left: 0;
    gap: 8px;
    align-items: flex-end;
  }
  /* チェックインラベルを日付inputの上に配置 */
  .toolbar-controls > .sort-control:first-child {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
  }
  .sort-control input[type="date"] {
    width: 7.5em;
  }

  /* ===== Hotel list (results) ===== */
  .hotel-list-header {
    display: none;
  }
  .hotel-row {
    flex-wrap: wrap;
    gap: 8px;
  }
  .hotel-col-thumb {
    flex: 0 0 56px;
  }
  /* 評価・最安値・宿泊最安値を常に1行に収める */
  .hotel-col-rating,
  .hotel-col-price {
    flex: 1 1 0;
    min-width: 0;
    overflow: hidden;
  }
  /* モバイルでは価格バッジのラベルを表示（列ヘッダーが非表示のため） */
  .hotel-col-price .price-badge {
    padding: 4px 6px;
  }
  .hotel-col-price .price-badge .label {
    display: block;
    font-size: 0.62rem;
  }
  .hotel-col-price .price-badge .value {
    font-size: 0.78rem;
  }

  /* ===== Plan rows ===== */
  /* 時刻バー（横幅固定・192px）はモバイルでは非表示 */
  .plan-bar-stack {
    display: none;
  }
  /* プランヘッダー行は時刻バーのみなのでモバイルでは非表示 */
  .plan-row-header {
    display: none;
  }
  .plan-hours {
    flex: 0 0 auto;
    font-size: 0.72rem;
    margin-left: 6px;
    margin-right: 0;
  }
  .plan-hours-dur {
    flex: 0 0 2.5em;
    font-size: 0.72rem;
    text-align: right;
    margin-left: 2px;
    margin-right: 0;
  }

  /* ===== Area search city groups ===== */
  /* PC：横並び（ラベル＋チップ）→ SP：縦積み */
  .area-city-group {
    flex-direction: column;
    gap: 4px;
  }
  .area-city-label {
    text-align: left;
    padding-top: 0;
    flex-basis: auto !important;
  }

  /* ===== 料金概要 モバイルレイアウト ===== */
  .plans-table {
    display: none;
  }
  .plans-mobile {
    display: block;
  }

  /* ===== 滞在可能時間（モバイル） ===== */
  /* タイトルとコントロールを縦積みにし、コントロールは横並びのまま折り返す */
  .stay-time-head {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .stay-time-controls {
    flex-wrap: wrap;
    gap: 8px 12px;
  }
  /* モバイルのホテル詳細「滞在時間」のみ: プランを1行目、料金・滞在時間を2行目に（検索画面は対象外） */
  .stay-time-section .plan-row {
    flex-wrap: wrap;
    align-items: baseline;
    gap: 3px 8px;
  }
  .stay-time-section .plan-kind {
    flex: 1 1 100%;            /* 1行目: プラン名を全幅で（長ければ折り返して全文表示） */
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.4;
  }
  .stay-time-section .plan-price {
    flex: 0 0 auto;           /* 2行目: 料金（内容幅・左寄せ） */
    text-align: left;
  }

  /* ===== Hotel detail ===== */
  .hotel-detail-header .head-flex {
    flex-direction: column;
  }
  .hotel-detail-header .hotel-thumb {
    flex: none;
    width: 100%;
  }
  .hotel-side,
  .hotel-links {
    flex: none;
    width: 100%;
  }
}

/* ── ページネーション ─────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 28px 0 12px;
}
.page-btn {
  padding: 8px 20px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s;
}
.page-btn:not(:disabled):hover {
  background: #f5f5f5;
  border-color: #999;
}
.page-btn:disabled {
  opacity: 0.35;
  cursor: default;
}
.page-info {
  font-size: 0.88rem;
  color: #666;
  white-space: nowrap;
}
