/* sheets.css: ダイアログの枠と詳細シート、半券、ボタン、ホバーカード、ほかの回の一覧。 */
/* ---------- 詳細シート ---------- */
dialog { border: 1px solid var(--line-strong); border-top: 3px solid var(--tc, var(--line)); padding: 0;
  width: min(94vw, 480px); max-height: 86vh; background: var(--surface); color: var(--ink);
  border-radius: var(--radius); box-shadow: var(--shadow-4);
  transition: opacity var(--dur-open) var(--ease), translate var(--dur-open) var(--ease), overlay var(--dur-open) allow-discrete,
  display var(--dur-open) allow-discrete; }
dialog::backdrop { background: rgba(10, 10, 12, .45);
  transition: background-color var(--dur-open) var(--ease), overlay var(--dur-open) allow-discrete, display var(--dur-open) allow-discrete; }
/* 上映回の詳細（data-light）は showModal でなく show で開く（js/sheets.js の openModal）。最上層に乗らないので、
   置き場所・中のスクロール・後ろの幕（.scrim）を自分で持つ。重なりはトースト（50）より上。 */
dialog[data-light] { position: fixed; inset: 0; z-index: 61; margin: auto; overflow: auto; }
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(10, 10, 12, .45); opacity: 0; pointer-events: none;
  transition: opacity var(--dur-open) var(--ease); }
.scrim.on { opacity: 1; pointer-events: auto; }
/* シートの中のスクロールは中で止める。後ろの時間割へ引き継がず、
   シートが開いている間は後ろのページもスクロールさせない。 */
