/* =========================================================
   すいすいキッズスイミング（架空）— デザインシステム「おもちゃばこ」実践例
   値はすべて DESIGN.md の YAML トークンから。パレット外の色は使わない。
   ========================================================= */

:root {
  /* colors */
  --cream: #FFFAF1;
  --paper: #FFFFFF;
  --ink: #3E3A34;
  --ink-sub: #7A7267;
  --aka: #FF6B6B;
  --aka-deep: #E5484D;
  --ao: #4D96FF;
  --ao-deep: #2F7FE0;
  --kiiro: #FFC93D;
  --midori: #6BCB77;
  --midori-deep: #3FA34D;
  --aka-soft: #FFE4E4;
  --ao-soft: #DFECFF;
  --kiiro-soft: #FFF5DC;
  --midori-soft: #E4F6E7;
  --ink-12: rgba(62, 58, 52, 0.12);
  --ink-20: rgba(62, 58, 52, 0.20);

  /* type */
  --font: 'Fredoka', 'Zen Maru Gothic', sans-serif;

  /* rounded */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-input: 16px;
  --r-image: 20px;
  --r-card: 24px;
  --r-lg: 32px;
  --r-pill: 999px;

  /* spacing */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px;
  --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;
  --section-y: 96px;
  --gutter: 24px;
  --content-max: 1080px;
  --text-max: 680px;
  --page-padding: 20px;

  /* motion */
  --hover: 160ms;
  --press: 120ms;
  --accordion: 240ms;
}

