/* ちかちか — 職場にちかい、くらしにちかい まちさがし
   見た目の素材はゆきさき(姉妹アプリ)と同じ「紙のきっぷ」の言語で組む: 地紋の縞と紙の繊維、
   黄色いマーカーを引いた太い見出し、黒い太縁の検索欄、点線の切り取り線、路線色の帯、大きな数字。
   色だけはちかちかのもの(夜の紺と街灯の黄)。色・余白・角丸・書体は :root のトークンだけを使う。 */

:root {
  /* ---- 色: 昼(light)。夜(dark)は下の prefers-color-scheme で上書き ---- */
  --night: #1d2340;
  --lamp: #ffc93c;
  --lamp-dim: #e0a100;
  --on-lamp: #1d2340;
  --lamp-soft: #fff0c2;
  --paper: #eceef4;        /* 紙の地色。紺をほんの少し混ぜた明るい灰 */
  --card: #fbfbfe;         /* 駅名標・入力欄の面 */
  --line: #c6cad8;         /* 細い枠線、点線の切り取り線 */
  --line-strong: #7a7f98;  /* 操作できることを示す線 */
  --ink: #1d2340;
  --ink-2: #474d6c;
  --muted: #5f6583;
  --rail: #1f6a8f;         /* 路線・乗り換えなし・リンク */
  --rail-soft: #dbe8f1;    /* 乗り換えなしのバッジの地 */
  --on-rail: #ffffff;
  --rise: #975400;
  --fall: #2c5f92;
  --marker: #ffc93c;       /* 見出しの黄帯(街灯の黄そのまま) */
  --focus: #1d2340;

  /* ---- 地紋: 135°の細い縞と、右上にともる街灯の光 ---- */
  --bg-stripe: rgba(29, 35, 64, 0.05);
  --bg-glow: rgba(255, 201, 60, 0.18);
  --grain-opacity: 0.045;

  /* ---- 影: 紙の上に紙が乗った柔らかさ ---- */
  --shadow: 0 1px 2px rgba(29, 35, 64, 0.06), 0 8px 22px rgba(29, 35, 64, 0.10);
  --shadow-press: 0 2px 0 var(--lamp-dim), 0 6px 14px rgba(255, 201, 60, 0.35);
  --glow-lamp: 0 0 0 4px rgba(255, 201, 60, 0.35);
  --perforation: 1.5px dashed var(--line);

  /* ---- 書体 ---- */
  --font-display: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "BIZ UDPGothic", system-ui, sans-serif;
  --font-body: "BIZ UDPGothic", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", system-ui, sans-serif;
  --font-num: "Barlow Semi Condensed", "BIZ UDPGothic", system-ui, sans-serif;

  /* ---- 余白・角丸・大きさ ---- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --radius-lg: 16px;       /* きっぷ・時間の行・点線のメモ・候補の一覧 */
  --radius-md: 12px;       /* 地図などの中の面 */
  --radius-pill: 999px;    /* ボタン・チップ・ピル・検索欄 */
  --tap-min: 44px;
  --content-max: 480px;

  /* ---- 動き(ゆきさきと同じ: transform と opacity だけ) ---- */
  --ease-out: cubic-bezier(0.2, 0.9, 0.3, 1);
  --dur-press: 0.12s;
  --dur-rise: 0.4s;
  --dur-expand: 0.35s;
  --dur-blink: 0.32s;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --lamp-dim: #b98a1c;
    --lamp-soft: #3b3218;
    --paper: #0f1326;
    --card: #181d38;
    --line: #2e3557;
    --line-strong: #6e7598;
    --ink: #eef0f7;
    --ink-2: #bcc0d4;
    --muted: #959ab6;
    --rail: #74b9dd;
    --rail-soft: rgba(116, 185, 221, 0.16);
    --on-rail: #0f1326;
    --rise: #f2b24e;
    --fall: #93bdea;
    --marker: rgba(255, 201, 60, 0.32);
    --focus: #ffc93c;
    --bg-stripe: rgba(255, 201, 60, 0.035);
    --bg-glow: rgba(255, 201, 60, 0.08);
    --grain-opacity: 0.06;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 22px rgba(0, 0, 0, 0.45);
    --shadow-press: 0 2px 0 var(--lamp-dim), 0 6px 14px rgba(255, 201, 60, 0.25);
    --glow-lamp: 0 0 16px 2px rgba(255, 201, 60, 0.45);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(560px 360px at 100% -80px, var(--bg-glow), transparent 70%),
    repeating-linear-gradient(135deg, var(--bg-stripe) 0 1.5px, transparent 1.5px 7px),
    var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  letter-spacing: 0.04em;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* 紙の繊維 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: var(--grain-opacity);
}

