/* すぽカレンダー：見た目（設計書 9.2。2026-09-29 に画像を出す形へ作り直し、同じ日にレビューを反映した）
   色は画像（配信のサムネイルとチャンネルのアイコン）とメンバーの色に任せる。枠やボタンは墨と紙の 2 色で静かにする。
   差し色（合図）は、いまの時刻の線、配信中、「締切が近い」だけに使う。サムネイルには何も重ねない（R-002）。 */

/* 数字の書体は、時刻と日付に使う数字と記号（空白〜:）だけに絞ったもの（51 KB → 8.5 KB。R-095）。ほかの文字は日本語の書体で出る */
@font-face {
  font-family: "Unbounded";
  src: url("/assets/fonts/unbounded-digits-v1.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0020-003A;
}

:root {
  color-scheme: light dark;
  --paper: #F4F5F2;
  --surface: #FFFFFF;
  --ink: #16211F;
  --ink-2: #5B6864;
  /* 帯の上の題など、色の付いた地の上の薄い文字（対比 4.5:1 以上。R-028） */
  --ink-sub: #4F5B57;
  --rule: #DADFDA;
  --cue: #E3A21A;
  /* 合図の色の、線と文字に使う濃いもの（紙と 5.4:1。焦点の枠、いまの線、「配信中」の文字。R-027） */
  --cue-strong: #8A5A00;
  --on-cue: #16211F;
  --danger: #B3261E;
  --field: #7D8A86;
  --font-jp: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "BIZ UDPGothic", "Yu Gothic UI", "Yu Gothic", "Noto Sans JP", system-ui, sans-serif;
  --font-num: "Unbounded", var(--font-jp);
  /* いちばん小さい文字も 12px（R-064） */
  --step--2: 0.75rem;
  --step--1: 0.8rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.563rem;
  --step-3: 1.953rem;
  --step-6: 3.815rem;
  --gutter: 16px;
  --time-col: 4.4rem;
  /* ホーム画面から開いたとき（アプリの形）に、上の時刻や電池の表示と重ならないよう、画面の上の余白を足す。Safari では 0 */
  --safe-top: env(safe-area-inset-top, 0px);
  --masthead: calc(60px + var(--safe-top));
  /* 固定するものの位置は、測った上の帯の高さ（JS が --masthead-h に入れる）を使う。--masthead は帯の最低の高さのまま（最終確認 4） */
  --sticky-top: var(--masthead-h, var(--masthead));
  --thumb-w: 112px;
  /* 帯の段の高さは rem で決める（文字を大きくしても名前が切れないように。R-079） */
  --lane-h: 3.4rem;
}

/* 明るさ：自動（端末の設定）・ライト・ダーク。選んだものは <html data-theme> に入る（theme-v*.js） */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0F1514;
    --surface: #182020;
    --ink: #E8EEEA;
    --ink-2: #93A29D;
    --ink-sub: #A6B4AF;
    --rule: #26322F;
    --cue: #F0B43A;
    --cue-strong: #F0B43A;
    --on-cue: #0F1514;
    --danger: #FF8A80;
    --field: #6F7C78;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0F1514;
  --surface: #182020;
  --ink: #E8EEEA;
  --ink-2: #93A29D;
  --ink-sub: #A6B4AF;
  --rule: #26322F;
  --cue: #F0B43A;
  --cue-strong: #F0B43A;
  --on-cue: #0F1514;
  --danger: #FF8A80;
  --field: #6F7C78;
}
:root[data-theme="light"] { color-scheme: light; }

*, *::before, *::after { box-sizing: border-box; }
/* 固定した帯や見出しの下に、焦点のある項目が隠れないように（R-023） */
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--sticky-top) + 64px); }
/* 横向きの iPhone の切り欠きに文字がかからないように（R-030） */
body { margin: 0; padding-right: env(safe-area-inset-right); padding-left: env(safe-area-inset-left); background: var(--paper); color: var(--ink); font-family: var(--font-jp); font-size: var(--step-0); line-height: 1.7; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--cue-strong); outline-offset: 2px; border-radius: 4px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
button:disabled { opacity: 0.35; cursor: not-allowed; }
[aria-disabled="true"] { opacity: 0.6; cursor: progress; }

/* 焦点が当たると見える「カレンダーへ」「予定の一覧へ」（R-026） */
.skip-links a { position: absolute; top: calc(var(--sticky-top) + 8px); left: var(--gutter); z-index: 20; padding: 8px 14px; border-radius: 999px; background: var(--ink); color: var(--paper); font-weight: 800; }
.skip-links a:not(:focus) { width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* データが届くまでは、下の帯を出さない（届いたあとに大きく押し出されないように。R-018） */
body.is-loading .site-footer { visibility: hidden; }
body.is-loading .panel-list { min-height: 70vh; }

/* メンバーのアイコン。画像の外側に、紙の色の細い隙間とメンバーの色の輪を付ける。画像が無ければ色の丸と 1 文字 */
.avatar { --size: 32px; position: relative; flex: none; display: inline-grid; place-items: center; width: var(--size); height: var(--size); overflow: hidden; border-radius: 50%; background: color-mix(in oklab, var(--c) 40%, var(--surface)); box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.5px var(--c); }
.avatar.is-xs { --size: 16px; box-shadow: 0 0 0 1px var(--paper), 0 0 0 2px var(--c); }
.avatar.is-sm { --size: 24px; }
.avatar-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar-initial { color: var(--ink); font-size: calc(var(--size) * 0.46); font-weight: 800; line-height: 1; }
.avatar.is-xs .avatar-initial { display: none; }
/* 画像が無い（読めなかった）顔は、輪を濃くして地から見分け、小さくても 1 文字目を出す（K-022） */
.avatar:not(:has(.avatar-img)) { box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.5px color-mix(in oklab, var(--c) 50%, var(--ink)); }
.avatar.is-xs:not(:has(.avatar-img)) { box-shadow: 0 0 0 1px var(--paper), 0 0 0 2px color-mix(in oklab, var(--c) 50%, var(--ink)); }
.avatar.is-xs:not(:has(.avatar-img)) .avatar-initial { display: block; font-size: 9px; }
.avatar.is-group { background: var(--ink); color: var(--paper); font-size: var(--step--1); font-weight: 800; box-shadow: 0 0 0 2px var(--paper), 0 0 0 3.5px var(--ink); }
.avatar-stack { position: relative; display: inline-flex; align-items: center; }
.avatar-stack .avatar + .avatar { margin-left: -10px; }
.avatar-more { margin-left: 3px; color: var(--ink-2); font-family: var(--font-num); font-size: var(--step--2); font-weight: 700; line-height: 1; }
/* 何人もいる項目は、種類の印を重ねない（種類は名前の横の文字で分かる） */
.avatar-stack.is-many + .kind-badge { display: none; }

/* 上の帯 */
.masthead { position: sticky; top: 0; z-index: 10; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; min-height: var(--masthead); padding: calc(8px + var(--safe-top)) var(--gutter) 8px; background: var(--paper); border-bottom: 1px solid var(--rule); }
.brand { display: inline-flex; flex-direction: column; font-size: var(--step-1); font-weight: 800; letter-spacing: 0.04em; line-height: 1.15; text-decoration: none; }
/* サイト名の下に小さく「非公式」（最初の画面で公式ではないと分かるように。D-001、K-001） */
.brand-sub { color: var(--ink-2); font-size: var(--step--2); font-weight: 700; letter-spacing: 0.08em; line-height: 1.2; }
.brand-short { display: none; }
.filter-count::before { content: '（'; }
.filter-count::after { content: '）'; }
.filter-button { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--ink); border-radius: 999px; background: transparent; font-size: var(--step--1); font-weight: 700; cursor: pointer; }
.filter-count { font-weight: 500; }
.masthead-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.icon-button { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border: 1px solid var(--rule); border-radius: 999px; background: transparent; color: inherit; font-size: var(--step--1); font-weight: 700; cursor: pointer; white-space: nowrap; }
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* 共有といいねの知らせ。ページに 1 つだけ置き、新しい知らせが前を置きかえる（D-010、K-023）。
   空の間も読み上げの木に残し、見た目だけを消す。短い知らせは 1 行で出す（B-030） */
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 30; width: max-content; max-width: calc(100% - 2 * var(--gutter)); margin: 0; padding: 10px 16px; border-radius: 16px; background: var(--ink); color: var(--paper); font-size: var(--step--1); font-weight: 700; transform: translateX(-50%); word-break: auto-phrase; overflow-wrap: anywhere; pointer-events: none; }
.toast:empty { padding: 0; opacity: 0; }
.theme-button { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border: 1px solid var(--rule); border-radius: 999px; background: transparent; font-size: var(--step--1); font-weight: 700; cursor: pointer; }
.masthead-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--ink); border-radius: 999px; font-size: var(--step--1); font-weight: 700; text-decoration: none; }
.brand, .filter-button, .theme-button, .masthead-link { white-space: nowrap; }
/* 狭い画面では右上のボタンを絵だけにする。599px までにして、2 段にならないようにする（B-008）。
   幅は rem にし、文字を大きくしても入らなければ折り返す */
