/* ============================================
   みつかる通信制 - Stylesheet
   コンセプト:鮮やかアクセント / Z世代向け / モバイルファースト
   ============================================ */

/* === Variables === */
:root {
  /* Colors - Vivid Pop Palette */
  --color-bg: #FFFAF0;
  --color-surface: #FFFFFF;
  --color-text: #1A1A2E;
  --color-text-sub: #6B6B7B;
  --color-border: #E8E8F0;

  /* Accent - 鮮やかなコーラル + ターコイズ */
  --color-primary: #FF5252;
  --color-primary-dark: #E63946;
  --color-secondary: #2EC4B6;
  --color-tertiary: #FFD23F;
  --color-quaternary: #7209B7;

  /* Tag Colors */
  --tag-public: #2EC4B6;
  --tag-private: #FF5252;
  --tag-corp: #7209B7;

  /* Effects */
  --shadow-sm: 0 2px 8px rgba(26, 26, 46, 0.06);
  --shadow-md: 0 8px 24px rgba(26, 26, 46, 0.08);
  --shadow-lg: 0 20px 60px rgba(26, 26, 46, 0.12);
  --shadow-pop: 4px 4px 0 var(--color-text);

  /* Layout */
  --container: 1080px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 9999px;

  /* Typography */
  --font-display: "Outfit", "Zen Kaku Gothic New", sans-serif;
  --font-body: "Zen Kaku Gothic New", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-accent: "DotGothic16", monospace;
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

/* WordPress等での干渉に対する保険:hidden属性を確実に効かせる */
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select { font-family: inherit; }
a { color: inherit; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* === 背景装飾 === */
.bg-decoration {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  animation: float 20s ease-in-out infinite;
}
.blob-1 {
  width: 500px; height: 500px;
  background: var(--color-primary);
  top: -200px; left: -150px;
}
.blob-2 {
  width: 400px; height: 400px;
  background: var(--color-secondary);
  top: 30%; right: -150px;
  animation-delay: -7s;
}
.blob-3 {
  width: 350px; height: 350px;
  background: var(--color-tertiary);
  bottom: -100px; left: 30%;
  animation-delay: -14s;
}
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}
.grid-pattern {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(26,26,46,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26,26,46,.03) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* z-indexの土台 */
.site-header, .hero, .results-section, .site-footer { position: relative; z-index: 1; }

/* === Header === */
.site-header {
  padding: 20px 0;
  border-bottom: 1px solid var(--color-border);
  background: rgba(255, 250, 240, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
  transition: padding 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}
/* スクロール時のコンパクトヘッダー */
.site-header.is-scrolled {
  padding: 8px 0;
  background: rgba(255, 250, 240, 0.95);
  box-shadow: 0 2px 12px rgba(26, 26, 46, 0.08);
}
.site-header.is-scrolled .logo-mark {
  width: 28px;
  height: 28px;
  font-size: 14px;
}
.site-header.is-scrolled .logo {
  font-size: 16px;
}
.site-header.is-scrolled .logo-row {
  gap: 8px;
}
/* スクロール時はタグライン非表示(余分な行を取らない) */
.site-header.is-scrolled .logo-tagline {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin-top: 0;
  padding: 0;
}
.logo-tagline {
  transition: max-height 0.25s ease, opacity 0.2s ease, margin-top 0.25s ease;
  max-height: 20px;
}
/* スクロール時はAboutボタンも軽量化 */
.site-header.is-scrolled .header-about-btn {
  padding: 5px 10px;
  font-size: 11px;
  box-shadow: 1px 1px 0 var(--color-text);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--color-text);
}
.logo-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 18px;
  transform: rotate(-8deg);
  box-shadow: var(--shadow-pop);
  transition: transform 0.3s;
}
.logo:hover .logo-mark { transform: rotate(0deg) scale(1.1); }
.logo-text { line-height: 1; white-space: nowrap; }
.logo-num {
  color: var(--color-primary);
  font-family: var(--font-display);
  font-weight: 900;
}
.logo-accent {
  color: var(--color-primary);
  font-weight: 900;
}
.logo-tagline {
  /* ロゴマーク幅(36px) + gap(10px) = 46px 分インデントしてテキストと揃える */
  margin-left: 46px;
  font-family: var(--font-base);
  font-weight: 600;
  font-size: 11px;
  color: var(--color-text-sub);
  letter-spacing: 0.02em;
  line-height: 1.3;
  white-space: nowrap;
  transition: color 0.2s;
}
.logo-tagline-em {
  color: var(--color-primary);
  font-weight: 700;
}
.logo:hover .logo-tagline {
  color: var(--color-text);
}
.meta-pill {
  display: inline-block;
  padding: 6px 14px;
  background: var(--color-text);
  color: #fff;
  border-radius: var(--radius-pill);
  font-family: var(--font-accent);
  font-size: 13px;
  letter-spacing: 0.05em;
}

/* ヘッダー右側の「このサイトについて」ボタン */
.header-about-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: var(--color-tertiary);
  color: var(--color-text);
  border: 2px solid var(--color-text);
  border-radius: var(--radius-pill);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 2px 2px 0 var(--color-text);
  transition: transform 0.15s, box-shadow 0.15s;
}
.header-about-btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--color-text);
}
.header-about-btn:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 var(--color-text);
}
.header-about-icon {
  font-size: 14px;
  line-height: 1;
}
.header-about-text-pc {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.header-about-arrow {
  font-size: 12px;
  font-weight: 900;
  animation: aboutArrowBounce 1.8s ease-in-out infinite;
}
@keyframes aboutArrowBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(2px); }
}
@media (prefers-reduced-motion: reduce) {
  .header-about-arrow { animation: none; }
}

/* === Hero === */
.hero {
  padding: 60px 0 40px;
}
.hero-content {
  text-align: center;
  margin-bottom: 40px;
}
.hero-eyebrow {
  display: inline-block;
  padding: 6px 16px;
  background: var(--color-text);
  color: var(--color-tertiary);
  border-radius: var(--radius-pill);
  font-family: var(--font-accent);
  font-size: 12px;
  letter-spacing: 0.1em;
  margin-bottom: 24px;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(32px, 6vw, 56px);
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin: 0 0 20px;
}
.hero-highlight {
  position: relative;
  display: inline-block;
  color: var(--color-primary);
}
.hero-highlight::after {
  content: '';
  position: absolute;
  left: -4px; right: -4px;
  bottom: 4px;
  height: 12px;
  background: var(--color-tertiary);
  z-index: -1;
  transform: skewX(-8deg);
}
.hero-lead {
  color: var(--color-text-sub);
  font-size: 15px;
  margin: 0;
}

