@font-face {
  font-family: "Zen Maru Gothic";
  src: url("assets/zen-maru-gothic-bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
:root {
  color-scheme: light;
  --milk: #fff9fc;
  --white: #fffdfd;
  --ink: #3b232e;
  --muted: #684653;
  --berry: #a82554;
  --berry-dark: #84203f;
  --petal: #f5d8e4;
  --line: #ebccd9;
  --lilac: #f2e8f9;
  --mint: #dcefe7;
  --font: "Hiragino Sans", "Yu Gothic UI", Meiryo, "Noto Sans CJK JP", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 5rem; }
body { margin: 0; background: var(--milk); color: var(--ink); font: 1rem/1.8 var(--font); }
::selection { background: #f7c5da; color: var(--ink); }
a { color: var(--berry-dark); text-underline-offset: .28em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--berry); outline-offset: 4px; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { line-height: 1.35; }
h1, h2 { text-wrap: balance; }
img { display: block; max-width: 100%; }
.wrap { width: min(100% - 5rem, 74rem); margin-inline: auto; }
.section { padding-block: clamp(4.5rem, 8vw, 7rem); }
.skip { position: fixed; z-index: 10; inset: .75rem auto auto .75rem; padding: .5rem 1rem; background: white; translate: 0 -180%; }
.skip:focus { translate: 0 0; }

.site-header { background: var(--milk); border-bottom: 1px solid var(--line); }
.header-inner, .footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.header-inner { min-height: 4.25rem; }
.site-name { color: var(--ink); font-weight: 700; text-decoration: none; }
nav { display: flex; align-items: center; gap: clamp(1rem, 4vw, 3rem); }
nav a { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--ink); text-decoration: none; font-size: .95rem; font-weight: 700; white-space: nowrap; }
nav a:hover { color: var(--berry); text-decoration: underline; }

.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.22fr); gap: clamp(2rem, 5vw, 5.25rem); align-items: center; padding-block: clamp(3.5rem, 8vw, 7.5rem); }
.hero h1 { font-family: "Zen Maru Gothic", var(--font); font-size: clamp(2.75rem, 4.15vw, 4.15rem); font-weight: 700; letter-spacing: -.035em; line-height: 1.2; text-wrap: initial; }
.hero em { color: var(--berry); font-style: normal; }
.hero-copy p { margin-top: 1.55rem; max-width: 28rem; color: var(--muted); font-size: clamp(1rem, 1.42vw, 1.125rem); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.35rem; margin-top: 1.65rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 3.1rem; padding: .65rem 1.25rem; border-radius: 100vw; background: var(--berry); color: white; font-weight: 700; text-decoration: none; }
.button:hover { background: var(--berry-dark); }
.text-link { font-weight: 700; }
.hero-view img { width: 100%; height: auto; border-radius: .85rem; }
.hero-view figcaption { margin-top: .5rem; text-align: right; }
figcaption { color: var(--muted); font-size: .875rem; }

.guide { background: var(--white); border-block: 1px solid var(--line); }
.section-intro h2 { font: 700 clamp(2rem, 4vw, 3.45rem)/1.32 "Zen Maru Gothic", var(--font); letter-spacing: -.025em; }
.section-intro p { margin-top: .85rem; color: var(--muted); max-width: 40rem; }
.examples { border-top: 1px solid var(--line); }
.task-list { list-style: none; padding: 0; margin: 2rem 0 1.15rem; }
.task { display: grid; grid-template-columns: minmax(10rem, .65fr) minmax(0, 2fr); gap: 1rem 2rem; padding-block: 1.35rem; border-top: 1px solid var(--line); }
.task:last-child { border-bottom: 1px solid var(--line); }
.task h3 { font-size: clamp(1.12rem, 2vw, 1.4rem); }
.task-scope { margin-top: .35rem; color: var(--muted); font-size: .875rem; }
.task dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem 1.25rem; margin: 0; }
.task dt { color: var(--muted); font-size: .875rem; font-weight: 700; }
.task dd { margin: .35rem 0 0; padding: .65rem .85rem; overflow-wrap: anywhere; }
.task-request dd { background: #fae8ef; border-radius: .75rem; font-weight: 700; }
.walkthrough { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1fr); align-items: center; gap: clamp(1.6rem, 6vw, 6rem); margin-top: 2rem; }
.walkthrough h3 { font-size: clamp(1.2rem, 2.2vw, 1.65rem); }
.walkthrough p { margin-top: .5rem; color: var(--muted); }
.walkthrough strong { color: var(--ink); }
.chat-steps { display: grid; gap: 1.7rem; list-style: none; padding: 0; margin: 0; }
.chat-steps li { display: grid; grid-template-columns: 2rem 1fr; gap: .8rem; align-items: start; }
.step-number { display: grid; place-items: center; width: 2rem; aspect-ratio: 1; border-radius: 50%; background: var(--berry); color: white; font-weight: 700; line-height: 1; }
.screen { display: grid; place-items: center; background: var(--lilac); padding: 1.2rem; border-radius: .85rem; }
.chat-capture { display: block; position: relative; width: min(100%, 24rem); }
.screen img { width: 100%; height: auto; }
.capture-input, .capture-reply { position: absolute; left: 3%; transform: translate(-50%, -50%); border: 2px solid var(--white); }
.capture-input { top: 92%; }
.capture-reply { top: 24%; }
.guide-figure figcaption { margin-top: .45rem; text-align: center; }

