/* Yuna Lab. — 夜桜（reference/brand-kit/colors/tokens.json）
   印象に残す場所は1つだけ：トップのヒーローと「取引の粒」。ほかは静かに。 */
:root {
  color-scheme: dark;
  --brand: #F6ACCD;
  --accent: #B7A5FB;
  --bg: #101019;
  --panel: #191925;
  --panel-2: #20202f;
  --line: #2c2b3d;
  --text: #F4F1FA;
  --text-2: #c9c3d8;
  --muted: #a39cb6;
  --win: #74DFCE;
  --loss: #FF9BAA;
  --pending: #F4CB81;
  --on-brand: #14111C;
  --brand-hover: #f9c3db;
  --paper: #ffffff;
  --font: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --num: "Inter", Arial, sans-serif;
  --wrap: 1120px;
  --r-lg: 20px;
  --r: 12px;
  --r-sm: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--brand); }
::selection { background: var(--accent); color: var(--on-accent, #14111C); }
html { scrollbar-color: var(--line) var(--bg); accent-color: var(--brand); caret-color: var(--brand); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.35; font-weight: 700; letter-spacing: .01em; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem); margin: 0 0 .5em; }
h2 { font-size: clamp(1.25rem, 1.1rem + .6vw, 1.375rem); margin: 2.5rem 0 1rem; }
h3 { font-size: 1.125rem; margin: 2rem 0 .75rem; }
small { font-size: .8125rem; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .wrap { padding: 0 32px; } }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.nowrap { white-space: nowrap; }
.num { font-family: var(--num); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; overflow-wrap: normal; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--panel); color: var(--text); border: 2px solid var(--brand); padding: 8px 16px; border-radius: var(--r-sm); z-index: 10; }
.skip:focus { left: 8px; }
.id { font-family: var(--num); font-size: .8125rem; color: var(--accent); margin-right: .75em; font-weight: 700; }

/* ヘッダー */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 5; }
.header-row { display: flex; align-items: center; justify-content: space-between; min-height: 60px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-family: var(--num); font-weight: 700; font-size: 1.125rem; }
.nav-desktop { display: none; gap: 28px; }
.nav-desktop a { color: var(--text-2); text-decoration: none; font-size: .9375rem; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav-desktop a:hover { color: var(--text); }
.nav-desktop a[aria-current="page"] { color: var(--text); border-bottom-color: var(--brand); }
.nav-mobile summary { list-style: none; cursor: pointer; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: .875rem; }
.nav-mobile summary::-webkit-details-marker { display: none; }
.nav-mobile[open] summary { border-color: var(--accent); }
.nav-mobile nav { position: absolute; right: 16px; left: 16px; top: 64px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; display: grid; }
.nav-mobile nav a { color: var(--text); text-decoration: none; padding: 10px 8px; border-radius: var(--r-sm); }
.nav-mobile nav a:hover { background: var(--panel-2); }
.nav-sub { margin: 8px 8px 0; font-size: .8125rem; color: var(--muted); }
@media (min-width: 900px) {
  .nav-desktop { display: flex; }
  .nav-mobile { display: none; }
}

/* ヒーロー：左にコピー、右にユナ（スマホは人物が上） */
.hero { padding: 32px 0 16px; }
.hero-grid { display: grid; gap: 24px; }
.hero-art { margin: 0; order: -1; }
.hero-art img { border-radius: var(--r-lg); aspect-ratio: 1 / 1; object-fit: cover; object-position: 68% 50%; width: 100%; }
.hero h1 { font-size: clamp(2.25rem, 1.4rem + 3.6vw, 3.5rem); font-weight: 900; line-height: 1.25; letter-spacing: 0; margin-bottom: .4em; }
.hero-sub { color: var(--text-2); max-width: 32em; font-size: 1.0625rem; }
.hero-quote, .yuna-quote {
  margin: 24px 0;
  padding: 14px 18px;
  border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--line));
  background: linear-gradient(transparent calc(1.8em - 1px), var(--line) calc(1.8em - 1px)) 0 14px / 100% 1.8em, var(--panel);
  border-radius: var(--r);
  max-width: 34em;
}
.hero-quote small, .yuna-quote small { display: block; color: var(--muted); margin-top: 4px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (min-width: 900px) {
  .hero { padding: 56px 0 24px; }
  .hero-grid { grid-template-columns: 1.05fr .95fr; align-items: center; gap: 48px; }
  .hero-art { order: 0; }
}

.btn, .btn-ghost { display: inline-flex; align-items: center; min-height: 48px; padding: 0 22px; border-radius: 999px; font-weight: 700; text-decoration: none; }
.btn { background: var(--brand); color: var(--on-brand); }
.btn:hover { background: var(--brand-hover); color: var(--on-brand); }
.btn-ghost { color: var(--text); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--text); }

