/* ミミヤク 検証用LP — 2ページ共通スタイル */

:root {
  color-scheme: light dark;

  --bg: #eef4e9;
  --bg-alt: #dce8d4;
  --surface: #fcfff9;
  --surface-hi: #f5fbf1;
  --border: #9caf91;
  --rule: #bccfb1;
  --step-num: #dce8d4;
  --step-num-stroke: #91a785;

  /* 明転させる DEMO セクション用 */
  --ivory: #eef2f8;
  --ivory-surface: #f8fafd;
  --ivory-card: #ffffff;
  --ivory-card-warm: #f5f8fc;
  --ivory-line: #b8c3d2;
  --ink: #101520;
  --ink-muted: #414c5c;
  --bg-sink: #d4e0cb;

  /* 端末モックはライト/ダークどちらでも暗い画面のままなので固定値で持つ */
  --phone-frame: #080b07;
  --phone-screen: #161a15;
  --phone-ink: #edf5e9;
  --phone-sub: #939c8e;
  --phone-meta: #868f81;
  --phone-icon: #788174;
  --phone-line: rgba(255, 255, 255, .09);
  --phone-line-soft: rgba(255, 255, 255, .07);
  --phone-rail: rgba(255, 255, 255, .14);
  --phone-edge: rgba(255, 255, 255, .14);
  --art-ink: #242a21;
  --art-paper: #c8cfc2;
  --art-rule: #5f675b;
  --art-dot: #dae1d4;
  --art-shade: #505a4c;
  --shadow-phone: 0 40px 80px rgba(0, 0, 0, .38), 0 6px 18px rgba(0, 0, 0, .22);
  --text: #111a0f;
  --muted: #43523c;
  --accent: #1f56e0;
  --accent-ink: #173ea8;
  --accent-soft: #d6e0ff;
  --on-accent: #ffffff;

  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --maxw: 62rem;
  --radius: 4px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #08110b;
    --bg-alt: #101b12;
    --surface: #182118;
    --surface-hi: #202c1f;
    --border: #3d5038;
    --rule: #263320;
    --step-num: #1d2a1b;
    --step-num-stroke: #4d6247;
    --bg-sink: #050b07;
    --text: #edf5e9;
    --muted: #aab8a2;
    --accent: #7aa2ff;
    --accent-ink: #a7c0ff;
    --accent-soft: #172445;
    --on-accent: #081020;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "BIZ UDPGothic", "Hiragino Sans", "Hiragino Kaku Gothic ProN",
    "Noto Sans JP", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  font-feature-settings: "palt";
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

a { color: var(--accent-ink); }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 20px;
}

/* ---------- header ---------- */

.site-header {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: .04em;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  width: 22px;
  height: 22px;
  flex: none;
  display: block;
}

.brand-mark span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid var(--accent);
  border-right-color: transparent;
  border-bottom-color: transparent;
  transform: rotate(-45deg);
}

/* ---------- hero ---------- */

.hero {
  padding: clamp(40px, 8vw, 72px) 0 clamp(32px, 6vw, 48px);
}

.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(1.625rem, 6.9vw, 3.125rem);
  line-height: 1.4;
  letter-spacing: .01em;
  font-weight: 700;
  /* Chrome では文節単位で折り返す。非対応ブラウザは通常の折り返しにフォールバック */
  word-break: auto-phrase;
}

.hero h1 .accent {
  color: var(--accent-ink);
}

.hero .lead {
  margin: 0 0 28px;
  max-width: 34em;
  font-size: clamp(1rem, 3.6vw, 1.1875rem);
  color: var(--muted);
}

.hero-note {
  display: block;
  margin: 0;
  padding: 0 0 0 13px;
  border-left: 2px solid var(--accent);
  list-style: none;
  font-size: .8125rem;
  line-height: 1.9;
  color: var(--muted);
}

.hero-note li {
  display: inline;
  padding: 0;
  border: 0;
  background: transparent;
}

.hero-note li + li::before {
  content: " / ";
  color: var(--border);
}

/* ---------- hero: 端末モック ---------- */

.hero { overflow-x: clip; }

.hero-inner { position: relative; }

.hero-visual {
  margin-top: 44px;
  display: flex;
  justify-content: center;
}

.phone {
  position: relative;
  width: 320px;
  flex: none;
  padding: 10px;
  border-radius: 44px;
  background: var(--phone-frame);
  border: 1px solid var(--phone-edge);
  box-shadow: var(--shadow-phone);
}

.phone-island {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 84px;
  height: 22px;
  border-radius: 999px;
  background: var(--phone-frame);
  z-index: 2;
}

