/* layout.css: 行の高さ（コンパクト）の上書き、ページのレイアウト、読み込み中の骨組み、日の見出し。 */
/* ---------- コンパクトな行 (表示 → 行の高さ) ---------- */
:root[data-density="compact"] { --row-h: 54px; }
:root[data-density="compact"] .show { --show-pad: 3px 6px 3px 9px; }
:root[data-density="compact"] .row .show b { -webkit-line-clamp: 1; line-clamp: 1; font-size: 12px; }
/* コンパクト: 小さい文字。どちらの行も潰さない。 */
:root[data-density="compact"] .show b { font-size: 12px; line-height: 1.3; flex: none; }
:root[data-density="compact"] .show span { font-size: 11px; line-height: 1.3; letter-spacing: 0;
  flex: none; }
:root[data-density="compact"] .row.has-band { height: calc(var(--row-h) + 16px); }
:root[data-density="compact"] .row.has-band .show { top: 22px; }
:root[data-density="compact"] .band { top: 4px; }
:root[data-density="compact"] .quick { width: 22px; height: 22px; bottom: 4px; }
:root[data-density="compact"] .row.idle { height: 30px; }

/* ---------- layout ---------- */
.layout { max-width: 1400px; margin: 0 auto; }
/* シートの今の高さ（--sheet-now）は #plan の中にしかない（base.css）。ページ側は、シートがいちばん高いとき
   （--sheet-h）に合わせる: 時間割の最後の行やフォーカスした上映回がシートに隠れない。シートが低いときは、
   下に少し余白が増える。上映回ごとの scroll-margin もここ（scroll-padding）にまとめた（2026-11-28）。 */
html { scroll-padding: calc(var(--top-h, 0px) + 46px) 0 calc(var(--sheet-h) + 12px); }
main { min-width: 0; padding: 22px 0 calc(var(--sheet-h) + 24px); }
:root[data-panel="closed"] main { padding-bottom: 96px; }
@media (min-width: 1100px), (min-width: 700px) and (max-height: 520px) {
  .layout { display: grid; grid-template-columns: minmax(0, 1fr) var(--panel-w); gap: 0 20px; padding-right: 16px; }
  main, :root[data-panel="closed"] main { padding-bottom: 48px; }
}
/* data.json が届くまでも、時間割の高さはほぼ最終の高さに保つ。 */
.grid:empty, .grid:has(> .skeleton) { height: max(560px, 100vh); }
/* データが入ったら、本物の時間割が骨組みの上にフェードインする（初回のみ）。 */
.grid.appear > .row, .grid.appear > .empty { animation: appear .28s var(--ease) both; }
@keyframes appear { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .grid.appear > .row, .grid.appear > .empty { animation: none; } }
/* 読み込み中: 時間割の形をした灰色の行をゆるく脈打たせる。半券ちゃんは1秒以上かかるときだけ。 */
.skeleton { position: relative; }
.sk-row { position: relative; height: var(--row-h); border-top: 1px solid var(--line); }
.sk-row i { position: absolute; display: block; border-radius: var(--radius); background: var(--surface-2);
  animation: sk 1.4s ease-in-out infinite; }
.sk-label { left: 14px; top: calc(50% - 7px); width: calc(var(--label-w) - 36px); height: 14px; }
.sk-show { top: 10px; bottom: 10px; margin-left: var(--label-w); max-width: calc(100% - var(--label-w)); }
@keyframes sk { 50% { opacity: .55; } }
/* 読み込み中は 開催中 / 上映なし の行と時刻の目盛りにも仮の形を出す。空けた場所が空白に見え、
   あとで中身が跳ねるのを避けるため。 */
:root:has(.grid > .skeleton) .idle-group:empty::before { content: ""; width: 240px; max-width: 60%; height: 26px;
  border-radius: var(--radius-lg); background: var(--surface-2); animation: sk 1.4s ease-in-out infinite; }
:root:has(.grid > .skeleton) .dates:empty { background: repeating-linear-gradient(90deg, var(--surface-2) 0 52px,
  transparent 52px 60px) 16px 4px / calc(100% - 32px) 52px no-repeat; animation: sk 1.4s ease-in-out infinite; }
:root:has(.grid > .skeleton) .hours:empty { background: linear-gradient(var(--surface-2),
  var(--surface-2)) 0 50% / 100% 6px no-repeat; margin-right: 16px; border-radius: var(--radius);
  animation: sk 1.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .sk-row i { animation: none; } }