.diagram { margin-top: 2rem; }
.diagram > figcaption { margin-bottom: .55rem; font-weight: 700; }
.work-map { display: grid; grid-template-columns: minmax(0, 1fr) clamp(2.15rem, 11vw, 8rem) minmax(0, 1fr) clamp(2.15rem, 11vw, 8rem) minmax(0, 1fr); }
.node { display: grid; align-content: center; gap: .35rem; text-align: center; padding: clamp(.65rem, 2vw, 1.4rem) .4rem; border-radius: .7rem; }
.node h3 { font: 700 clamp(1.18rem, 3.65vw, 3rem)/1.1 "Zen Maru Gothic", var(--font); }
.node p { line-height: 1.6; }
.visitor { background: var(--mint); }
.brain { background: var(--petal); }
.hands { background: var(--lilac); }
.direction { position: relative; display: block; border-radius: 1em; background: currentColor; }
.direction::after { content: ""; position: absolute; width: .45rem; height: .45rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; }
.horizontal-flows span { display: flex; align-items: center; gap: .55rem; color: var(--muted); font-size: .875rem; font-weight: 700; }
.horizontal-flows { display: grid; align-content: center; padding-inline: .5rem; }
.horizontal-flows i { flex: 1; height: 2px; }
.right::after { right: 0; top: -2.5px; transform: rotate(-45deg); }
.left::after { left: 0; top: -2.5px; transform: rotate(135deg); }
.follow { margin: 2.2rem 0 0; padding: .65rem 0 0; min-inline-size: 0; border: 0; }
.follow legend { font-size: 1.15rem; font-weight: 700; padding: 0; }
.follow input { position: absolute; appearance: none; width: 1px; height: 1px; margin: 0; opacity: 0; }
.follow label { display: inline-flex; align-items: center; min-height: 2.75rem; padding: .4rem .8rem; margin: 0 .2rem .38rem 0; border-radius: 100vw; border: 1px solid var(--line); color: var(--berry-dark); font-size: .875rem; font-weight: 700; cursor: pointer; }
.follow label:hover { background: var(--petal); }
.follow input:focus-visible + label { outline: 3px solid var(--berry); outline-offset: 3px; }
.follow input:checked + label { color: white; background: var(--berry); border-color: var(--berry); }
.flow-copy { margin-top: .45rem; border-radius: .75rem; background: #fae8ef; padding: .95rem 1.15rem; }
.flow-copy p { display: none; min-height: 3.5em; align-content: center; }
.flow-copy strong { display: block; color: var(--berry-dark); }
.inside:has(#flow-talk:checked, #flow-reply:checked) .visitor,
.inside:has(#flow-talk:checked) .brain,
.inside:has(#flow-delegate:checked) .brain,
.inside:has(#flow-delegate:checked) .hands,
.inside:has(#flow-work:checked) .brain,
.inside:has(#flow-work:checked) .hands,
.inside:has(#flow-reply:checked) .brain { box-shadow: inset 0 0 0 2px var(--berry); }
.inside:has(#flow-talk:checked) .dialogue span:first-child,
.inside:has(#flow-delegate:checked) .assignment span:first-child,
.inside:has(#flow-work:checked) .assignment span:last-child,
.inside:has(#flow-reply:checked) .dialogue span:last-child { color: var(--berry); }
#flow-talk:checked ~ .flow-copy .flow-talk,
#flow-delegate:checked ~ .flow-copy .flow-delegate,
#flow-work:checked ~ .flow-copy .flow-work,
#flow-reply:checked ~ .flow-copy .flow-reply { display: block; }
.role-details { margin-top: 1.7rem; border-top: 1px solid var(--line); }
.role-details summary { padding-block: .8rem; font-weight: 700; cursor: pointer; }
.role-details dl { display: grid; grid-template-columns: max-content 1fr; gap: .6rem 1rem; margin: .35rem 0 1rem; }
.role-details dt { font-weight: 700; }
.role-details dd { margin: 0; color: var(--muted); }
.site-footer { border-top: 1px solid var(--line); }
.footer-inner { min-height: 5.5rem; }

@media (max-width: 62rem) {
  .wide { display: none; }
  .hero { grid-template-columns: minmax(0, .9fr) minmax(0, 1fr); }
  .hero h1 { font-size: clamp(2.2rem, 4.45vw, 3.5rem); }
}
@media (max-width: 48rem) {
  .wrap { width: calc(100% - 3rem); }
  .hero { grid-template-columns: 1fr; padding-block: 3.1rem 4.4rem; }
  .hero h1 { font-size: clamp(2.6rem, 8.1vw, 4rem); }
  .hero-copy p { margin-top: .9rem; }
  .hero-view { max-width: 38rem; }
  .task { grid-template-columns: 1fr; }
  .walkthrough { grid-template-columns: 1fr; }
  .screen { padding: .75rem; }
}
@media (max-width: 36rem) {
  .task dl { grid-template-columns: 1fr; }
  .task dd { padding-block: .45rem; }
  .node p { font-size: .9rem; }
  .horizontal-flows { gap: .55rem; padding-inline: .3rem; }
  .horizontal-flows span { flex-direction: column; gap: .2rem; }
  .horizontal-flows i { flex: none; width: 100%; }
  .horizontal-flows .left { order: 1; }
}
@media (max-width: 28rem) {
  .wrap { width: calc(100% - 2.25rem); }
  .header-inner { gap: .6rem; }
  nav { gap: .8rem; }
  nav a { font-size: .875rem; }
  .hero h1 { font-size: clamp(2rem, 9.8vw, 2.95rem); }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .button { transition: background-color .16s ease-out; }
}
