/* =================================================================
   subpage.css — content styles for the inner pages
   (来場案内 / 企画一覧 / タイムテーブル / 校内マップ)
   Loaded on top of base.css + components.css.
   Tokens live in base.css. Use var(--…) rather than raw values.
   ================================================================= */

/* --- shared building blocks ------------------------------------ */

.block-title {
  font-size: var(--text-3xl);
  font-weight: var(--fw-bold);
  color: var(--c-ink);
  letter-spacing: 0.02em;
  margin: var(--sp-8) 0 var(--sp-4);
  padding-left: var(--sp-3);
  border-left: 3px solid var(--c-blue);
}
.block-title:first-child { margin-top: 0; }

.lead-note {
  font-size: var(--text-base);
  color: var(--c-muted);
  margin-bottom: var(--sp-6);
}

.note {
  font-size: var(--text-sm);
  color: var(--c-muted);
  margin-top: var(--sp-3);
}

/* --- 来場案内 (info) ------------------------------------------- */

.info-list {
  border-top: 1px solid var(--c-line);
}
.info-row {
  display: flex;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-1);
  border-bottom: 1px solid var(--c-line);
}
.info-row dt {
  flex: none;
  width: 72px;
  font-size: var(--text-base);
  font-weight: var(--fw-bold);
  color: var(--c-blue);
}
.info-row dd { font-size: var(--text-md); }

.check-list { list-style: none; }
.check-list li {
  position: relative;
  padding-left: var(--sp-6);
  margin-bottom: var(--sp-3);
  font-size: var(--text-md);
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-blue);
}

.access-name { font-size: var(--text-base); font-weight: var(--fw-bold); }
.access-addr { font-size: var(--text-sm); color: var(--c-muted); margin-bottom: var(--sp-4); }
.map-frame {
  border-radius: var(--r-sm);
  overflow: hidden;
  border: 1px solid var(--c-line);
}
.map-frame iframe { display: block; }
.access-ways {
  margin-top: var(--sp-5);
  display: grid;
  gap: var(--sp-4);
}
.access-way h3 { font-size: var(--text-base); font-weight: var(--fw-bold); margin-bottom: var(--sp-1); }
.access-way p { font-size: var(--text-base); }

/* FAQ (Q/A list) */
.faq-item {
  padding: var(--sp-4) 0;
  border-bottom: 1px solid var(--c-line);
}
.faq-item:first-child { border-top: 1px solid var(--c-line); }
.faq-q,
.faq-a { position: relative; padding-left: var(--sp-6); }
.faq-q {
  font-size: var(--text-md);
  font-weight: var(--fw-bold);
  color: var(--c-ink);
}
.faq-a {
  font-size: var(--text-base);
  color: var(--c-text);
  margin-top: var(--sp-2);
}
.faq-q::before,
.faq-a::before {
  position: absolute;
  left: 0;
  font-family: var(--font-display);
  font-weight: var(--fw-extrabold);
}
.faq-q::before { content: "Q"; color: var(--c-blue); }
.faq-a::before { content: "A"; color: var(--c-muted); }

/* --- 企画一覧 (projects) — 階ごとのカード ---------------------- */

.proj-group { margin-bottom: var(--sp-7); }
.proj-group:last-child { margin-bottom: 0; }

.proj-list {
  list-style: none;
  display: grid;
  gap: var(--sp-4);
}

/* card: thumbnail | divider | body  (white, soft-shadowed) */
.proj-card {
  display: flex;
  gap: var(--sp-4);
  align-items: stretch;
  padding: var(--sp-4);
  background: var(--c-bg);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-soft);
}

/* 正方形のまま、画像を切らずに全部見せる。カードの高さに引き伸ばされると
   横長の枠になって画像が切れていたので、上に寄せて高さは幅から決める */