@media (max-width: 639px) {
  :root {
    --section-y: 64px;
    --gutter: 16px;
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.8;
  letter-spacing: .02em;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip; /* hidden だと sticky ヘッダーが効かない環境があるため clip */
}
@media (max-width: 639px) { body { font-size: 16px; } }

h1, h2, h3 { margin: 0; font-weight: 900; color: var(--ink); }
p { margin: 0; }
a { color: inherit; }
img, svg { display: block; }

.num {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

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

:focus-visible {
  outline: 3px solid var(--ao-deep);
  outline-offset: 3px;
}

.skip {
  position: absolute; left: var(--s4); top: -100px; z-index: 100;
  padding: var(--s3) var(--s5);
  background: var(--paper); border: 3px solid var(--ink); border-radius: var(--r-pill);
  font-weight: 700; text-decoration: none;
}
.skip:focus { top: var(--s4); }

.container {
  position: relative; z-index: 1;
  max-width: calc(var(--content-max) + var(--page-padding) * 2);
  margin: 0 auto;
  padding: 0 var(--page-padding);
}
.container--narrow { max-width: calc(800px + var(--page-padding) * 2); }

.note {
  margin-top: var(--s5);
  font-size: 14px; line-height: 1.8;
  color: var(--ink-sub);
}

/* ---------- buttons (§7.1) ---------- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 56px; padding: 0 32px;
  border: 0; border-radius: var(--r-pill);
  font: 900 18px/1 var(--font); letter-spacing: .06em;
  text-decoration: none;
  cursor: pointer;
  --shadow-color: var(--ink-12);
  box-shadow: 0 4px 0 var(--shadow-color);
  transition: transform var(--hover) ease, box-shadow var(--hover) ease;
}
.btn:hover  { transform: translateY(-2px); box-shadow: 0 6px 0 var(--shadow-color); }
.btn:active { transform: translateY(3px);  box-shadow: 0 1px 0 var(--shadow-color); transition-duration: var(--press); }
.btn--primary   { background: var(--aka-deep); color: var(--paper); }
.btn--secondary { background: var(--paper); color: var(--ink); border: 3px solid var(--ink); --shadow-color: var(--ink); }
.btn--small { min-height: 44px; padding: 0 20px; }
/* 小ボタンもタップ領域は48pxを確保 */
.btn--small::after { content: ""; position: absolute; inset: -2px 0; }
.btn--block { width: 100%; }
@media (min-width: 640px) { .btn--block { width: auto; } }

/* ---------- sticker (§5) ---------- */
.sticker {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 16px;
  border: 4px solid var(--paper);
  border-radius: var(--r-pill);
  background: var(--kiiro);
  color: var(--ink);
  font-weight: 900; font-size: 15px; line-height: 1.4;
  box-shadow: 0 3px 0 var(--ink-12);
  transform: rotate(var(--tilt, -3deg));
  white-space: nowrap;
}

/* ---------- header (§7.11) ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: var(--cream);
  border-bottom: 3px solid var(--ink-12); /* 押せない要素なので影ではなく線で区切る */
}
.header__inner {
  max-width: calc(var(--content-max) + var(--page-padding) * 2);
  margin: 0 auto;
  padding: var(--s3) var(--page-padding);
  display: flex; align-items: center; gap: var(--s4);
}
.logo {
  display: inline-flex; align-items: center; gap: var(--s2);
  min-height: 48px;
  text-decoration: none;
  border-radius: var(--r-sm);
}
.logo__blocks { display: inline-flex; }
.logo__blocks svg + svg { margin-left: -6px; }
.logo__blocks svg:nth-child(1) { transform: rotate(-4deg); }
.logo__blocks svg:nth-child(2) { transform: rotate(3deg) translateY(-2px); }
.logo__blocks svg:nth-child(3) { transform: rotate(-2deg); }
.logo__text {
  display: flex; flex-direction: column;
  font-weight: 900; font-size: 20px; line-height: 1.15; letter-spacing: .05em;
}
.logo__sub { font-size: 13px; font-weight: 700; letter-spacing: .03em; }

.gnav { margin-left: auto; }
.gnav__list { display: flex; gap: var(--s1); margin: 0; padding: 0; list-style: none; }
.gnav__list a {
  display: inline-flex; align-items: center;
  min-height: 48px; padding: 0 var(--s3);
  border-radius: var(--r-pill);
  font-weight: 700; font-size: 16px;
  text-decoration: none;
  transition: background-color var(--hover) ease;
}
.gnav__list a:hover { background: var(--paper); }

.menu-btn { display: none; }

@media (max-width: 959px) {
  .menu-btn {
    order: 3;
    display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    width: 56px; height: 56px; margin-left: var(--s2);
    padding: 0;
    background: var(--paper); color: var(--ink);
    border: 3px solid var(--ink); border-radius: var(--r-pill);
    box-shadow: 0 4px 0 var(--ink);
    cursor: pointer;
    transition: transform var(--hover) ease, box-shadow var(--hover) ease;
  }
  .menu-btn:hover  { transform: translateY(-2px); box-shadow: 0 6px 0 var(--ink); }
  .menu-btn:active { transform: translateY(3px);  box-shadow: 0 1px 0 var(--ink); }
  .menu-btn__bars,
  .menu-btn__bars::before,
  .menu-btn__bars::after {
    display: block; width: 20px; height: 3px; border-radius: var(--r-pill); background: var(--ink);
  }
  .menu-btn__bars { position: relative; }
  .menu-btn__bars::before, .menu-btn__bars::after { content: ""; position: absolute; left: 0; }
  .menu-btn__bars::before { top: -7px; }
  .menu-btn__bars::after  { top: 7px; }

  .header__cta { margin-left: auto; order: 2; }

  .gnav {
    display: none;
    position: absolute; top: calc(100% + 8px); right: var(--page-padding); left: var(--page-padding);
    padding: var(--s4);
    background: var(--paper);
    border: 3px solid var(--ink); border-radius: var(--r-card);
    box-shadow: 0 4px 0 var(--ink);
  }
  .gnav.is-open { display: block; }
  .gnav__list { flex-direction: column; }
  .gnav__list a { display: flex; padding: 0 var(--s4); }
  .gnav__list a:hover { background: var(--cream); }
  .header__inner { position: relative; }
}
@media (max-width: 479px) {
  /* 狭い幅では文字ロゴを隠して積み木だけに（ボタン文字は18pxのまま。aria-label でロゴ名は読み上げ可） */
  .header .logo__text { display: none; }
}

/* ---------- headings (§7.2) ---------- */
.heading {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: var(--s6);
  font-size: 32px; line-height: 1.4; letter-spacing: .05em;
}
.heading__icon { flex: none; width: 40px; height: 40px; }
.heading__text {
  padding-bottom: 14px;
  background-repeat: no-repeat;
  background-position: left bottom;
  background-size: 100% 12px;
}
@media (max-width: 639px) { .heading { font-size: 26px; margin-bottom: var(--s5); } }

/* 波線（主役色）。データURIは主役色ごとに用意 */
.section--ao .heading--wave .heading__text {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 12' preserveAspectRatio='none'%3E%3Cpath d='M3 6 Q 10.5 0 18 6 T 33 6 T 48 6 T 63 6 T 78 6 T 93 6 T 108 6 T 117 6' fill='none' stroke='%234D96FF' stroke-width='6' stroke-linecap='round'/%3E%3C/svg%3E");
}
/* 点線：stroke-dasharray='0 14' の直線（丸い点が並ぶ）。点が楕円に歪まないよう repeat で敷く */
.heading--dots .heading__text {
  background-size: 14px 12px;
  background-repeat: repeat-x;
}
.section--midori .heading--dots .heading__text {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 12'%3E%3Cpath d='M7 6 H7.01' fill='none' stroke='%236BCB77' stroke-width='6' stroke-linecap='round'/%3E%3C/svg%3E");
}
.section--aka .heading--dots .heading__text {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 12'%3E%3Cpath d='M7 6 H7.01' fill='none' stroke='%23FF6B6B' stroke-width='6' stroke-linecap='round'/%3E%3C/svg%3E");
}

.section__lead { max-width: var(--text-max); margin: calc(var(--s6) * -.25) 0 var(--s6); }

/* ---------- sections & waves (§7.9) ---------- */
.section {
  position: relative;
  padding: var(--section-y) 0;
}
.section--ao     { background: var(--ao-soft); }
.section--midori { background: var(--midori-soft); }
.section--aka    { background: var(--aka-soft); }

.wave {
  position: absolute; left: 0; top: -47px;
  width: 100%; height: 48px;
  pointer-events: none;
}
@media (max-width: 639px) {
  .wave { top: -31px; height: 32px; }
}

/* ---------- hero (§7.11, §8 空の例外) ---------- */
.hero {
  position: relative;
  background: linear-gradient(to bottom, #DFECFF, #FFFAF1);
  padding: var(--s8) 0 calc(var(--s9) + var(--s5));
  overflow: hidden;
}
.hero__inner {
  max-width: calc(var(--content-max) + var(--page-padding) * 2);
  margin: 0 auto;
  padding: 0 var(--page-padding);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s5);
}
.hero__sticker { margin-bottom: var(--s5); --tilt: -3deg; }
.hero__title {
  font-size: 52px; line-height: 1.3; letter-spacing: .06em;
}
.hero__lead { max-width: 560px; margin-top: var(--s5); }
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--s4); margin-top: var(--s6); }