@media (max-width: 599px) {
  .masthead-actions { gap: 6px; }
  .theme-button, .icon-button { justify-content: center; width: 2.75rem; padding: 0; }
  .icon-button .icon-label, .theme-button [data-theme-label] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .masthead-link { padding: 0 12px; }
}
@media (max-width: 479px) {
  .brand { font-size: var(--step-0); }
}
/* とても狭い画面だけ、名前を短くする */
@media (max-width: 339px) {
  .brand-long { display: none; }
  .brand-short { display: inline; }
}
/* 狭い画面や絞り込み中でも、上の帯が横にはみ出さないように（R-022） */
@media (max-width: 379px) {
  .masthead-actions { gap: 4px; }
  .theme-button, .icon-button { width: 2.4rem; }
}
/* 明るさの印：自動は半分、ライトは白い丸、ダークは黒い丸（R-071） */
.theme-mark { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--ink); border-radius: 50%; background: linear-gradient(90deg, var(--ink) 50%, transparent 50%); }
.theme-button[data-mode="light"] .theme-mark { background: transparent; }
.theme-button[data-mode="dark"] .theme-mark { background: var(--ink); }

/* 知らせ（読み込みの失敗など）。帯の上に出して、どこにいても見えるようにする（R-013） */
.status:empty { display: none; }
.status { margin: 12px var(--gutter) 0; padding: 12px 14px; border-left: 4px solid var(--cue-strong); background: var(--surface); }
.status .text-button, .form-status .text-button { margin-left: 8px; }