/* === Search Box === */
.search-box {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}
.search-input-wrap {
  flex: 1;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  background: var(--color-surface);
  border: 3px solid var(--color-text);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-pop);
  transition: transform 0.15s, box-shadow 0.15s;
}
.search-input-wrap:focus-within {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--color-text);
}
.search-icon {
  width: 22px;
  height: 22px;
  margin: 0 12px 0 18px;
  color: var(--color-text);
  flex-shrink: 0;
}
.search-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 18px 16px 18px 0;
  background: transparent;
  font-size: 16px;
  font-weight: 500;
  color: var(--color-text);
  width: 100%;
  min-width: 0;
}
.search-input::placeholder { color: var(--color-text-sub); }
.clear-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--color-border);
  color: var(--color-text);
  flex-shrink: 0;
  transition: background 0.2s;
}
.clear-btn:hover { background: var(--color-text); color: #fff; }

.filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 24px;
  background: var(--color-text);
  color: #fff;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 15px;
  border: 3px solid var(--color-text);
  box-shadow: var(--shadow-pop);
  position: relative;
  transition: transform 0.15s, box-shadow 0.15s;
}
.filter-toggle:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--color-primary);
}
.filter-toggle[aria-expanded="true"] {
  background: var(--color-primary);
  border-color: var(--color-text);
}
.filter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  background: var(--color-tertiary);
  color: var(--color-text);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 900;
  margin-left: 4px;
}

/* === 検索の注意書き === */
.search-notes {
  max-width: 760px;
  margin: 16px auto 0;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.6);
  border: 1.5px dashed var(--color-text);
  border-radius: var(--radius-md);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}.search-notes-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--color-text);
  margin: 0 0 6px;
}
.search-notes-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.search-notes-list li {
  position: relative;
  padding-left: 16px;
  font-size: 12px;
  line-height: 1.7;
  color: var(--color-text-sub);
  margin-bottom: 2px;
}
.search-notes-list li::before {
  content: "※";
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: 700;
}
.search-notes-list li:last-child {
  margin-bottom: 0;
}
.search-notes-list strong {
  color: var(--color-text);
  font-weight: 700;
}
.search-notes-list a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.search-notes-list a:hover {
  text-decoration-thickness: 2px;
}

/* === Filter Panel === */
.filter-panel {
  background: var(--color-surface);
  border: 3px solid var(--color-text);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-top: 12px;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  box-shadow: var(--shadow-pop);
  animation: slideDown 0.3s ease-out;
}

/* 連携施設を含むチェックボックス */
.filter-include-row {
  padding: 14px 16px;
  margin-bottom: 18px;
  background: linear-gradient(135deg, rgba(46, 196, 182, 0.08), rgba(255, 210, 63, 0.08));
  border: 2px dashed var(--color-secondary);
  border-radius: var(--radius-md);
}
.filter-include-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
}
.filter-include-check {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--color-secondary);
  flex-shrink: 0;
}
.filter-include-text {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
}
.filter-include-desc {
  font-size: 11.5px;
  color: var(--color-text-sub);
  margin: 6px 0 0 30px;
  line-height: 1.5;
}

/* 結果数の「+」表示 */
.count-plus {
  font-family: var(--font-display);
  color: var(--color-secondary);
  font-weight: 900;
  margin: 0 6px;
}

/* 連携施設タグ */
.tag-facility-meeting {
  background: var(--color-secondary);
  color: #fff;
}
.tag-facility-support {
  background: var(--color-quaternary);
  color: #fff;
}
.tag-partner-badge {
  background: var(--color-tertiary);
  color: var(--color-text);
}

/* 連携施設カード */
.result-card-partner {
  border-color: var(--color-secondary);
}
.result-card-partner:hover {
  box-shadow: 8px 8px 0 var(--color-secondary);
}
.card-header-partner {
  background: rgba(46, 196, 182, 0.06);
  border-bottom-color: var(--color-secondary);
}
.card-partner-parent {
  font-size: 11px;
  color: var(--color-text-sub);
  margin: 6px 0 0;
}
.card-partner-parent strong {
  color: var(--color-text);
  font-weight: 700;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}
.filter-group-wide { grid-column: 1 / -1; }
.filter-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-sub);
  margin: 0 0 10px;
}
.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  background: var(--color-bg);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text);
  transition: all 0.15s;
}
.chip:hover {
  border-color: var(--color-text);
  transform: translateY(-1px);
}
.chip.active {
  background: var(--color-text);
  color: var(--color-tertiary);
  border-color: var(--color-text);
}
.chip-group-pref .chip { font-size: 12px; padding: 6px 11px; }

.filter-actions {
  margin-top: 24px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  border-top: 2px dashed var(--color-border);
  padding-top: 20px;
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 14px;
  transition: all 0.15s;
  text-decoration: none;
  border: 2px solid transparent;
}
.btn-primary {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-text);
  box-shadow: var(--shadow-pop);
}
.btn-primary:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--color-text);
}
.btn-ghost {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}
.btn-ghost:hover {
  border-color: var(--color-text);
  background: var(--color-bg);
}

/* === Results === */
.results-section { padding: 20px 0 80px; }
.results-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.results-count {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 28px;
  margin: 0;
  letter-spacing: -0.02em;
}
.results-count #resultCount { color: var(--color-primary); }
.count-unit {
  font-size: 16px;
  color: var(--color-text-sub);
  margin-left: 4px;
}
.sort-select {
  padding: 8px 14px;
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
}

/* === ダウンロードボタン === */
.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--color-tertiary);
  color: var(--color-text);
  border: 2px solid var(--color-text);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--color-text);
  transition: transform 0.15s, box-shadow 0.15s;
}
.download-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--color-text);
}

.results-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

/* === ダウンロードモーダル === */
.modal-panel-download {
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}
.download-modal-body {
  padding: 32px 28px 24px;
}
.download-modal-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 22px;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.download-modal-lead {
  font-size: 14px;
  color: var(--color-text-sub);
  margin: 0 0 22px;
}
.download-modal-lead strong {
  font-family: var(--font-display);
  color: var(--color-primary);
  font-size: 18px;
  margin: 0 4px;
}

.download-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}
.download-option {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  background: var(--color-bg);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s;
}
.download-option:hover {
  border-color: var(--color-text);
}
.download-option input[type="radio"] {
  margin-top: 2px;
  cursor: pointer;
  accent-color: var(--color-primary);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.download-option input[type="radio"]:checked + .download-option-content .download-option-title {
  color: var(--color-primary);
}
.download-option:has(input[type="radio"]:checked) {
  border-color: var(--color-primary);
  background: rgba(255, 82, 82, 0.06);
}
.download-option-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.download-option-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--color-text);
}
.download-option-desc {
  font-size: 12px;
  color: var(--color-text-sub);
  line-height: 1.5;
}

.download-notice {
  background: rgba(46, 196, 182, 0.08);
  border: 1px dashed var(--color-secondary);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 22px;
}
.download-notice p {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--color-text-sub);
}
.download-notice a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.download-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.download-modal-actions .btn {
  padding: 10px 20px;
  font-size: 14px;
}

/* === Results Block (本校・連携施設) === */
.results-block {
  margin-bottom: 40px;
}
.results-block-label {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  padding: 4px 12px;
  margin-right: 8px;
  background: var(--color-text);
  color: var(--color-tertiary);
  border-radius: var(--radius-pill);
  vertical-align: middle;
  letter-spacing: 0.05em;
}

/* 連携施設セクション全体 */
.facilities-block {
  margin-top: 40px;
}

/* 折りたたみトグルボタン */
.facilities-toggle {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 18px 22px;
  background: var(--color-surface);
  border: 3px solid var(--color-text);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-pop);
  text-align: left;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.facilities-toggle:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--color-secondary);
}
.facilities-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--color-secondary);
  color: #fff;
  border-radius: 50%;
  border: 2px solid var(--color-text);
  flex-shrink: 0;
  transition: transform 0.3s ease;
}
.facilities-toggle.expanded .facilities-toggle-icon {
  transform: rotate(180deg);
  background: var(--color-primary);
}
.facilities-toggle-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}
.facilities-toggle-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--color-text);
}
.facilities-toggle-sub {
  font-size: 12px;
  color: var(--color-text-sub);
  line-height: 1.5;
}