.proj-thumb {
  flex: none;
  align-self: flex-start;
  width: 84px;
  aspect-ratio: 1 / 1;
  border-radius: var(--r-icon);
  overflow: hidden;
  background: var(--c-surface);
  display: flex;
  align-items: center;
  justify-content: center;
}
/* 白地のアイコンでも角丸の形が分かるよう、ふちに罫線を重ねる（画像の上に置くので角丸に沿う） */
.proj-thumb { position: relative; }
.proj-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--c-line);
  border-radius: inherit;
  pointer-events: none;
}
.proj-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
/* placeholder icon shown until a real image is added */
.proj-thumb-fallback {
  width: 38%;
  height: 38%;
  color: var(--c-muted);
  opacity: 0.5;
}

.proj-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding-left: var(--sp-4);
  border-left: 1px solid var(--c-line);
}

.proj-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--sp-3);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--c-line);
}

.proj-name {
  min-width: 0;
  font-size: var(--text-2xl);
  font-weight: var(--fw-bold);
  color: var(--c-ink);
  line-height: 1.3;
}

.proj-where {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  text-align: right;
}
.proj-org {
  font-size: var(--text-sm);
  font-weight: var(--fw-bold);
  color: var(--c-ink);
}
.proj-room {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  color: var(--c-blue);
  white-space: nowrap;
}
/* blue location pin via CSS mask — no per-card inline SVG needed */
.proj-room::before {
  content: "";
  flex: none;
  width: 1em;
  height: 1em;
  background: var(--c-blue);
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20fill-rule='evenodd'%20d='M12%202C8.13%202%205%205.13%205%209c0%205.25%207%2013%207%2013s7-7.75%207-13c0-3.87-3.13-7-7-7Zm0%209.5a2.5%202.5%200%201%200%200-5%202.5%202.5%200%200%200%200%205Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20fill-rule='evenodd'%20d='M12%202C8.13%202%205%205.13%205%209c0%205.25%207%2013%207%2013s7-7.75%207-13c0-3.87-3.13-7-7-7Zm0%209.5a2.5%202.5%200%201%200%200-5%202.5%202.5%200%200%200%200%205Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.proj-desc {
  margin-top: var(--sp-3);
  font-size: var(--text-base);
  color: var(--c-text);
}

.proj-tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
}
.proj-tag {
  font-size: var(--text-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.04em;
  color: var(--c-on-accent);
  background: var(--c-ink);
  border-radius: var(--r-pill);
  padding: 4px 12px;
}

/* --- 企画一覧: 検索・絞り込み・階ごとの開閉 (js/booths.js) ------- */
.booth-card[hidden], .booth-floor[hidden] { display: none; }

.booth-sample,
.booth-error {
  margin-bottom: var(--sp-6);
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--c-blue);
  border-radius: var(--r-sm);
  font-size: var(--text-base);
  font-weight: var(--fw-bold);
  color: var(--c-blue);
}

