/* テーマ変数。既定=ダーク。<html class="light"> でライトへ切替（ブラウジング用クローム＝バー/フィルタ/チップ/
   グリッド背景/日付ピル等のみ。写真ビューア＝ライトボックス/スライドショーは Apple 写真同様に常に暗色）。 */
:root {
  color-scheme: dark;
  --bg: #0e1013;
  --grid-bg: #16181d;
  --panel: #191c22;
  --panel-2: #1b1e24;
  --panel-hover: #232730;
  --text: #e8eaed;
  --text-dim: #9aa0a6;
  --text-dim2: #8a9099;
  --border: rgba(255,255,255,.12);
  --border-strong: rgba(255,255,255,.18);
  --bar-bg: rgba(17,19,24,.94);
  --accent: #4a9eff;
  --accent-strong: #3d78c4;
  --accent-bg: #2b5c9b;
  --chip-bg: #23303f;
  --chip-border: rgba(120,170,255,.35);
  --chip-text: #dbe6f5;
  --chip-hover: #2b3c50;
}
html.light {
  color-scheme: light;
  --bg: #f0f2f5;
  --grid-bg: #dde1e6;
  --panel: #ffffff;
  --panel-2: #ffffff;
  --panel-hover: #eef1f5;
  --text: #1a1c1f;
  --text-dim: #5f6368;
  --text-dim2: #70757a;
  --border: rgba(0,0,0,.14);
  --border-strong: rgba(0,0,0,.22);
  --bar-bg: rgba(248,249,251,.94);
  --accent: #1a73e8;
  --accent-strong: #1a73e8;
  --accent-bg: #1a73e8;
  --chip-bg: #e6effd;
  --chip-border: rgba(26,115,232,.4);
  --chip-text: #174a9c;
  --chip-hover: #d6e6fb;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text);
  font-family: -apple-system, "Hiragino Sans", "Helvetica Neue", Arial, sans-serif; }
/* 標準スクロールバーは隠す（自作の丸ハンドルで日付ジャンプするため。標準バーが無限読み込みで
   上下に飛ぶのがハンドルの真横で見えて「ちらつき」に見えるのを解消）。ホイール/タッチのスクロールは有効。 */
html { scrollbar-width: none; -ms-overflow-style: none; }
/* iOS のラバーバンド（オーバースクロールのバウンド）を抑止。バウンドで固定要素が端へ飛ぶのを防ぐ。 */
html, body { overscroll-behavior: none; }
/* iOS/Android のページ全体ピンチズーム（ブラウザごと縮小）を抑止。パン（スクロール）は許可。
   写真の拡大（.lightbox）は自前ピンチのため touch-action:none で上書きしており影響しない。 */
html, body { touch-action: pan-x pan-y; }
html::-webkit-scrollbar, body::-webkit-scrollbar { width: 0; height: 0; display: none; }

.bar { position: sticky; top: 0; z-index: 10; background: var(--bar-bg);
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--border);
  /* 上パディングにステータスバー（セーフエリア）分を足す。ホーム画面アプリ（standalone・black-translucent）で
     Web 内容が時刻・日付の下まで広がり、PWS/絞り込みがステータスバーと重なるのを防ぐ。ブラウザでは 0 で従来どおり。 */
  padding: calc(10px + env(safe-area-inset-top, 0)) 14px calc(10px + env(safe-area-inset-bottom, 0));
  transition: transform .25s ease; }
.bar.bar-hidden { transform: translateY(-100%); }
.bar-top { display: flex; align-items: center; gap: 10px; position: relative; flex-wrap: nowrap; }
/* ⋯ オーバーフローメニュー（補助操作を集約）。写真バー／思い出・ムービーのオーバーレイ見出しの
   どの ⋯ からも開くため fixed 配置にし、開くたびにトリガー直下へ JS が top/right を合わせる。
   z-index はオーバーレイ（55）より上に置く。 */
.more-menu { position: fixed; top: 60px; right: 12px; z-index: 80;
  background: var(--bar-bg); backdrop-filter: blur(12px); border: 1px solid var(--border);
  border-radius: 12px; padding: 6px; min-width: 200px; display: flex; flex-direction: column; gap: 2px;
  box-shadow: 0 10px 34px rgba(0,0,0,.4); }
.more-menu.hidden { display: none; }
.more-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 9px 12px; border-radius: 8px; background: transparent; border: none;
  color: var(--text); font-size: 14px; cursor: pointer; }
.more-item:hover { background: var(--panel-hover); }
.more-item .mi-ic { width: 20px; text-align: center; flex: none; }
.more-sep { height: 1px; background: var(--border); margin: 4px 6px; }
.brand { font-weight: 700; font-size: 15px; letter-spacing: .3px; }
.count { margin-left: auto; font-size: 13px; color: var(--text-dim); }

/* 🌐 接続経路バッジ（家庭内 LAN / 外部公開 / ローカル）。常設要素なので出没で他要素を押さない。 */
.net-badge { display: inline-flex; align-items: center; gap: 4px; flex: none;
  font-size: 11px; font-weight: 700; line-height: 1.4; padding: 3px 9px; border-radius: 999px;
  white-space: nowrap; border: 1px solid transparent; }