/* セクション */
.section { padding: 24px 16px 40px; }
@media (min-width: 768px) { .section { padding: 32px 32px 56px; } }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.section-head h2 { margin-bottom: .5rem; }
.sub-h { margin-top: 2rem; }
.lead { color: var(--text-2); max-width: 40em; font-size: 1.0625rem; }

.totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin: 8px 0 16px; }
.totals p { margin: 0; background: var(--panel); border-radius: var(--r); padding: 16px 18px; color: var(--text-2); font-size: .875rem; }
.totals .big { display: block; font-family: var(--num); font-variant-numeric: tabular-nums; font-size: 1.875rem; font-weight: 700; color: var(--text); line-height: 1.2; }
.totals small { display: block; color: var(--muted); }
.callout { background: color-mix(in srgb, var(--pending) 10%, var(--panel)); border: 1px solid color-mix(in srgb, var(--pending) 35%, var(--line)); padding: 12px 16px 12px 44px; border-radius: var(--r); max-width: 46em; position: relative; }
.callout::before { content: ""; position: absolute; left: 16px; top: 18px; width: 14px; height: 14px; border: 2.5px solid var(--pending); border-radius: 50%; }
.explain { background: var(--panel); border-radius: var(--r); padding: 4px 18px; max-width: 46em; }
.empty { background: var(--panel); border: 1px dashed var(--line); border-radius: var(--r); padding: 20px; }
.empty p { margin: 0 0 4px; }

/* 表 */
/* position: relative で、中の読み上げ用の文字（.sr）がページの外へはみ出さないようにする */
.table-scroll { overflow-x: auto; border-radius: var(--r); background: var(--panel); position: relative; padding: 4px 8px; }
table { border-collapse: collapse; width: 100%; font-size: .9375rem; }
caption { text-align: left; padding: 12px 16px 4px; color: var(--muted); font-size: .8125rem; }
th, td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { text-align: right; color: var(--muted); font-weight: 400; font-size: .8125rem; white-space: nowrap; }
thead th:first-child, .trades thead th:nth-child(2), .trades thead th:nth-child(3), .trades thead th:last-child { text-align: left; }
tbody th { text-align: left; font-weight: 400; min-width: 14em; }
tbody tr:last-child > * { border-bottom: 0; }
.strat-name { color: var(--text-2); min-width: 14em; }
.pos { color: var(--win); }
.neg { color: var(--loss); }
.be, .note-small { display: block; font-family: var(--font); font-size: .75rem; }
.be-up { color: var(--win); }
.be-down { color: var(--loss); }
.note-small { color: var(--pending); }

