/* AIに引き継ぐ10日間 — 見た目 v2
   色と大きさ：shadcn/ui（apps/v4/app/globals.css・new-york-v4 の部品）
   読み物の3列・手順・前後のカード：Fumadocs ／ 点の地・光る文字・光る縁：Magic UI ／ 知らせ：Sonner ／ 検索の窓：cmdk（shadcn の Command） */

@view-transition { navigation: auto; }
@property --beam { syntax: "<angle>"; initial-value: 0deg; inherits: false; }

:root {
  --radius: .625rem;
  --background: oklch(1 0 0);
  --foreground: oklch(.145 0 0);
  --card: oklch(1 0 0);
  --primary: oklch(.205 0 0);
  --primary-foreground: oklch(.985 0 0);
  --secondary: oklch(.97 0 0);
  --muted: oklch(.97 0 0);
  --muted-foreground: oklch(.556 0 0);
  --accent: oklch(.97 0 0);
  --border: oklch(.922 0 0);
  --input: oklch(.922 0 0);
  --ring: oklch(.708 0 0);
  --surface: oklch(.985 0 0);
  --code: oklch(.985 0 0);
  --destructive: oklch(.577 .245 27.325);
  --brand: oklch(.546 .245 262.881);          /* Tailwind blue-600 */
  --brand-2: oklch(.558 .288 302.321);        /* purple-600（光る帯の終わり） */
  --brand-fg: oklch(.488 .243 264.376);       /* blue-700 */
  --brand-soft: oklch(.97 .014 254.604);      /* blue-50 */
  --brand-line: oklch(.882 .059 254.128);     /* blue-200 */
  --ph-bg: oklch(.962 .059 95.617);           /* amber-100 */
  --ph-fg: oklch(.473 .137 46.201);           /* amber-800 */
  --ok: oklch(.596 .145 163.225);             /* emerald-600 */
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / .05);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);
  --shadow-bento: 0 0 0 1px rgba(0,0,0,.03), 0 2px 4px rgba(0,0,0,.05), 0 12px 24px rgba(0,0,0,.05);
  --shadow-lg: 0 24px 64px -16px rgb(0 0 0 / .16), 0 0 0 1px rgb(0 0 0 / .04);
  --font: "Geist", "Noto Sans JP", "Hiragino Sans", "Yu Gothic UI", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --header: 56px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}
.dark {
  --background: oklch(.145 0 0);
  --foreground: oklch(.985 0 0);
  --card: oklch(.205 0 0);
  --primary: oklch(.922 0 0);
  --primary-foreground: oklch(.205 0 0);
  --secondary: oklch(.269 0 0);
  --muted: oklch(.269 0 0);
  --muted-foreground: oklch(.708 0 0);
  --accent: oklch(.269 0 0);
  --border: oklch(1 0 0 / 10%);
  --input: oklch(1 0 0 / 15%);
  --ring: oklch(.556 0 0);
  --surface: oklch(.18 0 0);
  --code: oklch(.18 0 0);
  --destructive: oklch(.704 .191 22.216);
  --brand: oklch(.623 .214 259.815);          /* blue-500 */
  --brand-2: oklch(.627 .265 303.9);          /* purple-500 */
  --brand-fg: oklch(.809 .105 251.813);       /* blue-300 */
  --brand-soft: oklch(.282 .091 267.935 / .55);
  --brand-line: oklch(.424 .199 265.638 / .6);
  --ph-bg: oklch(.414 .112 45.904 / .45);
  --ph-fg: oklch(.879 .169 91.605);
  --ok: oklch(.765 .177 163.223);
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / .3);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / .4);
  --shadow-bento: 0 -20px 80px -20px #ffffff1f inset, 0 0 0 1px rgba(255,255,255,.1);
  --shadow-lg: 0 24px 64px -16px rgb(0 0 0 / .7), 0 0 0 1px rgb(255 255 255 / .08);
  color-scheme: dark;
}

