@import url("tokens.css");

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 48px); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: var(--fs-base); line-height: var(--lh);
  letter-spacing: var(--tracking);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
h1, h2, h3, p, ul, ol, figure { margin: 0; }
h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); font-weight: 700; }
h2 { font-size: var(--fs-h2); line-height: 1.5; font-weight: 700; }
h3 { font-size: var(--fs-lg); line-height: 1.6; font-weight: 700; }
p { color: var(--ink-2); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
code, .mono { font-family: var(--mono); font-size: 0.9em; }
img { max-width: 100%; display: block; }

/* ---------- Haze background ---------- */
.haze { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.haze i {
  position: absolute; border-radius: 50%; filter: blur(80px); opacity: .95;
  transition: background-color 1.2s ease;
  animation: drift 28s ease-in-out infinite alternate;
}
.haze i:nth-child(1) { width: 56vw; height: 56vw; left: -16vw; top: 14vh; background: var(--haze-1); }
.haze i:nth-child(2) { width: 48vw; height: 48vw; right: -12vw; top: -14vh; background: var(--haze-2); animation-duration: 34s; animation-delay: -8s; }
.haze i:nth-child(3) { width: 38vw; height: 38vw; right: 6vw; bottom: -12vh; background: var(--haze-3); animation-duration: 40s; animation-delay: -16s; }
.haze i:nth-child(4) { width: 30vw; height: 30vw; left: 28vw; top: -10vh; background: var(--haze-4); animation-duration: 31s; animation-delay: -4s; }
/* 紙のような細かい粒子 */
.haze::after {
  content: ""; position: absolute; inset: 0; opacity: .35; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 .18 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@keyframes drift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(4vw, -3vh) scale(1.08); }
  100% { transform: translate(-3vw, 4vh) scale(.95); }
}
@media (prefers-reduced-motion: reduce) { .haze i { animation: none; } }
@media (prefers-color-scheme: dark) { .haze::after { mix-blend-mode: screen; opacity: .2; } }

/* ロゴ：配色に合わせて色が変わるマーク */
.mark { display: inline-block; width: 26px; height: 26px; flex: none;
  background: linear-gradient(135deg, var(--primary) 20%, var(--accent) 100%);
  -webkit-mask: url("logo-mask.svg") center / contain no-repeat; mask: url("logo-mask.svg") center / contain no-repeat; }
.mark.sm { width: 14px; height: 14px; }

/* ---------- Layout ---------- */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section-y) 0; border-top: 1px solid var(--line); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(32px, 6vw, 96px); }
.split > .side { position: sticky; top: calc(var(--header-h) + 40px); align-self: start; }
.side p { margin-top: 12px; font-size: 14px; }
.side h2::after { content: ""; display: block; width: 28px; height: 4px; margin-top: 10px; border-radius: 4px; background: var(--brand-gradient); }
@media (max-width: 760px) {
  .split { grid-template-columns: 1fr; gap: 28px; }
  .split > .side { position: static; }
}