/* 結果の印：丸＝勝ち、ひし形＝負け、輪＝結果待ち */
.mark { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.mark svg { flex: none; }
.mark-win svg { fill: var(--win); }
.mark-loss svg { fill: var(--loss); }
.mark-tie svg { fill: var(--muted); }
.mark-pending svg { fill: none; stroke: var(--pending); stroke-width: 2.5; }

/* 取引の粒（このサイトで一番目立たせる要素） */
.beads { list-style: none; padding: 16px; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; background: var(--panel); border-radius: var(--r); }
.beads li { display: flex; }
.bead { display: block; width: 16px; height: 16px; flex: none; }
a.bead:hover { outline: 2px solid var(--text-2); outline-offset: 2px; }
.bead-win { background: var(--win); border-radius: 50%; }
.bead-loss { background: var(--loss); transform: rotate(45deg) scale(.82); border-radius: 2px; }
.bead-tie { background: var(--muted); border-radius: 3px; height: 6px; margin-top: 5px; }
.bead-pending { border: 2.5px solid var(--pending); border-radius: 50%; }
.beads-legend { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: .875rem; margin: 10px 0 0; }

/* テーマ */
.themes { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.themes a, .themes .soon { display: block; height: 100%; padding: 16px 18px; border-radius: var(--r); background: var(--panel); text-decoration: none; color: var(--text); border: 1px solid var(--line); }
.themes a:hover { background: var(--panel-2); border-color: var(--accent); color: var(--text); }
.themes .soon { opacity: .6; border-style: dashed; }
.t-label { display: block; font-weight: 700; }
.t-desc { display: block; color: var(--muted); font-size: .875rem; }

.article-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.article-list a { display: block; padding: 14px 4px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--text); }
.article-list a:hover .a-title { color: var(--brand); }
.a-theme { display: block; font-size: .8125rem; color: var(--accent); }
.a-title { font-weight: 400; }
.theme-block h2 small { display: block; font-weight: 400; color: var(--muted); font-size: .875rem; }

/* 戦略ノート：ノートの余白線 */
.notes { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.note { background: var(--panel); border-radius: var(--r); padding: 4px 20px 12px; border: 1px solid var(--line); }
.note h2 { font-size: 1.0625rem; margin: 16px 0 8px; }
.note dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 24px; margin: 0; }
.note dt { color: var(--muted); font-size: .8125rem; }
.note dd { margin: 0; font-family: var(--num); font-variant-numeric: tabular-nums; }

/* 記事 */
.prose-wrap { padding-top: 24px; padding-bottom: 48px; }
.prose { max-width: 40em; }
.prose table { background: var(--panel); border-radius: var(--r); overflow: hidden; display: block; overflow-x: auto; }
.prose td, .prose th { text-align: left; }
.prose li { margin: .25em 0; }
.crumbs { font-size: .8125rem; color: var(--muted); margin-bottom: 16px; }
.crumbs a { color: var(--muted); }
.article-head { max-width: 40em; margin-bottom: 24px; }
.theme-tag { color: var(--accent); font-size: .875rem; margin: 0 0 4px; }
.byline { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .875rem; }
.byline img { border-radius: 50%; }
.draft-note { border: 1px dashed var(--pending); color: var(--pending); padding: 8px 14px; border-radius: var(--r-sm); font-size: .875rem; }
.ad { white-space: nowrap; }
.ad-label { font-size: .75rem; border: 1px solid var(--muted); color: var(--text-2); padding: 0 6px; border-radius: 4px; margin-right: 4px; }

/* 漫画：画像を縦に並べ、セリフはHTMLの文字で重ねる（位置は％なので幅が変わってもずれない） */
.manga-wrap { padding-top: 24px; padding-bottom: 48px; max-width: 760px; }
.manga { display: grid; gap: 12px; margin: 20px 0 32px; }
/* ブログ用の縦型漫画は1ページ＝縦長2:3の1枚絵（manga/workflow.md 4-3）。コマの枠を2:3にそろえ、2:3の絵は切らずに出す。
   ほかの比率の絵を使うコマは、フロントマターの ratio（例 "1 / 1"）で枠を合わせ、見せたい所を pos（例 "72% 50%"）で寄せる。
   セリフの％位置はコマ（＝絵）の大きさが基準なので、比率が変わってもずれない。
   PCでは1ページが画面の高さに収まる幅に抑える（ヘッダーの分を引く）。 */
.panel { position: relative; margin: 0 auto; width: 100%; max-width: max(320px, calc((100svh - 96px) * 2 / 3)); border-radius: var(--r-sm); overflow: hidden; background: var(--panel); container-type: inline-size; }
.panel img, .ph { width: 100%; height: auto; aspect-ratio: var(--ratio, 2 / 3); }
.panel img { object-fit: cover; object-position: var(--pos, 50% 50%); }
/* 作画待ちの枠：0件の表示（.empty）と同じ破線の枠 */
.ph { display: grid; place-items: center; padding: 24px; text-align: center; color: var(--muted); font-size: .875rem;
  background: var(--panel); border: 1px dashed var(--line); border-radius: var(--r-sm); }
.ph span { background: var(--bg); padding: 6px 12px; border-radius: var(--r-sm); max-width: 70%; }
.bubble {
  position: absolute; left: var(--x); top: var(--y); width: var(--w);
  margin: 0; padding: .6em .9em; background: var(--paper); color: var(--on-brand);
  border-radius: 1.2em; font-weight: 700; line-height: 1.5;
  font-size: clamp(12px, 3.6cqi, 22px);
  box-shadow: 0 0 0 2px var(--on-brand);
}
.next { background: var(--panel); border-radius: var(--r); padding: 4px 20px 20px; }

/* フッター（免責は全ページ共通） */
.site-footer { border-top: 1px solid var(--line); margin-top: 24px; padding: 32px 0 48px; color: var(--text-2); font-size: .875rem; }
.disclaimer { padding-left: 1.2em; max-width: 46em; margin: 0 0 16px; }
.disclaimer li { margin: .3em 0; }
.footer-links a { color: var(--text-2); }
.copy { color: var(--muted); font-family: var(--num); }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }

/* 更新時刻と、更新が止まったときの表示 */
.updated { margin: 0 0 12px; }
.stale-on { color: var(--pending); }
.stale-on .stale { color: var(--pending); }

/* 現実のデモ記録（漫画・記事の共通の枠） */
.demo-record { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 18px; margin: 24px 0; max-width: 40em; }
.dr-title { font-weight: 700; margin: 0 0 8px; }
.demo-record dl { display: grid; gap: 4px 16px; grid-template-columns: max-content minmax(0, 1fr); margin: 0; font-size: .9375rem; }
.demo-record dl div { display: contents; }
.demo-record dt { color: var(--muted); }
.demo-record dd { margin: 0; text-align: left; }
/* 狭い画面では期間などの数字も折り返す（320pxで横にはみ出していた） */
.demo-record dd.num { white-space: normal; overflow-wrap: anywhere; }
.demo-record .small { margin: 8px 0 0; color: var(--text-2); }
.manga-link { background: var(--panel-2); border-radius: var(--r-sm); padding: 8px 14px; font-size: .875rem; max-width: 40em; }

/* 404 */
.notfound { min-height: 50vh; }
.nf-code { margin: 0; font-size: clamp(3rem, 2rem + 4vw, 5rem); font-weight: 400; line-height: 1; color: var(--muted); text-align: left; }
.nf-links { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 12px; }

/* 取引の一覧の絞り込み（結果・ペア・戦略） */
.filters { display: grid; gap: 10px; margin: 0 0 12px; }
.filter-group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filter-label { color: var(--muted); font-size: .8125rem; min-width: 3em; }
.chip { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--text-2); font: inherit; font-size: .875rem; line-height: 1.4; text-align: left; cursor: pointer; }
.chip:hover { border-color: var(--accent); color: var(--text); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-brand); font-weight: 700; }
.chip[aria-pressed="true"] .mark svg { stroke: var(--on-brand); stroke-width: 1.5; }
.filter-status { margin: 0; color: var(--text-2); min-height: 1.6em; }
button.btn-ghost { background: transparent; font: inherit; font-weight: 700; cursor: pointer; }
/* 取引の粒から移動してきた行 */
.trades tbody tr:target > * { background: color-mix(in srgb, var(--accent) 16%, var(--panel)); }
.trades tbody tr:target { outline: 2px solid var(--accent); outline-offset: -2px; }