.loading { position: absolute; left: 50%; translate: -50% 0; top: 110px; width: max-content;
  max-width: calc(100% - 32px); display: none; flex-direction: column; align-items: center; gap: 8px;
  padding: 18px 22px; border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-2);
  font-family: var(--font-ja); font-size: 13px; color: var(--muted); text-align: center; }
.loading p { margin: 0; }
.loading .btn { margin-top: 4px; }
:root[data-loading-slow] .loading, :root[data-loading-failed] .loading { display: flex; }
:root[data-loading-failed] .sk-row i { animation: none; opacity: .5; }
/* 古いブラウザの知らせ（index.html の小さなスクリプト）。古い Safari は translate の指定を知らないので、中央寄せは margin で。 */
.loading.old-browser { display: flex; position: static; translate: none; margin: 40px auto; line-height: 1.7; }
.loading.old-browser a { color: var(--accent); }
/* 読み込みが遅いとき、半券ちゃんが歩く (chan-walk.svg)。別ページが遅いときと同じ（このファイルの :root.navigating-slow）。 */
.grid { position: relative; }
/* 日付を切り替えたとき、日の見出しと時間割がその場でふわっと入れ替わる（js/sheets.js が .fading を付け直す）。
   めくる向きにすべらせる案（16px・6px）も見比べたが、すべらない方が静か（運営者と決めた、2026-11-28）。時間割まで
   すべらせると、途中のタップが外れ、はしごの線の位置もずれた。 */
.dayhead.fading, .grid.fading { animation: fade-in var(--dur-panel) var(--ease); }
@keyframes fade-in { from { opacity: 0; } }
/* 劇場の表示・非表示・並べ替えのあと（js/core.js setVprefs）。その場でふわっと。 */
.grid.refade { animation: fade-in var(--dur-open) var(--ease); }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: var(--dur-panel);
  animation-timing-function: var(--ease); }

/* ---------- 日の見出し ---------- */
.dayhead { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 4px 16px;
  min-height: 66px; padding: 0 16px 14px; }
.dayhead h2 { margin: 0; display: flex; align-items: baseline; gap: 12px; font-weight: 400; }
.dayhead .big { font-family: var(--font-display); font-style: var(--display-style); font-weight: var(--display-weight);
  font-stretch: var(--display-stretch); font-size: 60px; line-height: .85; letter-spacing: -.04em; padding: 0 .06em;
  transition: opacity var(--dur-panel) var(--ease); }
:root[data-display-wait] .dayhead .big { opacity: 0; }
.dayhead .dow { display: grid; gap: 2px; }
.dayhead .hol { margin-left: 6px; color: var(--ng); font-size: .9em; }
.dayhead .en { display: none; font-family: var(--font-num); font-stretch: 100%; font-size: 11px; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase; }
.dayhead .ja { font-family: var(--font-ja); font-size: 13px; font-weight: var(--ja-light); color: var(--muted); }
.dayhead p { display: flex; flex-wrap: wrap; gap: 0 14px; margin: 0; color: var(--muted); font-family: var(--font-ja);
  font-weight: var(--ja-light); font-size: 12px; }
/* 時間割の上のお知らせ（index.html の #newsBar）。日付の下に1行。 */
.news-bar { flex-basis: 100%; display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 4px 4px 4px 10px;
  border-radius: var(--radius-lg); background: color-mix(in srgb, var(--accent) 9%, transparent); font-family: var(--font-ja);
  font-size: 13px; }
.news-bar[hidden] { display: none; }
.news-bar .nb-new { flex: none; padding: 1px 6px; border-radius: 999px; background: var(--accent); color: var(--on-accent);
  font-family: var(--font-num); font-size: 10px; font-weight: 700; letter-spacing: .06em; }
.news-bar .nb-go { flex: 1; min-width: 0; padding: 4px 0; border: 0; background: none; color: var(--accent); font: inherit;
  font-weight: 600; text-align: left; text-decoration: none; cursor: pointer; }
.news-bar .nb-x { flex: none; width: 30px; height: 30px; border: 0; border-radius: var(--radius-lg); background: none; color: var(--muted);
  cursor: pointer; }
.news-bar .nb-x::before { content: "×"; font-size: 17px; line-height: 1; }
@media (hover: hover) { .news-bar .nb-go:hover { text-decoration: underline; } .news-bar .nb-x:hover { color: var(--ink); } }
/* 接続なしでキャッシュからデータを読んだとき (js/boot.js): 更新の代わりに、ブランド色で一度だけ知らせる。 */
.dayhead p .offline { color: var(--accent); }
/* 別ページへ移るとき: リンクを押した瞬間に最上部へ細いバーを出し、タップが無視されたように見えないようにする。
   ホーム画面のアプリにはブラウザの読み込み表示がないため。（遷移スクリプトが付け、pageshow で消す。） */
