/* ==========================================================================
   とこネット モック（スマホ版）
   14章「モバイルファースト設計」の改善を反映
   - 入力欄 16px（2.1 iOSズーム防止）
   - 見出しレスポンシブ（2.2）
   - タップ領域 44px（2.5）
   - チップUI（2.4）／ボトムシート（5.2）／下部固定CTA（5.1）
   ========================================================================== */

/* ===== 実フォント（toko-net/frontend/public/assets/fonts から） =====
   ⚠️ .ttf のまま約9MB。14章 4.2 の通り本番では .woff2 化＋サブセット化が必要。
   スマホの通信量を考えると、ここが最大の改善点。 */
@font-face {
  font-family: 'Mochiy Pop P One';
  src: url('../assets/fonts/MochiyPopPOne-Regular.ttf') format('truetype');
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: 'Zen Kaku Gothic New';
  src: url('../assets/fonts/ZenKakuGothicNew-Regular.ttf') format('truetype');
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: 'Zen Kaku Gothic New';
  src: url('../assets/fonts/ZenKakuGothicNew-Bold.ttf') format('truetype');
  font-weight: 700; font-display: swap;
}
/* Material Symbols Rounded（絵文字の置き換え） */
@font-face {
  font-family: 'Material Symbols Rounded';
  src: url('../assets/fonts/material-symbols-rounded.ttf') format('truetype');
  font-weight: 400; font-display: block;
}
.icon {
  font-family: 'Material Symbols Rounded';
  font-weight: normal; font-style: normal;
  font-size: 20px; line-height: 1;
  display: inline-block; vertical-align: middle;
  letter-spacing: normal; text-transform: none; white-space: nowrap;
  direction: ltr; -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased; user-select: none; flex: none;
}
.icon-sm { font-size: 18px; }
.icon-lg { font-size: 24px; }
.icon-xl { font-size: 34px; }

:root {
  --brand: #2f4f74;   /* イベント用スライドの紺 */
  --action: #15803d;          /* ★ green-700（白文字と 5.02:1） */
  --action-hover: #166534;    /* green-800 */
  --action-bg: #dcfce7;       /* green-100 */
  --action-fg: #14532d;       /* green-900 */
  --action-ring: rgba(21,128,61,.28);
  --danger: #dc2626;
  --line: rgba(0,0,0,.10);
  --line-strong: rgba(0,0,0,.18);
  --text: #1f2937;
  --muted: #4b5563;
  --subtle: #6b7280;
  --card-shadow: 0 1px 3px rgba(0,0,0,.06), 0 6px 18px rgba(0,0,0,.05);
  --shadow: 0 24px 60px rgba(49,78,112,.18);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Zen Kaku Gothic New", "Noto Sans JP", "Hiragino Sans", "Yu Gothic", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(132,204,22,.10), transparent 26%),
    linear-gradient(135deg, #f8fbff 0%, #f2f6f0 45%, #eef1f5 100%);
  min-height: 100vh;
}

/* ========== モック用シェル ========== */
.app-shell {
  display: grid; grid-template-columns: 320px minmax(0,1fr);
  gap: 28px; padding: 28px; min-height: 100vh; align-items: start;
}
.flow-panel {
  position: sticky; top: 28px;
  background: rgba(255,255,255,.88); backdrop-filter: blur(8px);
  border: 1px solid var(--line); border-radius: 18px; padding: 24px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 22px;
  max-height: calc(100vh - 56px); overflow-y: auto;
}
.eyebrow { margin: 0 0 6px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--subtle); font-weight: 700; }
.flow-panel h1 { margin: 0 0 8px; font-size: 24px; color: var(--brand); }
.lead { margin: 0; font-size: 13px; line-height: 1.7; color: var(--muted); }