/* 連勝・連敗の並び：方眼ノートに印を積む。6段＋回数の行。列が多いときは表だけ横にスクロール */
.road-summary { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0 0 8px; color: var(--text-2); font-size: .9375rem; }
.road-summary strong { color: var(--text); font-size: 1.125rem; }
.road-summary strong.pos { color: var(--win); }
.road-summary strong.neg { color: var(--loss); }
.road-scroll { position: relative; overflow-x: auto; background: var(--panel); border-radius: var(--r); padding: 16px; width: fit-content; max-width: 100%; }
.road {
  --cell: 24px;
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(var(--cols), var(--cell)); grid-template-rows: repeat(6, var(--cell)) auto;
  width: max-content;
}
/* 方眼は6段の部分だけ */
.road::before {
  content: ""; grid-column: 1 / -1; grid-row: 1 / 7;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: var(--cell) var(--cell);
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.road-streak { display: contents; }
.road-cell { place-self: center; position: relative; z-index: 1; }
/* 6回を超えて右へ折り返した印を、前の印と線でつなぐ */
.road-join { align-self: center; justify-self: start; width: var(--cell); height: 2px; transform: translateX(-50%); }
.road-join-win { background: var(--win); }
.road-join-loss { background: var(--loss); }
.road-n { grid-row: 7; justify-self: center; padding-top: 6px; font-size: .75rem; line-height: 1.2; color: var(--muted); text-align: center; }
.yuna-quote { margin-top: 16px; }

/* 累積損益の推移：線はSVG、目盛りの文字はHTMLで重ねる */
.eq { margin: 0; background: var(--panel); border-radius: var(--r); padding: 16px 16px 12px; overflow: hidden; }
.eq-chart { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 10px; }
.eq-y { position: relative; min-width: 4.2em; height: 220px; }
.eq-y span { position: absolute; right: 0; transform: translateY(-50%); font-size: .75rem; line-height: 1; color: var(--muted); white-space: nowrap; }
.eq-y .eq-y-zero { color: var(--text-2); }
.eq-plot { position: relative; height: 220px; margin-bottom: 26px; }
.eq-plot svg { display: block; width: 100%; height: 100%; overflow: visible; }
.eq-grid { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.eq-zero { stroke: var(--text-2); stroke-width: 1.5; stroke-dasharray: 6 4; vector-effect: non-scaling-stroke; }
.eq-line { fill: none; stroke: var(--brand); stroke-width: 2.5; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.eq-dot { position: absolute; right: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); transform: translate(50%, -50%); box-shadow: 0 0 0 3px var(--panel); }
.eq-x { position: absolute; left: 0; right: 0; top: 100%; height: 22px; }
.eq-x span { position: absolute; top: 6px; font-size: .75rem; color: var(--muted); white-space: nowrap; border-left: 1px solid var(--line); padding-left: 4px; line-height: 1.2; }
.eq-x .eq-x-end { transform: translateX(-100%); border-left: 0; border-right: 1px solid var(--line); padding: 0 4px 0 0; }
.eq figcaption { margin-top: 4px; }
@media (min-width: 768px) { .eq-y, .eq-plot { height: 280px; } }

/* 今週の戦績 */
.week thead th:nth-child(n+2) { text-align: right; }
.week .mark { justify-content: flex-end; }
.week tbody th, .week tfoot th { min-width: 6em; }
.week tfoot > * { border-top: 1px solid var(--line); font-weight: 700; }
.week-today > * { background: color-mix(in srgb, var(--accent) 8%, var(--panel)); }
.today-tag { margin-left: 6px; font-size: .6875rem; color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 0 6px; }
.week-bar-h, .week-bar { width: 30%; min-width: 80px; }
.wb { display: flex; height: 10px; width: var(--w); margin-top: 8px; border-radius: 999px; overflow: hidden; background: var(--loss); }
.wb-win { width: var(--wr); background: var(--win); }
.open-table thead th, .open-table td:first-child { text-align: left; }
.week tfoot th { text-align: left; }

/* 売買の向き（判定が終わった取引だけ）：三角の形と文字。結果の色は使わない */
.side { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; font-family: var(--num); font-size: .8125rem; font-weight: 700; color: var(--text); }
.side svg { fill: var(--text-2); flex: none; }

/* 判定が終わった取引のチャート */
.sc { margin: 0 0 16px; background: var(--panel); border-radius: var(--r); padding: 12px; }
.sc-chart { position: relative; height: 320px; }
@media (min-width: 768px) { .sc-chart { height: 420px; } }
.sc-overlay { position: absolute; left: 0; top: 0; z-index: 3; overflow: hidden; pointer-events: none; }
.sc-m { position: absolute; left: 0; top: 0; pointer-events: auto; }
.sc-m[hidden] { display: none; }
.sc-entry { width: 14px; height: 12px; background: var(--text); }
.sc-high { clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.sc-low { clip-path: polygon(0 0, 100% 0, 50% 100%); }
.sc-m.bead { width: 12px; height: 12px; box-shadow: 0 0 0 2px var(--panel); }
/* 位置の指定に transform を使うので、ひし形は回転ではなく切り抜きで作る */
.sc-m.bead-loss { width: 14px; height: 14px; border-radius: 0; clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); box-shadow: none; }
.sc-m:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; clip-path: none; }
.sc .beads-legend { margin: 8px 0 4px; }
.settled thead th:nth-child(2), .settled thead th:nth-child(3), .settled thead th:nth-child(6) { text-align: left; }
.settled tbody tr:target { outline: 2px solid var(--accent); outline-offset: -2px; }

/* ── トップ：漫画の表紙（バナー）。PCは右にユナ・中央にAI端末の横長一枚絵、左の暗い余白に見出し。スマホは絵が上、文字が下 ── */
.cover { padding: 20px 0 8px; }
.cover-card { position: relative; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--bg); }
.cover-art { margin: 0; position: relative; aspect-ratio: 5 / 4; overflow: hidden; }
/* 絵と動きの層を同じ箱（元絵 1672×941 の比率）に入れ、右寄せで切る。スマホは左の暗い帯だけが切れる */
.cover-stage { position: absolute; top: 0; right: 0; height: 100%; aspect-ratio: 1672 / 941; animation: cover-drift 28s ease-in-out infinite alternate; transform-origin: 62% 55%; }
.cover-stage picture { display: block; height: 100%; }
.cover-art img { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.cover-fx { position: absolute; inset: 0; pointer-events: none; }
.cover-fx > span { position: absolute; display: block; }
/* モニター：画面をなでる光（1回だけ流れて、しばらく休む） */
.fx-scan { left: 34.4%; top: 21.6%; width: 17.6%; height: 38%; clip-path: polygon(0 0, 92% 22%, 100% 98%, 4% 100%); overflow: hidden; }
.fx-scan::before { content: ""; position: absolute; inset: -10% auto -10% -40%; width: 30%; background: linear-gradient(90deg, transparent, rgba(150, 230, 255, .16), transparent); transform: skewX(-12deg); animation: scan 9s ease-in-out 1.2s infinite; }
/* モニター：いちばん新しいローソク足の先が脈打つ */
.fx-tick { left: 49.76%; top: 35.6%; width: .62%; aspect-ratio: 1; translate: -50% -50%; }
.fx-tick i, .fx-tick::after { position: absolute; inset: 0; border-radius: 50%; background: #7CF2E0; }
.fx-tick::after { content: ""; opacity: .6; animation: ping 2.4s ease-out infinite; }
/* デスクライトと東京タワーの灯り */
.fx-lamp { left: 44.6%; top: 22.8%; width: 22%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 196, 150, .22), transparent); mix-blend-mode: screen; animation: lamp 6s ease-in-out infinite; }
.fx-beacon { left: 70.3%; top: 2.6%; width: 1.4%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; background: radial-gradient(closest-side, #ff5a6e, rgba(255, 90, 110, 0)); animation: beacon 2s steps(1, end) infinite; }
/* AI端末のまばたき（目の上にまぶたの色をかぶせる） */
.fx-lid { top: 57.3%; height: 3.1%; width: 1.4%; background: #121628; border-radius: 2px; transform: scaleY(0); transform-origin: 50% 0; animation: blink 5.5s ease-in-out 2s infinite; }
.fx-lid-l { left: 50.75%; }
.fx-lid-r { left: 53.3%; }
@keyframes cover-drift { from { transform: scale(1); } to { transform: scale(1.035) translateX(-.6%); } }
@keyframes scan { 0% { translate: 0 0; } 35%, 100% { translate: 520% 0; } }
@keyframes ping { 0% { transform: scale(1); opacity: .6; } 80%, 100% { transform: scale(3.2); opacity: 0; } }
@keyframes lamp { 0%, 100% { opacity: .75; } 50% { opacity: 1; } }
@keyframes beacon { 0%, 55% { opacity: 1; } 56%, 100% { opacity: .15; } }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(0); } 95%, 97% { transform: scaleY(1); } }
/* 見出しは読み込み時に一度だけ、行ごとに浮かび上がる */
.cover h1 .nb { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
.cover h1 .nb:nth-child(2) { animation-delay: .12s; }
.cover h1 .nb:nth-child(3) { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; translate: 0 .4em; } to { opacity: 1; translate: 0 0; } }
.cover-live { margin: 0 0 12px; font-size: .8125rem; color: var(--text-2); }
.cover-live-at { margin-left: .75em; color: var(--muted); white-space: nowrap; }
.live-dot { display: inline-block; vertical-align: .05em; margin-right: 8px; width: 8px; height: 8px; border-radius: 50%; background: #7CF2E0; box-shadow: 0 0 0 0 rgba(124, 242, 224, .6); animation: live 2.4s ease-out infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(124, 242, 224, .55); } 70%, 100% { box-shadow: 0 0 0 8px rgba(124, 242, 224, 0); } }
.cover-copy { padding: 20px 20px 24px; }
.cover h1 { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.75rem); font-weight: 900; line-height: 1.3; letter-spacing: 0; margin: 0 0 .5em; }
.cover h1 .nb { display: inline-block; }
.cover-lead { color: var(--text-2); margin: 0 0 20px; max-width: 30em; }
.cover-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.cover-status { margin: 12px 0 0; font-size: .875rem; color: var(--text-2); }
@media (min-width: 900px) {
  .cover { padding: 32px 0 16px; }
  .cover-card { min-height: 480px; display: flex; align-items: center; }
  /* 絵はカードの高さに合わせて右に寄せる（顔・ピン・AI端末が切れない幅）。左端だけ、夜の色へなじませる */
  .cover-art { position: absolute; inset: 0; aspect-ratio: auto; }
  .cover-art::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 34%; background: linear-gradient(90deg, var(--bg), transparent); z-index: 1; }
  .cover-copy { position: relative; z-index: 2; width: min(44%, 440px); padding: 48px 0 48px 48px; }
  .cover-lead { font-size: 1.0625rem; }
}

