/*
Theme Name: YOKOHAMAトレインフェスティバル
Theme URI: https://trainfestival.yokohama/
Author: YTF Project
Description: YOKOHAMAトレインフェスティバル向けオリジナルWordPressテーマ。キービジュアルのストライプ・ネイビー・黄帯・赤スタンプを基調に、きっぷ・駅名標・路線図・駅ナンバリングなど鉄道のディテールで構成。
Version: 2.0.2
Requires at least: 6.4
Requires PHP: 8.1
Text Domain: ytf
*/

/* ==========================================================================
   Tokens
   キービジュアル（top_pc）から抽出した色を基準にしています。
   ========================================================================== */
:root {
  --navy: #1f2d5d;
  --navy-deep: #17224a;
  --navy-60: #5f6a8c;
  --ink: #1f2d5d;
  --muted: #59648a;
  --stripe: #ceeced;
  --mint: #eaf7f7;
  --mint-2: #dcf1f1;
  --yellow: #fff798;
  --yellow-2: #ffe94a;
  --red: #e60012;
  --red-ink: #d3101c;
  --paper: #fff;
  --cream: #fbfaf3;
  --line: #d6dce8;

  --k-ceremony: #e60012;
  --k-stage: #1f2d5d;
  --k-photo: #0f8f97;
  --k-character: #ef7d1a;
  --k-bingo: #2f9a52;
  --k-rally: #c59a00;

  --font: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
  --num: "Barlow Semi Condensed", "Zen Kaku Gothic New", system-ui, sans-serif;

  --container: min(1160px, calc(100% - 48px));
  --header-h: 76px;
  --radius: 12px;
  --press: 0 4px 0 var(--navy);
  --ease: cubic-bezier(.22, .8, .24, 1);

  /* キービジュアルと同じ斜めストライプ（周期43.6px@1672px幅・45°） */
  --stripe-tile: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 43.6 43.6' width='43.6' height='43.6'%3E%3Cpath d='M38.47 -30L-30 38.47 M82.07 -30L-30 82.07 M125.67 -30L-30 125.67' stroke='%23ceeced' stroke-width='16.15'/%3E%3C/svg%3E");
  /* きっぷの地紋 */
  --jimon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='14' viewBox='0 0 36 14'%3E%3Cpath d='M0 7c4.5-5 13.5-5 18 0s13.5 5 18 0M0 14c4.5-5 13.5-5 18 0s13.5 5 18 0M0 0c4.5 5 13.5 5 18 0s13.5-5 18 0' fill='none' stroke='%23d9efef' stroke-width='1'/%3E%3C/svg%3E");
}

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  word-break: normal;
  line-break: strict;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.85;
  letter-spacing: .02em;
  font-feature-settings: "palt" 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3, h4, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, textarea, select { font: inherit; color: inherit; }
::selection { background: var(--yellow); color: var(--navy); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 4px; }
.container { width: var(--container); margin-inline: auto; }
.icon { width: 1.25em; height: 1.25em; flex: none; }
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: fixed; left: 12px; top: -100px; z-index: 9999; padding: 10px 16px; border-radius: 8px; background: var(--navy); color: #fff; font-weight: 700; }
.skip-link:focus { top: 12px; }
.num, time { font-variant-numeric: tabular-nums; }
p, li, dd { text-wrap: pretty; }
.nobr { white-space: nowrap; }
h1, h2, h3, .ticket-text, .booth-title, .stop-title, .news-title, .access-venue, .lead-phrase { word-break: auto-phrase; }

/* ==========================================================================
   Buttons
   押したら沈む、券売機のボタンのような手触り。
   ========================================================================== */
.button {
  --b-bg: var(--paper); --b-fg: var(--navy);
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 56px; padding: 0 1.6em 0 1.8em;
  border: 2px solid var(--navy); border-radius: 999px;
  background: var(--b-bg); color: var(--b-fg);
  box-shadow: var(--press);
  font-weight: 700; font-size: 1rem; letter-spacing: .06em; line-height: 1.3;
  cursor: pointer;
  transition: transform .15s var(--ease), box-shadow .15s var(--ease), background-color .2s;
}
.button .icon { transition: transform .25s var(--ease); }
.button:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--navy); }
.button:hover .icon-arrow { transform: translateX(4px); }
.button:hover .icon-external { transform: translate(2px, -2px); }
.button:active { transform: translateY(4px); box-shadow: 0 0 0 var(--navy); transition-duration: .05s; }
.button--primary { --b-bg: var(--red); --b-fg: #fff; }
.button--ghost { --b-bg: var(--paper); }
.button--ghost:hover { --b-bg: var(--yellow); }

.link-more {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .35em 0; border-bottom: 2px solid currentColor;
  color: var(--navy); font-weight: 700; letter-spacing: .06em;
}
.link-more .icon { transition: transform .25s var(--ease); }
.link-more:hover .icon { transform: translateX(4px); }

.tag {
  display: inline-flex; align-items: center;
  padding: .1em .7em; border: 1.5px solid var(--navy); border-radius: 4px;
  color: var(--navy); background: var(--paper);
  font-size: .72rem; font-weight: 700; letter-spacing: .06em; line-height: 1.6; white-space: nowrap;
}
.tag--important { border-color: var(--red); background: var(--red); color: #fff; }
.tag--new { border-color: var(--navy); background: var(--yellow); font-family: var(--num); letter-spacing: .1em; }

/* ==========================================================================
   Header
   ========================================================================== */
.archive-notice {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 18px;
  padding: 10px 16px; background: var(--yellow); color: var(--navy); font-size: .9rem; font-weight: 700;
}
.archive-notice-tag { margin-right: .4em; padding: 0 .5em; border-radius: 4px; background: var(--navy); color: var(--yellow); font-family: var(--num); }
.archive-notice a { display: inline-flex; align-items: center; gap: .3em; border-bottom: 2px solid; }

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--paper); /* backdrop-filter は固定配置のSPメニューの基準を壊すため使わない */
}
.admin-bar .site-header { top: 32px; }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: var(--header-h); }
.site-brand { display: flex; align-items: center; gap: 12px; margin-right: auto; min-width: 0; }
.site-brand .custom-logo-link { display: block; flex: 0 0 44px; }
.site-brand .custom-logo { width: 44px; height: 44px; object-fit: contain; }
.brand-mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; background: var(--navy); color: var(--yellow); }
.brand-copy { display: grid; line-height: 1.25; }
.brand-en { color: var(--red); font-family: var(--num); font-size: .72rem; font-weight: 700; letter-spacing: .14em; }
.brand-ja { color: var(--navy); font-size: 1.02rem; font-weight: 900; letter-spacing: .04em; white-space: nowrap; }

.main-nav > ul, .main-nav .menu { display: flex; align-items: center; gap: 2px; }
.main-nav ul a, .main-nav .menu-disabled {
  position: relative; display: block; padding: 10px 14px;
  color: var(--navy); font-size: .92rem; font-weight: 700; letter-spacing: .06em;
}
.main-nav ul a::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 3px; border-radius: 2px;
  background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.main-nav ul a:hover::after, .main-nav .current-menu-item > a::after, .main-nav .current_page_item > a::after { transform: scaleX(1); }