dialog, dialog .sheet, .venues, .plan-body { overscroll-behavior: contain; }
/* モーダルの中のスクロールバーは、地を透明にしてつまみだけ薄く（枠から浮いて見えないように）。Safari は重ねて出すので効かない。 */
dialog, dialog .sheet-scroll { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
/* スクロールバーの幅はいつも取っておく: 止めるとスクロールバーが消え、PC で時間割が横に 15px ずれていた（2026-11-28）。 */
:root { scrollbar-gutter: stable; }
:root:has(dialog[open]) { overflow: hidden; }
/* hidden ではなく clip: hidden だと body が独自のスクロール箱になり、固定ヘッダー（と目盛り）が画面ではなく
   body に貼り付いて、シートが開いている間にずれて跳ぶ。 */
:root:has(dialog[open]) body { overflow: clip; }
/* 開閉: 広い画面ではフェードして落ち着き、スマホでは下からスライドして出る。 */
dialog:not([open]) { opacity: 0; translate: 0 10px; }
@starting-style { dialog[open] { opacity: 0; translate: 0 10px; } }
@starting-style { dialog[open]::backdrop { background-color: transparent; } }
@media (max-width: 600px) {
  dialog { width: 100vw; max-width: 100vw; max-height: 88vh; margin: auto 0 0; border-width: 3px 0 0;
    border-radius: 0; }
  dialog[data-light] { margin: auto 0 0; }
  dialog:not([open]) { opacity: 1; translate: 0 100%; }
  @starting-style { dialog[open] { opacity: 1; translate: 0 100%; } }
}
.sheet { position: relative; padding: 20px 22px calc(22px + env(safe-area-inset-bottom)); }
.sheet:focus { outline: none; }
.sheet .eyebrow { padding-right: 40px; font-family: var(--font-ja); font-size: 12px; color: var(--muted); display: flex;
  align-items: center; gap: 6px; margin-bottom: 6px; }
.sheet .eyebrow i { width: 6px; height: 6px; border-radius: 50%; background: var(--tc); }
.sheet .eyebrow a { display: inline-flex; align-items: center; gap: 2px; color: inherit; }
.sheet .eyebrow a svg { width: 12px; height: 12px; rotate: -90deg; opacity: .7; }
.sheet .eyebrow a:hover { color: var(--ink); }
.sheet h3 { margin: 0 0 8px; font-family: var(--font-title); font-weight: var(--title-weight); font-size: 24px;
  line-height: 1.35; letter-spacing: .01em; }
.sheet .program { display: flex; gap: 8px; align-items: baseline; font-family: var(--font-ja); font-size: 12px;
  margin-bottom: 12px; color: var(--muted); }
.sheet .program b { color: var(--tc); font-weight: 700; flex: none; }
/* 上映回の時刻を半券として出す: 左に時刻と日付、ミシン目の向こうに追加ボタン。
   半券が切れる所の切り欠きは半券から抜いてあるので、後ろが何色でも合う。 */
.stub { --cut: 128px; position: relative; display: flex; align-items: stretch; margin: 14px 0 10px;
  border-radius: var(--radius); background: color-mix(in srgb, var(--tc) 10%, var(--surface));
  -webkit-mask: radial-gradient(circle 6px at calc(100% - var(--cut)) 0, #0000 97%, #000) top / 100% 51% no-repeat,
    radial-gradient(circle 6px at calc(100% - var(--cut)) 100%, #0000 97%, #000) bottom / 100% 51% no-repeat;
  mask: radial-gradient(circle 6px at calc(100% - var(--cut)) 0, #0000 97%, #000) top / 100% 51% no-repeat,
    radial-gradient(circle 6px at calc(100% - var(--cut)) 100%, #0000 97%, #000) bottom / 100% 51% no-repeat; }
.stub.picked { background: var(--ticket); color: var(--ticket-ink); }
.stub-main { flex: 1; min-width: 0; padding: 12px 14px 11px 16px; }
.sheet .when { font-size: 20px; font-weight: 600; line-height: 1.15; letter-spacing: -.01em; margin: 0;
  white-space: nowrap; }
.sheet .when i { font-style: normal; margin: 0 .25em; opacity: .45; font-weight: 400; }
.stub-sub { display: flex; flex-wrap: wrap; gap: 2px 10px; margin-top: 4px; font-family: var(--font-ja);
  font-size: 12px; color: var(--muted); }
/* いちばん狭いスマホでは、日付・上映時間・形式をまとめて次の行へ送り、「（月）」や「分」
   だけが残らないようにする。 */
.stub-sub > span { white-space: nowrap; }
.stub.picked .stub-sub { color: inherit; opacity: .75; }
.stub-add { position: relative; flex: none; width: var(--cut); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px; padding: 8px 10px; border: 0;
  border-radius: 0 var(--radius) var(--radius) 0; background: var(--ink); color: var(--bg); font-family: var(--font-ja);
  font-size: 13px; font-weight: 700; line-height: 1.3; text-align: center; cursor: pointer;
  transition: background .4s var(--ease), color .4s var(--ease); }
.stub-add span { display: flex; flex-direction: column; }
.stub-add small { font-weight: 400; font-size: 11px; opacity: .7; }
.stub-add svg { width: 20px; height: 20px; transition: rotate .45s var(--ease), scale .45s var(--ease); }
/* ホバー: 錆浅葱に変わり、＋が少し回って大きくなる（押すと入る、が分かるように）。枠のボタンと同じくふわっと。 */
@media (hover: hover) {
  .stub-add:hover { background: var(--accent); color: var(--bg); transition-duration: .25s; }
  .stub-add:hover svg { rotate: 90deg; scale: 1.15; transition-duration: .25s; }
}
@media (prefers-reduced-motion: reduce) { .stub-add svg { transition: none; } .stub-add:hover svg { rotate: none; scale: none; } }
.stub.picked .stub-add { background: none; color: inherit;
  border-left: 2px dashed color-mix(in srgb, var(--ticket-ink) 35%, transparent); }
@media (hover: hover) { .stub.picked .stub-add:hover { background: color-mix(in srgb, var(--ticket-ink) 14%, transparent);
  color: inherit; } .stub.picked .stub-add:hover svg { rotate: none; scale: 1.1; } }
/* シートの段: 半券とその回にすること（ボタン）→ 作品のこと（事実・あらすじ）→ ほかの上映回 → 足元の補助。
   押せるものは3種類だけ: ボタン＝この回にすること、錆浅葱の文字＝よそへ読みに行く、灰色の文字＝補助（2026-11-30）。 */
.sheet .stale-note { margin: 0 0 12px; color: var(--ng); font: 12px/1.7 var(--font-ja); }
.sheet .stale-note a { color: inherit; }
.sheet .acts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 4px 0 18px; }
.sheet .acts .btn { justify-content: center; padding: 0 8px; font-size: 13px; white-space: nowrap; }
/* チケットは劇場へ送る入口。3つのうちこれだけ錆浅葱で、半券の黒い追加ボタンとは張り合わない細い枠。 */
.sheet .acts .btn.go { border-color: var(--accent); color: var(--accent); font-weight: 700; }
@media (hover: hover) { .sheet .acts .btn.go:hover { background: var(--accent); color: var(--bg); border-color: var(--accent); } }
.sheet .facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-family: var(--font-ja);
  font-size: 13px; line-height: 1.55; }
.sheet .facts dt { color: var(--muted); }
.sheet .facts dd { margin: 0; }
/* 小見出しはどれも事実の行のラベル（dt）と同じ、灰色の細い 12px。太さや色で段を分けず、線と余白で分ける。 */
.sheet .read > b, .sheet .also > b { display: block; margin-bottom: 2px; color: var(--muted); font-weight: 400;
  font-size: 12px; }
.sheet .read { margin: 12px 0 0; font-family: var(--font-ja); font-size: 13px; line-height: 1.55; }
.sheet .read-links { display: flex; flex-wrap: wrap; gap: 0 16px; }
.sheet .read a { display: inline-flex; align-items: center; gap: 4px; padding: 6px 0; color: var(--accent);
  overflow-wrap: anywhere; }
.sheet .read .lead { margin: 6px 0 0; font-size: 12px; }
.sheet .read .src { margin: 2px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.sheet .read .src a { display: inline; padding: 0; color: inherit; text-decoration: underline;
  text-underline-offset: 2px; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); background: none; }
.sheet .read .src a:hover { text-decoration-color: currentColor; }
.sheet .read svg { width: 13px; height: 13px; flex: none; }
.sheet .facts small { color: var(--muted); font-size: 11px; margin-left: 4px; }
/* マイ時間割との収まり・現在地からの余裕: 半券の下に添える一言。色を塗った箱を半券の下に重ねず、左の線だけに色
   （静謐の決めごと、docs/mission.md）。 */
.sheet .fit { margin: 8px 0 10px 2px; padding: 1px 0 1px 10px; border-left: 2px solid var(--ok); white-space: pre-line;
  font-family: var(--font-ja); font-size: 12px; line-height: 1.6; }
.sheet .fit.ng { border-color: var(--ng); }
.sheet .fit p { margin: 0; }
.sheet .fit .ok { color: var(--ok); }
.sheet .fit .ng { color: var(--ng); font-weight: 600; }
.sheet .meta { color: var(--muted); font-family: var(--font-ja); font-weight: var(--ja-light); font-size: 13px;
  margin: 0 0 4px; }
/* 足元の補助（共有する・公式スケジュール）: 灰色の小さな一行。ホバーで黒。 */
.sheet .links { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 18px 0 0; font-family: var(--font-ja);
  font-size: 12px; color: var(--muted); }
.sheet .links a, .sheet .links .link-btn { display: inline-flex; align-items: center; gap: 4px; color: inherit; }
.sheet .links a:hover, .sheet .links .link-btn:hover { color: var(--ink); }
.sheet .links svg { width: 13px; height: 13px; }
.btn { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px;
  border: 1px solid var(--line-strong); background: transparent; color: var(--ink); border-radius: var(--radius);
  cursor: pointer; text-decoration: none; font-family: var(--font-ja); font-size: 13px; font-weight: 400;
  /* 反転はふわっと: 乗せたときは少しゆっくり、離したときはさらにゆっくり戻す。 */
  transition: background .4s var(--ease), color .4s var(--ease), border-color .4s var(--ease); }
.btn svg { transition: translate .45s var(--ease); }
@media (hover: hover) { .btn:hover, .btn:hover svg { transition-duration: .25s; } }
/* ホバー: 色を反転し、外へのリンク（↗）は矢印を行き先の方へ少し動かす。指で触る端末には付けない。 */
@media (hover: hover) {
  .btn:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
  .btn:hover svg:last-child:not(:first-child) { translate: 2px -2px; }
}
@media (prefers-reduced-motion: reduce) { .btn svg { transition: none; } .btn:hover svg { translate: none; } }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.primary:hover { background: color-mix(in srgb, var(--ink) 82%, var(--bg)); }
/* 無効なコントロールではなく情報（「当日券のみ」）: 控えめだが、はっきり読める。 */
.btn.muted { color: var(--muted); cursor: default; border-color: var(--line); border-style: dashed; }
.btn.muted:hover { background: transparent; color: var(--muted); border-color: var(--line); }
.btn.muted:active { transform: none; }
.sheet-bar { position: sticky; top: 0; z-index: 3; height: 0; margin: -20px -22px 20px; }
.x { position: absolute; top: 10px; right: 10px; height: 36px; min-width: 36px; padding: 0 9px; display: flex;
  align-items: center; justify-content: center; gap: 4px; border: 1px solid transparent; border-radius: var(--radius);
  background: var(--surface); color: var(--muted); cursor: pointer; font-family: var(--font-ja); font-size: 13px; }
.x:hover { background: var(--surface-2); border-color: var(--line); color: var(--ink); }
.x svg { width: 18px; height: 18px; }
.x span { display: none; }
@media (max-width: 600px) {
  /* スマホ: シートを下へスワイプするつかみバーと、そう書いた閉じるボタン。 */
  .sheet { padding-top: 30px; }
  .sheet-bar { margin: -30px -22px 30px; }
  .sheet-bar::before { content: ""; position: absolute; left: 50%; top: 8px; width: 40px; height: 4px;
    border-radius: var(--radius-sm); background: var(--line-strong); opacity: .35; translate: -50% 0; }
  /* 下へ読み進めても上に留まり、ボタンの上に重なるので、浮いているとわかる影を付ける。 */
  .x { top: 14px; right: 12px; height: 32px; padding: 0 12px 0 8px; border-radius: 999px; background: var(--surface-2);
    color: var(--ink); box-shadow: var(--shadow-1); }
  .x span { display: inline; }
  .sheet .eyebrow, .contact h3, .help h3 { padding-right: 96px; }
  dialog.dragging { transition: none; }
}

.tip { position: fixed; z-index: 30; width: max-content; max-width: 300px; padding: 10px 12px 10px;
  pointer-events: none; background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong);
  border-top: 3px solid var(--tc); border-radius: var(--radius); box-shadow: var(--shadow-3);
  font-family: var(--font-ja); font-size: 12px; line-height: 1.5; }
.tip[hidden] { display: none; }
/* 出るときだけふわっと（隠すときはすぐ）。上映回の上に出るときは下から、下に出るときは上から寄る。隣の上映回へ移るときは
   出たまま中身が替わるだけなので、ちらつかない。 */
.tip { transition: opacity var(--dur-quick) var(--ease), translate var(--dur-quick) var(--ease); }
@starting-style { .tip:not([hidden]) { opacity: 0; translate: 0 3px; } }
@starting-style { .tip.below:not([hidden]) { opacity: 0; translate: 0 -3px; } }
@media (prefers-reduced-motion: reduce) { @starting-style { .tip:not([hidden]), .tip.below:not([hidden]) { translate: none; } } }
.tip b { display: block; font-family: var(--font-title); font-weight: var(--title-weight); font-size: 14px;
  line-height: 1.4; }
.tip .p { color: var(--muted); font-size: 11px; }
.tip .w { font-family: var(--font-num); font-stretch: var(--num-stretch); font-variant-numeric: tabular-nums;
  font-size: 13px; font-weight: 600; margin-top: 4px; }
.tip .m { color: var(--muted); }
.tip .tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 5px 0 3px; }
.tip .tags span { padding: 0 6px; border-radius: var(--radius); font-size: 11px; font-weight: 700; line-height: 1.7; }
.tip .tags .last { background: color-mix(in srgb, currentColor 14%, transparent); }
.tip .tags .gauge { border: 1px solid currentColor; line-height: calc(1.7em - 2px); font-family: var(--font-num);
  font-weight: 600; opacity: .85; }
.tip .list, .sheet .meta.list { display: flex; flex-wrap: wrap; gap: 0 12px; }
.sheet .eyebrow span { margin-left: 6px; }
.tip .rel { white-space: pre-line; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); }
.tip .rel.ok { color: var(--ok); } .tip .rel.ng { color: var(--ng); }
.tip .hint { margin-top: 4px; color: var(--muted); font-size: 11px; }
.also { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; font-family: var(--font-ja);
  font-size: 12px; }
.also ul { margin: 0; padding: 0; list-style: none; color: var(--muted); display: grid; gap: 2px; }
/* 一覧の足: この作品の全部の上映回（はしごの作品ページ）へ。行と同じ並びで、矢印は同じ向き。 */
.also .also-all { margin: 4px 0 0; }
.also .also-all a { display: inline-flex; align-items: center; gap: 2px; padding: 5px 0; color: var(--accent);
  font-size: 12px; }
/* はしごの中の先へ進む矢印（劇場名の脇と同じ向き）。 */
.sheet svg.fwd { width: 14px; height: 14px; rotate: -90deg; }
.also .num { flex: none; white-space: nowrap; color: var(--ink); margin-right: 8px; }
.also button { display: flex; width: 100%; align-items: baseline; gap: 4px; padding: 5px 6px; margin: 0 -6px; border: 0;
  border-radius: var(--radius); background: none; color: var(--muted); text-align: left; cursor: pointer; font: inherit;
  }
.also button:hover { background: var(--surface-2); color: var(--ink); }
.also button .go { margin-left: auto; align-self: center; display: flex; color: var(--muted); }
.also button .go svg { width: 14px; height: 14px; rotate: -90deg; }
.also button:hover .go { color: var(--ink); }
/* 「ほかの回」から飛んだ上映回は一度光って、見つけやすくする。 */
.show.spot, .label.spot, .vlabel.spot, .idle-chip.spot { animation: spot 1.4s var(--ease); }
@keyframes spot { 0%, 40% { box-shadow: 0 0 0 3px var(--accent); } 100% { box-shadow: 0 0 0 3px transparent; } }
/* この劇場でのその作品の最終回 (core.js finalIds)。 */
.sheet .stub-sub .final { padding: 0 7px; border-radius: 999px; background: var(--ink); color: var(--bg);
  font-style: normal; font-size: 11px; font-weight: 700; line-height: 1.7; align-self: center; }
/* チェックイン済み (timeline.js openDetail): チケットが半券になる。
   ブランド色で半券ちゃんの付いた半券も同じ見た目を共有する。 */
.stub.checked .stub-share { gap: 2px; background: var(--accent); color: var(--on-accent);
  border-left: 2px dashed color-mix(in srgb, var(--on-accent) 45%, transparent); font-size: 12px; }
.stub.checked .stub-share:hover { background: color-mix(in srgb, var(--accent) 88%, var(--ink)); }
.stub.checked .stub-share small { opacity: .85; }
.stub-sub .no { font-weight: 700; letter-spacing: .04em; }
/* 動きを減らす設定でも、何がどこへ行ったかは見せたい。脈打つ代わりに静止した輪を出す。 */
@media (prefers-reduced-motion: reduce) {
  /* 足したばかりのはしごの区間は、破線を動かして描く。動かさないときは最初から全部見せる。 */
  .ladder path.draw { stroke-dasharray: none; stroke-dashoffset: 0; }
  .show.spot, .label.spot, .vlabel.spot, .idle-chip.spot { box-shadow: 0 0 0 3px var(--accent); }
  #plan.nudge, .plan-tab.nudge { box-shadow: 0 0 0 3px var(--accent); }
}
/* ホーム画面に追加: マイ時間割のシートの上に出す小さなカード。 */
.install { position: fixed; left: 12px; right: 12px; bottom: calc(var(--sheet-now, 0px) + 12px); z-index: 40;
  display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 12px; border: 1px solid var(--line-strong);
  border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-3);
  font-family: var(--font-ja); }
