:root {
  --bg: #14110F;
  --text: #FFF6E6;
  --yellow: #FFC531;
  --red: #C9321D;
  --green: #0B7A70;
  --surface: #26201C;
  --band: rgba(20, 17, 15, .74);
  --dot: #5F5348;
  --muted: #D9CDBA;
  --line: #4A4038;
  --now-h: 170px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Noto Sans JP', system-ui, sans-serif;
  font-weight: 500;
  overflow-x: hidden;
}

p, h1, h2, h3, ol, ul { margin: 0; padding: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--yellow); }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }

main { padding-bottom: calc(110px + var(--safe-bottom)); }

/* ---------- 「いま」カード ---------- */
.now {
  position: fixed;
  z-index: 10;
  top: calc(10px + var(--safe-top));
  left: 10px;
  right: 10px;
  max-width: 560px;
  margin: 0 auto;
  padding: 10px 16px 12px;
  border-radius: 22px;
  background: rgba(20, 17, 15, .86);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.now__row { display: flex; align-items: center; gap: 12px; }
.now__time { font-size: 32px; line-height: 1; font-weight: 900; font-variant-numeric: tabular-nums; }
.chip {
  flex: none;
  font-size: 12px;
  font-weight: 900;
  border-radius: 999px;
  padding: 5px 14px;
  background: var(--text);
  color: var(--bg);
}
.chip[data-phase="move"] { background: var(--green); color: #fff; }
.chip[data-phase="stay"] { background: var(--red); color: #fff; }
.chip[data-phase="done"] { background: var(--yellow); color: var(--bg); }
.now__head { margin-top: 6px; font-size: 14px; font-weight: 900; line-height: 1.4; }
.now__sub { font-size: 12px; line-height: 1.5; color: var(--muted); }

.bar { position: relative; height: 6px; margin: 10px 2px 0; border-radius: 3px; background: var(--line); }
.bar__fill { position: absolute; left: 0; top: 0; height: 6px; border-radius: 3px; background: var(--yellow); width: 0; }
.bar__mark {
  position: absolute; top: 50%; left: 0;
  width: 16px; height: 16px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--text);
  border: 3px solid var(--yellow);
}

.trial { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.trial label { flex: none; font-size: 11px; font-weight: 700; color: var(--muted); }
.trial input { flex: 1; min-width: 0; height: 44px; margin: 0; accent-color: var(--yellow); }
.btn-ghost {
  flex: none;
  min-height: 44px;
  padding: 0 14px;
  border: 1.5px solid #8A7D6F;
  border-radius: 999px;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
}

/* ---------- ヒーロー ---------- */
.hero { position: relative; height: 460px; overflow: hidden; background: #000; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__band { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 20px 18px; background: var(--band); }
.hero__date { font-size: 12px; font-weight: 700; letter-spacing: .12em; color: var(--yellow); }
.hero__title { margin-top: 4px; font-size: 30px; font-weight: 900; line-height: 1.3; }
.hero__lead { margin-top: 6px; font-size: 13px; line-height: 1.7; color: #E9DFCE; }

/* ---------- 地点カード ---------- */
.stops { list-style: none; padding-top: 14px; max-width: 640px; margin: 0 auto; }

.card {
  position: relative;
  display: block;
  width: calc(100% - 24px);
  margin: 0 12px;
  border: 0;
  text-align: left;
  color: var(--text);
}
.card--photo { height: 300px; padding: 0; border-radius: 28px; overflow: hidden; background: #000; }
.card--photo img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: filter .3s;
}
.card--plain {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 74px;
  padding: 16px 18px;
  border-radius: 24px;
  background: var(--surface);
}
.card[data-status="now"] { box-shadow: 0 0 0 4px var(--yellow); }
.card--plain[data-status="now"] { background: #3A2A12; }
.card[data-status="past"] img { filter: saturate(.35) brightness(.8); }

.num {
  flex: none;
  display: flex; align-items: center; justify-content: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  font-size: 20px;
  font-weight: 900;
}
.card--photo .num { position: absolute; left: 14px; top: 14px; }
.card--photo .time {
  position: absolute; right: 14px; top: 14px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--band);
  font-size: 12px;
  font-weight: 900;
}
.card__band { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 18px 14px; background: var(--band); }
.card--photo .name { display: block; font-size: 22px; font-weight: 900; line-height: 1.35; }
.card__body { flex: 1; min-width: 0; }
.card--plain .time { display: block; font-size: 12px; font-weight: 900; color: var(--yellow); }
.card--plain .name { display: block; margin-top: 2px; font-size: 18px; font-weight: 900; line-height: 1.35; }

.badge {
  display: inline-block;
  flex: none;
  margin-bottom: 4px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}
.badge[data-kind="now"] { background: var(--red); color: #fff; }
.badge[data-kind="next"] { background: var(--text); color: var(--bg); }
.badge[data-kind="past"] { background: var(--line); color: #E9DFCE; }
.card--plain .badge { margin-bottom: 0; }

.detail { margin: 8px 12px 0; padding: 16px 18px 16px; border-radius: 22px; background: var(--surface); }
.detail ul { list-style: none; }
.detail li {
  position: relative;
  margin-top: 3px;
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.7;
  color: #F1E8D8;
}
.detail li::before {
  content: "";
  position: absolute; left: 2px; top: .62em;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--yellow);
}
.btn-yellow {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  margin-top: 12px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--bg);
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
}

.travel { display: flex; align-items: center; gap: 10px; padding: 12px 28px; }
.travel::before, .travel::after { content: ""; flex: 1; border-top: 2px dotted var(--dot); }
.travel span { font-size: 12px; font-weight: 700; color: #CFC3B0; }
.stop:last-child { padding-bottom: 14px; }

.note { max-width: 640px; margin: 0 auto; padding: 6px 22px 10px; font-size: 11.5px; line-height: 1.7; color: #BDB19F; }

/* ---------- 地図タブ ---------- */
.map { max-width: 640px; margin: 0 auto; padding: calc(var(--now-h) + var(--safe-top) + 26px) 12px 0; }
.map__title { padding: 0 6px; font-size: 22px; font-weight: 900; }
.map__frame {
  display: block;
  width: 100%;
  height: max(400px, calc(100svh - var(--now-h) - 300px));
  margin-top: 12px;
  border: 0;
  border-radius: 28px;
  background: #1E1915;
}
.btn-red {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  margin-top: 14px;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  text-decoration: none;
}
.map__sub { margin-top: 20px; padding: 0 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; list-style: none; }
.pills a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1.5px solid #6F6256;
  border-radius: 999px;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.error { margin: calc(var(--now-h) + 40px) 22px 0; padding: 16px 18px; border-radius: 22px; background: var(--surface); }

/* ---------- タブ ---------- */
.tabs {
  position: fixed;
  z-index: 10;
  left: 70px;
  right: 70px;
  bottom: calc(14px + var(--safe-bottom));
  max-width: 320px;
  margin: 0 auto;
  display: flex;
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(20, 17, 15, .92);
}
.tabs button {
  flex: 1;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-size: 14px;
  font-weight: 700;
}
.tabs button[aria-selected="true"] { background: var(--text); color: var(--bg); font-weight: 900; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