.hero__stage { position: relative; min-height: 360px; }

@media (min-width: 960px) {
  .hero { padding-top: var(--s9); }
  .hero__inner { grid-template-columns: 1.15fr 1fr; align-items: center; }
}
@media (max-width: 959px) {
  .hero__stage { min-height: 200px; }
}
@media (max-width: 639px) {
  .hero { padding: var(--s7) 0 var(--s9); }
  .hero__title { font-size: 34px; }
  .hero__cta .btn { width: 100%; }
  .hero__stage { min-height: 130px; }
  .hide-sm { display: none; }
}

/* ---------- motifs (§6.3) ---------- */
.motif {
  position: absolute;
  pointer-events: none;
  --tilt: -4deg;
  transform: rotate(var(--tilt));
  animation: toy-float var(--dur, 3.5s) ease-in-out var(--delay, 0s) infinite;
}
@keyframes toy-float {
  0%, 100% { transform: translateY(0)    rotate(var(--tilt)); }
  50%      { transform: translateY(-8px) rotate(var(--tilt)); }
}

/* ヒーロー：大1・中2・小2（PC） */
.hero__stage .motif { left: var(--x); top: var(--y); }
.motif--l { width: 140px; height: 140px; }
.motif--m { width: 96px;  height: 96px; }
.motif--s { width: 56px;  height: 56px; }
@media (max-width: 959px) {
  .motif--l { width: 80px; height: 80px; }
  .motif--m { width: 64px; height: 64px; }
  .motif--s { width: 48px; height: 48px; }
}
@media (max-width: 639px) {
  /* スマホ：3個だけ、横一列に。最大80px */
  .hero__stage .motif--l { left: 6%;  top: 18%; }
  .hero__stage .motif--m { left: 42%; top: 6%; }
  .hero__stage .motif--s { left: 74%; top: 34%; }
}

/* セクション見出しまわりの装飾（上余白と見出し行の右側だけ） */
.deco {
  position: absolute; inset: 0;
  max-width: calc(var(--content-max) + var(--page-padding) * 2);
  margin: 0 auto;
  pointer-events: none;
}
.motif--deco   { width: 88px; height: 88px; }
.motif--deco-s { width: 48px; height: 48px; }
.deco--r  { right: 4%;  top: 40px; }
.deco--r2 { right: 16%; top: 24px; }
@media (max-width: 959px) {
  .motif--deco { width: 64px; height: 64px; }
  .deco--r  { right: 3%;  top: 20px; }
  .deco--r2 { right: 22%; top: 12px; }
}
@media (max-width: 639px) {
  /* 見出しが全幅になる幅では上余白（64px）に収まる大きさまで */
  .motif--deco   { width: 48px; height: 48px; }
  .motif--deco-s { width: 32px; height: 32px; }
  .deco--r  { right: 4%;  top: 8px; }
  .deco--r2 { right: 24%; top: 12px; }
}

