/* ================================================================
   どこいこ — Calm Pop Style
================================================================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #f7f6f3;
  --white: #ffffff;
  --text: #1c1c1c;
  --text-sub: #6b6b6b;
  --accent: #2d4be0;
  --accent-text: #ffffff;
  --btn-bg: #ebebeb;
  --btn-hover: #dedede;
  --btn-active-bg: #1c1c1c;
  --btn-active-text: #ffffff;
  --btn-disabled-bg: #f0f0f0;
  --btn-disabled-text: #c0c0c0;
  --border: #e0dfd9;
  --shadow: 0 1px 3px rgba(0,0,0,.07);
  --radius: 8px;
  --radius-lg: 14px;

  /* transport link colors */
  --c-jr-east:       #1e7a3a;
  --c-jr-west:       #1a52a0;
  --c-jr-kyushu:     #c0392b;
  --c-jr-ex:         #d44d00;
  --c-skyscanner:    #0770e3;
  --c-google-maps:   #4285f4;
  --c-bus:           #5a8a2a;
  --c-ferry:         #1a7a8a;
  --c-rental:        #7a7a7a;
  --c-rakuten:       #bf0000;
  --c-jalan:         #c85a00;
  --c-jalan-rental:  #9a4500;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif;
  font-size: 15px;
  line-height: 1.7;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

/* ── ヘッダー ── */

.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 20px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -.5px;
}

.site-nav {
  display: flex;
  gap: 20px;
}

.site-nav a {
  font-size: 13px;
  color: var(--text-sub);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--text);
}

/* ── メイン ── */

.main {
  padding: 32px 20px 72px;
}

.container {
  max-width: 600px;
  margin: 0 auto;
}

/* ── ヒーロー ── */

.hero {
  padding: 28px 0 36px;
}

.hero-text {
  font-size: 14px;
  line-height: 1.9;
  color: var(--text-sub);
  max-width: 480px;
}

/* ── コントロール ── */

.controls {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.control-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-sub);
  letter-spacing: .8px;
  text-transform: uppercase;
}

/* 出発地 select */

.departure-select {
  appearance: none;
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%231c1c1c' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 36px 10px 14px;
  font-size: 15px;
  color: var(--text);
  cursor: pointer;
  width: 100%;
  max-width: 200px;
}

.departure-select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* 出発日時 */

.datetime-input {
  appearance: none;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  cursor: pointer;
  width: 100%;
  max-width: 260px;
}

.datetime-input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* ボタングループ */

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sel-btn {
  background: var(--btn-bg);
  color: var(--text);
  border: none;
  border-radius: 100px;
  padding: 8px 18px;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: background .1s;
  white-space: nowrap;
  user-select: none;
}

.sel-btn:hover {
  background: var(--btn-hover);
}

.sel-btn.active {
  background: var(--btn-active-bg);
  color: var(--btn-active-text);
}

.sel-btn.disabled {
  background: var(--btn-disabled-bg);
  color: var(--btn-disabled-text);
  cursor: not-allowed;
  pointer-events: none;
}

.sel-btn.hidden {
  display: none;
}

/* エラー */

.form-error {
  font-size: 13px;
  color: #c0392b;
  padding: 8px 14px;
  background: #fef0ee;
  border-radius: var(--radius);
  border-left: 3px solid #c0392b;
}

/* GOボタン */

.go-btn {
  width: 100%;
  background: var(--accent);
  color: var(--accent-text);
  border: none;
  border-radius: var(--radius-lg);
  padding: 18px;
  font-size: 17px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  letter-spacing: .3px;
  margin-top: 4px;
  transition: opacity .1s;
}

.go-btn:hover {
  opacity: .88;
}

.go-btn:active {
  opacity: .75;
}

.go-btn:disabled {
  opacity: .4;
  cursor: not-allowed;
}

/* ── 結果 ── */

.result {
  margin-top: 48px;
}

/* カウンター */

.result-counter {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-sub);
  padding: 0 4px 14px;
}

/* 都市ブロック */

.city-block {
  background: var(--white);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 28px 24px 24px;
  border: 1px solid var(--border);
  border-bottom: none;
}

.city-header {
  margin-bottom: 14px;
}

.city-name {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.1;
  color: var(--text);
}