/* いま・このあと（このサイトの顔。大胆にするのはここだけ） */
.onair { padding: 20px 0 4px; border-bottom: 1px solid var(--rule); }
.today { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 0 var(--gutter); }
.today-when { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.today-date { display: flex; align-items: flex-end; gap: 10px; min-height: calc(var(--step-6) * 0.82); margin: 0; }
.today-special { margin: 0; }
.today-special-button { display: inline-flex; align-items: center; gap: 2px; min-height: 36px; padding: 0 12px; border: 1px solid var(--cue-strong); border-radius: 999px; background: color-mix(in oklab, var(--cue) 16%, var(--paper)); font-size: var(--step--1); font-weight: 800; text-align: left; cursor: pointer; }
.today-day { font-family: var(--font-num); font-size: var(--step-6); font-weight: 800; line-height: 0.82; letter-spacing: -0.02em; }
.today-meta { font-size: var(--step--1); font-weight: 700; color: var(--ink-2); line-height: 1.3; word-break: keep-all; }
.onair-head { display: flex; flex-direction: column; align-items: flex-end; gap: 0; text-align: right; }
.onair-title { margin: 0; font-size: var(--step-0); font-weight: 800; }
/* 「いま配信中」のページへの入口：日付の右に、黒地に白文字（ダークモードでは反転）。いつも出す（2026-10-03 のユーザーの依頼） */
.today-line { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; }
.live-open { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: var(--step--1); font-weight: 800; text-decoration: none; white-space: nowrap; }
.onair-updated { color: var(--ink-2); font-size: var(--step--2); font-variant-numeric: tabular-nums; word-break: keep-all; }
.stale-notice { margin: 10px var(--gutter) 0; padding: 8px 12px; border-left: 4px solid var(--cue-strong); background: var(--surface); font-size: var(--step--1); }
.rail-wrap { position: relative; margin-bottom: 12px; }
/* 帯は配信の数に合わせて縦に伸ばす（帯の中を縦に送らなくても、全員が見えるように。2026-09-30 のユーザーの依頼）。
   スマホでは、はじめに 3.5 段分の高さを取っておく（データが届いて下が押し下げられるのは、それより多いときだけ。B-009）。
   焦点が当たった配信が、上に残る目盛りの行に隠れないように（K-024） */
.rail { position: relative; height: auto; min-height: calc(30px + 3.5 * var(--lane-h)); margin-top: 14px; padding: 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scroll-padding-top: 30px; }
.rail.is-empty { min-height: 0; }
/* 背の低いスマホ（320×568 など）では、帯を 2.5 段にし、大きな日付も少し小さくする（絞り込みと一覧の始まりを最初の画面に近づける。D-009） */
@media (max-width: 959px) and (max-height: 700px) {
  .rail { min-height: calc(30px + 2.5 * var(--lane-h)); }
  .rail.is-empty { min-height: 0; }
  .today-day { font-size: 2.8rem; }
  .today-date { min-height: 2.3rem; }
  .onair { padding-top: 14px; }
}
/* 帯の右下の「▼ ほかに N 件」（押すと、見えていない配信へ送る。D-009） */
.rail-more-button { position: absolute; right: var(--gutter); bottom: 6px; z-index: 4; min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: var(--step--1); font-weight: 800; box-shadow: 0 2px 8px rgb(0 0 0 / 0.2); cursor: pointer; }
.rail-more-button[hidden] { display: none; }
/* 目盛りの文字の行は、帯を縦に送っても上に残す（R-053） */
.rail-scale { position: sticky; top: 0; z-index: 3; width: calc(var(--w) + 2 * var(--gutter)); height: 30px; padding: 0 var(--gutter); background: var(--paper); }
.rail-tick { position: absolute; top: 4px; left: calc(var(--gutter) + var(--x)); padding-left: 6px; color: var(--ink-2); font-family: var(--font-num); font-size: var(--step--2); font-weight: 500; line-height: 1; white-space: nowrap; }
.rail-tick.is-muted { color: transparent; }
/* 日付が変わる目盛りは、太い線と日付で示す（R-010） */
.rail-tick.is-day { color: var(--ink); font-weight: 800; }
.rail-track { position: relative; width: var(--w); height: calc(var(--lanes) * var(--lane-h)); margin: 0 var(--gutter); }
.rail-line { position: absolute; top: -30px; bottom: 0; left: var(--x); border-left: 1px solid var(--rule); }
.rail-line.is-day { border-left: 2px solid var(--ink-2); }
.rail-bars { position: relative; z-index: 2; margin: 0; padding: 0; list-style: none; }
.rail-bar { position: absolute; top: calc(var(--lane) * var(--lane-h) + 4px); left: var(--x); width: var(--bw); height: calc(var(--lane-h) - 8px); }
/* 帯の地は、淡いメンバーの色でも形が見えるよう、紙から少し沈めて縁を付ける（R-028） */
.rail-link { display: flex; align-items: center; gap: 10px; height: 100%; padding: 0 12px 0 8px; overflow: hidden; border-radius: 999px 14px 14px 999px; background: color-mix(in oklab, var(--c) 22%, var(--paper)); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--c) 45%, var(--rule)); text-decoration: none; }
.rail-text { display: flex; flex-direction: column; min-width: 0; }
/* 終わりの分からない帯は右が薄くなる。下に紙の色を敷き、帯の下を通る「いま」の線が透けないようにする（B-025） */
.rail-bar.is-open .rail-link { background: linear-gradient(to right, color-mix(in oklab, var(--c) 22%, var(--paper)) 65%, transparent), var(--paper); }
.rail-name { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: var(--step--1); font-weight: 800; line-height: 1.25; white-space: nowrap; }
/* 入らないときは名前を「…」で縮め、配信中の札は縮めない。配信先は題の行の頭（B-024） */
.rail-member { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.rail-live { flex: none; padding: 0 5px; border-radius: 4px; background: var(--cue); color: var(--on-cue); font-size: var(--step--2); font-weight: 800; line-height: 1.5; }
.rail-platform { margin-right: 6px; color: var(--ink-sub); font-size: var(--step--2); font-weight: 700; }
.rail-title { overflow: hidden; color: var(--ink-sub); font-size: var(--step--2); line-height: 1.45; white-space: nowrap; text-overflow: ellipsis; }
.rail-link:hover .rail-title { text-decoration: underline; text-underline-offset: 2px; }
/* 配信中：縁が合図の色になり、アイコンのまわりの輪が広がる（このサイトで動くのは、ここと「いま」の線だけ。変形と透明度だけで動かす。R-096） */
.rail-bar.is-live .rail-link { box-shadow: inset 0 0 0 1.5px var(--cue-strong); }
.rail-bar.is-live::after { content: ""; position: absolute; top: 50%; left: 8px; width: 24px; height: 24px; margin-top: -12px; border: 2px solid var(--cue); border-radius: 50%; pointer-events: none; animation: live-ring 2.4s ease-out infinite; }
@keyframes live-ring {
  from { transform: scale(1); opacity: 0.9; }
  to { transform: scale(1.9); opacity: 0; }
}
/* いまの線は帯の下を通し、札だけを上に出す（名前を横切らないように。R-052） */
.rail-now { position: absolute; top: -30px; bottom: 0; left: 0; z-index: 1; width: 2px; background: var(--cue-strong); transform: translateX(var(--x)); pointer-events: none; }
.rail-now-label { position: absolute; top: 3px; left: calc(var(--gutter) + var(--x) + 6px); z-index: 1; padding: 2px 6px; border-radius: 4px; background: var(--cue); color: var(--on-cue); font-family: var(--font-num); font-size: var(--step--2); font-weight: 700; line-height: 1.2; }
.rail-now.is-arriving { animation: now-arrive 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes now-arrive { from { transform: translateX(0); } to { transform: translateX(var(--x)); } }
/* 「いま」が帯の外に出たときに戻るボタン（デザイン提案 2） */
.rail-now-button { position: absolute; top: 40px; z-index: 4; min-height: 36px; padding: 0 12px; border: 0; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: var(--step--2); font-weight: 800; box-shadow: 0 2px 8px rgb(0 0 0 / 0.2); cursor: pointer; }
.rail-now-button[data-side="left"] { left: 8px; }
.rail-now-button[data-side="right"] { right: 8px; }
.rail-empty { margin: 0 var(--gutter) 8px; color: var(--ink-2); font-size: var(--step--1); }

/* 一覧と月の切り替え（スマホ） */
.views { padding: 0 var(--gutter) 48px; }
/* 一覧・月の切り替えと、絞り込み（予定のすぐ上。右上だと見つけにくかった） */
.views-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 12px; margin: 20px 0 4px; }
.views-bar .view-switch { margin: 0; }
.views-bar .filter-button { gap: 8px; min-height: 48px; padding: 0 14px 0 16px; background: var(--ink); color: var(--paper); border-color: var(--ink); font-size: var(--step-0); }
.views-bar .filter-count { color: inherit; opacity: 0.8; font-size: var(--step--1); font-weight: 600; }
.views-bar .filter-button { max-width: 100%; }
.filter-text { display: inline-flex; align-items: baseline; gap: 2px; }
/* 狭い画面では、件数を 2 行目に小さく出し、顔は 2 人までにする（はみ出さないように。B-010） */
@media (max-width: 379px) {
  .filter-text { flex-direction: column; align-items: flex-start; gap: 0; line-height: 1.2; }
  .filter-count::before, .filter-count::after { content: none; }
  .filter-faces .avatar:nth-child(n+3), .filter-faces .avatar-more { display: none; }
}
.shared-note { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; flex-basis: 100%; margin: 0; padding: 4px 12px; border-left: 4px solid var(--cue-strong); background: var(--surface); font-size: var(--step--1); }
.shared-note[hidden] { display: none; }
.filter-faces { display: inline-flex; align-items: center; }
.filter-faces:empty { display: none; }
.filter-faces .avatar + .avatar { margin-left: -8px; }
.filter-faces .avatar { box-shadow: 0 0 0 2px var(--ink); }
.filter-faces .avatar-more { margin-left: 4px; font-size: var(--step--2); font-weight: 700; }
.view-switch { display: inline-flex; gap: 2px; margin: 20px 0 4px; padding: 3px; border: 1px solid var(--rule); border-radius: 999px; }
.view-switch button { min-height: 40px; padding: 0 20px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); font-size: var(--step--1); font-weight: 700; cursor: pointer; }
.view-switch button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.panel:focus { outline: none; }