/* 折りたたみコンテンツ */
.facilities-content {
  margin-top: 20px;
  animation: facilitiesExpand 0.3s ease-out;
}
@keyframes facilitiesExpand {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* サブフィルタ */
.facilities-subfilter {
  background: rgba(46, 196, 182, 0.06);
  border: 2px dashed var(--color-secondary);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 24px;
}
.facilities-subfilter-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--color-text);
  margin: 0 0 10px;
  letter-spacing: 0.03em;
}
.facilities-subfilter-actions {
  margin-top: 12px;
  text-align: right;
}
.btn-link-small {
  background: transparent;
  border: none;
  color: var(--color-text-sub);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.btn-link-small:hover {
  color: var(--color-text);
}

/* 連携施設カード固有スタイル */
.result-card-facility .card-header {
  background: rgba(46, 196, 182, 0.08);
}
.card-facility-school {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--color-text-sub);
  line-height: 1.5;
}
.card-facility-school-label {
  font-weight: 700;
  margin-right: 4px;
}
.card-facility-school-name {
  color: var(--color-text);
  font-weight: 600;
}
.card-link-school {
  background: var(--color-tertiary);
  border: 1.5px solid var(--color-text);
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.card-link-school:hover {
  background: var(--color-text);
  color: var(--color-tertiary);
}

/* 施設区分タグの色 */
.tag-facility-meeting {
  background: var(--color-secondary);
  color: #fff;
}
.tag-facility-support {
  background: var(--color-quaternary);
  color: #fff;
}

/* 小さめのダウンロードボタン(下段用) */
.download-btn-sub {
  padding: 6px 12px;
  font-size: 12px;
}

/* === Result Cards === */
.result-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

/* FLIP移動中のカードを最前面に */
.card-moving {
  z-index: 10;
  pointer-events: none;
}

/* カード入場アニメーション(新規追加されたカード用) */
@keyframes cardEnter {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.card-enter {
  animation: cardEnter 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* prefers-reduced-motion対応:アニメーション抑制 */
@media (prefers-reduced-motion: reduce) {
  .card-enter,
  .card-moving {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
}

.result-card {
  background: var(--color-surface);
  border: 3px solid var(--color-text);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-pop);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}
.result-card:hover {
  transform: translate(-4px, -4px);
  box-shadow: 8px 8px 0 var(--color-primary);
}
.card-header {
  padding: 18px 20px 12px;
  background: var(--color-bg);
  border-bottom: 2px solid var(--color-text);
}
.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.card-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  border: 1.5px solid var(--color-text);
}
.tag-public { background: var(--tag-public); color: #fff; }
.tag-private { background: var(--tag-private); color: #fff; }
.tag-corp { background: var(--tag-corp); color: #fff; }
.tag-default { background: var(--color-text); color: #fff; }
.tag-area { background: var(--color-tertiary); color: var(--color-text); }
.card-name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 18px;
  margin: 0;
  line-height: 1.4;
  letter-spacing: -0.01em;
}
.card-name-note {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-sub);
  margin-top: 4px;
}
.card-body {
  padding: 16px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.card-info-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
  line-height: 1.6;
}
.card-info-icon {
  font-size: 14px;
  flex-shrink: 0;
  width: 18px;
  text-align: center;
  /* baseline揃え時にアイコンが少し上に来るので微調整 */
  position: relative;
  top: 1px;
}
.card-info-label {
  color: var(--color-text-sub);
  flex-shrink: 0;
  width: 60px;
  font-weight: 600;
  font-size: 12px;
}
.card-info-value {
  flex: 1;
  word-break: break-word;
  line-height: 1.6;
}

/* マップリンク(カード用) */
.map-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-left: 6px;
  background: var(--color-secondary);
  border: 1.5px solid var(--color-text);
  border-radius: 50%;
  font-size: 11px;
  text-decoration: none;
  vertical-align: middle;
  transition: transform 0.15s, background 0.15s;
}
.map-link:hover {
  transform: scale(1.15) rotate(-8deg);
  background: var(--color-tertiary);
}

/* マップリンク(モーダル内) */
.map-link-modal {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 8px;
  padding: 3px 10px;
  background: var(--color-secondary);
  color: #fff;
  border: 1.5px solid var(--color-text);
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.15s;
}
.map-link-modal:hover {
  background: var(--color-tertiary);
  color: var(--color-text);
  transform: translateY(-1px);
}
.card-stats {
  display: flex;
  gap: 16px;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px dashed var(--color-border);
}
.card-stat {
  flex: 1;
}
.card-stat-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: var(--color-text-sub);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.card-stat-value {
  display: block;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 18px;
  color: var(--color-primary);
  margin-top: 2px;
}
.card-stat-value-sub {
  font-size: 11px;
  color: var(--color-text-sub);
  font-weight: 500;
  margin-left: 2px;
}
.card-actions {
  padding: 12px 20px 16px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.card-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: var(--color-bg);
  border: 1.5px solid var(--color-text);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  color: var(--color-text);
  transition: all 0.15s;
}
.card-link:hover {
  background: var(--color-text);
  color: var(--color-tertiary);
}
.card-link.disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* === Loading / No Results === */
.loading {
  text-align: center;
  padding: 80px 20px;
  color: var(--color-text-sub);
}
.loading-spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 20px;
  border: 4px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.no-results {
  text-align: center;
  padding: 80px 20px;
  background: var(--color-surface);
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-lg);
}
.no-results-emoji { font-size: 56px; margin-bottom: 16px; }
.no-results-icon {
  display: inline-block;
  margin-bottom: 16px;
  animation: noResultsBob 3s ease-in-out infinite;
}
@keyframes noResultsBob {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-6px) rotate(3deg); }
}
@media (prefers-reduced-motion: reduce) {
  .no-results-icon { animation: none; }
}
.no-results-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  margin: 0 0 8px;
}
.no-results-sub {
  color: var(--color-text-sub);
  margin: 0;
  font-size: 14px;
}

/* === Load More === */
.load-more-wrap {
  text-align: center;
  margin-top: 40px;
}
.load-more {
  padding: 16px 40px;
  font-size: 16px;
}
.load-more-count {
  font-family: var(--font-accent);
  font-size: 12px;
  opacity: 0.8;
  margin-left: 4px;
}