.phone-screen {
  border-radius: 36px;
  background: var(--phone-screen);
  padding: 46px 14px 18px;
  overflow: hidden;
  color: var(--phone-ink);
}

/* フィード見出し */

.feed-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 4px 14px;
  border-bottom: 1px solid var(--phone-line);
}

.feed-art {
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 9px;
  background:
    radial-gradient(circle at 50% 62%, var(--phone-ink) 0 26%, transparent 26%),
    linear-gradient(160deg, var(--accent) 0 46%, var(--accent-ink) 46%);
}

.feed-text { display: block; min-width: 0; }

.feed-name {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .01em;
}

.feed-sub {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.5;
  color: var(--phone-sub);
}

/* エピソード一覧 */

.ep-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ep {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--phone-line-soft);
}

.ep:last-child { border-bottom: none; }

.ep-art {
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 7px;
}

/* 番組ごとに異なる2色の幾何パターン。色は既存トークンから取る */
.art-a {
  background:
    linear-gradient(45deg, var(--accent) 50%, transparent 50%),
    var(--art-ink);
}

.art-b {
  background:
    repeating-linear-gradient(90deg, var(--art-rule) 0 5px, transparent 5px 10px),
    var(--art-paper);
}

.art-c {
  background:
    radial-gradient(circle at 70% 30%, var(--art-dot) 0 34%, transparent 34%),
    var(--art-shade);
}

.art-d {
  background:
    linear-gradient(0deg, var(--accent-ink) 0 50%, transparent 50%),
    linear-gradient(90deg, var(--art-dot) 0 50%, var(--art-ink) 50%);
}

.ep-body {
  display: block;
  min-width: 0;
  flex: 1;
}

.ep-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  /* line-clamp 非対応時も2行分で頭打ちにする */
  max-height: 3em;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
}

.ep-meta {
  display: block;
  margin-top: 3px;
  font-family: var(--mono);
  font-size: 9.5px;
  line-height: 1.4;
  color: var(--phone-meta);
}

.ep-bar {
  display: block;
  margin-top: 7px;
  height: 3px;
  border-radius: 999px;
  background: var(--phone-rail);
  overflow: hidden;
}

.ep-bar-fill {
  display: block;
  width: 38%;
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
}

.is-playing .ep-title { font-weight: 700; }

.ep-wave {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 14px;
  margin-top: 3px;
  flex: none;
}

.ep-wave i {
  display: block;
  width: 2px;
  border-radius: 1px;
  background: var(--accent);
  animation: mimi-wave .9s ease-in-out infinite;
}

.ep-wave i:nth-child(1) { height: 6px; animation-delay: -.45s; }
.ep-wave i:nth-child(2) { height: 12px; animation-delay: -.15s; }
.ep-wave i:nth-child(3) { height: 8px; }

@keyframes mimi-wave {
  0%, 100% { transform: scaleY(.45); }
  50% { transform: scaleY(1); }
}

.ep-dl {
  flex: none;
  margin-top: 4px;
  color: var(--phone-icon);
}

@media (prefers-reduced-motion: reduce) {
  .ep-wave i { animation: none; }
}

/* 980px 以上で2カラム。端末はコピー側のグリッドからはみ出させる */
@media (max-width: 979px) {
  .hero-visual {
    margin-top: 40px;
    padding-bottom: 12px;
  }
}

@media (min-width: 980px) {
  .hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
    gap: 40px;
    align-items: center;
  }

  .hero-visual {
    margin-top: 0;
    justify-content: flex-end;
    margin-right: -96px;
  }

  .phone {
    width: 334px;
    transform: rotate(-4deg);
  }

  .hero-copy h1 {
    font-size: clamp(1.75rem, 3.2vw, 2.75rem);
  }
}

@media (min-width: 980px) and (prefers-reduced-motion: no-preference) {
  .phone { transition: transform .4s ease; }
}

/* ---------- sections ---------- */

.section {
  padding: clamp(40px, 7vw, 64px) 0;
  border-top: 1px solid var(--rule);
}

/* 前後を地よりわずかに沈めて、明転セクションを挟み込む */
.section-sink {
  background: var(--bg-sink);
  /* 端末モックとカード外へはみ出す数字が横スクロールを生まないように切る。
     縦は切らないので、はみ出した数字が上下で欠けることはない */
  overflow-x: clip;
}

@supports not (overflow: clip) {
  .hero,
  .section-sink { overflow: hidden; }
}

/* 罫線ではなく背景の切り替わりだけで区切る明転セクション */
.section-light {
  background: var(--ivory);
  color: var(--ink);
  color-scheme: light;
  padding: clamp(48px, 8vw, 72px) 0;
  border-top: none;
}

