/* Ren-i.com 全ページ共通のスタイル（手書き）。正本: docs/DESIGN.md
   見立ては「静かな入り江」。生成りの地に、こげ茶の墨の字。押すところは、コーラルの塗りに墨の字。こんぶの若草は「新着」と「音」の印にだけ。
   入口の絵・見出しの印・タブは、角のない小石の形（--peb）。枠はやわらかい線・影は薄く。語り手の札の6色は札と点にだけ使う。
   下のほうの「Ren-i の仕上げ」の組が、上の決まりを上書きする（形・小石・波の線・ひと息・きょうの問い・文字の大きさ）。
   色は変数で持ち、暗い画面（html[data-theme="dark"]、または端末の設定）では下の「暗い画面」の組に入れ替わる。
   広い画面のプレーヤーの帯（.stage）は、明るい画面でも暗い組を使う。
   色を足す・替えるときは、pipeline/prerelease.py の色の比の検査（文字 4.5:1 以上）を通すこと。
   ⚠ プレーヤーの幕（.vp__curtain）は上に「覆う」だけ（pointer-events:none）。動画要素を visibility / display で隠さない（iPhone で自動再生が止まる・LSN-0239） */
:root {
  --bg: #FAF7F2; --card: #ffffff; --soft: #F3ECE1; --line: #E7DFD3; --line2: #BFB2A3;
  --ink: #2E2A28; --ink2: #564E49; --ink3: #6B625C; --edge: #CDBFAE;
  --inv-bg: #2E2A28; --inv-fg: #FAF7F2;
  --sun: #F2A99E; --sun2: #EA9285; --sun-soft: #FCEDE8; --sun-line: #A8443E; --on-sun: #2E2A28;
  --mint: #A8CF94; --mint-ink: #3A6848; --on-mint: #16301C;
  --link: #2E2A28; --link-h: #A8443E; --live: #c2362b;
  --tone-q: #1b6f60; --tone-s: #2b5c9e; --tone-p: #b4472f; --tone-c: #7a5c12; --tone-m: #50606b; --tone-o: #6b4fa0;
  --honey: #E9BE6A; --kelp-soft: #EAF2E1;
  --paper: #FFF8EC;                      /* 絵の下に敷く色（絵の線が墨色なので、暗い画面でも明るいまま） */
  --stage: #2B2422; --scrim: rgba(43, 36, 34, .62);
  --r: 22px; --r2: 15px; --pad: clamp(14px, 2.4vw, 28px); --max: 1380px; --hd: 66px;
  --peb: 46% 54% 52% 48% / 55% 48% 52% 45%;      /* 小石の形（入口の絵・印・ボタンに使う） */
  --font: "BIZ UDPGothic", "Hiragino Sans", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
  --font-d: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "BIZ UDPGothic", "Hiragino Sans", "Yu Gothic UI", sans-serif;
  --lift: 0 1px 2px rgba(46, 42, 40, .05), 0 8px 22px -8px rgba(46, 42, 40, .14);
  color-scheme: light;
}
/* ── 暗い画面の組（同じ中身を3か所に置く: 端末の設定・切り替えボタン・広い画面のプレーヤーの帯） ── */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #221D1B; --card: #2E2725; --soft: #3A312E; --line: #4A3F3A; --line2: #7D6D62;
  --ink: #F5EEE6; --ink2: #D8CCC1; --ink3: #B8AA9D; --edge: #6A5A50;
  --inv-bg: #F5EEE6; --inv-fg: #221D1B;
  --sun-soft: #4A2E2A; --sun-line: #F2A99E;
  --mint-ink: #B5DBA3; --kelp-soft: #2F3A2C;
  --link: #F5EEE6; --link-h: #F7C0B6; --live: #ff9a8f;
  --tone-q: #7fd8c4; --tone-s: #9cc2f5; --tone-p: #f5a898; --tone-c: #e9c766; --tone-m: #c3ced6; --tone-o: #c9b6f0;
  --stage: #171312; --scrim: rgba(0, 0, 0, .7); --lift: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 18px rgba(0, 0, 0, .28);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #221D1B; --card: #2E2725; --soft: #3A312E; --line: #4A3F3A; --line2: #7D6D62;
  --ink: #F5EEE6; --ink2: #D8CCC1; --ink3: #B8AA9D; --edge: #6A5A50;
  --inv-bg: #F5EEE6; --inv-fg: #221D1B;
  --sun-soft: #4A2E2A; --sun-line: #F2A99E;
  --mint-ink: #B5DBA3; --kelp-soft: #2F3A2C;
  --link: #F5EEE6; --link-h: #F7C0B6; --live: #ff9a8f;
  --tone-q: #7fd8c4; --tone-s: #9cc2f5; --tone-p: #f5a898; --tone-c: #e9c766; --tone-m: #c3ced6; --tone-o: #c9b6f0;
  --stage: #171312; --scrim: rgba(0, 0, 0, .7); --lift: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 18px rgba(0, 0, 0, .28);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 500 16px/1.7 var(--font); overflow-wrap: anywhere; }
html[lang="ja"] [data-l="en"], html[lang="en"] [data-l="ja"] { display: none !important; }
img { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--link-h); }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--sun-line); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--sun); color: var(--on-sun); padding: 8px 14px; border-radius: 10px; }
.skip:focus { left: 8px; }
h1, h2, h3, h4 { line-height: 1.35; margin: 0; font-weight: 900; }
/* 区切りの帯（形は、下の「Ren-i の仕上げ」で決める） */
.nami { height: 12px; }
/* 案内役の絵は線が墨なので、どの画面でも明るい紙色を下に敷く */
.brand img, .chip img, .mood img, .shelf__head > img, .doc__head img, .ft__brand img, .now__msg img, .guide__empty img, .cats a img { background: var(--paper); border-radius: 28%; }

/* ── ヘッダー ── */
.hd { position: sticky; top: 0; z-index: 40; background: var(--card); border-bottom: 2px solid var(--edge); }
.hd + .nami { position: sticky; top: var(--hd); z-index: 39; height: 8px; }
.hd__in { display: flex; align-items: center; gap: 14px; min-height: var(--hd); padding: 6px var(--pad); max-width: calc(var(--max) + 40px); margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand img { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 2px solid var(--edge); }
.brand__name { font: 800 25px/1 var(--font-d); letter-spacing: -.01em; color: var(--ink); white-space: nowrap; }
.brand__name b { font-weight: 600; color: var(--ink3); }
.brand__tag { font-size: 12.5px; font-weight: 700; color: var(--on-sun); background: var(--sun); padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.search { flex: 1 1 320px; max-width: 480px; margin-left: auto; }
.search input { width: 100%; height: 42px; padding: 0 16px 0 40px; border-radius: 999px; border: 2px solid var(--line2); background: var(--soft) no-repeat 14px 50% / 17px
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B625C' stroke-width='2.8' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.6-3.6'/%3E%3C/svg%3E"); }
.search input::placeholder { color: var(--ink3); opacity: 1; }
.search input:focus { outline: none; border-color: var(--edge); background-color: var(--card); }
.hd__nav { display: flex; align-items: center; gap: 4px 14px; margin-left: auto; font-size: 14.5px; white-space: nowrap; }
.search + .hd__nav { margin-left: 0; }
.hd__nav a { color: var(--ink); text-decoration: none; font-weight: 700; }
.hd__nav a:hover { color: var(--link-h); }
.themesw { flex: none; width: 34px; height: 34px; padding: 0; border-radius: 50%; border: 2px solid var(--edge); background: var(--card); display: grid; place-items: center; }
.themesw span { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--ink); background: linear-gradient(90deg, var(--ink) 50%, transparent 50%); transition: transform .25s; }
.themesw[aria-pressed="true"] span { transform: rotate(180deg); }
.langsw { display: inline-flex; border: 2px solid var(--edge); border-radius: 999px; overflow: hidden; flex: none; }
.langsw button { border: 0; background: var(--card); padding: 4px 12px; font-size: 13px; font-weight: 700; color: var(--ink2); }
.langsw button[aria-pressed="true"] { background: var(--inv-bg); color: var(--inv-fg); }

/* ── 共通の部品 ── */
main { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad) 44px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 5px 15px; border-radius: 13px; border: 2px solid var(--edge);
  background: var(--card); color: var(--ink); font-weight: 700; font-size: 14px; text-decoration: none; white-space: nowrap; box-shadow: 0 3px 0 var(--edge); transition: transform .08s, box-shadow .08s; }
.btn:hover { background: var(--soft); color: var(--ink); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--edge); }
.btn--main { background: var(--sun); color: var(--on-sun); }
.btn--main:hover { background: var(--sun2); color: var(--on-sun); }
.btn--glow { background: var(--mint); color: var(--on-mint); }
.btn--glow:hover { background: #BBDCA8; color: var(--on-mint); }
.btn--icon { width: 42px; padding: 0; font-size: 19px; }
.btn--icon[aria-pressed="true"] { background: var(--sun); color: var(--on-sun); }
.btn--more { display: flex; margin: 20px auto 0; min-width: 220px; }
.sec { margin-top: 46px; }
.sec__head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 14px; }
.sec__head h2 { font-size: clamp(21px, 2.4vw, 27px); line-height: 1.3; padding-left: 20px; position: relative; }
.sec__head h2::before { content: ""; position: absolute; left: 0; top: .16em; width: 10px; height: 1.05em; border-radius: 5px; background: var(--sun); border: 2px solid var(--edge); }
.sec__note { margin: 0; font-size: 13px; color: var(--ink3); }
.sec__more { font-size: 14px; font-weight: 700; margin-left: auto; }
.chip__n { font: 600 13px/1 var(--font-d); color: var(--ink3); margin-left: 4px; letter-spacing: .01em; }
.tone { display: inline-block; font-style: normal; font-size: 11.5px; font-weight: 700; line-height: 1; padding: 3.5px 7px; border-radius: 6px; border: 1.5px solid currentColor; background: var(--card); white-space: nowrap; flex: none; }
.tone--q { color: var(--tone-q); } .tone--s { color: var(--tone-s); } .tone--p { color: var(--tone-p); } .tone--c { color: var(--tone-c); } .tone--m { color: var(--tone-m); } .tone--o { color: var(--tone-o); }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: currentColor; flex: none; }
.av { position: relative; display: inline-grid; place-items: center; border-radius: 50%; overflow: hidden; background: var(--soft); color: var(--ink2); font-weight: 700; flex: none; border: 1.5px solid var(--line2); }
.av--44 { width: 44px; height: 44px; font-size: 18px; } .av--40 { width: 40px; height: 40px; font-size: 16px; } .av--28 { width: 28px; height: 28px; font-size: 12px; }
.av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.av img.is-broken { display: none; }