.view-toggle { display: flex; flex-direction: column; gap: 8px; }
.view-toggle-label { font-size: 11px; font-weight: 700; color: var(--subtle); letter-spacing: .08em; }
.view-toggle-btns { display: flex; gap: 6px; }
.view-toggle-btn {
  flex: 1; text-align: center; text-decoration: none; padding: 9px 10px;
  border-radius: 9px; font-size: 12.5px; font-weight: 600;
  border: 1px solid var(--line-strong); background: #fff; color: var(--muted);
  cursor: pointer; font-family: inherit;
}
.view-toggle-btn.is-active { background: var(--action); border-color: var(--action); color: #fff; }

.flow-nav { display: flex; flex-direction: column; gap: 5px; }
.flow-link {
  text-align: left; padding: 10px 12px; border-radius: 9px; border: 1px solid transparent;
  background: transparent; font-family: inherit; font-size: 13.5px; color: var(--muted);
  cursor: pointer; min-height: 40px;
}
.flow-link:hover { background: rgba(0,0,0,.04); }
.flow-link.is-active { background: var(--action-bg); border-color: var(--action); color: var(--action-fg); font-weight: 700; }

.route-notes { border-top: 1px solid var(--line); padding-top: 16px; }
.route-notes h2 { margin: 0 0 8px; font-size: 12px; color: var(--subtle); letter-spacing: .06em; }
.route-notes ul { margin: 0; padding-left: 18px; }
.route-notes li { font-size: 12px; line-height: 1.75; color: var(--muted); }
.route-notes b { color: var(--text); }
.route-notes--data li { color: var(--subtle); }

.stage { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.stage-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.stage-header h2 { margin: 0; font-size: 26px; color: var(--brand); }
.status-pill { padding: 7px 14px; border-radius: 999px; font-size: 12px; background: #fff; border: 1px solid var(--line); color: var(--muted); }

/* 端末フレーム */
.phone-wrap { display: flex; justify-content: center; padding: 8px 0 32px; }
/* 参照元モック（houseaccount-web）と同じ寸法：枠 460px / 画面高 760px */
.phone {
  position: relative; width: min(100%, 460px); height: 800px;
  background: linear-gradient(180deg, #212832 0%, #10161d 100%);
  border-radius: 36px; padding: 14px;
  box-shadow: 0 32px 80px rgba(15, 25, 38, .35);
}
.phone-notch {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  width: 140px; height: 18px; background: #0e1218;
  border-radius: 0 0 14px 14px; z-index: 30;
}
.phone-screen {
  width: 100%; height: 100%; background: #fff; border-radius: 28px;
  overflow-y: auto; overflow-x: hidden; position: relative;
}

/* ========== サイト本体（スマホ） ========== */
.site { font-size: 16px; position: relative; min-height: 100%; }

.m-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; background: #fff; border-bottom: 1px solid var(--line);
}
.m-brand { font-weight: 700; color: var(--brand); font-size: 15px; line-height: 1.35; }
.m-header-right { display: flex; align-items: center; gap: 8px; flex: none; }

/* ★ 言語切替：スマホでも常にヘッダーに置く（メニューを開かずに切り替えられる） */
.lang-switch {
  display: inline-flex; border: 1px solid var(--line-strong);
  border-radius: 9px; overflow: hidden; background: #fff; flex: none;
}
.lang-btn {
  min-width: 40px; min-height: 40px; padding: 0 9px;
  border: none; background: transparent; cursor: pointer;
  font-family: inherit; font-size: 14px; font-weight: 700;
  color: var(--subtle); letter-spacing: .04em;
}
.lang-btn + .lang-btn { border-left: 1px solid var(--line-strong); }
.lang-btn.is-active { background: var(--action); color: #fff; }
.m-burger {
  width: 44px; height: 44px;              /* ★ 44px（14章 2.5） */
  display: grid; place-content: center; gap: 5px;
  background: none; border: none; cursor: pointer; flex: none;
}
.m-burger span { display: block; width: 24px; height: 2px; background: var(--muted); border-radius: 2px; }

.m-menu { display: none; border-bottom: 1px solid var(--line); background: #fff; padding: 8px 16px 16px; }
.m-menu.is-open { display: block; }
/* ★ .btn を除外しないと、ボタンの白文字がグレーに上書きされる */
.m-menu a:not(.btn) {
  display: flex; align-items: center; min-height: 48px;   /* ★ 48px */
  color: var(--muted); text-decoration: none; font-size: 16px;
  border-bottom: 1px solid var(--line);
}
.m-menu .btn { margin-top: 12px; color: #fff; }
.m-menu a.btn-primary { color: #fff; }

/* Hero（★ 14章 2.2：レスポンシブ／2.3：bg-cover相当） */
.m-hero {
  padding: 40px 20px;                     /* 旧 py-32(128px) → 40px */
  background: url('../assets/images/about-sky.jpg') center / cover no-repeat,
              linear-gradient(180deg, #bcd5f0 0%, #dde9f7 50%, #f1e4d6 100%);
  background-size: cover; background-position: center;
  text-align: center;
}
/* 実イラスト（アセット 1.png）。スマホでは小さめに */
.m-hero-art { display: block; width: 100%; max-width: 300px; height: auto; margin: 0 auto 14px; }
.m-hero-title {
  margin: 0 0 10px;
  font-size: 28px;                        /* ★ 旧 text-5xl(48px) 固定 → 28px */
  line-height: 1.4; font-weight: 800;
  font-family: 'Mochiy Pop P One', 'Zen Kaku Gothic New', sans-serif;
  text-shadow: 2px 2px 0 #fff, -2px -2px 0 #fff, 2px -2px 0 #fff, -2px 2px 0 #fff;
}
.m-hero-title .c1 { color: #a16207; }
.m-hero-title .c2 { color: #92400e; }
.m-hero-title .c3 { color: #b91c1c; }
.m-hero-title .c4 { color: #4d7c0f; }
.m-hero-sub { margin: 0; font-size: 15px; color: #3f3f46; line-height: 1.7; }

/* ★ スマホの検索は「タップして専用画面へ」（入力欄を置かない）
   ヒーロー内に入力欄を置くと、タップ→キーボード表示で画面が跳ねる */
.m-hero-search {
  display: flex; align-items: center; gap: 10px; width: 100%;
  min-height: 52px; padding: 0 16px; margin-top: 16px;
  background: #fff; border: 2px solid var(--action); border-radius: 12px;
  font-family: inherit; font-size: 16px; color: var(--subtle);
  text-align: left; cursor: pointer;
  box-shadow: 0 2px 10px rgba(21,128,61,.10);
}
.m-hero-search .icon { color: var(--action); }

/* ★ 横スクロールのクイック条件（縦の場所を使わない） */
.m-quick { padding: 20px 0 4px; }
.m-quick-title { margin: 0 16px 10px; font-size: 15px; color: var(--muted); }
/* ★ 5つを3列×2行のグリッドに収める（横スクロールしない） */
.m-quick-row { display: flex; gap: 8px; padding: 2px 16px 10px; }
.m-quick-wrap {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
}
.m-quick-wrap .m-quick-chip { justify-content: center; padding: 0 8px; font-size: 14px; }
.m-quick-chip {
  flex: none; display: inline-flex; align-items: center; gap: 5px;
  min-height: 44px; padding: 0 16px; border-radius: 999px;
  background: #fff; border: 1px solid #cfd6dd; color: var(--text);
  font-family: inherit; font-size: 15px; cursor: pointer;
}
.m-quick-chip:active { background: var(--action-bg); border-color: var(--action); }

/* セクション見出し＋「すべて見る」 */
.m-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.m-sec-head .m-section-title { margin: 0; text-align: left; font-size: 19px; }
.m-more {
  display: inline-flex; align-items: center; gap: 3px; min-height: 44px;
  background: none; border: none; font-family: inherit; font-size: 14.5px;
  color: var(--action); font-weight: 700; cursor: pointer; flex: none;
}

/* ★ FAQ はアコーディオン（縦を節約） */
.m-faq { display: flex; flex-direction: column; gap: 8px; }
.m-faq details {
  background: #fff; border: 1px solid var(--line); border-radius: 11px;
  box-shadow: var(--card-shadow); overflow: hidden;
}
.m-faq summary {
  display: flex; align-items: center; gap: 9px;
  min-height: 52px; padding: 0 15px; cursor: pointer;
  font-size: 15.5px; font-weight: 700; list-style: none;
}
.m-faq summary::-webkit-details-marker { display: none; }
.m-faq summary::after {
  content: "expand_more"; font-family: 'Material Symbols Rounded';
  margin-left: auto; color: var(--subtle); font-size: 22px;
}
.m-faq details[open] summary::after { content: "expand_less"; }
.m-faq summary .icon { color: var(--action); }
.m-faq p { margin: 0; padding: 0 15px 15px; font-size: 15px; line-height: 1.85; color: var(--muted); }

/* 支援者バナー（一行・行全体をタップ） */
.m-sup-banner {
  display: flex; align-items: center; gap: 12px; width: calc(100% - 32px);
  margin: 4px 16px 24px; padding: 15px; min-height: 64px;
  background: #f7f9fa; border: 1px solid var(--line); border-radius: 12px;
  font-family: inherit; text-align: left; cursor: pointer;
}
.m-sup-banner b { display: block; font-size: 15px; }
.m-sup-banner small { font-size: 13px; color: var(--muted); }
.m-sup-banner > span:nth-child(2) { flex: 1; }
.m-sup-banner .icon-lg { color: var(--action); }

.m-section { padding: 28px 16px; }
.m-section-alt { background: #f8fafb; }
.m-section-title { margin: 0 0 10px; font-size: 21px; color: var(--brand); text-align: center; }
.m-section-lead { margin: 0 0 20px; font-size: 15px; color: var(--muted); line-height: 1.85; }

.m-features { display: flex; flex-direction: column; gap: 12px; }
.m-feature { display: flex; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; box-shadow: var(--card-shadow); }
.m-feature b { font-size: 16px; }
.m-feature p { margin: 3px 0 0; font-size: 14px; color: var(--muted); line-height: 1.7; }
.fi { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; font-size: 20px; flex: none; }
.i-amber { background: #fef3c7; } .i-lime { background: #ecfccb; } .i-green { background: #dcfce7; }

/* ページ */
.m-page { padding: 16px 16px 96px; }      /* 下部固定CTAぶんの余白 */
.m-crumbs { display: flex; gap: 8px; font-size: 14px; color: var(--subtle); margin-bottom: 12px; }
.m-crumbs a { color: var(--subtle); text-decoration: none; }
.m-crumbs b { color: var(--text); }
.m-page-title { margin: 0 0 6px; font-size: 24px; color: var(--brand); }
.m-page-lead { margin: 0 0 16px; font-size: 15px; color: var(--muted); }

/* ★ 検索欄 16px（14章 2.1） */
.m-searchbox { margin-bottom: 12px; }
.m-input {
  width: 100%; padding: 13px 15px; border-radius: 11px;
  border: 1px solid var(--line-strong);
  font-size: 16px;                         /* ★ 16px 未満にしない */
  font-family: inherit; min-height: 48px; background: #fff;
}
.m-input:focus { outline: 2px solid var(--action); outline-offset: 1px; border-color: var(--action); }

/* フィルタ行 */
.m-filter-row { display: flex; gap: 9px; margin-bottom: 12px; }
.m-filter-btn {
  flex: 1; min-height: 48px; padding: 0 15px; border-radius: 11px;
  border: 1px solid var(--line-strong); background: #fff;
  font-family: inherit; font-size: 16px; color: var(--text);
  display: flex; align-items: center; justify-content: space-between; gap: 8px; cursor: pointer;
}
.m-filter-count {
  background: var(--action); color: #fff; border-radius: 999px;
  min-width: 24px; height: 24px; display: none; place-items: center;
  font-size: 13px; font-weight: 700; padding: 0 7px;
}
.m-filter-count.is-on { display: grid; }
.m-sort {
  min-height: 48px; padding: 0 11px; border-radius: 11px;
  border: 1px solid var(--line-strong); background: #fff;
  font-family: inherit; font-size: 16px; flex: none; width: 118px;
}

/* チップ（適用中） */
.m-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.m-chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 0 13px; border-radius: 999px;
  background: var(--action-bg); color: var(--action-fg); border: 1px solid #bef264;
  font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit;
}
.m-chip-clear { background: none; border: none; color: var(--muted); text-decoration: underline; font-size: 14px; font-family: inherit; cursor: pointer; min-height: 40px; }

.m-results-count { font-size: 15px; color: var(--muted); margin-bottom: 12px; }
.m-results-count b { font-size: 20px; color: var(--brand); }

/* ══ カード ══ */
.m-cards { display: flex; flex-direction: column; gap: 14px; }
.m-card { background: #fff; border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--card-shadow); overflow: hidden; }
.m-card.is-paused { opacity: .72; }
/* サムネイル（あるものだけ） */
.m-card-thumb { width: 100%; height: 150px; object-fit: cover; display: block; border-bottom: 1px solid var(--line); background: #f2f4f6; }
.m-card-head { padding: 15px 15px 0; }
.m-card-title { margin: 0 0 3px; font-size: 18px; font-weight: 700; line-height: 1.4; }
.m-card-title .paused-tag { color: var(--danger); font-size: 13px; margin-left: 5px; }
.m-card-place { margin: 0; font-size: 14px; color: var(--subtle); }
.m-card-org { display: inline-block; margin-top: 8px; padding: 4px 10px; border-radius: 999px; background: #e7f0fa; color: #2f4f74; font-size: 12px; font-weight: 600; }

.m-badges { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 15px 0; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.badge-target { background: #f3e8ff; color: #6b21a8; }
.badge-ask { background: #f3f4f6; color: #374151; }   /* お知らせ「その他」 */
.badge-jp { background: #dbeafe; color: #1e3a8a; }
.badge-event { background: #dbeafe; color: #1e40af; }
.badge-info { background: #dcfce7; color: #14532d; }
.badge-important { background: #fee2e2; color: #991b1b; }

.m-facts { padding: 13px 15px 0; display: flex; flex-direction: column; gap: 9px; }
.m-fact { display: flex; gap: 9px; font-size: 15px; line-height: 1.6; }  /* ★ 14章 2.6：14px→15/16px */
.m-fact-ico { flex: none; font-size: 19px; color: var(--subtle); margin-top: 1px; }
.m-fact-main { font-weight: 600; }
.m-fact-note { color: var(--action-fg); background: var(--action-bg); padding: 1px 7px; border-radius: 5px; font-size: 13px; font-weight: 700; margin-left: 5px; display: inline-block; }
.m-fact-sub { display: block; color: var(--subtle); font-size: 14px; margin-top: 2px; }
.m-fact-warn { color: #92400e; }

.m-msg { padding: 13px 15px 0; }
.m-msg h4 { margin: 0 0 4px; font-size: 12px; color: var(--subtle); font-weight: 700; }
.m-msg p { margin: 0; font-size: 15px; line-height: 1.75; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.m-msg .more { background: none; border: none; padding: 6px 0 0; color: var(--action); font-size: 14px; text-decoration: underline; cursor: pointer; font-family: inherit; min-height: 40px; }

/* ★ 連絡ボタン（44px以上・並列） */
.m-actions { padding: 14px 15px 15px; display: flex; gap: 9px; }
.m-actions .btn { flex: 1; }
.m-links { padding: 0 15px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.m-links .site-link { font-size: 14px; color: var(--action); font-weight: 600; text-decoration: none; min-height: 40px; display: inline-flex; align-items: center; gap: 5px; }
/* SNS リンク（16章 1.5） */
.sns-row { display: inline-flex; gap: 6px; align-items: center; }
.sns-link { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 9px; color: var(--subtle); }
.sns-link:hover { background: #f2f4f6; }
.sns-link.sns-instagram:hover { color: #C13584; }
.sns-link.sns-facebook:hover { color: #1877F2; }
.sns-link.sns-x:hover { color: #000; }
.sns-link.sns-line:hover { color: #06C755; }

/* ボタン */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border-radius: 10px; font-weight: 700; text-decoration: none; cursor: pointer;
  font-family: inherit; border: 1px solid transparent;
  min-height: 48px; padding: 0 16px; font-size: 16px;   /* ★ 48px */
}
.btn-primary {
  background: var(--action); color: #fff;
  box-shadow: 0 1px 2px rgba(21,128,61,.25), 0 2px 8px rgba(21,128,61,.16);
}
.btn-primary:hover { background: var(--action-hover); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--action-ring); }
.btn:active { transform: translateY(1px); }
.btn-outline { background: #fff; border-color: #cfd6dd; color: var(--text); }
.btn-block { width: 100%; }

/* 状態表示 */
.m-state { text-align: center; padding: 40px 18px; background: #fff; border: 1px solid var(--line); border-radius: 13px; }
.m-state-ico { font-size: 40px; margin-bottom: 12px; }
.m-state h3 { margin: 0 0 8px; font-size: 18px; }
.m-state p { margin: 0 0 18px; color: var(--muted); font-size: 15px; line-height: 1.8; }
.m-state-error { border-color: #fecaca; background: #fffbfb; }
.m-state-help { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; color: var(--subtle); line-height: 1.75; }

/* ★ 下部固定CTA（14章 5.1 親指の届く範囲） */
.m-sticky-cta {
  position: sticky; bottom: 0; z-index: 25;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.96); backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
}

/* ★ ボトムシート（14章 5.2）
   .phone-screen の「外」に置き、端末枠（.phone）を基準に固定する。
   スクロールする中身の内側に入れると、ページと一緒に流れてしまう。   */
/* 閉じているシートを端末枠の外に見せないためのクリップ層 */
.m-sheet-layer {
  position: absolute; inset: 14px;          /* .phone の padding ぶん内側 */
  border-radius: 28px; overflow: hidden;     /* ★ はみ出しを隠す */
  pointer-events: none; z-index: 40;
}
.m-sheet-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.42);
  opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 1;
}
/* 開いている間だけ操作を受け付ける（閉じている間は背後のページを触れる） */
.m-sheet-backdrop.is-open { opacity: 1; pointer-events: auto; }

.m-sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  background: #fff;
  border-radius: 20px 20px 28px 28px;        /* 下は端末の角丸に合わせる */
  transform: translateY(100%);               /* クリップ層の外＝見えない */
  transition: transform .3s cubic-bezier(.32,.72,0,1);
  max-height: calc(100% - 40px);             /* 上に40pxの余白を残す */
  display: flex; flex-direction: column;
  box-shadow: 0 -8px 32px rgba(0,0,0,.18);
  overscroll-behavior: contain;              /* スクロール連鎖を止める */
  overflow: hidden;                          /* 角丸から中身がはみ出さない */
}
.m-sheet-handle-wrap { position: relative; flex: none; }
.m-sheet.is-open { transform: translateY(0); pointer-events: auto; }
.m-sheet.is-dragging { transition: none; }   /* ドラッグ中は追従させる */

/* ★ シートを開いている間は背後をスクロールさせない */
.phone-screen.is-locked { overflow: hidden; }

/* つまみ：見た目は細い線だが、当たり判定は44px（14章 2.5） */
.m-sheet-handle {
  position: relative; flex: none;
  height: 30px; display: grid; place-items: center;
  cursor: grab; touch-action: none;
}
.m-sheet-handle::after {
  content: ""; width: 40px; height: 4px; background: #d1d5db; border-radius: 999px;
}
.m-sheet-handle::before {           /* 当たり判定の拡張（シート内に収める） */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 44px;
}
.m-sheet-handle:active { cursor: grabbing; }
.m-sheet-handle:active::after { background: #9ca3af; }
.m-sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 16px 12px; border-bottom: 1px solid var(--line); }
.m-sheet-head h2 { margin: 0; font-size: 18px; }
.m-sheet-close { width: 44px; height: 44px; border: none; background: none; font-size: 19px; color: var(--muted); cursor: pointer; }
.m-sheet-body { padding: 16px; overflow-y: auto; flex: 1; }
.m-sheet-foot { display: flex; gap: 10px; padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.m-sheet-foot .btn { flex: 1; }
.m-sheet-foot .btn-primary { flex: 2; }

/* ★ チップUI（14章 2.4：入れ子スクロールを避ける） */
.m-fgroup { margin-bottom: 22px; }
.m-fgroup h3 { margin: 0 0 10px; font-size: 15px; }
.m-fchips { display: flex; flex-wrap: wrap; gap: 8px; }
.m-fchip {
  min-height: 44px; padding: 0 15px; border-radius: 999px;   /* ★ 44px */
  border: 1px solid var(--line-strong); background: #fff;
  font-family: inherit; font-size: 15px; color: var(--text);
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
}
.m-fchip .cnt { font-size: 13px; color: var(--subtle); }
.m-fchip.is-on { background: var(--action); border-color: var(--action); color: #fff; font-weight: 700; }
.m-fchip.is-on .cnt { color: rgba(255,255,255,.85); }
.m-fchip:disabled { opacity: .4; cursor: not-allowed; }

/* お知らせ */
.m-news { display: flex; flex-direction: column; gap: 12px; }
.m-news-item { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 15px; box-shadow: var(--card-shadow); }
/* 実データの添付画像（スマホは横幅いっぱい） */
.m-news-thumb { width: 100%; height: 148px; object-fit: cover; border-radius: 8px; margin-bottom: 11px; display: block; }
.m-news-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 7px; }
.m-news-item h3 { margin: 0 0 5px; font-size: 16px; line-height: 1.5; }
.m-news-item p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.muted { color: var(--subtle); font-size: 13px; }
.jp-only { background: #f3f4f6; color: #4b5563; padding: 3px 8px; border-radius: 5px; font-size: 11.5px; font-weight: 600; }

.m-cat-tabs { display: flex; gap: 8px; margin-bottom: 16px; overflow-x: auto; padding-bottom: 4px; }
.m-cat-tab {
  min-height: 44px; padding: 0 16px; border-radius: 999px; flex: none;
  border: 1px solid var(--line-strong); background: #fff;
  font-family: inherit; font-size: 15px; color: var(--muted); cursor: pointer;
}
.m-cat-tab.is-active { background: var(--action); border-color: var(--action); color: #fff; font-weight: 700; }

/* フッター */
.m-footer { background: #22384f; color: #e5e7eb; padding: 28px 16px; }
.m-footer b { color: #bcd5f0; font-size: 17px; }
.m-footer p { margin: 8px 0 14px; font-size: 14px; line-height: 1.8; color: #d1d5db; }
.m-footer ul { margin: 0; padding: 0; list-style: none; }
.m-footer li { font-size: 14px; line-height: 2.2; color: #d1d5db; border-bottom: 1px solid rgba(255,255,255,.08); }
.m-footer .new { color: #bcd5f0; font-weight: 600; }

/* ══ 地図（ベースマップ＋エリアピン） ══ */
.m-map { background: #fff; border: 1px solid var(--line); border-radius: 11px; margin-bottom: 12px; overflow: hidden; }
.m-map summary {
  display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 15px;
  cursor: pointer; list-style: none; font-size: 15.5px;
}
.m-map summary::-webkit-details-marker { display: none; }
.m-map summary::after { content: "expand_more"; font-family: 'Material Symbols Rounded'; margin-left: auto; color: var(--subtle); font-size: 22px; }
.m-map[open] summary::after { content: "expand_less"; }
.m-map summary .icon { color: var(--action); }
.m-map summary b { display: block; font-size: 15.5px; }
.m-map summary small { font-size: 12.5px; color: var(--subtle); }
.m-map-inner { border-top: 1px solid var(--line); padding: 12px; }
.m-map-stage { position: relative; }
.m-map-stage > img { width: 100%; height: auto; display: block; }
.map-pins { position: absolute; inset: 0; }
/* 地図のピンは「見る」だけ（タップ対象にしない） */
.map-pin {
  position: absolute; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  pointer-events: none;
}
.map-pin-n {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  color: #fff; font-size: 14px; font-weight: 700;
  box-shadow: 0 2px 5px rgba(0,0,0,.28), 0 0 0 2.5px #fff;
}
.map-pin-label {
  font-size: 10.5px; font-weight: 700; color: var(--action-fg);
  background: rgba(255,255,255,.92); border-radius: 3px; padding: 0 4px; white-space: nowrap;
}
.map-pin.is-on .map-pin-n { box-shadow: 0 2px 6px rgba(0,0,0,.3), 0 0 0 3px #fff, 0 0 0 6px currentColor; }

/* ★ トップの学習会は折りたたみ */
.m-fold { background: none; border: none; }
.m-fold > summary {
  display: flex; align-items: center; gap: 8px;
  min-height: 48px; cursor: pointer; list-style: none;
  font-size: 19px; font-weight: 700; color: var(--brand);
  font-family: 'Mochiy Pop P One', 'Zen Kaku Gothic New', sans-serif;
}
.m-fold > summary::-webkit-details-marker { display: none; }
.m-fold > summary::after {
  content: "expand_more"; font-family: 'Material Symbols Rounded';
  margin-left: auto; color: var(--subtle); font-size: 26px; font-weight: 400;
}
.m-fold[open] > summary::after { content: "expand_less"; }
.m-fold-count {
  font-family: "Zen Kaku Gothic New", sans-serif;
  font-size: 13px; font-weight: 700; color: var(--action-fg);
  background: var(--action-bg); border-radius: 999px; padding: 3px 10px;
}
.m-fold .m-cards { margin-top: 8px; }
.m-fold-more { margin-top: 12px; }

/* ★ エリア選択は大きなボタンで（44px以上・14章 2.5） */
.m-area-list {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line);
}
.m-area-btn {
  display: flex; align-items: center; gap: 10px;
  min-height: 54px; padding: 0 12px 0 10px; border-radius: 10px;
  background: #fff; border: 1px solid #cfd6dd;
  font-family: inherit; font-size: 15px; color: var(--text);
  cursor: pointer; text-align: left;
}
.m-area-btn:active { background: #f4f6f8; }
.m-area-btn.is-on { border-color: var(--action); background: var(--action-bg); font-weight: 700; }
.m-area-btn.is-on .icon { margin-left: auto; color: var(--action); }
/* 地図のピンと同じ見た目（白い縁＋影）に揃える */
.m-area-dot {
  display: grid; place-items: center; flex: none;
  width: 30px; height: 30px; border-radius: 50%;
  color: #fff; font-size: 14px; font-weight: 700;
  box-shadow: 0 2px 5px rgba(0,0,0,.28), 0 0 0 2.5px #fff;
}
.m-area-name { flex: 1; }

/* ★ 「詳しく見る」トグル */
.m-card-toggle {
  display: flex; align-items: center; justify-content: center; gap: 5px;
  width: 100%; min-height: 52px;
  background: #f7f9fa; border: none; border-top: 1px solid var(--line);
  font-family: inherit; font-size: 15px; font-weight: 700;
  color: var(--action); cursor: pointer;
}
.m-card.is-open .m-card-toggle { background: #fff; }
.m-card-detail .m-msg { padding-top: 13px; }
.m-card-detail .m-msg p { -webkit-line-clamp: unset; display: block; }

.m-footer li a { color: inherit; text-decoration: none; }

/* フッターの事務局情報 */
.m-footer-office { margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.12); }
.m-footer-office b { color: #bcd5f0; font-size: 15px; }
.m-footer-office p { margin: 8px 0 0; font-size: 13px; line-height: 1.9; color: #d1d5db; }
.m-footer-office .icon { color: #bcd5f0; vertical-align: -3px; }
.m-footer-note { font-size: 12px !important; color: #9ca3af !important; }

/* 住所と「詳しく見る」の間に余白 */
.m-facts { padding-bottom: 15px; }
.m-card:not(.is-open) .m-facts { padding-bottom: 20px; }

/* 支援者バナーとフッターの間隔 */
.m-sup-banner { margin-bottom: 32px; }

/* ★ サイト全体のテーマ：イベント用スライドの雰囲気（WEB版と共通） */
.m-section-title, .m-page-title { letter-spacing: .1em; }
.m-page-title { padding-bottom: 8px; border-bottom: 1px solid rgba(47,79,116,.45); }