.booth-tools { margin-bottom: var(--sp-6); }
/* 検索欄: 左に虫めがね、薄い灰色の面のピル（よくある検索窓の形）。押すと白地に青い枠 */
.booth-searchbox { position: relative; }
.booth-search-icon {
  position: absolute;
  left: var(--sp-5);
  top: 50%;
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
  color: var(--c-muted);
  pointer-events: none;
}
.booth-search {
  width: 100%;
  min-height: 52px;
  padding: 0 var(--sp-5) 0 calc(var(--sp-5) + 20px + var(--sp-3));
  font: inherit;
  font-size: var(--text-lg); /* 16px 未満だと iOS が入力時に拡大する */
  color: var(--c-ink);
  background: var(--c-surface-2);
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  transition: background 0.2s ease, border-color 0.2s ease;
}
.booth-search::placeholder { color: var(--c-muted); opacity: 0.7; }
.booth-search:focus { outline: none; background: var(--c-bg); border-color: var(--c-blue); }
.booth-searchbox:focus-within .booth-search-icon { color: var(--c-blue); }
.booth-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-3);
}
.booth-chip {
  min-height: 44px;
  padding: 0 var(--sp-5);
  font: inherit;
  font-size: var(--text-base);
  font-weight: var(--fw-semibold);
  color: var(--c-ink);
  background: var(--c-bg);
  border: 1px solid var(--c-line);
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.booth-chip:hover { border-color: var(--c-blue); color: var(--c-blue); }
.booth-chip[aria-pressed="true"] {
  background: var(--c-blue);
  border-color: var(--c-blue);
  color: var(--c-on-accent);
}
.booth-count {
  margin-top: var(--sp-3);
  font-size: var(--text-ms);
  color: var(--c-muted);
}
/* 近い企画を出しているとき。ぴったりではないことが分かるよう青で */
.booth-count.is-near { color: var(--c-blue); font-weight: var(--fw-semibold); }

/* 企画カード: パンフレットのカードと同じ並び。枠や影は付けず、アイコンと文字だけ。
   画面の幅によらず縦に1列（PCで2列に並べるのはやめた） */
.booth-list {
  list-style: none;
  display: grid;
  gap: var(--sp-6);
  margin-top: var(--sp-5);
}
.booth-card {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
}
.booth-card .proj-thumb { width: 76px; }
.booth-card-body { flex: 1; min-width: 0; }
.booth-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--sp-3);
}
.booth-card-title {
  min-width: 0;
  font-size: var(--text-xl);
  font-weight: var(--fw-semibold);
  color: var(--c-ink);
  line-height: 1.35;
  overflow-wrap: anywhere;
}
/* 右上の団体名と場所（パンフと同じく右寄せで2段） */
.booth-card-where {
  flex: none;
  max-width: 48%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  text-align: right;
  font-size: var(--text-sm);
  line-height: 1.4;
}
.booth-card-org { font-weight: var(--fw-semibold); color: var(--c-ink); }
.booth-card-where .proj-room { white-space: normal; text-align: right; }
.booth-card-desc {
  margin-top: var(--sp-2);
  font-size: var(--text-ms);
  line-height: 1.65;
  color: var(--c-text);
}
.booth-card .proj-tags { margin-top: var(--sp-2); }
/* 地図から飛んできたカード。薄い青の面がふわっと消える */
.booth-card { border-radius: var(--r-sm); }
.booth-card.is-flash { animation: booth-flash 1.8s var(--ease); }
@keyframes booth-flash {
  0%, 30% { background: rgba(var(--c-blue-rgb), 0.1); box-shadow: 0 0 0 var(--sp-2) rgba(var(--c-blue-rgb), 0.1); }
  100% { background: transparent; box-shadow: 0 0 0 var(--sp-2) transparent; }
}
@media (prefers-reduced-motion: reduce) {
  .booth-card.is-flash { animation-duration: 0.01s; }
}
@media (min-width: 768px) {
  .booth-list { row-gap: var(--sp-7); }
}

/* 階の見出し＝開閉ボタン。見た目は .block-title と同じ左の青い縦罫＋右端に開閉の印 */
.booth-floor + .booth-floor { margin-top: var(--sp-7); }
.booth-floor-head {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: 44px;
  padding-left: var(--sp-3);
  border-left: 3px solid var(--c-blue);
  list-style: none;
  cursor: pointer;
}
.booth-floor-head::-webkit-details-marker { display: none; }
.booth-floor-name {
  font-size: var(--text-3xl);
  font-weight: var(--fw-bold);
  color: var(--c-ink);
  letter-spacing: 0.02em;
}
.booth-floor-count {
  font-size: var(--text-ms);
  color: var(--c-muted);
}
/* 開閉の印（下向き＝閉じている、上向き＝開いている） */
.booth-floor-head::after {
  content: "";
  margin-left: auto;
  margin-right: var(--sp-2);
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--c-ink);
  border-bottom: 2px solid var(--c-ink);
  transform: translateY(-3px) rotate(45deg);
  transition: transform 0.25s var(--ease);
}
.booth-floor[open] > .booth-floor-head::after { transform: translateY(2px) rotate(-135deg); }
.booth-floor-body { margin-top: var(--sp-4); }

