/* =====================================================================
   HerFit Lessons
   HerTech 顧客向けトンマナ（HerFit 商談シミュレーターと同じデザイントークン）
   ・アプリコット #E5AC84 ／ ネイビー #396183 ／ 暖白 #FFFCFA ／ 書体 Lexend ＋ Zen Kaku Gothic New
   ・角丸のカード（20px）＋やわらかい暖色の影、ふわっとした切り替え
   ・タイトルは OGP 画像（assets/og.png）と同じ組み方
   スマホ優先。720px 以上でタブレット・PCのレイアウト
   ===================================================================== */
:root {
  --canvas: #f8f3ee;
  --surface: #ffffff;
  --surface-warm: #fffcfa;
  --line: #ece3db;
  --line-strong: #dccfc4;
  --ink: #34302d;
  --ink-2: #5d5550;
  --muted: #6f6761;      /* 文字用（AA）。HerTech の #8a817b を少し濃くしたもの */
  --muted-soft: #8a817b; /* プレースホルダーなど */
  --faint: #b5aca5;

  --apricot-50: #fff7f2;
  --apricot-100: #ffeadd;
  --apricot-200: #f9d5bf;
  --apricot-300: #efbf9f;
  --apricot-400: #e5ac84;
  --apricot-500: #d4916a;
  --apricot-600: #c17a5a;
  --apricot-700: #a9603f;
  --apricot-800: #874a31;
  --apricot-900: #5f3423;

  --navy-50: #f1f5f9;
  --navy-100: #dfe8f0;
  --navy-200: #bccfe0;
  --navy-400: #6f8fab;
  --navy-500: #396183;
  --navy-600: #2e4f6b;

  --sage-50: #f2f7f3;
  --sage-100: #e1ede4;
  --sage-500: #5f8f71;
  --sage-600: #4b765b;

  --radius-card: 20px;
  --radius-field: 14px;
  --shadow-card: 0 1px 2px rgb(95 52 35 / .04), 0 8px 24px -12px rgb(95 52 35 / .12);
  --shadow-pop: 0 2px 6px rgb(95 52 35 / .06), 0 24px 48px -16px rgb(95 52 35 / .22);
  --shadow-cta: 0 10px 24px -10px rgb(169 96 63 / .55);

  /* 動き（HerTech：ふわっと＝不透明度＋わずかな浮き上がり） */
  --ease-soft: cubic-bezier(.22, 1, .36, 1);
  --ease-in: cubic-bezier(.5, 0, .75, 0);
  --t-fast: 150ms;
  --t-base: 300ms;
  --t-soft: 450ms;
  --t-in: 700ms;

  --font-jp: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", YuGothic, Meiryo, sans-serif;
  --font-num: "Lexend", var(--font-jp);
  --header-h: 52px;
  --gutter: 16px;
}
@media (min-width: 720px) { :root { --header-h: 60px; --gutter: 24px; } }