/* === Modal === */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: modalFadeIn 0.2s ease-out;
}
@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(26, 26, 46, 0.6);
  backdrop-filter: blur(4px);
}
.modal-panel {
  position: relative;
  background: var(--color-surface);
  border: 3px solid var(--color-text);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pop);
  max-width: 640px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modalSlideUp 0.3s ease-out;
}
@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
/* 閉じるアニメーション */
.modal.is-closing {
  animation: modalFadeOut 0.25s ease-in forwards;
}
.modal.is-closing .modal-panel {
  animation: modalSlideDown 0.25s ease-in forwards;
}
@keyframes modalFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}
@keyframes modalSlideDown {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(20px); }
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
  border: 2px solid var(--color-text);
  border-radius: 50%;
  z-index: 1;
  transition: transform 0.2s;
}
.modal-close:hover { transform: rotate(90deg); }
.modal-body {
  padding: 32px 24px 24px;
  overflow-y: auto;
  flex: 1;
}
.modal-school-name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 24px;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
}
.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}
.modal-section {
  margin-bottom: 24px;
}
.modal-section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-sub);
  margin: 0 0 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--color-text);
}
.modal-info-grid {
  display: grid;
  gap: 10px;
}
.modal-info-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  font-size: 14px;
  align-items: start;
}
.modal-info-row dt {
  font-weight: 700;
  color: var(--color-text-sub);
  font-size: 12px;
}
.modal-info-row dd { margin: 0; word-break: break-word; }
.modal-partners {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.modal-partner {
  background: var(--color-bg);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 14px;
}
.modal-partner-name {
  font-weight: 700;
  font-size: 15px;
  margin: 0 0 4px;
}
.modal-partner-meta {
  font-size: 12px;
  color: var(--color-text-sub);
  margin: 0;
}
.modal-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 2px dashed var(--color-border);
}

/* === Footer === */
.site-footer {
  background: var(--color-text);
  color: rgba(255,255,255,0.85);
  padding: 50px 0 30px;
  margin-top: 60px;
}

.footer-purpose {
  background: linear-gradient(135deg, rgba(255, 82, 82, 0.12), rgba(46, 196, 182, 0.12));
  border: 2px solid rgba(255, 210, 63, 0.4);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 24px;
  scroll-margin-top: 80px;
}
/* ジャンプ時に一瞬ハイライトする演出 */
.footer-purpose:target {
  animation: aboutHighlight 1.8s ease-out;
}
@keyframes aboutHighlight {
  0% { box-shadow: 0 0 0 0 rgba(255, 210, 63, 0.8); }
  30% { box-shadow: 0 0 0 8px rgba(255, 210, 63, 0.5); }
  100% { box-shadow: 0 0 0 0 rgba(255, 210, 63, 0); }
}
.purpose-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.05em;
  color: var(--color-tertiary);
  margin: 0 0 12px;
}
.purpose-text {
  font-size: 13.5px;
  line-height: 1.8;
  margin: 0 0 10px;
  color: rgba(255,255,255,0.92);
}
.purpose-text:last-child { margin-bottom: 0; }
.purpose-text strong {
  color: var(--color-tertiary);
  font-weight: 700;
}
.purpose-text a {
  color: var(--color-tertiary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-attribution {
  background: rgba(255,255,255,0.05);
  border: 1px dashed rgba(255,255,255,0.2);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 30px;
}
.attribution-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.05em;
  color: var(--color-tertiary);
  margin: 0 0 12px;
}
.attribution-text {
  font-size: 13px;
  line-height: 1.8;
  margin: 0 0 10px;
}
.attribution-text:last-of-type { margin-bottom: 16px; }
.attribution-text a {
  color: var(--color-tertiary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.attribution-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed rgba(255,255,255,0.15);
}
.attr-link {
  display: inline-block;
  font-size: 12px;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  transition: color 0.15s, transform 0.15s;
  padding: 4px 0;
}
.attr-link:hover {
  color: var(--color-tertiary);
  transform: translateX(4px);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.footer-bottom-left p { margin: 0; }
.footer-company {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  font-weight: 500;
}
.footer-company-link {
  color: var(--color-tertiary);
  text-decoration: none;
  font-weight: 700;
  transition: color 0.15s, text-decoration 0.15s;
  display: inline-flex;
  align-items: center;
}
.footer-company-link:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer-note {
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  margin-top: 4px !important;
}

/* purpose内のぱんぷきんラボリンク */
.purpose-link {
  font-weight: 700;
  color: var(--color-tertiary) !important;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s;
}
.purpose-link:hover {
  color: #fff !important;
}

/* === Tooltip === */
.has-tooltip {
  position: relative;
  cursor: help;
}
.tooltip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  margin-left: 4px;
  background: rgba(255,255,255,0.4);
  color: inherit;
  border-radius: 50%;
  font-size: 9px;
  font-weight: 900;
  font-family: var(--font-display);
  vertical-align: middle;
}
.tooltip-icon-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 13px;
  height: 13px;
  margin-left: 3px;
  background: var(--color-secondary);
  color: #fff;
  border-radius: 50%;
  font-size: 8px;
  font-weight: 900;
  vertical-align: middle;
  cursor: help;
}
.info-tooltip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-left: 6px;
  background: var(--color-secondary);
  color: #fff;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 900;
  cursor: help;
  vertical-align: middle;
}

.tooltip-popup {
  position: absolute;
  z-index: 2000;
  max-width: 280px;
  padding: 10px 14px;
  background: var(--color-text);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 12px;
  line-height: 1.6;
  font-weight: 500;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  pointer-events: none;
  animation: tooltipFadeIn 0.15s ease-out;
}
.tooltip-popup::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  margin-left: -6px;
  border: 6px solid transparent;
  border-top-color: var(--color-text);
  border-bottom: 0;
}
.tooltip-popup.tooltip-below::after {
  bottom: auto;
  top: -6px;
  border-top: 0;
  border-bottom: 6px solid var(--color-text);
}
@keyframes tooltipFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === Map Modal === */
.modal-panel-map {
  max-width: 800px;
  width: 100%;
  height: 90vh;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.map-modal-header {
  flex-shrink: 0;
  padding: 24px 56px 16px 24px;
  border-bottom: 2px solid var(--color-border);
}
.map-modal-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 18px;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}
.map-modal-address {
  font-size: 13px;
  color: var(--color-text-sub);
  margin: 0;
  word-break: break-all;
}
.map-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  background: var(--color-bg);
  position: relative;
  overflow: hidden;
}
.map-modal-body iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
.map-modal-footer {
  flex-shrink: 0;
  padding: 16px 24px;
  border-top: 1px solid var(--color-border);
  text-align: center;
}
.map-modal-open-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--color-secondary);
  color: #fff;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  border: 2px solid var(--color-text);
  box-shadow: 3px 3px 0 var(--color-text);
  transition: transform 0.15s, box-shadow 0.15s;
}
.map-modal-open-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--color-text);
}

/* === ボタン化したマップリンクをaタグ風に見せる === */
button.map-link,
button.map-link-modal {
  cursor: pointer;
  font-family: inherit;
}
button.map-link {
  background: var(--color-secondary);
  border: 1.5px solid var(--color-text);
  border-radius: 50%;
  font-size: 11px;
}

