/* GymBabyBird（ブランドガイドライン: .company/creative/brand-guidelines.md）
   緑 = 空き・メインボタン、桃色 = 新しい空き・お知らせ、青 = 差し色・土曜。白基調・OSのダークモードでも明るいまま */
:root {
  color-scheme: light;
  --green: #1E7A47; --green-mid: #3DBB6E; --green-dark: #2A9455; --green-soft: #EAF7EF; --green-line: #D5E6DB;
  --peach: #E0654B; --peach-text: #C2462B; --peach-soft: #FFF1ED; --peach-line: #FFC9BC; --peach-pale: #FFF6F3;
  --blue: #2F6FB5; --blue-dark: #1F4F86;
  --fg: #2B2B2B; --sub: #4D5A52; --muted: #646E68; /* 文字用。白地 5.3:1・薄緑地 4.5:1 以上（UX 点検 #1） */ --line: #E3EFE7; --soft: #F1F6F3;
  --card: #FFFFFF; --veil: rgba(255, 255, 255, .9);
  --note: #FFFBEA; --note-line: #F1DE9C; --note-text: #5A4A12;
  --ng: #8A938D; --open: #6B5BA8; --lottery-bg: #FFF4D6; --lottery: #A06A00; --local: #6A4FB3;
  --nav-h: 4.5rem; --ad-h: 50px; /* 下のメニューは文字の大きさに合わせて高くなる。広告は 320×50 のまま */
  --safe-b: env(safe-area-inset-bottom, 0px);  /* iPhone のホームバーの高さ */
}
* { box-sizing: border-box; }
html { background: #EAF6EE; }
body { margin: 0; color: var(--fg); background: transparent;
       font: .9375rem/1.6 "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Hiragino Sans", sans-serif; }
a { color: var(--blue); }
a:hover { color: var(--blue-dark); }
h1, h2, h3 { line-height: 1.35; }
.muted { color: var(--sub); font-size: .85rem; }
.error { color: var(--peach-text); font-size: .85rem; }

/* ---------- 背景: 四隅から重なる葉がそよぐ＋木漏れ日＋舞う葉と花びら ---------- */
.gb-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
         background: linear-gradient(180deg, #D3EFDB 0%, #EAF7ED 50%, #CDEBD5 100%); }
.gb-bg .sun { position: absolute; right: -10%; top: -15%; width: 70vmax; height: 70vmax; border-radius: 50%;
              background: radial-gradient(circle, rgba(255, 246, 204, .9) 0%, rgba(255, 246, 204, 0) 60%); }
.gb-bg .corner { position: absolute; width: min(320px, 55vw); height: min(320px, 55vw); }
.gb-bg .tl { left: 0; top: 0; } .gb-bg .tr { right: 0; top: 0; }
.gb-bg .bl { left: 0; bottom: 0; } .gb-bg .br { right: 0; bottom: 0; }
.gb-bg .ml { left: 0; top: 45%; width: min(160px, 30vw); height: min(240px, 45vw); }
.gb-bg .mr { right: 0; top: 58%; width: min(160px, 30vw); height: min(240px, 45vw); }
.gb-bg .spots { position: absolute; inset: 0; width: 100%; height: 100%; }
.gb-bg .fall { position: absolute; top: -24px; }
@keyframes gb-fall { 0% { transform: translate(0, 0) rotate(0); opacity: 0 } 10% { opacity: .9 }
                     100% { transform: translate(60px, 105vh) rotate(540deg); opacity: 0 } }
@keyframes gb-flut { 0%, 100% { transform: rotate(-2deg) } 50% { transform: rotate(2deg) } }
@keyframes gb-beam { 0%, 100% { opacity: .55 } 50% { opacity: 1 } }
.gb-bg .fall { animation: gb-fall 11s linear infinite; }
.gb-bg .f2 { animation-delay: 2.5s; animation-duration: 13s; } .gb-bg .f3 { animation-delay: 5s; }
.gb-bg .f4 { animation-delay: 7s; animation-duration: 12s; } .gb-bg .f5 { animation-delay: 9s; animation-duration: 14s; }
.gb-flut { transform-box: view-box; animation: gb-flut 5.5s ease-in-out infinite; }
.gb-flut2 { transform-box: view-box; animation: gb-flut 6.8s ease-in-out infinite reverse; }
.gb-beam { animation: gb-beam 5s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .gb-bg .fall { display: none; }
}

/* ---------- ヘッダー ---------- */
.site-header { background: rgba(255, 255, 255, .86); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20;
               backdrop-filter: blur(4px); }
.header-inner { max-width: 1160px; margin: 0 auto; padding: 10px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--fg); }
.brand-name { font-size: 1.375rem; font-weight: 900; color: var(--green); letter-spacing: .5px; line-height: 1.1; }
/* キャッチコピー。広い画面はロゴの横、スマホ（600px 未満）は名前の下に小さく。折り返さない */
.brand-text { display: flex; align-items: baseline; gap: 4px 12px; }
.brand-tag { font-size: .8125rem; font-weight: 700; color: var(--sub); white-space: nowrap; }
@media (max-width: 599px) {
  .brand-text { flex-direction: column; align-items: flex-start; }
  .brand-tag { font-size: .75rem; line-height: 1.2; }
}
.hello-sub { display: block; font-size: .8125rem; font-weight: 700; color: var(--green); margin: 2px 0; }
.searchbox { flex: 1 1 260px; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; margin: 0;
             border-radius: 22px; background: var(--card); border: 1px solid var(--green-line); }
.page-main .searchbox { flex: none; }
.searchbox input { border: 0; background: transparent; font: inherit; font-size: .9375rem; flex: 1; outline: none; color: var(--fg); min-width: 0; }
.top-nav { display: none; gap: 4px; margin-left: auto; }
.top-nav a { padding: 8px 16px; border-radius: 20px; color: var(--fg); text-decoration: none; font-weight: 700; font-size: .875rem; }
.top-nav a[aria-current] { background: var(--green); color: #fff; }
.back-link { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; margin-left: -8px; }

/* ---------- 下のメニュー（スマホ）と広告の仮置き ---------- */
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--nav-h) + var(--safe-b)); z-index: 30; background: #fff;
              border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
              padding-bottom: var(--safe-b); }