/* 一覧 */
.agenda-block { margin-top: 24px; }
.day-head { position: sticky; top: var(--sticky-top); z-index: 3; display: flex; align-items: baseline; gap: 10px; margin: 0; padding: 8px 0 6px; border-bottom: 2px solid var(--ink); background: var(--paper); font-size: inherit; }
.day-num { font-family: var(--font-num); font-size: var(--step-3); font-weight: 800; line-height: 1; }
.day-meta { color: var(--ink-2); font-size: var(--step--1); font-weight: 700; }
.day-rel { padding: 0 8px; border: 1px solid var(--ink); border-radius: 999px; font-size: var(--step--2); font-weight: 800; }
.block-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; padding: 8px 0 6px; border-bottom: 2px solid var(--ink); font-size: var(--step-0); font-weight: 800; }
/* スマホとタブレット：受付中・開催中は畳んで 1 行（R-060） */
.ongoing-fold > summary { cursor: pointer; list-style: none; }
.ongoing-fold > summary::-webkit-details-marker { display: none; }
.ongoing-fold > summary::before { content: "▸"; margin-right: 2px; }
.ongoing-fold[open] > summary::before { content: "▾"; }
.soon-badge { padding: 0 8px; border-radius: 4px; background: var(--cue); color: var(--on-cue); font-size: var(--step--2); font-weight: 800; }
/* 今日の見出しの下の「まもなく終わる」の 1 行（畳んだ欄を開いて、そこへ送る。K-007） */
.soon-line { margin: 8px 0 0; }
.soon-link { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-height: 44px; padding: 0; border: 0; background: transparent; font-size: var(--step--1); font-weight: 700; text-align: left; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.day-note { margin: 12px 0 0; color: var(--ink-2); font-size: var(--step--1); }
.loading-note { min-height: 3em; }
.entries { margin: 0; padding: 0; list-style: none; }
.entry { border-bottom: 1px solid var(--rule); }
.entry-link { display: grid; grid-template-columns: var(--time-col) 12px minmax(0, 1fr); column-gap: 12px; padding: 12px 0; text-decoration: none; }
.entry-link:hover .entry-title { text-decoration: underline; text-underline-offset: 3px; }
.entry-time { justify-self: start; align-self: start; padding-top: 1px; font-family: var(--font-num); font-size: var(--step--1); font-weight: 600; font-variant-numeric: tabular-nums; white-space: pre-line; line-height: 1.35; }
/* 配信：時刻｜サムネイル（16:9）｜名前と題。番組表のように、時刻とサムネイルの列をそろえる */
.entry.is-stream .entry-link { grid-template-columns: var(--time-col) var(--thumb-w) minmax(0, 1fr); }
/* サムネイルは加工せず、何も重ねない（YouTube の方針。R-002）。無ければメンバーの色の面 */
.thumb { position: relative; display: block; width: var(--thumb-w); aspect-ratio: 16 / 9; overflow: hidden; border-radius: 6px; background: linear-gradient(135deg, color-mix(in oklab, var(--c) 55%, var(--surface)), color-mix(in oklab, var(--c) 18%, var(--surface))); }
.thumb-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.entry.is-live .thumb { outline: 2px solid var(--cue-strong); outline-offset: 2px; }
/* グッズ・イベント・誕生日・記念日：時刻｜メンバーのアイコン（右下に種類の印）｜名前と題 */
.entry.is-item .entry-link { grid-template-columns: var(--time-col) 56px minmax(0, 1fr); }
.entry-mark { position: relative; display: flex; align-items: flex-start; min-height: 36px; padding: 2px 0 0 4px; }
.kind-badge { position: absolute; top: 20px; left: 24px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); box-shadow: 0 0 0 1px var(--rule); font-size: var(--step--2); line-height: 1; }
.entry-who { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; min-width: 0; font-size: var(--step--1); line-height: 1.5; overflow-wrap: anywhere; }
.entry-name { min-width: 0; font-weight: 800; }
/* 名前は 1 人ずつ改行しない（R-062）。空白の無い長い英字の名前だけは、はみ出さないよう折り返す（B-035） */
.name-part { display: inline-block; max-width: 100%; overflow-wrap: anywhere; }
.entry-source { color: var(--ink-2); }
/* 題は文節で改行し、長い英字もはみ出させない（R-062、R-063） */
.entry-title { display: -webkit-box; margin-top: 2px; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-height: 1.55; word-break: auto-phrase; overflow-wrap: anywhere; }
.entry-note { display: block; margin-top: 2px; color: var(--ink-2); font-size: var(--step--1); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.entry.is-live .entry-time, .entry.is-waiting .entry-time { color: var(--cue-strong); font-family: var(--font-jp); font-weight: 800; }
/* 終わった配信と締切済みは、文字を薄くする（サムネイルは変えない。R-041、R-045） */
.entry.is-ended .entry-time, .entry.is-ended .entry-title, .entry.is-past .entry-time, .entry.is-past .entry-title { color: var(--ink-2); }
.entry.is-soon .entry-time { padding: 0 6px; border-radius: 4px; background: var(--cue); color: var(--on-cue); }
.entry.is-item { display: flex; align-items: flex-start; gap: 8px; }
.entry.is-item .entry-link { flex: 1; min-width: 0; }
/* Google カレンダーに追加：何のボタンか分かる文字にし、押しやすい大きさにする（R-070） */
.gcal-link { flex: none; display: inline-flex; align-items: center; gap: 4px; min-height: 44px; margin-top: 4px; padding: 0 12px; border: 1px solid var(--rule); border-radius: 999px; color: var(--ink); font-size: var(--step--1); font-weight: 700; text-decoration: none; white-space: nowrap; }
.gcal-link:hover { border-color: var(--ink); }
.gcal-plus { line-height: 1; }
.gcal-text { display: inline; }
.day-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; }
.day-nav-steps { display: flex; gap: 8px; margin-left: auto; }
/* スマホ：Google カレンダーのボタンを本文の下に置き、題の幅を削らない */
/* 狭い画面では、Google カレンダーのボタンを文の下ではなく、左の列（時刻とアイコン）の下の空いた所に、
   「＋ Google / カレンダー」の 2 行で置く（1 件の高さを抑え、幅 320 でもはみ出さない。D-003、B-019） */
@media (max-width: 599px) {
  .entry.is-item { position: relative; display: block; }
  .entry.is-item.has-gcal .entry-link { min-height: 112px; }
  .entry.is-item .gcal-link { position: absolute; left: 0; bottom: 12px; width: calc(var(--time-col) + 68px); margin: 0; padding: 0 8px; gap: 6px; justify-content: center; white-space: normal; }
  .entry.is-item .gcal-text { display: inline-flex; flex-direction: column; font-size: var(--step--2); line-height: 1.2; text-align: left; }
  /* 配信の行は 2 段にし、サムネイルと題を大きくする（時刻と名前が上の段。デザイン提案 3、R-061） */
  .entry.is-stream .entry-link { grid-template-columns: 136px minmax(0, 1fr); grid-template-areas: "time who" "thumb title"; row-gap: 6px; }
  .entry.is-stream .entry-body { display: contents; }
  .entry.is-stream .entry-time { grid-area: time; align-self: center; }
  .entry.is-stream .entry-who { grid-area: who; }
  .entry.is-stream .thumb { grid-area: thumb; width: 136px; }
  .entry.is-stream .entry-title { grid-area: title; margin-top: 0; -webkit-line-clamp: 3; }
}
/* パソコンの狭い列（受付中・開催中など）でも、Google カレンダーのボタンは本文の下に置く（列の幅で決める） */
.panel { container-type: inline-size; }
@container (max-width: 520px) {
  .entry.is-item { position: relative; display: block; }
  .entry.is-item.has-gcal .entry-link { min-height: 112px; }
  .entry.is-item .gcal-link { position: absolute; left: 0; bottom: 12px; width: calc(var(--time-col) + 68px); margin: 0; padding: 0 8px; gap: 6px; justify-content: center; white-space: normal; }
  .entry.is-item .gcal-text { display: inline-flex; flex-direction: column; font-size: var(--step--2); line-height: 1.2; text-align: left; }
}
.empty { margin: 16px 0; color: var(--ink-2); }
.empty p { margin: 0 0 8px; }