/* === Mobile Optimization === */
  .hero { padding: 30px 0 30px; }
  .hero-title { font-size: 28px; }
  .hero-lead br { display: none; }
  .search-box {
    flex-direction: column;
  }
  .filter-toggle {
    width: 100%;
    padding: 14px 24px;
  }
  .search-input { padding: 16px 12px 16px 0; font-size: 15px; }
  .search-icon { margin-left: 14px; }
  .filter-panel { padding: 18px; }
  .filter-grid { grid-template-columns: 1fr; gap: 16px; }
  .search-notes { padding: 12px 14px; margin-top: 12px; }
  .search-notes-title { font-size: 11px; }
  .search-notes-list li { font-size: 11px; line-height: 1.6; }
  .results-count { font-size: 22px; }
  .results-count .count-unit { font-size: 14px; }
  .download-btn-label { display: none; }
  .download-btn { padding: 8px 12px; }
  .download-modal-body { padding: 26px 20px 18px; }
  .download-modal-title { font-size: 18px; }
  .download-modal-lead { font-size: 13px; }
  .download-option { padding: 12px 14px; }
  .download-modal-actions { flex-direction: column-reverse; gap: 8px; }
  .download-modal-actions .btn { width: 100%; }
  .result-list { grid-template-columns: 1fr; gap: 14px; }
  .card-name { font-size: 16px; }
  .modal-panel { max-height: 95vh; }
  .modal-body { padding: 28px 18px 18px; }
  .modal-school-name { font-size: 20px; }
  .modal-info-row { grid-template-columns: 90px 1fr; gap: 8px; font-size: 13px; }
  .footer-bottom { justify-content: center; text-align: center; }
  .footer-purpose { padding: 18px; }
  .footer-attribution { padding: 18px; }
  .purpose-text, .attribution-text { font-size: 12.5px; }

  /* マップモーダルをモバイル全画面に近づける */
  .modal-panel-map {
    height: 95vh;
    max-height: 95vh;
  }
  .map-modal-header {
    padding: 22px 50px 12px 18px;
  }
  .map-modal-title { font-size: 16px; }
  .map-modal-address { font-size: 12px; }
  .map-modal-footer { padding: 12px 18px; }
  .map-modal-open-btn { font-size: 12px; padding: 9px 16px; }

  /* ツールチップをモバイルでは少し大きく */
  .tooltip-popup {
    font-size: 13px;
    max-width: calc(100vw - 32px);
  }
}

@media (max-width: 720px) {
  .site-header { padding: 12px 0; }
  .header-inner { gap: 8px; flex-wrap: nowrap; }
  .logo { font-size: 16px; min-width: 0; }
  .logo-row { gap: 8px; }
  .logo-mark { width: 30px; height: 30px; font-size: 15px; }
  .logo-tagline {
    margin-left: 38px;
    font-size: 10px;
  }
  /* ロゴテキストが画面に収まらない場合に省略 */
  .logo-text {
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }
  /* このサイトについて はモバイルでは円形のアイコンボタンに */
  .header-about-btn {
    width: 38px;
    height: 38px;
    padding: 0;
    gap: 0;
    border-radius: 50%;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
  }
  /* テキスト+矢印のラッパーごと隠す */
  .header-about-text-pc {
    display: none !important;
  }
  .header-about-icon {
    font-size: 16px;
    line-height: 1;
  }

  /* スクロール時はさらにコンパクト */
  .site-header.is-scrolled { padding: 6px 0; }
  .site-header.is-scrolled .logo-mark { width: 26px; height: 26px; font-size: 13px; }
  .site-header.is-scrolled .logo { font-size: 14px; }
  .site-header.is-scrolled .header-about-btn {
    width: 30px;
    height: 30px;
  }
  .site-header.is-scrolled .header-about-icon {
    font-size: 14px;
  }
}

@media (max-width: 380px) {
  .container { padding: 0 14px; }
  .logo { font-size: 14px; }
  .logo-row { gap: 6px; }
  .logo-mark { width: 26px; height: 26px; font-size: 13px; }
  .logo-tagline { font-size: 9px; margin-left: 32px; }
  .meta-pill { font-size: 11px; padding: 4px 10px; }
  .header-about-btn { width: 32px; height: 32px; }
  .header-about-icon { font-size: 14px; }
  .hero-title { font-size: 22px; }
}

/* === Focus States === */
:focus-visible {
  outline: 3px solid var(--color-secondary);
  outline-offset: 2px;
}

/* 独自の枠/シャドウでフォーカスを示している要素は、ブラウザデフォルトを抑制 */
.search-input:focus,
.search-input:focus-visible,
.sort-select:focus,
.sort-select:focus-visible {
  outline: none;
}
/* search-input-wrap が枠線で表現するので、内部のinputにはoutline不要 */
.search-input-wrap:focus-within {
  outline: none;
}

/* ============================================
   対話型ウィザード & 新UI 関連 CSS
   ============================================ */

/* === 検索開始エリア === */
.search-start-area {
  max-width: 760px;
  margin: 0 auto;
}

.search-start-area .search-input-wrap {
  width: 100%;
  margin-bottom: 14px;
}

/* ウィザード開始ボタン */
.wizard-start-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 18px 22px;
  background: linear-gradient(135deg, var(--color-primary), #ff7e5f);
  color: #fff;
  border: 3px solid var(--color-text);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: left;
  box-shadow: var(--shadow-pop);
  transition: transform 0.15s, box-shadow 0.15s;
}
.wizard-start-btn:hover {
  transform: translate(-3px, -3px);
  box-shadow: 7px 7px 0 var(--color-text);
}
.wizard-start-icon {
  font-size: 28px;
  flex-shrink: 0;
}
.wizard-start-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}
.wizard-start-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.wizard-start-sub {
  font-size: 12px;
  opacity: 0.9;
}
.wizard-start-arrow {
  font-size: 24px;
  font-weight: 900;
  flex-shrink: 0;
}

/* 検索条件サマリー */
.current-conditions {
  margin-top: 14px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.7);
  border: 2px dashed var(--color-text);
  border-radius: var(--radius-md);
}
.current-conditions-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.current-conditions-label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--color-text);
}
.current-conditions-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.cc-tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  border: 1.5px solid var(--color-text);
}
.cc-tag-freeword {
  background: var(--color-tertiary);
  color: var(--color-text);
}
.cc-tag-region {
  background: var(--color-secondary);
  color: #fff;
}
.cc-tag-target {
  background: var(--color-quaternary);
  color: #fff;
}
.cc-tag-detail {
  background: var(--color-text);
  color: #fff;
}
.btn-link-edit {
  margin-top: 4px;
  color: var(--color-primary);
  font-weight: 700;
}

/* === ウィザードモーダル === */
.modal-wizard .modal-panel-wizard {
  max-width: 720px;
  width: 100%;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.wizard-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px 50px 12px 24px;
  border-bottom: 2px solid var(--color-border);
  flex-shrink: 0;
}
.wizard-step-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  opacity: 0.4;
  transition: opacity 0.3s;
}
.wizard-step-indicator.active,
.wizard-step-indicator.done {
  opacity: 1;
}
.wizard-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--color-bg);
  color: var(--color-text);
  border: 2px solid var(--color-border);
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 15px;
}
.wizard-step-indicator.active .wizard-step-num {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-text);
  box-shadow: 2px 2px 0 var(--color-text);
}
.wizard-step-indicator.done .wizard-step-num {
  background: var(--color-secondary);
  color: #fff;
  border-color: var(--color-text);
}
.wizard-step-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-sub);
}
.wizard-step-line {
  width: 40px;
  height: 2px;
  background: var(--color-border);
}

.wizard-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}

.wizard-step-eyebrow {
  display: inline-block;
  font-family: var(--font-accent);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--color-primary);
  margin: 0 0 6px;
}
.wizard-step-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 22px;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
  line-height: 1.3;
}
.wizard-step-desc {
  font-size: 13px;
  color: var(--color-text-sub);
  margin: 0 0 22px;
  line-height: 1.6;
}

