:root {
  --paper: #f8f5ee;
  --paper-2: #f1ecdf;
  --ink: #292524;
  --ink-2: #57534e;
  --line: #e0dac8;
  --card: #fffdf6;
  --blue: #3b82f6;
  --blue-bg: rgba(59, 130, 246, 0.1);
  --orange: #f97316;
  --orange-bg: rgba(249, 115, 22, 0.12);
  --btn: #c2410c;
  --btn-hover: #9a3412;
  --band: #1c1917;
  --font-head: 'BIZ UDPGothic', 'Hiragino Sans', 'Noto Sans JP', 'Yu Gothic UI', 'Yu Gothic', Meiryo, sans-serif;
  --font-body: system-ui, -apple-system, 'Hiragino Sans', 'Noto Sans JP', 'Yu Gothic UI', 'Yu Gothic', Meiryo, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.85;
  overflow-wrap: anywhere;
}

h1,
h2,
.brand,
.brand-line {
  font-family: var(--font-head);
  font-weight: 700;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--btn);
}

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 max(16px, env(safe-area-inset-left));
}

.narrow {
  max-width: 720px;
}

.center {
  text-align: center;
}

/* ボタン: 押した後に起きること（ボードが開く・登録は要らない）を文字にする */
.btn {
  display: inline-block;
  padding: 0.8em 1.5em;
  border-radius: 999px;
  background: var(--btn);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  line-height: 1.3;
  text-align: center;
}
.btn:hover {
  background: var(--btn-hover);
}
.btn:focus-visible,
a:focus-visible,
.scroller:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}
.btn-sm {
  padding: 0.55em 1.1em;
  font-size: 0.9rem;
}
.btn-lg {
  padding: 1em 2em;
  font-size: 1.1rem;
}
.cta-note {
  margin: 0.7em 0 0;
  font-size: 0.85rem;
  color: var(--ink-2);
}

/* スクロールで出るヘッダー（表紙のボタンが見えているあいだは隠す） */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  background: rgba(248, 245, 238, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
  transition: transform 0.25s ease;
}
.js .site-header {
  transform: translateY(-100%);
}
.js .site-header.show {
  transform: none;
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
}
.brand {
  color: var(--ink);
  text-decoration: none;
  font-size: 1.15rem;
  white-space: nowrap;
}
.brand span,
.brand-line span {
  margin-left: 0.5em;
  font-size: 0.7em;
  font-weight: 400;
  color: var(--ink-2);
}

/* 表紙 */
.hero {
  padding: 28px 0 56px;
}
.hero-grid {
  display: grid;
  gap: 32px;
}
.brand-line {
  margin: 0 0 1.2em;
  font-size: 1.25rem;
  white-space: nowrap;
}
h1 {
  margin: 0 0 0.8em;
  line-height: 1.4;
}
.h1-kw {
  display: block;
  margin-bottom: 0.7em;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink-2);
}
.h1-copy {
  display: block;
  font-size: clamp(1.4rem, 5.8vw, 2.1rem);
  text-wrap: balance;
  line-height: 1.45;
}
.lead {
  max-width: 34em;
  color: var(--ink-2);
}
.cta {
  margin-top: 1.4em;
}

/* 表紙の絵: 見本データ（src/lib/sample.ts）の入れ子をそのまま描く */
.board {
  margin: 0;
}
.board-stage {
  container-type: inline-size;
  position: relative;
  aspect-ratio: 5 / 4;
  width: 100%;
}
.area {
  position: absolute;
  border-radius: 14px;
  border: 2px solid;
}
.area-name {
  position: absolute;
  top: 0.5em;
  left: 0.8em;
  font-size: 3.4cqw;
  font-weight: 700;
  line-height: 1.2;
}
.a-blue {
  inset: 0;
  border-color: var(--blue);
  background: var(--blue-bg);
  color: #1d4ed8;
}
.a-orange {
  left: 36%;
  top: 30%;
  width: 60%;
  height: 64%;
  border-color: var(--orange);
  background: var(--orange-bg);
  color: #9a3412;
}
.note {
  position: absolute;
  padding: 0.55em 0.7em;
  border-radius: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 2px 6px rgba(41, 37, 36, 0.12);
  color: var(--ink);
  line-height: 1.5;
}
.note b {
  display: block;
  font-size: 1em;
}
.note span {
  display: block;
  margin-top: 0.2em;
  font-size: 0.85em;
  color: var(--ink-2);
}
.board-stage .note {
  font-size: 3.2cqw;
}
.n-todo {
  left: 4%;
  top: 26%;
  width: 27%;
}
.n-thanks {
  left: 7%;
  top: 28%;
  width: 86%;
}
.n-wait {
  left: 7%;
  top: 70%;
  width: 56%;
}
.crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2em 0.6em;
  margin-top: 14px;
  padding: 0.7em 1em;
  border-radius: 10px;
  background: var(--band);
  color: #fff;
  font-size: 0.9rem;
  line-height: 1.5;
}
.crumb i {
  font-style: normal;
  color: #a8a29e;
}
.crumb span:last-child {
  font-weight: 700;
}