.net-badge .net-ic { font-size: 12px; }
.net-badge.net-local { background: rgba(74,158,255,.15); color: var(--accent); border-color: rgba(74,158,255,.4); }
.net-badge.net-lan { background: rgba(52,199,89,.16); color: #34c759; border-color: rgba(52,199,89,.45); }
.net-badge.net-ext { background: rgba(255,149,0,.18); color: #ff9f0a; border-color: rgba(255,149,0,.5); }

.ghost-btn { background: var(--panel-2); color: var(--text); border: 1px solid var(--border);
  border-radius: 9px; padding: 8px 12px; font-size: 14px; min-height: 38px; cursor: pointer; }
.ghost-btn:hover { background: var(--panel-hover); }
.ghost-btn.active { background: var(--accent-bg); border-color: var(--accent-strong); color: #fff; }
.ghost-btn.small { min-height: 34px; padding: 6px 10px; font-size: 12px; align-self: flex-end; }
/* アイコン専用ボタン（表示密度・テーマ）。狭い画面でも場所を取らない正方形。 */
.icon-btn { padding: 8px 0; width: 40px; text-align: center; font-size: 16px; }

/* 条件クリア: 他のフィルタ入力（select/input, min-height 38px）と高さを揃え、
   「消す（リセット）」だと直感的に分かる赤系の配色にする。 */
#clear-btn { min-height: 38px; align-self: flex-end; padding: 8px 14px; font-size: 13px;
  font-weight: 600; background: #3a2225; color: #ffd8d3;
  border-color: rgba(255,120,110,.45); }
#clear-btn:hover { background: #4c2a2e; border-color: rgba(255,140,130,.75); color: #fff; }
html.light #clear-btn { background: #fdeceb; color: #c5221f; border-color: rgba(197,34,31,.4); }
html.light #clear-btn:hover { background: #fbdad8; color: #a50e0b; }

/* 適用中の条件チップ（折りたたんでいても状態が分かる・タップで解除） */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chips:empty { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--chip-bg);
  border: 1px solid var(--chip-border); color: var(--chip-text); border-radius: 999px;
  padding: 5px 10px; font-size: 12px; cursor: pointer; }
.chip:hover { background: var(--chip-hover); }
.chip .x { opacity: .7; font-weight: 700; }

/* ラベル付きフィルタ（折りたたみパネル） */
.filters { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: flex-end; margin-top: 10px; }
.field { display: flex; flex-direction: column; gap: 2px; }
.field-wide { flex: 1 1 200px; min-width: 160px; }
.flabel { font-size: 10px; letter-spacing: .4px; color: var(--text-dim2); padding-left: 3px; }
.field input, .field select {
  background: var(--panel-2); color: var(--text); border: 1px solid var(--border);
  border-radius: 9px; padding: 8px 10px; font-size: 14px; min-height: 38px; }
.field select { max-width: 44vw; }
.and-lbl { display: flex; align-items: center; gap: 6px; font-size: 0.85rem; cursor: pointer; padding: 2px 0; }
.field-wide input { width: 100%; }

/* マルチセレクト（被写体・人物：複数選択＋グループごとの「すべて選ぶ」） */
.ms { position: relative; }
.ms-btn { background: var(--panel-2); color: var(--text); border: 1px solid var(--border);
  border-radius: 9px; padding: 8px 10px; font-size: 14px; min-height: 38px; cursor: pointer;
  min-width: 140px; max-width: 44vw; text-align: left; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; }
.ms-panel { position: absolute; top: calc(100% + 4px); left: 0; z-index: 30; width: 280px;
  max-height: 60vh; overflow-y: auto; background: var(--panel);
  border: 1px solid var(--border-strong); border-radius: 12px; padding: 6px;
  box-shadow: 0 10px 40px rgba(0,0,0,.55); }
.ms-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px;
  cursor: pointer; font-size: 14px; }
.ms-row:hover { background: rgba(127,127,127,.12); }
.ms-row input { width: 17px; height: 17px; accent-color: var(--accent); flex: none; }
.ms-all { font-weight: 700; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.ms-ghead { font-weight: 700; color: var(--text); margin-top: 4px; }
.ms-item { padding-left: 22px; }
.ms-gcount { margin-left: auto; font-size: 11px; color: var(--text-dim2); }

/* 人物サムネ帯（Mac インサイトの PEOPLE 行と同様・クリックで人物フィルタ） */
.people-strip { flex: 1 1 100%; display: flex; gap: 14px; overflow-x: auto;
  padding: 8px 2px 4px; margin-top: 4px; }
.people-strip:empty { display: none; }
.pstrip-item { flex: none; width: 78px; text-align: center; cursor: pointer; }
.pstrip-face { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; margin: 0 auto;
  background: #2a2e36; border: 2px solid transparent; display: flex; align-items: center;
  justify-content: center; font-size: 22px; color: #aeb4bc; overflow: hidden; }
.pstrip-face img { width: 100%; height: 100%; object-fit: cover; }
.pstrip-item.selected .pstrip-face { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(74,158,255,.35); }
.pstrip-name { font-size: 12px; margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pstrip-item.selected .pstrip-name { color: var(--accent); font-weight: 700; }
.pstrip-count { font-size: 10px; color: var(--text-dim2); }

/* サムネ格子。列幅は既定 CSS（下）＋ JS の表示密度切替（inline style）で上書きする。 */
.grid { display: grid; gap: 3px; padding: 3px;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); } }

/* 日付別グループの見出し（塊表示：「2026年7月13日」） */
.day-head { grid-column: 1 / -1; padding: 16px 6px 6px; font-size: 15px; font-weight: 700;
  color: var(--text); display: flex; align-items: baseline; gap: 8px; }
.day-head .dh-sub { font-size: 12px; font-weight: 500; color: var(--text-dim); }

.cell { position: relative; aspect-ratio: 1/1; overflow: hidden; background: var(--grid-bg);
  border-radius: 6px; cursor: pointer; }
.cell img { width: 100%; height: 100%; object-fit: cover; display: block;
  opacity: 0; transition: opacity .3s ease; }
.cell img.loaded { opacity: 1; }
.cell .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 8px 5px;
  font-size: 11px; color: #dfe1e5; background: linear-gradient(transparent, rgba(0,0,0,.72));
  opacity: 0; transition: opacity .2s; }
.cell:hover .cap { opacity: 1; }
/* B3 画質スコア上位の ⭐ バッジ（サムネ右上） */
.cell .star { position: absolute; top: 4px; right: 5px; font-size: 13px; line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.7)); pointer-events: none; }
/* ❤️ お気に入りバッジ（Mac のサムネ左上 ❤️ と統一）。⭐️（右上）と衝突しない左上に。 */
.cell .fav-badge { position: absolute; top: 4px; left: 5px; font-size: 13px; line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.7)); pointer-events: none; }
/* AVIF サムネキャッシュ済みバッジ（右下）。⭐️（右上）・❤️（左上）と分離。 */
.cell .avif-thumb-badge { position: absolute; bottom: 4px; right: 5px;
  background: rgba(0,199,190,.28); color: #00c7be; border-radius: 4px;
  padding: 1px 5px; font-size: 9px; font-weight: 700; line-height: 1.5;
  pointer-events: none; }
/* AVIF フルサイズキャッシュ済みインラインチップ（ライトボックス lb-main・スライドショー ss-badge 内）。 */
.avif-chip { display: inline-block; padding: 1px 5px; border-radius: 4px; font-size: 10px;
  font-weight: 700; background: rgba(0,199,190,.28); color: #00c7be;
  vertical-align: middle; margin-left: 5px; }

/* 🤖 AI 検索 */
.ai-row { display: flex; gap: 8px; margin-top: 8px; }
.ai-row input { flex: 1 1 auto; background: var(--panel-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 9px; padding: 9px 12px; font-size: 14px; min-height: 40px; }
.ai-row .ghost-btn { min-height: 40px; align-self: auto; }
.ai-summary { margin-top: 8px; font-size: 12.5px; color: var(--chip-text);
  background: var(--chip-bg); border: 1px solid var(--chip-border); border-radius: 10px;
  padding: 8px 12px; display: flex; align-items: center; gap: 8px; }
.ai-summary .x { margin-left: auto; opacity: .7; font-weight: 700; cursor: pointer; }
/* AI 解析中のスピナー（くるくる） */
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(127,127,127,.35);
  border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -2px; }