/* 月 */
.month-head { display: flex; align-items: center; justify-content: space-between; margin: 24px 0 8px; }
.month-title { display: flex; align-items: baseline; gap: 10px; margin: 0; font-size: inherit; }
.month-year { color: var(--ink-2); font-family: var(--font-num); font-size: var(--step--1); font-weight: 600; }
.month-number { font-family: var(--font-num); font-size: var(--step-2); font-weight: 800; }
.month-nav { display: flex; align-items: center; gap: 6px; }
.month-nav button[data-month-step] { width: 44px; height: 44px; border: 1px solid var(--rule); border-radius: 50%; background: transparent; font-size: var(--step-1); line-height: 1; cursor: pointer; }
/* 月の残りが少ないときの「10月 ›」（D-011） */
.month-nav button.is-named { width: auto; padding: 0 14px; border-radius: 999px; font-size: var(--step--1); font-weight: 800; }
/* 見出しと曜日の行。パソコンでは枠の中を送っても上に残す（B-003） */
.month-top { background: var(--paper); }
.month-weekdays { border-top: 2px solid var(--ink); }
.month-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.month-weekday { padding: 6px 0; color: var(--ink-2); font-size: var(--step--2); font-weight: 700; text-align: center; }
/* 土日は色ではなく、墨の濃さで見分ける（デザイン提案 5） */
.month-weekday.is-weekend { color: var(--ink); font-weight: 800; }
.month-cell { min-height: 68px; border-top: 1px solid var(--rule); }
.month-cell button { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 100%; height: 100%; padding: 8px 0 6px; border: 0; border-radius: 10px; background: transparent; cursor: pointer; }
/* 焦点の枠はマスの内側に描く（端の列で切れないように。R-077） */
.month-cell button:focus-visible { outline-offset: -3px; }
.month-num { display: grid; place-items: center; min-width: 28px; height: 28px; font-family: var(--font-num); font-size: var(--step--1); font-weight: 600; line-height: 1; }
.month-cell.is-today .month-num { border-radius: 999px; background: var(--ink); color: var(--paper); }
.month-cell.is-selected button { background: var(--surface); box-shadow: inset 0 0 0 2px var(--ink); }
/* 過ぎた日は、顔と印を薄くする（これからの日を探しやすく。デザイン提案 5）。数字は薄くせず、色で下げる（対比 4.5:1 以上。B-026） */
.month-cell.is-past .month-dots, .month-cell.is-past .month-marks { opacity: 0.45; }
.month-cell.is-past .month-num, .month-cell.is-past .month-more { color: var(--ink-2); }
/* となりの月の日は、細い数字と印だけ（D-011） */
.month-cell.is-other .month-num { color: var(--ink-2); font-weight: 300; }
.month-cell-inner { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 8px 0 6px; }
.month-dots { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 3px 0; min-height: 16px; padding: 0 4px; }
.month-dots .avatar + .avatar { margin-left: -4px; }
.month-more { margin-left: 2px; color: var(--ink-2); font-family: var(--font-num); font-size: var(--step--2); }
/* 種類の印は 12px 以上（R-059） */
.month-marks { display: flex; gap: 2px; font-size: var(--step--2); line-height: 1; }
/* 受付中・開催中の日は白抜きの ◇△（凡例と同じ形。薄くしない。B-027） */
.month-notes { margin-top: 8px; color: var(--ink-2); font-size: var(--step--2); }
.month-legend { display: flex; flex-wrap: wrap; gap: 2px 12px; margin: 0; }
.month-note { margin: 4px 0 0; }

/* 下から出る板（絞り込み、日の一覧） */
.sheet { width: min(100%, 560px); max-width: 100%; max-height: min(85dvh, 720px); margin: auto auto 0; padding: 0; border: 0; border-radius: 20px 20px 0 0; background: var(--surface); color: var(--ink); }
.sheet::backdrop { background: rgb(10 16 14 / 0.45); }
.sheet[open] { animation: sheet-rise 0.24s ease-out; }
@keyframes sheet-rise { from { transform: translateY(24px); opacity: 0; } }
.sheet-inner { display: flex; flex-direction: column; max-height: inherit; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px var(--gutter) 8px; }
.sheet-head h2 { margin: 0; font-size: var(--step-1); }
.sheet-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 var(--gutter) 12px; }
.sheet-body { overflow-y: auto; padding: 0 var(--gutter) calc(24px + env(safe-area-inset-bottom)); }
.sheet-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px var(--gutter) calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--rule); }
/* カレンダーアプリでの購読（絞り込みの中） */
.subscribe { padding: 4px 0 16px; }
.subscribe p { margin: 0 0 10px; font-size: var(--step--1); }
/* 何が入るか（名前と種類）と、絞り込みへの道（D-004） */
.subscribe-scope { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 12px; margin: 12px 0; padding: 8px 12px; border-left: 4px solid var(--ink); background: var(--paper); }
.subscribe-scope p { margin: 0; font-weight: 800; }
.subscribe-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 12px 0; }
.subscribe-actions[hidden] { display: none; }
.subscribe-actions .solid-button { flex: 1 1 14rem; }
.subscribe-help { margin: 12px 0 0; padding-left: 1.2em; color: var(--ink-2); font-size: var(--step--2); }
.subscribe-help li + li { margin-top: 4px; }
.copy-result { margin: 0; color: var(--ink-2); font-size: var(--step--1); overflow-wrap: anywhere; }
/* 板の中の日付の見出しは固定しない（上の帯の高さで浮いて、1 件目を隠さないように。R-011） */
.sheet .day-head { position: static; background: var(--surface); }
/* 背の低い画面（小さいスマホと横向き）では、板全体を 1 つのスクロールにする（メンバーの欄が細い帯にならないように。R-021、B-011）。
   下の端（「この条件で見る」）は板の下に残す */
@media (max-height: 740px) {
  .sheet-inner { overflow-y: auto; }
  .sheet-body { overflow: visible; }
  .sheet-foot { position: sticky; bottom: 0; z-index: 1; background: var(--surface); }
}
.text-button { min-height: 44px; padding: 0 4px; border: 0; background: transparent; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.pill-button { min-height: 40px; padding: 0 16px; border: 1px solid var(--rule); border-radius: 999px; background: transparent; font-size: var(--step--1); font-weight: 700; cursor: pointer; }
/* 墨の塗りのボタン（絞り込みの「この条件で見る」、購読の 2 つ。D-012、D-004） */
.solid-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border: 1px solid var(--ink); border-radius: 999px; background: var(--ink); color: var(--paper); font-size: var(--step--1); font-weight: 800; text-align: center; text-decoration: none; cursor: pointer; }
.filter-group-wrap { margin: 0 0 20px; }
.filter-group { margin: 0 0 20px; padding: 0; border: 0; }
.filter-group-wrap .filter-group { margin: 0; }
.filter-legend { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; margin-bottom: 8px; padding: 0; font-weight: 800; }
.filter-members { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-note { margin: 0; color: var(--ink-2); font-size: var(--step--2); }
.member-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px 0 10px; border: 1px solid var(--rule); border-radius: 999px; cursor: pointer; }
.member-toggle:has(input:checked) { border-color: var(--ink); background: color-mix(in oklab, var(--c) 14%, var(--surface)); }
.member-toggle input { width: 18px; height: 18px; margin: 0; accent-color: var(--ink); }
/* メンバーの札と「だけ」ボタン（ひと押しでその人だけ。K-065） */
.member-item { display: inline-flex; align-items: stretch; border: 1px solid var(--rule); border-radius: 999px; }
.member-item:has(input:checked) { border-color: var(--ink); background: color-mix(in oklab, var(--c) 14%, var(--surface)); }
.member-item .member-toggle { padding-right: 10px; border: 0; border-radius: 999px 0 0 999px; background: none; }
.only-button { min-width: 44px; min-height: 44px; padding: 0 12px; border: 0; border-left: 1px solid var(--rule); border-radius: 0 999px 999px 0; background: transparent; color: var(--ink-2); font-size: var(--step--2); font-weight: 800; cursor: pointer; }
/* 種類の絞り込み：メンバーの色ではなく、一覧の印と同じ記号を出す */
.sheet-kinds { padding: 0 var(--gutter); }
.kind-toggle:has(input:checked) { background: var(--surface); }
.kind-mark { width: 1.2em; text-align: center; font-size: var(--step--1); line-height: 1; }

/* 押せるところは、マウスを載せると反応する（デザイン提案 9） */
@media (hover: hover) {
  .filter-button:hover, .theme-button:hover, .icon-button:hover, .masthead-link:hover, .view-switch button:not([aria-pressed="true"]):hover, .month-nav button:hover:not(:disabled),
  .month-cell button:hover, .pill-button:hover, .member-toggle:hover, .text-button:hover, .only-button:hover, .soon-link:hover { background-color: color-mix(in oklab, var(--ink) 6%, transparent); }
  .solid-button:hover { background: color-mix(in oklab, var(--ink) 85%, var(--paper)); }
  .rail-link:hover { background: color-mix(in oklab, var(--c) 32%, var(--paper)); }
}
button:active:not(:disabled), .pill-button:active { transform: translateY(1px); }