/* エリアの枠線。JS があるときは SVG の線で描き（開幕で線を引くため）、無いときは border のまま */
.area-line {
  display: none;
}
.js .area {
  border-color: transparent;
}
/* 線の中心を border の中央（外から1px）に合わせ、はみ出す半分も見せる */
.js .area-line {
  display: block;
  position: absolute;
  left: -1px;
  top: -1px;
  width: calc(100% + 2px);
  height: calc(100% + 2px);
  overflow: visible;
  fill: none;
  stroke-width: 2;
  pointer-events: none;
}
.a-blue > .area-line { stroke: var(--blue); }
.a-orange > .area-line { stroke: var(--orange); }

/* 全画面の開幕「貼る → 囲む → たどる」:
   1) 方眼の幕の上に、拡大した盤面へ付箋が上から落ちて貼りつく
   2) エリアの枠が線で引かれて付箋を囲い、入れ子になる
   3) パンくずが1段ずつ点き、それに合わせてカメラが 仕事 → メール返答 → お礼メール と奥へ潜る
   4) 引いて所定の位置へ収まり、幕が消えて文字とボタンが順に出る。
   JS（lp.js）が移動量（--fx --fy --fs、潜る先 --d1* --d2*）を測って .intro-go を付け、段ごとに
   .intro-p1〜p3 / .intro-d1〜d2 を足し、約2.95秒で .intro-done、その1.1秒後に .intro-end を付ける。
   JS が無いときは .js が付かないので最初から完成形（lp-head.js の保険タイマーもある）。
   アニメーションは :not(.intro-done) の間だけ効くので、スキップすると即座に完成形へ移る */
@keyframes note-fall {
  0% { opacity: 0; transform: translateY(-75vh) rotate(var(--r, -8deg)) scale(1.25); box-shadow: 0 40px 50px rgba(41, 37, 36, 0.2); }
  10% { opacity: 1; }
  68% { transform: translateY(0.1em) rotate(0deg) scale(0.97); box-shadow: 0 1px 2px rgba(41, 37, 36, 0.25); }
  84% { transform: translateY(-0.06em) scale(1.01); }
  100% { opacity: 1; transform: none; box-shadow: 0 2px 6px rgba(41, 37, 36, 0.12); }
}
@keyframes line-draw {
  from { stroke-dashoffset: 100; }
  to { stroke-dashoffset: 0; }
}
@keyframes fill-in {
  from { background-color: transparent; }
}
@keyframes label-in {
  from { opacity: 0; transform: translateY(-0.5em); }
}
@keyframes crumb-in {
  from { opacity: 0; transform: translateY(10px) scale(0.96); }
}
.js.intro-go:not(.intro-done) .board-stage .note {
  animation: note-fall 0.55s cubic-bezier(0.5, 0, 0.6, 1) var(--d, 0s) both;
}
.n-todo { --d: 0.05s; --r: -9deg; }
.n-thanks { --d: 0.2s; --r: 7deg; }
.n-wait { --d: 0.35s; --r: -5deg; }
.js.intro-go:not(.intro-done) .area-line rect {
  stroke-dasharray: 100;
  animation: line-draw 0.55s cubic-bezier(0.6, 0, 0.3, 1) var(--d, 0s) both;
}
.js.intro-go:not(.intro-done) .area {
  animation: fill-in 0.35s ease-out var(--fd, 0s) both;
}
.js.intro-go:not(.intro-done) .area-name {
  animation: label-in 0.3s ease-out var(--ld, 0s) both;
}
.a-blue { --fd: 1.1s; --ld: 0.95s; }
.a-blue > .area-line rect { --d: 0.75s; }
.a-orange { --fd: 1.3s; --ld: 1.15s; }
.a-orange > .area-line rect { --d: 0.95s; }
.js.intro-go:not(.intro-done) .crumb {
  animation: crumb-in 0.3s ease-out 1.25s both;
}
.crumb {
  position: relative;
  z-index: 1;
}
.crumb > * {
  transition: opacity 0.25s ease, transform 0.25s ease, color 0.25s ease;
}
.js:not(.intro-done) .crumb > * {
  opacity: 0;
  transform: translateX(-8px);
}
.js.intro-p1 .crumb .c1,
.js.intro-p2 .crumb i:nth-of-type(1),
.js.intro-p2 .crumb .c2,
.js.intro-p3 .crumb i:nth-of-type(2),
.js.intro-p3 .crumb .c3 {
  opacity: 1;
  transform: none;
}
/* いまいる段だけ明るくする */
.js.intro-p1:not(.intro-p2):not(.intro-done) .crumb .c1,
.js.intro-p2:not(.intro-p3):not(.intro-done) .crumb .c2,
.js.intro-p3:not(.intro-done) .crumb .c3 {
  color: #fdba74;
}
/* カメラ: 盤面の中で、選ばれたエリア・メモを中央へ寄せて拡大する（移動量は lp.js が % で入れる） */
.js .board-stage {
  transform-origin: 0 0;
  transition: transform 0.5s cubic-bezier(0.65, 0, 0.35, 1);
}
.js.intro-d1:not(.intro-done) .board-stage {
  transform: translate(var(--d1x, 0%), var(--d1y, 0%)) scale(var(--d1s, 1));
}
.js.intro-d2:not(.intro-done) .board-stage {
  transform: translate(var(--d2x, 0%), var(--d2y, 0%)) scale(var(--d2s, 1));
}
.js.intro-done .board-stage {
  transition-duration: 0.95s;
}
.js .board-stage .note {
  transition: box-shadow 0.3s ease, filter 0.35s ease;
}
/* 道順から外れたメモは潜るあいだ薄くする */
.js.intro-p2:not(.intro-done) .n-todo,
.js.intro-p3:not(.intro-done) .n-wait {
  filter: opacity(0.35);
}
.js.intro-p3:not(.intro-done) .n-thanks {
  box-shadow: 0 0 0 2px var(--orange), 0 12px 28px rgba(154, 52, 18, 0.25);
}
/* 拡大した盤面が横にはみ出してもスクロール幅を増やさない */
.js:not(.intro-end) .hero {
  overflow-x: clip;
}