.ai-summary .spinner { margin-right: 2px; }
.ai-row .ghost-btn .spinner { width: 15px; height: 15px; border-top-color: #fff; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }

.status { text-align: center; color: var(--text-dim); padding: 18px; font-size: 13px; min-height: 40px; }
.hidden { display: none !important; }

/* ドラッグ式の日付ジャンプ（右端の丸いハンドル・アイコン） */
.scrubber { position: fixed; top: 0; right: 0; bottom: 0; width: 56px; z-index: 45; pointer-events: none; }
.scrubber.hidden { display: none; }
.scrub-thumb { position: absolute; right: 8px; width: 40px; height: 40px; border-radius: 50%;
  background: rgba(20,22,28,.82); border: 1px solid rgba(255,255,255,.28); color: #e8eaed;
  display: flex; align-items: center; justify-content: center; font-size: 18px; line-height: 1;
  pointer-events: auto; cursor: grab; touch-action: none; box-shadow: 0 2px 10px rgba(0,0,0,.5);
  transition: background .15s; }
.scrub-thumb:hover { background: rgba(40,44,54,.92); }
.scrubber.dragging .scrub-thumb { background: var(--accent); color: #fff; cursor: grabbing; transform: scale(1.08); }

/* スクロール中の日付ピル（右側に浮かぶ） */
.datepill { position: fixed; right: 30px; top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,.82); border: 1px solid rgba(255,255,255,.22); color: #fff;
  padding: 9px 15px; border-radius: 22px; font-weight: 700; font-size: 15px;
  z-index: 40; pointer-events: none; box-shadow: 0 4px 20px rgba(0,0,0,.5);
  transition: opacity .3s ease; }

/* ライトボックス（写真ビューアは常に暗色） */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.94);
  display: flex; align-items: center; justify-content: center; touch-action: none; }
.lightbox img { max-width: 100vw; max-height: 92vh; object-fit: contain;
  transform-origin: center center; will-change: transform; }
