/* ==========================================================================
   連続思考小説『かもす』 — kamos.io LP
   Clay-animation inspired editorial LP (Kamos Crush × design_web)
   ========================================================================== */

:root {
  /* Palette: 粘土の色を生成りの紙地に */
  --kinari: #F6EFE3;
  --kinari-deep: #EDE3D1;
  --red: #E2553A;
  --red-deep: #B93A22;
  --mustard: #F2B632;
  --mustard-deep: #C98E12;
  --sky: #3E8ED0;
  --sky-deep: #2A6AA3;
  --leaf: #6BAF5B;
  --leaf-deep: #4C8A3E;
  --peach: #FFAB91; /* designographies/claymorphism.json primary */
  --sumi: #2E2A26;
  --sumi-soft: #5A524A;

  /* Scene tints */
  --w1: #F9E3A6;
  --w2: #D3E5F4;
  --w3: #F6EFE3;
  --w4: #DCEBD3;
  --w5: #F9D9CE;

  --f-ja-head: 'Klee One', 'IBM Plex Sans JP', serif;
  --f-ja: 'IBM Plex Sans JP', 'Hiragino Sans', sans-serif;
  --f-en: 'Fraunces', 'IBM Plex Sans JP', serif;

  --ease-clay: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* 指紋のような粘土のざらつき */
  --clay-noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --paper-noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.55' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .28 0 0 0 0 .2 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)'/%3E%3C/svg%3E");
}

html { scroll-behavior: smooth; }

body.kms {
  margin: 0;
  background: var(--kinari);
  color: var(--sumi);
  font-family: var(--f-ja);
  font-feature-settings: "palt" 1;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* 紙地のざらつき（全体に薄く） */
body.kms::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: var(--paper-noise);
  pointer-events: none;
  z-index: 60;
}

.kms ::selection { background: var(--mustard); color: var(--sumi); }

.kms-main { display: block; }

.en {
  font-family: var(--f-en);
  font-variation-settings: "SOFT" 100, "WONK" 1;
  font-style: italic;
  letter-spacing: 0.01em;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ==========================================================================
   Clay material
   ========================================================================== */

.clay {
  --c: var(--red);
  --cd: var(--red-deep);
  background:
    var(--clay-noise),
    radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0) 46%),
    var(--c);
  box-shadow:
    inset 5px 7px 10px rgba(255, 255, 255, 0.28),
    inset -7px -9px 14px rgba(0, 0, 0, 0.22),
    5px 9px 0 rgba(46, 42, 38, 0.14);
  border-radius: 46% 54% 52% 48% / 55% 45% 55% 45%;
}