/* ---------- cards: grid ---------- */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gutter);
}
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .cards--feature, .cards--voice { grid-template-columns: repeat(3, 1fr); } }
/* コースは4件。3列＋1件の取り残しを避けるため flex で中央に寄せる（BUILD-NOTES 参照） */
@media (min-width: 960px) {
  .cards--course { display: flex; flex-wrap: wrap; justify-content: center; }
  .cards--course > * { flex: 0 0 calc((100% - var(--gutter) * 2) / 3); }
}

/* ---------- toy card (§7.3) ---------- */
.toy-card {
  display: flex; flex-direction: column; align-items: flex-start;
  padding: 24px;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: var(--r-card);
  box-shadow: 0 4px 0 var(--ink);
}
.toy-card__art {
  position: relative;
  width: 100%; aspect-ratio: 4 / 3;
  border-radius: var(--r-image);
  overflow: hidden;
  display: grid; place-items: center;
  margin-bottom: var(--s4);
}
.toy-card__illust { width: 46%; height: auto; position: relative; z-index: 1; margin-top: -6%; }
.toy-card__water {
  position: absolute; left: 0; right: 0; bottom: 0;
  width: 100%; height: 26%;
}
.price-sticker {
  position: absolute; top: 12px; right: 12px; z-index: 2;
}
.price-sticker svg { flex: none; }
.price-sticker .num { font-size: 17px; }
.toy-card__name { font-size: 22px; line-height: 1.5; letter-spacing: .04em; }
.age-badge {
  display: inline-block;
  margin: var(--s2) 0 var(--s3);
  padding: 4px 12px;
  background: var(--ao-soft);
  color: var(--ink);
  border-radius: var(--r-pill);
  font-size: 13px; font-weight: 700; line-height: 1.6; letter-spacing: .03em;
  font-variant-numeric: tabular-nums;
}
.toy-card__desc { font-size: 14px; line-height: 1.8; }
@media (max-width: 639px) { .toy-card__name { font-size: 20px; } }

/* ---------- feature card (§7.4) ---------- */
.feature-card {
  padding: 24px;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: var(--r-card);
  box-shadow: 0 4px 0 var(--ink);
}
.feature-card__icon { width: 64px; height: 64px; margin-bottom: var(--s3); }
.feature-card h3 { font-size: 22px; line-height: 1.5; letter-spacing: .04em; margin-bottom: var(--s2); }
@media (max-width: 639px) { .feature-card h3 { font-size: 20px; } }

/* ---------- schedule (§7.5) ---------- */
.schedule {
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: var(--r-card);
  overflow: hidden;
}
.schedule__table {
  width: 100%;
  border-collapse: separate; border-spacing: 0;
  text-align: center;
}
.schedule__table th,
.schedule__table td {
  padding: var(--s3) var(--s2);
  border-bottom: 2px dashed var(--ink-20);
  vertical-align: middle;
}
.schedule__table tbody tr:last-child > * { border-bottom: 0; }
.schedule__table thead th {
  background: var(--ao-soft);
  font-weight: 900;
  border-bottom: 0;
  padding: var(--s4) var(--s2);
}
.schedule__table tbody th { font-weight: 700; text-align: left; padding-left: var(--s5); white-space: nowrap; }
.day { display: inline-flex; align-items: center; gap: 8px; }
.dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.dot--weekday { background: var(--midori); }
.dot--sat     { background: var(--ao); }
.dot--sun     { background: var(--aka); }
.tag {
  display: inline-block;
  padding: 2px 12px;
  background: var(--ao-soft);
  border-radius: var(--r-pill);
  font-size: 14px; font-weight: 700; line-height: 1.8;
  white-space: nowrap;
}
.empty { color: var(--ink-sub); }
.closed { color: var(--ink-sub); font-weight: 700; }