/* ── 舞台（プレーヤーと注目の新着） ── */
.stage__in { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }
.stage__main { min-width: 0; }
.vp { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--r); overflow: hidden; border: 2px solid var(--edge); }
#player-host, #player-host > * { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vp__curtain { position: absolute; inset: 0; display: grid; place-items: center; background: var(--paper); pointer-events: none; opacity: 0; transition: opacity .35s; }
.vp__curtain img { width: min(34%, 190px); height: auto; }
.vp[data-curtain="on"] .vp__curtain { opacity: 1; }
.vp[data-curtain="on"][data-state="tuning"] .vp__curtain img { animation: bob 1.1s ease-in-out infinite; }
.now { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 10px 12px; background: var(--card); border: 2px solid var(--edge); border-radius: var(--r); min-width: 0; }
.now__txt { display: grid; min-width: 0; flex: 1 1 auto; line-height: 1.4; }
.now__label { justify-self: start; font-size: 11.5px; font-weight: 700; color: var(--on-sun); background: var(--sun); padding: 1px 9px; border-radius: 999px; }
.now[data-state="live"] .now__label { background: #c2362b; color: #fff; }
.now[data-state="tuning"] .now__label, .now[data-state="error"] .now__label, .now[data-state="tap"] .now__label { background: var(--soft); color: var(--ink2); }
.now__name { font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now__title { font-size: 13.5px; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now__act { display: flex; gap: 8px; flex: none; flex-wrap: wrap; justify-content: flex-end; padding-bottom: 3px; }
.now__msg { display: flex; align-items: center; gap: 10px; margin: 12px 0 0; padding: 8px 14px; background: var(--sun-soft); border: 2px solid var(--sun-line); border-radius: var(--r2); font-size: 14.5px; color: var(--ink); }
.now__msg img { width: 48px; height: 48px; flex: none; }
.info { margin: 12px 4px 0; font-size: 14.5px; color: var(--ink2); }
.info p { margin: 0 0 6px; }
.info__tone { display: flex; gap: 8px; align-items: baseline; color: var(--ink); }
.info__tone .tone { transform: translateY(-1px); }
.info__links { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.info__links a { font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--sun); }
.info__links a.is-topic { border-bottom-color: var(--mint); }
.info__links a.is-quiet { color: var(--ink3); font-weight: 500; border-bottom: 1px solid currentColor; }
.info__near { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin-top: 8px; }
.info__near > b { font-size: 12.5px; color: var(--ink3); margin-right: 2px; }
.nearch { display: inline-flex; align-items: center; gap: 6px; max-width: 220px; padding: 3px 10px 3px 3px; border-radius: 999px; border: 1.5px solid var(--line2); background: var(--card); color: var(--ink); text-decoration: none; font-size: 12.5px; font-weight: 700; }
.nearch span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nearch:hover { border-color: var(--edge); color: var(--ink); }
.capnote { margin: 10px 4px 0; font-size: 13px; color: var(--ink2); }
.noscript { margin: 12px 0 0; padding: 12px 14px; border: 2px dashed var(--line2); border-radius: var(--r2); background: var(--card); }

.picks { min-width: 0; background: var(--card); border: 2px solid var(--edge); border-radius: var(--r); padding: 12px; }
.js .picks__fallback { display: none; }
.js .picks__fallback.is-shown { display: block; }
.picks__head { margin-bottom: 10px; padding-bottom: 8px; border-bottom: 2px dashed var(--line); }
.picks__head h2 { font-size: 20px; line-height: 1.3; display: flex; align-items: center; gap: 8px; }
.picks__head h2::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--mint); border: 2px solid var(--edge); flex: none; }
.picks__rule { margin: 2px 0 0; font-size: 12.5px; color: var(--ink3); line-height: 1.45; }
.picks__list { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 6px; scrollbar-color: var(--line2) transparent; }
.picks__list > * { flex: 0 0 min(66vw, 240px); scroll-snap-align: start; }

/* 動画のカード（描くのは app.js。題名と絵は運営者のもの） */
.vc { display: grid; gap: 8px; align-content: start; text-decoration: none; color: var(--ink); padding: 6px; border-radius: var(--r2); border: 2px solid transparent; min-width: 0; }
.vc:hover { background: var(--soft); color: var(--ink); }
.vc[aria-current="true"] { background: var(--sun-soft); border-color: var(--sun-line); }
.vc__th { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--soft); }
.vc__th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vc__th img.is-broken { visibility: hidden; }
.vc[aria-current="true"] .vc__th::after { content: "▶"; position: absolute; left: 6px; bottom: 6px; font-size: 11px; line-height: 1; padding: 5px 8px; border-radius: 999px; background: var(--sun); color: var(--on-sun); border: 1.5px solid #2E2A28; }
.vc__b { display: grid; gap: 3px; min-width: 0; }
.vc__t { font-size: 14px; font-weight: 700; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vc__m { font-size: 12px; color: var(--ink2); display: flex; gap: 6px; align-items: center; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vc__m .tone { font-size: 10.5px; padding: 3px 6px; }

/* チャンネルのカード */
.ch { position: relative; display: flex; align-items: center; min-width: 0; background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r2); }
.ch:hover { border-color: var(--edge); }
.ch[aria-current="true"] { border-color: var(--sun-line); background: var(--sun-soft); box-shadow: 0 0 0 1px var(--sun-line); }
.ch__a { position: relative; display: flex; align-items: center; gap: 11px; flex: 1 1 auto; min-width: 0; padding: 9px 4px 9px 11px; text-decoration: none; color: var(--ink); }
.ch__b { display: grid; gap: 4px; min-width: 0; }
.ch__n { font-weight: 700; font-size: 15px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch__m { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink2); min-width: 0; }
/* ことばの印（画面のことばと違うチャンネルにだけ）。語り手の札の隣に置き、幅が足りなくても切れない */
.ch__m > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ch__new { position: absolute; left: 4px; top: 3px; font: 700 10px/1 var(--font); padding: 2.5px 5px; border-radius: 999px; background: var(--mint); color: var(--on-mint); border: 1.5px solid #2E2A28; }
.ch__fav { flex: none; width: 42px; height: 42px; border: 0; background: transparent; font-size: 19px; color: var(--line2); border-radius: 50%; }
.ch__fav:hover { color: var(--sun-line); }
.ch__fav[aria-pressed="true"] { color: var(--sun); -webkit-text-stroke: 1px var(--sun-line); }
.ch.is-dormant .ch__n { color: var(--ink2); }
.picks .ch { border-color: transparent; }
.picks .ch:hover { background: var(--soft); }

/* ── あいさつ・あなたは？（アプリのアイコンのように並ぶ入口。右上の丸い数はチャンネルの数） ── */
.hello__who { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.koishi { flex: none; border: 2px solid var(--edge); background: var(--paper); padding: 0; width: 116px; height: 116px; border-radius: 50%; overflow: hidden; box-shadow: 0 4px 0 var(--edge); }
.koishi img { width: 100%; height: 100%; display: block; animation: bob 3.6s ease-in-out infinite; }   /* 押す的（ボタン）は動かさず、中の絵だけを動かす（LSN-0535） */
.koishi.is-poked img { animation: hop .9s cubic-bezier(.3, .6, .4, 1); }
@keyframes bob { 0%, 100% { transform: translateY(2px) rotate(-2deg); } 50% { transform: translateY(-3px) rotate(2deg); } }
@keyframes hop { 0% { transform: translateY(0) scale(1, 1); } 18% { transform: translateY(6px) scale(1.08, .9); } 42% { transform: translateY(-18px) scale(.95, 1.07) rotate(-6deg); } 66% { transform: translateY(3px) scale(1.05, .94) rotate(4deg); } 84% { transform: translateY(-5px) scale(1, 1); } 100% { transform: translateY(0); } }
.bubble { position: relative; flex: 1 1 auto; min-width: 0; background: var(--card); border: 2px solid var(--edge); border-radius: var(--r); padding: 13px 18px; }
.bubble::before { content: ""; position: absolute; left: -10px; top: 36px; width: 16px; height: 16px; background: var(--card); border-left: 2px solid var(--edge); border-bottom: 2px solid var(--edge); transform: rotate(45deg); }
.bubble h2 { font-size: clamp(19px, 2.3vw, 25px); word-break: auto-phrase; }
.bubble p { margin: 4px 0 0; font-size: 14.5px; color: var(--ink2); }
.stones { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 6px 10px; margin-top: 9px; padding-top: 9px; border-top: 2px dashed var(--line); font-size: 13px; }
.stones__t { font-weight: 700; }
.stones__bars { display: inline-flex; align-items: flex-end; gap: 3px; height: 20px; }
.stones__bars i { width: 7px; border-radius: 3px; border: 1.5px solid var(--edge); background: var(--card); }
.stones__bars i:nth-child(1) { height: 8px; } .stones__bars i:nth-child(2) { height: 12px; } .stones__bars i:nth-child(3) { height: 16px; } .stones__bars i:nth-child(4) { height: 20px; }
.stones__bars i.is-on { background: var(--sun); }
.stones.is-bump .stones__bars { animation: hop .7s; }
.stones__s { color: var(--ink2); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 16px 6px; }
.tile { display: grid; justify-items: center; align-content: start; gap: 7px; padding: 4px 2px; text-decoration: none; color: var(--ink); border-radius: var(--r); }
.tile__i { position: relative; width: 84px; height: 84px; border-radius: 24px; border: 2px solid var(--edge); background: var(--paper); box-shadow: 0 4px 0 var(--edge); transition: transform .12s, box-shadow .12s; }
.tile:nth-child(3n+2) .tile__i { background: #FCE6DF; } .tile:nth-child(3n) .tile__i { background: #E6F0DB; }
.tile__i img { width: 100%; height: 100%; border-radius: 22px; display: block; object-fit: cover; }
.tile__n { position: absolute; right: -9px; top: -9px; min-width: 27px; height: 27px; padding: 0 6px; display: grid; place-items: center; border-radius: 999px; background: var(--sun); color: var(--on-sun); border: 2px solid #2E2A28; font: 800 13px/1 var(--font-d); }
.tile__t { font-weight: 700; font-size: 13px; line-height: 1.35; text-align: center; word-break: auto-phrase; max-width: 9.5em; }
.tile:hover { color: var(--ink); }
.tile:hover .tile__i { transform: translateY(-3px); box-shadow: 0 7px 0 var(--edge); }
.tile:active .tile__i { transform: translateY(3px); box-shadow: 0 1px 0 var(--edge); }
.tile[aria-pressed="true"] .tile__i { outline: 4px solid var(--sun); outline-offset: 2px; }
.more-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 16px 0 0; }
.more-row__t { font-size: 12.5px; font-weight: 700; color: var(--ink3); margin-right: 2px; }
.moods { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 9px; }
.mood { display: flex; align-items: center; gap: 9px; padding: 7px 14px 7px 8px; text-decoration: none; color: var(--ink); background: var(--card); border: 1.5px solid var(--line2); border-radius: 999px; }
.mood img { width: 48px; height: 48px; flex: none; border-radius: 50%; }
.mood__t { font-weight: 700; font-size: 14px; line-height: 1.35; flex: 1 1 auto; min-width: 0; word-break: auto-phrase; }
.mood__n { font: 600 14px/1 var(--font-d); color: var(--ink3); flex: none; white-space: nowrap; }
.mood:hover, .mood[aria-pressed="true"] { border-color: var(--edge); color: var(--ink); }
.mood[aria-pressed="true"] { background: var(--sun-soft); }
/* ことば（題名の語から選ぶ入口） */
.tgroups { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 14px 22px; }
.tgrp { font-size: 12.5px; font-weight: 700; color: var(--ink3); margin: 0 0 7px; }
.tgroup--tab { margin-bottom: 12px; }
.chips--topic .chip { min-height: 36px; padding: 3px 12px; }
.chips--topic .chip::before { content: "#"; font: 800 14px/1 var(--font-d); color: var(--mint-ink); }
.chips--topic .chip[aria-pressed="true"]::before { color: inherit; }

/* ── 選ぶ ── */
.guide { scroll-margin-top: calc(var(--hd) + 16px); }
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 2px solid var(--edge); margin-bottom: 12px; scrollbar-width: none; }
.tabs button { flex: none; border: 2px solid transparent; border-bottom: 0; background: none; padding: 8px 16px; font-weight: 700; font-size: 15px; color: var(--ink2); border-radius: 13px 13px 0 0; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--inv-fg); background: var(--inv-bg); border-color: var(--inv-bg); }
.entry__note { margin: 0 0 10px; font-size: 14px; color: var(--ink2); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 4px 13px 4px 6px; border-radius: 999px; border: 1.5px solid var(--line2); background: var(--card); color: var(--ink); text-decoration: none; font-weight: 700; font-size: 14px; }
.chip img { width: 30px; height: 30px; flex: none; border-radius: 50%; }
.chip .dot { margin: 0 3px 0 8px; }
.chip:hover { border-color: var(--edge); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--inv-bg); border-color: var(--inv-bg); color: var(--inv-fg); }
.chip[aria-pressed="true"] .chip__n { color: var(--inv-fg); opacity: .8; }
.chip[aria-pressed="true"] .dot { box-shadow: 0 0 0 2px var(--inv-fg); }
.chips--foot { margin-top: 28px; }
.chips--foot .chip { padding-left: 14px; }
.shelf { margin-top: 20px; }
.shelf__head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.shelf__head > img { width: 64px; height: 64px; flex: none; border: 2px solid var(--edge); }
.shelf__txt { flex: 1 1 240px; min-width: 0; }
.shelf__txt h3 { font-size: 20px; }
.shelf__txt p { margin: 2px 0 0; font-size: 14px; color: var(--ink2); }
.shelf__n { font-size: 13.5px; color: var(--ink2); font-weight: 700; white-space: nowrap; }
.shelf__tools { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 16px; margin: 0 0 14px; }
.shelf__tools:has(> [hidden] + [hidden]) { display: none; }
.subs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; flex: 1 1 320px; }
.subs__t { font-size: 12.5px; font-weight: 700; color: var(--ink3); margin-right: 4px; }
.sub { border: 1.5px solid var(--line2); background: var(--card); border-radius: 9px; padding: 4px 10px; font-size: 13px; font-weight: 700; color: var(--ink2); }
.sub:hover { border-color: var(--edge); color: var(--ink); }
.sub[aria-pressed="true"] { background: var(--sun); border-color: var(--edge); color: var(--on-sun); }
.sub .chip__n { font-size: 12.5px; }
.sub[aria-pressed="true"] .chip__n { color: var(--on-sun); opacity: .75; }
.sort { display: inline-flex; border: 1.5px solid var(--line2); border-radius: 999px; overflow: hidden; margin-left: auto; flex: none; }
.sort button { border: 0; background: var(--card); padding: 5px 12px; font-size: 12.5px; font-weight: 700; color: var(--ink2); }
.sort button[aria-pressed="true"] { background: var(--inv-bg); color: var(--inv-fg); }
.rail { margin: 0 0 16px; padding: 12px 12px 6px; background: var(--card); border: 2px solid var(--edge); border-radius: var(--r); }
.rail h4 { font-size: 15px; margin: 0 0 6px 4px; display: flex; align-items: center; gap: 7px; }
.rail h4::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--mint); border: 2px solid var(--edge); flex: none; }
.rail__l { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; scrollbar-color: var(--line2) transparent; }
.rail__l > * { flex: 0 0 min(64vw, 228px); scroll-snap-align: start; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 9px; }
.grid .grp { grid-column: 1 / -1; font-size: 15px; color: var(--ink2); margin: 12px 0 0; padding-top: 10px; border-top: 2px dashed var(--line); }
.grid .grp:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.guide__empty { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; padding: 16px; border: 2px dashed var(--line2); border-radius: var(--r); color: var(--ink2); margin: 0; background: var(--card); }
.guide__empty img { width: 96px; height: 96px; flex: none; }