.section-light + .section,
.hero + .section-light {
  border-top: none;
}

.section-light h2 { color: var(--ink); }

.section-label {
  display: block;
  margin: 0 0 18px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: .6875rem;
  font-weight: 500;
  letter-spacing: .12em;
  color: var(--muted);
  text-transform: uppercase;
}

.section h2 {
  margin: 0 0 12px;
  font-size: clamp(1.375rem, 5.2vw, 1.875rem);
  line-height: 1.5;
  font-weight: 700;
  word-break: auto-phrase;
}

.section > .wrap > p.section-desc {
  margin: 0 0 30px;
  max-width: 38em;
  color: var(--muted);
}

/* ---------- demo player ---------- */

.demo-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
  align-items: stretch;
}

@media (min-width: 720px) {
  .demo-grid { grid-template-columns: 1fr auto 1fr; gap: 20px; }
}

.demo-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.demo-card.is-after {
  border-color: var(--accent);
  border-width: 2px;
  background: var(--surface-hi);
  border-radius: 5px;
}

.demo-tag {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  font-family: var(--mono);
  font-size: .6875rem;
  font-weight: 500;
  letter-spacing: .1em;
  padding: 3px 9px;
  border-radius: 2px;
  background: var(--bg-alt);
  color: var(--muted);
  border: 1px solid var(--border);
}

.demo-card.is-after .demo-tag {
  background: var(--accent-ink);
  color: var(--on-accent);
  border-color: transparent;
}

.demo-card h3 {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 700;
}

.demo-card p {
  margin: 0;
  font-size: .875rem;
  color: var(--muted);
}

.demo-card audio {
  width: 100%;
  margin-top: auto;
}

.demo-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--accent);
  font-weight: 700;
}

.demo-arrow::before { content: "↓"; }

@media (min-width: 720px) {
  .demo-arrow::before { content: "→"; }
}

.demo-fallback {
  margin: 0;
  padding: 14px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  font-size: .875rem;
  color: var(--muted);
  background: var(--bg-alt);
}

.demo-meta {
  margin: 22px 0 0;
  font-size: .8125rem;
  color: var(--muted);
}

/* ---------- demo player: 明転セクション用の面 ---------- */

.section-light .demo-card {
  background: var(--ivory-surface);
  border-color: var(--ivory-line);
  color: var(--ink);
}

.section-light .demo-card h3 { color: var(--ink); }
.section-light .demo-card p { color: var(--ink-muted); }

.section-light .demo-card .demo-tag {
  background: var(--ivory-card);
  border-color: var(--ivory-line);
  color: var(--ink-muted);
}

/* AFTER 側は明背景でもオレンジ枠を維持し、面をひとまわり大きく見せる */
.section-light .demo-card.is-after {
  background: var(--ivory-card-warm);
  border-color: var(--accent);
  border-width: 2px;
  border-radius: 5px;
  padding: 24px 22px 22px;
}

.section-light .demo-card.is-after .demo-tag {
  background: var(--accent-ink);
  color: var(--ivory-card);
  border-color: transparent;
}

/* ネイティブプレーヤーが明背景から浮くので、受け皿の余白と枠だけ整える */
.section-light .demo-card audio {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--ivory-line);
  border-radius: 0;
}

.section-light > .wrap > p.section-desc,
.section-light .demo-meta,
.section-light .section-label {
  color: var(--ink-muted);
}

.section-light .section-label { border-bottom-color: var(--ivory-line); }

.section-light .demo-arrow { color: var(--accent-ink); }

.section-light .demo-fallback {
  background: var(--ivory-card);
  border-color: var(--ivory-line);
  color: var(--ink-muted);
}

/* ---------- steps ---------- */

.steps {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 22px 20px 20px;
}

/* 先頭のカードだけ、地よりごくわずかに明るい面にする */
.step-lead {
  background: var(--surface-hi);
  border-radius: 5px;
}

.step-num {
  position: absolute;
  top: 8px;
  right: 16px;
  z-index: 0;
  font-family: var(--mono);
  font-size: clamp(44px, 8vw, 64px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.04em;
  font-feature-settings: normal;
  color: var(--step-num);
  pointer-events: none;
  user-select: none;
}

@supports (-webkit-text-stroke: 1px currentColor) {
  .step-num {
    color: transparent;
    -webkit-text-stroke: 1px var(--step-num-stroke);
  }
}

.step h3,
.step p {
  position: relative;
  z-index: 1;
}

.step h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 700;
}