/* 下の帯 */
.site-footer { padding: 28px var(--gutter) calc(40px + env(safe-area-inset-bottom)); border-top: 1px solid var(--rule); color: var(--ink-2); font-size: var(--step--1); }
.site-footer p { max-width: 40em; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 12px 0; }
.site-footer nav a { color: var(--ink); font-weight: 700; text-underline-offset: 3px; white-space: nowrap; }
.updated { display: flex; flex-wrap: wrap; gap: 4px 24px; margin: 0 0 12px; }
.updated div { display: flex; gap: 8px; }
.updated dt { font-weight: 700; }
.updated dd { margin: 0; }

/* 規約などの文のページ。広い画面では真ん中に置く（デザイン提案 10） */
.doc { max-width: 40em; margin-inline: auto; padding: 28px var(--gutter) 48px; }
.doc h1 { margin: 0 0 16px; font-size: clamp(1.5rem, 7.5vw, var(--step-3)); line-height: 1.3; word-break: auto-phrase; }
.doc h2 { margin: 32px 0 8px; font-size: var(--step-1); line-height: 1.4; }
.doc p, .doc li { line-height: 1.85; }
.doc a { text-underline-offset: 3px; }

/* パソコン：左に月、右に一覧 */
@media (min-width: 960px) {
  :root { --gutter: 32px; --time-col: 4.4rem; --thumb-w: 144px; --lane-h: 2.9rem; }
  .views { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 48px; align-items: start; }
  .view-switch { display: none; }
  .views-bar { grid-column: 1 / -1; grid-row: 1; justify-content: flex-end; margin: 12px 0 8px; }
  .panel[hidden] { display: block; }
  /* 上の帯（いま・このあと）とカレンダーは、スクロールしても動かさない。--onair-h は JS が帯の高さを入れる */
  :root { --stick: calc(var(--sticky-top) + var(--onair-h, 0px)); }
  html { scroll-padding-top: calc(var(--stick) + 56px); }
  .onair { position: sticky; top: var(--sticky-top); z-index: 5; padding-top: 12px; background: var(--paper); }
  .today-day { font-size: 3.4rem; }
  .today-date { min-height: 2.8rem; }
  /* パソコンでは帯を上に固定するので、画面の高さの半分ほどまで伸ばし、それより多いときだけ帯の中で縦にスクロールする
     （2026-09-30 のユーザーの依頼。固定する部分を画面の半分ほどに抑える。K-003） */
  .rail { height: auto; min-height: calc(30px + var(--lane-h)); max-height: max(calc(30px + 3 * var(--lane-h)), calc(50dvh - 140px)); margin-top: 10px; }
  .day-head { top: var(--stick); }
  .panel-month { position: sticky; top: calc(var(--stick) + 8px); grid-column: 1; grid-row: 2; max-height: calc(100dvh - var(--stick) - 16px); padding: 0 4px; overflow-y: auto; scroll-padding-block: 8px; }
  .panel-month .month-head { margin-top: 12px; }
  .panel-month .month-top { position: sticky; top: 0; z-index: 2; }
  .panel-list { grid-column: 2; grid-row: 2; scroll-margin-top: calc(var(--stick) + 8px); }
  /* 画面の高さに合わせてマスを低くする（見出しと曜日の分を引いて 6 段） */
  .month-cell { min-height: clamp(48px, calc((100dvh - var(--stick) - 170px) / 6), 84px); }
  /* マスの中の余白を詰め、低い画面でも 6 段が収まるようにする */
  .panel-month .month-cell button { gap: 3px; padding: 4px 0 3px; }
  .panel-month .month-head { margin-bottom: 4px; }
  .sheet { margin: auto; border-radius: 20px; }
}
/* 背の低いパソコンの画面：上の帯を詰めて、固定する部分を小さくする（R-019、R-024） */
@media (min-width: 960px) and (max-height: 819px) {
  .today-day { font-size: 2.4rem; }
  .today-date { min-height: 2rem; }
  .onair { padding-top: 8px; }
  .rail { max-height: max(calc(30px + 2.5 * var(--lane-h)), calc(50dvh - 140px)); margin-top: 6px; }
  .month-cell { min-height: 44px; }
  .month-dots { flex-wrap: nowrap; padding: 0; }
  .month-dots .avatar + .avatar { margin-left: -6px; }
}
/* とても背の低いパソコンの画面（1366×768 のブラウザなど）：固定する部分を画面の半分より小さくする（K-003） */
@media (min-width: 960px) and (max-height: 700px) {
  .today-day { font-size: 1.9rem; }
  .today-date { min-height: 1.6rem; }
  .onair { padding-top: 6px; }
  .rail { max-height: max(calc(30px + 2 * var(--lane-h)), calc(50dvh - 140px)); margin-top: 4px; }
  .rail-wrap { margin-bottom: 6px; }
}
.panel-ongoing { display: none; }
/* 広い画面：カレンダー｜各日の予定｜受付中・開催中 */
@media (min-width: 1200px) {
  /* 画面の幅いっぱいに広げる（上限を付けると、広い画面で右が空く） */
  .views { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 1fr); gap: 0 clamp(32px, 2.5vw, 56px); }
  .panel-ongoing { display: block; position: sticky; top: calc(var(--stick) + 8px); grid-column: 3; grid-row: 2; max-height: calc(100dvh - var(--stick) - 16px); overflow-y: auto; scroll-padding-block: 8px; }
}

/* 問い合わせのページ */
.contact-note { padding: 12px 14px; border-left: 4px solid var(--cue-strong); border-radius: 0; background: var(--surface); }
.contact-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 24px; }
.contact-under { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-top: -8px; }
.contact-error { margin: 0; color: var(--danger); font-size: var(--step--1); font-weight: 700; }
.contact-turnstile { max-width: 100%; }
.contact-kinds { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; border: 0; }
.contact-kinds legend { margin-bottom: 8px; padding: 0; font-weight: 800; }
.contact-kinds label { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid var(--rule); border-radius: 999px; cursor: pointer; }
.contact-kinds label:has(input:checked) { border-color: var(--ink); background: var(--surface); }
.contact-kinds input { accent-color: var(--ink); }
.contact-label { font-weight: 800; }
.contact-form textarea { width: 100%; min-height: 12em; padding: 12px; border: 1px solid var(--field); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; line-height: 1.7; resize: vertical; }
.contact-form textarea:focus-visible { outline: 3px solid var(--cue-strong); outline-offset: 2px; }
.contact-count { flex: none; margin: 0 0 0 auto; color: var(--ink-2); font-size: var(--step--1); text-align: right; }
.contact-form textarea[aria-invalid="true"] { border-color: var(--danger); }
.submit-button { justify-self: start; min-height: 48px; padding: 0 28px; border: 0; border-radius: 999px; background: var(--ink); color: var(--paper); font-weight: 800; cursor: pointer; }
.submit-button:disabled { opacity: 0.6; cursor: progress; }
/* 空の間も読み上げの木に残す（最初の知らせも読まれるように。R-087）。見た目だけを消す */
.form-status { margin: 0; padding: 12px 14px; border-left: 4px solid var(--cue-strong); border-radius: 0; background: var(--surface); }
.form-status:empty { margin-top: -16px; padding: 0; border: 0; background: none; }
.form-status[data-kind="error"] { border-left-color: var(--danger); }
.form-status[data-kind="done"] { border-left-color: var(--ink); }

