* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif;
  background: linear-gradient(160deg, #1a2238 0%, #0f1626 100%);
  color: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px 48px;
}
h1 { font-size: 1.35rem; font-weight: 700; margin-bottom: 4px; letter-spacing: .02em; }
.sub { color: #9aa6c4; font-size: .8rem; margin-bottom: 12px; }

.langs { display: flex; gap: 4px; margin-bottom: 12px; }
.langs button {
  background: rgba(255,255,255,.08); border: 1.5px solid transparent; color: #9aa6c4;
  font-size: .64rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; cursor: pointer;
}
.langs button.active { color: #1a2238; background: #ffd84d; }

/* 都市切替（東京 / 大阪 / 名古屋） */
.cities { display: flex; gap: 6px; margin-bottom: 14px; }
.cities a {
  color: #9aa6c4; font-size: .75rem; font-weight: 700; text-decoration: none;
  padding: 4px 12px; border-radius: 999px; border: 1.5px solid rgba(255,255,255,.18);
}
.cities a[aria-current] { color: #fff; border-color: #ffd84d; }

.lines {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  max-width: 560px; margin-bottom: 20px;
}
/* 路線チップ: 色ドット＋路線名（コンパクト） */
.lines { gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px 4px 8px; border-radius: 999px; cursor: pointer; user-select: none;
  font-size: .72rem; font-weight: 600;
  background: rgba(255,255,255,.08); transition: .15s;
}
.chip .dot { width: 10px; height: 10px; border-radius: 50%; }
.chip.off { opacity: .3; filter: grayscale(1); }
.lines .sep { width: 1px; align-self: stretch; margin: 2px 3px; background: rgba(255,255,255,.3); }

.ops {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 10px;
}
.ops[hidden] { display: none; }
.op-chip {
  padding: 6px 14px; border-radius: 999px; cursor: pointer;
  font-size: .8rem; font-weight: 700; user-select: none;
  background: rgba(255,255,255,.14); border: 1.5px solid rgba(255,255,255,.4);
  transition: .15s;
}
.op-chip.off { opacity: .35; border-color: transparent; }

.card {
  width: 100%; max-width: 420px; background: rgba(255,255,255,.06);
  border-radius: 24px; padding: 36px 28px; text-align: center;
  border: 1px solid rgba(255,255,255,.1); min-height: 260px;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.line-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 18px; border-radius: 999px; font-weight: 700; font-size: 1rem;
  margin-bottom: 18px; color: #fff;
}
.line-badge .sym {
  min-width: 30px; height: 30px; padding: 0 6px; border-radius: 15px; background: #fff;
  color: #111; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .9rem;
}
.station { font-size: 2.6rem; font-weight: 800; line-height: 1.15; margin-bottom: 8px; }
.station-en { color: #9aa6c4; font-size: .95rem; letter-spacing: .05em; }
.num { color: #c8d2ee; font-size: .85rem; margin-top: 10px; }
.placeholder { color: #6b769a; font-size: 1.1rem; }
.card-guide { margin-top: 12px; color: #b6c0db; font-size: .85rem; line-height: 1.6; max-width: 320px; }
.map-link {
  display: inline-block; margin-top: 16px; padding: 9px 20px;
  border: 1px solid rgba(255,255,255,.25); border-radius: 999px;
  color: #d4dcf0; font-size: .85rem; text-decoration: none; transition: background .15s;
}
.map-link:hover { background: rgba(255,255,255,.1); }
.hotel-link {
  display: inline-block; margin-top: 10px; padding: 9px 20px; border-radius: 999px;
  color: #1a2238; background: #fff; font-size: .85rem; font-weight: 700; text-decoration: none;
}
.hotel-link .pr-badge { font-size: .6rem; color: #6b769a; border: 1px solid #b6c0db; border-radius: 4px; padding: 0 4px; vertical-align: 2px; }

.spinning .station { animation: blur .08s linear infinite; }
@keyframes blur { 0%{opacity:.4} 50%{opacity:1} 100%{opacity:.4} }

button.go {
  margin-top: 24px; padding: 16px 48px; font-size: 1.1rem; font-weight: 700;
  border: none; border-radius: 999px; cursor: pointer; color: #1a2238;
  background: linear-gradient(135deg, #ffd84d, #ffb300);
  box-shadow: 0 8px 24px rgba(255,180,0,.35); transition: transform .1s;
}
button.go:active { transform: scale(.96); }
button.go:disabled { opacity: .6; cursor: default; }
/* 結果表示中: 画面下部に固定 */
button.go.floating {
  position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  margin-top: 0; z-index: 20; white-space: nowrap;
  box-shadow: 0 8px 24px rgba(255,180,0,.35), 0 4px 16px rgba(0,0,0,.5);
}
button.go.floating:active { transform: translateX(-50%) scale(.96); }
body.has-result { padding-bottom: 110px; }

/* ハンバーガーメニュー & 履歴ドロワー */
.menu-btn {
  position: fixed; top: 16px; right: 16px; z-index: 30;
  width: 42px; height: 42px; border-radius: 12px; cursor: pointer;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: background .15s;
}
.menu-btn:hover { background: rgba(255,255,255,.14); }
.menu-btn span { display: block; width: 18px; height: 2px; border-radius: 2px; background: #d4dcf0; }
.drawer {
  position: fixed; inset: 0 0 0 auto; margin: 0; height: 100%; max-height: none; width: 300px; max-width: 84vw;
  background: #141d31; color: inherit; border: 0; border-left: 1px solid rgba(255,255,255,.1);
  box-shadow: -16px 0 48px rgba(0,0,0,.5); overflow-y: auto;
}
.drawer[open] { animation: drawer-in .25s ease; }
@keyframes drawer-in { from { transform: translateX(100%); } }
.drawer::backdrop { background: rgba(0,0,0,.5); }
.drawer-body { min-height: 100%; padding: 20px 18px; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.drawer-head h2 { font-size: 1rem; font-weight: 700; color: #fff; }
.drawer-close {
  background: none; border: none; color: #9aa6c4; font-size: 1.1rem;
  cursor: pointer; padding: 4px 8px; border-radius: 8px;
}
.drawer-close:hover { color: #fff; background: rgba(255,255,255,.08); }
.hist-empty { color: #6b769a; font-size: .85rem; padding: 8px 4px; }

.hist { width: 100%; }
.hist-head { display: flex; align-items: center; justify-content: flex-end; margin-bottom: 8px; }
.hist-clear {
  background: none; border: none; color: #9aa6c4; font-size: .75rem;
  cursor: pointer; text-decoration: underline; padding: 2px 4px;
}
.hist-clear:hover { color: #fff; }
.hist-item {
  display: flex; align-items: center; gap: 8px; font-size: .85rem;
  padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,.06); color: #d4dcf0;
}
.hist-item .d { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.hist-restore {
  display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0;
  background: none; border: none; color: inherit; font: inherit;
  text-align: left; cursor: pointer; padding: 2px 4px; border-radius: 6px;
}
.hist-restore:hover { background: rgba(255,255,255,.08); }
.hist-del {
  margin-left: auto; background: none; border: none; color: #6b769a;
  cursor: pointer; font-size: .85rem; padding: 2px 8px; border-radius: 6px;
}
.hist-del:hover { color: #fff; background: rgba(255,255,255,.08); }

.pr { max-width: 420px; width: 100%; margin-top: 30px; }
.pr-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
  color: #9aa6c4; font-size: .8rem; font-weight: 600;
}
.pr-badge {
  font-size: .65rem; font-weight: 700; color: #0f1626; background: #9aa6c4;
  padding: 1px 7px; border-radius: 4px; letter-spacing: .05em;
}
.pr-item {
  display: flex; align-items: center; gap: 12px; margin-bottom: 8px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px; padding: 12px 16px; color: #d4dcf0;
  text-decoration: none; font-size: .85rem; line-height: 1.5; transition: background .15s;
}
.pr-item:hover { background: rgba(255,255,255,.11); }
.pr-item .pr-emoji { font-size: 1.4rem; flex-shrink: 0; }
.pr-item .pr-shop { margin-left: auto; color: #8a96b8; font-size: .72rem; flex-shrink: 0; }

.about { max-width: 560px; margin: 36px auto 0; color: #b6c0db; font-size: .9rem; line-height: 1.8; }
.about h2 { font-size: 1rem; color: #fff; margin: 22px 0 8px; }
.about p { margin-bottom: 10px; }
.about ul { margin: 0 0 10px 1.2em; }
.about h3 { font-size: .92rem; color: #fff; margin: 14px 0 4px; }
.about li { margin-bottom: 6px; }
.about a { color: #c8d2ee; }
footer { margin-top: 32px; color: #6b769a; font-size: .78rem; text-align: center; }
footer a { color: #9aa6c4; }

.share { margin-top: 20px; text-align: center; }
.share-label { display: block; color: #9aa6c4; font-size: .78rem; margin-bottom: 10px; }
.share-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.share-btns a, .share-btns button {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 18px; border-radius: 999px; font-size: .85rem; font-weight: 700;
  border: none; cursor: pointer; text-decoration: none; color: #fff; transition: transform .1s, opacity .15s;
}
.share-btns a:active, .share-btns button:active { transform: scale(.95); }
.share-btns .x { background: #000; border: 1px solid #2a2a2a; }
.share-btns .line { background: #06C755; }
.share-btns .copy { background: rgba(255,255,255,.12); color: #d4dcf0; }
.share-btns svg { width: 16px; height: 16px; fill: currentColor; }

/* 駅周辺スポット */
.nearby { margin-top: 18px; width: 100%; max-width: 320px; text-align: left; font-size: .85rem; }
.nearby-head { color: #9aa6c4; font-size: .75rem; font-weight: 700; margin: 12px 0 4px; }
.nearby a { display: block; color: #d4dcf0; text-decoration: none; padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,.08); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nearby a:hover { color: #fff; }
.nearby .nearby-src { margin-top: 10px; color: #6b769a; font-size: .7rem; text-align: right; }
.nearby .nearby-src a { display: inline; border: 0; padding: 0; color: inherit; text-decoration: underline; }