/* ── 語り手の札 ── */
.tones__lead { margin: 0 0 14px; color: var(--ink2); max-width: 62em; font-size: 15px; }
.tones__l { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 10px; }
.tonecard { display: grid; gap: 6px; align-content: start; padding: 13px 16px; background: var(--card); border: 1.5px solid var(--line2); border-left: 7px solid currentColor; border-radius: var(--r2); text-decoration: none; }
.tonecard__h { display: flex; align-items: center; gap: 8px; font-size: 15.5px; }
.tonecard__h b { color: var(--ink); }
.tonecard__d { color: var(--ink2); font-size: 14px; line-height: 1.6; }
.tonecard:hover, .tonecard[aria-pressed="true"] { border-top-color: var(--edge); border-right-color: var(--edge); border-bottom-color: var(--edge); }

/* ── 読みもの ── */
.reads__l { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 12px; list-style: none; padding: 0; margin: 0; }
.read { display: grid; gap: 6px; align-content: start; text-decoration: none; color: var(--ink); background: var(--card); border: 1.5px solid var(--line2); border-radius: var(--r); padding: 10px; }
.read img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; }
.read__t { font-weight: 700; line-height: 1.45; } .read__s { font-size: 13.5px; color: var(--ink2); } .read__d { font-size: 12px; color: var(--ink3); }
.read:hover { border-color: var(--edge); color: var(--ink); }