/* モード選択ボタン */
.wizard-region-modes,
.wizard-target-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.wizard-mode-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 18px;
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
}
.wizard-mode-btn:hover {
  border-color: var(--color-text);
  transform: translateY(-1px);
}
.wizard-mode-btn.active {
  border-color: var(--color-primary);
  background: rgba(255, 82, 82, 0.06);
  box-shadow: 3px 3px 0 var(--color-primary);
}
.wizard-mode-icon {
  font-size: 28px;
  flex-shrink: 0;
}
.wizard-mode-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}
.wizard-mode-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--color-text);
}
.wizard-mode-btn.active .wizard-mode-title {
  color: var(--color-primary);
}
.wizard-mode-desc {
  font-size: 12px;
  color: var(--color-text-sub);
  line-height: 1.5;
}

/* ステップ1の都道府県UI */
.wizard-pref-area {
  margin-top: 18px;
  padding: 16px;
  background: var(--color-bg);
  border-radius: var(--radius-md);
}
.wizard-pref-label {
  font-weight: 700;
  font-size: 12px;
  color: var(--color-text-sub);
  margin: 0 0 10px;
  letter-spacing: 0.03em;
}

/* ステップ3の詳細条件グリッド */
.wizard-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
}

/* ウィザードフッター */
.wizard-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 24px;
  border-top: 2px solid var(--color-border);
  flex-shrink: 0;
}
.wizard-footer-spacer {
  flex: 1;
}
.wizard-footer .btn {
  padding: 10px 20px;
  font-size: 14px;
}

/* === 結果カード:ヒットバッジ === */
.hit-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px 12px 0;
  background: linear-gradient(180deg, rgba(255, 210, 63, 0.15), transparent);
}
.hit-badge {
  display: inline-flex;
  align-items: center;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--color-text);
  letter-spacing: 0.02em;
}
.hit-badge-school {
  background: var(--color-secondary);
  color: #fff;
}
.hit-badge-facility {
  background: var(--color-tertiary);
  color: var(--color-text);
}

.card-footer-hint {
  padding: 10px 16px 12px;
  text-align: center;
  font-size: 11px;
  color: var(--color-text-sub);
  font-weight: 600;
  border-top: 1px dashed var(--color-border);
}

/* === モーダル:連携施設マッチ強調 === */
.modal-section-note {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-secondary);
  margin-left: 8px;
  letter-spacing: 0.02em;
}
.modal-partner.is-matched {
  background: rgba(255, 210, 63, 0.18);
  border-color: var(--color-tertiary);
  position: relative;
}
.modal-partner-matched-badge {
  position: absolute;
  top: -8px;
  right: 12px;
  display: inline-block;
  padding: 2px 10px;
  background: var(--color-tertiary);
  color: var(--color-text);
  font-size: 10px;
  font-weight: 700;
  border: 1.5px solid var(--color-text);
  border-radius: var(--radius-pill);
}
.modal-partner-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 4px 0 8px;
}
.modal-partner-stats {
  display: flex;
  gap: 12px;
  margin-top: 6px;
  font-size: 11px;
  color: var(--color-text-sub);
}

/* 連携施設タグの色 */
.tag-facility-meeting {
  background: var(--color-secondary);
  color: #fff;
}
.tag-facility-support {
  background: var(--color-quaternary);
  color: #fff;
}

/* btn-link-small */
.btn-link-small {
  background: transparent;
  border: none;
  color: var(--color-text-sub);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 4px 0;
}
.btn-link-small:hover {
  color: var(--color-text);
}

/* モバイル */
@media (max-width: 720px) {
  .wizard-progress { padding: 18px 50px 10px 18px; gap: 8px; }
  .wizard-step-line { width: 24px; }
  .wizard-step-num { width: 28px; height: 28px; font-size: 13px; }
  .wizard-step-label { font-size: 10px; }
  .wizard-body { padding: 18px 18px; }
  .wizard-step-title { font-size: 18px; }
  .wizard-mode-btn { padding: 14px 14px; gap: 10px; }
  .wizard-mode-icon { font-size: 22px; }
  .wizard-mode-title { font-size: 14px; }
  .wizard-detail-grid { grid-template-columns: 1fr; gap: 14px; }
  .wizard-footer { padding: 12px 16px; flex-wrap: wrap; gap: 8px; }
  .wizard-footer .btn { padding: 9px 14px; font-size: 13px; flex: 1; }
  .wizard-footer .btn-link-small { width: 100%; text-align: center; order: 5; }
  .wizard-start-btn { padding: 14px 16px; gap: 12px; }
  .wizard-start-icon { font-size: 24px; }
  .wizard-start-title { font-size: 15px; }
  .wizard-start-arrow { font-size: 20px; }
  .hit-badges { padding: 6px 10px 0; }
  .hit-badge { font-size: 10px; padding: 2px 7px; }
}

/* ============================================
   検索オーバーレイ・クイックフィルタ・詳細バッジ
   ============================================ */

/* === 検索中オーバーレイ === */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 250, 240, 0.6);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: overlayFadeIn 0.15s ease-out;
}
@keyframes overlayFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.search-overlay-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 28px 36px;
  background: var(--color-surface);
  border: 3px solid var(--color-text);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-pop);
}
.search-overlay-spinner {
  width: 48px;
  height: 48px;
  border: 5px solid var(--color-bg);
  border-top-color: var(--color-primary);
  border-right-color: var(--color-tertiary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.search-overlay-text {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 15px;
  color: var(--color-text);
  margin: 0;
  letter-spacing: 0.05em;
}
.search-overlay.search-overlay-light .search-overlay-content {
  padding: 16px 22px;
  gap: 10px;
}
.search-overlay.search-overlay-light .search-overlay-spinner {
  width: 28px;
  height: 28px;
  border-width: 3px;
}
.search-overlay.search-overlay-light .search-overlay-text {
  font-size: 12px;
}

/* === クイックフィルタ チェック === */
.quick-filter-check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  background: rgba(255, 255, 255, 0.6);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  cursor: pointer;
  transition: all 0.15s;
}
.quick-filter-check:hover {
  border-color: var(--color-text);
  background: rgba(255, 255, 255, 0.85);
}
.quick-filter-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--color-primary);
  flex-shrink: 0;
}
.quick-filter-check:has(input:checked) {
  border-color: var(--color-primary);
  background: rgba(255, 82, 82, 0.06);
}
.quick-filter-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
}

/* === 詳細ヒットバッジ === */
.hit-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px 12px 0;
  background: linear-gradient(180deg, rgba(255, 210, 63, 0.18), transparent);
}
.hit-badge {
  display: inline-flex;
  align-items: center;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--color-text);
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.hit-badge-name {
  background: var(--color-primary);
  color: #fff;
}
.hit-badge-pref {
  background: var(--color-secondary);
  color: #fff;
}
.hit-badge-area {
  background: var(--color-quaternary);
  color: #fff;
}
.hit-badge-other {
  background: var(--color-text);
  color: var(--color-tertiary);
}
.hit-badge-facility {
  background: var(--color-tertiary);
  color: var(--color-text);
}

/* === エラー表示 === */
.loading-error-icon {
  font-size: 56px;
  margin-bottom: 12px;
  filter: grayscale(0.2);
}
.loading-error-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--color-text);
  margin: 0 0 4px;
}

