/* base.css: フォント、デザイントークン（ライト・ダークのテーマ変数）、リセット、基本の文字組み。 */
/* Familjen Grotesk (SIL OFL 1.1) のラテン文字サブセット、可変 400–700。
   数字とワードマークを最初の描画に間に合わせるため、自前で配信して preload する。 */
/* ヘッダーの名前「はしご」を Zen Kaku Gothic New 900 で出すための書体。この3文字だけ（2.5 KB、Google Fonts の
   text= サブセット、OFL）。ページ本体の日本語フォントが後から読み込まれても、ロゴは初回から同じ見た目になる。 */
@font-face { font-family: "Hashigo Wordmark"; src: url("../fonts/zen-kaku-900-hashigo.ttf") format("truetype");
  font-weight: 900; font-display: block; }
@font-face { font-family: "Familjen Grotesk"; src: url("../fonts/familjen-grotesk-latin.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
  U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* Zen Kaku Gothic New (OFL, fonts/OFL-zen-kaku-gothic-new.txt) をページ内の文字だけに絞ったもの。
   サイトの顔になる所（タブ・ボタン・ヘルプ。このファイルの末尾）に使い、ほかは OS の書体。 */
/* Hashigo UI: written by tools/fonts/zen_kaku.py */
@font-face { font-family: "Hashigo UI"; src: url("../fonts/zen-kaku-ui-400-44f8b088.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Hashigo UI"; src: url("../fonts/zen-kaku-ui-700-2859d88d.woff2") format("woff2"); font-weight: 700; font-display: swap; }
/* end of Hashigo UI */

/* ---------- tokens ----------
   見た目はシネマテークの1種類を、ライト・ダーク (data-theme) で出す。書体は、
   ラテン文字と数字が Familjen Grotesk、日本語の本文が OS の書体、タブ・ボタン・ヘルプが Zen Kaku Gothic New
   ("Hashigo UI")。
   ほかの4種類（グリッド・名画座・看板・昭和）は 2026-11-21 にやめ、looks-archive ブランチに残してある。 */
/* 画面用の書体（Hashigo UI）は、時間割を描いてから入れる（ui-font。site/js/boot.js）。先に読むと data.json と回線を
   取り合い、時間割が出るのが遅れた（2026-11-28 の計測）。書体が手元にある2回目からは、最初から入れる（index.html の head）。 */
:root.ui-font { --font-brand: var(--font-latin), "Hashigo UI", var(--font-os), system-ui, sans-serif; }
:root {
  --font-latin: "Familjen Grotesk";
    --font-os: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "BIZ UDPGothic", Meiryo;
    --font-kana: var(--font-os); --font-brand: var(--font-latin), var(--font-os), system-ui, sans-serif;
    --font-ui: var(--font-latin), var(--font-kana), system-ui, sans-serif;
  /* どこでもラテン文字を先にして、日本語の文中の数字や英字も必ず Familjen にする。 */
  --font-ja: var(--font-latin), var(--font-kana), system-ui, sans-serif;
  --font-title: var(--font-latin), var(--font-kana), system-ui, sans-serif;
  --font-num: var(--font-latin), system-ui, sans-serif;
  --font-display: var(--font-latin), system-ui, sans-serif;
  --display-style: normal; --display-weight: 400; --display-stretch: 100%; --num-stretch: 100%;
  --title-weight: 700; --label-weight: 700; --ja-light: 400;
  --radius: 3px; --radius-sm: 2px; --radius-md: 6px; --radius-lg: 10px;
  /* --muted は地（bg・surface・surface-2）のどれの上でも 4.5:1 以上（WCAG AA）。#6b6e74 は bg の上で 4.44 だった（2026-12-02）。 */
  /* シネマテーク: 静かな中立の紙の色、黒に近いインク、ブランドの錆浅葱（はしごの線と半券に使う）。
     おしゃれで静謐に（2026-11-28、docs/mission.md）: 地を明るくし、線を薄く、色を使う所を絞った。 */
  --bg: #efefec; --surface: #f8f8f6; --surface-2: #e6e6e2; --ink: #17181b; --muted: #64676d; --line: #dcdcd7;
    --line-strong: #23262c; --accent: #2a6f77; --ok: #2f6b45; --ng: #b3261e; --sat: #245cc4; --t-cinemavera: #6b55b8;
    --t-waseda: #2e7486; --t-nfaj: #9a6a2a; --t-stranger: #b04c7a; --t-polepole: #3f7d52; --t-bungeiza: #b04a43;
    --t-meguro: #4a63b5; --t-imageforum: #2f7a70; --t-eurospace: #6b7a2a; --t-lecinema: #56697a;
    --t-shimotakaido: #8a5a2b; --t-bluestudio: #2f5fa8; --t-jinbocho: #7a3e6e; --t-cinemalice: #3f7f6a;
    --t-institut: #2b4f9e; --t-kscinema: #a8442f; --t-cinemart: #b0306a; --t-athenee: #6a5a2e;
    --t-gardencinema: #b8710f; --t-k2: #2a7fb0; --t-laputa: #5f8f24; --t-rosa: #8c3fa0; --t-tollywood: #6a4fc4;
    --t-theatreshinjuku: #c0392b; --t-cinekaomori: #a03ea8; --t-humanshibuya: #c2410c; --t-humanyurakucho: #0f766e;
    --t-filmex: #9a7a00; --t-chupki: #d0487a; --t-uplinkjoji: #4a6b8a; --t-morc: #8a5a3c; --t-lumiarc: #8c1c3c; --t-theaterguild: #1f9a35; --t-cinemarine: #0e7fa8; --t-artcenter: #b5622b; --t-jackandbetty: #6a4fb3; --t-kawakita: #7a6f9a; --ticket: #dfeceb; --ticket-ink: #1d5258; --ladder: #2a6f77;
    --on-accent: #fff; --block-tint: 9%; --block-border: transparent; --block-rule: 2px; --row-h: 78px; --label-w: 96px;
  /* スマホのシートは画面の半分弱の高さで開き、それを超えたら中でスクロールする。
     マイ時間割が伸びても時間割が見えたままになる (2026-11-27)。グリップのドラッグで別の高さにでき、その値が
     --sheet-h (hashigo.panel)。 */
  --panel-w: 340px; --sheet-h: 45vh;
  --ease: cubic-bezier(.2, .7, .2, 1);
  /* 動きの速さは3段だけ（静謐に、2026-11-28）: 色の変化、小さな開閉、パネルやシート。緩急はどれも --ease（ゆっくり止まる）。 */
  --dur-quick: .16s; --dur-open: .22s; --dur-panel: .28s;
  /* 影は浮くものだけに、三段＋ダイアログ（DESIGN.md）。前は同じ形で濃さだけ違う影が11通りあった（2026-12-02）。 */
  --shadow-1: 0 4px 14px rgba(0, 0, 0, .14); --shadow-2: 0 8px 24px rgba(0, 0, 0, .18);
  --shadow-3: 0 12px 32px rgba(0, 0, 0, .16); --shadow-4: 0 24px 60px rgba(0, 0, 0, .22);  /* 4 はダイアログだけ */
  /* お気に入りの星の黄色（押したとき・ホバー・はじける光）。 */
  --star: #d4a017; --star-soft: #f2c94c; --star-glow: #ffe28a; }
/* スマホのシートは、中身が選んだ高さより低ければ中身の高さ (--plan-fit) で止める。
   固定ヘッダーの下には潜らせない（潜ると見出しとたたむボタンが隠れる。Android で確認、2026-11-27）。
   #plan でも同じ式を計算する: 上映回を入れて中身の高さが変わったら、js/timeline.js の fitPlan は --plan-fit を
   #plan にだけ置く。ページ全体（:root）に置くと、約280の要素のスタイルと時間割の配置を計算し直して、
   1回のタップが 60ms ほど重くなっていた（2026-11-28、CPU 4倍遅くして測定）。トーストは出すときに写す。 */
:root, #plan, .toast { --sheet-now: min(var(--sheet-h), calc(var(--plan-fit, 100vh) + env(safe-area-inset-bottom)),
  calc(100dvh - var(--top-h, 0px))); }
:root[data-theme="dark"] {
  /* 真っ黒に近い色ではなく柔らかい炭色にして、暗い部屋で目に優しくする。 */
  --bg: #1c1e22; --surface: #23262b; --surface-2: #2d3036; --ink: #d4d6db; --muted: #b4b8bf; --line: #3d424a;
    --line-strong: #e7e8eb; --accent: #6cc3c8; --ok: #7cc79a; --ng: #ff8a80; --sat: #7aa5f5; --ticket: #24474b;
    --ticket-ink: #b4e6e7; --ladder: #6cc3c8; --t-cinemavera: #a98bff; --t-waseda: #3cc3e0; --t-nfaj: #f0b03c;
    --t-stranger: #ff7ab8; --t-polepole: #5ccf86; --t-bungeiza: #ff7b6b; --t-meguro: #79a2ff; --t-imageforum: #3fd1bf;
    --t-eurospace: #c2d063; --t-lecinema: #a9bccc; --t-shimotakaido: #e0a66b; --t-bluestudio: #7fa6f0;
    --t-jinbocho: #d48cc4; --t-cinemalice: #74cdb0; --t-institut: #8fb0f5; --t-kscinema: #ff9a80; --t-cinemart: #f27db2;
    --t-athenee: #d8c27a; --t-gardencinema: #f2b24f; --t-k2: #62b8e8; --t-laputa: #a6d35a; --t-rosa: #d596e6;
    --t-tollywood: #b5a5f2; --t-theatreshinjuku: #ff8a78; --t-cinekaomori: #dd8fe4; --t-humanshibuya: #fb8f5a;
    --t-humanyurakucho: #4fd1bf; --t-filmex: #f2d347; --t-chupki: #f09ab8; --t-uplinkjoji: #9ab8d8; --t-morc: #d9a57e; --t-lumiarc: #ff5f86; --t-theaterguild: #96ea92; --t-cinemarine: #5cc8ee; --t-artcenter: #f0a070; --t-jackandbetty: #b8a4ee; --t-kawakita: #b9aee0; --block-tint: 22%;
    /* ダークの --accent は明るいので、その上の文字は暗くする。 */ --on-accent: #10262a; }
/* ダーク: 薄くした上映回も読めるままにする（暗い地に明るい文字は、薄めるとコントラストが早く落ちる）。 */
/* ダーク: 暗い地の明るい細い線は実際より細く見える。そのため細め (400) の日本語を 500 にし、
   ブラウザの細めの「antialiased」描画をやめる。 */
:root[data-theme="dark"] { --ja-light: 500; }
/* ブラウザが描く部品（スクロールバーなど）も明るさに合わせる。指定がないと、ダークでもモーダルのスクロールバーが白く浮いていた
   （2026-11-29）。 */
:root { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
:root[data-theme="dark"] body { -webkit-font-smoothing: auto; -moz-osx-font-smoothing: auto; }
:root[data-theme="dark"] .show span, :root[data-theme="dark"] .label small, :root[data-theme="dark"] .hours span,
:root[data-theme="dark"] .item .t small, :root[data-theme="dark"] .band { font-weight: 500; }
:root[data-theme="dark"] .show.blocked { opacity: .5; }
:root[data-theme="dark"] .show.past { opacity: .55; }
:root[data-theme="dark"] .hours span { color: var(--muted); }

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-ui);
  font-size: 14px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
/* OS の日本語書体（特にヒラギノ）はプロポーショナルなかなだと窮屈になる。そのため本文は全角の字間のままにして、
   余白が足りない所と題名のようにまとめて見せたい所だけ詰める。 */
.show b, .label, .sheet h3, .item .t b, h1, h2, h3 { font-feature-settings: "palt"; }
button { font: inherit; color: inherit; }
a { color: inherit; }
:where(button, a, [tabindex]):focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
svg.i { width: 16px; height: 16px; flex: none; }
.num, .hours span, .chip .d, .show span, .item .t, .sheet .when, .also .num {
  font-family: var(--font-num); font-stretch: var(--num-stretch);
  font-variant-numeric: lining-nums tabular-nums; font-feature-settings: "lnum", "tnum"; }
/* 押せるものの色の変わり方はなめらかに（色・背景・線・影・透明度だけ。位置や大きさは動かさない）。:where で詳しさ0にし、
   個別に transition を書いた所はそちらが勝つ。ホバーで色がパッと切り替わる所が多かった（2026-11-28）。 */
:where(button, a, summary, select, label) {
  transition: color var(--dur-quick) var(--ease), background-color var(--dur-quick) var(--ease),
    border-color var(--dur-quick) var(--ease), box-shadow var(--dur-quick) var(--ease), opacity var(--dur-quick) var(--ease); }
/* リンクは役割で4種類にそろえる（2026-11-28。ページごとに下線やホバーがまちまちだった）。色は各所で決め、ここは線と動きだけ。
   A 文の中のリンク: いつも細い下線を引き、ホバーで濃くする。文の中では色だけだとリンクと気づきにくいため。
   B ひとりで立つリンク（公式サイト・地図・経路・一覧へ）: ふだんは線なし、ホバーで下線が左から伸びる。
   線は背景に描くので、文字と同じ色で、ボタンの余白にはかからない（content-box）。
   C 作品名・劇場名: ふだんは線なし、ホバーで下線がふわっと出る。2行に折り返す題名でも行ごとに引けるよう、こちらは文字の下線。
   D チップ: ホバーで地を少し濃く、枠をはっきり（.idle-chip などで個別に）。 */
:where(.about a, .link-btn, .sheet .program a, .rank .say .cheer, .hidden-note, .plan-log button, .gap .route, .toast-act,
  .today p a, .facts dd a) {
  text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px;
  text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
  transition: color var(--dur-quick) var(--ease), text-decoration-color var(--dur-quick) var(--ease); }
:where(.about a, .link-btn, .sheet .program a, .rank .say .cheer, .hidden-note, .plan-log button, .gap .route, .toast-act,
  .today p a, .facts dd a):hover { text-decoration-color: currentColor; }
:where(.about .about-col a, .about .about-col .link-btn, .sheet .eyebrow a, .sheet .read a, .sheet .links a,
  .sheet .links .link-btn, .sheet .also-all a, .item .where .ticket, .only, .day li small .prog, .crumb a, .meta a,
  .others a, .foot-col a, .flist small a, .progs a, .daynav a, .day h2 .open-tt, .sample small a) {
  text-decoration: none; background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0 1px;
  background-origin: content-box; -webkit-box-decoration-break: clone; box-decoration-break: clone;
  transition: color var(--dur-quick) var(--ease), background-size .25s var(--ease); }
:where(.about .about-col a, .about .about-col .link-btn, .sheet .eyebrow a, .sheet .read a, .sheet .links a,
  .sheet .links .link-btn, .sheet .also-all a, .item .where .ticket, .only, .day li small .prog, .crumb a, .meta a,
  .others a:not([aria-current]), .foot-col a, .flist small a, .progs a, .daynav a, .day h2 .open-tt, .sample small a):hover { background-size: 100% 1px; }
:where(.day .title, .flist .title, .hall h2 a, .pfilms li a, .today li a, button.ttl, .day h2 .tname, .sample .title, .list a b) {
  text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; text-decoration-color: transparent;
  transition: color var(--dur-quick) var(--ease), text-decoration-color .3s ease-out; }
:where(.day .title, .flist .title, .hall h2 a, .pfilms li a, .today li a, button.ttl, .day h2 .tname, .sample .title):hover, :where(.list a:hover b) {
  text-decoration-color: currentColor; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after, ::backdrop { animation: none !important; transition: none !important; }
}
/* ページを移るとき（時間割と劇場・作品のページのあいだ）も、パッとではなくふわっと入れ替える。速さは layout.css の
   ::view-transition-old/new(root)（--dur-panel）。対応していないブラウザでは今までどおり。 */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
/* サイトの外へ出るリンクの印の小さな矢印。ラベルの後ろに付く（自前のアイコンがあるボタンにも）。 */
svg.i.ext { width: 12px; height: 12px; margin-left: 2px; opacity: .7; flex: none; vertical-align: -1px; }
/* Zen Kaku ("Hashigo UI") はサイトの顔になり、それだけで成り立つ所にだけ使う: タブ、日付の帯、ボタン、
   空の状態、ダイアログ、このサイトについて。劇場データ（名前の横のラベル）の隣では、OS
   の書体にして二つが混ざらないようにする。 */
:root :is(.plan-tab, .chip, .chan-note, .empty, .stub-add, .acts .btn, #helpDialog, #contactDialog, #notifyDialog,
  #logDialog .meta, #logDialog .note, .about, .install) {
  font-family: var(--font-brand); }