/* ── コメント（配置だけ。中身の見た目は中央のテーマ） ── */
.talk-tab { position: fixed; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 45; min-height: 46px; padding: 8px 18px; border-radius: 999px; border: 2px solid #2E2A28; background: var(--sun); color: var(--on-sun); font-weight: 700; box-shadow: 0 3px 0 #2E2A28; }
.talk { position: fixed; z-index: 60; right: 0; bottom: 0; left: 0; height: min(78vh, 640px); display: flex; flex-direction: column; background: var(--card); border-top: 2px solid var(--edge); border-radius: var(--r) var(--r) 0 0; }
.talk__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-bottom: 2px solid var(--line); }
.talk__tabs { display: inline-flex; border: 2px solid var(--edge); border-radius: 999px; overflow: hidden; }
.talk__tabs button { border: 0; background: var(--card); padding: 6px 14px; font-weight: 700; font-size: 14px; color: var(--ink2); }
.talk__tabs button[aria-pressed="true"] { background: var(--inv-bg); color: var(--inv-fg); }
.talk__slot { flex: 1 1 auto; overflow: auto; padding: 12px; }

/* ── キーボードの案内・トースト ── */
.keys { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: var(--scrim); padding: 16px; }
.keys__in { background: var(--card); border: 2px solid var(--edge); border-radius: var(--r); padding: 20px 22px; max-width: 420px; width: 100%; box-shadow: 0 5px 0 var(--edge); }
.keys__in h2 { font-size: 20px; }
.keys dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 14px 0 18px; }
.keys dt { font: 600 16px/1.6 var(--font-d); background: var(--soft); border: 1.5px solid var(--line2); border-radius: 8px; padding: 0 9px; justify-self: start; }
.keys dd { margin: 0; color: var(--ink2); }
.toast { position: fixed; left: 50%; bottom: 76px; transform: translateX(-50%); z-index: 90; margin: 0; padding: 9px 18px; border-radius: 999px; background: var(--inv-bg); color: var(--inv-fg); font-weight: 700; font-size: 14px; max-width: calc(100vw - 28px); text-align: center; }