/* フロアのプレビュー。いま表示している企画の部屋だけ青く塗る */
.booth-map {
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--c-bg);
}
.booth-map-svg { display: block; width: 100%; height: auto; }
/* 部屋は塗らない（青く塗ったら気持ち悪かった）。見えない当たり判定で、押すとカードへ飛ぶ */
.booth-map-room { fill: transparent; pointer-events: none; }
.booth-map-room.is-hit { pointer-events: all; cursor: pointer; }
.booth-map-room:focus { outline: none; }
.booth-map-room:focus-visible { stroke: var(--c-blue); stroke-width: 4; }
.booth-map-link {
  display: inline-block;
  margin: var(--sp-2) 0 var(--sp-4);
  font-size: var(--text-ms);
  font-weight: var(--fw-semibold);
  color: var(--c-blue);
  text-decoration: none;
}
.booth-map-link::after { content: " →"; }
.booth-map-link:hover { text-decoration: underline; }
/* 飲食の企画カードの「アレルギー表示を見る」。見た目は地図へのリンクと同じで、下の余白だけ詰める */
.booth-card-allergy { margin: var(--sp-2) 0 0; }

/* --- タイムテーブル (timetable) -------------------------------- */

.tt-day { margin-bottom: var(--sp-2); }
.tt-list {
  list-style: none;
  border-top: 1px solid var(--c-line);
}
.tt-row {
  display: flex;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-1);
  border-bottom: 1px solid var(--c-line);
}
.tt-time {
  flex: none;
  width: 58px;
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: var(--fw-extrabold);
  font-variant-numeric: tabular-nums;
  color: var(--c-blue);
  padding-top: 1px;
}
.tt-title { font-size: var(--text-md); font-weight: var(--fw-semibold); color: var(--c-ink); }
.tt-place { font-size: var(--text-ms); color: var(--c-muted); margin-top: 2px; }

/* --- フロアマップ（assets/maps のフロア別SVGをタブで切替） ---- */

.floor-tabs {
  display: flex;
  align-items: flex-end; /* 選択タブだけ背を高くして手前に見せる */
  position: relative;
  z-index: 1; /* 地図カードの上辺に重ねる */
}
.floor-tab {
  flex: 1 1 0; /* 均等割り。狭い画面では縮む */
  max-width: 84px;
  height: 44px; /* タッチターゲット最小 44px */
  padding: 0 var(--sp-3);
  margin: 0 -1px -1px 0; /* 隣のタブ・地図カードと枠線を共有 */
  border: 1px solid var(--c-line);
  border-bottom: 0;
  border-radius: var(--r-md) var(--r-md) 0 0;
  background: var(--c-surface);
  color: var(--c-muted);
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: var(--fw-bold);
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease),
    border-color 0.2s var(--ease);
}
.floor-tab:hover { background: var(--c-bg); color: var(--c-ink); }
.floor-tab.is-active {
  z-index: 1; /* 隣のタブより手前 */
  height: 50px; /* height はトランジションさせない（切替がバウンドして見える） */
  background: var(--c-blue);
  border-color: var(--c-blue);
  color: var(--c-on-accent);
}
.floor-tabs + .campusmap { border-top-left-radius: 0; }

/* --- 校内マップ + 道案内 (interactive map / wayfinding) -------- */

.map-sample-tag {
  font-family: var(--font-display);
  font-size: var(--text-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.08em;
  color: var(--c-muted);
  background: var(--c-line);
  border-radius: var(--r-pill);
  padding: 2px 9px; /* tag pill shape — kept off-scale on purpose */
  vertical-align: middle;
  margin-left: var(--sp-2);
}

.campusmap {
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  background: var(--c-bg);
  padding: var(--sp-3);
  overflow: hidden;
  touch-action: pan-y; /* 等倍時はページスクロールを妨げない */
  cursor: grab;
}
.campusmap.is-zoomed { touch-action: none; } /* ズーム中は1本指パン・ピンチを地図側で処理 */
.campusmap.is-panning { cursor: grabbing; }
.cm-svg {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-select: none;
}

/* 部屋のタップ領域：フロア図（image）の上に載せる透明オーバーレイ */
.cm-room { cursor: pointer; }
.cm-room-box {
  fill: rgba(var(--c-blue-rgb), 0.001); /* 完全透明だとタップを拾わないブラウザ対策 */
  stroke: transparent;
  stroke-width: 2;
  transition: fill 0.18s ease, stroke 0.18s ease;
}
.cm-room:hover .cm-room-box { stroke: var(--c-blue); }
.cm-room:focus { outline: none; }
.cm-room:focus .cm-room-box { stroke: var(--c-blue); }

.cm-room.is-target .cm-room-box { fill: rgba(var(--c-blue-rgb), 0.24); stroke: var(--c-blue); }
.cm-room.is-origin .cm-room-box { fill: rgba(var(--c-blue-rgb), 0.10); stroke: var(--c-blue); }

.cm-route {
  stroke: var(--c-blue);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.9;
}
.cm-route.is-on {
  /* dasharray/dashoffset は経路の実長に合わせて JS がセットする */
  animation: cm-draw 0.7s var(--ease) forwards;
}
@keyframes cm-draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  .cm-route.is-on { animation: none; stroke-dashoffset: 0 !important; }
}