/* 管理者ページ */
.admin-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.admin-unread { margin: 0; font-weight: 800; }
/* カレンダーの切り替えはパソコンで隠すが、管理者ページの切り替えはいつも出す */
.admin-head .view-switch { display: inline-flex; margin: 0; }
.inquiries { margin: 0; padding: 0; list-style: none; }
.inquiry { padding: 16px 0; border-bottom: 1px solid var(--rule); }
/* 対応済みは、薄くせず（文字の対比を保つ）、本文の色と札で区別する（R-104） */
.inquiry.is-done .inquiry-body { color: var(--ink-2); }
.inquiry-state { padding: 0 8px; border: 1px solid var(--rule); border-radius: 999px; }
.inquiry-state.is-done { border-color: var(--ink-2); }
.inquiry-note { flex-basis: 100%; margin: 4px 0 0; color: var(--danger); font-size: var(--step--1); font-weight: 700; }
.admin-note { margin: -8px 0 16px; color: var(--ink-2); font-size: var(--step--1); }
.admin-more { margin: 16px 0; }
.inquiry-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--ink-2); font-size: var(--step--1); }
.inquiry-kind { color: var(--ink); font-weight: 800; }
.inquiry-body { max-height: 20em; margin: 8px 0 0; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.inquiry-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
/* 削除は、ふだんから別の色で、右端に離して置く（R-105） */
.danger-button { min-height: 40px; margin-left: auto; padding: 0 16px; border: 1px solid var(--danger); border-radius: 999px; background: transparent; color: var(--danger); font-size: var(--step--1); font-weight: 700; cursor: pointer; }
.danger-button:hover { background: color-mix(in oklab, var(--danger) 10%, transparent); }

/* 強制カラー（Windows のハイコントラストなど）でも、選んだ日・今日・押している切り替えが分かるように（R-078） */
@media (forced-colors: active) {
  .month-cell.is-selected button, .view-switch button[aria-pressed="true"] { outline: 2px solid Highlight; }
  .month-cell.is-today .month-num { border: 2px solid CanvasText; }
  .rail-link { border: 1px solid CanvasText; }
}

@media (prefers-reduced-motion: reduce) {
  .rail-now.is-arriving, .rail-bar.is-live::after, .sheet[open] { animation: none; }
  button:active:not(:disabled), .pill-button:active { transform: none; }
}
/* とても広い画面：サムネイルを大きくする */
@media (min-width: 1700px) {
  :root { --thumb-w: 184px; }
}

/* 管理者のページ：表示回数 */
.stats { margin: 8px 0 40px; }
.stats h2, .doc > h2 { margin-top: 32px; }
.stats h3 { margin: 0 0 8px; font-size: var(--step-0); }
.stats-totals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 12px 0 20px; }
.stats-totals div { padding: 10px 12px; border: 1px solid var(--rule); border-radius: 12px; }
.stats-totals dt { color: var(--ink-2); font-size: var(--step--1); font-weight: 700; }
.stats-totals dd { margin: 2px 0 0; font-family: var(--font-num); font-size: var(--step-2); font-weight: 700; font-variant-numeric: tabular-nums; }
.stats-chart { display: grid; grid-template-columns: repeat(30, minmax(0, 1fr)); align-items: end; gap: 3px; height: 140px; margin: 0 0 32px; padding: 0 0 22px; list-style: none; border-bottom: 1px solid var(--rule); }
.stats-bar { position: relative; height: calc(var(--h, 0) * 100%); min-height: 2px; border-radius: 3px 3px 0 0; background: var(--cue); }
.stats-day { position: absolute; top: calc(100% + 6px); left: 50%; color: var(--ink-2); font-size: var(--step--2); white-space: nowrap; transform: translateX(-50%); }
.stats-lists { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.stats-list { margin: 0; padding: 0; list-style: none; }
.stats-list li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--rule); font-size: var(--step--1); }
.stats-n { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
/* 区切りの無い長いサイト名も折り返し、回数はいつも見えるように（B-071） */
.stats-list li > span:first-child { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 479px) {
  .stats-totals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 右上の「いいね」（このサイトいいね！）。ほかのボタンより目立つよう、琥珀色で塗る */
.like-top { border-color: var(--cue); background: var(--cue); color: var(--on-cue); }
.like-top .like-heart { stroke: currentColor; }
.like-top[aria-pressed="true"] { border-color: var(--cue-strong); background: transparent; color: inherit; }
/* 押した後のハートの線と枠は濃い合図の色にする（紙との対比 3:1 以上。B-031） */
.like-top[aria-pressed="true"] .like-heart { fill: var(--cue); stroke: var(--cue-strong); }
@media (hover: hover) {
  .like-top[aria-pressed="false"]:hover { background: var(--cue-strong); border-color: var(--cue-strong); color: var(--paper); }
}
@media (prefers-reduced-motion: no-preference) {
  .like-top[aria-pressed="true"] .like-heart { animation: like-pop 0.35s ease-out; }
  @keyframes like-pop { 0% { transform: scale(0.6); } 60% { transform: scale(1.3); } 100% { transform: scale(1); } }
}
.stats-likes { margin: -8px 0 20px; font-weight: 700; }

/* いま配信中（/live/。2026-10-03。夜に改訂：画面の数 1〜12、絞り込み、スクロールせず画面にフィット、右のパネルを隠す）。
   プレイヤーの上には何も重ねない（YouTube の決まり）。色は今のトークンだけ。画面の大きさは live-v*.js が計算して --cols と --slot-w に入れる */
.page-live { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100dvh; overflow: hidden; }
.page-live .masthead { position: static; flex-wrap: nowrap; }
/* 上の帯を 1 段に収める（サイト名は短い形） */
@media (max-width: 599px) {
  .page-live .brand-long { display: none; }
  .page-live .brand-short { display: inline; }
}
/* 知らせ（共有・いいね）は上の帯の上に出す（プレイヤーに重ねない） */
.page-live .toast { top: calc(10px + var(--safe-top)); bottom: auto; }
.page-live .site-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 14px; padding: 6px var(--gutter) calc(6px + env(safe-area-inset-bottom)); font-size: var(--step--2); }
.page-live .site-footer p, .page-live .site-footer nav { max-width: none; margin: 0; }
.page-live .site-footer nav { gap: 2px 12px; }
/* 中の部品に display を決めていても、hidden の間は出さない */
.live [hidden] { display: none; }
/* 縦長の画面：上に題と操作、真ん中に画面、下に配信中の帯（.live-side は中身をそのまま並べる） */
.live { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto minmax(0, 1fr) auto; grid-template-areas: "head" "controls" "messages" "stage" "list"; gap: 8px; min-height: 0; overflow: hidden; padding: 8px 0; }
.live-side { display: contents; }
.live-head, .live-controls, .live-messages, .live-channels { padding-inline: var(--gutter); }
/* 横長の画面：左に画面、右の列に題・操作・配信中の一覧（一覧だけが縮んで、その中で送る。はみ出さない） */
@media (min-aspect-ratio: 1/1) {
  .live { grid-template-columns: minmax(0, 1fr) 280px; grid-template-rows: minmax(0, 1fr); grid-template-areas: "stage side"; column-gap: 12px; }
  .live-side { grid-area: side; display: flex; flex-direction: column; gap: 8px; min-height: 0; overflow: hidden; }
  .live-side > .live-channels { flex: 1 1 auto; }
  .live-stage { padding-left: var(--gutter); }
  .live-head, .live-controls, .live-messages, .live-channels { padding-inline: 0 var(--gutter); }
}
.live-head { grid-area: head; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.live-title { margin: 0; font-size: var(--step-0); font-weight: 800; }
.live-count, .live-note, .live-slot-meta { margin: 0; color: var(--ink-2); font-size: var(--step--1); }
.live-note, .live-hint { margin: 0; color: var(--ink-2); font-size: var(--step--2); }
.live-controls { grid-area: controls; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.live-step { min-width: 44px; padding: 0 14px; }
.live-screens { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--rule); border-radius: 999px; }
.live-screens-label { padding: 0 4px 0 8px; color: var(--ink-2); font-size: var(--step--2); font-weight: 700; }
.live-screens button { min-width: 34px; min-height: 36px; padding: 0 8px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); font-size: var(--step--1); font-weight: 700; cursor: pointer; }
.live-screens button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.live-screens button[aria-disabled="true"] { opacity: 0.4; cursor: not-allowed; }
.live-filter-button { margin-left: auto; }
.live-messages { grid-area: messages; }
.live-status { margin: 0; font-size: var(--step--1); }
.live-status:empty { display: none; }
.live-empty { padding: 10px 12px; border-left: 4px solid var(--cue-strong); background: var(--surface); }
.live-empty p { margin: 0; }
.live-empty ul { margin: 6px 0 0; padding-left: 1.2em; }
.live-empty .text-button { margin-top: 2px; }
/* 画面の並び：場所に入るいちばん大きな 16:9 を JS が決める（--slot-w）。名前の帯は 36px */
.live-stage { grid-area: stage; display: grid; grid-template-columns: repeat(var(--cols, 1), var(--slot-w, 0px)); justify-content: center; align-content: center; gap: 8px; min-height: 0; overflow: hidden; }
.live-slot { display: grid; grid-template-rows: auto 36px; min-width: 0; border-radius: 10px; }
/* 選んでいる画面：プレイヤーの外側の枠（プレイヤーには重ねない） */
.live-slot.is-selected { outline: 3px solid var(--cue-strong); outline-offset: 2px; }
.live-player { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border: 1px solid var(--rule); border-radius: 10px 10px 0 0; background: var(--surface); }
.live-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.live-linkout, .live-empty-slot { position: absolute; inset: 0; display: grid; place-items: center; padding: 8px; text-align: center; }
.live-linkout img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.35; }
.live-linkout a { position: relative; display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; background: var(--ink); color: var(--paper); font-weight: 800; text-decoration: none; }
.live-empty-slot { margin: 0; color: var(--ink-2); font-size: var(--step--1); }
.live-slot-bar { display: flex; align-items: center; gap: 8px; width: 100%; height: 36px; padding: 0 10px; overflow: hidden; border: 1px solid var(--rule); border-top: 0; border-radius: 0 0 10px 10px; background: var(--surface); color: inherit; font: inherit; text-align: left; white-space: nowrap; cursor: pointer; }
.live-slot.is-selected .live-slot-bar { background: color-mix(in oklab, var(--cue) 16%, var(--surface)); }
.live-slot-name { flex: none; font-weight: 800; }
/* ドラッグ&ドロップ（2026-10-03 夜）。ドラッグしている間だけ、枠（iframe）がドラッグを受け取らないようにする（見た目は変えない。プレイヤーの上に何も重ねない） */
.is-dragging .live-player iframe { pointer-events: none; }
.live-channel[draggable="true"], .live-slot-bar[draggable="true"] { cursor: grab; }
.live-slot.is-drop-target { outline: 3px dashed var(--cue-strong); outline-offset: 2px; }
.live-slot.is-drop-target .live-slot-bar { background: color-mix(in oklab, var(--cue) 32%, var(--surface)); }
.live-slot.is-drop-target .live-slot-bar > * { display: none; }
.live-slot.is-drop-target .live-slot-bar::after { content: "ここに入れる"; font-weight: 800; }
/* 右のパネルを隠すボタン（上の帯）。右の列があるとき（横長の画面）だけ出す。隠すと画面が右の端まで広がる（2026-10-03 夜のユーザーの依頼）。
   スマホ（下の 1 画面だけの条件と同じ）では出さず、隠してもいない形にする（横向きは高さで大きさが決まり、隠しても大きくならないため）。
   上の帯が 1 段に収まるように、幅 900px 未満では絵だけ（読み上げの名前はそのまま） */