.lightbox img.zoomed { cursor: grab; }
.lb-close { position: fixed; top: calc(12px + env(safe-area-inset-top,0)); right: 14px;
  width: 44px; height: 44px; border-radius: 50%; border: none; font-size: 20px;
  background: rgba(255,255,255,.14); color: #fff; cursor: pointer; z-index: 60; }
/* 左上（固定）のクラスター＝戻る＋アクション（ⓘ 情報 / 🧭 関連 / 将来のボタン）。
   下段のレールが出没しても動かない。閉じる(右上)から離して誤操作を防ぐ。 */
.lb-topleft { position: fixed; top: calc(12px + env(safe-area-inset-top,0)); left: 14px;
  display: flex; gap: 8px; align-items: center; z-index: 62; }
.lb-act-btn { width: 44px; height: 44px; border-radius: 50%; border: none; font-size: 20px;
  background: rgba(255,255,255,.14); color: #fff; cursor: pointer; }
.lb-related-btn { font-size: 18px; }
.lb-act-btn.active { background: var(--accent); }
/* 戻る=左上クラスターの末尾（一番右）。出没しても前の 🧭/ⓘ を動かさない（§7 位置ずれ禁止・Mac と統一）。 */
.lb-back { height: 44px; border-radius: 22px; border: none; padding: 0 14px; font-size: 14px;
  background: rgba(255,255,255,.14); color: #fff; cursor: pointer; white-space: nowrap; }
/* レール展開中は左右ナビ矢印を隠す（レールと重ならない・スワイプ/レールで移動＝Google フォト流） */
.lightbox.rail-open .lb-nav { display: none; }
/* B1 関連写真レール（拡大表示の下部・軸ごとの横スクロール） */
.lb-rail { position: fixed; left: 0; right: 0; bottom: 0; z-index: 61; max-height: 46vh;
  overflow-y: auto; padding: 10px 12px calc(12px + env(safe-area-inset-bottom,0));
  background: linear-gradient(transparent, rgba(0,0,0,.5) 12%, rgba(10,11,13,.94) 40%);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.lb-rail .rail-group { margin-bottom: 10px; }
.lb-rail .rail-title { font-size: 12px; font-weight: 800; letter-spacing: .5px; color: #cfd3d8;
  margin: 2px 4px 6px; }
.lb-rail .rail-strip { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.lb-rail .rail-thumb { flex: none; width: 76px; height: 76px; border-radius: 8px; overflow: hidden;
  background: #16181d; cursor: pointer; border: 2px solid transparent; position: relative; }
.lb-rail .rail-thumb img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.lb-rail .rail-thumb img.loaded { opacity: 1; }
.lb-rail .rail-thumb.current { border-color: var(--accent); }
/* 🎬 動画軸のサムネは 16:9 で少し横長に＋中央に ▶ マーク（写真サムネと区別）。 */
.lb-rail .rail-thumb.video { width: 135px; }
.lb-rail .rail-thumb .rail-play { position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center; font-size: 22px; color: rgba(255,255,255,.95);
  text-shadow: 0 1px 4px rgba(0,0,0,.7); pointer-events: none; }
.lb-meta { position: fixed; left: 0; right: 0; bottom: 0; padding: 14px;
  color: #cdd0d4; background: linear-gradient(transparent, rgba(0,0,0,.7));
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 18px; }
.lb-main { font-size: 13px; }
.lb-exif { font-size: 12px; color: #aeb4bc;
  display: flex; gap: 4px 14px; flex-wrap: wrap; justify-content: center; }
.lb-exif span { white-space: nowrap; }
/* 拡大表示の前後ナビ（左右ボタン。スワイプでも切り替え可） */
.lb-nav { position: fixed; top: 50%; transform: translateY(-50%); width: 52px; height: 52px;
  border-radius: 50%; border: none; background: rgba(255,255,255,.14); color: #fff; font-size: 30px;
  line-height: 1; cursor: pointer; z-index: 60; display: flex; align-items: center; justify-content: center; }
.lb-nav:hover { background: rgba(255,255,255,.26); }
.lb-prev { left: 14px; }
.lb-next { right: 14px; }

/* 思い出チャンネル一覧 */
.overlay { position: fixed; inset: 0; z-index: 55; background: var(--bg); overflow-y: auto;
  padding: 0 0 40px; }
.ov-head { position: sticky; top: 0; background: var(--bar-bg); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  /* 上パディングにステータスバー（セーフエリア）分を足す（ホーム画面アプリで時刻/日付と重ならないように・.bar と同じ）。 */
  padding: calc(14px + env(safe-area-inset-top, 0px)) 18px 14px;
  display: flex; align-items: center; flex-wrap: nowrap; transition: transform .25s ease; }
/* 下スクロールで見出しを自動的に隠す（メインバーと同じ挙動・思い出/ムービー）。上スクロールで戻す。 */
.overlay.head-hidden .ov-head { transform: translateY(-100%); }
.ov-head .lb-close { position: static; background: rgba(127,127,127,.18); color: var(--text); margin-left: auto; }
/* 見出し右端の操作クラスタ（件数＋⋯＋閉じる）。クラスタ全体を右寄せし、中は一定間隔で並べる
   （§7 位置ずれ禁止＝閉じるの単独隔離を保ちつつ ⋯ を左隣に固定）。 */
.ov-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.ov-actions .lb-close { margin-left: 0; }
.ov-actions .movie-count { margin-left: 0; }
.ov-title { font-size: 17px; font-weight: 700; }
/* ヘルプ内検索バー（タイトルと閉じるボタンの間・右寄せ）。件数/送りは入力時のみ出すが
   閉じるボタンは margin-left:auto の連鎖で右端固定のまま＝位置ずれしない。 */
.help-search { margin-left: auto; display: flex; align-items: center; gap: 6px;
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 9px; padding: 4px 8px; }
.help-search-icon { font-size: 12px; opacity: .7; }
.help-search input { background: transparent; border: 0; outline: none; color: var(--text);
  font-size: 14px; width: 150px; padding: 2px 0; }
.help-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.help-count { font-size: 12px; color: var(--text-dim); min-width: 42px; text-align: right;
  font-variant-numeric: tabular-nums; }
.help-nav { background: transparent; border: 1px solid var(--border); border-radius: 6px; color: var(--text);
  width: 26px; height: 26px; line-height: 1; font-size: 15px; cursor: pointer; }
.help-nav:hover { background: var(--panel-hover); }
.help-nav:disabled { opacity: .35; cursor: default; }
.help-clear { border-color: transparent; font-size: 12px; opacity: .7; }
.help-clear:hover { opacity: 1; }
.help-clear[hidden] { display: none; }
/* 検索ヒットのハイライト（現在ヒットはオレンジで強調） */
.help-body mark.help-hit { background: rgba(255, 224, 79, .55); color: inherit; border-radius: 2px; padding: 0 1px; }
.help-body mark.help-hit.current { background: #ff9f43; color: #1a1200; }
/* 使い方（ヘルプ）本文。USER_GUIDE.md の Web 節を簡易 HTML 化したものを表示。 */
.help-body { max-width: 820px; margin: 0 auto; padding: 8px 18px 48px; line-height: 1.7; color: var(--text); }
.help-body h2 { font-size: 19px; font-weight: 800; margin: 24px 0 10px; }
.help-body h3 { font-size: 16px; font-weight: 700; margin: 22px 0 8px; color: var(--accent-strong); }
.help-body p { margin: 8px 0; }
.help-body ul, .help-body ol { margin: 8px 0 14px; padding-left: 22px; }
.help-body li { margin: 5px 0; }
.help-body strong { font-weight: 700; }
.help-body code { background: var(--panel-2); border: 1px solid var(--border); border-radius: 4px;
  padding: 1px 5px; font-size: 13px; }
.help-body blockquote { margin: 14px 0; padding: 10px 14px; border-left: 3px solid var(--accent-strong);
  background: var(--panel-2); border-radius: 6px; color: var(--text-dim); }
/* 接続断バナー（サーバ再起動中など） */
.conn-banner { position: fixed; left: 0; right: 0; top: 0; z-index: 70;
  background: #b23b3b; color: #fff; padding: calc(8px + env(safe-area-inset-top,0)) 14px 8px;
  display: flex; align-items: center; gap: 12px; justify-content: center; font-size: 14px; flex-wrap: wrap; }
.conn-banner .ghost-btn { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.45); color: #fff; }
/* プル・トゥ・リフレッシュのインジケータ */
.ptr { position: fixed; top: calc(6px + env(safe-area-inset-top,0)); left: 50%; z-index: 60;
  width: 38px; height: 38px; border-radius: 50%; background: var(--panel-2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; color: var(--text);
  box-shadow: 0 2px 10px rgba(0,0,0,.3); transform: translateX(-50%); transition: opacity .15s; opacity: 0; }
.ptr.show { opacity: 1; }
.ptr.ready { border-color: var(--accent-strong); color: var(--accent-strong); }
.ptr-spin { font-size: 20px; display: inline-block; }
.ptr.spinning .ptr-spin { animation: ptr-rot .8s linear infinite; }
@keyframes ptr-rot { to { transform: rotate(360deg); } }
/* 思い出セクション（見出し＋グループごとの格子） */
.ch-sections { padding: 8px 16px 40px; }
.ch-section { display: flex; align-items: center; gap: 10px; margin: 22px 2px 8px; }
.ch-section h2 { font-size: 13px; font-weight: 800; letter-spacing: 1px; color: var(--text-dim); margin: 0; }
.ch-shuffle { border: none; background: rgba(255,255,255,.10); color: var(--text-dim);
  width: 28px; height: 28px; border-radius: 50%; cursor: pointer; font-size: 13px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; }
.ch-shuffle:hover { background: rgba(255,255,255,.22); }
.ch-row { display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.ch-card { position: relative; aspect-ratio: 16/10; border-radius: 12px; overflow: hidden;
  background: var(--grid-bg); cursor: pointer; }
.ch-card img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s;
  transform: scale(1.01); }
.ch-card img.loaded { opacity: .9; }
.ch-card:hover img { opacity: 1; transform: scale(1.04); transition: transform 4s ease-out, opacity .3s; }
.ch-card .ch-info { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 14px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,.82)); color: #fff; }
.ch-card .ch-t { font-size: 16px; font-weight: 700;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* サブタイトルの行：左にサブタイトル、右端に枚数（Mac と同じくシアン）。 */
.ch-card .ch-srow { display: flex; align-items: baseline; gap: 8px; margin-top: 2px; }
.ch-card .ch-s { font-size: 12px; color: #b7bcc2; flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-card .ch-count { font-size: 11px; font-weight: 700; color: #38d9e6;
  font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.ch-card .ch-play { position: absolute; top: 10px; right: 12px; font-size: 22px; opacity: .85; color: #fff; }
/* 🎬 動画タイムカプセルカード（写真チャンネルと区別する indigo アクセント）。件数は「本」なので色も分ける。 */
.ch-card.ch-card-movie { box-shadow: inset 0 0 0 2px rgba(124,131,253,.6); }
.ch-card.ch-card-movie .ch-count { color: #a5adff; }

/* 全画面スライドショー */
.slideshow { position: fixed; inset: 0; z-index: 70; background: #000; overflow: hidden; }
.ss-stage { position: absolute; inset: 0; }
.ss-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  opacity: 0; transition: opacity .9s ease; transform: scale(1); }
.ss-img.show { opacity: 1; }
/* スライド演出（zoom 固定 or random）。transform を JS で animation として付与する。
   ⚠️ 連続パン（上下左右にゆっくり流れ続ける）は酔うため不採用。Mac 同様「ゆっくりズーム」＋「端からの
   スライド差し込み（入場だけ動いて以降は静止）」で構成する。 */
@keyframes sfZoomIn   { from { transform: scale(1);    } to { transform: scale(1.10); } }
@keyframes sfZoomOut  { from { transform: scale(1.10); } to { transform: scale(1);    } }
@keyframes sfZoomSoft { from { transform: scale(1.03); } to { transform: scale(1.09); } }
/* スライド差し込み: 入場（最初の ~20%）だけ端から移動し、以降は静止。 */
@keyframes sfSlideL { 0% { transform: translateX(55%);  } 20% { transform: translateX(0); } 100% { transform: translateX(0); } }
@keyframes sfSlideR { 0% { transform: translateX(-55%); } 20% { transform: translateX(0); } 100% { transform: translateX(0); } }
@keyframes sfSlideU { 0% { transform: translateY(55%);  } 20% { transform: translateY(0); } 100% { transform: translateY(0); } }
@keyframes sfSlideD { 0% { transform: translateY(-55%); } 20% { transform: translateY(0); } 100% { transform: translateY(0); } }
/* 左上の機材・撮影日バッジ（Mac シアターの ExifBadge 相当・すりガラス風カプセル）。
   鑑賞の邪魔にならないよう小さめ＋控えめなトーンにする。 */
/* EXIF バッジ=スライドショー専用情報。左上はボタン（🔀/🔊/将来の ❤️）に譲り、下段左に置く（§7 位置ずれ/重なり禁止）。 */
.ss-badge { position: fixed; bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  left: calc(14px + env(safe-area-inset-left, 0px)); z-index: 73; display: flex; align-items: center;
  gap: 7px; padding: 5px 10px; border-radius: 999px; color: #fff; pointer-events: none;
  background: rgba(20,20,22,.40); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: .5px solid rgba(255,255,255,.10); max-width: min(42vw, 300px); opacity: .9;
  transition: opacity .35s ease; }
/* 設定「常時表示」OFF のとき、操作していない間はバッジを隠す（Mac の HUD 待機と同じ挙動）。 */
.ss-badge.dim { opacity: 0; }
.ss-badge.hidden { display: none; }
.ss-badge-cam { font-size: 10px; opacity: .55; }
.ss-badge-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.ss-badge-txt b { font-size: 11px; font-weight: 600; color: rgba(255,255,255,.9);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ss-badge-sub { font-size: 9.5px; font-weight: 400; color: rgba(255,255,255,.5);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ss-controls { position: fixed; left: 0; right: 0; bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  display: flex; gap: 18px; justify-content: center; align-items: center; z-index: 72; }
.ss-controls button { width: 52px; height: 52px; border-radius: 50%; border: none;
  background: rgba(255,255,255,.14); color: #fff; font-size: 22px; cursor: pointer; }
.ss-controls button:hover { background: rgba(255,255,255,.24); }
/* 左上=ボタンクラスター（🔀 シャッフル / 🔊 BGM / 将来のボタン）。全ビューア共通で"ボタンは左上"。
   常設の 🔀 が先頭、出没する 🔊 は後ろ＝横ずれ禁止。閉じる(右上)からは離す。 */
.ss-actions { position: fixed; left: calc(14px + env(safe-area-inset-left, 0px));
  top: calc(14px + env(safe-area-inset-top, 0px)); display: flex; gap: 10px;
  align-items: center; z-index: 74; }
.ss-actions button { width: 52px; height: 52px; border-radius: 50%; border: none;
  background: rgba(255,255,255,.14); color: #fff; font-size: 22px; cursor: pointer; }
.ss-actions button:hover { background: rgba(255,255,255,.24); }
/* 再生位置 x / y カウンター（Mac シアターと同じ・monospace）。 */
.ss-counter { color: rgba(255,255,255,.9); font-size: 13px; font-weight: 600;
  font-variant-numeric: tabular-nums; padding: 8px 14px; border-radius: 999px;
  background: rgba(255,255,255,.08); }
/* 再生中の進捗ドット（Mac のシアターと同じ・下部中央。現在位置は横長の白カプセル）。 */
.ss-dots { position: fixed; left: 0; right: 0; bottom: calc(100px + env(safe-area-inset-bottom, 0px)); display: flex; gap: 5px;
  justify-content: center; align-items: center; flex-wrap: nowrap; overflow: hidden;
  padding: 0 20px; z-index: 72; pointer-events: none; }
.ss-dots i { width: 6px; height: 4px; border-radius: 3px; background: rgba(255,255,255,.28);
  flex: 0 0 auto; transition: width .3s ease, background .3s ease; }
.ss-dots i.on { width: 22px; background: #fff; }

/* ===================== タイムライン（年 / 月 / 日）ズーム表示 ===================== */
/* 画面下部の常時ズームバー（年/月/日）。pyramid(47) より上・lightbox(50) より下。 */
.zoombar { position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(16px + env(safe-area-inset-bottom,0)); z-index: 49;
  display: flex; gap: 3px; background: var(--bar-bg); backdrop-filter: blur(12px);
  border: 1px solid var(--border-strong); border-radius: 999px; padding: 4px;
  box-shadow: 0 6px 26px rgba(0,0,0,.45); }
.zoombar button { border: none; background: transparent; color: var(--text-dim);
  font-size: 14px; font-weight: 700; min-width: 48px; height: 36px; border-radius: 999px; cursor: pointer; }
.zoombar button:hover { background: var(--panel-hover); color: var(--text); }
.zoombar button.active { background: var(--accent-bg); color: #fff; }

.pyramid { position: fixed; inset: 0; z-index: 47; background: var(--bg); overflow-y: auto;
  padding-bottom: 92px; }
.pyr-head { position: sticky; top: 0; z-index: 2; background: var(--bar-bg); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: calc(12px + env(safe-area-inset-top,0)) 16px 12px; display: flex; align-items: center; gap: 12px; }
.pyr-title { font-size: 17px; font-weight: 700; }
.pyr-head .lb-close { position: static; margin-left: auto; background: rgba(127,127,127,.18); color: var(--text); }
.pyr-loading { padding: 34px; text-align: center; color: var(--text-dim); font-size: 13px; }
.pyr-body { padding: 12px; }

/* 年ビュー: 1 年 1 枚のカバー＋年号 */
.pyr-years { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.pyr-year { position: relative; aspect-ratio: 16/10; border-radius: 14px; overflow: hidden;
  background: var(--grid-bg); cursor: pointer; }
.pyr-year img { width: 100%; height: 100%; object-fit: cover; opacity: 0;
  transition: opacity .3s, transform 4s ease-out; }
.pyr-year img.loaded { opacity: .92; }
.pyr-year:hover img { transform: scale(1.05); opacity: 1; }
.pyr-year-ov { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 16px; background: linear-gradient(transparent 45%, rgba(0,0,0,.74)); color: #fff; pointer-events: none; }
.pyr-year-n { font-size: 30px; font-weight: 800; letter-spacing: 1px; line-height: 1; }
.pyr-year-c { font-size: 13px; color: #d7dade; margin-top: 4px; }

/* 月ビュー: 年見出し＋各月のヒーロー・モザイク（1 大＋4 小） */
.pyr-msec { margin-bottom: 24px; }
.pyr-yhead { font-size: 15px; font-weight: 800; letter-spacing: 1px; color: var(--text-dim); margin: 6px 4px 10px; }
.pyr-mrow { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.pyr-month { position: relative; border-radius: 14px; overflow: hidden; background: var(--grid-bg); cursor: pointer; }
.pyr-mosaic { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr;
  gap: 2px; aspect-ratio: 3/2; }
.pyr-mosaic img { width: 100%; height: 100%; object-fit: cover; opacity: 0;
  transition: opacity .3s; background: var(--grid-bg); }
.pyr-mosaic img.loaded { opacity: 1; }
.pyr-hero { grid-area: 1 / 1 / 3 / 2; }
.pyr-m-ov { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 12px 10px;
  background: linear-gradient(transparent, rgba(0,0,0,.76)); color: #fff; pointer-events: none;
  display: flex; align-items: baseline; gap: 8px; }
.pyr-m-n { font-size: 19px; font-weight: 800; }
.pyr-m-c { font-size: 12px; color: #cfd3d8; }

/* ===================== 🎬 ムービー（Web 版） ===================== */
.ov-head .movie-count { margin-left: 8px; font-size: 12px; color: #9aa0a6; }
/* 「🎬 ムービー」見出しと「🔍 絞り込み」ボタンが密着して窮屈なので少し間を空ける。 */
#movie-filter-toggle { margin-left: 12px; }
/* 折りたたみフィルタ（写真の #filters と同構成・見出しの横崩れ防止）。 */
.movie-filters { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end;
  padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--bar-bg); }
.movie-filters.hidden { display: none; }
.movie-filters .field { display: flex; flex-direction: column; gap: 3px; }
.movie-filters .flabel { font-size: 12px; font-weight: 600; color: var(--text-dim); }
.movie-filters select { padding: 6px 10px; border-radius: 8px; font-size: 14px;
  background: var(--grid-bg); color: var(--text); border: 1px solid rgba(127,127,127,.28); }
.movie-grid { display: grid; gap: 12px; padding: 12px 16px 40px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.movie-cell { position: relative; aspect-ratio: 16/9; border-radius: 12px; overflow: hidden;
  background: #000; cursor: pointer; }
.movie-cell img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s; }
.movie-cell img.loaded { opacity: 1; }
/* 縦動画は 16:9 セルにレターボックスで全体表示（潰れ防止・§D5）。 */
.movie-cell img.portrait, .movie-cell video.mv-prev.portrait { object-fit: contain; background: #000; }
.movie-cell .mv-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: rgba(255,255,255,.7); text-shadow: 0 1px 4px rgba(0,0,0,.4); pointer-events: none; }
.movie-cell .mv-dur { position: absolute; right: 8px; bottom: 8px; padding: 2px 6px; border-radius: 10px;
  background: rgba(0,0,0,.66); color: #fff; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
/* 機材バッジ（左下・撮影情報ゾーン。iPhone 動画のみ）。 */
.movie-cell .mv-gear { position: absolute; left: 8px; bottom: 8px; max-width: 60%; padding: 2px 6px; border-radius: 10px;
  background: rgba(0,0,0,.55); color: #fff; font-size: 11px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; z-index: 2; }
/* A5: ホバープレビュー動画（ポスターの上に重ねてミュートループ）。 */
.movie-cell video.mv-prev { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
/* ❤️ お気に入りバッジ（左上・固定ゾーン）。 */
.movie-cell .mv-fav { position: absolute; top: 5px; left: 6px; font-size: 14px; line-height: 1; z-index: 2;
  text-shadow: 0 1px 2px rgba(0,0,0,.6); }
/* 解像度/コーデックバッジ（右上・固定ゾーン）。 */
.movie-cell .mv-badges { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; z-index: 2; }
.movie-cell .mv-chip { font-size: 10px; font-weight: 700; color: #fff; padding: 2px 5px; border-radius: 999px;
  background: rgba(0,0,0,.55); }
.movie-cell .mv-chip.uhd { background: rgba(255,149,0,.85); }
.movie-cell .mv-chip.vlog { background: rgba(175,82,222,.85); } /* 🎬 このアプリで作成した Vlog（Mac の紫バッジと統一） */
/* サマリー帯（本数・合計尺・合計容量）。 */
.movie-summary { padding: 6px 16px; font-size: 12px; color: var(--text-dim); font-variant-numeric: tabular-nums; }

/* 日付ジャンプレール（日付別のみ・右端中央） */
/* ⚠️ backdrop-filter:blur は iOS Safari のスクロールで「常時表示の要素」の背景を毎フレーム再ブラーし重い。
   スクロール中ずっと出るレールでは使わず、不透明寄りの背景にする（Android/Mac だけでなく iPad でも軽く保つ）。 */
.mv-rail { position: fixed; right: 10px; top: 50%; transform: translateY(-50%); z-index: 56;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 8px 6px; border-radius: 14px; background: var(--grid-bg);
  border: 1px solid var(--border); box-shadow: 0 4px 16px rgba(0,0,0,.4); }
.mv-rail.hidden { display: none; }
.mv-rail-btn { width: 32px; height: 28px; border: none; background: transparent; color: var(--text);
  font-size: 13px; cursor: pointer; border-radius: 8px; }
.mv-rail-btn:hover { background: var(--panel-hover); }
.mv-rail-btn:disabled { opacity: .3; cursor: default; }
.mv-raildate { min-width: 40px; text-align: center; font-weight: 700; font-size: 13px;
  font-variant-numeric: tabular-nums; line-height: 1.15; }
.mv-raildate .mv-rd-y { display: block; font-size: 9px; font-weight: 500; color: var(--text-dim); }

/* 動画プレーヤー（全画面・スライドショーと同格の最前面） */
.vplayer { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.96);
  display: flex; align-items: center; justify-content: center; }
.vplayer.hidden { display: none; }
.vp-video { max-width: 94vw; max-height: 86vh; width: auto; height: auto;
  background: #000; border-radius: 8px; box-shadow: 0 12px 40px rgba(0,0,0,.6); }
.vp-meta { position: fixed; left: 0; right: 0; bottom: calc(14px + env(safe-area-inset-bottom,0));
  display: flex; flex-direction: column; align-items: center; gap: 3px; pointer-events: none;
  font-variant-numeric: tabular-nums; }
.vp-meta .vp-count { font-size: 13px; font-weight: 700; color: rgba(255,255,255,.9); font-family: ui-monospace, monospace; }
.vp-meta .vp-parts { font-size: 12px; color: rgba(255,255,255,.8); }
.vp-meta .vp-name { font-size: 11px; color: rgba(255,255,255,.5); font-family: ui-monospace, monospace; }
/* 🎬🌐 配信中の実体バッジ（軽量版=緑 / 原本=グレー）。ファイル名の左に付く。 */
.vp-meta .vp-tag { display: inline-block; padding: 1px 6px; border-radius: 999px; font-size: 10px;
  font-weight: 700; font-family: -apple-system, system-ui, sans-serif; vertical-align: middle; }
.vp-meta .vp-tag.opt { background: rgba(52,199,89,.22); color: #5ee08a; }
.vp-meta .vp-tag.orig { background: rgba(255,255,255,.14); color: rgba(255,255,255,.75); }

/* ===================== 📱 スマホ縦など狭幅（ヘッダの折り返し＝画面崩れを防ぐ） ===================== */
/* 主要ナビはアイコンのみに縮め、件数・補助ラベルを省いて上部バー/オーバーレイ見出しを 1 行に収める。 */
@media (max-width: 560px) {
  .bar-top { gap: 6px; }
  .bar-top .ghost-btn { padding: 8px 9px; }
  .bar-top .ghost-btn .lbl { display: none; }   /* 🔍/🎞/🎬 のアイコンのみ表示 */
  .net-badge .net-lbl { display: none; }         /* 経路バッジは 🏠/🌐 アイコンのみ（タップ/長押しで説明） */
  .net-badge { padding: 3px 6px; }
  #count { display: none; }                       /* 件数は上部バーでは省略（絞り込みや一覧で分かる） */
  .ov-head { padding-left: 12px; padding-right: 12px; gap: 6px; }
  .ov-head .ov-title { font-size: 15px; }
  .ov-head .ghost-btn .lbl { display: none; }      /* 🔍 絞り込みトグルもアイコンのみに（スマホ） */
  .ov-head .movie-count { display: none; }          /* ムービー見出しの件数は省略（サマリー帯で分かる） */
}

/* ===================== 🏠 ホーム帯（検索グリッドの先頭・既定状態のみ表示） ===================== */
/* Mac のホームタブの鑑賞系カードを Web に展開。ゾーン固定（ラベル=左上 / タイトル=下部 / 🔀=右下）で
   データ到着・引き直しでも周囲の要素が動かない（位置ずれ禁止）。テーマ変数でライト/ダーク両対応。 */
.home { padding: 10px 10px 2px; }
.home.hidden { display: none; }
/* 読込前の骨組み（既定状態のとき）。データ到着で中身に差し替え＝グリッドの押し下げを最小化する。 */
.home.loading::before { content: ""; display: block; height: 200px; border-radius: 14px;
  background: var(--panel); animation: homePulse 1.4s ease-in-out infinite; }
@keyframes homePulse { 0%, 100% { opacity: .55; } 50% { opacity: .95; } }

/* --- 二層画像（Mac のホームカード＝DashboardHeroImage/GemImage と同じ「背景=ぼかし塗り＋前景=fit」）。
       中央クロップで写真の端を切らず、余白は黒帯でなくぼかしで埋める。ヒーローとカード列で共用。 --- */
.fit-img { position: absolute; inset: 0; }
.fit-img img { position: absolute; inset: 0; width: 100%; height: 100%; }
.fit-img .fi-bg { object-fit: cover; filter: blur(24px); transform: scale(1.12); }   /* scale=ぼかしの端の透け防止 */
.fit-img .fi-dim { position: absolute; inset: 0; background: rgba(0,0,0,.18); }
.fit-img .fi-fg { object-fit: contain; opacity: 0; transition: opacity .3s; }
.fit-img.loaded .fi-fg { opacity: 1; }

/* --- 今日の見どころ（全幅ヒーロー） --- */
.home-hero-card { position: relative; border-radius: 14px; overflow: hidden; cursor: pointer;
  height: min(46vw, 320px); background: var(--panel); }
.home-hero-badges { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.home-badge { padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700;
  background: rgba(0,0,0,.45); backdrop-filter: blur(6px); color: #fff; }
/* 祝日/記念日バッジの赤/ピンク文字は写真の上で読みにくいため白文字に統一（識別は絵文字が担う・Mac 版と同規則）。 */
.home-badge.holiday { color: #fff; }
.home-badge.event { color: #fff; }
.home-hero-info { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 14px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,.72)); color: #fff; pointer-events: none; }
.home-hero-l1 { font-size: 12px; opacity: .85; }
.home-hero-l2 { font-size: 26px; font-weight: 800; line-height: 1.25; }
.home-hero-l3 { font-size: 11px; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* --- カード列（今日のチャンネル / 埋もれた一枚 / 今日の一本）: 横スクロール＋スナップ --- */
.home-cards { display: flex; gap: 10px; margin-top: 10px; overflow-x: auto;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.home-cards::-webkit-scrollbar { display: none; }
.home-card { position: relative; flex: none; width: min(76vw, 330px); aspect-ratio: 16/10;
  border-radius: 12px; overflow: hidden; cursor: pointer; background: var(--panel);
  scroll-snap-align: start; }
.home-card-label { position: absolute; top: 8px; left: 8px; padding: 3px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 700; color: #fff; background: rgba(0,0,0,.45); backdrop-filter: blur(6px); }
.home-card-play { position: absolute; top: 8px; right: 10px; font-size: 18px; color: #fff; opacity: .85; }
.home-card-info { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 12px 10px;
  background: linear-gradient(transparent, rgba(0,0,0,.7)); color: #fff; pointer-events: none;
  /* 右下の 🔀 と重ならないよう固定の右余白を確保する（出没ではなく常設ボタンなので常時確保）。 */
  padding-right: 52px; }
.home-card-t { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-card-s { font-size: 11px; color: #cfd3d8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* ⏳🎂 記念日カウントダウン: 残り日数を大きく（Mac カードの大数字と同役割）。記念日名ラベルは
   ヒーローの記念日バッジ（.home-badge.event）と同じ白文字（ピンクは写真の上で読みにくいため是正）。
   写真が無い記念日は暗地（--panel）のまま出す。 */
.home-card.countdown .home-card-t { font-size: 24px; }
.home-card.countdown .home-card-label { color: #fff; }
.home-card-dur { position: absolute; right: 46px; bottom: 10px; padding: 2px 7px; border-radius: 999px;
  font-size: 11px; font-weight: 700; color: #fff; background: rgba(0,0,0,.55);
  font-variant-numeric: tabular-nums; }
.home-card-shuffle { position: absolute; right: 8px; bottom: 8px; width: 32px; height: 32px;
  border-radius: 999px; border: none; background: rgba(0,0,0,.5); backdrop-filter: blur(6px);
  color: #fff; font-size: 14px; cursor: pointer; }
.home-card-shuffle:hover { background: rgba(0,0,0,.7); }
/* 🌱 成長ビフォーアフター: 左右二分割の顔クロップ＋中央矢印（Mac の DashboardGrowthCard と同構図）。
   バッジ（むかし/いま＋年月）は各パネル右上の「ラベル行の 1 段下」（top 34px）に置く。
   ⚠️ top 8px だと左上のカードラベル（成長ビフォーアフター）が左パネルの右上まで届いて重なる（§7 実測是正）。 */
.home-card.growth .hg-pair { position: absolute; inset: 0; display: flex; }
.home-card.growth .hg-panel { position: relative; flex: 1 1 0; overflow: hidden; min-width: 0; }
.home-card.growth .hg-panel + .hg-panel { border-left: 1px solid rgba(255,255,255,.18); }
.home-card.growth .hg-arrow { position: absolute; left: 50%; top: 40%; transform: translate(-50%,-50%);
  z-index: 2; font-size: 16px; font-weight: 700; color: #fff;
  text-shadow: 0 1px 3px rgba(0,0,0,.6); pointer-events: none; }
.home-card.growth .hg-badge { position: absolute; top: 34px; right: 8px; padding: 2px 8px; border-radius: 999px;
  font-size: 10px; font-weight: 700; color: #fff; background: rgba(0,0,0,.45); backdrop-filter: blur(6px);
  font-variant-numeric: tabular-nums; }

/* --- ⏳🎪🧑‍🤝‍🧑 ランダムタイムトラベル / イベントデイ・リプレイ / ふたりの記録: カバーは縦切りストリップ
       （成長カードの hg-pair と同構造）。タイムトラベルは日内等間隔 4 枚・イベントデイとふたりの記録は
       ヒーロー先頭＋等間隔脇役で同じ骨格を共用する。 --- */
.home-card.timetravel .tt-strip, .home-card.eventday .tt-strip, .home-card.twoshot .tt-strip { position: absolute; inset: 0; display: flex; }
.home-card.timetravel .tt-panel, .home-card.eventday .tt-panel, .home-card.twoshot .tt-panel { position: relative; flex: 1 1 0; overflow: hidden; min-width: 0; }
.home-card.timetravel .tt-panel + .tt-panel, .home-card.eventday .tt-panel + .tt-panel, .home-card.twoshot .tt-panel + .tt-panel { border-left: 1px solid rgba(255,255,255,.18); }
.home-card.timetravel .tt-panel img, .home-card.eventday .tt-panel img, .home-card.twoshot .tt-panel img { width: 100%; height: 100%; object-fit: cover; display: block;
  opacity: 0; transition: opacity .3s; }
.home-card.timetravel .tt-panel img.loaded, .home-card.eventday .tt-panel img.loaded, .home-card.twoshot .tt-panel img.loaded { opacity: 1; }
/* イベントデイ / ふたりの記録はヒーロー（先頭パネル）を広めに＝Mac カードの「大面＋右列脇役」と対応する見た目 */
.home-card.eventday .tt-panel:first-child, .home-card.twoshot .tt-panel:first-child { flex: 2.2 1 0; }

/* --- 共通見出し行（お気に入り / スマートアルバム） --- */
.home-head { display: flex; align-items: baseline; gap: 8px; margin: 14px 4px 8px; }
.home-head-t { font-size: 14px; font-weight: 700; }
.home-head-c { font-size: 12px; color: var(--text-dim); }
.home-head-btn { margin-left: auto; background: none; border: none; color: var(--accent);
  font-size: 12px; font-weight: 600; cursor: pointer; padding: 2px 4px; }

/* --- お気に入り新着（横一列サムネ帯） --- */
.home-strip { display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; padding-bottom: 2px; }
.home-strip::-webkit-scrollbar { display: none; }
.home-thumb { flex: none; width: 92px; height: 92px; border-radius: 10px; overflow: hidden;
  cursor: pointer; background: var(--panel); border: 1px solid var(--border); }
.home-thumb img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.home-thumb img.loaded { opacity: 1; }

/* --- スマートアルバム（行リスト） --- */
.home-album-list { display: grid; gap: 6px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.home-album { display: flex; align-items: center; gap: 10px; text-align: left; width: 100%;
  padding: 9px 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--border);
  color: var(--text); cursor: pointer; }
.home-album:hover { background: var(--panel-hover); }
.home-album .ha-emoji { font-size: 18px; flex: none; }
.home-album .ha-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.home-album .ha-name { font-size: 13px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-album .ha-sum { font-size: 11px; color: var(--text-dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-album .ha-pin { flex: none; font-size: 12px; }

/* ===================== 🏆 機材ベストショットオーバーレイ ===================== */
/* ヘッダー内コントロール */
.gb-kind-toggle { display: flex; gap: 4px; }
.gb-kind-btn { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border);
  background: transparent; color: var(--text-dim); font-size: 12px; font-weight: 600; cursor: pointer; }
.gb-kind-btn.active { background: var(--accent); color: #fff; border-color: transparent; }
.gb-year-sel { padding: 4px 8px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--panel); color: var(--text); font-size: 12px; }

/* グリッド本体 */
.gb-body { padding: 12px; overflow-y: auto; height: calc(100% - 52px); }
.gb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
@media (max-width: 480px) { .gb-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; } }

/* カード */
.gb-card { border-radius: 14px; overflow: hidden; background: var(--panel);
  border: 1px solid var(--border); cursor: pointer; transition: transform .15s, box-shadow .15s;
  position: relative; }
.gb-card:hover { transform: scale(1.02); box-shadow: 0 6px 24px rgba(0,0,0,.35); }
/* フォーカスハイライト（ホームカードから遷移時） */
.gb-card-focus { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ヒーロー画像 */
.gb-hero { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--panel-hover); }
.gb-hero .fi-bg, .gb-hero .fi-fg, .gb-hero .fi-dim { position: absolute; inset: 0; }
.gb-hero .fi-bg { width: 100%; height: 100%; object-fit: cover;
  filter: blur(18px); transform: scale(1.1); }
.gb-hero .fi-dim { background: rgba(0,0,0,.18); }
.gb-hero .fi-fg { width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .3s; }
.gb-hero.loaded .fi-fg { opacity: 1; }

/* メーカーバッジ（左下に重ねる） */
.gb-cat { position: absolute; top: 8px; left: 8px; padding: 2px 8px; border-radius: 999px;
  font-size: 10px; font-weight: 700; color: #fff;
  background: rgba(0,0,0,.45); backdrop-filter: blur(6px); pointer-events: none; }

/* 機材情報 */
.gb-info { padding: 9px 10px 10px; }
.gb-name-row { display: flex; align-items: center; gap: 4px; }
.gb-name { font-size: 13px; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gb-meta-row { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 5px; }
.gb-chip { padding: 2px 7px; border-radius: 999px; font-size: 11px; color: var(--text-dim);
  background: var(--panel-hover); border: 1px solid var(--border); font-variant-numeric: tabular-nums; }

/* ローディング・空表示 */
.gb-loading, .gb-empty { padding: 48px; text-align: center; color: var(--text-dim); font-size: 14px; }