.cm-stair-marker circle {
  r: calc(var(--sp-2) * 2);
  fill: var(--c-blue);
  stroke: var(--c-on-accent);
  stroke-width: 2;
}
.cm-stair-marker text {
  fill: var(--c-blue);
  font-size: calc(var(--text-xs) * 4);
  font-weight: var(--fw-bold);
  paint-order: stroke;
  stroke: var(--c-bg);
  stroke-width: var(--sp-1);
  stroke-linejoin: round;
}

.cm-floor-guide {
  margin-top: var(--sp-3);
  padding: var(--sp-3);
  border-radius: var(--r-sm);
  background: var(--c-surface);
}
.cm-floor-guide-text {
  color: var(--c-ink);
  font-size: var(--text-base);
  font-weight: var(--fw-semibold);
}

/* info + route panel shown when a room is tapped */
.map-panel {
  margin-top: var(--sp-4);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  padding: var(--sp-5);
}
/* 未選択のとき。パネルは消さず、何をすればいいかをここに出す */
.map-panel-empty {
  font-size: var(--text-md);
  font-weight: var(--fw-semibold);
  color: var(--c-ink);
}
.map-panel-empty-note {
  margin-top: var(--sp-2);
  font-size: var(--text-base);
  color: var(--c-text);
}
.map-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
}
.map-panel-room { font-size: var(--text-xl); font-weight: var(--fw-bold); color: var(--c-ink); }
/* パネル自体は閉じないので「×」は使わない。何が起きるかを文字で書く */
.map-panel-clear {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px; /* タッチターゲット最小 44px */
  font-family: inherit;
  font-size: var(--text-ms);
  font-weight: var(--fw-semibold);
  line-height: 1;
  color: var(--c-text);
  background: none;
  border: 1px solid var(--c-line);
  border-radius: var(--r-pill);
  padding: var(--sp-2) var(--sp-4);
  cursor: pointer;
  transition: border-color 0.18s var(--ease), color 0.18s var(--ease);
}
.map-panel-clear:hover { border-color: var(--c-blue); color: var(--c-blue); }
/* 企画のアイコン＋企画名・団体名を横に並べる */
.map-panel-proj {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-top: var(--sp-3);
}
.map-panel-proj .proj-thumb { width: 64px; }
.map-panel-proj-text { min-width: 0; }
.map-panel-proj-title { font-size: var(--text-md); font-weight: var(--fw-semibold); }
.map-panel-proj-org {
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.06em;
  color: var(--c-blue);
  margin-top: 2px;
}
.map-panel-proj-desc { font-size: var(--text-base); color: var(--c-text); margin-top: var(--sp-2); }

.map-route { margin-top: var(--sp-4); border-top: 1px solid var(--c-line); padding-top: var(--sp-4); }
.map-route-title {
  font-size: var(--text-ms);
  font-weight: var(--fw-semibold);
  color: var(--c-ink);
  margin-bottom: var(--sp-3);
}
.map-route-field {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  font-size: var(--text-ms);
  font-weight: var(--fw-semibold);
  color: var(--c-ink);
}
.map-route-field select {
  font-family: inherit;
  font-size: var(--text-md);
  padding: var(--sp-3) var(--sp-4);
  border: 1px solid var(--c-line);
  border-radius: var(--r-sm);
  background: var(--c-bg);
  color: var(--c-ink);
  appearance: none;
  -webkit-appearance: none;
  /* appearance:none で消えた矢印を描き直す（coaster.css の .rc-select と同じシェブロン）。
     これが無いとセレクトが入力欄に見えてタップできると分からない。 */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232d4390' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--sp-4) center;
  background-size: 18px;
  padding-right: var(--sp-9);
}
.map-route-field select:focus { outline: none; border-color: var(--c-blue); }
.map-route-field select:disabled { opacity: 0.5; cursor: not-allowed; }
.map-route-field + .map-route-field { margin-top: var(--sp-3); }