.c-red     { --c: var(--red);     --cd: var(--red-deep); }
.c-mustard { --c: var(--mustard); --cd: var(--mustard-deep); }
.c-sky     { --c: var(--sky);     --cd: var(--sky-deep); }
.c-leaf    { --c: var(--leaf);    --cd: var(--leaf-deep); }
.c-peach   { --c: var(--peach);   --cd: #E07A5C; }
.c-kinari  { --c: #FFF8EC;        --cd: #D9CBB2; }
.c-sumi    { --c: var(--sumi);    --cd: #000; }

/* コマ撮りのような小刻みな震え（12fps 相当） */
@keyframes jitter {
  0%   { translate: 0 0;        rotate: 0deg; }
  25%  { translate: 0.6px -0.5px; rotate: 0.5deg; }
  50%  { translate: -0.5px 0.4px; rotate: -0.4deg; }
  75%  { translate: 0.4px 0.6px;  rotate: 0.3deg; }
  100% { translate: 0 0;        rotate: 0deg; }
}
.jitter { animation: jitter 0.5s steps(1, end) infinite; }
.jitter:nth-child(2n) { animation-delay: -0.17s; }
.jitter:nth-child(3n) { animation-delay: -0.33s; }

/* 線のゆらぎ（boil）: JS が見えている .boil 要素だけに filter を当てる */




/* ==========================================================================
   Scenes (各週の舞台)
   ========================================================================== */

.scene {
  position: relative;
  padding: clamp(96px, 12vw, 168px) clamp(20px, 6vw, 96px);
  background: var(--bg, var(--kinari));
}

/* 粘土をちぎったような波の縁（前の舞台に 1px 重ねて白漏れを防ぐ） */
.scene + .scene::before {
  content: "";
  position: absolute;
  left: 0; right: 0;
  top: -38px;
  height: 40px;
  background: var(--bg, var(--kinari));
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 40' preserveAspectRatio='none'%3E%3Cpath d='M0 40V22C90 4 170 30 260 18S420 0 520 16 700 34 800 20 980 2 1080 16 1170 26 1200 20V40Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 40' preserveAspectRatio='none'%3E%3Cpath d='M0 40V22C90 4 170 30 260 18S420 0 520 16 700 34 800 20 980 2 1080 16 1170 26 1200 20V40Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  pointer-events: none;
}

.scene-inner {
  max-width: 1240px;
  margin: 0 auto;
  position: relative;
}

/* サブタイトル札（朝ドラの「第◯週」カード） */
.episode-card {
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px 30px 24px;
  rotate: -2.5deg;
  border-radius: 28px 34px 30px 26px / 30px 26px 34px 28px;
  margin-bottom: clamp(40px, 6vw, 72px);
  color: #fff;
  position: relative;
}
.episode-card .ep-no {
  font-family: var(--f-en);
  font-variation-settings: "SOFT" 100, "WONK" 1;
  font-style: italic;
  font-size: 15px;
  letter-spacing: 0.06em;
  opacity: 0.9;
}
.episode-card .ep-no b {
  font-family: var(--f-ja-head);
  font-style: normal;
  font-weight: 600;
  font-size: 17px;
  margin-right: 10px;
  letter-spacing: 0.1em;
}
.episode-card h2 {
  margin: 0;
  font-family: var(--f-ja-head);
  font-weight: 600;
  font-size: clamp(30px, 4.6vw, 56px);
  line-height: 1.25;
  letter-spacing: 0.04em;
  text-shadow: 2px 3px 0 rgba(0, 0, 0, 0.16);
}
.episode-card.on-light { color: var(--sumi); }
.episode-card.on-light h2 { text-shadow: 2px 3px 0 rgba(255, 255, 255, 0.5); }

/* 舞台の左右分割（アシンメトリー） */
.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}
.split.reverse { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.split.reverse > .prose { order: 2; }

@media (max-width: 900px) {
  .split, .split.reverse { grid-template-columns: 1fr; }
  .split.reverse > .prose { order: 0; }
}

/* ==========================================================================
   Prose typeset by zine.js
   ========================================================================== */

.kms [data-zine="container"] {
  max-width: none;
  margin: 0;
  padding: 0;
  background: transparent;
  color: var(--sumi);
  --zine-ink-primary: var(--sumi);
  --zine-ink-secondary: var(--sumi);
  --zine-ink-muted: var(--sumi-soft);
  --zine-ink-border: rgba(46, 42, 38, 0.25);
  --zine-paper-deep: rgba(255, 255, 255, 0.5);
  --zine-accent: var(--red-deep);
  --zine-accent-blue: var(--red-deep);
}

.kms [data-zine] p {
  font-family: var(--f-ja);
  font-size: clamp(16px, 1.25vw, 17.5px);
  line-height: 2.05;
  letter-spacing: 0.04em;
  color: var(--sumi);
  margin-bottom: 1.4em;
}

.kms .zine-latin {
  font-family: var(--f-en);
  font-variation-settings: "SOFT" 100, "WONK" 0;
}

.kms [data-zine] .zine-cutin,
.kms [data-zine] [data-zine-cutin] {
  font-family: var(--f-ja-head);
  font-weight: 600;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.7;
  text-align: left;
  white-space: normal;
  border: 0;
  padding: 0 0 0 28px;
  margin: 1.6em 0 1.8em;
  position: relative;
  color: var(--sumi);
}
.kms [data-zine] .zine-cutin::before {
  content: "";
  position: absolute;
  left: 0; top: 0.35em; bottom: 0.35em;
  width: 10px;
  border-radius: 6px;
  background: var(--clay-noise), var(--red);
  box-shadow: inset -2px -3px 4px rgba(0, 0, 0, 0.25), inset 2px 2px 3px rgba(255, 255, 255, 0.3);
}

.kms .zine-sidenote {
  font-family: var(--f-ja);
  font-size: 13px;
  line-height: 1.85;
  color: var(--sumi-soft);
  border-left: 3px solid var(--leaf);
}
.kms .zine-sidenote-ref { color: var(--leaf-deep); }

.small-note {
  font-size: 13px;
  line-height: 1.8;
  color: var(--sumi-soft);
  margin-top: 28px;
}

/* ==========================================================================
   OP — オープニング
   ========================================================================== */

.op {
  --bg: var(--kinari);
  min-height: 100svh;
  padding-top: clamp(120px, 14vh, 160px);
  padding-bottom: 80px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.op-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(24px, 5vw, 80px);
  align-items: center;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.op-kicker {
  font-family: var(--f-en);
  font-variation-settings: "SOFT" 100, "WONK" 1;
  font-style: italic;
  font-size: clamp(15px, 1.4vw, 19px);
  color: var(--sumi-soft);
  margin: 0 0 18px 6px;
}

.title-svg {
  display: block;
  width: clamp(290px, 56vw, 760px);
  height: auto;
  overflow: visible;
}
.title-svg .stroke-sh { fill: none; stroke: rgba(46, 42, 38, 0.22); stroke-width: 15; stroke-linecap: round; stroke-linejoin: round; transform: translate(3px, 5px); }
.title-svg .stroke-body { fill: none; stroke: var(--c); stroke-width: 13; stroke-linecap: round; stroke-linejoin: round; }
.title-svg .stroke-dk { fill: none; stroke: var(--cd); stroke-width: 13; stroke-linecap: round; stroke-linejoin: round; opacity: 0.55; transform: translate(1.4px, 2.2px); }
.title-svg .stroke-hl { fill: none; stroke: rgba(255, 255, 255, 0.55); stroke-width: 3.6; stroke-linecap: round; stroke-linejoin: round; transform: translate(-2px, -2.6px); }

.title-char {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: squash-in 0.9s steps(1, end) both;
}

@keyframes squash-in {
  0%   { transform: scale(0.1, 0.1); opacity: 0; }
  12%  { transform: scale(0.5, 0.4); opacity: 1; }
  28%  { transform: scale(1.22, 0.68); }
  46%  { transform: scale(0.86, 1.16); }
  64%  { transform: scale(1.06, 0.94); }
  82%  { transform: scale(0.98, 1.02); }
  100% { transform: scale(1, 1); opacity: 1; }
}

.op-lead {
  font-family: var(--f-ja-head);
  font-weight: 600;
  font-size: clamp(19px, 2vw, 26px);
  line-height: 1.8;
  letter-spacing: 0.06em;
  margin: clamp(28px, 4vw, 44px) 0 0 8px;
  max-width: 30em;
  animation: fade-up 0.8s var(--ease-out) 2.9s both;
}
.op-lead .mark { background: linear-gradient(transparent 62%, rgba(242, 182, 50, 0.6) 62%); }

.op-vertical {
  writing-mode: vertical-rl;
  font-family: var(--f-ja-head);
  font-weight: 600;
  font-size: clamp(20px, 2.2vw, 28px);
  letter-spacing: 0.4em;
  color: var(--sumi);
  padding: 30px 18px;
  border-radius: 999px;
  animation: fade-up 0.8s var(--ease-out) 2.6s both;
}
.op-vertical small {
  display: block;
  font-family: var(--f-en);
  font-style: italic;
  font-size: 13px;
  letter-spacing: 0.12em;
  margin-top: 18px;
  color: var(--sumi-soft);
  font-variation-settings: "SOFT" 100, "WONK" 1;
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

/* 転がってくる粘土の玉 */
.op-balls { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.op-ball {
  position: absolute;
  width: var(--s, 60px);
  height: var(--s, 60px);
  left: var(--x);
  bottom: 71px; /* 粘土のひもの上に乗せる */
  animation: roll-in 1.5s steps(16, end) both;
  animation-delay: var(--d, 0s);
}
.op-ball.floating { bottom: auto; top: var(--y); }
.op-ball > span { display: block; width: 100%; height: 100%; }
@keyframes roll-in {
  from { transform: translateX(-110vw) rotate(-900deg); }
  to   { transform: none; }
}

/* 粘土のひも（OP の地面） */
.op-ground {
  position: absolute;
  left: -2%; right: -2%;
  bottom: 54px;
  height: 18px;
  border-radius: 999px;
  z-index: 1;
}

.op-scroll {
  position: absolute;
  left: clamp(20px, 6vw, 96px);
  bottom: 96px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  color: var(--sumi-soft);
  z-index: 3;
  text-decoration: none;
  animation: fade-up 0.8s var(--ease-out) 3.3s both;
}
.op-scroll .dot {
  width: 22px; height: 22px;
  animation: hop 1.2s steps(6, end) infinite;
}
@keyframes hop {
  0%, 100% { transform: translateY(0) scale(1.1, 0.9); }
  40%      { transform: translateY(-14px) scale(0.92, 1.08); }
  70%      { transform: translateY(0) scale(1.15, 0.85); }
}

@media (max-width: 760px) {
  .op-grid { grid-template-columns: 1fr; }
  .op-vertical { writing-mode: horizontal-tb; letter-spacing: 0.2em; padding: 14px 22px; justify-self: start; }
  .op-vertical small { display: inline; margin: 0 0 0 12px; }
  .op-scroll { bottom: 172px; }
}

/* ==========================================================================
   Week 1 — はやい、はやい、はやい。
   ========================================================================== */

.w1 { --bg: var(--w1); }

.belt-stage {
  position: relative;
  aspect-ratio: 7 / 5;
  width: 100%;
}
.belt {
  position: absolute;
  left: 0; right: 0;
  top: 58%;
  height: 74px;
  border-radius: 999px;
  overflow: hidden;
}
.belt-track {
  position: absolute;
  top: 50%;
  left: 0;
  display: flex;
  gap: 18px;
  translate: 0 -50%;
  animation: belt 4s steps(24, end) infinite;
  white-space: nowrap;
}
.belt-item {
  flex: none;
  padding: 10px 18px;
  border-radius: 16px 20px 14px 18px;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  letter-spacing: 0.06em;
}
@keyframes belt {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.figure {
  position: absolute;
  left: 18%;
  bottom: 42%;
  width: 22%;
  aspect-ratio: 1 / 1.45;
}
.figure .head {
  position: absolute; left: 18%; top: 0; width: 64%; aspect-ratio: 1;
  border-radius: 50% 48% 52% 50%;
}
.figure .body {
  position: absolute; left: 6%; bottom: 0; width: 88%; height: 52%;
  border-radius: 48% 52% 22% 26% / 60% 60% 18% 18%;
}
.figure .eye {
  position: absolute; top: 42%; width: 9%; aspect-ratio: 1; border-radius: 50%;
  background: var(--sumi);
}
.figure .eye.l { left: 34%; }
.figure .eye.r { left: 56%; }

.bubble {
  position: absolute;
  left: 40%;
  top: 6%;
  padding: 16px 22px;
  border-radius: 30px 34px 32px 8px;
  font-family: var(--f-ja-head);
  font-weight: 600;
  font-size: clamp(16px, 1.6vw, 22px);
  color: var(--sumi);
}

.honto {
  position: absolute;
  right: 2%;
  top: 0;
  writing-mode: vertical-rl;
  font-family: var(--f-ja-head);
  font-weight: 600;
  font-size: clamp(34px, 4.2vw, 58px);
  letter-spacing: 0.08em;
  line-height: 1;
  color: var(--red);
  text-shadow: 3px 5px 0 rgba(46, 42, 38, 0.16);
}

/* ==========================================================================
   Week 2 — 思いつきが、ころがる。
   ========================================================================== */

.w2 { --bg: var(--w2); }

.pebble-field {
  position: relative;
  min-height: 460px;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 18px 20px;
  padding: 24px 0;
}
.pebble {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 18px 26px;
  font-weight: 500;
  font-size: clamp(15px, 1.3vw, 18px);
  letter-spacing: 0.05em;
  color: #fff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
  rotate: var(--r, 0deg);
}
.pebble.c-mustard, .pebble.c-kinari, .pebble.c-peach { color: var(--sumi); text-shadow: none; }

.pebble-field .pebble {
  opacity: 0;
  transform: translateY(-240px);
}
.pebble-field.is-in .pebble {
  animation: drop 0.9s steps(1, end) both;
  animation-delay: calc(var(--i) * 0.12s);
}
@keyframes drop {
  0%   { opacity: 1; transform: translateY(-240px) scale(1, 1); }
  20%  { transform: translateY(-120px) scale(0.95, 1.05); }
  40%  { transform: translateY(0) scale(1.18, 0.8); }
  58%  { transform: translateY(-22px) scale(0.95, 1.05); }
  76%  { transform: translateY(0) scale(1.06, 0.94); }
  100% { opacity: 1; transform: translateY(0) scale(1, 1); }
}
.pebble-field:nth-child(1) .pebble:nth-child(odd) { margin-top: 18px; }

/* ==========================================================================
   Week 3 — つながりが、見つかる。（体験）
   ========================================================================== */

.w3 { --bg: var(--w3); }

.w3-head {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: end;
  margin-bottom: 40px;
}
@media (max-width: 900px) { .w3-head { grid-template-columns: 1fr; } }

.connect {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  gap: clamp(20px, 3vw, 40px);
  align-items: start;
}
@media (max-width: 900px) { .connect { grid-template-columns: 1fr; } }

.stage {
  position: relative;
  aspect-ratio: 1000 / 620;
  border-radius: 40px 48px 44px 36px / 44px 36px 48px 40px;
  background:
    var(--clay-noise),
    #EFE2CB;
  box-shadow:
    inset 8px 10px 18px rgba(255, 255, 255, 0.5),
    inset -10px -14px 22px rgba(120, 90, 50, 0.16);
}
@media (max-width: 640px) { .stage { aspect-ratio: 3 / 4.2; } }

.stage svg.strings {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.string-sh { fill: none; stroke: rgba(46, 42, 38, 0.18); stroke-width: 9; stroke-linecap: round; transform: translate(2px, 4px); }
.string { fill: none; stroke: var(--sc, var(--red)); stroke-width: 7; stroke-linecap: round; }
.string-hl { fill: none; stroke: rgba(255, 255, 255, 0.5); stroke-width: 2; stroke-linecap: round; transform: translate(-1px, -1.6px); }
.string-g path { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw-string 0.7s steps(8, end) forwards; }
@keyframes draw-string { to { stroke-dashoffset: 0; } }

.node {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  border: 0;
  cursor: pointer;
  padding: 14px 20px;
  font: 500 clamp(13px, 1.25vw, 16px)/1.4 var(--f-ja);
  letter-spacing: 0.04em;
  color: #fff;
  white-space: nowrap;
  transition: transform 0.25s var(--ease-clay);
  z-index: 2;
}
.node.c-mustard, .node.c-kinari, .node.c-peach { color: var(--sumi); }
.node:hover { transform: translate(-50%, -54%) scale(1.05); }
.node:focus-visible { outline: 3px dashed var(--sumi); outline-offset: 6px; }
.node.is-picked {
  transform: translate(-50%, -60%) scale(1.12);
  box-shadow:
    inset 5px 7px 10px rgba(255, 255, 255, 0.28),
    inset -7px -9px 14px rgba(0, 0, 0, 0.22),
    8px 18px 0 rgba(46, 42, 38, 0.16);
}
/* ヒント：選ぶべき玉に点線の輪を残す（見つけるか、別のヒントを出すまで） */
.node.is-hinted::after {
  content: "";
  position: absolute;
  inset: -9px;
  border: 3px dashed var(--sumi);
  border-radius: inherit;
  pointer-events: none;
}

@media (max-width: 640px) {
  .node { left: var(--mx, var(--x)); top: var(--my, var(--y)); padding: 10px 14px; }
}

.notebook {
  position: relative;
  padding: 28px 26px 30px;
  border-radius: 26px 30px 28px 24px;
  background: var(--clay-noise), #FFF8EC;
  box-shadow:
    inset 4px 6px 10px rgba(255, 255, 255, 0.7),
    inset -6px -8px 12px rgba(120, 90, 50, 0.12),
    6px 10px 0 rgba(46, 42, 38, 0.1);
}
.notebook-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
}
.notebook-head h3 {
  margin: 0;
  font-family: var(--f-ja-head);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 0.06em;
}
.counter {
  font-family: var(--f-en);
  font-variation-settings: "SOFT" 100, "WONK" 1;
  font-size: 22px;
  color: var(--red-deep);
  white-space: nowrap;
}
.status {
  min-height: 3.4em;
  font-size: 14px;
  line-height: 1.7;
  color: var(--sumi-soft);
  margin: 0 0 14px;
}
.found-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 340px;
  overflow: auto;
}
.found-list li {
  border-left: 6px solid var(--sc, var(--red));
  padding: 4px 0 4px 12px;
  animation: fade-up 0.5s var(--ease-out) both;
}
.found-list .pair {
  font-size: 12px;
  color: var(--sumi-soft);
  letter-spacing: 0.04em;
}
.found-list .insight {
  font-family: var(--f-ja-head);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.6;
}
.nb-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.btn-soft {
  border: 0;
  cursor: pointer;
  padding: 10px 16px;
  border-radius: 14px 18px 16px 12px;
  font: 500 13px/1 var(--f-ja);
  letter-spacing: 0.06em;
  color: var(--sumi);
  transition: transform 0.2s var(--ease-clay);
}
.btn-soft:hover { transform: translateY(-2px); }
.btn-soft:focus-visible { outline: 3px dashed var(--sumi); outline-offset: 4px; }

/* ==========================================================================
   Week 4 — 軸を、置いてみる。
   ========================================================================== */

.w4 { --bg: var(--w4); }

.w4 .prose { max-width: 1080px; }

.board {
  position: relative;
  margin-top: clamp(40px, 6vw, 72px);
  aspect-ratio: 16 / 10;
  border-radius: 48px 40px 52px 44px / 40px 52px 44px 48px;
  background: var(--clay-noise), #C9DFBC;
  box-shadow:
    inset 10px 12px 22px rgba(255, 255, 255, 0.45),
    inset -12px -16px 26px rgba(40, 80, 30, 0.18);
}
@media (max-width: 760px) { .board { aspect-ratio: 3 / 4.4; } }

.rod {
  position: absolute;
  border-radius: 999px;
}
.rod.x { left: 6%; right: 6%; top: 50%; height: 16px; translate: 0 -50%; }
.rod.y { top: 7%; bottom: 7%; left: 50%; width: 16px; translate: -50% 0; }

.axis-label {
  position: absolute;
  font-size: clamp(11px, 1.1vw, 14px);
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--sumi);
  background: rgba(255, 248, 236, 0.85);
  padding: 6px 12px;
  border-radius: 999px;
  white-space: nowrap;
  z-index: 2;
}
.axis-label.l { left: 2%; top: 50%; translate: 0 -170%; }
.axis-label.r { right: 2%; top: 50%; translate: 0 -170%; }
.axis-label.t { top: 2%; left: 50%; translate: 12px 0; }
.axis-label.b { bottom: 2%; left: 50%; translate: 12px 0; }

.quad {
  position: absolute;
  width: 34%;
  padding: clamp(14px, 2vw, 26px) clamp(16px, 2.2vw, 30px);
  color: var(--sumi);
  z-index: 1;
}
.quad .q-key {
  font-family: var(--f-en);
  font-variation-settings: "SOFT" 100, "WONK" 1;
  font-style: italic;
  font-size: clamp(22px, 2.6vw, 34px);
  line-height: 1;
}
.quad .q-title {
  display: block;
  margin-top: 6px;
  font-family: var(--f-ja-head);
  font-weight: 600;
  font-size: clamp(14px, 1.5vw, 19px);
  line-height: 1.5;
}
.quad .q-desc {
  display: block;
  margin-top: 6px;
  font-size: clamp(11px, 1vw, 13px);
  line-height: 1.7;
}
.quad.tl { left: 9%;  top: 14%; rotate: -2deg; }
.quad.tr { right: 9%; top: 12%; rotate: 1.5deg; }
.quad.bl { left: 8%;  bottom: 13%; rotate: 1deg; }
.quad.br { right: 8%; bottom: 14%; rotate: -1.5deg; }
.quad.muted { opacity: 0.62; filter: saturate(0.6); }
.quad.picked { color: #fff; }
.quad.picked .q-desc { opacity: 0.95; }

.pin {
  position: absolute;
  right: -14px;
  top: -30px;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  font-family: var(--f-ja-head);
  font-weight: 600;
  font-size: 13px;
  color: var(--sumi);
  rotate: 8deg;
}

@media (max-width: 760px) {
  .quad { width: 40%; }
  .quad .q-desc { display: none; }
  .axis-label.l, .axis-label.r { translate: 0 70%; }
}

/* ==========================================================================
   Week 5 — 決めるのは、わたし。
   ========================================================================== */

.w5 { --bg: var(--w5); }

.forks {
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 4vw, 44px);
  margin-top: 8px;
}
.fork-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
}
@media (max-width: 760px) { .fork-row { grid-template-columns: 1fr; gap: 10px; } }
.fork-label {
  font-family: var(--f-ja-head);
  font-weight: 600;
  font-size: 15px;
  line-height: 1.5;
}
.fork-label .en { display: block; font-size: 13px; color: var(--sumi-soft); }
.fork-options { display: flex; flex-wrap: wrap; gap: 12px 14px; align-items: center; }
.opt {
  padding: 10px 16px;
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: 0.03em;
  border-radius: 18px 22px 20px 16px;
  color: var(--sumi);
}
.opt.ghost {
  background: rgba(255, 248, 236, 0.55);
  color: var(--sumi-soft);
  box-shadow: inset 0 0 0 1.5px rgba(46, 42, 38, 0.18);
}
.opt.ghost.struck { text-decoration: line-through; text-decoration-color: rgba(46, 42, 38, 0.35); }
.opt.chosen {
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  padding: 14px 20px;
}
.opt.handmade {
  color: var(--sumi);
  font-family: var(--f-ja-head);
  font-weight: 600;
  font-size: 16px;
  padding: 16px 22px;
  position: relative;
  rotate: -1.5deg;
}
.opt.handmade::after {
  content: "自分の言葉";
  position: absolute;
  top: -14px;
  right: 14px;
  font: 600 11px/1 var(--f-ja);
  letter-spacing: 0.08em;
  background: var(--sumi);
  color: var(--kinari);
  padding: 5px 9px;
  border-radius: 999px;
}

/* 記録（タイムライン） */
.log {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}
.log::before {
  content: "";
  position: absolute;
  left: 58px;
  top: 8px;
  bottom: 8px;
  width: 8px;
  border-radius: 999px;
  background: var(--clay-noise), var(--red);
  box-shadow: inset -2px -3px 4px rgba(0, 0, 0, 0.2);
}
.log li {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 36px;
  padding: 0 0 26px;
  position: relative;
}
.log li::before {
  content: "";
  position: absolute;
  left: 53px;
  top: 6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--clay-noise), var(--kinari);
  box-shadow: inset -2px -3px 4px rgba(0, 0, 0, 0.15), 2px 3px 0 rgba(46, 42, 38, 0.15);
}
.log time {
  font-family: var(--f-en);
  font-variation-settings: "SOFT" 100, "WONK" 1;
  font-size: 16px;
  color: var(--red-deep);
  padding-top: 2px;
}
.log p { margin: 0; font-size: 15px; line-height: 1.8; }
.log p strong { font-family: var(--f-ja-head); font-weight: 600; font-size: 16px; }

/* ==========================================================================
   Final — あなたの問いを、かもす。
   ========================================================================== */

.final {
  --bg: var(--kinari);
  padding-bottom: clamp(120px, 14vw, 200px);
  overflow: hidden;
}
.final-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: end;
}
@media (max-width: 900px) { .final-grid { grid-template-columns: 1fr; } }

.final h2 {
  font-family: var(--f-ja-head);
  font-weight: 600;
  font-size: clamp(38px, 6.4vw, 92px);
  line-height: 1.3;
  letter-spacing: 0.03em;
  margin: 0 0 32px;
}
.final h2 .accent { color: var(--red); text-shadow: 3px 5px 0 rgba(46, 42, 38, 0.14); }
.final p.lead {
  font-size: clamp(16px, 1.3vw, 18px);
  line-height: 2.05;
  letter-spacing: 0.04em;
  max-width: 34em;
  margin: 0 0 44px;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 24px 40px 24px 34px;
  text-decoration: none;
  color: #fff;
  font-family: var(--f-ja-head);
  font-weight: 600;
  font-size: clamp(18px, 1.8vw, 22px);
  letter-spacing: 0.08em;
  border-radius: 999px 900px 999px 920px;
  transition: transform 0.3s var(--ease-clay), box-shadow 0.3s var(--ease-clay);
}
.cta:hover {
  transform: translateY(-4px) scale(1.03, 0.97);
  box-shadow:
    inset 5px 7px 10px rgba(255, 255, 255, 0.28),
    inset -7px -9px 14px rgba(0, 0, 0, 0.22),
    8px 16px 0 rgba(46, 42, 38, 0.16);
}
.cta:active { transform: translateY(2px) scale(1.06, 0.9); }
.cta:focus-visible { outline: 3px dashed var(--sumi); outline-offset: 6px; }
.cta .en { font-size: 15px; opacity: 0.9; }
.cta-arrow { width: 26px; height: 26px; }

.credits {
  font-size: 13px;
  line-height: 2.1;
  color: var(--sumi-soft);
  border-left: 6px solid var(--mustard);
  padding-left: 18px;
}
.credits dt { font-size: 11px; letter-spacing: 0.12em; }
.credits dd { margin: 0 0 8px; font-family: var(--f-ja-head); font-weight: 600; font-size: 15px; color: var(--sumi); }

.owari {
  width: 108px;
  height: 108px;
  display: grid;
  place-items: center;
  font-family: var(--f-ja-head);
  font-weight: 600;
  font-size: 46px;
  color: #fff;
  margin: 0 0 28px auto;
  rotate: -8deg;
}

/* ==========================================================================
   Reveal (scroll)
   ========================================================================== */

.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); }
.reveal.is-in { opacity: 1; transform: none; }

/* ==========================================================================
   Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.001ms !important;
  }
  .belt-track { animation: none; }
  .pebble-field .pebble { opacity: 1; transform: none; }
  .reveal { opacity: 1; transform: none; }
}