.bottom-nav a { text-decoration: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
                font-size: .75rem; font-weight: 700; color: #5C6660; }
.bottom-nav .ico { width: 26px; height: 26px; border-radius: 9px; background: #E6ECE8; display: grid; place-items: center; }
.bottom-nav .ico svg { width: 16px; height: 16px; stroke: #5C6660; }
.bottom-nav a[aria-current] { color: var(--green); }
.bottom-nav a[aria-current] .ico { background: var(--green-mid); }
.bottom-nav a[aria-current] .ico svg { stroke: #fff; }
.ad-slot { border-radius: 8px; background: #EDEDED; border: 1px dashed #B5B5B5; display: flex; align-items: center; justify-content: center;
           font-size: .75rem; color: #5E5E5E; }
.ad-banner { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + var(--safe-b) + 6px); width: 320px; max-width: calc(100% - 16px);
             height: var(--ad-h); z-index: 25; }
.no-ads { --ad-h: 0px; }
.ad-box { width: 300px; max-width: 100%; height: 250px; }

/* ---------- レイアウト ---------- */
.page { max-width: 1160px; margin: 0 auto; padding: 14px 16px 16px; display: flex; flex-wrap: wrap; gap: 24px; }
.page-main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.page-aside { display: none; }
/* 下のメニュー・広告の枠・iPhone の下の安全領域の分を、ページの一番下（フッター）で空ける。前は .page で空けていて、フッターが広告の下に隠れていた */
.site-footer { display: flex; gap: 0 14px; flex-wrap: wrap; justify-content: center; font-size: .75rem;
               padding: 8px 16px calc(var(--nav-h) + var(--ad-h) + var(--safe-b) + 24px); }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; }
.veil { background: var(--veil); border-radius: 16px; padding: 4px 12px; }
.section-title { margin: 6px 0 0; font-size: 1rem; font-weight: 700; align-self: flex-start; padding: 2px 12px; border-radius: 12px; background: var(--veil); }
.page-title { margin: 0; font-size: 1.25rem; font-weight: 900; }
/* 「＜ 戻る」（改訂13）。押せる範囲は 44px 以上 */
.back-btn { align-self: flex-start; display: inline-flex; align-items: center; gap: 2px; min-height: 44px; min-width: 44px; padding: 0 16px 0 8px;
            border-radius: 22px; color: var(--fg); font-weight: 700; font-size: .9375rem; text-decoration: none; }
.back-btn:hover { color: var(--green); }
.back-btn:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; }
.hello { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 22px; background: var(--veil); }
.hello h1 { margin: 0; font-size: 1.25rem; font-weight: 900; }
/* あいさつ（改訂12）。ページの一番上に1行 */
.greet { display: flex; align-items: center; gap: 8px; margin: 0; padding: 6px 14px; border-radius: 18px; background: var(--veil); font-size: .9375rem; }
.greet b { color: var(--green); }
.greet-empty { font-size: .8125rem; }
.greet-empty small { margin-left: 4px; }
/* プロフィール（改訂12） */
.profile-entry { display: flex; align-items: center; gap: 12px; min-height: 64px; text-decoration: none; color: var(--fg); }
.profile-entry > span { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.profile-entry b { font-size: 1.0625rem; }
.profile-list { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.profile-list div { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.profile-list dt { color: var(--sub); font-size: .8125rem; }
.profile-list dd { margin: 0; font-weight: 700; }

/* ---------- 部品 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 20px; border-radius: 22px;
       background: var(--green); color: #fff; text-decoration: none; font: inherit; font-weight: 700; font-size: .875rem; border: 1px solid var(--green);
       cursor: pointer; white-space: nowrap; }
.btn:hover { background: #17633A; color: #fff; }
.btn.outline { background: #fff; color: var(--fg); border-color: var(--green-line); }
.btn.outline:hover { background: var(--green-soft); color: var(--fg); }
.btn.peach { background: var(--peach-soft); color: #9A3B26; border-color: var(--peach-line); }
.btn.danger { background: var(--peach-text); color: #fff; }
.btn.danger:hover { background: #9A3B26; color: #fff; }
.btn.danger-text { color: var(--peach-text); }
.btn.small { min-height: 44px; padding: 0 14px; font-size: .8125rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 20px; font-size: .8125rem; font-weight: 700;
        background: #fff; color: var(--fg); border: 1px solid var(--green-line); text-decoration: none; white-space: nowrap; }
.chip[aria-current] { background: var(--green); color: #fff; border-color: var(--green); }
.tabs { display: flex; gap: 8px; }
.tabs a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border-radius: 20px; font-weight: 700; font-size: .875rem;
          background: #fff; color: var(--fg); border: 1px solid var(--green-line); text-decoration: none; }
.tabs a[aria-current] { background: var(--fg); color: #fff; border-color: var(--fg); }
/* 市区をえらぶ（2026-10-12）。閉じているときは今の市区を1行、開くと県の市区をすべて折り返して並べる */
.city-pick { border-radius: 20px; background: var(--veil); border: 1px solid var(--green-line); }
.city-pick summary { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 14px; cursor: pointer; list-style: none; font-size: .875rem; }
.city-pick summary::-webkit-details-marker { display: none; }
.city-pick-label { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.city-pick-more { display: inline-flex; align-items: center; gap: 4px; color: var(--green); font-weight: 700; white-space: nowrap; }
.city-pick[open] .chev { transform: rotate(180deg); }
.city-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr)); gap: 8px; padding: 4px 12px 12px; }
.city-grid .chip { justify-content: center; white-space: normal; text-align: center; padding: 4px 8px; }
.hello-lead { display: block; font-size: .875rem; color: var(--sub); font-weight: 700; margin-top: 2px; }
.searchbox .search-clear { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; margin-right: -10px; color: var(--sub); border-radius: 22px; }
.searchbox .search-clear[hidden] { display: none; }
.searchbox input::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
.toast { flex-wrap: wrap; }
.toast-push { flex: 1 0 100%; border-top: 1px solid rgba(255,255,255,.15); }
.toast-push[hidden] { display: none; }
.toast-push a { display: inline-flex; align-items: center; min-height: 44px; color: #9FE0B5; font-weight: 700; }
/* 県のタブ（2026-10-12）。2つを半分ずつ並べる */
.seg { display: flex; padding: 4px; gap: 4px; border-radius: 24px; background: var(--veil); border: 1px solid var(--green-line); }
.seg a { flex: 1 1 0; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 12px;
         border-radius: 20px; font-weight: 700; font-size: .9375rem; color: var(--fg); text-decoration: none; }
.seg a[aria-current] { background: var(--green); color: #fff; }
.seg-n { font-size: .75rem; font-weight: 400; opacity: .85; }
.section-n { font-size: .75rem; font-weight: 400; margin-left: 8px; }
.tag { font-size: .75rem; padding: 2px 8px; border-radius: 10px; background: var(--green-soft); color: var(--green); white-space: nowrap; max-width: 100%; }
.tag.peach { white-space: normal; } /* 「通知オン: 部屋名…」は長いので折り返す */
.tag.gray { background: var(--soft); color: var(--sub); }
.tag.peach { background: #FFE9E3; color: #9A3B26; }
.tag.lottery { background: var(--lottery-bg); color: var(--lottery); }
.notice { margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--note); border: 1px solid var(--note-line); color: var(--note-text);
          font-size: .8125rem; line-height: 1.6; }
.notice.pink { background: var(--peach-pale); border-color: #FFD9CF; color: #6B3A2E; }
.error-box { background: var(--peach-soft); border-color: var(--peach-line); color: #9A3B26; }
.empty { background: var(--veil); border-radius: 16px; padding: 32px 16px; text-align: center; color: var(--sub); }
.empty .big { display: block; font-size: 2rem; }

/* ---------- 体育館カード ---------- */
.gym-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.gym-card { position: relative; display: flex; gap: 12px; padding: 12px; border-radius: 18px; background: #fff; border: 1px solid var(--line);
            color: inherit; text-decoration: none; }
.gym-card.fav { border: 2px solid var(--green-mid); }
.gym-card .link { position: absolute; inset: 0; z-index: 1; border-radius: 18px; }
.gym-card:hover { border-color: var(--green-mid); }
.gym-thumb { width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; background: #DDF2E4; overflow: hidden; display: grid; place-items: center; }
.gym-thumb svg { width: 26px; height: 26px; }
.gym-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.gym-area { font-size: .75rem; color: var(--sub); }
.gym-name { margin: 0; font-size: 1.0625rem; font-weight: 700; }
.gym-rooms { display: flex; flex-wrap: wrap; gap: 4px 6px; }
.star-form { position: relative; z-index: 2; margin: 0; align-self: center; }
.star { width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer; padding: 0; display: grid; place-items: center; }
.star svg { width: 26px; height: 26px; }

/* ---------- 体育館の画面 ---------- */
.gym-head { display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: center; padding: 16px; border-radius: 22px; background: var(--veil); }
.gym-photo { width: 100%; height: 96px; margin: 0; border-radius: 16px; background: #DDF2E4; overflow: hidden; display: grid; place-items: center;
             color: #2A6B45; font-size: .75rem; text-align: center; }
.gym-photo img { width: 100%; height: 100%; object-fit: cover; }
.gym-title { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.gym-title h1 { margin: 0; font-size: 1.5rem; font-weight: 900; }
.gym-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.gym-actions > * { flex: 1 1 140px; }
.gym-actions form { margin: 0; display: flex; min-width: 0; }
.gym-actions form .btn { flex: 1; min-width: 0; text-align: center; padding-top: 6px; padding-bottom: 6px; }
.gym-head .notice { flex-basis: 100%; }
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 18px; background: var(--veil); }
.week-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex: 1 1 320px; }
.week-label { text-align: center; display: flex; flex-direction: column; }
.week-label b { font-size: .9375rem; }
.round { width: 44px; height: 44px; border-radius: 22px; border: 1px solid var(--green-line); background: #fff; display: grid; place-items: center;
         text-decoration: none; color: var(--fg); flex-shrink: 0; }
.round.disabled { visibility: hidden; }
.round span { display: none; }
.unit-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.unit-filter a { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-height: 44px; line-height: 1.25; padding: 4px 12px; border-radius: 16px;
                 border: 1px solid var(--green-line); background: #fff; text-decoration: none; color: var(--fg); font-size: .8125rem; font-weight: 700; }
.unit-filter a small { font-size: .75rem; font-weight: 500; color: var(--sub); }
.unit-filter a[aria-current] { background: var(--green); border-color: var(--green); color: #fff; }
.unit-filter a[aria-current] small { color: #DDF2E4; }
.bebi-say { display: flex; align-items: flex-end; gap: 8px; }
.bebi-say .bubble { flex: 1; padding: 8px 12px; border-radius: 14px 14px 14px 4px; background: #fff; border: 1px solid var(--peach-line); font-size: .8125rem; line-height: 1.5;
                    word-break: keep-all; overflow-wrap: anywhere; }  /* 文のまとまりの切れ目（phrase_breaks）で折り返す。入りきらないときだけ途中で */
.bebi-say .bubble b { color: var(--peach-text); }
.bebi-say.sad .bubble { border-color: var(--green-line); }
.bebi-say.sad .bubble b { color: var(--sub); }

/* 空き表: スマホは「日付×時間帯」、パソコンは「時間帯×曜日」の横長 */
.avail { border-radius: 14px; background: #fff; border: 1px solid var(--line); overflow-x: auto; }
.avail table { border-collapse: collapse; width: 100%; }
.avail th, .avail td { text-align: center; padding: 0; border-top: 1px solid #EEF3F0; font-size: .875rem; }
.avail thead th { background: var(--soft); font-size: .75rem; font-weight: 700; color: var(--sub); padding: 6px 2px; border-top: 0; white-space: nowrap; }
.avail .rowhead { font-size: .75rem; font-weight: 700; padding: 0 6px; white-space: nowrap; text-align: left; width: 64px;
                 position: sticky; left: 0; z-index: 1; background: #fff; } /* 文字を大きくして表が横にスクロールしても、日付は見えたまま */
.avail thead .rowhead { background: var(--soft); }
.avail .wd-sat { color: var(--blue); } .avail .wd-sun { color: var(--peach-text); }
.avail .hl { color: var(--green); }
.avail .whole { font-size: .75rem; color: var(--muted); height: 2.5rem; }
.avail .whole.lottery { color: var(--lottery); background: var(--lottery-bg); }
.avail .whole.local { color: var(--local); }
.cell { min-height: 2.5rem; display: flex; align-items: center; justify-content: center; gap: 2px; font-weight: 700; flex-direction: column; line-height: 1.1; }
.cell small { font-size: .75rem; font-weight: 500; }
.cell.ok { color: var(--green); background: var(--green-soft); }
.cell.ok.is-new { color: #fff; background: var(--peach); }
.cell.partial { color: var(--green); background: var(--green-soft); }
.cell.ng { color: var(--ng); font-weight: 500; }
.cell.open { color: var(--open); font-size: .75rem; }
.cell.local { color: var(--local); font-size: .75rem; }
.cell.lottery { color: var(--lottery); background: var(--lottery-bg); font-size: .75rem; }
.cell.other { color: var(--muted); }
.avail-desk { display: none; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 6px 12px; border-radius: 10px; background: var(--veil); font-size: .75rem; color: #3D4842; }
.legend b.ok { color: var(--green); } .legend b.new { color: var(--peach-text); }

/* 読み込み中: ベビが飛び回る */
.loading { position: relative; height: 280px; border-radius: 24px; background: rgba(255, 255, 255, .6); border: 1px solid #D5EBDC;
           display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 24px; overflow: hidden; text-align: center; }
.loading .branches { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
.loading .flyer { position: absolute; left: 50%; top: 80px; margin-left: -40px; }
@keyframes gb-fly { 0% { transform: translate(-110px, 30px) rotate(-8deg) } 25% { transform: translate(0, -40px) rotate(6deg) }
                    50% { transform: translate(110px, 20px) rotate(-6deg) } 75% { transform: translate(10px, 60px) rotate(8deg) }
                    100% { transform: translate(-110px, 30px) rotate(-8deg) } }
@keyframes gb-flap { 0%, 100% { transform: scaleY(1) } 50% { transform: scaleY(.45) } }
@keyframes gb-dot { 0%, 100% { opacity: .25 } 50% { opacity: 1 } }
.gb-bird { animation: gb-fly 4.2s ease-in-out infinite; }
.gb-wing { transform-origin: 31px 37px; animation: gb-flap .32s ease-in-out infinite; }
.gb-d1 { animation: gb-dot 1.2s infinite; } .gb-d2 { animation: gb-dot 1.2s .2s infinite; } .gb-d3 { animation: gb-dot 1.2s .4s infinite; }
.loading p { margin: 0; position: relative; }
.loading .say { font-size: 1.0625rem; font-weight: 900; color: var(--green); }
.steps { list-style: none; margin: 0; padding: 12px 14px; border-radius: 16px; background: var(--veil); display: flex; flex-direction: column; gap: 8px; }
.steps li { display: flex; align-items: center; gap: 10px; font-size: .8125rem; color: var(--muted); }
.steps .dot { width: 22px; height: 22px; border-radius: 11px; border: 2px solid #D5DDD8; display: grid; place-items: center; flex-shrink: 0; }
.steps li.done { color: var(--fg); } .steps li.done .dot { background: var(--green-mid); border-color: var(--green-mid); }
.steps li.now { color: var(--green); font-weight: 700; } .steps li.now .dot { border-color: var(--green-mid); }

/* 募集 */
.post-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.post-card { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 14px; background: #fff; border: 1px solid var(--line);
             text-decoration: none; color: var(--fg); }
.post-card:hover { border-color: var(--green-mid); color: var(--fg); }
.post-card .card-head, .card-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.post-when { margin: 4px 0 0; font-weight: 700; }
.post-where { margin: 0; font-size: .8125rem; }
.post-card p { margin: 0; }
.post-message { white-space: pre-wrap; background: var(--soft); padding: 8px 12px; border-radius: 12px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.actions form { margin: 0; }

/* フォーム */
.simple-form { display: grid; gap: 12px; }
.simple-form label { display: grid; gap: 4px; font-size: .8125rem; font-weight: 700; }
.simple-form input:not([type=checkbox]):not([type=radio]), .simple-form select, .simple-form textarea, .select {
  min-height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--green-line); background: #fff; font: inherit; font-size: .9375rem; color: var(--fg); }
.simple-form textarea { height: auto !important; padding: 8px 12px !important; }
.simple-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rules { background: var(--peach-pale); border: 1px solid #FFD9CF; border-radius: 12px; padding: 10px 12px; font-size: .8125rem; color: #6B3A2E; }
.rules p { margin: 0 0 6px; }
.check { display: flex !important; gap: 8px; align-items: center; font-weight: 700; }
.check input, .time-pill input { width: 18px; height: 18px; accent-color: var(--green); margin: 0; }
.time-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.time-pill { flex: 1 1 80px; min-height: 44px; border-radius: 20px; background: #fff; border: 1px solid var(--peach-line); display: flex !important;
             flex-direction: row !important; align-items: center; justify-content: center; gap: 6px; font-size: .875rem; font-weight: 700; cursor: pointer; }
.day-pills { display: flex; gap: 6px; }
.day-pills label { flex: 1; margin: 0; position: relative; display: block; }
.day-pills input { position: absolute; opacity: 0; pointer-events: none; }
.day-pills span { display: flex; min-height: 44px; align-items: center; justify-content: center; border-radius: 20px; background: #fff;
                  border: 1px solid var(--green-line); font-size: .8125rem; font-weight: 700; cursor: pointer; }
.day-pills input:checked + span { background: var(--green); color: #fff; border-color: var(--green); }
.day-pills input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
/* キーボード操作の枠（UX 点検 #2）。マウス・タッチでは出ない */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.searchbox:focus-within { outline: 2px solid var(--blue); outline-offset: 2px; }
.gym-card:has(.link:focus-visible) { outline: 2px solid var(--blue); outline-offset: 2px; }
/* 押したあとの状態（UX 点検 #5） */
button[aria-busy="true"], .btn[aria-busy="true"] { opacity: .65; cursor: progress; }
/* 削除の確認（UX 点検 #4） */
.confirm { display: inline-block; }
.confirm > summary { list-style: none; cursor: pointer; }
.confirm > summary::-webkit-details-marker { display: none; }
.confirm[open] > summary { display: none; }
.confirm-box { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 14px;
               background: var(--peach-pale); border: 1px solid #FFD9CF; color: #6B3A2E; font-size: .875rem; }
.empty .ico { display: block; margin: 0 auto 6px; }
.notice .ico { vertical-align: -3px; margin-right: 4px; }
.notify-times { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 16px; background: var(--peach-pale); border: 1px solid #FFD9CF; }
.notify-times .body { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.notify-times .ttl { font-size: .8125rem; font-weight: 700; color: #6B3A2E; }
.fav-setting { display: flex; flex-direction: column; gap: 12px; }
.fav-setting .head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fav-setting .lead { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--green-soft); font-size: .8125rem; color: #1E5A38; }
.fav-setting .range { display: flex; align-items: flex-end; gap: 8px; }
.fav-setting .range label { flex: 1; }
.report-form, .inline-form { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.report-form input, .report-form select, .inline-form input { min-height: 44px; padding: 0 10px; border: 1px solid var(--green-line); border-radius: 10px; font: inherit; }
.menu-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.menu-list a { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-radius: 16px; background: #fff;
               border: 1px solid var(--line); text-decoration: none; color: var(--fg); font-weight: 700; }
.menu-list a small { font-weight: 500; color: var(--sub); }

/* 運営者・確認履歴の表 */
.table-wrap { background: #fff; border-radius: 14px; border: 1px solid var(--line); overflow-x: auto; }
.table-wrap table { width: 100%; border-collapse: collapse; }
.table-wrap th, .table-wrap td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: .8125rem; vertical-align: top; }
.status { font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.status.ok { background: var(--green-soft); color: var(--green); }
.status.ng { background: var(--peach-soft); color: var(--peach-text); }
.admin-log { font-size: .75rem; background: var(--veil); border-radius: 12px; padding: 10px 24px; }

/* ---------- パソコン幅 ---------- */
@media (min-width: 900px) {
  :root { --nav-h: 0px; --ad-h: 0px; --safe-b: 0px; }
  .bottom-nav, .ad-banner { display: none; }
  .top-nav { display: flex; }
  .header-inner { padding: 14px 24px; }
  .page { padding: 24px 24px 24px; gap: 28px; }
  .page-aside { display: flex; flex-direction: column; gap: 16px; flex: 1 1 300px; max-width: 340px; }
  .gym-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
  .gym-card { padding: 14px; border-radius: 20px; }
  .star { background: rgba(255, 255, 255, .92); border-radius: 22px; }
  .gym-photo { width: 220px; height: 130px; }
  .gym-title h1 { font-size: 1.75rem; }
  .gym-actions > * { flex: 0 0 auto; }
  .round { width: auto; padding: 0 14px; border-radius: 22px; height: auto; min-height: 44px; font-size: .8125rem; font-weight: 700; display: inline-flex; align-items: center; }
  .round svg { display: none; } .round span { display: inline; }
  .avail-mobile { display: none; }
  .avail-desk { display: block; }
  .avail-desk thead th { font-size: .8125rem; padding: 10px 4px; }
  .avail-desk .rowhead { width: 120px; font-size: .8125rem; padding: 0 12px; }
  .avail-desk .cell { min-height: 3rem; font-size: 1rem; }
  .mobile-only { display: none !important; }
}
@media (max-width: 899px) {
  .desk-only { display: none !important; }
  /* さがすの一番上の説明は、スマホでは上の帯にベビがいるので絵を出さない */
  .hello { padding: 10px 14px; } .hello > svg, .hello > .bebi { display: none; } .hello h1 { font-size: 1.0625rem; }
  /* 読み込み中はベビの演出を最初の画面に入れるため、写真と注意書きを隠す */
  .gym-head.is-loading .gym-photo, .gym-head.is-loading .notice { display: none; }
  /* 市の絞り込みはスマホでは1行で横スクロール */
  .chips.scroll { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 4px; scrollbar-width: none; }
  .chips.scroll::-webkit-scrollbar { display: none; }
}

/* ---------- マイ体育館・通知のスイッチ・押したあとの知らせ（依頼10） ---------- */
.ico { flex: none; }
.switch-form { margin: 0; }
.switch { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 6px 0 12px; border-radius: 22px; cursor: pointer;
          font: inherit; font-size: .8125rem; font-weight: 700; background: #fff; color: var(--sub); border: 1px solid var(--line); }
.switch .switch-text { display: inline-flex; align-items: center; gap: 4px; min-width: 5.2em; }
.switch-track { position: relative; width: 44px; height: 26px; border-radius: 13px; background: #C9D2CC; transition: background .15s; }
.switch-knob { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff;
               box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.switch.on { color: var(--green); border-color: var(--green-line); background: var(--green-soft); }
.switch.on .switch-track { background: var(--green); }
.switch.on .switch-knob { transform: translateX(18px); }
.switch:active { opacity: .75; }
.city-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.city-head h2 { margin: 0; font-size: 1.125rem; display: flex; align-items: center; gap: 6px; }
.city-head h2 .ico { color: var(--peach); }
.room-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px dashed var(--line); flex-wrap: wrap; }
.room-row:first-of-type { border-top: 0; }
.room-name { font-weight: 700; }
.room-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cond { width: 100%; }
.cond summary { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; cursor: pointer; font-size: .8125rem; color: var(--green); font-weight: 700; }
.cond-form { display: flex; flex-direction: column; gap: 8px; padding: 4px 0 8px; }
.facility-card { display: flex; flex-direction: column; gap: 4px; }
.facility-card .head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.facility-card .head a { font-weight: 700; font-size: 1rem; color: var(--fg); }
.badge { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border-radius: 14px; font-size: .75rem; font-weight: 700;
         background: var(--green-soft); color: var(--green); border: 1px solid var(--green-line); white-space: nowrap; }
.btn .ico, .tag .ico, .chip .ico { vertical-align: -3px; }
.tag .ico { width: 13px; height: 13px; }
.how summary { min-height: 44px; display: inline-flex; align-items: center; cursor: pointer; color: var(--blue); font-size: .8125rem; font-weight: 700; }
.steps3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; counter-reset: s; }
.steps3 li { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 6px; text-align: center; font-size: .8125rem; font-weight: 700;
             display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--fg); }
.steps3 li .num { width: 24px; height: 24px; border-radius: 50%; background: var(--green); color: #fff; font-size: .8125rem; display: grid; place-items: center; }
.steps3 li .ico { color: var(--green); }
.toast { position: fixed; left: 50%; transform: translateX(-50%); z-index: 40; width: min(560px, calc(100% - 24px));
         bottom: calc(var(--nav-h) + var(--ad-h) + var(--safe-b) + 12px);
         display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border-radius: 16px;
         background: #2B2B2B; color: #fff; font-size: .875rem; box-shadow: 0 4px 16px rgba(0,0,0,.2); }
.toast p { margin: 0; flex: 1; }
.toast form { margin: 0; }
.toast .undo { min-height: 44px; padding: 0 12px; border: 0; background: transparent; color: #9FE0B5; font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; }
.toast .close { min-width: 44px; min-height: 44px; border: 0; background: transparent; color: #fff; font-size: 1.25rem; cursor: pointer; border-radius: 22px; }
.toast :focus-visible { outline-color: #9FE0B5; }
@media (min-width: 900px) { .toast { bottom: 24px; } }
@media (prefers-reduced-motion: reduce) { .switch-track, .switch-knob { transition: none; } }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.gym-actions > .full { flex: 1 1 100%; }
/* マイ体育館の一番上「この端末で受け取る」（改訂6） */
.receive { padding: 4px 14px; display: flex; flex-direction: column; gap: 10px; }
.receive > summary { list-style: none; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-height: 44px; cursor: pointer; font-size: .8125rem; color: var(--fg); }
.receive > summary::-webkit-details-marker { display: none; }
.receive > summary .change { color: var(--blue); font-weight: 700; }
.receive[open] > summary .change { display: none; }
.receive[open] { padding-bottom: 12px; }
#push-panel [hidden] { display: none; } /* .btn の display が hidden に勝って、押せないボタンまで出ていた */
.receive { scroll-margin-top: 84px; } /* /settings から来たとき、上の帯に「この端末で受け取る」が隠れないように */
/* 文字を大きくしたとき、長いボタンは画面からはみ出さずに折り返す（改訂7） */
form { max-width: 100%; }
.btn { max-width: 100%; text-align: center; padding-top: 6px; padding-bottom: 6px; }
/* 下のメニューは、スマホのタブと同じく文字の大きさの伸びに上限をつける（2倍にしても折り返さず、高さも収まる） */
:root { --nav-h: min(4.5rem, 84px); }
@media (min-width: 900px) { :root { --nav-h: 0px; } }
.bottom-nav a { font-size: min(.75rem, 15px); white-space: nowrap; }
/* 広告の枠は 320×50 の決まった大きさ。仮の文字も大きくしない */
.ad-banner { font-size: 12px; }
.week-label .site-closed { display: block; font-size: .8125rem; color: var(--note-text); }  /* 予約サイトが使えない時間（江東区 0〜6時など） */
.week-label .site-closed { word-break: keep-all; }  /* 文のまとまりの切れ目（phrase_breaks）でだけ折り返す */
.nowrap { white-space: nowrap; }
.hello h1 { word-break: keep-all; }  /* 言葉の途中で折り返さない（「まとめて確認」が「まとめ／て確認」にならないように）。区切りは「、」や空白 */