/* 現在地→目的地。乗換案内と同じ縦並びで、左の罫線と点が2つを1本につなぐ。
   飾りアイコンは置かず、線と点という構造だけで関係を示す。 */
.map-route-od {
  display: grid;
  gap: var(--sp-5);
  padding-left: var(--sp-6);
  position: relative;
}
.map-route-leg { position: relative; }
/* 現在地の点から目的地の点までを結ぶ縦線。現在地側から伸ばし、grid の隙間(--sp-5)を
   またいで目的地の点の中心でちょうど止める。目的地の点より下に線を残さない。 */
.map-route-leg--from::after {
  content: "";
  position: absolute;
  left: calc(var(--sp-6) * -1 + 4px);
  top: calc(0.45em + 9px);
  bottom: calc((var(--sp-5) + 0.45em + 4px) * -1);
  width: 1px;
  background: var(--c-line);
}
.map-route-leg::before {
  content: "";
  position: absolute;
  left: calc(var(--sp-6) * -1);
  top: 0.45em;
  width: 9px;
  height: 9px;
  border-radius: var(--r-pill);
  border: 1px solid var(--c-blue);
  background: var(--c-bg);
}
.map-route-leg--to::before { background: var(--c-blue); }
.map-route-leg-head {
  font-size: var(--text-ms);
  font-weight: var(--fw-semibold);
  color: var(--c-blue);
}
.map-route-leg-name {
  margin-top: var(--sp-1);
  font-size: var(--text-md);
  font-weight: var(--fw-semibold);
  color: var(--c-ink);
}
.map-route-leg .map-route-field { margin-top: var(--sp-3); }

/* 選択を確定してから経路を描く。選択の途中で地図が動かないようにするため */
.map-route-go {
  /* ラベル2枚を同じマスに重ねて入れ替える */
  display: grid;
  width: 100%;
  margin-top: var(--sp-5);
  font-family: var(--font-ja);
  font-size: var(--text-md);
  font-weight: var(--fw-bold);
  line-height: 1;
  padding: var(--sp-4) var(--sp-6);
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  background: var(--c-blue);
  color: var(--c-on-accent);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: background-color 0.32s var(--ease), filter 0.18s var(--ease);
}
.map-route-go:disabled { opacity: 0.45; cursor: not-allowed; }
.map-route-go:not(:disabled):hover { filter: brightness(0.92); }

/* 表示済み。押した瞬間に緑へ変わる。ラベルは演出なしで素直に入れ替える。
   2枚を重ねたままにしているのは、長い方の文字幅でボタン幅を固定して
   押した瞬間に横幅が動かないようにするため。 */
.map-route-go.is-done { background: var(--c-success); }
.map-route-go-label { grid-area: 1 / 1; }
.map-route-go-label--done,
.map-route-go.is-done .map-route-go-label { visibility: hidden; }
.map-route-go.is-done .map-route-go-label--done { visibility: visible; }
@media (prefers-reduced-motion: reduce) {
  .map-route-go { transition: none; }
}

/* 経路が引けなかったときだけ出る。成功時は出発／到着の表示で足りるので空にする */
.map-route-result {
  margin-top: var(--sp-3);
  font-size: var(--text-base);
  color: var(--c-blue);
}
.map-route-result:empty { margin-top: 0; }

/* --- テーマ＆ロゴ (theme) -------------------------------------- */

/* short, larger lead sentence that opens a section */
.theme-statement {
  font-size: var(--text-2xl);
  font-weight: var(--fw-semibold);
  line-height: 1.7;
  color: var(--c-ink);
  margin-bottom: var(--sp-4);
}
.theme-statement .em { color: var(--c-blue); }