/* 今週の検証：記録から選んだ問いと、裏付けの数字ひと組 */
.spot { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; max-width: 46em; }
.spot-q { font-size: clamp(1.25rem, 1.05rem + 1vw, 1.625rem); font-weight: 700; line-height: 1.5; margin: 0 0 8px; }
.spot-target { margin: 0 0 16px; color: var(--text-2); font-size: .9375rem; }
.spot-nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px 24px; margin: 0 0 16px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.spot-nums dt { color: var(--muted); font-size: .8125rem; }
.spot-nums dd { margin: 0; }
.spot-nums dd.num { text-align: left; font-size: 1.5rem; font-weight: 700; line-height: 1.3; }
.spot-sub { color: var(--muted); font-size: .8125rem; }
.spot-a { margin: 0 0 12px; }

/* 漫画の続きを記事で読む／記録を見る */
.reads, .doors { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
@media (min-width: 768px) { .reads, .doors { grid-template-columns: 1fr 1fr; } }
.reads a, .doors a { display: block; height: 100%; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); color: var(--text); text-decoration: none; }
.reads a:hover, .doors a:hover { border-color: var(--accent); background: var(--panel-2); color: var(--text); }
.read-kind { display: inline-block; font-size: .75rem; color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 0 8px; margin-bottom: 6px; }
.read-title, .door-title { display: block; font-weight: 700; line-height: 1.5; }
.read-lead, .door-desc { display: block; color: var(--muted); font-size: .875rem; margin-top: 4px; }