/* === スピンアニメーション(既存上書き対策) === */
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================
   用語集 (Glossary) モーダル
   ============================================ */

/* 検索注意書き内の用語集ボタン(控えめ) */
.glossary-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 7px 14px;
  background: rgba(26, 26, 46, 0.04);
  color: var(--color-text);
  border: 1.5px solid rgba(26, 26, 46, 0.2);
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.15s;
}
.glossary-btn:hover {
  background: var(--color-text);
  color: var(--color-tertiary);
  border-color: var(--color-text);
}
.glossary-btn-icon {
  font-size: 14px;
  line-height: 1;
}
.glossary-btn-text {
  font-weight: 700;
}
.glossary-btn-sub {
  font-size: 11px;
  opacity: 0.65;
  margin-left: 4px;
}
.glossary-btn:hover .glossary-btn-sub {
  opacity: 0.8;
}

/* === 用語集モーダル === */
.modal-panel-glossary {
  max-width: 720px;
  width: 100%;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #1A1A2E;
  color: #F5F5F0;
  border-color: #FFD23F;
}

.glossary-header {
  flex-shrink: 0;
  padding: 28px 56px 18px 28px;
  border-bottom: 2px solid rgba(255, 210, 63, 0.3);
  background: linear-gradient(180deg, rgba(255, 210, 63, 0.08), transparent);
}
.glossary-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 24px;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.glossary-title-icon {
  font-size: 28px;
  filter: drop-shadow(0 0 8px rgba(255, 210, 63, 0.6));
}
.glossary-title-text {
  color: #FFD23F;
}
.glossary-subtitle {
  font-size: 13px;
  color: rgba(245, 245, 240, 0.65);
  margin: 0 0 12px;
  line-height: 1.6;
}
.glossary-replay-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  background: transparent;
  color: #FFD23F;
  border: 1.5px solid rgba(255, 210, 63, 0.5);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.glossary-replay-btn:hover {
  background: rgba(255, 210, 63, 0.15);
  border-color: #FFD23F;
}

/* モーダルクローズボタンの色をテーマに合わせる */
.modal-panel-glossary .modal-close {
  background: rgba(255, 210, 63, 0.15);
  color: #FFD23F;
  border-color: rgba(255, 210, 63, 0.4);
}
.modal-panel-glossary .modal-close:hover {
  background: rgba(255, 210, 63, 0.3);
}

/* 用語集リスト本体 */
.glossary-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px 28px 24px;
  font-family: 'Courier New', Consolas, Menlo, monospace;
}

/* 各用語項目 */
.glossary-item {
  margin-bottom: 16px;
  padding: 0;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 210, 63, 0.15);
  border-radius: var(--radius-md);
  transition: all 0.3s;
}
.glossary-item-active {
  border-color: rgba(255, 210, 63, 0.6);
  box-shadow: 0 0 0 2px rgba(255, 210, 63, 0.2);
  background: rgba(255, 210, 63, 0.05);
}
.glossary-item-done {
  border-color: rgba(255, 210, 63, 0.25);
}
.glossary-item-collapsed .glossary-item-body {
  display: none;
}
.glossary-item-collapsed .glossary-item-toggle {
  transform: rotate(-90deg);
}

.glossary-item-header {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  color: inherit;
  font-family: inherit;
}
.glossary-item-header:hover {
  background: rgba(255, 210, 63, 0.05);
}
.glossary-item-num {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 12px;
  color: rgba(255, 210, 63, 0.5);
  flex-shrink: 0;
  width: 24px;
  letter-spacing: 0.02em;
}
.glossary-item-term {
  flex: 1;
  font-size: 16px;
  font-weight: 700;
  color: #FFD23F;
  letter-spacing: 0.02em;
  min-height: 1.4em;
}
.glossary-item-toggle {
  font-size: 12px;
  color: rgba(245, 245, 240, 0.4);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.glossary-item-body {
  padding: 0 18px 16px 54px;
  border-top: 1px dashed rgba(255, 210, 63, 0.15);
  margin-top: -2px;
}
.glossary-item-def {
  font-size: 13px;
  line-height: 1.8;
  color: rgba(245, 245, 240, 0.85);
  margin: 12px 0 0;
  min-height: 1.4em;
  letter-spacing: 0.01em;
}

/* タイピング中のカーソル(点滅する縦棒) */
.typing-cursor::after {
  content: "▌";
  display: inline-block;
  margin-left: 1px;
  color: #FFD23F;
  animation: cursorBlink 0.8s steps(2) infinite;
  font-weight: 100;
}
@keyframes cursorBlink {
  0% { opacity: 1; }
  50% { opacity: 0; }
}

/* フッター */
.glossary-footer {
  flex-shrink: 0;
  padding: 14px 28px;
  border-top: 1px solid rgba(255, 210, 63, 0.2);
  background: rgba(0, 0, 0, 0.2);
}
.glossary-footer-note {
  font-size: 11px;
  color: rgba(245, 245, 240, 0.55);
  margin: 0;
  line-height: 1.6;
}
.glossary-footer-note a {
  color: #FFD23F;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* スクロールバーをテーマ色に */
.glossary-list::-webkit-scrollbar {
  width: 8px;
}
.glossary-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
}
.glossary-list::-webkit-scrollbar-thumb {
  background: rgba(255, 210, 63, 0.3);
  border-radius: 4px;
}
.glossary-list::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 210, 63, 0.5);
}

/* モバイル */
@media (max-width: 720px) {
  .glossary-btn {
    padding: 6px 12px;
    font-size: 11px;
  }
  .glossary-btn-text { font-size: 11px; }
  .glossary-btn-sub {
    font-size: 10px;
  }
  .glossary-header {
    padding: 22px 50px 14px 18px;
  }
  .glossary-title { font-size: 19px; gap: 8px; }
  .glossary-title-icon { font-size: 22px; }
  .glossary-subtitle { font-size: 12px; }
  .glossary-list { padding: 12px 18px 18px; }
  .glossary-item-header { padding: 12px 14px; gap: 10px; }
  .glossary-item-term { font-size: 14px; }
  .glossary-item-body { padding: 0 14px 14px 44px; }
  .glossary-item-def { font-size: 12px; line-height: 1.7; }
  .glossary-footer { padding: 12px 18px; }
  .glossary-footer-note { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .typing-cursor::after { animation: none; opacity: 1; }
  .glossary-btn::before { transition: none; }
}

/* ============================================
   起動スプラッシュ
   ============================================ */

.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: opacity 0.6s ease-out, visibility 0.6s;
}