.city-sub {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-sub);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.type-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 100px;
  font-weight: 600;
}

.type-onsen  { background: #fff0e8; color: #c05a00; }
.type-island { background: #e8f4ff; color: #0070b8; }
.type-rural  { background: #eaf5e8; color: #3a7a20; }
.type-town   { background: #f0eeff; color: #5a3ab0; }

.city-meta-row {
  display: flex;
  gap: 20px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.meta-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-sub);
  letter-spacing: .5px;
  text-transform: uppercase;
  margin-right: 6px;
}

.meta-value {
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
}

.themes-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.theme-tag {
  font-size: 12px;
  color: var(--text-sub);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 3px 10px;
}

.city-appeal {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.appeal-line {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
  padding-left: 12px;
  border-left: 2px solid var(--border);
}

/* 結果ブロック（交通・宿泊） */

.result-block {
  background: var(--white);
  border: 1px solid var(--border);
  border-top: none;
  padding: 20px 24px;
}

.result-block-last {
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.block-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-sub);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.link-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* リンクアイテム */

.link-item {
  display: block;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
  text-decoration: none;
  cursor: pointer;
  transition: opacity .1s;
}

.link-item:hover {
  opacity: .85;
}

/* 交通リンクの色 */
.link-jr-east      { background: var(--c-jr-east); }
.link-jr-west      { background: var(--c-jr-west); }
.link-jr-kyushu    { background: var(--c-jr-kyushu); }
.link-jr-ex        { background: var(--c-jr-ex); }
.link-skyscanner   { background: var(--c-skyscanner); }
.link-google-maps  { background: var(--c-google-maps); }
.link-bus          { background: var(--c-bus); }
.link-ferry        { background: var(--c-ferry); }
.link-rental       { background: var(--c-rental); }

/* 宿泊リンクの色 */
.link-rakuten      { background: var(--c-rakuten); }
.link-jalan        { background: var(--c-jalan); }
.link-jalan-rental { background: var(--c-jalan-rental); }

/* リトライボタン */

.retry-btn {
  margin-top: 16px;
  width: 100%;
  background: transparent;
  color: var(--text-sub);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: background .1s, color .1s;
}

.retry-btn:hover {
  background: var(--white);
  color: var(--text);
}

/* ── フッター ── */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 20px;
  margin-top: 48px;
  background: var(--white);
}

.footer-inner {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.site-footer p {
  font-size: 12px;
  color: var(--text-sub);
}

.footer-nav {
  display: flex;
  gap: 16px;
  margin-top: 10px;
}

.footer-nav a {
  font-size: 12px;
  color: var(--text-sub);
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--text);
}

/* アクセス行（代表駅→二次交通） */

.access-line {
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: 12px;
  font-weight: 500;
}

/* 距離★凡例 */

.star-legend {
  font-size: 11px;
  color: var(--text-sub);
  letter-spacing: .3px;
}

/* ── 法律ページ共通 ── */

.legal-main {
  max-width: 600px;
  margin: 0 auto;
  padding: 40px 20px 72px;
}

.legal-main h1 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 6px;
  letter-spacing: -.5px;
}

.legal-main .updated {
  font-size: 12px;
  color: var(--text-sub);
  margin-bottom: 36px;
}

.legal-main h2 {
  font-size: 15px;
  font-weight: 700;
  margin: 32px 0 8px;
}

.legal-main p,
.legal-main li {
  font-size: 14px;
  line-height: 1.85;
  color: var(--text);
}

.legal-main ul,
.legal-main ol {
  padding-left: 20px;
  margin-top: 8px;
}

.legal-main li {
  margin-bottom: 4px;
}

.legal-main a {
  color: var(--accent);
}

.back-link {
  display: inline-block;
  margin-top: 36px;
  font-size: 13px;
  color: var(--text-sub);
  text-decoration: none;
}

.back-link:hover {
  color: var(--text);
}

/* ── レスポンシブ ── */

@media (max-width: 420px) {
  .hero-text {
    font-size: 13px;
  }

  .city-name {
    font-size: 28px;
  }

  .city-block,
  .result-block {
    padding: 20px 16px;
  }

  .go-btn {
    font-size: 16px;
    padding: 16px;
  }

  .sel-btn {
    font-size: 12px;
    padding: 7px 14px;
  }
}