.live-panel-toggle { display: none; }
@media (min-aspect-ratio: 1/1) and (min-width: 600px) and (min-height: 481px) {
  .live-panel-toggle { display: inline-flex; }
  .live.is-panel-hidden { grid-template-columns: minmax(0, 1fr); grid-template-areas: "stage"; }
  .live.is-panel-hidden .live-side { display: none; }
  .live.is-panel-hidden .live-stage { padding-right: var(--gutter); }
}
@media (max-width: 899px) {
  .live-panel-toggle { justify-content: center; width: 2.75rem; padding: 0; }
  .live-panel-toggle .icon-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}
/* 1 画面で場所が足りないときは、名前の帯を省いてプレイヤーを大きくする（JS が is-barless を付ける） */
.live-stage.is-barless .live-slot { grid-template-rows: auto; }
.live-stage.is-barless .live-slot-bar { display: none; }
.live-stage.is-barless .live-player { border-radius: 10px; }
.live-slot-meta { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* 配信中の一覧：縦長の画面では下の帯（横に送る）、横長の画面では右の列（縦に送る） */
.live-channels { grid-area: list; display: flex; gap: 8px; min-height: 0; margin: 0; padding-block: 2px; overflow: auto; list-style: none; scroll-snap-type: x proximity; }
.live-channels li { flex: none; width: 124px; scroll-snap-align: start; }
.live-channel { display: grid; gap: 4px; width: 100%; padding: 5px; border: 1px solid var(--rule); border-radius: 10px; background: var(--surface); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.live-channel.is-shown { border-color: var(--ink-2); }
.live-channel[aria-current="true"] { border-color: var(--cue-strong); box-shadow: inset 0 0 0 2px var(--cue-strong); }
.live-channel-thumb { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 6px; background: var(--paper); object-fit: cover; }
.live-channel-time { color: var(--ink-2); font-family: var(--font-num); font-size: var(--step--2); }
.live-channel-name { overflow: hidden; font-size: var(--step--1); font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
@media (min-aspect-ratio: 1/1) {
  .live-channels { flex-direction: column; scroll-snap-type: y proximity; }
  .live-channels li { width: auto; }
  .live-channel { grid-template-columns: 96px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 8px; align-items: center; }
  .live-channel-thumb { grid-row: 1 / 3; }
}
/* スマホの縦向き：下の帯はサムネイルを出さず、名前と時刻の札だけ（画面に場所を回す） */
@media (max-aspect-ratio: 1/1) and (max-width: 599px) {
  .live-channel-thumb { display: none; }
  .live-channels li { width: auto; }
  .live-channel { grid-auto-flow: column; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; }
}
/* スマホ（幅 600px 未満、または高さ 480px 以下の横向き）は 1 画面だけ（ユーザーの判断）。画面の数のボタンは出さない。live-v*.js の PHONE と同じ条件 */
@media (max-width: 599px), (max-height: 480px) {
  .live-screens, .live-hint { display: none; }
}
/* 背の低い画面（スマホの横向き）：上の帯を詰め、下の帯は 1 行（帯の中だけ横に送れる）。画面に場所を回す */
@media (max-height: 480px) {
  .page-live .masthead { min-height: 0; padding-block: calc(4px + var(--safe-top)) 4px; }
  .page-live .site-footer { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; padding-block: 4px calc(4px + env(safe-area-inset-bottom)); }
  .page-live .site-footer nav { flex-wrap: nowrap; }
  .live { padding-block: 4px; }
}
/* 狭い画面：前へ・次へは矢印だけ、画面の数は数字だけ（読み上げの名前はそのまま）。操作の行を 1 行に収める */
@media (max-width: 479px) {
  .live-step-label { display: none; }
  .live-step { min-width: 40px; padding: 0 10px; }
  .live-controls { gap: 6px; }
}