html.js:not(.intro-done) {
  overflow: hidden;
}
/* 開幕後にスクロールバーが出ても幅が変わらないよう、先に場所を空けておく */
html.js {
  scrollbar-gutter: stable;
}
/* 幕: ボードの方眼 */
html.js::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 50;
  background:
    radial-gradient(circle, rgba(41, 37, 36, 0.16) 1.3px, transparent 1.8px) 0 0 / 24px 24px,
    radial-gradient(ellipse at center, transparent 55%, rgba(193, 180, 150, 0.25) 100%),
    var(--paper);
  transition: opacity 0.7s ease;
}
html.js.intro-done::before {
  opacity: 0;
  pointer-events: none;
}
html.js:not(.intro-end) .board {
  position: relative;
  z-index: 60;
}
.js .board {
  transition: transform 0.95s cubic-bezier(0.65, 0, 0.35, 1);
}
.js:not(.intro-done) .board {
  transform: translate(var(--fx, 0px), var(--fy, 0px)) scale(var(--fs, 1));
}
.js:not(.intro-go) .board {
  opacity: 0;
}
.js .hero-text > * {
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js .hero-text > :nth-child(1) { transition-delay: 0.5s; }
.js .hero-text > :nth-child(2) { transition-delay: 0.65s; }
.js .hero-text > :nth-child(3) { transition-delay: 0.8s; }
.js .hero-text > :nth-child(4) { transition-delay: 0.95s; }
.js:not(.intro-done) .hero-text > * {
  opacity: 0;
  transform: translateY(14px);
}

/* 節 */
.sec {
  padding: 56px 0;
}
.sec-alt {
  background: var(--paper-2);
}
.sec h2 {
  margin: 0 0 0.8em;
  font-size: clamp(1.35rem, 5vw, 1.9rem);
  line-height: 1.5;
}
.eyebrow {
  margin: 0 0 0.4em;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--btn);
  letter-spacing: 0.05em;
}
.two {
  display: grid;
  gap: 28px;
}
.sec-pain {
  padding: 48px 0;
}
.sec-pain strong {
  background: linear-gradient(transparent 62%, rgba(249, 115, 22, 0.28) 62%);
}