/* body paragraphs */
.theme-body p {
  font-size: var(--text-md);
  color: var(--c-text);
  margin-bottom: var(--sp-3);
}
.theme-body p:last-child { margin-bottom: 0; }

/* --- アーカイブ (archive) — 過去年へのリンクカード ------------- */

.archive-list {
  list-style: none;
  display: grid;
  gap: var(--sp-4);
}

.archive-card {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  padding: var(--sp-5);
  background: var(--c-bg);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-soft);
  text-decoration: none;
  transition: box-shadow 0.18s ease;
}
.archive-card:hover {
  box-shadow: var(--shadow-pop);
}

.archive-year {
  flex: none;
  font-family: var(--font-display);
  font-size: var(--text-hero-unit);
  font-weight: var(--fw-black);
  letter-spacing: 0.01em;
  color: var(--c-blue);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.archive-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.archive-name {
  font-size: var(--text-lg);
  font-weight: var(--fw-bold);
  color: var(--c-ink);
}
.archive-meta {
  font-size: var(--text-sm);
  color: var(--c-muted);
}

.archive-go {
  flex: none;
  font-size: var(--text-2xl);
  font-weight: var(--fw-bold);
  color: var(--c-blue);
  line-height: 1;
}

@media (min-width: 768px) {
  .access-ways { grid-template-columns: 1fr 1fr; }

  .proj-card { gap: var(--sp-5); padding: var(--sp-5); }
  .proj-thumb { width: 120px; }
  .proj-body { padding-left: var(--sp-5); }
  .proj-name { font-size: var(--text-3xl); }

}

/* --- ブログ (blog) ---------------------------------------------- */
/* 一覧から記事を選んで開く（js/blog.js）。一覧は縦に1列、お知らせと同じく罫線1本で
   区切る。見出し画像のある記事だけ、右に小さく添える */
.blog-list { list-style: none; }
.blog-item {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding-block: var(--sp-5);
  border-bottom: 1px solid var(--c-line);
  color: inherit;
  text-decoration: none;
}
.blog-list li:first-child .blog-item { padding-top: 0; }
.blog-item-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}
.blog-item-title {
  font-size: var(--text-lg);
  font-weight: var(--fw-bold);
  color: var(--c-ink);
  line-height: 1.5;
  transition: color 0.25s ease;
}
.blog-item:hover .blog-item-title { color: var(--c-blue); }
.blog-item-excerpt {
  font-size: var(--text-ms);
  color: var(--c-muted);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
/* 見出し画像と同じ横長（1280×670） */
.blog-item-thumb {
  flex: none;
  width: 120px;
  aspect-ratio: 1280 / 670;
  object-fit: cover;
  border-radius: var(--r-sm);
}
.blog-date {
  font-family: var(--font-en);
  font-size: var(--text-ms);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.06em;
  color: var(--c-blue);
}

/* 記事を開いているとき */
.blog-reading .page-hero { display: none; }
.blog-reading .blog { padding-top: var(--header-h); }
.blog-back {
  display: inline-block;
  font-size: var(--text-ms);
  font-weight: var(--fw-semibold);
  color: var(--c-blue);
  text-decoration: none;
}
.blog-back::before { content: "← "; }
.blog-back:hover { text-decoration: underline; }
.blog-article {
  margin-block: var(--sp-6) var(--sp-8);
  padding-bottom: var(--sp-8);
  border-bottom: 1px solid var(--c-line);
}
.blog-article-title {
  margin-top: var(--sp-2);
  font-size: var(--text-title);
  font-weight: var(--fw-extrabold);
  color: var(--c-ink);
  line-height: 1.3;
}
.blog-cover {
  display: block;
  width: 100%;
  margin-top: var(--sp-6);
  border-radius: var(--r-md);
}
.blog-body { margin-top: var(--sp-6); font-size: var(--text-md); }
.blog-body > * + * { margin-top: var(--sp-4); }
.blog-body h2 {
  margin-top: var(--sp-8);
  font-size: var(--text-2xl);
  font-weight: var(--fw-bold);
  color: var(--c-ink);
}
.blog-body img { display: block; border-radius: var(--r-sm); }

@media (min-width: 768px) {
  .blog-item-thumb { width: 168px; }
}