.step p {
  margin: 0;
  font-size: .875rem;
  color: var(--muted);
}

/* 1024px を超えたら階段状に崩し、数字をカード枠の外へ逃がす */
@media (min-width: 1025px) {
  .steps {
    grid-template-columns: 1.25fr 1fr 1fr;
    gap: 26px;
    margin-top: clamp(56px, 6vw, 84px);
    margin-bottom: 72px;
    align-items: start;
  }

  .step { padding: 34px 26px 28px; }

  .step-lead { padding: 40px 30px 34px; }

  .steps .step:nth-child(2) { transform: translateY(32px); }
  .steps .step:nth-child(3) { transform: translateY(64px); }

  .step-num {
    top: -.42em;
    left: -.1em;
    right: auto;
    font-size: clamp(72px, 8vw, 140px);
  }
}

/* ---------- pricing CTA ---------- */

.cta-section {
  background: var(--bg-alt);
}

.cta-card {
  background: transparent;
  border: 0 solid var(--text);
  border-block-width: 2px;
  border-radius: 0;
  padding: clamp(26px, 5vw, 38px) 0;
  text-align: left;
  max-width: none;
}

@media (min-width: 720px) {
  .cta-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "label  price"
      "head   price"
      "note   action"
      "note   fine";
    column-gap: 48px;
    align-items: end;
  }

  .cta-card .section-label { grid-area: label; align-self: start; }
  .cta-card h2 { grid-area: head; margin-bottom: 0; }
  .cta-card .price { grid-area: price; justify-self: end; align-self: end; }
  .cta-card .price-note { grid-area: note; align-self: center; }
  .cta-card .btn { grid-area: action; }
  .cta-card .disclaimer { grid-area: fine; text-align: right; }
}

.price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin: 14px 0 4px;
  font-family: var(--mono);
  font-weight: 600;
  line-height: 1.1;
}

.price .amount {
  font-size: clamp(1.875rem, 5vw, 2.375rem);
  letter-spacing: -.02em;
}

.price .unit {
  font-family: inherit;
  font-size: .9375rem;
  color: var(--muted);
  font-weight: 400;
}

.price-note {
  margin: 0 0 20px;
  font-size: .875rem;
  color: var(--muted);
}

.btn {
  display: block;
  width: 100%;
  padding: 16px 22px;
  border-radius: 3px;
  background: var(--accent-ink);
  color: var(--on-accent);
  font-size: 1.0625rem;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  border: none;
  cursor: pointer;
  transition: transform .12s ease, filter .12s ease;
}

.btn:hover { filter: brightness(1.07); }
.btn:active { transform: translateY(1px); }

.btn:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.disclaimer {
  margin: 14px 0 0;
  font-size: .78125rem;
  line-height: 1.7;
  color: var(--muted);
}

@media (min-width: 720px) {
  .btn { width: auto; min-width: 17rem; }
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 36px 0 48px;
  font-size: .8125rem;
  color: var(--muted);
}

.site-footer h2 {
  margin: 0 0 6px;
  font-size: .8125rem;
  font-weight: 700;
  color: var(--text);
}

.site-footer p {
  margin: 0 0 14px;
  max-width: 46em;
}

.site-footer p:last-child { margin-bottom: 0; }

/* ---------- reserve page ---------- */

.reserve-main {
  padding: clamp(36px, 7vw, 60px) 0 clamp(28px, 5vw, 44px);
}

.reserve-main h1 {
  margin: 0 0 16px;
  font-size: clamp(1.5rem, 6vw, 2.125rem);
  line-height: 1.45;
  font-weight: 700;
  word-break: auto-phrase;
}

.reserve-main .lead {
  margin: 0 0 8px;
  color: var(--muted);
  max-width: 34em;
}

/* Tally は文字色が黒固定なので、フォームの受け皿は常に明色にする */
.form-card {
  margin-top: 28px;
  background: var(--ivory-card);
  border: 1px solid var(--ivory-line);
  border-radius: 2px;
  padding: 12px;
  color-scheme: light;
}

.form-card iframe {
  display: block;
  width: 100%;
  border: 0;
  min-height: 420px;
}

.form-pending {
  padding: 34px 16px;
  text-align: center;
  color: var(--ink);
}

.form-pending h2 {
  margin: 0 0 8px;
  font-size: 1.0625rem;
  font-weight: 700;
}

.form-pending p {
  margin: 0 auto;
  max-width: 30em;
  font-size: .875rem;
  color: var(--ink-muted);
}

.back-link {
  display: inline-block;
  margin-top: 28px;
  font-size: .875rem;
}