/* スマホ：曜日ごとのカードに組み替え（横スクロールさせない） */
@media (max-width: 639px) {
  .schedule { background: transparent; border: 0; border-radius: 0; overflow: visible; }
  .schedule__table, .schedule__table tbody, .schedule__table tr,
  .schedule__table th, .schedule__table td { display: block; }
  .schedule__table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .schedule__table tbody { display: grid; gap: var(--s4); }
  .schedule__table tr {
    background: var(--paper);
    border: 3px solid var(--ink);
    border-radius: var(--r-card);
    overflow: hidden;
    text-align: left;
  }
  .schedule__table tbody th {
    background: var(--ao-soft);
    padding: var(--s3) var(--s5);
    border-bottom: 0;
    font-weight: 900;
  }
  .schedule__table td {
    display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
    padding: var(--s3) var(--s5);
  }
  .schedule__table tbody tr > td:last-child { border-bottom: 0; }
  .schedule__table td[data-time]::before {
    content: attr(data-time);
    font-family: 'Fredoka', sans-serif; font-weight: 600; font-variant-numeric: tabular-nums;
  }
  .schedule__table td.closed { text-align: left; }
}

/* ---------- voice (§7.6) ---------- */
.voice { margin: 0; transform: rotate(var(--tilt, 0deg)); }
.voice__bubble {
  position: relative;
  margin: 0 0 30px;
  padding: 24px;
  padding-top: 40px;
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: var(--r-card);
  box-shadow: 0 4px 0 var(--ink-12);
}
.voice__bubble::before {
  content: "\201C";
  position: absolute; left: 18px; top: -4px;
  font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 56px; line-height: 1;
  color: var(--aka);
}
.voice__tail {
  position: absolute; left: 28px; bottom: -26px;
  width: 40px; height: 28px;
}
.voice__who {
  display: flex; align-items: center; gap: var(--s3);
  padding-left: var(--s2);
  font-size: 14px; font-weight: 700; line-height: 1.6;
}
.voice__avatar {
  flex: none;
  display: grid; place-items: center;
  width: 48px; height: 48px;
  background: var(--kiiro-soft);
  border: 3px solid var(--ink);
  border-radius: 50%;
}
.voice__avatar svg { width: 34px; height: 34px; }

/* ---------- FAQ (§7.7) ---------- */
.faq-list { display: grid; gap: 16px; }
.faq {
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: var(--r-card);
  box-shadow: 0 4px 0 var(--ink-12);
}
.faq__q {
  display: flex; align-items: center; gap: var(--s3);
  min-height: 48px;
  padding: 20px 24px;
  list-style: none;
  cursor: pointer;
  font-weight: 700;
  border-radius: var(--r-card);
}
.faq__q::-webkit-details-marker { display: none; }
.faq__text { flex: 1; }
.faq__mark {
  flex: none;
  display: grid; place-items: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--ao);
  color: var(--ink);
  font-family: 'Fredoka', sans-serif; font-weight: 700; font-size: 18px; line-height: 1;
}
.faq__mark--a { background: var(--ao-soft); }
.faq__star {
  flex: none; width: 32px; height: 32px;
  fill: var(--kiiro);
  transition: transform var(--accordion) ease, fill var(--accordion) ease;
}
.faq[open] .faq__star { transform: rotate(144deg); fill: var(--ao); }
.faq__a {
  display: flex; gap: var(--s3); align-items: flex-start;
  padding: 0 24px 24px;
}
.faq__a p { padding-top: 2px; }

/* ---------- form (§7.8) ---------- */
.form-panel, .thanks {
  padding: var(--s6);
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: var(--r-lg);
  box-shadow: 0 4px 0 var(--ink);
}
@media (max-width: 639px) { .form-panel, .thanks { padding: var(--s5) var(--s4); } }
.field + .field { margin-top: var(--s5); }
.field__label {
  display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap;
  margin-bottom: var(--s2);
  font-size: 16px; font-weight: 700; line-height: 1.5; letter-spacing: .03em;
}
.field__label svg { flex: none; }
.req {
  display: inline-block;
  padding: 0 10px;
  background: var(--aka-soft);
  color: var(--ink);
  border-radius: var(--r-pill);
  font-size: 13px; font-weight: 700; line-height: 1.8;
}
.input {
  display: block; width: 100%;
  height: 56px; padding: 0 20px;
  background: var(--paper);
  color: var(--ink);
  border: 3px solid var(--ink-20);
  border-radius: var(--r-input);
  font: 500 17px/1.5 var(--font);
  letter-spacing: .02em;
  transition: border-color var(--hover) ease;
  -webkit-appearance: none; appearance: none;
}
.input::placeholder { color: var(--ink-sub); opacity: 1; }
.input:focus { border-color: var(--ao-deep); }
.input[aria-invalid="true"] { border-color: var(--aka-deep); }
.select {
  padding-right: 52px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9 L12 15 L18 9' fill='none' stroke='%233E3A34' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
  background-size: 22px 22px;
}
.textarea { height: auto; min-height: 140px; padding: 14px 20px; resize: vertical; }
.field__error {
  margin-top: var(--s2);
  color: var(--aka-deep);
  font-size: 14px; font-weight: 700;
}
.field__error:empty { margin: 0; } /* display:none にすると aria-live が読まれないことがあるため */
.form-panel .btn--block { margin-top: var(--s6); }
.note--form { margin-top: var(--s4); }