/* ── 土台 */
*, *::before, *::after { box-sizing: border-box; border-color: var(--border); }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header) + 24px); }
body {
  margin: 0; min-height: 100dvh; background: var(--background); color: var(--foreground);
  font: 400 15px/1.75 var(--font); letter-spacing: .01em;
  -webkit-font-smoothing: antialiased; font-synthesis-weight: none; text-rendering: optimizeLegibility;
  word-break: auto-phrase; line-break: strict; overflow-wrap: anywhere;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ol, ul, dl, dd, figure, blockquote, pre { margin: 0; }
ol, ul { padding: 0; list-style: none; }
h1, h2, h3, .h2-xl, .hero-title { text-wrap: balance; font-feature-settings: "palt"; }
::selection { background: var(--foreground); color: var(--background); }
:focus-visible { outline: 2px solid color-mix(in oklab, var(--ring) 70%, transparent); outline-offset: 2px; border-radius: 6px; }
.i { width: 16px; height: 16px; flex: none; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 100; background: var(--primary); color: var(--primary-foreground); padding: 8px 14px; border-radius: 8px; }
.skip:focus { top: 12px; }
.muted { color: var(--muted-foreground); font-weight: 400; font-size: 13px; }
em { font-style: normal; }
kbd { font: 500 11px/1 var(--mono); display: inline-flex; align-items: center; justify-content: center; gap: 2px; min-width: 20px; height: 20px; padding: 0 5px; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 5px; background: var(--background); color: var(--muted-foreground); }
kbd .i { width: 11px; height: 11px; }
.container { width: min(100% - 32px, 1160px); margin-inline: auto; }
.narrow { width: min(100% - 32px, 820px); }
.br-sp { display: none; }
@media (max-width: 640px) { .br-sp { display: inline; } .br-pc { display: none; } }

/* ── ボタン（shadcn/ui button） */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 16px; border-radius: calc(var(--radius) * .8); border: 1px solid transparent; font: 500 14px/1 var(--font); letter-spacing: .01em; white-space: nowrap; cursor: pointer; color: inherit; background: none; transition: background .15s, color .15s, border-color .15s, box-shadow .15s, transform .15s var(--ease); position: relative; }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--primary); color: var(--primary-foreground); box-shadow: var(--shadow-xs); }
.btn-primary:hover { background: color-mix(in oklab, var(--primary) 90%, transparent); }
.btn-outline { background: var(--background); border-color: var(--border); box-shadow: var(--shadow-xs); }
.dark .btn-outline { background: color-mix(in oklab, var(--input) 30%, transparent); border-color: var(--input); }
.btn-outline:hover { background: var(--accent); }
.btn-ghost:hover { background: var(--accent); }
.btn-sm { height: 32px; padding: 0 12px; gap: 6px; font-size: 13px; }
.btn-xs { height: 26px; padding: 0 8px; gap: 4px; font-size: 12px; border-radius: 6px; }
.btn-xs .i { width: 13px; height: 13px; }
.btn-lg { height: 44px; padding: 0 22px; font-size: 15px; border-radius: var(--radius); }
.btn-icon { width: 36px; padding: 0; }
.btn-line { background: #06c755; color: #fff; }
.btn-line:hover { background: #05b84e; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-row.end { justify-content: flex-end; }
.btn .i:last-child:not(:first-child) { transition: transform .2s var(--ease); }
.btn-primary:hover .i:last-child:not(:first-child) { transform: translateX(2px); }
.btn.is-done { background: var(--brand); color: #fff; }
.reset { color: var(--muted-foreground); margin-top: 28px; }
.reset:hover { color: var(--destructive); background: none; }

/* 光る縁（Magic UI の BorderBeam を CSS の回る光で） */
.beam { isolation: isolate; }
.beam::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1.5px; background: conic-gradient(from var(--beam), transparent 0 70%, var(--brand) 80%, var(--brand-2) 88%, transparent 96%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: beam 4s linear infinite; pointer-events: none; }
@keyframes beam { to { --beam: 360deg; } }

/* バッジ（shadcn/ui badge） */
.badge { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 6px; border: 1px solid var(--border); font: 500 12px/1 var(--font); color: var(--muted-foreground); white-space: nowrap; background: var(--background); }
.badge-num { font-family: var(--mono); color: var(--foreground); }

/* ── ヘッダー */
.site-hd { position: sticky; top: 0; z-index: 50; height: var(--header); background: color-mix(in oklab, var(--background) 80%, transparent); backdrop-filter: blur(12px) saturate(1.5); -webkit-backdrop-filter: blur(12px) saturate(1.5); border-bottom: 1px solid var(--border); }
.hd-in { height: 100%; width: min(100% - 32px, 1440px); margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; letter-spacing: 0; white-space: nowrap; }
.logo b { font-weight: 600; color: var(--muted-foreground); margin-left: 2px; }
.logo-mark { width: 24px; height: 24px; color: var(--foreground); }
.hd-r { display: flex; align-items: center; gap: 4px; }
.search-btn { display: inline-flex; align-items: center; gap: 8px; height: 32px; width: 240px; padding: 0 6px 0 10px; border: 1px solid var(--border); border-radius: calc(var(--radius) * .8); background: var(--surface); color: var(--muted-foreground); font: 400 13px/1 var(--font); cursor: pointer; margin-right: 6px; transition: background .15s; }
.search-btn:hover { background: var(--accent); }
.search-btn span { flex: 1; text-align: left; }
.icon-swap .i-moon, .btn .i-moon { display: none; }
.dark .btn .i-moon { display: block; }
.dark .btn .i-sun { display: none; }
.readbar { position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; pointer-events: none; }
.readbar i { display: block; height: 100%; transform-origin: 0 50%; transform: scaleX(var(--read, 0)); background: linear-gradient(90deg, var(--brand), var(--brand-2)); }
@media (max-width: 760px) { .search-btn { width: 36px; padding: 0; justify-content: center; margin: 0; } .search-btn span, .search-btn kbd { display: none; } }
@media (max-width: 480px) { .hd-note span { display: none; } .hd-note { width: 36px; padding: 0; } .logo { font-size: 14px; } }

/* ── 点の地（Magic UI DotPattern）・光る文字（AnimatedShinyText） */
.dots { position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(color-mix(in oklab, var(--foreground) 22%, transparent) 1.2px, transparent 1.2px); background-size: 20px 20px; -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 35%, #000 30%, transparent 75%); mask-image: radial-gradient(ellipse 60% 55% at 50% 35%, #000 30%, transparent 75%); }
.shiny { --w: 120px; color: color-mix(in oklab, var(--muted-foreground) 85%, transparent); background: linear-gradient(90deg, transparent, var(--foreground) 50%, transparent) no-repeat 0 0 / var(--w) 100%; -webkit-background-clip: text; background-clip: text; animation: shiny 8s infinite; }
@keyframes shiny { 0%, 90%, 100% { background-position: calc(-100% - var(--w)) 0; } 30%, 60% { background-position: calc(100% + var(--w)) 0; } }

/* ── トップ */
.hero { position: relative; padding: clamp(56px, 9vw, 112px) 0 clamp(40px, 6vw, 80px); overflow: hidden; }
.hero-in { position: relative; text-align: center; display: grid; justify-items: center; }
.pill { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: 13px; font-weight: 500; transition: background .15s; }
.pill:hover { background: var(--accent); }
.pill .i { width: 14px; height: 14px; color: var(--muted-foreground); transition: transform .2s var(--ease); }
.pill:hover .i { transform: translateX(2px); }
.hero-title { margin-top: 28px; font-size: clamp(38px, 6.6vw, 76px); line-height: 1.12; font-weight: 700; letter-spacing: -.035em; }
.grad { background: linear-gradient(110deg, var(--foreground) 20%, var(--brand) 60%, var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-lead { margin-top: 24px; max-width: 40em; font-size: clamp(15px, 1.6vw, 17px); line-height: 1.95; color: var(--muted-foreground); }
.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 36px; }
.hero-note { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; font-size: 13px; color: var(--muted-foreground); }
.hero-note .i { width: 14px; height: 14px; }

.window { position: relative; margin: clamp(48px, 7vw, 72px) auto 0; max-width: 1040px; border-radius: 16px; border: 1px solid var(--border); background: var(--card); box-shadow: var(--shadow-lg); overflow: hidden; }
.window::after { content: ""; position: absolute; inset: auto 0 0 0; height: 1px; background: linear-gradient(90deg, transparent, var(--brand), var(--brand-2), transparent); opacity: .6; }
.win-bar { display: flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px; border-bottom: 1px solid var(--border); background: var(--surface); }
.win-bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--border); }
.win-bar span { margin-left: 10px; font: 400 12px/1 var(--mono); color: var(--muted-foreground); }
.win-body { display: grid; grid-template-columns: 320px 1fr; min-height: 380px; }
.win-l { padding: 24px; border-right: 1px solid var(--border); display: grid; align-content: start; gap: 16px; }
.win-r { padding: 24px; background: var(--surface); display: grid; align-content: start; }
.eyebrow { font: 500 12px/1.4 var(--font); color: var(--muted-foreground); letter-spacing: .04em; }
.ring-wrap { position: relative; width: 150px; margin: 4px auto 0; }
.ring { width: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--muted); stroke-width: 9; }
.ring-fg { fill: none; stroke: var(--brand); stroke-width: 9; stroke-linecap: round; transition: stroke-dasharray 1.2s var(--ease); }
.ring-t { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-t b { font: 600 44px/1 var(--font); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.ring-t span { font-size: 12px; color: var(--muted-foreground); margin-top: 4px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.stats > div { padding: 10px 12px; }
.stats > div + div { border-left: 1px solid var(--border); }
.stats dt { font-size: 11.5px; color: var(--muted-foreground); }
.stats dd { font-size: 13px; font-weight: 500; margin-top: 2px; min-height: 1.5em; }
.stats dd .n { font: 600 22px/1.1 var(--font); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.next-card { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 8px; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--background); transition: border-color .15s, background .15s; }
.next-card:hover { border-color: var(--brand-line); background: var(--brand-soft); }
.next-card .eyebrow { grid-column: 1; }
.next-t { grid-column: 1; font-size: 13.5px; font-weight: 500; line-height: 1.6; }
.next-card .i { grid-column: 2; grid-row: 1 / 3; color: var(--muted-foreground); }

.band { position: relative; padding: clamp(64px, 9vw, 112px) 0; border-top: 1px solid var(--border); }
.band-muted { background: var(--surface); }
.sec-hd { margin-bottom: clamp(28px, 4vw, 44px); }
.h2-xl { margin-top: 10px; font-size: clamp(26px, 3.6vw, 40px); line-height: 1.3; font-weight: 700; letter-spacing: -.03em; }
.lead-p { margin-top: 16px; color: var(--muted-foreground); line-height: 1.95; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: calc(var(--radius) * 1.4); box-shadow: var(--shadow-xs); }
.card-p { padding: 22px; }
.card-big { margin-top: 14px; font-size: 16px; font-weight: 500; line-height: 1.85; }

.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.bento-c { position: relative; overflow: hidden; padding: 24px; border-radius: 14px; background: var(--background); box-shadow: var(--shadow-bento); transition: transform .3s var(--ease); }
.bento-c:hover { transform: translateY(-2px); }
.bento-wide { grid-column: span 2; }
.bento-ic { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); }
.bento-ic .i { width: 20px; height: 20px; }
.bento-t { margin-top: 18px; font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.bento-d { margin-top: 6px; color: var(--muted-foreground); font-size: 14px; line-height: 1.85; }
.mini-ba { display: grid; gap: 8px; margin-top: 18px; }
.mini-ba span { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 8px; font-size: 13px; }
.mini-x { border: 1px dashed var(--border); color: var(--muted-foreground); }
.mini-x .i { color: var(--destructive); }
.mini-o { border: 1px solid var(--brand-line); background: var(--brand-soft); color: var(--brand-fg); font-weight: 500; }

.phases { display: grid; gap: 40px; }
.phase { display: grid; grid-template-columns: 240px 1fr; gap: 28px; align-items: start; }
.phase-hd { position: sticky; top: calc(var(--header) + 24px); }
.phase-t { margin-top: 12px; font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.phase-l { margin-top: 2px; font-size: 13.5px; color: var(--muted-foreground); }
.dlist { border: 1px solid var(--border); border-radius: calc(var(--radius) * 1.4); overflow: hidden; background: var(--card); }
.dlist li + li { border-top: 1px solid var(--border); }
.drow { display: grid; grid-template-columns: 76px 1fr 28px; gap: 16px; align-items: center; padding: 18px 20px; transition: background .15s; }
.drow:hover { background: var(--accent); }
.drow-n { font: 500 13px/1 var(--mono); color: var(--muted-foreground); }
.drow-b { display: grid; gap: 2px; min-width: 0; }
.drow-t { font-size: 15.5px; font-weight: 600; line-height: 1.6; }
.drow-s { font-size: 13px; color: var(--muted-foreground); line-height: 1.6; }
.drow-st { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; color: var(--muted-foreground); }
.drow-st .i-done { display: none; }
.drow.is-done .drow-st { background: var(--brand); color: #fff; }
.drow.is-done .drow-st .i-done { display: block; width: 14px; height: 14px; }
.drow.is-done .drow-st .i-go { display: none; }
.drow.is-done .drow-n { color: var(--brand-fg); }
.drow.is-next { background: var(--brand-soft); }
.drow.is-next .drow-st { background: var(--primary); color: var(--primary-foreground); }
.drow.is-next .drow-n::after { content: "つぎ"; display: block; width: fit-content; margin-top: 6px; padding: 3px 6px; border-radius: 5px; font: 600 11px/1 var(--font); color: #fff; background: var(--brand); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.ticks { display: grid; gap: 10px; margin: 22px 0 28px; }
.ticks li { display: flex; gap: 10px; align-items: center; font-weight: 500; font-size: 14.5px; }
.ticks .i { color: var(--brand); }
.doc-card { border-radius: 14px; background: var(--card); box-shadow: var(--shadow-lg); overflow: hidden; }
.doc-b { padding: 18px 20px 22px; font: 400 12.5px/2 var(--mono); color: var(--muted-foreground); }
.doc-h { color: var(--foreground); font-weight: 500; margin-top: 10px; }
.doc-h:first-child { margin-top: 0; }
.doc-row { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed var(--border); padding: 4px 0; }
.doc-row b { font: 500 11px/20px var(--font); padding: 0 8px; border-radius: 6px; }
.t1 { background: var(--brand); color: #fff; }
.t2 { background: var(--brand-soft); color: var(--brand-fg); }
.t3 { border: 1px solid var(--border); color: var(--muted-foreground); }

.faq-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 48px; align-items: start; }
.about { display: flex; gap: 14px; margin-top: 28px; padding: 16px; border: 1px solid var(--border); border-radius: calc(var(--radius) * 1.4); background: var(--surface); }
.about img { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border); background: #fff; }
.about-n { font-weight: 600; font-size: 14px; }
.about-d { margin: 4px 0 12px; color: var(--muted-foreground); font-size: 13px; line-height: 1.8; }
.accordion { border-top: 1px solid var(--border); }
.acc { border-bottom: 1px solid var(--border); }
.acc summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 0; font-weight: 500; font-size: 15px; cursor: pointer; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary:hover { text-decoration: underline; text-underline-offset: 4px; }
.acc summary .i { color: var(--muted-foreground); transition: transform .2s var(--ease); }
.acc[open] summary .i { transform: rotate(180deg); }
.acc p { padding: 0 0 18px; color: var(--muted-foreground); line-height: 1.9; font-size: 14.5px; }

.cta-band { overflow: hidden; text-align: center; }
.cta-band .dots { -webkit-mask-image: radial-gradient(ellipse 50% 70% at 50% 50%, #000 20%, transparent 70%); mask-image: radial-gradient(ellipse 50% 70% at 50% 50%, #000 20%, transparent 70%); }
.cta-in { position: relative; display: grid; justify-items: center; gap: 24px; }
.cta-in .reset { margin-top: 8px; }

@media (max-width: 960px) {
  .win-body { grid-template-columns: 1fr; }
  .win-l { border-right: 0; border-bottom: 1px solid var(--border); }
  .grid3, .split, .faq-grid { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr 1fr; }
  .phase { grid-template-columns: 1fr; gap: 14px; }
  .phase-hd { position: static; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
  .phase-t { margin: 0; }
}
@media (max-width: 600px) {
  .bento { grid-template-columns: 1fr; } .bento-wide { grid-column: auto; }
  .drow { grid-template-columns: 1fr 26px; padding: 16px; gap: 6px 12px; }
  .drow-n { grid-column: 1; }
  .drow-b { grid-column: 1; }
  .drow-st { grid-column: 2; grid-row: 1 / 3; }
  .hero-cta .btn { width: 100%; }
  .win-l, .win-r { padding: 18px; }
}

/* ── Day ページ（Fumadocs の docs レイアウト） */
.docs { display: grid; grid-template-columns: 268px minmax(0, 1fr) 232px; width: min(100%, 1440px); margin-inline: auto; }
.sb { position: sticky; top: var(--header); height: calc(100dvh - var(--header)); border-right: 1px solid var(--border); }
.sb-in { height: 100%; overflow-y: auto; padding: 20px 16px 24px; display: flex; flex-direction: column; gap: 18px; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.sb-prog { padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.sb-prog-t { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted-foreground); }
.sb-prog-t b { color: var(--foreground); font-weight: 600; font-variant-numeric: tabular-nums; }
.bar { margin-top: 8px; height: 6px; border-radius: 999px; background: var(--muted); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width .8s var(--ease); }
.sb-nav { display: grid; gap: 16px; }
.sb-grp-t { display: flex; align-items: center; gap: 8px; padding: 0 8px 6px; font-size: 12px; font-weight: 600; color: var(--foreground); }
.sb-grp-t span { font: 500 11px/1 var(--mono); color: var(--muted-foreground); }
.sb-grp ul { display: grid; gap: 2px; border-left: 1px solid var(--border); margin-left: 12px; }
.sb-item { position: relative; display: grid; grid-template-columns: 22px 1fr 16px; gap: 6px; align-items: start; padding: 6px 8px 6px 10px; margin-left: -1px; border-left: 1px solid transparent; font-size: 13px; line-height: 1.6; color: var(--muted-foreground); border-radius: 0 8px 8px 0; transition: color .15s, background .15s; }
.sb-item:hover { color: var(--foreground); background: var(--accent); }
.sb-n { font: 500 11px/20px var(--mono); }
.sb-st { color: transparent; padding-top: 2px; }
.sb-st .i { width: 14px; height: 14px; }
.sb-item.is-done .sb-st { color: var(--brand); }
.sb-item.is-current { color: var(--brand-fg); font-weight: 500; border-left-color: var(--brand); background: var(--brand-soft); }
.sb-note { margin-top: auto; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: var(--radius); border: 1px solid var(--border); font-size: 13px; font-weight: 500; transition: background .15s; }
.sb-note:hover { background: var(--accent); }
.sb-note span { flex: 1; }
.sb-note .i:last-child { color: var(--muted-foreground); }

.doc { min-width: 0; padding: 32px clamp(16px, 4vw, 56px) 64px; }
.doc-in { max-width: 720px; margin-inline: auto; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--muted-foreground); }
.crumbs a:hover { color: var(--foreground); }
.crumbs .i { width: 14px; height: 14px; opacity: .6; }
.crumbs [aria-current] { color: var(--foreground); font-weight: 500; }
.doc-title { margin-top: 14px; font-size: clamp(28px, 4.2vw, 38px); line-height: 1.3; font-weight: 700; letter-spacing: -.03em; }
.doc-no { display: block; width: fit-content; margin-bottom: 10px; font: 500 13px/1 var(--mono); letter-spacing: 0; color: var(--brand-fg); padding: 5px 8px; border-radius: 6px; background: var(--brand-soft); }
.doc-desc { margin-top: 12px; font-size: 16.5px; line-height: 1.8; color: var(--muted-foreground); }
.doc-desc b { color: var(--foreground); font-weight: 600; margin-right: 10px; }
.doc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 18px; padding-bottom: 22px; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--muted-foreground); }
.doc-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.doc-meta .i { width: 14px; height: 14px; }
.doc-meta .btn { margin-left: auto; }

.lead { margin: 32px 0; padding: 4px 0 4px 20px; border-left: 2px solid var(--foreground); }
.lead p { font-size: clamp(19px, 2.4vw, 22px); line-height: 1.75; font-weight: 600; letter-spacing: -.01em; font-feature-settings: "palt"; }
.lead figcaption { margin-top: 10px; font-size: 12px; color: var(--muted-foreground); }

.prose p { font-size: 16px; line-height: 2; color: color-mix(in oklab, var(--foreground) 88%, var(--muted-foreground)); }
.prose p + p { margin-top: 1.1em; }
.prose strong { font-weight: 600; color: var(--foreground); }
.prose-sm p { font-size: 14.5px; line-height: 1.9; }
.muted-p { color: var(--muted-foreground); margin: -6px 0 18px; line-height: 1.9; font-size: 14.5px; }

.h2 { position: relative; margin: 56px 0 18px; font-size: 22px; line-height: 1.45; font-weight: 700; letter-spacing: -.02em; scroll-margin-top: calc(var(--header) + 24px); }
.anchor { position: absolute; left: -26px; top: 50%; transform: translateY(-50%); opacity: 0; color: var(--muted-foreground); padding: 4px; transition: opacity .15s; }
.h2:hover .anchor { opacity: 1; }
.anchor .i { width: 16px; height: 16px; }
.h2-card { margin: 0; font-size: 18px; }

.callout { display: flex; gap: 12px; margin: 32px 0 14px; padding: 16px 18px; border-radius: calc(var(--radius) * 1.4); border: 1px solid var(--border); background: var(--card); box-shadow: var(--shadow-xs); }
.callout > .i { width: 18px; height: 18px; margin-top: 3px; }
.callout-brand { border-color: var(--brand-line); background: var(--brand-soft); }
.callout-brand > .i { color: var(--brand); }
.callout-t { font-size: 12.5px; font-weight: 600; color: var(--brand-fg); }
.callout-b { margin-top: 4px; font-size: 16px; line-height: 1.85; font-weight: 600; }

.ba { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ba-c { padding: 14px 16px 16px; border-radius: calc(var(--radius) * 1.4); border: 1px solid var(--border); }
.ba-before { border-style: dashed; }
.ba-after { background: var(--card); box-shadow: var(--shadow-xs); }
.ba-l { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted-foreground); margin-bottom: 6px; }
.ba-l .i { width: 14px; height: 14px; }
.ba-before .ba-l .i { color: var(--destructive); }
.ba-after .ba-l { color: var(--ok); }
.ba-t { font-size: 14.5px; line-height: 1.85; white-space: pre-line; }
.ba-before .ba-t { color: var(--muted-foreground); }

.myths { display: grid; gap: 10px; }
.myth { padding: 16px 18px; border: 1px solid var(--border); border-radius: calc(var(--radius) * 1.4); background: var(--card); }
.myth-q { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; font-size: 15px; line-height: 1.7; }
.myth-q .i { color: var(--destructive); margin-top: 4px; }
.myth-a { margin-top: 6px; padding-left: 26px; color: var(--muted-foreground); line-height: 1.9; font-size: 14.5px; }

/* Fumadocs の Steps */
.fd-steps { counter-reset: step; position: relative; margin-left: 16px; padding-left: 28px; border-left: 1px solid var(--border); display: grid; gap: 22px; }
.fd-step { position: relative; }
.fd-step::before { content: counter(step); counter-increment: step; position: absolute; left: -45px; top: -2px; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--secondary); border: 4px solid var(--background); font: 600 14px/1 var(--font); }
.fd-step h3 { font-size: 16px; font-weight: 600; line-height: 1.7; }
.fd-step p { margin-top: 4px; color: var(--muted-foreground); line-height: 1.9; font-size: 14.5px; }

.cues { border: 1px solid var(--border); border-radius: calc(var(--radius) * 1.4); overflow: hidden; background: var(--card); }
.cue { display: grid; grid-template-columns: 1fr 20px 1fr; gap: 14px; align-items: center; padding: 14px 18px; }
.cue + .cue { border-top: 1px solid var(--border); }
.cue-if { font-size: 14.5px; line-height: 1.8; color: var(--muted-foreground); }
.kbd-s { display: inline-block; margin-right: 8px; font: 500 11px/18px var(--font); padding: 0 6px; border: 1px solid var(--border); border-radius: 5px; color: var(--muted-foreground); transform: translateY(-1px); }
.cue-i { color: var(--brand); }
.cue-then { font-size: 14.5px; line-height: 1.8; font-weight: 600; }

/* ── カード・入力（shadcn/ui の card・input・toggle-group・checkbox） */
.work, .doc .card { margin-top: 56px; }
.card-hd { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 22px 24px 0; }
.card-desc { margin-top: 6px; font-size: 13.5px; line-height: 1.85; color: var(--muted-foreground); }
.card-bd { padding: 20px 24px 24px; display: grid; gap: 22px; }
.saved { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 500; color: var(--ok); background: color-mix(in oklab, var(--ok) 12%, transparent); opacity: 0; transform: translateY(-2px); transition: opacity .2s, transform .2s; white-space: nowrap; }
.saved .i { width: 13px; height: 13px; }
.saved.is-on { opacity: 1; transform: none; }
.field { display: grid; gap: 8px; border: 0; padding: 0; margin: 0; min-width: 0; }
.label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding: 0; font-size: 14px; font-weight: 600; }
.hint { font-size: 12.5px; font-weight: 400; color: var(--muted-foreground); }
.input { width: 100%; min-width: 0; height: 40px; padding: 8px 12px; border: 1px solid var(--input); border-radius: calc(var(--radius) * .8); background: transparent; color: var(--foreground); font: 400 16px/1.6 var(--font); box-shadow: var(--shadow-xs); transition: border-color .15s, box-shadow .15s; outline: none; -webkit-appearance: none; appearance: none; }
.dark .input { background: color-mix(in oklab, var(--input) 30%, transparent); }
textarea.input { height: auto; min-height: 76px; resize: vertical; field-sizing: content; max-height: 320px; line-height: 1.75; }
.input::placeholder { color: var(--muted-foreground); opacity: .8; }
.input:focus-visible { border-color: var(--ring); box-shadow: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent); }
.input.mono { font: 400 12px/1.6 var(--mono); }
input[type="number"] { -moz-appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; }
.num { position: relative; display: block; }
.num .input { text-align: right; padding-right: 44px; font-variant-numeric: tabular-nums; }
.num span { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--muted-foreground); pointer-events: none; }

.tgroup { display: inline-flex; border: 1px solid var(--input); border-radius: calc(var(--radius) * .8); box-shadow: var(--shadow-xs); overflow: hidden; background: var(--background); }
.dark .tgroup { background: color-mix(in oklab, var(--input) 30%, transparent); }
.tg-item { position: relative; flex: 1; }
.tg-item + .tg-item { border-left: 1px solid var(--input); }
.tg-item input { position: absolute; opacity: 0; pointer-events: none; }
.tg-item span { display: grid; place-items: center; height: 38px; padding: 0 12px; font-size: 13px; font-weight: 500; color: var(--muted-foreground); cursor: pointer; white-space: nowrap; transition: background .15s, color .15s; }
.tg-item span:hover { background: var(--accent); color: var(--foreground); }
.tg-item input:checked + span { background: var(--accent); color: var(--foreground); box-shadow: inset 0 -2px 0 var(--brand); }
.tg-item input:focus-visible + span { outline: 2px solid var(--ring); outline-offset: -2px; }

.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { position: relative; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt span { display: inline-flex; align-items: center; height: 36px; padding: 0 14px; border: 1px solid var(--input); border-radius: 999px; font-size: 13.5px; font-weight: 500; color: var(--muted-foreground); cursor: pointer; box-shadow: var(--shadow-xs); transition: all .15s; }
.opt span:hover { background: var(--accent); color: var(--foreground); }
.opt input:checked + span { background: var(--primary); border-color: var(--primary); color: var(--primary-foreground); }
.opt input:focus-visible + span { outline: 2px solid var(--ring); outline-offset: 2px; }
.checks { display: grid; gap: 8px; }
.check { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--border); border-radius: calc(var(--radius) * .8); cursor: pointer; font-size: 14.5px; transition: border-color .15s, background .15s; }
.check:hover { background: var(--accent); }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.cbox { width: 16px; height: 16px; flex: none; display: grid; place-items: center; border: 1px solid var(--input); border-radius: 4px; box-shadow: var(--shadow-xs); color: transparent; transition: all .15s; }
.cbox .i { width: 12px; height: 12px; stroke-width: 3; }
.check:has(input:checked) { border-color: var(--brand-line); background: var(--brand-soft); }
.check input:checked + .cbox { background: var(--primary); border-color: var(--primary); color: var(--primary-foreground); }
.check input:focus-visible + .cbox { outline: 2px solid var(--ring); outline-offset: 2px; }

.rows { display: grid; gap: 10px; }
.trow { display: grid; grid-template-columns: 24px minmax(0, 1fr) 112px auto; gap: 8px; align-items: center; }
.trow-n { font: 500 11px/1 var(--mono); color: var(--muted-foreground); text-align: center; }
.trow-split { grid-template-columns: 24px minmax(0, 1fr) auto; }
.trow-line { grid-template-columns: 24px minmax(0, 1fr) auto 210px; }
.trow-mm { display: flex; align-items: center; gap: 6px; color: var(--muted-foreground); }
.trow-mm .num { flex: 1; }
.trow-mm .num .input { padding-right: 30px; }
@media (max-width: 760px) {
  .trow { grid-template-columns: 24px 104px minmax(0, 1fr); }
  .trow > .input { grid-column: 2 / -1; }
  .trow > .num { grid-column: 2; }
  .trow > .tgroup { grid-column: 3; }
  .trow-split, .trow-line { grid-template-columns: 24px minmax(0, 1fr); }
  .trow-split > .input, .trow-line > .input, .trow-split > .tgroup, .trow-line > .tgroup, .trow-line > .trow-mm { grid-column: 2; }
  .tgroup { display: flex; width: 100%; }
  .tg-item span { padding: 0 6px; font-size: 12.5px; }
  .rows .trow { padding-bottom: 12px; border-bottom: 1px dashed var(--border); }
  .rows .trow:last-child { border-bottom: 0; padding-bottom: 0; }
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips:empty { display: none; }
.chips button { height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--background); color: var(--muted-foreground); font: 500 13px/1 var(--font); cursor: pointer; transition: all .15s; }
.chips button:hover { color: var(--foreground); background: var(--accent); }
.chips button.is-on { background: var(--primary); border-color: var(--primary); color: var(--primary-foreground); }
.measure { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.measure .num { width: 110px; }
.measure-l { font-size: 13.5px; color: var(--muted-foreground); }
.measure-i { color: var(--brand); }
.sum { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: calc(var(--radius) * .8); background: var(--brand-soft); color: var(--brand-fg); font-size: 13.5px; font-weight: 500; line-height: 1.7; }
.sum b { font-weight: 700; color: var(--foreground); }

.ex { border-top: 1px solid var(--border); }
.ex summary { list-style: none; display: flex; align-items: center; gap: 8px; padding: 14px 24px; cursor: pointer; font-size: 13.5px; font-weight: 500; color: var(--muted-foreground); transition: color .15s; }
.ex summary:hover { color: var(--foreground); }
.ex summary::-webkit-details-marker { display: none; }
.ex summary em { margin-left: auto; font-size: 12px; font-weight: 400; }
.ex-chev { transition: transform .2s var(--ease); }
.ex[open] .ex-chev { transform: rotate(180deg); }
.ex-dl { padding: 0 24px 18px; display: grid; }
.ex-dl div { display: grid; grid-template-columns: 9em 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); font-size: 13.5px; }
.ex-dl dt { color: var(--muted-foreground); }
.ex-dl dd { line-height: 1.85; }
@media (max-width: 560px) { .ex-dl div { grid-template-columns: 1fr; gap: 2px; } .ex summary em { display: none; } .card-hd, .card-bd { padding-left: 16px; padding-right: 16px; } .ex summary { padding: 14px 16px; } .ex-dl { padding: 0 16px 16px; } }

/* ── 依頼文（Fumadocs・shadcn の code block） */
.code { border: 1px solid var(--border); border-radius: calc(var(--radius) * 1.4); background: var(--code); overflow: hidden; box-shadow: var(--shadow-xs); }
.code + .code { margin-top: 14px; }
.code-hd { display: flex; justify-content: space-between; align-items: center; gap: 10px; height: 44px; padding: 0 8px 0 14px; border-bottom: 1px solid var(--border); background: var(--card); font-size: 13px; font-weight: 500; color: var(--muted-foreground); }
.code-hd > span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.code-body { padding: 18px 18px 20px; font: 400 14px/1.95 var(--font); white-space: pre-wrap; word-break: auto-phrase; overflow-wrap: anywhere; max-height: 560px; overflow: auto; color: var(--foreground); }
.code-sm .code-body { font-size: 13px; max-height: none; }
.fill { background: var(--brand-soft); color: var(--brand-fg); font-weight: 600; border-radius: 4px; padding: 1px 3px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.ph, mark.ph { background: var(--ph-bg); color: var(--ph-fg); font-weight: 500; border-radius: 4px; padding: 1px 4px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.code-note { padding: 12px 16px; border-top: 1px solid var(--border); font-size: 12.5px; line-height: 1.8; color: var(--muted-foreground); background: var(--card); }
.i-done { display: none; }
.is-copied .i-copy { display: none; }
.is-copied .i-done { display: block; color: var(--ok); }
.open-ai { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; font-size: 12.5px; color: var(--muted-foreground); }
.open-ai > span { margin-right: 4px; }

.post { display: grid; gap: 8px; padding-top: 18px; border-top: 1px dashed var(--border); }
.post-body { padding: 12px 14px; border-radius: calc(var(--radius) * .8); background: var(--surface); border: 1px solid var(--border); font: 400 13.5px/1.85 var(--font); white-space: pre-wrap; color: var(--muted-foreground); }

.note-from { margin-top: 56px; padding: 20px 22px; border-radius: calc(var(--radius) * 1.4); background: var(--surface); border: 1px solid var(--border); }
.note-from-hd { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.note-from-hd img { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border); background: #fff; }
.note-from-hd p { display: grid; line-height: 1.35; }
.note-from-hd b { font-size: 14px; font-weight: 600; }
.note-from-hd span { font-size: 12px; color: var(--muted-foreground); }
.line-box { margin-top: 18px; padding: 16px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--border); display: grid; gap: 12px; justify-items: start; }
.line-box p { font-size: 14px; line-height: 1.9; color: var(--muted-foreground); }
.line-box b { display: block; color: var(--foreground); font-weight: 600; }

.finish { position: relative; overflow: hidden; margin-top: 56px; padding: 36px 24px; border-radius: 16px; border: 1px solid var(--border); background: var(--card); text-align: center; display: grid; justify-items: center; gap: 10px; }
.finish-glow { position: absolute; inset: -40% -10% auto; height: 160%; background: radial-gradient(closest-side, color-mix(in oklab, var(--brand) 14%, transparent), transparent 70%); pointer-events: none; }
.finish > :not(.finish-glow) { position: relative; }
.finish-k { font: 500 12px/1 var(--mono); color: var(--muted-foreground); letter-spacing: .04em; }
.finish-t { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.finish .btn-lg { min-width: min(100%, 340px); }
.finish-n { display: flex; align-items: center; gap: 4px; margin-top: 6px; font-size: 12px; color: var(--muted-foreground); }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 24px; }
.pager-c { display: grid; gap: 6px; padding: 14px 16px; border: 1px solid var(--border); border-radius: calc(var(--radius) * 1.4); transition: background .15s, border-color .15s; min-width: 0; }
.pager-c:hover { background: var(--accent); }
.pager-k { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--muted-foreground); }
.pager-k .i { width: 14px; height: 14px; }
.pager-t { font-size: 14px; font-weight: 500; line-height: 1.6; }
.pager-next { text-align: right; }
.pager-next .pager-k { justify-content: flex-end; }

/* 右の目次（Fumadocs の TOC） */
.toc { position: sticky; top: var(--header); height: calc(100dvh - var(--header)); }
.toc-in { padding: 32px 20px 24px 8px; height: 100%; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; scrollbar-width: none; }
.toc-t { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; }
.toc-t .i { width: 14px; height: 14px; }
.toc-l { display: grid; border-left: 1px solid var(--border); }
.toc-l a { display: block; margin-left: -1px; padding: 5px 0 5px 12px; border-left: 1px solid transparent; font-size: 12.5px; line-height: 1.6; color: var(--muted-foreground); transition: color .15s, border-color .15s; }
.toc-l a:hover { color: var(--foreground); }
.toc-l a.is-active { color: var(--brand-fg); border-left-color: var(--brand); font-weight: 500; }
.toc-top { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted-foreground); }
.toc-top .i { width: 13px; height: 13px; transform: rotate(-45deg); }
.toc-top:hover { color: var(--foreground); }

.mbar { display: none; }
.sheet { padding: 0; border: 0; margin: 0; width: min(88vw, 340px); max-width: none; height: 100dvh; max-height: none; background: var(--background); color: var(--foreground); border-right: 1px solid var(--border); }
.sheet::backdrop { background: rgb(0 0 0 / .45); backdrop-filter: blur(2px); }
.sheet[open] { animation: sheet-in .25s var(--ease); }
@keyframes sheet-in { from { transform: translateX(-100%); } }
.sheet-in { height: 100%; overflow-y: auto; padding: 12px 16px 24px; display: flex; flex-direction: column; gap: 18px; }
.sheet-hd { display: flex; justify-content: space-between; align-items: center; font-weight: 600; }

@media (max-width: 1240px) { .docs { grid-template-columns: 268px minmax(0, 1fr); } .toc { display: none; } }
@media (max-width: 1000px) {
  .docs { grid-template-columns: minmax(0, 1fr); }
  .sb { display: none; }
  .mbar { display: block; position: sticky; top: var(--header); z-index: 40; background: color-mix(in oklab, var(--background) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
  .mbar-btn { display: flex; align-items: center; gap: 8px; width: 100%; height: 44px; padding: 0 16px; border: 0; background: none; color: var(--foreground); font: 400 13px/1 var(--font); cursor: pointer; text-align: left; }
  .mbar-btn span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted-foreground); }
  .mbar-btn b { color: var(--foreground); font-weight: 600; }
  .anchor { display: none; }
  html { scroll-padding-top: calc(var(--header) + 68px); }
  .h2 { scroll-margin-top: calc(var(--header) + 68px); }
}
@media (max-width: 560px) {
  .doc { padding-top: 22px; }
  .ba, .pager { grid-template-columns: 1fr; }
  .cue { grid-template-columns: 1fr; gap: 4px; }
  .cue-i { transform: rotate(90deg); }
  .doc-meta .btn { margin-left: 0; }
}

/* ── 引き継ぎ書 */
.notepage { padding: 32px 0 48px; }
.note-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 24px 0 28px; }
.stat-big { margin-top: 6px; font-size: 15px; font-weight: 500; }
.stat-big b, .stat-big .n { font: 600 28px/1.1 var(--font); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.tabs-list { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--radius); background: var(--muted); margin-bottom: 18px; max-width: 100%; overflow-x: auto; }
.tabs-list button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid transparent; border-radius: calc(var(--radius) * .8); background: none; color: var(--muted-foreground); font: 500 13.5px/1 var(--font); cursor: pointer; white-space: nowrap; transition: all .15s; }
.tabs-list button:hover { color: var(--foreground); }
.tabs-list button[aria-selected="true"] { background: var(--background); color: var(--foreground); box-shadow: var(--shadow-sm); }
.dark .tabs-list button[aria-selected="true"] { background: color-mix(in oklab, var(--input) 30%, transparent); border-color: var(--input); }
.tab-panel { display: grid; gap: 14px; }
.tab-panel[hidden] { display: none; }
.nb { display: grid; gap: 10px; }
.nb-day { border: 1px solid var(--border); border-radius: calc(var(--radius) * 1.4); padding: 16px 18px; background: var(--card); }
.nb-day.is-empty { background: transparent; border-style: dashed; }
.nb-hd { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.nb-no { font: 500 12px/1 var(--mono); color: var(--brand-fg); padding: 4px 6px; border-radius: 5px; background: var(--brand-soft); }
.nb-t { font-weight: 600; flex: 1; min-width: 12em; font-size: 14.5px; }
.nb-go { font-size: 12.5px; color: var(--muted-foreground); display: inline-flex; align-items: center; gap: 4px; }
.nb-go:hover { color: var(--foreground); }
.nb-dl { margin-top: 10px; display: grid; }
.nb-dl div { display: grid; grid-template-columns: 9em 1fr; gap: 12px; padding: 8px 0; border-top: 1px solid var(--border); font-size: 13.5px; }
.nb-dl dt { color: var(--muted-foreground); }
.nb-dl dd { white-space: pre-wrap; line-height: 1.85; }
.nb-empty { margin-top: 6px; font-size: 13px; color: var(--muted-foreground); }
@media (max-width: 640px) { .note-stats { grid-template-columns: 1fr 1fr; } .note-stats > :first-child { grid-column: 1 / -1; } .nb-dl div { grid-template-columns: 1fr; gap: 2px; } }

/* ── フッター */
.site-ft { border-top: 1px solid var(--border); padding: 40px 0 56px; }
.ft-in { width: min(100% - 32px, 1160px); margin-inline: auto; display: grid; gap: 12px; }
.ft-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.ft-by { font-size: 13px; color: var(--muted-foreground); }
.ft-note { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted-foreground); }
.ft-note .i { width: 13px; height: 13px; }
.ft-credit { font-size: 12px; color: var(--muted-foreground); line-height: 1.9; }

/* ── 検索の窓（cmdk・shadcn の Command） */
.cmdk { padding: 0; border: 0; background: transparent; width: min(100% - 32px, 560px); max-width: none; margin: 12vh auto auto; overflow: visible; color: var(--foreground); }
.cmdk::backdrop { background: rgb(0 0 0 / .4); backdrop-filter: blur(2px); }
.cmdk[open] .cmdk-box { animation: pop .18s var(--ease); }
@keyframes pop { from { opacity: 0; transform: scale(.97) translateY(-4px); } }
.cmdk-box { border-radius: 14px; border: 1px solid var(--border); background: var(--card); box-shadow: var(--shadow-lg); overflow: hidden; }
.cmdk-in { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 14px; border-bottom: 1px solid var(--border); }
.cmdk-in .i { color: var(--muted-foreground); width: 18px; height: 18px; }
.cmdk-in input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--foreground); font: 400 16px/1 var(--font); }
.cmdk-in input::placeholder { color: var(--muted-foreground); }
.cmdk-list { max-height: min(58vh, 420px); overflow-y: auto; padding: 6px; scroll-padding: 6px; }
.cmdk-grp { padding: 8px 8px 4px; font-size: 11.5px; font-weight: 500; color: var(--muted-foreground); }
.cmdk-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 8px; background: none; color: var(--foreground); font: 400 14px/1.5 var(--font); text-align: left; cursor: pointer; }
.cmdk-item .i { color: var(--muted-foreground); }
.cmdk-item .cmdk-n { font: 500 11.5px/1 var(--mono); color: var(--muted-foreground); width: 52px; flex: none; }
.cmdk-item .cmdk-s { margin-left: auto; font-size: 12px; color: var(--muted-foreground); white-space: nowrap; }
.cmdk-item[aria-selected="true"] { background: var(--accent); }
.cmdk-item .ok { color: var(--brand); }
.cmdk-empty { padding: 28px; text-align: center; font-size: 14px; color: var(--muted-foreground); }
.cmdk-ft { display: flex; gap: 14px; justify-content: flex-end; padding: 8px 12px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted-foreground); background: var(--surface); }
.cmdk-ft span { display: inline-flex; align-items: center; gap: 4px; }
@media (max-width: 560px) { .cmdk-ft { display: none; } .cmdk { margin-top: 8vh; } }