/* 戦略の版の表記（名前の横に小さく）と「新しい戦略」の印（文字で示す） */
.ver { font-family: var(--num); font-size: .75rem; font-weight: 400; color: var(--muted); white-space: nowrap; }
.new-tag { display: inline-block; font-size: .6875rem; font-weight: 700; line-height: 1.6; color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 0 8px; white-space: nowrap; vertical-align: .15em; }
.note-desc { margin: 0 0 10px; color: var(--text-2); font-size: .9375rem; }
.note-pair { margin: -4px 0 10px; color: var(--text-2); }
.fiction-note { margin: 8px 0 0; color: var(--muted); font-size: .8125rem; }
.sc figcaption, .eq figcaption { max-width: 46em; }
.sc-chart[hidden] { display: none; }
.sc-none { margin: 0; }
.byline { flex-wrap: wrap; row-gap: 2px; } .byline > span:not(.id) { flex: 1 1 12em; min-width: 0; } .byline .id { white-space: nowrap; margin-left: 46px; flex-basis: 100%; } .byline a { white-space: nowrap; }
@media (min-width: 640px) { .byline > span:not(.id) { flex: 0 1 auto; } .byline .id { margin-left: 0; flex-basis: auto; } }

/* ユナの紹介ページ */
.yuna-page { max-width: 860px; }
.yuna-hero h1 { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.5rem); font-weight: 900; margin: 0 0 .4em; }
.yuna-lead { color: var(--text-2); font-size: 1.0625rem; margin: 0 0 24px; }
.koma { margin: 0 0 20px; }
.koma img { display: block; width: 100%; height: auto; border: 4px solid #0B0B10; border-radius: 4px; background: #fff; }
.yuna-sec, .yuna-profile { margin: 40px 0 0; }
.yuna-sec h2, .yuna-profile h2 { font-size: 1.375rem; margin: 0 0 14px; }
.profile-list { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.profile-list > div { display: grid; grid-template-columns: 9em 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.profile-list dt { color: var(--muted); }
.profile-list dd { margin: 0; }
.yuna-do { padding-left: 1.2em; }
.yuna-do li { margin: .5em 0; }
.yuna-next { display: flex; flex-wrap: wrap; gap: 12px; margin: 40px 0 24px; }
@media (max-width: 560px) { .profile-list > div { grid-template-columns: 1fr; gap: 2px; } }

/* Xへの導線 */
.follow-x { display: flex; align-items: center; gap: 16px; margin: 20px 0 8px; padding: 16px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.follow-x img { width: 56px; height: 56px; border-radius: 50%; flex: none; }
.follow-x-lead { margin: 0 0 8px; font-size: .9375rem; }

/* 全ページ上部の注意書き・記事の注記・PR表示 */
.notice-bar { background: #2A1F12; border-bottom: 1px solid #5C4626; color: #F3E3C3; font-size: .8125rem; line-height: 1.6; }
.notice-bar .wrap { padding-top: 8px; padding-bottom: 8px; }
.notice-bar p { margin: 0; }
.notice-bar a { color: #FFD88A; }
.notice-bar .notice-sub { color: #D8C6A3; }
.article-notice { font-size: .8125rem; color: var(--muted); border-left: 3px solid var(--line); padding: 6px 12px; margin: 0 0 20px; }
.pr-badge { margin: 0 0 12px; padding: 10px 14px; border: 2px solid #FFD88A; border-radius: var(--r-sm); background: #2A1F12; color: #F3E3C3; font-size: .875rem; }
.pr-badge strong { display: inline-block; margin-right: 8px; padding: 1px 8px; border-radius: 4px; background: #FFD88A; color: #1A1208; letter-spacing: .05em; }
.footer-jp-note { font-size: .8125rem; color: var(--text-2); margin: 0 0 10px; }

/* 縦読みの漫画（写植済みのコマを縦に並べる） */
.manga-intro { color: var(--text-2); margin: 0 0 12px; }
.manga-strip { max-width: 720px; margin: 20px auto 0; display: grid; gap: 28px; }
.strip-panel { margin: 0; }
.strip-panel img { display: block; width: 100%; height: auto; border-radius: 6px; }
.strip-divider { text-align: center; color: var(--muted); font-size: .8125rem; letter-spacing: .1em; margin: 12px 0 0; }
.ep-cta { display: flex; gap: 16px; align-items: center; max-width: 720px; margin: 32px auto 0; padding: 18px 20px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.ep-cta img { width: 64px; height: 64px; border-radius: 50%; flex: none; }
.ep-cta-lead { margin: 0 0 12px; font-weight: 700; }
.ep-cta .btn, .ep-cta .btn-ghost { margin: 0 8px 8px 0; }