/* ---------- Header (liquid: 白い液体でつながる2つのピル) ---------- */
.site-header { position: sticky; top: 32px; z-index: 10; padding: 0 var(--gutter); }
.site-header nav {
  position: relative; max-width: var(--maxw); margin: 0 auto; height: var(--header-flow);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.site-header .brand, .site-header .nav-links { position: relative; z-index: 1; }
.brand { display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 26px 0 20px; color: var(--ink); font-weight: 500; font-size: 18px; }
.brand:hover { text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: 24px; height: 64px; padding: 0 10px 0 28px; font-size: 14px; }
.nav-links a { color: var(--ink); }
/* JS が動かないときの見た目 */
.site-header nav:not(.is-liquid) .brand,
.site-header nav:not(.is-liquid) .nav-links { background: var(--surface-solid); border-radius: var(--radius-pill); }

/* 液体の層（assets/liquid.js が中身を描く） */
svg.liquid {
  position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible;
  pointer-events: none; z-index: 0;
  opacity: .86; transition: opacity .3s ease .18s;   /* 戻るときは、ガラスが広がってから液体が現れる */
  filter: drop-shadow(0 8px 24px rgba(60, 60, 20, .10));
}
.lq-body { fill: var(--surface-solid); }
svg.liquid circle, svg.liquid ellipse, svg.liquid .lq-seg { transform-box: fill-box; transform-origin: center; }
.lq-drop { animation: lq-travel var(--dur) ease-in-out var(--delay) infinite alternate; }
.lq-drip { animation: lq-drip var(--dur) cubic-bezier(.5, 0, .5, 1) var(--delay) infinite; }
.lq-bub  { animation: lq-bub var(--dur) ease-in-out var(--delay) infinite; }
.lq-seg { animation: lq-neck var(--dur) ease-in-out var(--delay) infinite; }
@keyframes lq-travel { from { transform: translateX(0); } to { transform: translateX(var(--len)); } }
@keyframes lq-drip {
  0%, 15% { transform: translateY(0) scale(1); }
  50%     { transform: translateY(30px) scale(.75); }
  68%     { transform: translateY(40px) scale(.55); }
  100%    { transform: translateY(0) scale(1); }
}
@keyframes lq-bub {
  0%, 20% { transform: translateY(0) scale(1); }
  60%     { transform: translateY(-30px) scale(.6); }
  100%    { transform: translateY(0) scale(1); }
}
@keyframes lq-neck { 0%, 100% { transform: scaleY(.55); } 50% { transform: scaleY(1.3); } }
@media (prefers-reduced-motion: reduce) {
  .lq-drop, .lq-drip, .lq-bub, .lq-seg { animation: none; }
}
@media (max-width: 560px) {
  .nav-links a:not(.btn) { display: none; }
  .nav-links { padding-left: 10px; }
  .brand { padding-right: 20px; }
}

/* スクロール後：液体をやめて、すりガラスのチップ1つにまとまる（静的）
   - ヘッダーの横幅は変えない（液体の形が描き直されて崩れないように）
   - ロゴと項目は transform で中央へ寄せるだけ
   - ガラス（.lq-chip）は全幅から中央のチップの大きさへ縮みながら色とぼかしが付く
   - Safari でちらつくので、ガラスには opacity のアニメーションを使わない */
.lq-chip {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0;
  border-radius: var(--radius-pill); pointer-events: none;
  background-color: transparent; border: 1px solid transparent;
  -webkit-backdrop-filter: saturate(100%) blur(0px); backdrop-filter: saturate(100%) blur(0px);
  transition:
    left .5s cubic-bezier(.2, .8, .2, 1), width .5s cubic-bezier(.2, .8, .2, 1),
    background-color .35s ease, border-color .35s ease, box-shadow .35s ease,
    -webkit-backdrop-filter .35s ease, backdrop-filter .35s ease;
}
.site-header nav.is-compact .lq-chip {
  background-color: var(--glass); border-color: var(--glass-edge);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: 0 6px 24px rgba(40, 40, 20, .08);
}
.site-header .brand, .site-header .nav-links {
  transform: translateX(var(--dx, 0px));
  transition: transform .5s cubic-bezier(.2, .8, .2, 1);
}
.site-header nav.is-compact svg.liquid { opacity: 0; transition: opacity .16s ease; }
/* チップの間は液体のアニメーションを止める（完全に静的） */
.site-header nav.is-compact svg.liquid * { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .lq-chip, .site-header .brand, .site-header .nav-links, svg.liquid { transition: none !important; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 44px; padding: 0 24px; border-radius: var(--radius-pill);
  background: var(--button-gradient); color: var(--on-primary) !important; font-size: 14px; font-weight: 700;
  box-shadow: 0 4px 16px color-mix(in srgb, var(--primary) 45%, transparent), inset 0 -1px 0 rgba(0,0,0,.06); transition: filter .2s, transform .2s;
}
.btn:hover { text-decoration: none; filter: brightness(1.05); transform: translateY(-1px); }
.btn-lg { height: 52px; padding: 0 30px; font-size: 15px; }
.link-arrow::after { content: " ↗"; font-size: .85em; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: calc(88vh - var(--header-h)); display: grid; align-items: center; padding: 64px 0 96px; }
/* PC：ヘッダーとヒーロー（＝1枚目のセクション）でちょうど画面いっぱい。高さには上限を付ける */
@media (min-width: 861px) {
  .hero {
    min-height: min(calc(100vh - var(--header-flow)), var(--hero-max));
    min-height: min(calc(100svh - var(--header-flow)), var(--hero-max));
    padding: 40px 0 72px;
  }
}

/* 読み込み直後だけ出す「SCROLL」の案内（一度スクロールしたら消え、戻っても出さない） */
.scroll-hint {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
  display: none; flex-direction: column; align-items: center; gap: 8px; pointer-events: none;
  font-family: var(--mono); font-size: 11px; letter-spacing: .32em; text-indent: .32em; color: var(--muted);
  transition: opacity .5s ease;
}
.scroll-hint > * { opacity: 0; animation: hint-in .8s ease 1s forwards; }
.scroll-hint i { position: relative; display: block; width: 1px; height: 34px; background: var(--line-strong); overflow: hidden; }
.scroll-hint i::after {
  content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%;
  background: var(--ink-2); animation: hint-flow 1.8s cubic-bezier(.6, 0, .4, 1) infinite;
}
.scroll-hint b { display: block; width: 7px; height: 7px; margin-top: -12px; border: solid var(--ink-2); border-width: 0 1px 1px 0; transform: rotate(45deg); opacity: .7; }
@keyframes hint-in { to { opacity: .7; } }
@keyframes hint-flow { to { top: 100%; } }
@media (min-width: 861px) and (min-height: 560px) { .scroll-hint { display: flex; } }
html.has-scrolled .scroll-hint { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .scroll-hint i::after { animation: none; top: 30%; } }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero h1 { margin-bottom: 24px; }
.hero p.lead { max-width: 30em; }
.hero .note { margin-top: 12px; font-size: var(--fs-xs); color: var(--muted); }
.hero .btn { margin-top: 36px; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }

/* chat-like vignette */
.bubbles { display: grid; gap: 0; }
.bubble-q {
  background: var(--surface-ink); color: #f2f2f0; border-radius: 20px;
  padding: 18px 22px; font-size: 14px; line-height: 1.85; margin-left: 12%;
}
.bubble-a {
  position: relative; background: var(--surface-solid); border: 1px solid var(--line);
  border-radius: 20px; box-shadow: var(--shadow); padding: 30px 22px 20px;
  margin: -6px 12% 0 0; font-size: 15px; color: var(--ink);
}
.bubble-a .who {
  position: absolute; top: -14px; left: 16px; display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface-solid); border: 1px solid var(--line); border-radius: var(--radius-pill);
  padding: 2px 12px; font-size: var(--fs-xs); color: var(--ink-2); box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
.caret { display: inline-block; width: 1px; height: 1.1em; background: var(--ink); vertical-align: -3px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .caret { animation: none; } html { scroll-behavior: auto; } }

/* ---------- Works list (table-like rows) ---------- */
.rows-head { display: grid; grid-template-columns: 200px 1fr; gap: 24px; font-size: var(--fs-xs); color: var(--muted); padding-bottom: 12px; border-bottom: 1px solid var(--line-strong); }
.row { display: grid; grid-template-columns: 200px 1fr; gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.row .name { font-family: var(--mono); font-size: 14px; font-weight: 500; color: var(--ink); }
.row .platform { display: block; margin-top: 4px; font-family: var(--mono); font-size: var(--fs-xs); color: var(--accent); }
.row h3 { font-size: 16px; margin-bottom: 6px; }
.row p { font-size: 15px; }
.row ul { margin: 12px 0 0; padding-left: 1.1em; font-size: 14px; color: var(--ink-2); }
.row ul li { margin: 2px 0; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tag { font-family: var(--mono); font-size: 11px; padding: 2px 10px; border-radius: var(--radius-pill); border: 1px solid transparent; color: var(--accent); background: var(--accent-soft); }
.diagram { margin-top: 14px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--surface-ink); color: #e9e9e6; font-family: var(--mono); font-size: 12px; line-height: 1.75; white-space: pre; overflow-x: auto; }
@media (max-width: 560px) {
  .rows-head { display: none; }
  .row { grid-template-columns: 1fr; gap: 8px; }
}

/* ---------- Post list ---------- */
.posts { list-style: none; padding: 0; border-top: 1px solid var(--line-strong); }
.posts li { border-bottom: 1px solid var(--line); }
.posts a { display: grid; grid-template-columns: 110px 1fr; gap: 24px; padding: 22px 0; color: var(--ink); }
.posts a:hover { text-decoration: none; }
.posts a:hover .title { color: var(--accent); }
.posts time { font-family: var(--mono); font-size: var(--fs-sm); color: var(--muted); padding-top: 2px; }
.posts .title { font-weight: 500; transition: color .2s; }
.posts .excerpt { display: block; font-size: 14px; color: var(--muted); margin-top: 2px; }
@media (max-width: 560px) { .posts a { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 56px; font-size: var(--fs-sm); color: var(--muted); }
.site-footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.site-footer a { color: var(--ink-2); }
.site-footer ul { list-style: none; padding: 0; display: flex; gap: 20px; }

/* ---------- Article (blog post) ---------- */
.article { max-width: var(--prose); margin: 0 auto; padding: 72px var(--gutter) var(--section-y); box-sizing: content-box; }
.article header { margin-bottom: 48px; }
.article .meta { font-family: var(--mono); font-size: var(--fs-sm); color: var(--muted); margin-bottom: 12px; }
.article h1 { font-size: clamp(26px, 4vw, 32px); }
.prose > * + * { margin-top: 1.4em; }
.prose h2 { margin-top: 2.6em; padding-top: 1.2em; border-top: 1px solid var(--line); font-size: 21px; }
.prose h3 { margin-top: 2em; font-size: 17px; }
.prose p, .prose li { color: var(--ink); font-size: 16.5px; line-height: 1.95; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose mark { background: var(--mark); color: inherit; padding: 0 2px; border-radius: 3px; }
.prose blockquote { margin: 1.6em 0; padding: 4px 0 4px 20px; border-left: 3px solid; border-image: var(--brand-gradient) 1; color: var(--ink-2); }
.prose pre { padding: 18px 20px; border-radius: var(--radius-sm); background: var(--surface-ink); color: #e9e9e6; overflow-x: auto; font-size: 13px; line-height: 1.7; }
.prose :not(pre) > code { background: var(--surface); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; }
.prose figure img { border-radius: var(--radius-sm); border: 1px solid var(--line); }
.prose figcaption { font-size: var(--fs-xs); color: var(--muted); margin-top: 8px; text-align: center; }
.back { display: inline-block; margin-top: 64px; font-size: 14px; }

/* ==========================================================
   Work pages（作品の記事ページ）
   文章は短く、図・アイコン・イメージ図・数字で伝える
   ========================================================== */
.crumb { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.crumb:hover { color: var(--accent); text-decoration: none; }

/* 記事の頭（1カラムのブログ記事） */
.post-head { margin-bottom: 44px; }
.post-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.post-title { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 18px; margin: 28px 0 16px; }
.post-title .app-icon { flex: none; width: 64px; height: 64px; border-radius: 23%; box-shadow: 0 10px 24px rgba(40, 40, 20, .16); }
.post-title .app-icon.is-mac { border-radius: 0; box-shadow: none; filter: drop-shadow(0 8px 16px rgba(40, 40, 20, .18)); transform: scale(1.15); }
.post-title h1 { flex: 1 1 260px; min-width: 0; word-break: keep-all; overflow-wrap: anywhere; }   /* 日本語は句読点の位置で折り返す */
.post-date { margin-left: auto; font-family: var(--mono); font-size: var(--fs-sm); color: var(--muted); white-space: nowrap; }
.post-date time { margin-right: .35em; }   /* 文字としてのスペースは入れず、見た目だけ少し空ける */
.post-head h1 { font-size: clamp(28px, 4.4vw, 38px); }
.post-head .lead { margin-top: 16px; font-size: 17px; line-height: 1.9; color: var(--ink-2); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.chip { font-family: var(--mono); font-size: 12px; padding: 3px 12px; border-radius: var(--radius-pill); border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); white-space: nowrap; }
.chip.is-accent { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.chip.is-primary { background: var(--primary-soft); border-color: transparent; color: var(--on-primary); }

/* 本文の中の図：本文より少し広く */
.prose .is-wide { width: min(880px, calc(100vw - 2 * var(--gutter))); margin-left: calc(50% - min(440px, 50vw - var(--gutter))); }
.prose > .fig, .prose > .cards, .prose > .stats, .prose > .tools, .prose > .notif { margin-top: 1.8em; margin-bottom: 1.8em; }
.prose .ladder { padding-left: 0; }
.prose .ladder li { font-size: 12px; line-height: 1.5; color: var(--muted); }
.prose .tools p, .prose .card p { color: var(--muted); font-size: 13.5px; line-height: 1.7; }
.prose .card h3 { margin-top: 0; font-size: 15px; }
.prose .notif b { font-size: 13px; }

/* 図のカード */
.fig { margin: 0; padding: clamp(16px, 3vw, 28px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.fig figcaption { margin-top: 14px; font-size: 13px; color: var(--muted); }
.fig .tag-note { display: inline-block; margin-right: 6px; font-family: var(--mono); font-size: 11px; padding: 1px 8px; border-radius: var(--radius-pill); background: var(--primary-soft); color: var(--on-primary); }
.dg-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.dg { display: block; width: 100%; height: auto; font-family: var(--sans); }
@media (max-width: 600px) { .dg-wrap .dg { min-width: 560px; } .dg-wrap { margin: 0 -8px; padding: 0 8px; } }

/* 図（SVG）の塗り分け：トークンに追従するのでダークモードでもそのまま読める */
.dg .box   { fill: var(--surface-solid); stroke: var(--line-strong); stroke-width: 1; }
.dg .box-q { fill: var(--bg); stroke: var(--line); stroke-width: 1; }
.dg .box-ink { fill: var(--surface-ink); }
.dg .box-pri { fill: var(--primary-soft); stroke: var(--primary); stroke-width: 1.5; }
.dg .box-acc { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1.5; }
.dg .t   { fill: var(--ink); font-size: 14px; }
.dg .t-s { fill: var(--muted); font-size: 12px; }
.dg .t-b { font-weight: 700; }
.dg .t-m { font-family: var(--mono); }
.dg .t-inv { fill: #f2f2f0; }
.dg .t-acc { fill: var(--accent); }
.dg .ln  { fill: none; stroke: var(--line-strong); stroke-width: 1.5; }
.dg .ln-acc { fill: none; stroke: var(--accent); stroke-width: 2; }
.dg .ln-pri { fill: none; stroke: var(--primary); stroke-width: 2.5; }
.dg .dash { stroke-dasharray: 4 5; }
.dg .flow { stroke-dasharray: 3 7; animation: dg-flow 1.1s linear infinite; }
.dg .ah { fill: var(--line-strong); }
.dg .ah-acc { fill: var(--accent); }
.dg .dot-pri { fill: var(--primary); }
.dg .dot-acc { fill: var(--accent); }
@keyframes dg-flow { to { stroke-dashoffset: -20; } }
@media (prefers-reduced-motion: reduce) { .dg .flow { animation: none; } }

/* 機能カード */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.card { padding: 18px 18px 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.card .ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); margin-bottom: 12px; }
.card .ic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 15px; line-height: 1.5; }
.card p { margin-top: 4px; font-size: 13.5px; line-height: 1.7; color: var(--muted); }

/* 数字の帯 */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat { padding: 16px 14px; border-top: 2px solid var(--primary); }
.stat b { display: block; font-size: clamp(24px, 3.4vw, 34px); line-height: 1.2; letter-spacing: -.01em; }
.stat b small { font-size: .5em; font-weight: 500; margin-left: 2px; }
.stat span { display: block; margin-top: 6px; font-size: 12.5px; line-height: 1.6; color: var(--muted); }
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 段階のはしご（再試行の間隔など） */
.ladder { list-style: none; padding: 0; display: flex; align-items: flex-end; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.ladder li { flex: 1 0 64px; text-align: center; font-size: 12px; color: var(--muted); }
.ladder li i { display: block; margin: 0 auto 8px; width: 100%; border-radius: 8px 8px 3px 3px; background: linear-gradient(180deg, var(--primary-2), var(--primary)); height: calc(var(--h) * 1px); min-height: 10px; }
.ladder li b { display: block; font-family: var(--mono); font-size: 13px; color: var(--ink); }
.ladder li.is-end i { background: var(--surface-ink); }

/* 次の作品へ */
.next-work { display: flex; align-items: center; gap: 18px; padding: 18px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); transition: border-color .2s, transform .2s; }
.next-work:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-2px); }
.next-work img { width: 56px; height: 56px; border-radius: 23%; }
.next-work img.is-mac { border-radius: 0; transform: scale(1.15); }
.next-work small { display: block; font-size: 12px; color: var(--muted); }
.next-work strong { font-size: 17px; }
.next-work .go { margin-left: auto; font-size: 20px; color: var(--accent); }

/* 一覧の行から記事へ */
.row { position: relative; }
.row-link { display: inline-block; margin-top: 10px; font-size: 13.5px; font-weight: 500; }
.row-link::after { content: ""; position: absolute; inset: 0; }   /* 行全体を押せるように */
.row:hover h3 { color: var(--accent); }
.row h3 { transition: color .2s; }

/* ---------- 画面のイメージ図（HTML で描く。実際の画面とは細部が異なる） ---------- */
/* Mac：実際のパネルのスクリーンショット（角を丸めて切り抜いた透過 PNG） */
.mac-shots { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: clamp(16px, 3vw, 28px); }
.mac-shots > div { flex: 1 1 300px; max-width: 400px; text-align: center; }
.mac-shots.is-single > div { max-width: 420px; }
.mac-shots img, .prose .mac-shots img { display: block; width: 100%; height: auto; border: 0; border-radius: 0; filter: drop-shadow(0 14px 26px rgba(40, 40, 20, .16)); }
.mac-shots span { display: block; margin-top: 12px; font-size: 12.5px; color: var(--muted); }

/* iPhone：ロック画面・通知 */
.phone { position: relative; width: 230px; aspect-ratio: 9 / 19; margin: 0 auto; padding: 10px; border-radius: 42px; background: #1d1e1b; box-shadow: 0 24px 50px rgba(30, 30, 20, .28); }
.phone .scr { position: relative; height: 100%; border-radius: 33px; overflow: hidden; padding: 46px 14px 14px; color: #fff; text-align: center;
  background: radial-gradient(120% 80% at 20% 10%, #ffcf6b 0%, transparent 60%), radial-gradient(100% 70% at 90% 90%, #6fbf78 0%, transparent 60%), #2a2c27; }
.phone .scr::before { content: ""; position: absolute; top: 10px; left: 50%; width: 76px; height: 22px; margin-left: -38px; border-radius: 12px; background: #000; }
.phone .clock { font-size: 54px; font-weight: 700; line-height: 1; letter-spacing: -.02em; }
.phone .date { font-size: 12px; opacity: .85; margin-bottom: 18px; }
.phone .alarm { padding: 12px; border-radius: 18px; text-align: left; background: rgba(255, 255, 255, .22); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.phone .alarm b { display: block; font-size: 22px; line-height: 1.2; }
.phone .alarm small { font-size: 11px; opacity: .9; }
.phone .alarm .btns { display: flex; gap: 8px; margin-top: 10px; }
.phone .alarm .btns span { flex: 1; text-align: center; padding: 6px 0; border-radius: 999px; font-size: 12px; font-weight: 700; background: rgba(255, 255, 255, .28); }
.phone .alarm .btns span.stop { background: #f5c518; color: #2b2a1f; }
.phone .badge { position: absolute; left: 14px; right: 14px; bottom: 16px; display: flex; justify-content: center; gap: 6px; font-size: 10.5px; }
.phone .badge span { padding: 3px 9px; border-radius: 999px; background: rgba(0, 0, 0, .35); }
.notif { display: flex; gap: 10px; align-items: flex-start; max-width: 360px; padding: 12px 14px; border-radius: 18px; background: var(--surface-solid); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: 13px; }
.notif img { width: 34px; height: 34px; border-radius: 9px; flex: none; }
.notif b { display: block; font-size: 13px; }
.notif small { color: var(--muted); font-size: 11px; float: right; }

/* 2つ並べる（会話 → スマホ など） */
.duo { display: grid; grid-template-columns: 1.2fr auto 1fr; gap: 18px; align-items: center; }
.duo .arrow { font-size: 26px; color: var(--accent); }
@media (max-width: 760px) { .duo { grid-template-columns: 1fr; } .duo .arrow { transform: rotate(90deg); justify-self: center; } }

/* 実際の画面（スクリーンショット） */
.shots { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(16px, 4vw, 40px); }
.shots > div { flex: 0 1 250px; text-align: center; }
.shots img, .prose .shots img { display: block; width: 100%; height: auto; border-radius: 30px; border: 1px solid var(--line); box-shadow: 0 16px 36px rgba(40, 40, 20, .14); }
.shots span { display: block; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.shots.is-single > div { flex-basis: 280px; }

/* ツール一覧 */
.tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.tools div { padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.tools code { font-size: 13px; color: var(--accent); }
.tools p { margin-top: 2px; font-size: 13px; color: var(--muted); line-height: 1.6; }