button, input { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; touch-action: manipulation; }

a { color: var(--rail); text-underline-offset: 3px; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }

[hidden] { display: none !important; }

/* 画面には出さず、読み上げにだけ届ける(絞り込みのあとの件数の知らせ) */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

.cc-num { font-family: var(--font-num); font-variant-numeric: tabular-nums; }

.wrap {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding-inline: 20px;
}

/* ---- ヘッダー(ロゴとサブタイトルを同じ行に) ---- */

.site-header .wrap {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-top: calc(env(safe-area-inset-top, 0px) + 20px);
  padding-bottom: 4px;
}

.cc-brand { flex: none; display: inline-flex; align-items: center; gap: var(--space-2); color: var(--ink); text-decoration: none; }
.cc-brand__mark { width: 28px; height: 28px; display: block; flex: none; }
.cc-brand__name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 19px;
  line-height: 28px;
  letter-spacing: 0.16em;
  font-feature-settings: "palt";
  white-space: nowrap;
}
.cc-brand__sub {
  flex: 1;
  min-width: 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.5;
  font-weight: 500;
  letter-spacing: 0.12em;
}
.cc-brand__sub span { display: inline-block; }

/* 読み込んだとき、ロゴの灯りが「ちか、ちか」と1回ずつまたたく */
.cc-brand__lamp { animation: cc-twinkle 0.5s ease-in-out 0.25s both; }
.cc-brand__lamp--2 { animation-name: cc-twinkle-dim; animation-delay: 0.5s; }
@keyframes cc-twinkle { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
@keyframes cc-twinkle-dim { 0%, 100% { opacity: 0.75; } 50% { opacity: 0.2; } }

/* ---- 見出しまわり(STEP の印、マーカーの見出し、もどるピル) ---- */

.step { display: flex; flex-direction: column; padding-block: var(--space-2) var(--space-12); }

.step-no {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0 10px;
  font-family: var(--font-num);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.3em;
  color: var(--rail);
}
.step-no .dots { display: inline-flex; gap: 4px; }
.step-no .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.step-no .dot.on { background: var(--rail); }

.cc-question {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(28px, 8vw, 34px);
  line-height: 1.4;
  letter-spacing: 0.04em;
  font-feature-settings: "palt";
}
/* 指定席券の黄帯。街灯の黄をそのままマーカーに */
.cc-question .marker { background: linear-gradient(transparent 62%, var(--marker) 62%); padding: 0 2px; }
.cc-question .q { color: var(--rail); }
.cc-question__lead { margin: -8px 0 18px; color: var(--ink-2); font-size: 13px; }

.summary-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--line);
  background: var(--card);
  font-size: 13px;
  font-weight: 700;
}
.pill .edit { font-size: 11px; font-weight: 500; color: var(--rail); }

.source-note { margin: 0 0 18px; font-size: 11px; letter-spacing: 0.06em; color: var(--muted); }
.source-note b { color: var(--ink-2); font-weight: 700; }

/* 区切りの小見出し: 細い罫を右に引く */
.section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 24px 0 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.24em;
  color: var(--muted);
}
.section-label::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.section-label .cc-num { font-size: 13px; letter-spacing: 0.04em; color: var(--ink); }

/* ---- 検索欄(黒い太縁のピル) ---- */

.origin-wrap { position: relative; z-index: 2; }

.cc-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--ink);
  background: var(--card);
  box-shadow: var(--shadow);
  transition: border-color 0.2s;
}
.cc-search:focus-within { border-color: var(--rail); }
.cc-search__icon { flex: none; width: 18px; height: 18px; color: var(--ink-2); }
.cc-search input {
  flex: 1;
  min-width: 0;
  min-height: 54px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
  outline: none;
}
.cc-search input::placeholder { color: var(--muted); font-weight: 400; }
.cc-search input::-webkit-search-cancel-button { display: none; }

.suggest {
  position: absolute;
  z-index: 1000;
  top: calc(100% + 6px);
  left: 8px;
  right: 8px;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
  max-height: 60vh;
  overflow-y: auto;
}
.suggest li { display: flex; flex-direction: column; padding: 8px 16px; cursor: pointer; }
.suggest li + li { border-top: 1px dashed var(--line); }
.suggest li[aria-selected="true"], .suggest li:hover { background: var(--lamp-soft); }
.sg-name { font-weight: 700; }
.sg-meta { color: var(--muted); font-size: 12px; }

/* ---- 主要駅のチップ(街灯の丸を打つ) ---- */