/* ── 知らせ（Sonner） */
.toaster { position: fixed; z-index: 100; right: 24px; bottom: 24px; width: 356px; max-width: calc(100% - 32px); display: grid; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 8px; border: 1px solid var(--border); background: var(--card); color: var(--foreground); box-shadow: 0 4px 12px rgba(0, 0, 0, .1); font-size: 13.5px; line-height: 1.6; font-weight: 500; animation: toast-in .4s var(--ease); transition: opacity .3s, transform .3s; }
.toast .i { color: var(--ok); width: 18px; height: 18px; }
.toast.is-out { opacity: 0; transform: translateY(6px) scale(.98); }
@keyframes toast-in { from { opacity: 0; transform: translateY(100%); } }
@media (max-width: 600px) { .toaster { left: 16px; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); width: auto; max-width: none; } }

/* ── 動き */
.js .rv { opacity: 0; transform: translateY(12px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .rv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  .js .rv { opacity: 1; transform: none; transition: none; }
  .beam::before, .shiny { animation: none; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ── 印刷 */
@media print {
  .site-hd, .site-ft, .btn-row, .reset, .toaster, .skip, .tabs-list, .note-stats, [data-copy-handover] { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .tab-panel[hidden] { display: grid !important; }
  #tp-mv { display: none !important; }
  .code { box-shadow: none; }
  .code-body { max-height: none; overflow: visible; }
  .nb-day { break-inside: avoid; }
}

/* 保存の印はカードの右上に浮かせる（説明文の幅を取らない） */
.card { position: relative; }
.card-hd > div { flex: 1; min-width: 0; }
.saved { position: absolute; top: 20px; right: 20px; }