/* 見本 */
.demo {
  position: relative;
}
.demo-cards {
  min-height: 280px;
  border: 2px dashed var(--line);
  border-radius: 14px;
  font-size: 0.9rem;
}
.demo-cards .n-a { left: 4%; top: 8%; width: 44%; }
.demo-cards .n-b { left: 51%; top: 36%; width: 45%; transform: rotate(1.5deg); }
.demo-cards .n-c { left: 6%; top: 66%; width: 42%; transform: rotate(-1.5deg); }

.scroller {
  height: 260px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
}
.tall-area {
  position: relative;
  height: 720px;
  margin: 10px;
  border: 2px solid var(--blue);
  border-radius: 14px;
  background: var(--blue-bg);
}
.sticky-label {
  position: sticky;
  top: 8px;
  display: inline-block;
  margin: 8px 0 0 12px;
  padding: 0.15em 0.7em;
  border-radius: 6px;
  background: rgba(255, 253, 246, 0.9);
  color: #1d4ed8;
  font-weight: 700;
  font-size: 0.9rem;
}
.tall-area .note {
  left: 12%;
  width: 62%;
  font-size: 0.9rem;
}
.n-s1 { top: 110px; }
.n-s2 { top: 270px; left: 26% !important; }
.n-s3 { top: 430px; }
.n-s4 { top: 580px; left: 24% !important; }

.demo-list {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}
.search {
  padding: 0.55em 0.9em;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 0.95rem;
}
.search span::before {
  content: '🔍 ';
}
.hit {
  position: relative;
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--paper);
  border: 1px solid var(--line);
}
.hit p {
  margin: 0;
}
.path {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.5em;
  font-size: 0.8rem;
  color: var(--ink-2);
}
.path i {
  font-style: normal;
}
.hit-title {
  font-weight: 700;
}
.hit-sum {
  font-size: 0.85rem;
  color: var(--ink-2);
}
.stamp {
  position: absolute;
  right: 12px;
  top: 10px;
  padding: 0.1em 0.6em;
  border: 2px solid #b91c1c;
  border-radius: 6px;
  color: #b91c1c;
  font-weight: 700;
  font-size: 0.9rem;
  transform: rotate(-8deg);
}
.js .stamp {
  opacity: 0;
  transform: rotate(-8deg) scale(1.8);
}
.js .stamped .stamp {
  opacity: 0.9;
  transform: rotate(-8deg);
  transition: opacity 0.15s ease-out, transform 0.18s cubic-bezier(0.3, 1.6, 0.6, 1);
}

/* 料金 */
.plans {
  display: grid;
  gap: 14px;
  margin: 0;
}
.plans > div {
  padding: 16px 18px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--line);
}
.plans dt {
  margin-bottom: 0.3em;
  font-weight: 700;
}
.plans dd {
  margin: 0;
  color: var(--ink-2);
}

/* FAQ */
.faq {
  margin: 0;
}
.faq > div {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.faq dt {
  font-weight: 700;
}
.faq dd {
  margin: 0.4em 0 0;
  color: var(--ink-2);
}

.sec-end {
  background: var(--paper-2);
  padding: 72px 0;
}

.site-footer {
  padding: 28px 0 40px;
  font-size: 0.85rem;
  color: var(--ink-2);
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-bottom: 12px;
}
.site-footer p {
  margin: 0;
}

@media (min-width: 840px) {
  .hero {
    padding: 56px 0 80px;
  }
  .hero-grid {
    grid-template-columns: 1.05fr 1fr;
    align-items: center;
    gap: 48px;
  }
  .two {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 56px;
  }
  .two-rev > :first-child {
    order: 2;
  }
  .sec {
    padding: 80px 0;
  }
  .plans {
    grid-template-columns: 1fr 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .js .stamp {
    opacity: 0.9;
    transform: rotate(-8deg);
  }
}

/* 規約・プライバシー・特商法のページ */
.legal {
  max-width: 820px;
  padding-top: 86px;
  padding-bottom: 56px;
  line-height: 1.85;
  overflow-wrap: anywhere;
}
.legal h1 {
  font-size: 1.6rem;
  margin: 0 0 20px;
}
.legal h2 {
  font-size: 1.2rem;
  margin: 36px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.legal h3 {
  font-size: 1.02rem;
  margin: 24px 0 8px;
}
.legal ul,
.legal ol {
  padding-left: 1.4em;
}
.legal hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 32px 0 12px;
}
.legal .table-wrap {
  overflow-x: auto;
}
.legal table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.legal th,
.legal td {
  border: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}
.legal th {
  background: var(--paper-2);
  white-space: nowrap;
}
@media (max-width: 640px) {
  .legal th {
    white-space: normal;
  }
}