.main-nav .menu-disabled, .main-nav .menu-disabled-item > a { color: #9aa3ba; cursor: not-allowed; pointer-events: none; }
.main-nav .archive-link { margin-left: 6px; padding: 6px 14px; border: 1.5px solid var(--navy); border-radius: 999px; }
.main-nav .archive-link::after { display: none; }
.main-nav .archive-link:hover { background: var(--navy); color: #fff; }

.header-date {
  display: flex; align-items: center; gap: 8px; flex: none;
  padding: 4px 6px 4px 14px; border-radius: 999px; background: var(--navy); color: #fff;
  font-family: var(--num); font-weight: 700; line-height: 1;
}
.header-date-num { font-size: 1.35rem; letter-spacing: .02em; }
.header-date-wd { font-size: .72rem; letter-spacing: .12em; color: var(--yellow); }
.header-date-free { padding: 6px 10px; border-radius: 999px; background: var(--yellow); color: var(--navy); font-family: var(--font); font-size: .74rem; letter-spacing: .08em; }

.menu-toggle { display: none; }
.menu-extra { display: none; }

/* スクロール進捗：線路と小さな電車 */
.ride-progress {
  position: relative; height: 5px;
  background:
    linear-gradient(var(--navy), var(--navy)) left bottom / 100% 1px no-repeat,
    repeating-linear-gradient(90deg, rgba(31, 45, 93, .28) 0 2px, transparent 2px 10px) left bottom / 100% 5px no-repeat;
}
.ride-progress-train {
  position: absolute; left: 8px; bottom: 1px;
  display: block; width: 20px; height: 14px; padding: 1px 3px; border-radius: 5px 5px 2px 2px;
  background: var(--red); color: #fff;
  transform: translateX(calc(var(--ride, 0) * (100vw - 44px)));
  will-change: transform;
}
.ride-progress-train .icon { display: none; }
.ride-progress-train::before { content: ""; display: block; margin: 3px auto 0; width: 12px; height: 4px; border-radius: 1px; background: repeating-linear-gradient(90deg, #fff 0 3px, transparent 3px 5px); }

/* ==========================================================================
   Key visual（スライダー）
   画像の外側までストライプを同位相で延長し、どの画面幅でも継ぎ目なく見せる。
   ========================================================================== */
.kv { position: relative; isolation: isolate; overflow: hidden; padding-bottom: 104px; background: var(--paper); }
.kv-frame {
  /* 画面の高さに合わせて縮めつつ、小さめのPC画面でも横幅の92%は確保する */
  --kv-w: min(100%, 1600px, max(calc((100svh - var(--header-h) - 150px) * 1672 / 941), 92vw));
  container-type: inline-size;
  position: relative; width: var(--kv-w); margin-inline: auto;
}
.kv-frame::before {
  content: ""; position: absolute; z-index: -1; top: 0; left: 50%; width: 400vw; height: 400vh;
  transform: translateX(-50%);
  background-image: var(--stripe-tile);
  background-size: calc(100cqw * 43.6 / 1672) calc(100cqw * 43.6 / 1672);
  background-position: calc(200vw - 50cqw) 0;
}
.kv-viewport { position: relative; display: grid; }
.kv-slide { grid-area: 1 / 1; opacity: 0; visibility: hidden; transition: opacity .8s var(--ease), visibility 0s .8s; }
.kv-slide.is-active { opacity: 1; visibility: visible; transition: opacity .8s var(--ease), visibility 0s; }
.kv-image { width: 100%; height: auto; clip-path: inset(2px); } /* 画像外周1pxの濃い縁を隠し、背面のストライプとつなぐ */

.kv-controls { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 18px; }
.kv-arrow {
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 2px solid var(--navy); border-radius: 50%; background: var(--paper); color: var(--navy); cursor: pointer;
  box-shadow: 0 3px 0 var(--navy); transition: transform .15s, box-shadow .15s;
}
.kv-arrow:active { transform: translateY(3px); box-shadow: none; }
.kv-dots { display: flex; gap: 6px; }
.kv-dot { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; background: none; cursor: pointer; }
.kv-dot span { width: 10px; height: 10px; border: 2px solid var(--navy); border-radius: 50%; background: var(--paper); transition: width .3s var(--ease), background-color .3s; }
.kv-dot.is-active span { width: 24px; border-radius: 6px; background: var(--navy); }

.kv-actions-area { position: relative; margin-top: 22px; }

/* キービジュアル下の線路と、入線してくる電車 */
.kv-rail {
  position: relative; height: 58px; margin-top: -40px; pointer-events: none;
  background:
    linear-gradient(var(--navy), var(--navy)) left 52px / 100% 3px no-repeat,
    repeating-linear-gradient(90deg, var(--navy) 0 6px, transparent 6px 22px) left 55px / 100% 3px no-repeat;
}
.kv-train {
  position: absolute; left: max(20px, 7vw); bottom: 6px;
  padding: 0; border: 0; background: none; cursor: pointer; pointer-events: auto;
  animation: kv-arrive 2.6s cubic-bezier(.15, .7, .25, 1) .4s both;
}
.kv-train-svg { width: clamp(200px, 22vw, 340px); height: auto; overflow: visible; }
.kv-train-toot {
  position: absolute; right: -28px; top: -30px; padding: 2px 10px; border: 2px solid var(--navy); border-radius: 999px;
  background: var(--paper); color: var(--navy); font-size: .8rem; font-weight: 900; opacity: 0; transform: translateY(6px) scale(.8);
  transition: opacity .2s, transform .3s var(--ease); pointer-events: none;
}
.kv-train.is-toot .kv-train-toot { opacity: 1; transform: none; }
.kv-train.is-toot .kv-train-svg { animation: kv-bounce .5s var(--ease); }
@keyframes kv-arrive { from { transform: translateX(-110vw); } to { transform: none; } }
@keyframes kv-bounce { 30% { transform: translateY(-4px); } 60% { transform: translateY(1px); } }
.kv-actions { display: none; flex-wrap: wrap; justify-content: center; gap: 14px 18px; }
.kv-actions.is-active { display: flex; }

/* ==========================================================================
   Ticket（開催概要）
   ========================================================================== */
.ticket-section { position: relative; z-index: 2; margin-top: -64px; }
.ticket-wrap { --stub: 248px; --notch: 15px; position: relative; }
.ticket {
  position: relative;
  display: grid; grid-template-columns: 1fr var(--stub);
  filter:
    drop-shadow(2px 0 0 var(--navy)) drop-shadow(-2px 0 0 var(--navy))
    drop-shadow(0 2px 0 var(--navy)) drop-shadow(0 -2px 0 var(--navy))
    drop-shadow(0 6px 0 var(--navy));
}
.ticket-main, .ticket-stub {
  position: relative;
  background-color: var(--paper);
  background-image: var(--jimon);
  background-size: 36px 14px;
}
.ticket-main {
  border-radius: 14px 0 0 14px;
  padding: 26px 40px 30px;
  -webkit-mask:
    radial-gradient(circle at 100% 0, #0000 var(--notch), #000 calc(var(--notch) + .5px)) top / 100% 51% no-repeat,
    radial-gradient(circle at 100% 100%, #0000 var(--notch), #000 calc(var(--notch) + .5px)) bottom / 100% 51% no-repeat;
          mask:
    radial-gradient(circle at 100% 0, #0000 var(--notch), #000 calc(var(--notch) + .5px)) top / 100% 51% no-repeat,
    radial-gradient(circle at 100% 100%, #0000 var(--notch), #000 calc(var(--notch) + .5px)) bottom / 100% 51% no-repeat;
}
.ticket-stub {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  border-radius: 0 14px 14px 0;
  padding: 24px 20px;
  -webkit-mask:
    radial-gradient(circle at 0 0, #0000 var(--notch), #000 calc(var(--notch) + .5px)) top / 100% 51% no-repeat,
    radial-gradient(circle at 0 100%, #0000 var(--notch), #000 calc(var(--notch) + .5px)) bottom / 100% 51% no-repeat;
          mask:
    radial-gradient(circle at 0 0, #0000 var(--notch), #000 calc(var(--notch) + .5px)) top / 100% 51% no-repeat,
    radial-gradient(circle at 0 100%, #0000 var(--notch), #000 calc(var(--notch) + .5px)) bottom / 100% 51% no-repeat;
}
/* ミシン目 */
.ticket-stub::before {
  content: ""; position: absolute; left: 0; top: calc(var(--notch) + 8px); bottom: calc(var(--notch) + 8px); width: 2px;
  background: radial-gradient(circle, var(--navy) 1.1px, transparent 1.4px) center top / 2px 8px repeat-y;
}
.ticket-stub[hidden] { display: none; }
.ticket:has(.ticket-stub[hidden]) { grid-template-columns: 1fr; }
.ticket:has(.ticket-stub[hidden]) .ticket-main { border-radius: 14px; -webkit-mask: none; mask: none; }

.ticket-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding-bottom: 14px; border-bottom: 2px dotted var(--navy); }
.ticket-kind { display: inline-flex; align-items: baseline; gap: .5em; padding: 2px 12px; border-radius: 4px; background: var(--navy); color: #fff; font-size: .82rem; font-weight: 900; letter-spacing: .2em; }
.ticket-kind span { font-family: var(--num); font-size: .7rem; letter-spacing: .14em; color: var(--yellow); }
.ticket-label { font-size: .95rem; font-weight: 700; letter-spacing: .06em; }

.ticket-facts { display: grid; grid-template-columns: auto auto 1fr; gap: 0; margin-top: 18px; }
.ticket-fact { padding: 0 28px; border-left: 1px solid var(--line); }
.ticket-fact:first-child { padding-left: 0; border-left: 0; }
.ticket-fact dt { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .78rem; font-weight: 700; letter-spacing: .14em; }
.ticket-fact dt .icon { width: 16px; height: 16px; color: var(--navy); }
.ticket-fact dd { margin-top: 2px; }
.ticket-big {
  display: inline-flex; align-items: baseline; gap: 2px;
  font-family: var(--num); font-size: clamp(2.6rem, 4.4vw, 3.6rem); font-weight: 700; line-height: 1; letter-spacing: 0; color: var(--navy);
  white-space: nowrap;
}
.ticket-big i { font-style: normal; color: var(--red); margin: 0 1px; }
.ticket-year { align-self: flex-start; margin-right: 8px; margin-top: .25em; padding: 3px 5px; border: 1.5px solid; border-radius: 3px; font-size: .78rem; line-height: 1; writing-mode: vertical-rl; letter-spacing: .04em; }
.ticket-wd { margin-left: 8px; padding: 4px 7px 3px; border-radius: 4px; background: var(--navy); color: #fff; font-size: .9rem; letter-spacing: .1em; align-self: center; }
.ticket-wd.is-sat { background: #1d5fc4; }
.ticket-wd.is-sun { background: var(--red); }
.ticket-dash { display: inline-block; width: .5em; height: 3px; margin: 0 .16em; background: currentColor; align-self: center; border-radius: 2px; }
.ticket-text { display: block; font-size: 1.12rem; font-weight: 900; line-height: 1.5; letter-spacing: .04em; }
.ticket-place-link { display: inline-flex; align-items: center; gap: .3em; margin-top: 6px; color: var(--red); font-size: .85rem; font-weight: 700; border-bottom: 1.5px solid; line-height: 1.5; }
.ticket-place-link .icon { width: 1em; height: 1em; transition: transform .25s var(--ease); }
.ticket-place-link:hover .icon { transform: translateY(2px) rotate(90deg); }

.stamp {
  position: absolute; z-index: 3; top: -38px; right: calc(var(--stub) + 18px); width: 104px; height: 104px;
  color: var(--red-ink); transform: rotate(-14deg); opacity: .9; pointer-events: none;
  font-family: var(--font);
}
.stamp text { font-family: var(--font); }

.countdown { display: flex; align-items: baseline; justify-content: center; gap: 4px; color: var(--navy); font-weight: 900; line-height: 1; white-space: nowrap; }
.countdown-pre { font-size: .9rem; letter-spacing: .08em; writing-mode: vertical-rl; align-self: center; line-height: 1.1; }
.countdown-num { font-family: var(--num); font-size: 5.2rem; font-weight: 700; color: var(--red); letter-spacing: -.02em; line-height: .9; }
.countdown-post { font-size: 1.15rem; }
.countdown-today { display: inline-block; padding: 10px 14px; border-radius: 6px; background: var(--red); color: #fff; font-size: 1.35rem; letter-spacing: .1em; }
.countdown-done { font-size: .95rem; line-height: 1.6; white-space: normal; text-align: center; }
.ticket-serial { color: var(--muted); font-family: var(--num); font-size: .78rem; letter-spacing: .2em; }

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding: 112px 0; }
.section--tight { padding: 64px 0 96px; }
.section--news { padding-top: 104px; }
.section--program { background: var(--mint); position: relative; }
.section--booths { position: relative; background: var(--cream); }

/* 駅ナンバリング風の見出し */
.sec-head { display: flex; align-items: center; gap: 18px; }
.sec-num {
  display: grid; place-items: center; align-content: center; flex: none;
  width: 60px; height: 60px; border: 5px solid var(--navy); border-radius: 12px; background: var(--paper);
  color: var(--navy); font-family: var(--num); font-size: 1.6rem; font-weight: 700; line-height: .9;
}
.sec-num small { font-size: .62rem; letter-spacing: .08em; line-height: 1; margin-bottom: 1px; }
.sec-title { color: var(--navy); font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 900; line-height: 1.25; letter-spacing: .06em; }
.sec-en { margin-top: 4px; color: var(--navy-60); font-family: var(--num); font-size: .9rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; line-height: 1.2; }
.sec-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 40px; }
.sec-side-note { color: var(--muted); font-size: .92rem; font-weight: 700; }
.empty-note { padding: 32px 0; color: var(--muted); }

/* ==========================================================================
   News
   ========================================================================== */
.news-list { border-top: 2px solid var(--navy); }
.news-list li { border-bottom: 1px solid var(--line); }
.news-item {
  position: relative; isolation: isolate;
  display: grid; grid-template-columns: 8.5em auto 1fr 40px; align-items: center; gap: 12px 24px;
  min-height: 84px; padding: 16px 8px;
}
.news-item::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--mint);
  transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease);
}
.news-item:hover::before { transform: scaleX(1); }
.news-item time { font-family: var(--num); font-size: 1.15rem; font-weight: 600; letter-spacing: .06em; color: var(--navy); }
.news-y { color: var(--navy-60); font-size: .85em; }
.news-tags { display: flex; gap: 6px; }
.news-title { font-weight: 700; line-height: 1.6; }
.news-item.is-important .news-title { color: var(--red-ink); }
.news-arrow {
  display: grid; place-items: center; width: 40px; height: 40px; border: 2px solid var(--navy); border-radius: 50%;
  color: var(--navy); transition: background-color .25s, color .25s;
}
.news-arrow .icon { width: 18px; height: 18px; transition: transform .3s var(--ease); }
.news-item:hover .news-arrow { background: var(--navy); color: #fff; }
.news-item:hover .news-arrow .icon { transform: translateX(2px); }

/* ==========================================================================
   Program（路線図タイムテーブル）
   ========================================================================== */
.program-layout { display: grid; grid-template-columns: minmax(0, 4.2fr) minmax(0, 7fr); gap: 56px; align-items: start; }
.program-intro { position: sticky; top: calc(var(--header-h) + 40px); }
.program-lead { margin-top: 28px; font-weight: 700; line-height: 2; }
.program-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 24px; padding: 16px 18px; border-radius: 10px; background: var(--paper); font-size: .85rem; font-weight: 700; }
.program-legend li { display: flex; align-items: center; gap: 8px; }
.kind-dot { width: 14px; height: 14px; border: 4px solid var(--k); border-radius: 50%; background: var(--paper); }
.program-note { margin-top: 16px; color: var(--muted); font-size: .82rem; }
.program-live { display: inline-flex; align-items: center; gap: 8px; margin-top: 20px; padding: 8px 14px; border-radius: 999px; background: var(--red); color: #fff; font-weight: 900; font-size: .9rem; }
.program-live[hidden] { display: none; }
.program-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: blink 1.4s infinite; }

.kind--ceremony { --k: var(--k-ceremony); }
.kind--stage { --k: var(--k-stage); }
.kind--photo { --k: var(--k-photo); }
.kind--character { --k: var(--k-character); }
.kind--bingo { --k: var(--k-bingo); }
.kind--rally { --k: var(--k-rally); }
.kind--end { --k: var(--navy); }

.route { position: relative; padding: 4px 0; }
.stop { position: relative; display: grid; grid-template-columns: 5.6em 36px 1fr; column-gap: 16px; padding-bottom: 30px; }
.stop:last-child { padding-bottom: 0; }
/* 線路（ネイビーの帯） */
.stop::before {
  content: ""; position: absolute; top: 14px; bottom: -14px; left: calc(5.6em + 16px + 18px - 5px); width: 10px;
  background: var(--navy);
}
.stop:last-child::before { display: none; }
.stop-time { padding-top: 2px; text-align: right; font-family: var(--num); font-size: 1.55rem; font-weight: 700; line-height: 1.1; color: var(--navy); white-space: nowrap; }
.stop-time small { margin-left: 2px; font-family: var(--font); font-size: .7rem; font-weight: 700; color: var(--muted); }
.stop-mark {
  position: relative; z-index: 1; justify-self: center; margin-top: 4px;
  width: 26px; height: 26px; border: 6px solid var(--k); border-radius: 50%; background: var(--paper);
  box-shadow: 0 0 0 3px var(--paper);
}
.stop.is-origin .stop-mark, .stop.is-terminal .stop-mark { width: 34px; height: 34px; margin-top: 0; border-width: 7px; box-shadow: 0 0 0 3px var(--paper), inset 0 0 0 4px var(--paper), inset 0 0 0 9px var(--k); }
.stop-body { padding: 0 0 0 4px; }
.stop-badge { display: inline-block; margin-bottom: 4px; padding: 0 8px; border-radius: 4px; background: var(--navy); color: #fff; font-size: .72rem; font-weight: 900; letter-spacing: .16em; }
.stop-title { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 1.12rem; font-weight: 900; line-height: 1.5; }
.stop-title a { border-bottom: 2px solid var(--k); }
.stop-title a:hover { background: var(--yellow); }
.stop-round { padding: 0 8px; border: 1.5px solid currentColor; border-radius: 999px; font-size: .72rem; font-weight: 700; color: var(--muted); }
.stop-sub { margin-top: 2px; font-weight: 700; color: var(--navy); }
.stop-sub::before { content: "「"; } .stop-sub::after { content: "」"; }
.stop-text { margin-top: 2px; color: var(--muted); font-size: .92rem; line-height: 1.75; }
.stop.is-terminal .stop-title { color: var(--navy); }

/* 当日：通過済み・次の停車・いま走行中 */
.route.is-live .stop.is-past .stop-body, .route.is-live .stop.is-past .stop-time { opacity: .45; }
.route.is-live .stop.is-past .stop-mark { background: var(--k); }
.route.is-live .stop.is-next .stop-mark { animation: ring 1.6s var(--ease) infinite; }
.route.is-live .stop.is-next .stop-body::after {
  content: "まもなく"; display: inline-block; margin-top: 6px; padding: 0 10px; border-radius: 4px; background: var(--red); color: #fff; font-size: .75rem; font-weight: 900; letter-spacing: .14em;
}
.route-train {
  position: absolute; z-index: 2; left: calc(5.6em + 16px + 18px - 14px); top: 0;
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 7px 7px 4px 4px;
  background: var(--red); color: #fff; box-shadow: 0 0 0 3px var(--paper);
  transition: top .8s var(--ease);
}
.route-train .icon { width: 18px; height: 18px; stroke-width: 2.4; }
@keyframes ring { 0% { box-shadow: 0 0 0 3px var(--paper), 0 0 0 3px rgba(230, 0, 18, .5); } 100% { box-shadow: 0 0 0 3px var(--paper), 0 0 0 16px rgba(230, 0, 18, 0); } }
@keyframes blink { 50% { opacity: .25; } }

/* ==========================================================================
   Booths（一日中たのしめる）
   ========================================================================== */
.booth-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 24px; }
.booth {
  position: relative; grid-column: span 2;
  display: flex; flex-direction: column;
  padding: 28px 28px 30px; border: 2px solid var(--navy); border-radius: var(--radius); background: var(--paper);
  box-shadow: 0 5px 0 var(--navy);
}
.booth--rally { grid-column: span 4; grid-row: span 1; display: grid; grid-template-columns: 1fr minmax(0, 230px); column-gap: 32px; align-content: start; background-image: var(--jimon); background-size: 36px 14px; }
.booth--rally > *:not(.rally-card) { grid-column: 1; }
.booth--ticket { grid-column: span 2; }
.booth--main, .booth--uniform, .booth--capsule { grid-column: span 3; }
.booth--main { padding: 32px 32px 34px; background-color: var(--paper); background-image: var(--jimon); background-size: 36px 14px; }
.booth--main .booth-tag { background: var(--navy); color: var(--yellow); }
.booth--main .booth-title { font-size: 1.7rem; }
.booth--main .booth-icon { width: 64px; height: 64px; background: var(--yellow); }
.booth--main .booth-icon .icon { width: 34px; height: 34px; }
.booth-items { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.booth-items li { padding: 3px 12px; border: 1.5px solid var(--navy); border-radius: 999px; background: var(--paper); font-size: .84rem; font-weight: 700; line-height: 1.6; }
.booth-link { display: inline-flex; align-items: center; gap: .5em; align-self: flex-start; margin-top: auto; padding-top: 18px; color: var(--red-ink); font-weight: 900; }
.booth-link span { border-bottom: 2px solid; }
.booth-link .icon { transition: transform .25s var(--ease); }
.booth-link:hover .icon { transform: translateX(4px); }
.booth-icon {
  display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 16px;
  border-radius: 50%; background: var(--yellow); color: var(--navy);
}
.booth-icon .icon { width: 30px; height: 30px; }
.booth-tag { align-self: flex-start; justify-self: start; margin-bottom: 8px; padding: 2px 10px; border-radius: 4px; background: var(--red); color: #fff; font-size: .78rem; font-weight: 900; letter-spacing: .08em; }
.booth-title { font-size: 1.3rem; font-weight: 900; line-height: 1.45; letter-spacing: .04em; }
.booth--rally .booth-title { font-size: 1.7rem; }
.booth-time { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-family: var(--num); font-size: 1.05rem; font-weight: 700; letter-spacing: .02em; }
.booth-time .icon { width: 18px; height: 18px; }
.booth-text { margin-top: 10px; color: var(--muted); font-size: .93rem; line-height: 1.85; }
.booth-soon { margin-top: auto; padding-top: 16px; color: var(--red); font-size: .85rem; font-weight: 900; letter-spacing: .08em; }

/* オリジナルきっぷ（硬券：実物に近い 57.5×30mm の比率） */
.mini-ticket {
  position: relative; align-self: flex-start; width: 52%; min-width: 172px; max-width: 210px; aspect-ratio: 57.5 / 30;
  display: flex; flex-direction: column; justify-content: center;
  margin-top: auto; padding: 8px 14px 10px; transform: rotate(-4deg) translateY(10px);
  border: 2px solid var(--navy); border-radius: 5px; background-color: #f6e9c9;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='14' viewBox='0 0 36 14'%3E%3Cpath d='M0 7c4.5-5 13.5-5 18 0s13.5 5 18 0' fill='none' stroke='%23ead7a8' stroke-width='1'/%3E%3C/svg%3E");
  font-weight: 900;
}
.booth--ticket { padding-bottom: 36px; }
.mini-ticket-route { display: flex; align-items: center; gap: 6px; font-size: .84rem; letter-spacing: .04em; line-height: 1.4; white-space: nowrap; }
.mini-ticket-route i { flex: 1; min-width: 14px; height: 2px; background: var(--navy); position: relative; }
.mini-ticket-route i::after { content: ""; position: absolute; right: -1px; top: -4px; border: 5px solid transparent; border-left: 7px solid var(--navy); border-right: 0; }
.mini-ticket-meta { display: flex; justify-content: space-between; gap: 6px; margin-top: 4px; font-size: .62rem; color: var(--muted); white-space: nowrap; }
.mini-ticket-meta span[lang] { font-family: var(--num); color: var(--red-ink); letter-spacing: .06em; }
/* 入鋏の跡（キービジュアル右下と同じ「M」形） */
.mini-ticket-punch {
  position: absolute; bottom: -2px; right: 24%; width: 18px; height: 11px;
  background: var(--navy); clip-path: polygon(0 0, 50% 42%, 100% 0, 100% 100%, 0 100%);
}

/* スタンプ台紙 */
.rally-card {
  grid-column: 2; grid-row: 1 / span 6; align-self: center;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; padding: 20px;
  border: 2px dashed var(--navy); border-radius: 10px; background: var(--paper);
}
.rally-slot { display: grid; place-items: center; aspect-ratio: 1; border: 2px dashed #b9c1d4; border-radius: 50%; }
.rally-slot.is-done { border: 3px solid var(--red-ink); color: var(--red-ink); transform: rotate(-8deg); }
.rally-slot.is-done:nth-child(2) { transform: rotate(11deg); }
.rally-slot .icon { width: 46%; height: 46%; }
.rally-goal { grid-column: 1 / -1; padding: 4px 0; border-radius: 6px; background: var(--navy); color: var(--yellow); font-family: var(--num); font-weight: 700; letter-spacing: .3em; text-align: center; }

/* 入鋏（にゅうきょう）された硬券 */
.booth--ticket .booth-icon { background: var(--mint-2); }
.booth--uniform .booth-icon { background: #ffe3cc; }
.booth--capsule .booth-icon { background: #fde0e3; }
.booth--market .booth-icon { background: var(--yellow); }

/* ==========================================================================
   Access
   ========================================================================== */
.section--access .sec-head { margin-bottom: 40px; }
.access { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: start; }
.access-venue { font-size: 1.5rem; font-weight: 900; line-height: 1.5; letter-spacing: .04em; }
.access-text { margin-top: 8px; color: var(--muted); }
.access-route { position: relative; margin: 28px 0 0; display: grid; gap: 0; }
.access-route li { position: relative; display: flex; align-items: center; gap: 14px; min-height: 52px; font-size: 1rem; }
.access-route li + li::before {
  content: ""; position: absolute; left: 21px; top: -14px; height: 28px; width: 2px;
  background: radial-gradient(circle, var(--navy) 1.2px, transparent 1.5px) center / 2px 7px repeat-y;
}
.access-walk { color: var(--muted); font-weight: 700; padding-left: 0; }
.access-node { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border: 2px solid var(--navy); border-radius: 50%; background: var(--paper); }
.access-node .icon { width: 22px; height: 22px; }
.access-walk .access-node { width: 30px; height: 30px; margin: 0 7px; border-style: dashed; }
.access-walk .access-node .icon { width: 16px; height: 16px; }
.access-node--goal { background: var(--red); border-color: var(--red); color: #fff; }
.access-rain { display: inline-flex; align-items: center; gap: 8px; margin-top: 20px; padding: 8px 14px; border-radius: 8px; background: var(--mint); font-weight: 700; font-size: .92rem; }
.access-rain .icon { width: 20px; height: 20px; }
.access-info .button { margin-top: 28px; }
.access-map { position: relative; }
.access-map iframe { display: block; width: 100%; height: 440px; border: 2px solid var(--navy); border-radius: var(--radius); background: var(--mint); }
.access-teppy { position: absolute; top: -26px; right: 18px; display: flex; align-items: center; gap: 8px; }
.access-teppy img { width: 52px; height: 52px; }
.access-teppy span { position: relative; order: -1; padding: 4px 12px; border: 2px solid var(--navy); border-radius: 999px; background: var(--paper); font-size: .82rem; font-weight: 900; white-space: nowrap; }
.access-teppy span::after { content: ""; position: absolute; right: -7px; top: 50%; width: 10px; height: 10px; border: solid var(--navy); border-width: 2px 2px 0 0; background: var(--paper); transform: translateY(-50%) rotate(45deg); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { position: relative; background: var(--navy); color: #fff; }
.footer-rail {
  position: relative; height: 22px; background: var(--paper);
  background:
    linear-gradient(var(--navy), var(--navy)) left 9px / 100% 2px no-repeat,
    linear-gradient(var(--navy), var(--navy)) left 17px / 100% 2px no-repeat,
    repeating-linear-gradient(90deg, rgba(31, 45, 93, .35) 0 4px, transparent 4px 16px) left 6px / 100% 16px no-repeat,
    var(--paper);
  overflow: hidden;
}
.footer-rail-train {
  position: absolute; left: 0; bottom: 6px; display: grid; place-items: center; width: 46px; height: 16px; border-radius: 8px 8px 2px 2px;
  background: var(--red); color: #fff; animation: footer-run 26s linear infinite;
}
.footer-rail-train .icon { display: none; }
.footer-rail-train::before { content: ""; width: 30px; height: 5px; border-radius: 1px; background: repeating-linear-gradient(90deg, #fff 0 5px, transparent 5px 8px); }
@keyframes footer-run { from { transform: translateX(-60px); } to { transform: translateX(100vw); } }

.footer-main { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 64px; padding: 72px 0 56px; }
.footer-logo { word-break: auto-phrase; display: grid; font-size: 1.35rem; font-weight: 900; letter-spacing: .04em; line-height: 1.4; }
.footer-logo > span[lang] { color: var(--yellow); font-family: var(--num); font-size: .78rem; letter-spacing: .2em; }
.footer-origin { display: flex; align-items: center; gap: 20px; margin-top: 28px; }
.footer-origin-line { display: flex; align-items: center; gap: 0; font-weight: 900; font-size: .95rem; }
.footer-origin-st { display: flex; align-items: center; gap: 8px; }
.footer-origin-st::before { content: ""; width: 14px; height: 14px; border: 3px solid #fff; border-radius: 50%; background: var(--navy); }
.footer-origin-st:last-child { flex-direction: row-reverse; }
.footer-origin-track { width: 84px; height: 4px; margin: 0 6px; background: repeating-linear-gradient(90deg, #fff 0 10px, rgba(255,255,255,.35) 10px 20px); }
.footer-origin-date { font-family: var(--num); font-size: 1.6rem; font-weight: 700; color: var(--yellow); letter-spacing: .06em; line-height: 1; }
.footer-story { max-width: 560px; margin-top: 18px; color: rgba(255, 255, 255, .78); font-size: .88rem; line-height: 2; }
.footer-nav ul { display: grid; gap: 2px; }
.footer-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, .14); font-weight: 700; }
.footer-nav a::before { content: ""; width: 10px; height: 10px; border: 2.5px solid var(--yellow); border-radius: 50%; transition: background-color .2s; }
.footer-nav a:hover::before { background: var(--yellow); }
.footer-nav .menu-disabled { color: rgba(255,255,255,.4); display: block; padding: 10px 0; }
.footer-nav .archive-link { border: 0; }

.footer-credits { padding: 44px 0 36px; border-top: 1px solid rgba(255, 255, 255, .14); color: rgba(255, 255, 255, .72); font-size: .8rem; text-align: center; }
.footer-role { display: inline-block; margin-right: 10px; padding: 0 8px; border: 1px solid rgba(255,255,255,.5); border-radius: 3px; font-size: .72rem; font-weight: 500; letter-spacing: .14em; vertical-align: .1em; }
.footer-host, .footer-sponsor { color: #fff; font-size: .9rem; font-weight: 700; }
.footer-committee { margin-top: 26px; }
.footer-committee-title { color: #fff; font-size: .85rem; font-weight: 700; letter-spacing: .08em; }
.footer-committee-members { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 20px; max-width: 1000px; margin: 12px auto 0; }
.footer-committee-members li { white-space: nowrap; line-height: 2; }
.footer-committee-members--org { margin-top: 6px; }
.footer-sponsor { margin-top: 26px; }
.footer-copyright { margin-top: 32px; font-family: var(--num); letter-spacing: .1em; color: rgba(255,255,255,.55); }

/* ==========================================================================
   Sub pages（駅名標）
   ========================================================================== */
.page-sign {
  position: relative; padding: 56px 0 64px;
  background-image: var(--stripe-tile); background-size: 30px 30px;
}
.sign {
  max-width: 820px; margin-inline: auto; overflow: hidden;
  border: 2px solid var(--navy); border-radius: 10px; background: var(--paper); text-align: center;
  box-shadow: 0 6px 0 var(--navy);
}
.sign-meta { display: flex; justify-content: center; align-items: center; gap: 10px; padding-top: 26px; font-family: var(--num); font-size: 1.05rem; font-weight: 600; letter-spacing: .08em; }
.sign-title { padding: 30px 28px 0; color: var(--navy); font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 900; line-height: 1.3; letter-spacing: .1em; }
.sign-meta + .sign-title { padding-top: 10px; }
.page-sign--long .sign-title { font-size: clamp(1.4rem, 3vw, 2rem); letter-spacing: .04em; text-align: left; padding-inline: 40px; }
.page-sign--long .sign-meta { justify-content: flex-start; padding-inline: 40px; }
.sign-en { margin-top: 2px; color: var(--navy-60); font-family: var(--num); font-size: 1rem; font-weight: 600; letter-spacing: .3em; }
.sign-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-top: 26px; padding: 10px 20px; background: var(--navy); color: #fff; font-size: .85rem; font-weight: 700;
}
.sign-bar ol { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.sign-bar li { display: flex; align-items: center; gap: 4px; }
.sign-bar li + li:not([aria-current])::before { content: "›"; opacity: .6; margin-right: 4px; }
.sign-bar a { display: inline-flex; align-items: center; gap: 6px; padding: 2px 6px; border-radius: 4px; }
.sign-bar li:first-child a::before { content: "◀"; font-size: .6rem; color: var(--yellow); }
.sign-bar a:hover { background: rgba(255, 255, 255, .14); }
.sign-line { font-family: var(--num); font-size: .78rem; letter-spacing: .16em; color: var(--yellow); white-space: nowrap; }

.entry-wrap { max-width: 860px; margin-inline: auto; }
.entry-content { padding: 72px 0 104px; }
.entry-content > * + * { margin-top: 1.5em; }
.entry-content h2 {
  position: relative; margin-top: 2.6em; padding: 0 0 12px 22px;
  border-bottom: 2px solid var(--navy); color: var(--navy); font-size: 1.6rem; font-weight: 900; line-height: 1.45; letter-spacing: .04em;
}
.entry-content h2::before { content: ""; position: absolute; left: 0; top: .3em; width: 8px; height: 1.1em; border-radius: 2px; background: var(--red); }
.entry-content h3 { margin-top: 2.2em; color: var(--navy); font-size: 1.25rem; font-weight: 900; }
.entry-content h3::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 10px; border: 3.5px solid var(--navy); border-radius: 50%; vertical-align: .05em; }
.entry-content ul:not([class*="wp-block-gallery"]) { display: grid; gap: .4em; }
.entry-content ul:not([class*="wp-block-gallery"]) > li { position: relative; padding-left: 1.5em; }
.entry-content ul:not([class*="wp-block-gallery"]) > li::before { content: ""; position: absolute; left: .2em; top: .62em; width: 9px; height: 9px; border: 2.5px solid var(--red); border-radius: 50%; }
.entry-content ol { padding-left: 1.4em; list-style: decimal; }
.entry-content a:not(.button):not(.wp-block-button__link) { color: var(--red-ink); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.entry-content a:not(.button):not(.wp-block-button__link):hover { background: var(--yellow); }
.entry-content strong, .entry-content b { background: linear-gradient(transparent 62%, var(--yellow) 62%); }
.entry-content img { border-radius: var(--radius); }
.entry-content figure.entry-thumb img { width: 100%; }
.entry-content hr { border: 0; height: 2px; background: radial-gradient(circle, var(--navy) 1px, transparent 1.4px) left / 8px 2px repeat-x; }
.entry-content table, .event-table { width: 100%; border-collapse: collapse; }
.entry-content th, .entry-content td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.entry-content th { width: 9em; color: var(--navy); font-family: var(--num); font-size: 1.1rem; white-space: nowrap; }
.entry-content blockquote { margin-inline: 0; padding: 18px 24px; border-left: 4px solid var(--navy); background: var(--mint); }
.entry-content .wp-block-button__link { border: 2px solid var(--navy); border-radius: 999px; background: var(--red); color: #fff; box-shadow: var(--press); font-weight: 700; }

.entry-nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: 16px; padding-bottom: 104px; }
.entry-nav-link { display: grid; gap: 4px; padding: 16px 20px; border: 2px solid var(--navy); border-radius: 10px; font-weight: 700; line-height: 1.5; transition: background-color .2s; }
.entry-nav-link:hover { background: var(--mint); }
.entry-nav-link small { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: .78rem; }
.entry-nav-link small .icon { width: 14px; height: 14px; }
.entry-nav-link--prev { grid-column: 1; }
.entry-nav-link--next { grid-column: 3; text-align: right; }
.entry-nav-link--next small { justify-content: flex-end; }
.entry-nav-back { grid-column: 2; align-self: center; padding: 10px 18px; border-radius: 999px; background: var(--navy); color: #fff; font-weight: 700; font-size: .88rem; }

.pagination { margin-top: 48px; }
.pagination .nav-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.pagination .page-numbers { display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 12px; border: 2px solid var(--navy); border-radius: 999px; font-family: var(--num); font-weight: 700; }
.pagination .page-numbers.current { background: var(--navy); color: #fff; }

/* 404 */
.lost { padding: 96px 0 120px; background-image: var(--stripe-tile); background-size: 30px 30px; }
.lost-inner { max-width: 640px; padding: 48px 32px 56px; border: 2px solid var(--navy); border-radius: 14px; background: var(--paper); text-align: center; box-shadow: 0 6px 0 var(--navy); }
.lost-art { width: min(100%, 320px); margin: 0 auto; color: var(--navy); }
.lost-sleepers { stroke-width: 3; opacity: .45; }
.lost-plate { fill: var(--red); }
.lost-code { margin-top: 18px; color: var(--red); font-family: var(--num); font-size: 1rem; font-weight: 700; letter-spacing: .4em; }
.lost-title { margin-top: 4px; font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 900; letter-spacing: .06em; }
.lost-text { margin-top: 14px; color: var(--muted); }
.lost .button { margin-top: 30px; }

/* ==========================================================================
   Forms
   ========================================================================== */
.ytf-form { display: grid; gap: 24px; }
.ytf-field label { display: block; margin-bottom: 8px; color: var(--navy); font-weight: 700; }
.ytf-required { margin-left: 8px; padding: 1px 8px; border-radius: 4px; background: var(--red); color: #fff; font-size: .7rem; vertical-align: .1em; }
.ytf-field input, .ytf-field textarea, .ytf-field select { width: 100%; padding: 14px 16px; border: 2px solid #b8c0d3; border-radius: 10px; background: var(--paper); transition: border-color .2s, box-shadow .2s; }
.ytf-field input:focus, .ytf-field textarea:focus, .ytf-field select:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 4px var(--yellow); }
.ytf-form input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--red); vertical-align: -4px; margin-right: 6px; }
.ytf-message { padding: 16px 20px; border: 2px solid var(--navy); border-radius: 10px; background: var(--mint); color: var(--navy); font-weight: 700; }
.ytf-message--error { border-color: var(--red); background: #fff0ef; color: #a1121b; }

/* ==========================================================================
   Reveal（ゆっくり入線）
   ========================================================================== */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0s); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1080px) {
  .header-date { display: none; }
  .program-layout { grid-template-columns: 1fr; gap: 40px; }
  .program-intro { position: static; }
  .booth--rally { grid-column: span 6; }
  .booth--ticket, .booth--uniform, .booth--capsule { grid-column: span 2; }
  .booth--main { grid-column: span 3; }
  .access { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  :root { --header-h: 64px; }
  .admin-bar .site-header { top: 46px; }
  .brand-ja { font-size: .92rem; }
  .menu-toggle {
    display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px 0 12px;
    border: 2px solid var(--navy); border-radius: 999px; background: var(--paper); color: var(--navy);
    font-size: .8rem; font-weight: 700; cursor: pointer; flex: none;
  }
  .menu-toggle-lines { position: relative; display: grid; gap: 5px; width: 18px; }
  .menu-toggle-lines span { display: block; height: 2px; border-radius: 2px; background: currentColor; transition: transform .3s var(--ease); }
  .menu-toggle[aria-expanded="true"] { background: var(--navy); color: #fff; }
  .menu-toggle[aria-expanded="true"] .menu-toggle-lines span:first-child { transform: translateY(3.5px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .menu-toggle-lines span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

  .main-nav {
    position: fixed; inset: var(--header-h) 0 0; z-index: 99;
    padding: 28px 24px 48px; overflow-y: auto;
    background: var(--paper);
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity .3s var(--ease), transform .3s var(--ease), visibility 0s .3s;
  }
  .admin-bar .main-nav { top: calc(var(--header-h) + 46px); }
  .main-nav.is-open { visibility: visible; opacity: 1; transform: none; transition: opacity .3s var(--ease), transform .3s var(--ease); }
  /* 路線図風の縦メニュー */
  .main-nav > ul, .main-nav .menu { position: relative; display: grid; gap: 0; max-width: 420px; margin-inline: auto; }
  .main-nav .menu::before { content: ""; position: absolute; left: 13px; top: 24px; bottom: 24px; width: 8px; background: var(--navy); border-radius: 4px; }
  .main-nav ul a, .main-nav .menu-disabled { display: flex; align-items: center; gap: 18px; padding: 14px 0; font-size: 1.15rem; }
  .main-nav ul a::before, .main-nav .menu-disabled::before { content: ""; position: relative; z-index: 1; flex: none; width: 34px; height: 34px; border: 6px solid var(--navy); border-radius: 50%; background: var(--paper); }
  .main-nav ul a:hover::before { background: var(--yellow); }
  .main-nav ul a::after { display: none; }
  .main-nav .archive-link { margin: 0; padding: 14px 0; border: 0; border-radius: 0; }
  .main-nav .archive-link:hover { background: none; color: var(--navy); }
  .main-nav .sub-menu { padding-left: 52px; }
  body.menu-open { overflow: hidden; }
  .menu-extra { display: grid; gap: 4px; max-width: 420px; margin: 36px auto 0; padding: 22px 22px 24px; border: 2px solid var(--navy); border-radius: 12px; background: var(--mint) var(--jimon); }
  .menu-extra-date { font-weight: 900; font-size: 1.05rem; }
  .menu-extra-place { color: var(--muted); font-weight: 700; font-size: .9rem; }
  .menu-extra .button { margin-top: 14px; }

  .ticket { --stub: auto; grid-template-columns: 1fr; }
  .ticket-main {
    border-radius: 14px 14px 0 0; padding: 24px 24px 26px;
    -webkit-mask:
      radial-gradient(circle at 0 100%, #0000 var(--notch), #000 calc(var(--notch) + .5px)) left / 51% 100% no-repeat,
      radial-gradient(circle at 100% 100%, #0000 var(--notch), #000 calc(var(--notch) + .5px)) right / 51% 100% no-repeat;
            mask:
      radial-gradient(circle at 0 100%, #0000 var(--notch), #000 calc(var(--notch) + .5px)) left / 51% 100% no-repeat,
      radial-gradient(circle at 100% 100%, #0000 var(--notch), #000 calc(var(--notch) + .5px)) right / 51% 100% no-repeat;
  }
  .ticket-stub {
    flex-direction: row; justify-content: space-between; border-radius: 0 0 14px 14px; padding: 18px 24px;
    -webkit-mask:
      radial-gradient(circle at 0 0, #0000 var(--notch), #000 calc(var(--notch) + .5px)) left / 51% 100% no-repeat,
      radial-gradient(circle at 100% 0, #0000 var(--notch), #000 calc(var(--notch) + .5px)) right / 51% 100% no-repeat;
            mask:
      radial-gradient(circle at 0 0, #0000 var(--notch), #000 calc(var(--notch) + .5px)) left / 51% 100% no-repeat,
      radial-gradient(circle at 100% 0, #0000 var(--notch), #000 calc(var(--notch) + .5px)) right / 51% 100% no-repeat;
  }
  .ticket-stub::before { left: calc(var(--notch) + 8px); right: calc(var(--notch) + 8px); top: 0; bottom: auto; width: auto; height: 2px; background: radial-gradient(circle, var(--navy) 1.1px, transparent 1.4px) left center / 8px 2px repeat-x; }
  .countdown-num { font-size: 3.6rem; }
  .countdown-pre { writing-mode: horizontal-tb; align-self: baseline; }
  .ticket-facts { grid-template-columns: 1fr 1fr; gap: 18px 0; }
  .ticket-fact--place { grid-column: 1 / -1; padding-left: 0; border-left: 0; padding-top: 16px; border-top: 1px solid var(--line); }
  .stamp { width: 88px; height: 88px; right: 14px; top: -22px; }
  .ticket-head { padding-right: 76px; }

  .section { padding: 84px 0; }
  .news-item { grid-template-columns: 1fr 36px; grid-template-areas: "meta arrow" "title arrow"; gap: 6px 14px; padding: 18px 4px; }
  .news-item time, .news-item .news-tags { grid-area: meta; }
  .news-item .news-tags { justify-self: start; margin-left: 7.4em; }
  .news-title { grid-area: title; }
  .news-arrow { grid-area: arrow; width: 36px; height: 36px; }

  .footer-main { grid-template-columns: 1fr; gap: 40px; padding-top: 56px; }
}

@media (max-width: 640px) {
  :root { --container: calc(100% - 32px); }
  .brand-en { display: none; }
  .brand-ja { font-size: .84rem; letter-spacing: .02em; }
  .site-brand { gap: 10px; }
  .site-brand .custom-logo-link { flex-basis: 38px; }
  .site-brand .custom-logo, .brand-mark { width: 38px; height: 38px; }
  .menu-toggle-label { display: none; }
  .menu-toggle { padding: 0 12px; }

  .kv { padding-bottom: 88px; }
  .kv-rail { margin-top: 0; height: 46px; background-position: left 40px, left 43px; }
  .kv-train { left: 16px; }
  .kv-train-svg { width: 180px; }
  .kv-frame { --kv-w: 100%; }
  /* SP画像未設定時はPC用キービジュアルのタイトル部分をトリミング（x=820〜1672） */
  .kv--crop .kv-image { aspect-ratio: 852 / 941; object-fit: cover; object-position: 100% 50%; }
  .kv--crop .kv-frame::before {
    background-size: calc(100cqw * 43.6 / 852) calc(100cqw * 43.6 / 852);
    background-position: calc(200vw - 50cqw - 100cqw * 820 / 852) 0;
  }
  .kv-actions { flex-direction: column; align-items: stretch; max-width: 360px; margin-inline: auto; }
  .ticket-section { margin-top: -56px; }
  .ticket-main { padding: 20px 20px 22px; }
  .ticket-head { flex-direction: column; align-items: flex-start; gap: 6px; padding-right: 80px; }
  .ticket-label { font-size: .85rem; line-height: 1.6; }
  .ticket-facts { grid-template-columns: 1fr; gap: 14px; }
  .ticket-fact, .ticket-fact--place { padding: 0; border: 0; }
  .ticket-fact--time { padding-top: 14px; border-top: 1px solid var(--line); }
  .ticket-big { font-size: 2.7rem; }
  .stamp { width: 78px; height: 78px; right: 8px; top: -20px; }
  .ticket-stub { padding: 16px 20px; }
  .countdown-num { font-size: 3rem; }

  .section { padding: 72px 0; }
  .sec-head { gap: 14px; }
  .sec-num { width: 50px; height: 50px; border-width: 4px; border-radius: 10px; font-size: 1.35rem; }
  .sec-row { display: grid; gap: 18px; margin-bottom: 28px; }
  .sec-row .link-more { justify-self: start; }

  .news-item .news-tags { margin-left: 0; }
  .news-item time, .news-item .news-tags { grid-area: auto; }
  .news-item { grid-template-columns: auto 1fr 36px; grid-template-areas: "time tags arrow" "title title arrow"; }
  .news-item time { grid-area: time; font-size: 1.05rem; }
  .news-item .news-tags { grid-area: tags; }

  .stop { grid-template-columns: 4.3em 28px 1fr; column-gap: 10px; padding-bottom: 26px; }
  .stop::before { left: calc(4.3em + 10px + 14px - 4px); width: 8px; }
  .stop-time { font-size: 1.25rem; }
  .stop-mark { width: 22px; height: 22px; border-width: 5px; }
  .stop.is-origin .stop-mark, .stop.is-terminal .stop-mark { width: 28px; height: 28px; border-width: 6px; box-shadow: 0 0 0 3px var(--paper), inset 0 0 0 3px var(--paper), inset 0 0 0 7px var(--k); }
  .route-train { left: calc(4.3em + 10px + 14px - 13px); width: 26px; height: 26px; }
  .stop-title { font-size: 1.04rem; }
  .program-legend { gap: 6px 14px; }

  .booth-grid { grid-template-columns: 1fr; gap: 18px; }
  .booth, .booth--rally, .booth--ticket, .booth--uniform, .booth--capsule, .booth--main { grid-column: auto; }
  .booth--main .booth-title { font-size: 1.45rem; }
  .booth--main { padding: 26px 22px 28px; }
  .booth { padding: 24px 22px 26px; }
  .booth--rally { grid-template-columns: 1fr; }
  .rally-card { grid-column: 1; grid-row: auto; margin-top: 20px; grid-template-columns: repeat(4, 1fr); padding: 14px; gap: 10px; }
  .booth--rally .booth-title { font-size: 1.45rem; }

  .access-map iframe { height: 320px; }
  .access-venue { font-size: 1.25rem; }
  .access-info .button { width: 100%; }

  .footer-origin { flex-wrap: wrap; gap: 10px 16px; }
  .footer-committee-members { gap: 0 14px; font-size: .76rem; }

  .page-sign { padding: 32px 0 40px; }
  .sign-title { padding: 26px 18px 0; letter-spacing: .06em; }
  .page-sign--long .sign-title, .page-sign--long .sign-meta { padding-inline: 20px; }
  .sign-bar { padding: 10px 14px; }
  .sign-line { display: none; }
  .entry-content { padding: 48px 0 72px; }
  .entry-content h2 { font-size: 1.35rem; }
  .entry-content th, .entry-content td { display: block; width: 100%; padding: 10px 4px; }
  .entry-content th { padding-bottom: 0; border-bottom: 0; }
  .entry-nav { grid-template-columns: 1fr; padding-bottom: 72px; }
  .entry-nav-link--prev, .entry-nav-link--next, .entry-nav-back { grid-column: auto; }
  .entry-nav-back { justify-self: center; order: 3; }
  .lost-inner { padding: 36px 20px 40px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .footer-rail-train { display: none; }
  .js [data-reveal] { opacity: 1; transform: none; }
}

@media print {
  .site-header, .ride-progress, .kv-controls, .access-map, .footer-rail { display: none !important; }
  .ticket { filter: none; border: 2px solid #000; }
}