/* ── フッター（どちらの画面でも墨の地） ── */
.ft { background: #2B2422; color: #F5EEE6; }
main + .nami { margin-top: 34px; }
.ft__in { max-width: var(--max); margin: 0 auto; padding: 26px var(--pad) calc(34px + env(safe-area-inset-bottom)); display: grid; gap: 10px; }
.ft__brand { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 15px; }
.ft__brand img { width: 64px; height: 64px; border-radius: 50%; }
.ft__note { margin: 0; font-size: 13.5px; color: #D8CCC1; max-width: 70em; }
.ft__nav { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; font-weight: 700; }
.ft__nav a { text-decoration: none; color: #F5EEE6; }
.ft__nav a:hover { color: #F7C0B6; }
.ft__bottom { margin: 0; font-size: 12.5px; color: #B8AA9D; }

/* ── 文書のページ（全チャンネル・立場ごと・話題ごと・このサイトについて・記事） ── */
.doc { max-width: 960px; padding-top: 22px; }
.doc--about { max-width: 820px; }
.crumb { margin: 0 0 8px; font-size: 14px; }
.doc__head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.doc__head img { flex: none; border: 2px solid var(--edge); }
.doc__head h1 { font-size: clamp(24px, 3.4vw, 32px); line-height: 1.3; }
.doc__head p { margin: 4px 0 0; color: var(--ink2); }
.doc__n { font: 600 15px/1 var(--font-d); color: var(--ink3); margin-left: 6px; }
.doc h2 { font-size: 20px; margin: 34px 0 10px; padding-left: 18px; position: relative; }
.doc h2::before { content: ""; position: absolute; left: 0; top: .2em; width: 9px; height: 1em; border-radius: 5px; background: var(--sun); border: 2px solid var(--edge); }
.doc h2.grp { font-size: 17px; margin-top: 26px; }
.doc h3.tgrp { margin-top: 16px; }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc li { margin: 6px 0; }
.doc__hero { display: block; width: 100%; border-radius: var(--r); border: 2px solid var(--edge); margin: 6px 0 12px; }
.doc__date { color: var(--ink3); font-size: 13px; margin-top: 30px; }
.doc__tones { display: grid; gap: 8px; padding: 0 !important; list-style: none; }
.doc__tones li { display: flex; gap: 10px; align-items: baseline; margin: 0; }
.rows { list-style: none; padding: 0 !important; margin: 0; display: grid; gap: 8px; }
.row { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r2); padding: 11px 13px; margin: 0 !important; scroll-margin-top: calc(var(--hd) + 18px); }
.row:target { border-color: var(--sun-line); background: var(--sun-soft); }
.row__h { display: flex; align-items: center; gap: 11px; }
.row__n { display: block; line-height: 1.4; }
.row__m { display: block; font-size: 12.5px; color: var(--ink2); }
.row__why { margin: 8px 0 4px; font-size: 14px; color: var(--ink2); }
.row__l { margin: 0; font-size: 14px; font-weight: 700; }
.cats { list-style: none; padding: 0 !important; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 10px; }
.cats li { margin: 0; }
.cats a { position: relative; display: grid; grid-template-columns: 64px 1fr; gap: 2px 12px; align-items: center; padding: 12px; background: var(--card); border: 1.5px solid var(--line2); border-radius: var(--r); text-decoration: none; color: var(--ink); height: 100%; }
.cats a img { grid-row: 1 / span 3; }
.cats a span { font-size: 13px; color: var(--ink2); line-height: 1.5; }
.cats a .chip__n { font-size: 14px; }
.cats a:hover { border-color: var(--edge); }
.article { max-width: 760px; }
.article h1 { font-size: clamp(25px, 3.6vw, 34px); margin: 6px 0 12px; }
.article figure { margin: 18px 0; }
.article figure img { width: 100%; border-radius: var(--r); }
.article .yt { position: relative; aspect-ratio: 16 / 9; margin: 18px 0; border-radius: var(--r); overflow: hidden; border: 2px solid var(--edge); }
.article .yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.article blockquote { margin: 16px 0; padding: 10px 16px; border-left: 5px solid var(--sun); background: var(--card); border-radius: 0 var(--r2) var(--r2) 0; }
.pr { font-size: 13px; color: var(--ink2); border: 1.5px solid var(--line2); border-radius: var(--r2); padding: 8px 12px; background: var(--card); }

/* ── 広い画面: 墨の舞台（明るい画面でも、この帯の中は暗い組の色） ── */
@media (min-width: 1040px) {
  .stage { padding: 22px 0 24px; background: var(--stage); box-shadow: 0 0 0 100vmax var(--stage); clip-path: inset(0 -100vmax);
    --bg: #221D1B; --card: #2E2725; --soft: #3A312E; --line: #4A3F3A; --line2: #7D6D62;
  --ink: #F5EEE6; --ink2: #D8CCC1; --ink3: #B8AA9D; --edge: #6A5A50;
  --inv-bg: #F5EEE6; --inv-fg: #221D1B;
  --sun-soft: #4A2E2A; --sun-line: #F2A99E;
  --mint-ink: #B5DBA3; --kelp-soft: #2F3A2C;
  --link: #F5EEE6; --link-h: #F7C0B6; --live: #ff9a8f;
  --tone-q: #7fd8c4; --tone-s: #9cc2f5; --tone-p: #f5a898; --tone-c: #e9c766; --tone-m: #c3ced6; --tone-o: #c9b6f0;
  --stage: #171312; --scrim: rgba(0, 0, 0, .7); --lift: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 18px rgba(0, 0, 0, .28);
    color: var(--ink); }
  .stage__in { grid-template-columns: minmax(0, 1fr) 400px; }
  main > .nami { margin-top: 0; }
  .picks { position: relative; align-self: stretch; padding: 12px 6px 12px 12px; }
  .picks__live, .picks__fallback { position: absolute; inset: 12px 6px 12px 12px; display: flex; flex-direction: column; }
  .js .picks__fallback.is-shown { display: flex; }
  .picks__list { flex: 1 1 auto; flex-direction: column; gap: 4px; overflow: hidden auto; padding: 0 6px 0 0; scroll-snap-type: none; }
  .picks__list > * { flex: none; }
  .picks .vc { grid-template-columns: 150px minmax(0, 1fr); gap: 10px; align-items: start; }
  .picks .vc__t { -webkit-line-clamp: 3; font-size: 13.5px; }
  .talk { left: auto; top: 0; height: auto; width: min(420px, 100vw); border-top: 0; border-left: 2px solid var(--edge); border-radius: 0; }
  .talk-tab { right: 22px; bottom: 22px; }
}
/* ── 狭い画面: プレーヤーを上に貼り付ける（ヘッダーは流す） ── */
@media (max-width: 1039.98px) {
  .hd, .hd + .nami { position: static; }
  .hd__in { flex-wrap: wrap; gap: 8px 10px; padding-top: 6px; padding-bottom: 8px; min-height: 0; }
  .brand__tag { display: none; }
  .search { order: 3; flex: 1 1 100%; max-width: none; margin: 0; }
  .search input { height: 40px; }
  .hd__nav { gap: 4px 11px; font-size: 13.5px; margin-left: auto; }
  /* .stage・.stage__in・.stage__main を「無いもの」にして、プレーヤーを main の直下に置いたのと同じにする。
     こうしないと、貼り付きが .stage の中でしか効かず、一覧まで繰るとプレーヤーが流れていく（姉妹サイトで 2026-11-24 に実測・LSN-0536） */
  .stage, .stage__in, .stage__main { display: contents; }
  .vp { position: sticky; top: 0; z-index: 30; border-radius: 0 0 var(--r2) var(--r2); border-width: 0 0 2px; margin: 0 calc(var(--pad) * -1); width: auto;
    aspect-ratio: auto; height: min(56.25vw, 46vh); }      /* 横向きの電話など背の低い画面では、高さを抑える（中の映像は YouTube が黒帯で合わせる） */
  .now { margin-top: 12px; flex-wrap: wrap; }
  .now__act { flex: 1 1 100%; justify-content: flex-start; }
  .now__msg, .info, .noscript, .picks { margin-top: 12px; }
  .guide { scroll-margin-top: calc(min(56.25vw, 46vh) + 8px); }
  .row { scroll-margin-top: 12px; }
  .sec { margin-top: 34px; }
  .hello__who { align-items: flex-start; }
  .koishi { width: 84px; height: 84px; }
  .bubble::before { top: 26px; }
  /* 入口のアイコンは、電話のホーム画面のように2段で横に送る（縦に積むと、一覧まで遠くなる） */
  .tiles { grid-template-columns: none; grid-auto-flow: column; grid-template-rows: repeat(2, auto); grid-auto-columns: 96px; gap: 14px 2px; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-left: var(--pad);
    padding: 12px var(--pad) 10px; margin: 0 calc(var(--pad) * -1); scrollbar-color: var(--line2) transparent; }
  .tile { scroll-snap-align: start; }
  .tile__i { width: 72px; height: 72px; border-radius: 21px; }
  .tile__i img { border-radius: 19px; }
  .tile__t { font-size: 12px; }
  .moods { display: flex; overflow-x: auto; padding-bottom: 8px; margin: 0 calc(var(--pad) * -1); padding-left: var(--pad); padding-right: var(--pad); scrollbar-color: var(--line2) transparent; }
  .mood { flex: 0 0 auto; }
  .mood__t { white-space: nowrap; }
  .more-row { flex-wrap: nowrap; overflow-x: auto; margin: 10px calc(var(--pad) * -1) 0; padding: 0 var(--pad) 8px; scrollbar-width: none; }
  .more-row > * { flex: none; }
  .info__near { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; margin-right: calc(var(--pad) * -1); scrollbar-width: none; }
  .info__near > * { flex: none; }
  .info__tone > span:last-child { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }   /* 狭い画面では札の説明を2行までにして、注目の新着を上に寄せる */
  /* 入口のピルは2段の横送りにする（13〜18 個を縦に積むと、一覧まで遠くなる）。話題はグループごとに1段 */
  .entry .chips, .topicbar .chips { display: grid; grid-auto-flow: column; grid-template-rows: repeat(2, auto); grid-auto-columns: max-content; overflow-x: auto; padding-bottom: 8px;
    margin: 0 calc(var(--pad) * -1); padding-left: var(--pad); padding-right: var(--pad); scrollbar-color: var(--line2) transparent; }
  .entry .chips--topic, .topicbar .chips { grid-template-rows: auto; }
  .tgroups { gap: 8px; }
  .sort { margin-left: 0; }
  .doc { padding-top: 16px; }
}
@media (max-width: 520px) {
  .brand { gap: 6px; }
  .brand__name { font-size: 20px; }
  .brand__name b { display: none; }                /* 狭い画面では「.com」を省いて、ヘッダーを2段に収める */
  .brand img { width: 36px; height: 36px; }
  .hd__nav { gap: 4px 8px; }
  .hd__nav a { font-size: 12.5px; }
  .hd__about { display: none; }                    /* 狭い画面ではフッターから（ヘッダーを2段に収めて、プレーヤーを上に寄せる） */
  .themesw { width: 30px; height: 30px; }
  .langsw button { padding: 4px 8px; font-size: 12.5px; }
  .now__act .btn { min-height: 38px; padding: 4px 11px; font-size: 13px; }
  .shelf__head > img { width: 52px; height: 52px; }
  .doc__head img { width: 60px; height: 60px; }
  .tabs button { padding: 8px 11px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}


/* ════ Ren-i の仕上げ（上の決まりを上書きする） ════ */
body { font: 400 16px/1.8 var(--font); }
h1, h2, h3, h4, .brand__name, .bubble h2, .tile__t, .mood__t, .ask__q { font-family: var(--font-d); font-weight: 700; letter-spacing: .01em; }
html[data-size="l"] body { zoom: 1.15; }
/* 波の線: 区切りは、入り江のさざ波 */
.nami { height: 12px; opacity: .8; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='12' viewBox='0 0 48 12'%3E%3Cpath d='M0 7c6 0 6-4 12-4s6 4 12 4 6-4 12-4 6 4 12 4' fill='none' stroke='%23BFB2A3' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") 0 0 / 48px 12px repeat-x; }
main > .nami { margin-top: 30px; }
.hd { border-bottom: 0; box-shadow: var(--lift); }
.hd + .nami { display: none; }
.brand img { border-radius: var(--peb); border-color: var(--line); }
.brand__name b { color: var(--sun-line); font-weight: 500; }
.brand__tag { background: var(--sun-soft); color: var(--ink); border: 1.5px solid var(--sun); }
.sizesw { flex: none; width: 34px; height: 34px; padding: 0; border-radius: 50%; border: 2px solid var(--edge); background: var(--card); display: grid; place-items: center; font: 700 15px/1 var(--font); color: var(--ink); }
.sizesw[aria-pressed="true"] { background: var(--sun); color: var(--on-sun); border-color: var(--sun-line); }
.sizesw[aria-pressed="true"] span { font-size: 18px; }
/* 見出しの印: 小石（コーラル）に、こんぶの若葉 */
.sec__head h2 { padding-left: 27px; }
.sec__head h2::before { top: .34em; width: 17px; height: 13px; border-radius: var(--peb); border: 0; background: var(--sun); transform: rotate(-10deg); box-shadow: 7px -6px 0 -4px var(--mint); }
.doc h2::before { top: .34em; width: 14px; height: 11px; border-radius: var(--peb); border: 0; background: var(--sun); transform: rotate(-10deg); }
.sec__note { margin: 0; font-size: 13px; color: var(--ink3); }
/* 影は薄くぼかす。押すところだけ、少し沈む */
.picks, .bubble, .keys__in, .shelf, .ask { box-shadow: var(--lift); }
.btn { border-radius: 999px; box-shadow: 0 2px 0 var(--edge); }
.btn:active { box-shadow: 0 0 0 var(--edge); }
.btn--icon { border-radius: 50%; }
.btn--omakase { background: var(--kelp-soft); border-color: var(--mint); }
.btn--omakase:hover { background: var(--mint); color: var(--on-mint); }
.koishi { box-shadow: var(--lift); border-color: var(--card); background: var(--sun-soft); border-radius: var(--peb); }
.bubble { border-color: var(--line); }
.bubble::before { border-color: var(--line); }
.btn--soft { background: var(--soft); border-color: var(--line2); }
.btn--soft img { border-radius: 50%; background: var(--paper); }
.btn--s { min-height: 32px; padding: 2px 12px; font-size: 13px; }
.bubble__act { margin-top: 10px !important; }
/* 時間帯の案内 */
.hour { margin: 9px 0 0 !important; }
.hour__a { display: inline-flex; align-items: center; gap: 8px; padding: 4px 16px 4px 6px; border-radius: 999px; background: var(--sun-soft); border: 1.5px solid var(--sun); color: var(--ink); font-weight: 700; font-size: 14px; text-decoration: none; }
.hour__a img { border-radius: 50%; background: var(--paper); }
.hour__a:hover { background: var(--sun); color: var(--on-sun); }
/* きょうの小石: 小石が4つ並ぶ */
.stones { align-items: center; border-top: 2px dotted var(--line2); }
.stones__bars { align-items: center; height: auto; gap: 5px; }
.stones__bars i, .stones__bars i:nth-child(1), .stones__bars i:nth-child(2), .stones__bars i:nth-child(3), .stones__bars i:nth-child(4) { width: 18px; height: 14px; border-radius: var(--peb); border: 1.5px solid var(--line2); background: var(--card); }
.stones__bars i:nth-child(2n) { transform: rotate(14deg); } .stones__bars i:nth-child(3) { transform: rotate(-9deg); }
.stones__bars i.is-on { background: var(--sun); border-color: var(--sun-line); }
/* あいさつの段: 左に こいし と吹き出し、右に きょうの問い */
.hello__top { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-bottom: 26px; align-items: stretch; }
.hello__who { margin-bottom: 0; }
.ask { background: var(--card); border: 2px dashed var(--sun); border-radius: var(--r); padding: 14px 18px 12px; display: grid; gap: 9px; align-content: start; min-width: 0; }
.ask__k { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin: 0; font-size: 13px; color: var(--ink3); }
.ask__k img { width: 46px; height: 46px; flex: none; border-radius: var(--peb); background: var(--paper); }
.ask__k b { font: 700 15px/1.3 var(--font-d); color: var(--ink); }
.ask__q { margin: 0; font-size: clamp(17px, 2vw, 21px); line-height: 1.5; word-break: auto-phrase; }
.ask__btns { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.ask__btns button { min-height: 50px; padding: 7px 10px; border: 2px solid var(--edge); background: var(--soft); color: var(--ink); font-weight: 700; font-size: 14.5px; line-height: 1.4; border-radius: 26px 30px 28px 24px / 28px 24px 30px 26px; word-break: auto-phrase; transition: transform .1s; }
.ask__btns button:nth-child(2) { border-radius: 30px 24px 26px 28px / 24px 30px 26px 28px; }
.ask__btns button:hover { border-color: var(--sun-line); }
.ask__btns button:active { transform: translateY(2px); }
.ask__btns button[aria-pressed="true"] { background: var(--sun); border-color: var(--sun-line); color: var(--on-sun); }
.ask__after { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; }
.ask__after p { margin: 0; font-size: 14.5px; font-weight: 700; color: var(--ink); }
.ask__note { margin: 0; font-size: 12.5px; color: var(--ink3); }
/* いまの自分に近いところ: 場所のまとまりごとの札。中は、小石の形の絵と名前の行 */
.sec__head--who { margin-top: 4px; }
.wgroups { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); gap: 12px; }
.wgroup { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r); padding: 12px 12px 8px; box-shadow: var(--lift); min-width: 0; }
.wgroup__h { font-size: 14.5px; color: var(--ink2); margin: 0 0 6px 4px; padding-bottom: 7px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='8' viewBox='0 0 48 8'%3E%3Cpath d='M0 5c6 0 6-3 12-3s6 3 12 3 6-3 12-3 6 3 12 3' fill='none' stroke='%23F2A99E' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") 0 100% / 48px 8px repeat-x; }
.wgroup .tiles { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; overflow: visible; padding: 0; margin: 0; }
.wgroup .tile { grid-template-columns: 58px minmax(0, 1fr); justify-items: start; align-items: center; gap: 12px; padding: 7px 8px 7px 6px; border-radius: var(--r2); }
.wgroup .tile:hover { background: var(--soft); }
.wgroup .tile__i { width: 56px; height: 56px; border-radius: var(--peb); border: 2px solid var(--line2); box-shadow: none; background: var(--paper); }
.wgroup .tile:nth-child(2n) .tile__i { border-radius: 54% 46% 48% 52% / 48% 55% 45% 52%; background: #FCE6DF; }
.wgroup .tile:nth-child(3n) .tile__i { border-radius: 50% 50% 44% 56% / 56% 46% 54% 44%; background: #E6F0DB; }
.wgroup .tile__i img { border-radius: inherit; }
.wgroup .tile__n { right: -8px; top: -7px; min-width: 24px; height: 24px; font-size: 12px; border-width: 1.5px; }
.wgroup .tile__t { text-align: left; max-width: none; font-size: 14px; line-height: 1.45; }
.wgroup .tile:hover .tile__i { transform: rotate(-4deg); box-shadow: none; }
.wgroup .tile:active .tile__i { transform: scale(.95); box-shadow: none; }
.wgroup .tile[aria-pressed="true"] { background: var(--sun-soft); }
.wgroup .tile[aria-pressed="true"] .tile__i { outline: 3px solid var(--sun); outline-offset: 2px; }
/* 結婚のあとを、先にのぞく */
.peek__in { display: flex; align-items: center; gap: 18px; background: var(--kelp-soft); border: 1.5px solid var(--mint); border-radius: var(--r); padding: 16px 20px; }
.peek__art { flex: none; width: 112px; height: 112px; border-radius: var(--peb); background: var(--paper); }
.peek__b { min-width: 0; }
.peek__b h2 { font-size: clamp(19px, 2.2vw, 24px); }
.peek__b p { margin: 5px 0 11px; font-size: 14.5px; color: var(--ink2); max-width: 54em; }
/* 道案内の一行（姉妹サイトへ）。チャンネルの並びとは混ぜない */
.shelf__guide { margin: 4px 0 2px !important; padding: 5px 12px; display: inline-block; border-radius: var(--r2); background: var(--soft); border: 1.5px dashed var(--line2); font-size: 13.5px !important; color: var(--ink2); }
.shelf__guide a { font-weight: 700; }
/* テーマのまとまり */
.themes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); gap: 14px; }
.theme { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--r); padding: 14px 16px 16px; box-shadow: var(--lift); }
.theme__h { display: flex; align-items: center; gap: 10px; font-size: 17.5px; margin: 0 0 11px; }
.theme__h img { flex: none; border-radius: var(--peb); background: var(--paper); }
.chips--theme { display: flex; flex-wrap: wrap; gap: 7px; }
.chips--theme .chip { min-height: 38px; padding: 3px 13px; }
/* 入口のタブ: 小石が並ぶ。開いている入口は、コーラルで少し大きい */
.tabs { border: 0; gap: 7px; align-items: center; padding: 6px 2px 10px; margin-bottom: 6px; }
.tabs button { border: 2px solid var(--line2); border-radius: 24px 28px 26px 22px / 26px 22px 28px 24px; background: var(--card); color: var(--ink2); padding: 8px 17px; font: 700 15px/1.4 var(--font-d); transition: transform .15s; }
.tabs button:nth-child(2n) { border-radius: 28px 22px 24px 26px / 22px 28px 24px 26px; }
.tabs button:hover { color: var(--ink); border-color: var(--edge); }
.tabs button[aria-selected="true"] { background: var(--sun); color: var(--on-sun); border-color: var(--sun-line); transform: scale(1.05); }
.entry__note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.shelf__head > img, .doc__head img, .cats a img { border-radius: var(--peb); border-color: var(--line2); }
.mood img, .chip img { border-radius: var(--peb); }
/* 語り手の札 */
.tones__lead--note { font-size: 13.5px; color: var(--ink3); margin-top: 6px; }
.doc__tones--full li { display: block; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.doc__hero { border: 0; box-shadow: var(--lift); }
/* フッターの断り書き */
.ft__note--care { background: #4A2E2A; color: #F5EEE6; border-radius: var(--r2); padding: 9px 14px; display: inline-block; }
.ft__brand img { border-radius: var(--peb); }
/* ひと息つく */
.breath { position: fixed; inset: 0; z-index: 85; display: grid; place-items: center; background: var(--scrim); padding: 16px; }
.breath__in { background: var(--card); border-radius: 26px; padding: 22px 24px 20px; max-width: 380px; width: 100%; text-align: center; box-shadow: var(--lift); }
.breath__in h2 { font-size: 20px; }
.breath__ring { width: 196px; height: 196px; margin: 14px auto 10px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle, var(--sun-soft) 0 52%, var(--kelp-soft) 53% 100%); transform: scale(.76); transition: transform 6s ease-in-out; }
.breath__ring img { border-radius: 50%; }
.breath__ring[data-phase="in"] { transform: scale(1); transition-duration: 4s; }
.breath__say { font: 700 20px/1.5 var(--font-d); min-height: 1.6em; margin: 0; }
.breath__note { font-size: 13px; color: var(--ink2); margin: 8px 0 14px; }
@media (prefers-reduced-motion: reduce) { .breath__ring { transition: none; transform: none; } .koishi img { animation: none; } }
@media (min-width: 1040px) {
  .hello__top:has(.ask) { grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr); }
}
@media (max-width: 1039.98px) {
  /* 狭い画面: 場所のまとまりの札を、横へ送る（縦に積むと、テーマや一覧まで遠くなる）。札の右端が少し見えて、続きがあると分かる幅にする */
  .wgroups { display: flex; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-left: var(--pad); gap: 10px; margin: 0 calc(var(--pad) * -1); padding: 4px var(--pad) 12px; scrollbar-color: var(--line2) transparent; }
  .wgroup { flex: 0 0 min(80vw, 320px); scroll-snap-align: start; }
  .wgroup .tiles { grid-template-rows: none; grid-auto-flow: row; grid-auto-columns: auto; }
  .wgroup .tile__i { width: 52px; height: 52px; }
  .wgroup .tile { grid-template-columns: 54px minmax(0, 1fr); }
  .wgroup .tile__t { font-size: 13.5px; }
  .peek__in { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px 16px; }
  .peek__art { width: 84px; height: 84px; }
  .peek .chips { display: flex; flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 8px; scrollbar-width: none; }
  .peek .chips > * { flex: none; }
  .peek__b { max-width: 100%; }
}
@media (max-width: 860px) {
  .sizesw { width: 30px; height: 30px; }
  .tabs button { padding: 7px 13px; font-size: 14.5px; }
  .themes { gap: 10px; }
}
/* 狭い画面: ヘッダーを2段（1段目 = 名前と切り替え、2段目 = 検索）に収めて、プレーヤーを上に寄せる */
@media (max-width: 480px) {
  .brand img { width: 32px; height: 32px; }
  .brand__name { font-size: 18px; }
  .hd__nav { gap: 4px 6px; }
  .sizesw, .themesw { width: 28px; height: 28px; }
  .sizesw { font-size: 13px; }
  .langsw button { padding: 4px 6px; font-size: 12px; }
  /* ヘッダーを2段に収める: 1段目 = 名前と切り替え3つ／2段目 = 検索とリンク。
     nav を「無いもの」にして、リンクだけ検索の右へ回す（英語の「All channels」は幅があり、nav のままだと3段になってプレーヤーが下がる） */
  .hd__nav { display: contents; }
  .hd__nav > a { order: 4; align-self: center; white-space: nowrap; font-size: 12.5px; }
  .hd__nav > .sizesw { margin-left: auto; }
  .search { flex: 1 1 50%; min-width: 0; }
  /* 検索の無いページ（一覧・about）: リンクを1段目に入れる（入らない幅では2段目へ回る） */
  .hd__in:not(:has(.search)) { column-gap: 6px; }
  .hd__in:not(:has(.search)) .hd__nav > a { order: 0; margin-left: auto; font-size: 12px; }
  .hd__in:not(:has(.search)) .hd__nav > .sizesw { margin-left: 0; }
  .ask__btns button { font-size: 14px; }
}
@media (max-width: 379.98px) {
  /* 360px 幅では1段に入らない。リンクはフッターにある（テーマ別の一覧にはパンくずにも）ので、ここでは省く */
  .hd__in:not(:has(.search)) .hd__nav > a { display: none; }
  .hd__in:not(:has(.search)) .hd__nav > .sizesw { margin-left: auto; }
}
/* 狭い画面の再生中カード: 題名が長くても、アイコンの横に名前と題名を置く。
   flex-basis が auto だと、折り返さない題名の幅で1行に入らず、アイコンの下へ落ちる（本物の題名でだけ出る。作りものの短い題名では出ない） */
@media (max-width: 1039.98px) { .now__txt { flex: 1 1 0; } }
/* 吹き出しの中のボタンは、吹き出しより広がらない（英語の長い文言が 360px ではみ出さないように） */
.hello__who > * { min-width: 0; }
.bubble__act .btn { max-width: 100%; white-space: normal; text-align: left; }

/* ── コメントのドロワー: 中は、明るい画面でも暗い画面でも「生成りの紙」（中央のテーマ ren-i/v1 が、明るい紙の色で作られているため。中央の .cmt-* は上書きしない）。
   タブは3つ（このテーマ・きょうの問い・サイト全体）。テーマ名が長いときは、先頭のタブだけを縮めて、3つとも見えるようにする ── */
.talk__slot { background: #FFFDF9; color: #2E2A28; color-scheme: light; }
.talk__tabs { max-width: calc(100% - 58px); overflow-x: auto; scrollbar-width: none; }
.talk__tabs::-webkit-scrollbar { display: none; }
.talk__tabs button { white-space: nowrap; flex: 0 0 auto; padding: 6px 11px; font-size: 13px; }
.talk__tabs button:first-child { flex: 0 1 auto; min-width: 4.5em; max-width: 12em; overflow: hidden; text-overflow: ellipsis; }

/* 「いまの自分」のまとまり: 広い画面では3列（6つのまとまりが2段にそろう。4列だと下の段に空きが出る） */
@media (min-width: 1000px) { .wgroups { grid-template-columns: repeat(3, minmax(0, 1fr)); } }


/* 読みもの（動画を引用する記事）の部品 — methods/youtube_blog/templates/article_snippets.html の形。2026-12-03 足した */
.article .video-pick { margin: 20px 0; }
.article .video-frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r2); overflow: hidden; border: 2px solid var(--edge); background: var(--stage); }
.article .video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.article .video-pick figcaption { margin-top: 8px; font-size: 14px; line-height: 1.7; color: var(--ink2); }
.article .video-link { font-size: 15px; color: var(--ink2); }
.article blockquote.yt-quote p { margin: 0 0 6px; }
.article .yt-quote .yt-src { font-size: 13px; color: var(--ink3); margin: 0; }
.article q.yt-quote { quotes: "「" "」"; }
.article .yt-sources { margin-top: 36px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 15px; }
.article .yt-sources li { margin: 6px 0; }
.article .yt-sources p { font-size: 13px; color: var(--ink3); }

/* 図解ブロック（class="yt-fig"）— methods/youtube_blog/templates/yt-fig.css をそのまま写し、色だけ下でサイトの変数に合わせる */
/* 図解ブロック(class="yt-fig")の見た目。FIGURES.md §5。部品の形は templates/figure_snippets.html。
   - サイトの CSS に 1 回だけ入れる(生成器のあるサイトはサイトの CSS へ。手書きのサイトは記事の <style> へ)。
   - 色はこの 8 つの変数だけで決まる。サイトの色に合わせるときは、サイトの CSS で .yt-fig の --fig-* を上書きする。
     ここの値そのものは書き換えない(tools/figure_shot.py が、この既定の値で 390px と 1440px の見え方を確かめてある)。
   - クラス名と data- 属性は tools/figure_check.py と tools/figure_shot.py が見ているので変えない。
   - JS なし・外部の画像やフォントなし。文字はすべて本物の文字(画像にしない)。 */
.yt-fig {
  --fig-ink: #2a2621;        /* 文字 */
  --fig-ink-2: #5c554a;      /* 注記・出所 */
  --fig-line: #d9d3c7;       /* 罫線・枠 */
  --fig-surface: #ffffff;    /* 図の地 */
  --fig-wash: #f2eee6;       /* 薄い面(棒の溝・見出しの行) */
  --fig-mute: #a29a8c;       /* 目立たせない棒 */
  --fig-accent: #4a6b2a;     /* 目立たせる 1 つ */
  --fig-accent-wash: #eaf0df;
  margin: 2em 0; padding: 16px; box-sizing: border-box; max-width: 100%;
  border: 1px solid var(--fig-line); border-radius: 10px;
  background: var(--fig-surface); color: var(--fig-ink);
  font-size: 14px; line-height: 1.6; overflow-wrap: anywhere;
}
.yt-fig *, .yt-fig *::before, .yt-fig *::after { box-sizing: border-box; }
.yt-fig .fig-title { display: block; margin: 0 0 12px; font-size: 16px; font-weight: 700; line-height: 1.5; color: var(--fig-ink); }
.yt-fig .fig-body { margin: 0; padding: 0; }
.yt-fig .fig-note, .yt-fig .fig-src { margin: 10px 0 0; font-size: 12px; line-height: 1.6; color: var(--fig-ink-2); }
.yt-fig .fig-src { margin-top: 4px; }
figure.yt-fig p, figure.yt-fig li { font-size: inherit; line-height: inherit; }   /* サイトの「.read p」などに負けないよう figure を付けてある */
.yt-fig ul, .yt-fig ol { list-style: none; margin: 0; padding: 0; }
.yt-fig b { font-weight: 700; }
.yt-fig .fig-tag { display: block; margin-bottom: 4px; font-size: 12px; font-weight: 700; color: var(--fig-ink-2); }
.yt-fig [data-em] > .fig-tag { color: var(--fig-accent); }

/* 1. meter — 数量・割合を比べる。棒は 0 から。長さ = --v ÷ --max(既定 100) */
.yt-fig .fig-meter { display: grid; gap: 10px; }
.yt-fig .fig-meter .fig-row { display: grid; grid-template-columns: minmax(0, 11em) minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; }
.yt-fig .fig-meter .fig-name { min-width: 0; }
.yt-fig .fig-meter .fig-name small { display: block; font-size: 12px; font-weight: 400; color: var(--fig-ink-2); }   /* 分母・時点など、行ごとに違う条件 */
.yt-fig .fig-meter .fig-bar { display: block; min-width: 0; height: 14px; background: var(--fig-wash); border-radius: 0 4px 4px 0; }
.yt-fig .fig-meter .fig-bar i { display: block; height: 100%; width: calc(var(--v) / var(--max, 100) * 100%); max-width: 100%;
  background: var(--fig-mute); border-radius: 0 4px 4px 0; }
.yt-fig .fig-meter .fig-row[data-em] .fig-bar i { background: var(--fig-accent); }
.yt-fig .fig-meter .fig-row[data-em] .fig-name { font-weight: 700; }
.yt-fig .fig-meter .fig-val { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; text-align: right; min-width: 3.5em; }

/* 2. compare / matrix — 表。列は見出しの列を入れて 4 つまで(390px で読める幅)。横スクロールさせない */
.yt-fig table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: inherit; }
.yt-fig th, .yt-fig td { padding: 8px; border-top: 1px solid var(--fig-line); text-align: left; vertical-align: top; font-weight: 400; }
.yt-fig thead th { border-top: 0; background: var(--fig-wash); font-size: 12px; font-weight: 700; color: var(--fig-ink-2); }
.yt-fig tbody th { font-weight: 700; width: 26%; }
.yt-fig td[data-em], .yt-fig th[data-em] { background: var(--fig-accent-wash); }
.yt-fig .fig-matrix td { border: 1px solid var(--fig-line); }
.yt-fig .fig-matrix thead th, .yt-fig .fig-matrix tbody th { text-align: center; vertical-align: middle; background: var(--fig-wash); font-size: 12px; color: var(--fig-ink-2); border: 1px solid var(--fig-line); }

/* 3. steps / timeline — 順番。番号(steps)か、時点(timeline) */
.yt-fig .fig-steps { counter-reset: figstep; display: grid; gap: 0; }
.yt-fig .fig-steps > li { counter-increment: figstep; position: relative; padding: 0 0 14px 40px; min-height: 28px; }
.yt-fig .fig-steps > li:last-child { padding-bottom: 0; }
.yt-fig .fig-steps > li::before { content: counter(figstep); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%;
  background: var(--fig-accent); color: #fff; font-size: 13px; font-weight: 700; line-height: 26px; text-align: center; font-variant-numeric: tabular-nums; }
.yt-fig .fig-steps > li::after { content: ""; position: absolute; left: 12px; top: 28px; bottom: 2px; width: 2px; background: var(--fig-line); }
.yt-fig .fig-steps > li:last-child::after { display: none; }
.yt-fig .fig-steps b, .yt-fig .fig-steps time { display: block; }
.yt-fig .fig-steps time { font-size: 12px; font-weight: 700; color: var(--fig-ink-2); font-variant-numeric: tabular-nums; }
.yt-fig .fig-steps.fig-timeline > li { padding-left: 28px; }
.yt-fig .fig-steps.fig-timeline > li::before { content: ""; left: 3px; top: 5px; width: 12px; height: 12px; }
.yt-fig .fig-steps.fig-timeline > li::after { left: 8px; top: 19px; }

/* 4. scope — 範囲。中にあるもの(実線・色つき)と、外にあるもの(点線・地のまま) */
/* 5. pair — 対。2 つを並べる(読みがちな読み方と実際・前と後・言い分と資料) */
.yt-fig .fig-scope, .yt-fig .fig-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.yt-fig .fig-in, .yt-fig .fig-out, .yt-fig .fig-side { min-width: 0; padding: 12px; border-radius: 8px; }
.yt-fig .fig-in { border: 2px solid var(--fig-accent); background: var(--fig-accent-wash); }
.yt-fig .fig-in > .fig-tag { color: var(--fig-accent); }
.yt-fig .fig-out { border: 2px dashed var(--fig-mute); }
.yt-fig .fig-scope li { position: relative; padding-left: 1.1em; }
.yt-fig .fig-scope li::before { content: "・"; position: absolute; left: 0; }
.yt-fig .fig-side { border: 1px solid var(--fig-line); background: var(--fig-wash); }
.yt-fig .fig-side[data-em] { border: 2px solid var(--fig-accent); background: var(--fig-accent-wash); }
.yt-fig .fig-side p { margin: 0; }
.yt-fig .fig-pair[data-arrow] { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; }
.yt-fig .fig-pair .fig-arrow { font-size: 18px; color: var(--fig-ink-2); line-height: 1; }
.yt-fig .fig-pair .fig-arrow::before { content: "→"; }

/* 6. flow — つながり。矢印は「だから・すると・次に」が台帳にある所だけ(FIGURES.md §4)。fan は 1 つから複数へ */
.yt-fig .fig-flow { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px 0; }
.yt-fig .fig-flow > li { display: flex; align-items: center; min-width: 0; }
.yt-fig .fig-node { display: block; min-width: 0; padding: 8px 12px; border: 1px solid var(--fig-line); border-radius: 8px; background: var(--fig-wash); }
.yt-fig .fig-node[data-em] { border: 2px solid var(--fig-accent); background: var(--fig-accent-wash); font-weight: 700; }
.yt-fig .fig-flow > li + li::before { content: "→"; padding: 0 8px; color: var(--fig-ink-2); font-size: 16px; line-height: 1; }
.yt-fig .fig-fan { display: grid; grid-template-columns: minmax(0, auto) auto minmax(0, 1fr); align-items: center; gap: 12px; }
.yt-fig .fig-fan > .fig-arrow::before { content: "→"; font-size: 18px; color: var(--fig-ink-2); }
.yt-fig .fig-fan > ul { display: grid; gap: 8px; }

/* 7. formula — 式。何を何で割った数か、のように数え方を見せる */
.yt-fig .fig-formula { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.yt-fig .fig-term { display: block; min-width: 0; padding: 8px 12px; border-radius: 8px; background: var(--fig-wash); font-weight: 700; text-align: center; }
.yt-fig .fig-term[data-em] { background: var(--fig-accent-wash); border: 2px solid var(--fig-accent); }
.yt-fig .fig-term small { display: block; font-size: 12px; font-weight: 400; color: var(--fig-ink-2); }
.yt-fig .fig-op { font-size: 18px; font-weight: 700; color: var(--fig-ink-2); }
.yt-fig .fig-opgroup { display: flex; align-items: center; gap: 8px; min-width: 0; }   /* 記号と次の項を離さない */

/* 8. number — 1 つの数字。数字の横に、何を数えた数かを必ず書く */
.yt-fig .fig-number { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 16px; }
.yt-fig .fig-big { font-size: 44px; font-weight: 700; line-height: 1.1; color: var(--fig-accent); white-space: nowrap; }
.yt-fig .fig-big small { font-size: 20px; }
.yt-fig .fig-what { min-width: 0; }

/* 9. svg — 上の部品で描けない形だけ。文字は <text>、色は currentColor と変数 */
.yt-fig svg { display: block; width: 100%; height: auto; max-width: 400px; margin: 0 auto; color: var(--fig-ink); }   /* viewBox の幅は 360 前後に。広げると文字まで大きくなる */
.yt-fig svg text { font-family: inherit; fill: currentColor; }

@media (max-width: 520px) {
  .yt-fig { padding: 12px; }
  .yt-fig .fig-meter .fig-row { grid-template-columns: minmax(0, 1fr) auto; }
  .yt-fig .fig-meter .fig-name { grid-column: 1 / -1; }
  .yt-fig .fig-scope, .yt-fig .fig-pair, .yt-fig .fig-pair[data-arrow], .yt-fig .fig-fan { grid-template-columns: minmax(0, 1fr); }
  .yt-fig .fig-pair .fig-arrow, .yt-fig .fig-fan > .fig-arrow { text-align: center; }
  .yt-fig .fig-pair .fig-arrow::before, .yt-fig .fig-fan > .fig-arrow::before { content: "↓"; }
  .yt-fig .fig-flow { flex-direction: column; gap: 0; }
  .yt-fig .fig-flow > li { flex-direction: column; align-items: stretch; }
  .yt-fig .fig-flow > li + li::before { content: "↓"; padding: 4px 0; text-align: center; }
  .yt-fig .fig-number { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .yt-fig th, .yt-fig td { padding: 6px; }
  .yt-fig tbody th { width: 24%; }
}

.yt-fig { --fig-ink: var(--ink); --fig-ink-2: var(--ink2); --fig-line: var(--line); --fig-surface: var(--card); --fig-wash: var(--soft);
  --fig-mute: var(--line2); --fig-accent: var(--sun-line); --fig-accent-wash: var(--sun-soft); border-radius: var(--r2); }
.yt-fig .fig-meter .fig-val { min-width: 4.5em; }   /* 札の幅をそろえ、行ごとの棒の溝の長さを同じにする(390px で溝の長さが行ごとに違って見えたため・2026-12-03) */