*, *::before, *::after { box-sizing: border-box; }
html {
  color-scheme: light;
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
  scroll-padding-top: calc(var(--controls-h, 120px) + 8px);
  scrollbar-gutter: stable;
  -webkit-tap-highlight-color: transparent;
}
body {
  margin: 0; background: var(--canvas); color: var(--ink);
  font-family: var(--font-jp); font-size: 15px; line-height: 1.7; letter-spacing: .02em;
  font-feature-settings: "palt" 1; /* HerTech の文字組み（かなを詰める） */
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
body.is-locked { overflow: hidden; }
::selection { background: var(--apricot-200); color: var(--apricot-900); }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; letter-spacing: inherit; touch-action: manipulation; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[hidden] { display: none !important; }
.wrap {
  width: 100%; max-width: 1120px; margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
}
:focus-visible { outline: 2px solid var(--apricot-700); outline-offset: 2px; border-radius: 8px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hero-title:focus { outline: none; }
.no-js .controls, .no-js #list-head { display: none; }
.nw { white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 10px; }
.skip:focus { left: 8px; }

/* 数字（Lexend）は等幅・ライニング */
.tab-count, .chip .n, .result-count span, .dur, .jump b, .badge.num { font-feature-settings: "tnum" 1, "lnum" 1; letter-spacing: 0; }
/* 日本語の改行：見出し・説明は文節（<wbr>）でだけ折り返す。短い文節は途中で切らない */
.card-title, .detail-title, .shelf-title, .result-title, .empty-title, .shelf-sub, .summary p { word-break: keep-all; overflow-wrap: anywhere; line-break: strict; }
.ph { white-space: nowrap; }
.shelf-sub, .footer-inner p { text-wrap: pretty; }
.card-title { text-wrap: pretty; }
.detail-title { text-wrap: balance; }

/* ---------- header ---------- */
.site-header { background: var(--surface-warm); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
.header-inner { height: var(--header-h); display: flex; align-items: center; }
.brand { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; color: inherit; border-radius: 10px; }
.brand img { width: 76px; height: auto; }
@media (min-width: 720px) { .brand img { width: 88px; } }

/* ---------- タイトル（OGP画像と同じ組み方：桃色のグラデーション＋やわらかな光の円＋Lexend） ---------- */
.hero { padding-top: 14px; animation: soft-in var(--t-in) var(--ease-soft) backwards; }
@media (min-width: 720px) { .hero { padding-top: 28px; } }
.hero-card {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; align-content: center; min-height: 112px; padding: 26px 22px; border-radius: var(--radius-card);
  background: linear-gradient(135deg, #fff7f2 0%, #ffeadd 55%, #f6e7dc 100%);
  border: 1px solid var(--apricot-100);
}
@media (min-width: 720px) { .hero-card { min-height: 168px; padding: 40px 48px; } }
@media (max-width: 359px) { .hero-card { padding: 22px 18px; } }
.hero-title {
  position: relative; margin: 0;
  font-family: var(--font-num); font-size: clamp(26px, 9.6vw, 64px); font-weight: 600; line-height: 1.15; letter-spacing: .03em; color: var(--ink);
  white-space: nowrap;
}
.hero-title em { font-style: normal; color: var(--apricot-600); } /* ロゴ・OGP と同じ色 */
.hero-orb { position: absolute; z-index: -1; border-radius: 50%; pointer-events: none; }
.hero-orb--a { width: 260px; height: 260px; right: -80px; top: -120px; background: radial-gradient(circle at 35% 35%, rgb(255 255 255 / .95), rgb(255 255 255 / 0) 70%); }
.hero-orb--b { width: 300px; height: 300px; left: -140px; bottom: -200px; background: radial-gradient(circle, rgb(105 180 235 / .16), rgb(105 180 235 / 0) 70%); }
@media (max-width: 719px) { /* スマホでは光の円の縁が文字にかからないように */
  .hero-orb--a { background: radial-gradient(closest-side, rgb(255 255 255 / .9), rgb(255 255 255 / 0)); }
  .hero-orb--b { background: radial-gradient(closest-side, rgb(105 180 235 / .16), rgb(105 180 235 / 0)); }
}
@media (min-width: 720px) {
  .hero-orb--a { width: 420px; height: 420px; right: -100px; top: -200px; }
  .hero-orb--b { width: 460px; height: 460px; left: -200px; bottom: -320px; }
}

/* ---------- 上に残る検索＋タブ ---------- */
.controls {
  position: sticky; top: 0; z-index: 20; padding: 12px 0 8px;
  background: var(--canvas);
  transition: transform var(--t-base) var(--ease-soft), box-shadow var(--t-base);
  view-transition-name: controls;
  animation: soft-in var(--t-in) var(--ease-soft) 80ms backwards;
}
.controls.is-stuck { box-shadow: 0 1px 0 var(--line), 0 10px 18px -16px rgb(95 52 35 / .4); }
@media (max-width: 719px) {
  .controls.is-compact { transform: translateY(calc(-1 * var(--search-h, 58px))); }
  .controls.is-compact .search { opacity: 0; }
}
@media (min-width: 720px) { .controls { padding: 16px 0 10px; } }
.search { position: relative; display: flex; align-items: center; transition: opacity var(--t-fast); }
.search input {
  width: 100%; height: 48px; padding: 0 46px 0 44px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-field);
  background: var(--surface); color: var(--ink);
  font: inherit; font-size: 16px; /* iOS の自動ズーム防止 */
  box-shadow: 0 1px 2px rgb(95 52 35 / .04);
  transition: border-color var(--t-fast), box-shadow var(--t-base) var(--ease-soft);
  -webkit-appearance: none; appearance: none;
}
.search input::placeholder { color: var(--muted-soft); font-size: 14px; }
.search input:focus { outline: none; border-color: var(--apricot-400); box-shadow: 0 0 0 4px rgb(229 172 132 / .22); }
.search input::-webkit-search-cancel-button { display: none; }
.search-icon { position: absolute; left: 15px; font-size: 18px; color: var(--muted); pointer-events: none; transition: color var(--t-fast); }
.search:focus-within .search-icon { color: var(--apricot-600); }
.search-clear {
  position: absolute; right: 2px; width: 44px; height: 44px; display: grid; place-items: center;
  border: 0; border-radius: 12px; background: transparent; color: var(--muted); cursor: pointer;
  transition: opacity var(--t-fast), transform var(--t-fast) var(--ease-soft);
}
.search-clear.is-off { opacity: 0; transform: scale(.7); pointer-events: none; }

/* タブ：ベージュのトラックに白い下地が滑る（HerTech のセグメント） */
.tabs {
  position: relative; isolation: isolate; display: flex; gap: 2px; margin-top: 10px; padding: 4px;
  background: #f1e8e0; border-radius: 16px;
}
.tab-ink {
  position: absolute; left: 0; top: 4px; bottom: 4px; z-index: -1; border-radius: 12px; background: var(--surface);
  box-shadow: 0 1px 2px rgb(95 52 35 / .08), 0 4px 12px -6px rgb(95 52 35 / .25);
  transition: transform var(--t-base) var(--ease-soft), width var(--t-base) var(--ease-soft);
}
html:not(.is-ready) .tab-ink { transition: none; }
.tab {
  flex: 1; min-width: 0; min-height: 44px; padding: 0 4px; border: 0; border-radius: 12px; background: transparent;
  font-size: 14px; font-weight: 700; color: var(--ink-2); cursor: pointer; white-space: nowrap;
  transition: color var(--t-base), transform var(--t-fast) var(--ease-soft);
}
.tab:focus-visible { outline-offset: -2px; border-radius: 12px; }
.tab[aria-selected="true"] { color: var(--apricot-700); }
.tab .tab-count { display: inline-block; margin-left: 4px; font-family: var(--font-num); font-size: 11px; font-weight: 500; color: var(--muted); transition: color var(--t-base); }
.tab[aria-selected="true"] .tab-count { color: var(--apricot-700); }
@media (max-width: 359px) { .tab { font-size: 13px; } .tab .tab-count { margin-left: 2px; font-size: 10px; } }

/* ---------- 見かた（タグとは別の軸：ネイビーの3択スイッチ） ---------- */
.viewmode { padding-top: 14px; animation: soft-in var(--t-in) var(--ease-soft) 140ms backwards; }
.vm { min-width: 0; }
.vm-label, .filter-label { margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .1em; color: var(--muted); }
.vm-track {
  --i: 0; --n: 3; position: relative; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr));
  padding: 4px; border-radius: 18px; background: var(--surface); border: 1px solid var(--navy-100); box-shadow: 0 1px 2px rgb(57 97 131 / .06);
}
.vm-track::before {
  content: ""; position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / var(--n)); border-radius: 14px;
  background: var(--navy-500); box-shadow: 0 6px 16px -8px rgb(46 79 107 / .6);
  transform: translateX(calc(var(--i) * 100%)); transition: transform var(--t-soft) var(--ease-soft);
}
html:not(.is-ready) .vm-track::before { transition: none; }
.vm-opt { position: relative; display: block; min-width: 0; cursor: pointer; }
.vm-opt input { position: absolute; width: 1px; height: 1px; opacity: 0; margin: 0; pointer-events: none; }
.vm-face {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 52px; padding: 6px 4px;
  border-radius: 14px; color: var(--navy-600); transition: color var(--t-base) var(--ease-soft), transform var(--t-fast) var(--ease-soft);
}
.vm-opt:active .vm-face { transform: scale(.96); }
.vm-ico { font-size: 20px; stroke-width: 1.8; color: var(--navy-400); transition: color var(--t-base); }
.vm-text { display: grid; min-width: 0; line-height: 1.25; text-align: left; }
.vm-main { font-size: 13.5px; font-weight: 700; white-space: nowrap; }
.vm-sub { font-size: 11px; font-weight: 500; color: var(--muted); white-space: nowrap; transition: color var(--t-base); }
.vm-opt input:checked + .vm-face, .vm-opt input:checked + .vm-face .vm-ico, .vm-opt input:checked + .vm-face .vm-sub { color: #fff; }
.vm-opt input:focus-visible + .vm-face { outline: 2px solid var(--apricot-700); outline-offset: 2px; }
.vm-opt input:disabled + .vm-face { opacity: .4; cursor: default; }
.vm-hint { margin: 8px 2px 0; font-size: 12.5px; line-height: 1.6; color: var(--navy-600); }
.vm-hint.is-in { animation: soft-in var(--t-soft) var(--ease-soft) backwards; }
.vm-note {
  display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 2px 8px; margin: 0; padding: 10px 12px;
  border-radius: 14px; background: var(--navy-50); border: 1px solid var(--navy-100); color: var(--navy-600);
  font-size: 13px; font-weight: 500; line-height: 1.55;
  animation: soft-in var(--t-soft) var(--ease-soft) backwards;
}
.vm-note svg { font-size: 16px; margin-top: 2px; }
.vm-note small { display: block; margin-top: 1px; font-size: 12px; color: var(--navy-500); }
.vm-goto {
  grid-column: 2; justify-self: start; min-height: 32px; border: 0; background: none; padding: 2px 0; font-size: 12.5px; font-weight: 700;
  color: var(--navy-500); text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
@media (max-width: 359px) { .vm-ico { display: none; } .vm-main { font-size: 12.5px; } }
@media (min-width: 720px) {
  .vm { display: grid; grid-template-columns: 96px minmax(0, 560px); align-items: center; column-gap: 12px; }
  .vm-label { margin: 0; }
  .vm-hint { grid-column: 2; }
  .vm-note { display: inline-grid; }
}

/* ---------- タグのチップ ---------- */
.filters { padding-top: 12px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.filter-group { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; animation: soft-in var(--t-soft) var(--ease-soft) calc(var(--gi, 0) * 60ms) backwards; }
.chips {
  --fl: 0px; --fr: 0px;
  position: relative; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  margin-inline: calc(-1 * var(--gutter)); padding: 4px var(--gutter) 6px;
  scroll-snap-type: x proximity; scroll-padding-inline: 24px 40px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--fl), #000 calc(100% - var(--fr)), transparent);
          mask-image: linear-gradient(90deg, transparent, #000 var(--fl), #000 calc(100% - var(--fr)), transparent);
}
.chips.can-l { --fl: 28px; }
.chips.can-r { --fr: 40px; }
.chips::-webkit-scrollbar { display: none; }
.chips:focus { outline: none; }
@media (min-width: 720px) {
  .filters { gap: 12px; }
  .filter-group { grid-template-columns: 96px minmax(0, 1fr); align-items: start; gap: 12px; }
  .filter-label { padding-top: 10px; }
  .chips { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; -webkit-mask-image: none; mask-image: none; }
}
.chip {
  position: relative; display: inline-flex; align-items: center; gap: 6px; flex: none; scroll-snap-align: start;
  min-height: 40px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--surface);
  font-size: 13.5px; font-weight: 500; color: var(--ink); cursor: pointer; white-space: nowrap;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), opacity var(--t-fast), transform var(--t-fast) var(--ease-soft);
}
.chip::after { content: ""; position: absolute; inset: -4px -3px; } /* 押せる範囲を 48px に */
.chip:active { transform: scale(.96); }
.chip .n { display: inline-block; min-width: .6em; font-family: var(--font-num); font-size: 11px; color: var(--muted); transition: color var(--t-fast); }
.chip .check { display: block; width: 0; margin-right: -6px; font-size: 14px; stroke-width: 2.6; opacity: 0;
  transition: width var(--t-fast) var(--ease-soft), margin var(--t-fast) var(--ease-soft), opacity var(--t-fast); }
.chip[aria-pressed="true"] { background: var(--apricot-700); border-color: var(--apricot-700); color: #fff; font-weight: 700; }
.chip[aria-pressed="true"] .n { color: #fff; }
.chip[aria-pressed="true"] .check { width: 14px; margin-right: 0; opacity: 1; }
.chip:disabled { opacity: .42; cursor: default; background: var(--surface); border-color: var(--line); }
.chip:disabled:active { transform: none; }

/* スマホでは3つめ以降のグループを「さらに絞り込む」にたたむ */
.more-toggle {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 0 14px; margin-top: 2px;
  border: 1px dashed var(--line-strong); border-radius: 14px; background: transparent;
  font-size: 13.5px; font-weight: 700; color: var(--navy-500); cursor: pointer; text-align: left;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.more-t { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 8px; }
.more-toggle small { min-width: 0; font-size: 12px; font-weight: 500; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.more-toggle svg { font-size: 16px; transition: rotate var(--t-base) var(--ease-soft); }
.more-toggle[aria-expanded="true"] svg { rotate: 180deg; }
.more-toggle.has-sel { border-style: solid; border-color: var(--apricot-300); background: var(--apricot-50); }
.more-groups { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--t-soft) var(--ease-soft); }
.more-groups > div { min-height: 0; overflow: hidden; overflow-x: visible; overflow-y: clip; overflow-clip-margin: 6px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.more-groups.is-open { grid-template-rows: 1fr; }
.more-groups:not(.is-open) > div { visibility: hidden; transition: visibility 0s var(--t-soft); }
@media (min-width: 720px) {
  .more-toggle { display: none; }
  .more-groups { grid-template-rows: 1fr; }
  .more-groups > div { visibility: visible !important; overflow: visible; gap: 12px; }
}

/* ---------- 棚（トップのおすすめ） ---------- */
.shelves { padding-top: 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; }
.shelf { min-width: 0; animation: soft-in var(--t-in) var(--ease-soft) backwards; }
.shelf-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.shelf-title { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.5; letter-spacing: .04em; }
.shelf-sub { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); }
.more {
  flex: none; display: inline-flex; align-items: center; gap: 2px; min-height: 44px; padding: 0 4px 0 10px; border: 0; background: none; cursor: pointer;
  font-size: 12.5px; font-weight: 700; color: var(--navy-500); border-radius: 10px; transition: background var(--t-fast), transform var(--t-fast);
}
.more svg { font-size: 15px; }
.shelf-head > div:first-child { flex: 1; min-width: 0; }
.shelf-nav { display: none; gap: 6px; }
.shelf-btn {
  width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%;
  background: var(--surface); color: var(--ink-2); cursor: pointer; box-shadow: var(--shadow-card);
  transition: background var(--t-fast), border-color var(--t-fast);
}
.shelf-btn svg { font-size: 16px; }
@media (min-width: 720px) and (hover: hover) and (pointer: fine) {
  .shelf-nav { display: inline-flex; }
  .shelf-row { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent); }
  .shelf-btn:hover { background: var(--apricot-50); border-color: var(--apricot-300); }
}
.shelf-row {
  position: relative; list-style: none; margin: -4px auto 0; padding: 6px var(--gutter) 14px; max-width: 1120px;
  display: grid; grid-auto-flow: column; grid-auto-columns: min(66%, 240px); gap: 12px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.shelf-row::-webkit-scrollbar { display: none; }
.shelf-row > li { scroll-snap-align: start; min-width: 0; }
@media (min-width: 720px) { .shelf-row { grid-auto-columns: 248px; gap: 16px; } }
.shelf-row .card { grid-template-columns: 1fr; grid-template-rows: auto 1fr; gap: 10px; padding: 10px; }
.shelf-row .card-title { -webkit-line-clamp: 3; font-size: 14px; }
.shelf.is-ordered .shelf-row { counter-reset: step; }
.shelf.is-ordered .shelf-row > li { counter-increment: step; }
.shelf.is-ordered .card-title::before { content: counter(step); display: inline-block; margin-right: 6px; font-family: var(--font-num); color: var(--apricot-700); font-weight: 600; }

/* ---------- 結果の見出し ---------- */
.result-bar { display: flex; align-items: baseline; gap: 10px; padding-top: 22px; padding-bottom: 10px; }
.result-bar:focus { outline: none; }
.result-title { margin: 0; min-width: 0; font-size: 17px; font-weight: 700; line-height: 1.5; letter-spacing: .04em; }
.result-count { margin: 0; flex: none; font-size: 12px; color: var(--muted); }
.result-count span { margin-right: 1px; font-family: var(--font-num); font-size: 14px; font-weight: 600; color: var(--ink-2); display: inline-block; }
.result-bar .link-btn { margin-left: auto; flex: none; }
.link-btn { min-height: 44px; margin: -12px 0; border: 0; background: none; padding: 0 4px; color: var(--navy-500); font-size: 13px; font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 一覧 ---------- */
.video-list { list-style: none; margin: 0 auto; padding-bottom: 56px; display: grid; gap: 12px; }
.video-list > li, .related > li { min-width: 0; }
@media (min-width: 720px) { .video-list { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; } }
.video-list > li.is-entering, .shelf-row > li.is-entering, .related > li.is-entering {
  animation: rise-in var(--t-soft) var(--ease-soft) calc(var(--d, 0ms) + 60ms) backwards;
}

.card {
  position: relative; /* 中の読み上げ用テキスト（.sr-only）を横スクロールの外へはみ出させない */
  height: 100%; width: 100%; display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 14px; align-items: start; align-content: start;
  padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--surface);
  box-shadow: var(--shadow-card); text-align: left; cursor: pointer; color: inherit;
  transition: transform var(--t-base) var(--ease-soft), box-shadow var(--t-base) var(--ease-soft), border-color var(--t-base);
}
.card:active { transform: scale(.985); transition-duration: var(--t-fast); }
@media (max-width: 359px) { .card { grid-template-columns: 112px minmax(0, 1fr); gap: 12px; } }
@media (min-width: 720px) { .card { grid-template-columns: 1fr; gap: 12px; padding: 12px; } }
.card-body { min-width: 0; display: flex; flex-direction: column; gap: 6px; padding: 2px 2px 0; }
.meta { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; color: var(--apricot-700); }
.meta-t { white-space: nowrap; }
.meta.is-meal { color: var(--sage-600); }
.meta.is-knowledge { color: var(--navy-500); }
.pr { padding: 0 6px; border: 1px solid currentColor; border-radius: 4px; font-family: var(--font-num); font-size: 10px; line-height: 1.5; letter-spacing: .08em; color: var(--muted); }
.vm-badge { display: inline-flex; align-items: center; gap: 3px; padding: 1px 7px 1px 5px; border-radius: 999px; font-size: 10.5px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; line-height: 1.6; }
.vm-badge svg { font-size: 12px; stroke-width: 2.2; }
.vm-badge.is-move { background: var(--apricot-50); color: var(--apricot-800); box-shadow: inset 0 0 0 1px var(--apricot-200); }
.vm-badge.is-watch { background: var(--navy-50); color: var(--navy-500); box-shadow: inset 0 0 0 1px var(--navy-100); }
.card-title {
  margin: 0; font-size: 14.5px; font-weight: 700; line-height: 1.55; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
@media (min-width: 720px) { .card-title { -webkit-line-clamp: 2; font-size: 15px; } }
.badges { display: flex; flex-wrap: wrap; gap: 5px; }
.badge { padding: 2px 8px; border-radius: 6px; background: var(--canvas); font-size: 11px; font-weight: 500; color: var(--ink-2); line-height: 1.6; }

/* ---------- サムネイル（本番の動画が入るまでの表紙） ---------- */
.thumb {
  position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; isolation: isolate; container-type: inline-size;
  background: linear-gradient(135deg, var(--apricot-50), var(--apricot-100));
  color: var(--apricot-800);
}
.thumb.is-meal { background: linear-gradient(135deg, var(--sage-50), var(--sage-100)); color: var(--sage-600); }
.thumb.is-knowledge { background: linear-gradient(135deg, var(--navy-50), var(--navy-100)); color: var(--navy-600); }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity var(--t-soft) var(--ease-soft); }
.thumb img.is-loaded, .no-js .thumb img { opacity: 1; }
.cover { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; padding: 7cqw 7.5cqw 6.5cqw; }
.cover-kicker { font-size: clamp(9px, 5.6cqw, 13px); font-weight: 700; letter-spacing: .1em; line-height: 1.2; white-space: nowrap; }
.thumb.is-meal .cover-kicker { color: #3d6a4f; }
.cover-word {
  font-size: clamp(13px, 10.5cqw, 32px); font-weight: 700; line-height: 1.15; letter-spacing: 0; color: var(--ink);
  white-space: nowrap; overflow: hidden; max-width: calc(100% - 34px);
}
.watched {
  position: absolute; right: 7px; top: 7px; z-index: 2; display: inline-flex; align-items: center; gap: 3px;
  padding: 1px 8px 1px 6px; border-radius: 999px; background: rgb(52 48 45 / .72); color: #fff; font-size: 10.5px; font-weight: 700; line-height: 1.6;
}
.watched svg { font-size: 11px; stroke-width: 3; }
.watched.is-new { animation: pop-in var(--t-soft) var(--ease-soft) var(--t-base) backwards; }
.play {
  position: absolute; right: 8px; bottom: 8px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; background: rgb(255 255 255 / .9); color: var(--apricot-700);
  box-shadow: 0 4px 10px -4px rgb(95 52 35 / .4); transition: transform var(--t-base) var(--ease-soft), background var(--t-base);
}
.play svg { font-size: 12px; fill: currentColor; stroke: none; margin-left: 2px; }
.dur {
  position: absolute; left: 8px; bottom: 8px; padding: 1px 7px; border-radius: 6px;
  background: rgb(52 48 45 / .72); color: #fff; font-family: var(--font-num); font-size: 11px; font-weight: 500; letter-spacing: .04em;
}
.cover { padding-bottom: calc(6.5cqw + 22px); } /* 時間の表示があってもなくても、ひと言の高さをそろえる */
@container (max-width: 125px) {
  .dur { display: none; }
  .cover { padding-bottom: 6.5cqw; }
  .cover-word { font-size: 12.5px; max-width: calc(100% - 30px); }
  .play { width: 24px; height: 24px; right: 6px; bottom: 6px; }
}

/* ---------- 0件 ---------- */
.empty { text-align: center; padding: 40px 16px 72px; }
.empty:not([hidden]) { animation: soft-in var(--t-soft) var(--ease-soft); }
.empty-icon { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; background: var(--apricot-50); color: var(--apricot-500); font-size: 28px; }
.empty-title { margin: 0; font-weight: 700; }
.empty-text { margin: 6px 0 18px; font-size: 13px; color: var(--muted); }
.empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }
#empty-view:not([hidden]) + #empty-clear { background: var(--surface); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn {
  min-height: 46px; padding: 0 22px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--apricot-700); color: #fff; font-weight: 700; font-size: 14px;
  box-shadow: var(--shadow-cta); transition: background var(--t-fast), transform var(--t-fast) var(--ease-soft);
}
.btn:active { transform: scale(.97); }
.load-error { padding-top: 24px; padding-bottom: 48px; text-align: center; }
.load-error p { margin: 0 0 14px; font-size: 14px; }
.no-app .controls, .no-app #list-head, .no-app .jump { display: none; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--surface-warm); }
.footer-inner { padding-top: 28px; padding-bottom: calc(88px + env(safe-area-inset-bottom)); display: grid; gap: 10px; justify-items: start; }
@media (min-width: 720px) { .footer-inner { padding-bottom: 32px; } }
.footer-inner p { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.8; }
.footer-inner .copy { font-family: var(--font-num); letter-spacing: .08em; }
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand img { width: 74px; height: auto; }
.footer-name { font-family: var(--font-num); font-size: 12px; font-weight: 600; letter-spacing: .1em; color: var(--ink-2); padding-left: 10px; border-left: 1px solid var(--line-strong); }
.noscript { padding: 24px 16px; text-align: center; color: var(--ink-2); }
html.js:not(.is-ready) .site-footer, html.js:not(.is-ready) #list-head, html.js:not(.is-ready) #empty { visibility: hidden; }

/* ---------- 「◯本のレッスンを見る」（スマホ） ---------- */
.jump {
  position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 30; translate: -50% 0;
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 20px; border: 0; border-radius: 999px;
  background: var(--apricot-700); color: #fff; font-size: 14px; font-weight: 700; white-space: nowrap; cursor: pointer;
  box-shadow: var(--shadow-cta);
  transition: opacity var(--t-base) var(--ease-soft), transform var(--t-soft) var(--ease-soft);
}
.jump b { font-family: var(--font-num); font-size: 16px; margin-right: 2px; display: inline-block; }
.jump svg { font-size: 16px; }
.jump.is-off { opacity: 0; transform: translateY(14px) scale(.97); pointer-events: none; transition-timing-function: var(--ease-in); transition-duration: var(--t-fast); }
.jump:active { transform: scale(.97); }
@media (min-width: 720px) { .jump { display: none; } }

/* ---------- 再生シート ---------- */
.sheet { position: fixed; inset: 0; z-index: 50; display: grid; align-items: end; }
.sheet-backdrop { position: absolute; inset: 0; background: rgb(52 48 45 / .42); animation: fade-in var(--t-base) linear backwards; view-transition-name: sheet-scrim; }
.sheet-panel {
  position: relative; width: 100%; height: 100%; height: 100dvh; max-height: 100%; overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface-warm); outline: none;
  animation: sheet-rise var(--t-soft) var(--ease-soft) backwards, fade-in 160ms linear backwards;
  transition: transform var(--t-base) var(--ease-soft);
  view-transition-name: sheet-panel;
}
.sheet-panel.is-dragging { transition: none; }
.sheet.is-closing .sheet-panel { animation: sheet-down var(--t-base) var(--ease-in) forwards; }
.sheet.is-closing .sheet-backdrop { animation: fade-out var(--t-base) linear forwards; }
@media (min-width: 720px) and (min-height: 560px) {
  .sheet { place-items: center; padding: 32px 24px; }
  .sheet-panel { max-width: 760px; height: auto; max-height: calc(100dvh - 64px); border-radius: 24px; box-shadow: var(--shadow-pop);
    animation: pop-in var(--t-soft) var(--ease-soft) backwards, fade-in 160ms linear backwards; }
}
.sheet-bar {
  position: sticky; top: 0; z-index: 3; display: flex; justify-content: space-between; align-items: center;
  padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) 8px max(8px, env(safe-area-inset-left));
  background: rgb(255 252 250 / .96); border-bottom: 1px solid var(--line);
}
.icon-btn {
  position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border: 0; border-radius: 12px;
  background: transparent; font-size: 13px; font-weight: 700; color: var(--ink-2); cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast) var(--ease-soft);
}
.icon-btn:active { transform: scale(.96); }
.icon-btn svg { font-size: 18px; }
#sheet-close .i-x { display: none; }
@media (min-width: 720px) and (min-height: 560px) {
  .sheet-bar { justify-content: flex-end; gap: 4px; }
  #sheet-close { width: 44px; padding: 0; justify-content: center; }
  #sheet-close .i-back, #sheet-close span { display: none; }
  #sheet-close .i-x { display: block; }
}
#copy-link svg { transition: opacity var(--t-fast); }
#copy-link .i-share, #copy-link .i-done { position: absolute; left: 12px; opacity: 0; }
#copy-link.is-share .i-link { opacity: 0; }
#copy-link.is-share .i-share { opacity: 1; position: static; }
#copy-link.is-done .i-link, #copy-link.is-done .i-share { opacity: 0; }
#copy-link.is-done .i-done { opacity: 1; color: var(--sage-600); }
.sheet-body { padding: 16px max(16px, env(safe-area-inset-right)) calc(40px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 720px) { .sheet-body { padding: 20px 28px 32px; } }
.detail-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }

.player { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: var(--ink); box-shadow: var(--shadow-card); }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; transition: opacity var(--t-soft) var(--ease-soft); }
.player iframe.is-pending { opacity: 0; pointer-events: none; }
.player-poster { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; padding: 0; border: 0; cursor: pointer; border-radius: 0; background: none; }
.player-poster .thumb { position: absolute; inset: 0; aspect-ratio: auto; border-radius: 0; }
.player-poster .cover { padding: 5cqw 6cqw; }
.player-poster .cover-kicker { font-size: clamp(11px, 3cqw, 15px); }
.player-poster .cover-word { font-size: clamp(22px, 6.5cqw, 44px); }
.player-poster .cover { padding-bottom: 5cqw; }
.player-poster .dur, .player .watched { display: none; }
.player:has(iframe:not(.is-pending)) .player-poster { opacity: 0; transition: opacity var(--t-soft) var(--ease-soft); pointer-events: none; }
.player-poster:focus-visible { outline: none; }
.player-poster:focus-visible .big-play { outline: 2px solid var(--apricot-700); outline-offset: 2px; box-shadow: 0 0 0 2px #fff; }
/* 再生ボタン：顔や文字にかからないよう右下に。HerTech のアプリコット */
.big-play {
  position: absolute; right: 4cqw; bottom: 4.5cqw; z-index: 1;
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 20px 0 16px; border-radius: 999px;
  background: var(--apricot-700); color: #fff; font-size: 15px; font-weight: 700;
  box-shadow: var(--shadow-cta); transition: background var(--t-fast), transform var(--t-base) var(--ease-soft);
}
.big-play svg { font-size: 13px; fill: currentColor; stroke: none; }
.player-poster:active .big-play { transform: scale(.96); }
.player.is-loading .big-play { opacity: .75; cursor: progress; }
.player-poster.is-soon { cursor: default; }
.soon {
  position: absolute; right: 4cqw; bottom: 4.5cqw; z-index: 1; display: inline-flex; align-items: center; min-height: 32px; padding: 0 14px;
  border-radius: 999px; background: rgb(255 255 255 / .8); color: var(--ink-2); font-size: 12.5px; font-weight: 700;
}
.player-note { margin: -4px 0 0; font-size: 12px; color: var(--muted); }
@media (max-width: 719px) {
  .sheet.is-playing .player {
    position: sticky; top: var(--sheet-bar-h, 57px); z-index: 2;
    margin-inline: calc(-1 * max(16px, env(safe-area-inset-left))); border-radius: 0;
    box-shadow: 0 10px 18px -14px rgb(0 0 0 / .45);
  }
  .player { transition: margin var(--t-base) var(--ease-soft), border-radius var(--t-base) var(--ease-soft); }
}
@media (orientation: landscape) and (max-height: 500px) {
  .sheet { place-items: stretch; padding: 0; }
  .sheet-panel { max-width: none; height: 100%; max-height: none; border-radius: 0; }
  .sheet-body { padding-top: 16px; }
  .player { height: calc(100dvh - var(--sheet-bar-h, 57px) - 16px); width: auto; max-width: 100%; margin-inline: auto; aspect-ratio: 16 / 9; }
  .sheet.is-playing .player { position: relative; top: auto; margin-inline: auto; border-radius: 12px; }
  .controls { position: relative; }
  .video-list { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}

.detail-head { display: grid; gap: 8px; }
.detail-lead { margin: 0 0 -4px; font-size: 12.5px; font-weight: 700; color: var(--apricot-700); }
.detail-title { margin: 0; font-size: 19px; line-height: 1.55; font-weight: 700; }
@media (min-width: 720px) { .detail-title { font-size: 21px; } }
.detail-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.detail-meta .badge { background: var(--surface); border: 1px solid var(--line); font-size: 12px; padding: 3px 10px; }
.detail-meta .badge.num { font-family: var(--font-num); }
.detail-meta .badge.is-watched { background: var(--sage-50); border-color: var(--sage-100); color: var(--sage-600); }
.detail-meta .badge.vm-badge { display: inline-flex; padding: 3px 10px 3px 8px; font-size: 12px; border: 0; border-radius: 999px; }
.summary { padding: 14px 16px 15px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.summary p:last-child { margin: 0; font-size: 14px; color: var(--ink-2); line-height: 1.85; }
.summary .section-label { margin: 0 0 4px; }
.section-label { margin: 0 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .1em; color: var(--muted); }
.pr-note { margin: -4px 0 0; padding: 8px 12px; border-radius: 10px; background: var(--canvas); font-size: 12px; color: var(--ink-2); }
.detail-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.detail-chips .chip { font-size: 13px; }
.detail-chips .chip svg.arrow { font-size: 13px; color: var(--muted); }
.related { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.related .card { grid-template-columns: 120px minmax(0, 1fr); padding: 8px; gap: 12px; box-shadow: none; }
.related .card-title { font-size: 13.5px; -webkit-line-clamp: 2; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 60; translate: -50% 0;
  padding: 10px 18px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 500; white-space: nowrap;
  box-shadow: var(--shadow-pop);
  opacity: 0; transform: translateY(10px); pointer-events: none;
  transition: opacity var(--t-fast) var(--ease-in), transform var(--t-fast) var(--ease-in);
}
.toast.is-show { opacity: 1; transform: none; transition: opacity var(--t-base) var(--ease-soft), transform var(--t-soft) var(--ease-soft); }
.toast:empty { visibility: hidden; }
@media (min-width: 720px) { .toast { bottom: calc(28px + env(safe-area-inset-bottom)); } }

/* ---------- マウスのときだけのホバー ---------- */
@media (hover: hover) and (pointer: fine) {
  .card:hover { transform: translateY(-2px); box-shadow: var(--shadow-pop); border-color: var(--apricot-200); }
  .card:hover .play { transform: scale(1.06); background: #fff; }
  .related .card:hover { transform: none; box-shadow: none; }
  .chip:not(:disabled):not([aria-pressed="true"]):hover { border-color: var(--apricot-300); background: var(--apricot-50); }
  .tab:hover { color: var(--ink); }
  .tab[aria-selected="true"]:hover { color: var(--apricot-700); }
  .more:hover, .more-toggle:hover { background: var(--navy-50); }
  .icon-btn:hover, .search-clear:hover { background: var(--canvas); color: var(--ink); }
  .btn:hover, .jump:hover { background: var(--apricot-800); }
  .player-poster:hover .big-play { background: var(--apricot-800); }
  .vm-opt:hover input:not(:checked):not(:disabled) + .vm-face { background: var(--navy-50); }
}
.tab:active, .more:active, .link-btn:active { transform: scale(.97); }
.result-count.is-bump span, .tab-count.is-bump, .chip .n.is-bump { animation: tick var(--t-base) var(--ease-soft); }

/* ---------- View Transitions ---------- */
.site-header { view-transition-name: header; }
::view-transition-group(*) { animation-duration: var(--t-base); animation-timing-function: var(--ease-soft); }
::view-transition-group(lesson-media) { animation-duration: var(--t-soft); z-index: 2; }
::view-transition-old(lesson-media), ::view-transition-new(lesson-media) { height: 100%; object-fit: cover; animation-duration: var(--t-soft); }
html[data-vt] .sheet-panel, html[data-vt] .sheet-backdrop { animation: none; }
.sheet.is-vt:not(.is-closing) .sheet-panel, .sheet.is-vt:not(.is-closing) .sheet-backdrop { animation: none; }
html[data-vt="tab"]::view-transition-old(root) { animation: fade-out 160ms var(--ease-in) both; }
html[data-vt="tab"]::view-transition-new(root) { animation: fade-in var(--t-base) var(--ease-soft) 40ms both; }
html[data-vt="sheet-open"]::view-transition-old(root),
html[data-vt="sheet-open"]::view-transition-new(root) { animation: none; }
html[data-vt="sheet-open"]::view-transition-new(sheet-panel) { animation: sheet-rise var(--t-soft) var(--ease-soft) both, fade-in 140ms linear both; }
html[data-vt="sheet-open"]::view-transition-new(sheet-scrim) { animation: fade-in var(--t-base) linear both; }
html[data-vt="sheet-close"]::view-transition-old(root),
html[data-vt="sheet-close"]::view-transition-new(root) { animation: none; }
html[data-vt="sheet-close"]::view-transition-old(sheet-panel) { animation: sheet-down var(--t-base) var(--ease-in) both; }
html[data-vt="sheet-close"]::view-transition-old(sheet-scrim) { animation: fade-out var(--t-base) linear both; }
html[data-vt="sheet-swap"]::view-transition-old(root),
html[data-vt="sheet-swap"]::view-transition-new(root) { animation: none; }
html[data-vt="sheet-swap"]::view-transition-old(sheet-panel) { animation: fade-out 160ms var(--ease-in) both; }
html[data-vt="sheet-swap"]::view-transition-new(sheet-panel) { animation: rise-in var(--t-base) var(--ease-soft) both; }

/* ---------- keyframes ---------- */
@keyframes soft-in { from { opacity: 0; transform: translateY(12px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes sheet-rise { from { transform: translateY(40px); } to { transform: none; } }
@keyframes sheet-down { from { transform: translateY(var(--drag, 0px)); } to { opacity: 0; transform: translateY(calc(var(--drag, 0px) + 48px)); } }
@keyframes tick { from { opacity: .25; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ---------- 「視差効果を減らす」設定ではすべての動きを止める ---------- */
@media (prefers-reduced-motion: reduce) {
  :root { --t-fast: 0ms; --t-base: 0ms; --t-soft: 0ms; --t-in: 0ms; }
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
  .thumb img { opacity: 1; }
}
@media (forced-colors: active) {
  .chip[aria-pressed="true"] { border: 2px solid Highlight; }
  .tab-ink, .vm-track::before { background: Highlight; }
}