.install[hidden] { display: none; }
.install .logo-mark { flex: none; width: 36px; height: 36px; }
.install div { flex: 1; min-width: 0; font-size: 12px; line-height: 1.5; color: var(--muted); }
.install b { display: block; color: var(--ink); font-size: 13px; }
.install .btn { flex: none; height: 32px; }
.install .x { position: static; flex: none; width: 28px; height: 28px; display: grid; place-items: center; padding: 0;
  border: 0; background: none; color: var(--muted); }
.install .x svg { width: 16px; height: 16px; }
.install .btn[hidden] { display: none; }
/* 画面下中央の小さな矢印。ページの下にある Safari の共有ボタンを指して揺れる。 */
.install-arrow { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 2px); z-index: 41;
  translate: -50% 0; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%;
  background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow-2);
  animation: nod 1.2s var(--ease) infinite; pointer-events: none; }
.install-arrow[hidden] { display: none; }
.install-arrow svg { width: 20px; height: 20px; }
@keyframes nod { 50% { transform: translateY(5px); } }
@media (prefers-reduced-motion: reduce) { .install-arrow { animation: none; } }
/* 案内文の中に入れる共有アイコン。周りの文字と同じ大きさ。 */
svg.ios-share { display: inline-block; width: 1.15em; height: 1.15em; vertical-align: -.2em; color: var(--accent); }