.cc-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.cc-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: var(--tap-min);
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.cc-chip::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 2px solid var(--lamp-dim);
}
.cc-chip:hover { border-color: var(--ink); }
.cc-chip[aria-pressed="true"] { border-color: var(--ink); background: var(--lamp-soft); }
.cc-chip[aria-pressed="true"]::before { background: var(--lamp); border-color: var(--lamp-dim); }

/* ---- 時間の行(大きな数字と候補の数) ---- */

.time-list { display: flex; flex-direction: column; gap: 10px; }

.time-row {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  min-height: 72px;
  padding: 10px 20px;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--line);
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow);
  text-align: left;
}
.time-row:hover { border-color: var(--ink); }
.time-row[aria-pressed="true"] { border-color: var(--rail); box-shadow: var(--shadow), inset 0 0 0 1px var(--rail); }
.time-num {
  flex: none;
  width: 86px;
  font-family: var(--font-num);
  font-weight: 600;
  font-size: 36px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.time-num small { margin-left: 2px; font-family: var(--font-body); font-size: 13px; font-weight: 700; color: var(--ink-2); }
.time-copy { flex: 1; min-width: 0; }
.time-label { display: block; font-size: 15px; font-weight: 700; }
.time-sub { display: block; font-size: 12px; color: var(--ink-2); }
.time-sub .cc-num { font-size: 14px; font-weight: 600; color: var(--ink); }
.time-arrow { flex: none; color: var(--rail); font-weight: 700; }

.time-note { margin: 14px 0 0; font-size: 12px; color: var(--muted); }

/* ---- ボタン ---- */

.cc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--tap-min);
  padding: 10px 22px;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-pill);
  background: var(--card);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}
.cc-btn--primary { border-color: var(--lamp-dim); background: var(--lamp); color: var(--on-lamp); box-shadow: var(--shadow-press); }
.cc-btn--primary:active { box-shadow: 0 0 0 var(--lamp-dim); transform: translateY(2px); }
.cc-btn--block { display: flex; width: 100%; min-height: 52px; font-size: 15px; }
.cc-btn--text { min-height: 36px; padding-inline: 8px; border: 0; background: transparent; color: var(--rail); text-decoration: underline; text-underline-offset: 3px; font-size: 13px; }

/* ---- 結果: 絞り込みチップ ---- */

.filters { display: flex; flex-direction: column; gap: 10px; margin: 0 0 6px; }
.filter-row, .filter-group { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.fchip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 36px;
  padding: 4px 13px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.fchip[aria-checked="true"], .fchip[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--card); }
.filter-sep { flex: none; width: 1px; height: 22px; margin-inline: 2px; background: var(--line); }

/* ---- 駅名標(きっぷの形: 路線色の帯、切り取り線、切り欠き) ---- */

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

.cc-sign {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
}
/* 左端の路線色の帯(駅名標の路線カラー)。複数路線は縦に等分 */
.cc-sign__line { position: absolute; left: 0; top: 0; bottom: 0; width: 8px; background: var(--rail); }
/* 切り取り線の両端の切り欠き(紙の地色の丸)。時間の欄の左の点線に合わせて置く */
.cc-sign__notch { position: absolute; right: 101px; width: 14px; height: 14px; border-radius: 50%; background: var(--paper); border: 1.5px solid var(--line); z-index: 2; }
.cc-sign__notch--t { top: -8px; border-top-color: transparent; }
.cc-sign__notch--b { bottom: -8px; border-bottom-color: transparent; }

.cc-sign__main { display: flex; align-items: stretch; gap: 12px; padding: 14px 14px 12px 20px; }
.cc-sign__plate { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.cc-sign__kana { color: var(--ink-2); font-size: 11px; font-weight: 700; letter-spacing: 0.14em; }
.cc-sign__name { margin: 0; font-size: 22px; line-height: 1.3; font-weight: 900; letter-spacing: 0.06em; overflow-wrap: anywhere; }
.cc-sign__roman { color: var(--muted); font: 500 12px/1.3 var(--font-num); letter-spacing: 0.08em; }

.badge-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 1px 9px;
  border-radius: var(--radius-pill);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  background: var(--paper);
}
.badge--direct { background: var(--rail-soft); color: var(--rail); }
.badge--transfer { background: var(--lamp-soft); color: var(--ink-2); }