.thanks { text-align: center; }
.thanks:focus { outline: none; }
.thanks:focus-visible { outline: 3px solid var(--ao-deep); outline-offset: 3px; }
.thanks__art { display: flex; justify-content: center; align-items: flex-end; gap: var(--s3); margin-bottom: var(--s4); }
.thanks__title { font-size: 32px; line-height: 1.4; letter-spacing: .05em; margin-bottom: var(--s3); }
@media (max-width: 639px) { .thanks__title { font-size: 26px; } }
.thanks p { max-width: var(--text-max); margin: 0 auto; }
.thanks__list {
  margin: var(--s5) auto var(--s6);
  max-width: 440px;
  padding: var(--s4) var(--s5);
  background: var(--cream);
  border-radius: var(--r-card);
  text-align: left;
}
.thanks__list div { display: flex; flex-wrap: wrap; gap: 0 var(--s4); padding: var(--s1) 0; }
.thanks__list dt { font-weight: 700; min-width: 8.5em; }
.thanks__list dd { margin: 0; }
.thanks.is-in { animation: pop-in 320ms ease-out; }
@keyframes pop-in {
  from { transform: translateY(8px) scale(.98); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

/* ---------- footer (§7.10) ---------- */
.footer {
  position: relative;
  background: var(--kiiro-soft);
  padding: var(--s8) 0 calc(var(--s9) + var(--s6));
}
.footer__inner {
  position: relative; z-index: 1;
  max-width: calc(var(--content-max) + var(--page-padding) * 2);
  margin: 0 auto;
  padding: 0 var(--page-padding);
  display: grid; gap: var(--s5);
}
.fnav ul { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s2); margin: 0; padding: 0; list-style: none; }
.fnav a {
  display: inline-flex; align-items: center;
  min-height: 48px; padding: 0 var(--s4);
  background: var(--paper);
  border: 3px solid var(--ink);
  border-radius: var(--r-pill);
  font-weight: 700; font-size: 16px;
  text-decoration: none;
  --shadow-color: var(--ink);
  box-shadow: 0 4px 0 var(--shadow-color);
  transition: transform var(--hover) ease, box-shadow var(--hover) ease;
}
.fnav a:hover  { transform: translateY(-2px); box-shadow: 0 6px 0 var(--shadow-color); }
.fnav a:active { transform: translateY(3px);  box-shadow: 0 1px 0 var(--shadow-color); }
.footer__info { font-size: 14px; line-height: 1.8; max-width: var(--text-max); }
.footer__fiction { margin-top: var(--s2); color: var(--ink-sub); }
.footer__copy { font-size: 13px; color: var(--ink-sub); }

.footer__deco {
  position: absolute; inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.motif--f { width: 72px; height: 72px; }
.f1 { left: 4%;  bottom: 20px; width: 88px; height: 88px; }
.f2 { right: 5%; top: 56px; }
.f3 { right: 20%; bottom: 16px; width: 56px; height: 56px; }
.f4 { left: 30%; bottom: 24px; width: 40px; height: 40px; }
@media (max-width: 959px) {
  .f2 { top: auto; bottom: 28px; right: 4%; width: 56px; height: 56px; }
  .f3 { right: 30%; }
}
@media (max-width: 639px) {
  .f1 { width: 56px; height: 56px; bottom: 16px; }
  .f2 { width: 48px; height: 48px; bottom: 20px; }
  .f3 { width: 40px; height: 40px; bottom: 18px; right: 38%; }
  .f4 { display: none; }
}

/* ---------- reduced motion (§6.3) ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  /* §7.7：回転はせず、色だけ変える */
  .faq[open] .faq__star { transform: none; }
  /* 押せる要素の浮き沈みも止める */
  .btn:hover, .btn:active, .menu-btn:hover, .menu-btn:active,
  .fnav a:hover, .fnav a:active { transform: none; }
}