:root.navigating::before { content: ""; position: fixed; left: 0; top: 0; z-index: 10000; width: 100%; height: 3px;
  background: var(--accent); transform-origin: left; animation: nav-bar 6s cubic-bezier(.08, .8, .2, 1) forwards;
  pointer-events: none; }
:root.navigating, :root.navigating * { cursor: progress; }
@keyframes nav-bar { from { scale: 0 1; } to { scale: .92 1; } }
@media (prefers-reduced-motion: reduce) { :root.navigating::before { animation: none; scale: .6 1; } }
/* しばらくかかるとき: 画面の真ん中で半券ちゃんが歩く（専用のアニメーション、site/chan-walk.svg）。
   次のページが届くまで。インラインにするのは、回線が遅いときは画像の取得も待たされるため。 */
:root.navigating-slow::after { content: ""; position: fixed; left: 50%; top: 50%; z-index: 10000; width: 72px;
  height: 72px; margin: -36px 0 0 -36px;
  background:
  url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 64 64%22%3E%0A  %3C%21-- %E5%8D%8A%E5%88%B8%E3%81%A1%E3%82%83%E3%82%93%EF%BC%88%E3%82%84%E3%82%8F%E3%82%89%E3%81%8B%EF%BC%89: %E3%81%A6%E3%81%8F%E3%81%A6%E3%81%8F%E6%AD%A9%E3%81%8F%E3%80%82%E8%AA%AD%E3%81%BF%E8%BE%BC%E3%81%BF%E4%B8%AD%E3%81%AB%E3%80%82 --%3E%0A  %3Cstyle%3E%0A    .walk, .fl, .fr, .al, .ar, .dots circle %7B transform-box: view-box%3B animation: .8s ease-in-out infinite%3B %7D%0A    .walk %7B transform-origin: 32px 54px%3B animation-name: walk%3B %7D%0A    .fl %7B animation-name: lift%3B %7D .fr %7B animation-name: lift%3B animation-delay: -.4s%3B %7D%0A    .al %7B transform-origin: 18px 38.6px%3B animation-name: swing-l%3B animation-delay: -.4s%3B %7D .ar %7B transform-origin: 46px 38.6px%3B animation-name: swing-r%3B %7D%0A    .dots circle %7B animation: dot 1.2s linear infinite%3B %7D .dots circle:nth-child(2) %7B animation-delay: .2s%3B %7D .dots circle:nth-child(3) %7B animation-delay: .4s%3B %7D%0A    %40keyframes walk %7B 0%25, 100%25 %7B transform: translateY(0) rotate(-3deg)%3B %7D 25%25, 75%25 %7B transform: translateY(-1.3px) rotate(0)%3B %7D 50%25 %7B transform: translateY(0) rotate(3deg)%3B %7D %7D%0A    %40keyframes lift %7B 0%25, 100%25 %7B transform: translate(0, -2.2px)%3B %7D 50%25 %7B transform: translate(0, 0)%3B %7D %7D%0A    /%2A Arms swing back and forth with the opposite foot: seen from the front, a little up-and-down and a small turn, not a flap. %2A/%0A    %40keyframes swing-l %7B 0%25, 100%25 %7B transform: translateY(-.9px) rotate(7deg)%3B %7D 50%25 %7B transform: translateY(.5px) rotate(-4deg)%3B %7D %7D%0A    %40keyframes swing-r %7B 0%25, 100%25 %7B transform: translateY(-.9px) rotate(-7deg)%3B %7D 50%25 %7B transform: translateY(.5px) rotate(4deg)%3B %7D %7D%0A    %40keyframes dot %7B 0%25, 100%25 %7B opacity: .25%3B %7D 30%25 %7B opacity: 1%3B %7D %7D%0A    %40media (prefers-reduced-motion: reduce) %7B %2A %7B animation: none %21important%3B %7D %7D%0A  %3C/style%3E%0A  %3Ccircle cx=%2232%22 cy=%2233%22 r=%2230%22 fill=%22%23cfe6e3%22/%3E%0A  %3Cg class=%22walk%22%3E%0A    %3Cg fill=%22%232a6f77%22 stroke=%22%235b4338%22 stroke-width=%222.2%22%3E%3Cg class=%22fl%22%3E%3Cg transform=%22translate(25.4 55.5)%22%3E%3Cpath transform=%22translate(-0.9 -2.4) rotate(-14)%22 d=%22M-4.5 0.41C-4.95 -2.89 -2.02 -4.01 0.68 -3.47C3.38 -2.99 4.68 -1.19 4.14 0.85C3.69 2.65 1.8 2.92 -0.22 3.06C-2.7 3.23 -4.41 2.72 -4.5 0.41z%22/%3E%3C/g%3E%3C/g%3E%3Cg class=%22fr%22%3E%3Cg transform=%22translate(38.6 55.5) scale(-1 1)%22%3E%3Cpath transform=%22translate(-0.9 -2.4) rotate(-14)%22 d=%22M-4.5 0.41C-4.95 -2.89 -2.02 -4.01 0.68 -3.47C3.38 -2.99 4.68 -1.19 4.14 0.85C3.69 2.65 1.8 2.92 -0.22 3.06C-2.7 3.23 -4.41 2.72 -4.5 0.41z%22/%3E%3C/g%3E%3C/g%3E%3C/g%3E%0A    %3Cg fill=%22%23eef7f5%22 stroke=%22%235b4338%22 stroke-width=%222.2%22%3E%3Cg class=%22al%22%3E%3Cpath d=%22M16.58 37.34L13.58 40.74C12.53 41.93 10.88 42.5 9.12 44.78C8.23 47.44 9.73 48.56 11.27 48.79C12.95 49.09 14.27 48.11 14.58 45.96C14.22 43.22 15.37 44.45 16.42 43.26L19.42 39.86z%22 stroke-linejoin=%22round%22/%3E%3C/g%3E%3Cg class=%22ar%22%3E%3Cpath d=%22M44.58 39.86L47.58 43.26C48.63 44.45 49.78 43.22 49.12 46.02C49.41 48.81 51.24 49.21 52.73 48.79C54.39 48.37 55.18 46.93 54.58 44.84C53.12 42.5 51.47 41.93 50.42 40.74L47.42 37.34z%22 stroke-linejoin=%22round%22/%3E%3C/g%3E%3C/g%3E%0A    %3Cg transform=%22rotate(0 32 36)%22%3E%0A  %3Cpath d=%22M19 15h26a4 4 0 0 1 4 4v9a4.2 4.2 0 0 0 0 8.4V47a4 4 0 0 1-4 4H19a4 4 0 0 1-4-4V36.4a4.2 4.2 0 0 0 0-8.4V19a4 4 0 0 1 4-4z%22%0A    fill=%22%23eef7f5%22 stroke=%22%235b4338%22 stroke-width=%222.2%22 stroke-linejoin=%22round%22/%3E%0A  %3Cpath d=%22M17.5 21.5h29%22 stroke=%22%232a6f77%22 stroke-width=%221.5%22 stroke-dasharray=%222 2.2%22 stroke-linecap=%22round%22 opacity=%22.55%22/%3E%3Cellipse cx=%2225.5%22 cy=%2235%22 rx=%221.35%22 ry=%221.75%22 fill=%22%235b4338%22/%3E%3Cellipse cx=%2238.5%22 cy=%2235%22 rx=%221.35%22 ry=%221.75%22 fill=%22%235b4338%22/%3E%3Cg fill=%22%23f4b6b0%22%3E%3Cellipse cx=%2222%22 cy=%2239%22 rx=%222.4%22 ry=%221.4%22/%3E%3Cellipse cx=%2242%22 cy=%2239%22 rx=%222.4%22 ry=%221.4%22/%3E%3C/g%3E%3Cpath d=%22M30.8 38.2 h2.4%22 stroke=%22%235b4338%22 stroke-width=%221.4%22 fill=%22none%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22/%3E%3C/g%3E%0A  %3C/g%3E%0A  %3Cg class=%22dots%22 fill=%22%232a6f77%22%3E%3Ccircle cx=%2246%22 cy=%229%22 r=%221.5%22/%3E%3Ccircle cx=%2251%22 cy=%229%22 r=%221.5%22/%3E%3Ccircle cx=%2256%22 cy=%229%22 r=%221.5%22/%3E%3C/g%3E%0A%3C/svg%3E%0A") center / contain no-repeat; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .18)); pointer-events: none; animation: chan-in .25s var(--ease) both; }
@keyframes chan-in { from { opacity: 0; scale: .7; } }
@media (prefers-reduced-motion: reduce) { :root.navigating-slow::after { animation: none; } }