/* 背景:ヒーローと同じグラデーション + 微妙な動き */
.splash-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 82, 82, 0.5), transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(46, 196, 182, 0.4), transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(255, 210, 63, 0.3), transparent 60%),
    var(--color-bg);
  animation: splashBgFade 0.4s ease-out;
}
@keyframes splashBgFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ロゴエリア */
.splash-logo {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(28px, 6vw, 48px);
  letter-spacing: -0.02em;
  color: var(--color-text);
  /* 登場アニメーション */
  animation: splashEnter 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  transform-origin: center center;
  will-change: transform, opacity;
}
@keyframes splashEnter {
  0% {
    opacity: 0;
    transform: scale(0.3) translateY(40px);
  }
  60% {
    opacity: 1;
    transform: scale(1.1) translateY(-6px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.splash-logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4em;
  height: 1.4em;
  background: var(--color-text);
  color: var(--color-primary);
  border-radius: var(--radius-md);
  /* 星だけが余韻でちょっと回る */
  animation: splashStarSpin 1.5s ease-out 0.3s both;
}
@keyframes splashStarSpin {
  0% { transform: rotate(-180deg) scale(0.6); }
  60% { transform: rotate(20deg) scale(1.15); }
  100% { transform: rotate(0deg) scale(1); }
}

.splash-logo-num {
  color: var(--color-primary);
}
.splash-logo-accent {
  color: var(--color-primary);
  font-weight: 900;
}

/* タグライン */
.splash-tagline {
  position: relative;
  z-index: 1;
  margin-top: 20px;
  font-size: clamp(13px, 2.5vw, 16px);
  color: var(--color-text-sub);
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0;
  animation: splashTagFade 0.5s ease-out 0.5s forwards;
}
@keyframes splashTagFade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 0.85; transform: translateY(0); }
}

/* === 退場アニメ:ヘッダー位置に吸い込まれる === */
.splash-exit .splash-logo {
  animation: splashExit 0.8s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}
@keyframes splashExit {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  100% {
    transform:
      translate(var(--exit-x, 0), var(--exit-y, 0))
      scale(var(--exit-scale, 0.3));
    opacity: 0;
  }
}

/* タグラインは退場時に下に消える */
.splash-exit .splash-tagline {
  animation: splashTagOut 0.4s ease-out forwards;
}
@keyframes splashTagOut {
  to { opacity: 0; transform: translateY(20px); }
}

/* 退場時に背景もフェードアウト */
.splash-exit {
  opacity: 0;
  transition-duration: 0.7s;
  transition-delay: 0.15s;
}
.splash-exit .splash-bg {
  animation: splashBgOut 0.6s ease-out 0.2s forwards;
}
@keyframes splashBgOut {
  to { opacity: 0; }
}

/* シンプルフェードアウト(ヘッダー検出失敗時のフォールバック) */
.splash-fadeout {
  opacity: 0;
}

/* prefers-reduced-motion対応 */
@media (prefers-reduced-motion: reduce) {
  .splash-screen { display: none !important; }
}

/* ============================================
   ヒーローセクション内の「このサイトについて」リンク
   ============================================ */

.hero-about-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  padding: 5px 12px 5px 10px;
  background: rgba(26, 26, 46, 0.04);
  color: var(--color-text-sub);
  border: 1px solid rgba(26, 26, 46, 0.12);
  border-radius: var(--radius-pill);
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: all 0.18s;
}
.hero-about-link:hover {
  background: var(--color-text);
  color: var(--color-tertiary);
  border-color: var(--color-text);
}
.hero-about-icon {
  font-size: 13px;
  line-height: 1;
}
.hero-about-text {
  font-weight: 700;
  color: var(--color-text);
  transition: color 0.18s;
}
.hero-about-link:hover .hero-about-text {
  color: var(--color-tertiary);
}
.hero-about-arrow {
  font-size: 11px;
  font-weight: 900;
  color: var(--color-primary);
  animation: heroAboutBounce 1.8s ease-in-out infinite;
}
@keyframes heroAboutBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(2px); }
}
.hero-about-link:hover .hero-about-arrow {
  color: var(--color-tertiary);
}
@media (prefers-reduced-motion: reduce) {
  .hero-about-arrow { animation: none; }
}

/* モバイル対応 */
@media (max-width: 720px) {
  .hero-about-link {
    font-size: 10px;
    padding: 4px 10px 4px 8px;
    margin-bottom: 12px;
  }
  .hero-about-icon { font-size: 12px; }
  .hero-about-arrow { font-size: 10px; }
}


/* ============================================
   ぱんぷきんラボ紹介(フッタートリガー + モーダル)
   ============================================ */

/* フッターのトリガーボタン */
.pumpkin-info-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-left: 6px;
  background: rgba(255, 210, 63, 0.15);
  border: 1.5px solid rgba(255, 210, 63, 0.4);
  border-radius: 50%;
  cursor: pointer;
  vertical-align: middle;
  transition: all 0.2s;
  padding: 0;
}
.pumpkin-info-trigger:hover {
  background: rgba(255, 210, 63, 0.3);
  border-color: rgba(255, 210, 63, 0.7);
  transform: scale(1.1);
}
.pumpkin-info-emoji {
  font-size: 14px;
  line-height: 1;
  display: inline-block;
  animation: pumpkinBob 3.5s ease-in-out infinite;
}
@keyframes pumpkinBob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-2px) rotate(5deg); }
}
@media (prefers-reduced-motion: reduce) {
  .pumpkin-info-emoji { animation: none; }
}

/* === ぱんぷきんラボ紹介モーダル === */
.modal-panel-pumpkin {
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pumpkin-modal-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 56px 16px 24px;
  border-bottom: 2px solid var(--color-border);
  background: linear-gradient(135deg, rgba(255, 210, 63, 0.12), rgba(255, 82, 82, 0.06));
}
.pumpkin-modal-emoji {
  font-size: 32px;
  line-height: 1;
  flex-shrink: 0;
  animation: pumpkinBob 3.5s ease-in-out infinite;
}
.pumpkin-modal-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 20px;
  margin: 0;
  letter-spacing: -0.01em;
  color: var(--color-text);
}

.pumpkin-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}
.pumpkin-modal-p {
  font-size: 14px;
  line-height: 1.8;
  margin: 0 0 14px;
  color: var(--color-text);
}
.pumpkin-modal-p:last-of-type {
  margin-bottom: 0;
}
.pumpkin-modal-p strong {
  color: var(--color-primary);
  font-weight: 700;
}
.pumpkin-modal-quote {
  margin: 18px 0 0;
  padding: 14px 16px;
  background: rgba(255, 210, 63, 0.12);
  border-left: 4px solid var(--color-secondary);
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.8;
  color: var(--color-text-sub);
  font-style: italic;
}

.pumpkin-modal-footer {
  flex-shrink: 0;
  padding: 16px 24px 20px;
  border-top: 1px solid var(--color-border);
  text-align: center;
}
.pumpkin-modal-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--color-primary);
  color: #fff;
  border: 2px solid var(--color-text);
  border-radius: var(--radius-pill);
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  box-shadow: 3px 3px 0 var(--color-text);
  transition: transform 0.15s, box-shadow 0.15s;
}
.pumpkin-modal-link:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--color-text);
}
.pumpkin-modal-link:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 var(--color-text);
}

/* モバイル */
@media (max-width: 720px) {
  .pumpkin-info-trigger { width: 26px; height: 26px; }
  .pumpkin-info-emoji { font-size: 13px; }
  .pumpkin-modal-header { padding: 20px 50px 14px 18px; gap: 10px; }
  .pumpkin-modal-emoji { font-size: 26px; }
  .pumpkin-modal-title { font-size: 17px; }
  .pumpkin-modal-body { padding: 16px 18px; }
  .pumpkin-modal-p { font-size: 13px; }
  .pumpkin-modal-quote { font-size: 12px; padding: 12px 14px; }
  .pumpkin-modal-footer { padding: 14px 18px 18px; }
  .pumpkin-modal-link { font-size: 12px; padding: 9px 16px; }
}