/* 右の時間の欄。左に点線の切り取り線 */
.cc-sign__time {
  flex: none;
  width: 92px;
  padding-left: 12px;
  border-left: var(--perforation);
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}
.cc-sign__about { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; color: var(--rail); }
.cc-sign__min { font-family: var(--font-num); font-weight: 600; font-size: 38px; line-height: 1.05; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.cc-sign__min small { margin-left: 1px; font-family: var(--font-body); font-size: 12px; font-weight: 700; color: var(--ink-2); letter-spacing: 0; }
.cc-sign__from { margin-top: 2px; font-size: 10px; color: var(--muted); letter-spacing: 0.04em; }

.cc-sign__body { display: flex; flex-direction: column; gap: 12px; margin: 0 14px 0 20px; padding: 12px 0 14px; border-top: var(--perforation); }
.cc-sign__facts { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 12px; }
.cc-fact { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cc-fact__label { color: var(--muted); font-size: 10.5px; font-weight: 700; letter-spacing: 0.14em; }
.cc-fact__value { display: flex; align-items: baseline; flex-wrap: wrap; gap: 3px; }
.cc-fact__xl { font: 600 36px/1.1 var(--font-num); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.cc-fact__lg { font: 600 26px/1.1 var(--font-num); font-variant-numeric: tabular-nums; }
.cc-fact__unit { font-size: 13px; font-weight: 700; }
.cc-fact__sub { color: var(--muted); font-size: 11px; line-height: 1.5; }
.cc-fact--none .cc-fact__lg { color: var(--muted); }

.cc-trend { display: inline-flex; align-items: baseline; gap: 2px; font: 500 14px/1.3 var(--font-num); font-variant-numeric: tabular-nums; }
.cc-trend__span { margin-left: 3px; font-family: var(--font-body); font-size: 10.5px; font-weight: 700; color: var(--ink-2); }
.cc-trend--rise { color: var(--rise); }
.cc-trend--fall { color: var(--fall); }
.cc-trend--flat { color: var(--ink-2); }

.cc-sign__toggle { align-self: flex-start; margin-left: -8px; }

/* 開いた中身(駅前のくらし・地図) */
.cc-sign__detail { display: grid; grid-template-rows: 1fr; }
.cc-sign__detail-inner { min-height: 0; overflow: hidden; }
.cc-sign__detail-pad { display: flex; flex-direction: column; gap: 12px; margin: 0 14px 0 20px; padding: 12px 0 16px; border-top: var(--perforation); }
.cc-sign__detail-pad h3 { margin: 0; font-size: 11px; font-weight: 700; letter-spacing: 0.24em; color: var(--muted); }

.cc-facs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.cc-fac {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  min-height: 26px;
  padding: 2px 11px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--line);
  font-size: 12px;
  font-weight: 700;
}
.cc-fac__n { font: 600 15px/1 var(--font-num); font-variant-numeric: tabular-nums; }
.cc-fac--none { color: var(--muted); border-style: dashed; }
.cc-fac--none .cc-fac__n { font-weight: 500; }

.poi-near { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; font-size: 12px; }
.poi-near li { display: flex; gap: 8px; }
.poi-near .k { color: var(--ink-2); font-weight: 700; flex: none; }
.poi-near em { margin-left: auto; font-style: normal; color: var(--muted); font-family: var(--font-num); font-variant-numeric: tabular-nums; flex: none; }
.poi-error { margin: 0; color: var(--ink-2); font-size: 12px; }

.mini-map {
  height: 220px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1.5px solid var(--line);
  background: var(--paper);
}

.lines, .src-note { margin: 0; color: var(--muted); font-size: 11px; letter-spacing: 0.04em; }
.links { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; font-weight: 700; }

/* ---- 点線のメモ(空のとき・説明) ---- */

.memo {
  margin: 0;
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  border: 1.5px dashed var(--line);
  background: var(--card);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.memo p { margin: 0; font-size: 13px; }

/* ---- 広告(「広告」の札を必ず添える) ---- */

.memo--ad { position: relative; margin-top: 24px; gap: 8px; }
.badge--ad { background: transparent; border: 1px solid var(--line-strong); color: var(--muted); letter-spacing: 0.14em; }
.links .badge--ad { margin-left: 6px; min-height: 16px; padding: 0 6px; font-size: 9.5px; vertical-align: 2px; }

/* ---- 動き ---- */

.screen { animation: cc-fade-up var(--dur-rise) var(--ease-out) backwards; }
.rise { animation: cc-fade-up 0.5s var(--ease-out) backwards; animation-delay: calc(var(--i, 0) * 40ms); }
@keyframes cc-fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.cc-chip, .time-row, .fchip, .pill, .cc-btn, .cc-sign__toggle { transition: transform var(--dur-press), border-color 0.2s, background-color 0.2s, box-shadow 0.2s; }
.cc-chip:active, .fchip:active { transform: scale(0.94); }
.time-row:active, .pill:active { transform: scale(0.97); }
.cc-btn:not(.cc-btn--primary):not(.cc-btn--text):active { transform: scale(0.96); }

/* 選んだ駅・時間が2回またたいてから次へ進む */
.cc-chip.is-lit { animation: cc-chikachika var(--dur-blink) linear both; }
.time-row.is-lit { animation: cc-chikachika-row var(--dur-blink) linear both; }
@keyframes cc-chikachika {
  0%, 50%, 100% { background: var(--lamp); border-color: var(--lamp-dim); box-shadow: var(--glow-lamp); }
  25%, 75% { background: var(--lamp-soft); border-color: var(--line); box-shadow: none; }
}
@keyframes cc-chikachika-row {
  0%, 50%, 100% { background: var(--lamp-soft); border-color: var(--lamp-dim); }
  25%, 75% { background: var(--card); border-color: var(--line); }
}

.cc-sign__detail.is-opening { animation: cc-expand var(--dur-expand) var(--ease-out) both; }
@keyframes cc-expand {
  from { grid-template-rows: 0fr; opacity: 0; }
  to { grid-template-rows: 1fr; opacity: 1; }
}

/* ---- 読み込み中の灯り ---- */

.cc-loader { display: inline-flex; align-items: center; gap: 12px; color: var(--ink-2); font-size: 12px; font-weight: 700; }
.cc-loader__lamps { display: inline-flex; gap: 6px; padding: 8px 9px; border-radius: var(--radius-pill); background: var(--night); }
.cc-loader__lamp { width: 14px; height: 14px; border-radius: var(--radius-pill); background: var(--lamp); animation: cc-blink 1.2s ease-in-out infinite; }
.cc-loader__lamp + .cc-loader__lamp { animation-delay: 0.6s; }
@keyframes cc-blink {
  0%, 100% { background: var(--lamp); box-shadow: var(--glow-lamp); }
  50% { background: var(--lamp-dim); box-shadow: none; }
}
.boot { display: flex; justify-content: center; padding-block: var(--space-12); }

@media (prefers-reduced-motion: reduce) {
  .screen, .rise, .is-lit, .cc-sign__detail.is-opening, .cc-brand__lamp, .cc-loader__lamp { animation: none; }
  * { transition-duration: 0.01ms !important; }
  .cc-chip:active, .fchip:active, .time-row:active, .pill:active, .cc-btn:active { transform: none; }
}

/* ---- フッター ---- */

.site-footer .wrap { display: flex; flex-direction: column; gap: 18px; padding-block: 8px 40px; }
.howto summary { min-height: var(--tap-min); display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; cursor: pointer; list-style: none; }
.howto summary::-webkit-details-marker { display: none; }
.howto summary::before { content: '＋'; color: var(--rail); font-weight: 700; }
.howto[open] summary::before { content: '−'; }
.howto p { margin: 0 0 10px; color: var(--ink-2); font-size: 12px; line-height: 1.8; }
.credits { margin: 0; text-align: center; color: var(--muted); font-size: 10.5px; line-height: 2; letter-spacing: 0.08em; }
.credits a { color: var(--ink-2); }

/* ---- 文章のページ(プライバシーポリシー) ---- */

.prose { padding-block: 8px 48px; }
.prose h1 { margin: 16px 0 4px; font-family: var(--font-display); font-weight: 900; font-size: 26px; line-height: 1.4; letter-spacing: 0.04em; font-feature-settings: "palt"; }
.prose__date { margin: 0 0 20px; font-size: 11px; letter-spacing: 0.06em; color: var(--muted); }
.prose h2 { margin: 28px 0 8px; padding-top: 12px; border-top: var(--perforation); font-size: 15px; font-weight: 700; }
.prose p, .prose li { margin: 0 0 10px; font-size: 13px; line-height: 1.9; color: var(--ink-2); }
.prose ul { margin: 0 0 10px; padding-left: 1.4em; }
.prose li { margin-bottom: 6px; }
.prose a { color: var(--rail); }
.prose b { color: var(--ink); }
.prose__back { margin-top: 32px; font-weight: 700; }

/* Leaflet の帰属表示を地の色になじませる */
.leaflet-container { font: 11px/1.4 var(--font-body); }

@media (max-width: 380px) {
  .cc-sign__time { width: 84px; }
  .cc-sign__notch { right: 93px; }
  .cc-sign__min { font-size: 34px; }
  .cc-fact__xl { font-size: 32px; }
  .time-num { width: 78px; font-size: 32px; }
}
