@charset "utf-8";

/* RecoiroQ 公式サイト
   ダーク固定・シャンパンゴールド・Liquid Glass。アプリ本体の Theme.swift と
   AppIcon.icon の実効色をそのまま持ち込んでいる。
   構成: reset → tokens → base → layout → components → utilities */

@layer reset, tokens, base, layout, components, utilities;

/* ------------------------------------------------------------------ reset */
@layer reset {
  *,
  *::before,
  *::after { box-sizing: border-box; }

  * { margin: 0; }

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

  body { min-height: 100svh; }

  img,
  svg,
  video { display: block; max-width: 100%; height: auto; }

  input,
  button,
  textarea,
  select { font: inherit; color: inherit; }

  button { background: none; border: 0; }

  ul[class],
  ol[class] { list-style: none; padding: 0; }

  :where(a) { color: inherit; }
}

/* ----------------------------------------------------------------- tokens */
@layer tokens {
  :root {
    color-scheme: dark;

    /* 地色: アプリの背景（#0A0A0B・#1E1E1C）に合わせた漆黒〜暖色チャコール */
    --bg: #08080a;
    --bg-raise: #101012;
    --panel: #17171a;
    --ink: #000;

    /* アイコンリングの実効色（Icon Composer 版と同じ6色） */
    --gold-1: #fffddc;
    --gold-2: #ffe9b2;
    --gold-3: #e5cd9a;
    --gold-4: #fffdcf;
    --gold-5: #f0d9a6;
    --gold-6: #fff5be;
    --gold: #f0d9a6;
    --gold-deep: #c4ad7c;
    --gold-line: conic-gradient(from -135deg,
        var(--gold-1) 0%, var(--gold-2) 14%, var(--gold-3) 34%,
        var(--gold-4) 55%, var(--gold-5) 72%, var(--gold-6) 88%, var(--gold-1) 100%);
    --gold-text: linear-gradient(150deg, #fffdf0, var(--gold-2) 42%, var(--gold-3));

    --fg: #fff;
    --fg-2: rgb(235 235 245 / 0.66);
    --fg-3: rgb(235 235 245 / 0.45);

    --line: rgb(255 255 255 / 0.10);
    --line-strong: rgb(255 255 255 / 0.18);
    --glass: rgb(255 255 255 / 0.055);
    --glass-hi: rgb(255 255 255 / 0.20);

    --radius-pill: 999px;
    --radius-card: 18px;
    --radius-sheet: 28px;

    --gutter: clamp(20px, 5vw, 40px);
    --measure: 1120px;
    --section-gap: clamp(72px, 10vw, 136px);

    --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Hiragino Sans",
      "Hiragino Kaku Gothic ProN", "Noto Sans JP", system-ui, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;

    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  }
}

/* ------------------------------------------------------------------- base */
@layer base {
  html { scroll-behavior: smooth; }

  body {
    background: var(--bg);
    color: var(--fg);
    font-family: var(--font-sans);
    font-size: clamp(0.95rem, 0.9rem + 0.2vw, 1.0625rem);
    line-height: 1.75;
    letter-spacing: 0.01em;
    line-break: strict;  /* 行頭に「ー」「、」などが来ないようにする（禁則） */
    -webkit-font-smoothing: antialiased;
    /* clip であって hidden にしないこと。hidden は body 自体をスクロールコンテナに
       変えてしまい、スクロール駆動アニメーション（.reveal の view()）が
       永遠に開始前＝不可視のまま止まる。 */
    overflow-x: clip;
  }

  /* 画面全体に薄く敷く金の光だまり（アイコンの中央グローと同じ役割） */
  body::before {
    content: "";
    position: fixed;
    inset: -20vmax 0 auto;
    height: 90vmax;
    background:
      radial-gradient(52vmax 42vmax at 12% 0%, rgb(217 198 150 / 0.13), transparent 70%),
      radial-gradient(46vmax 38vmax at 88% 12%, rgb(217 198 150 / 0.07), transparent 72%);
    pointer-events: none;
    z-index: 0;
  }

  h1, h2, h3, h4 {
    font-weight: 650;
    line-height: 1.28;
    letter-spacing: -0.015em;
    text-wrap: balance;
  }

  h1 { font-size: clamp(2.2rem, 1.3rem + 3.4vw, 3.6rem); font-weight: 700; letter-spacing: -0.03em; }
  h2 { font-size: clamp(1.65rem, 1.15rem + 2vw, 2.5rem); letter-spacing: -0.025em; }
  h3 { font-size: 1.0625rem; }

  /* 日本語の見出しは語の途中で折れると読みにくい。意味の切れ目を span で囲み、
     そこでだけ改行させる（英語では空白で折り返すので影響しない）。 */
  :is(h1, h2, h3) > span { display: inline-block; }

  p { text-wrap: pretty; }

  a { text-decoration-color: rgb(255 255 255 / 0.3); text-underline-offset: 0.25em; }

  :focus-visible {
    outline: 2px solid var(--gold-2);
    outline-offset: 3px;
    border-radius: 6px;
  }

  ::selection { background: rgb(240 217 166 / 0.28); }

  ::placeholder { color: var(--fg-3); }
}

/* ----------------------------------------------------------------- layout */
@layer layout {
  .wrap {
    width: min(100% - var(--gutter) * 2, var(--measure));
    margin-inline: auto;
  }

  main { position: relative; z-index: 1; }

  .section {
    padding-block: var(--section-gap);
    scroll-margin-top: 84px;
  }

  .section--tight { padding-block: clamp(56px, 7vw, 88px); }

  /* 目次から飛んだ見出しとフォーム見出しが sticky ヘッダーの下に潜らないようにする */
  .doc :is(h1, h2, h3)[id],
  #form { scroll-margin-top: 84px; }

  /* 日本語では ch（"0" の字幅）が当てにならないので、行長は em で決める。 */
  .section__head {
    max-width: 42em;
    margin-bottom: clamp(32px, 4vw, 56px);
  }

  .section__head > p {
    margin-top: 14px;
    color: var(--fg-2);
  }

  /* 金のグラデ文字。background-clip: text が使えない環境では文字が消えるので、
     素の色を先に置いてから @supports で上書きする。 */
  .eyebrow {
    display: inline-block;
    margin-bottom: 14px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--gold-2);
  }

  @supports (background-clip: text) or (-webkit-background-clip: text) {
    .eyebrow {
      background: var(--gold-text);
      -webkit-background-clip: text;
      background-clip: text;
      color: transparent;
    }
  }

  /* --- ヘッダー --- */
  .site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgb(8 8 10 / 0.72);
    border-bottom: 1px solid var(--line);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    backdrop-filter: blur(20px) saturate(160%);
  }

  .site-header__inner {
    display: flex;
    align-items: center;
    gap: clamp(12px, 3vw, 28px);
    min-height: 60px;
  }

  .brand {
    display: inline-flex;
    align-items: center;
    /* ロゴ SVG の viewBox は余白なしの実寸なので、間隔はこの gap がそのまま出る。
       ワードマークの文字サイズ : 間隔 = 1 : 1/φ³（黄金比を3段）。 */
    gap: 0.236em;
    font-size: 1.75rem;
    font-weight: 650;
    letter-spacing: -0.02em;
    text-decoration: none;
    flex: none;
  }

  /* 高さは字面そのもの（幅は viewBox の比 528.08:842.72 から自動で決まる）。
     隣の App Store バッジ（40px）よりわずかに低くして、
     ワードマーク（28px）とのバランスを取っている。 */
  .brand img { height: 36px; width: auto; }

  /* ヒーローのラベルにはブランド名が入るので大文字化しない（RecoiroQ → RECOIROQ 対策） */
  .hero .eyebrow { text-transform: none; }

  .nav {
    display: flex;
    align-items: center;
    gap: clamp(4px, 1.6vw, 20px);
    margin-inline-start: auto;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .nav::-webkit-scrollbar { display: none; }

  .nav a {
    flex: none;
    padding: 6px 2px;
    font-size: 0.875rem;
    color: var(--fg-2);
    text-decoration: none;
    transition: color 0.2s var(--ease);
  }

  .nav a:hover { color: var(--fg); }
  .nav a[aria-current] { color: var(--fg); }

  .site-header .btn { flex: none; }

  /* --- モバイルのメニュー（JavaScript を使わず :target で開閉する）
         ☰ は `#menu` へのリンク、閉じるのは幕（.menu-scrim）か
         メニュー内のリンクを踏んだ時。行き先が変わると :target が外れて
         勝手に閉じるので、開きっぱなしにならない --- */
  .menu-button,
  .menu-scrim { display: none; }

  /* タブレット（iPad mini の 744pt）より下＝スマホだけ ☰ にする */
  @media (max-width: 700px) {
    .menu-button {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex: none;
      width: 40px;
      height: 40px;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: var(--glass);
      text-decoration: none;
    }

    /* 並びは [ロゴ] …… [App Store] [☰]。App Store ボタンが無いページでも
       ☰ が右端に来るよう、寄せはロゴ側の auto マージンで作る。 */
    .site-header__inner { justify-content: flex-end; }
    .site-header .brand { margin-inline-end: auto; }
    .menu-button { order: 5; }

    .menu-button svg {
      width: 20px;
      height: 20px;
      fill: none;
      stroke: var(--fg);
      stroke-width: 1.8;
      stroke-linecap: round;
    }

    /* fixed にしておくと、`#menu` へ飛んでもページがスクロールしない
       （absolute だと途中まで読んでから開いた時に先頭へ戻ってしまう）。 */
    .nav {
      display: none;
      position: fixed;
      inset-inline: 0;
      top: 60px;
      z-index: 2;
      flex-direction: column;
      align-items: stretch;
      gap: 0;
      margin: 0;
      padding: 4px var(--gutter) 12px;
      max-height: calc(100dvh - 60px);
      overflow-y: auto;
      overscroll-behavior: contain;
      background: var(--bg);
      border-bottom: 1px solid var(--line);
    }

    .nav:target { display: flex; }

    .nav a {
      padding: 13px 2px;
      font-size: 1rem;
      color: var(--fg);
      border-bottom: 1px solid var(--line);
    }

    .nav a:last-child { border-bottom: 0; }

    /* メニューの外側（☰ を含む）を触ったら閉じる幕。
       ヘッダーが backdrop-filter を持つ＝fixed の基準がヘッダーになるので、
       inset: 0 ではヘッダーの高さしか覆えない。ビューポート単位で指定する。 */
    .nav:target ~ .menu-scrim {
      display: block;
      position: fixed;
      top: 0;
      left: 0;
      width: 100vw;
      height: 100dvh;
      z-index: 1;
    }
  }

  /* --- フッター --- */
  .site-footer {
    position: relative;
    z-index: 1;
    padding-block: 56px 72px;
    border-top: 1px solid var(--line);
    color: var(--fg-3);
    font-size: 0.875rem;
  }

  .site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    gap: 28px 40px;
    align-items: start;
  }

  .site-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
  }

  .site-footer a { text-decoration: none; transition: color 0.2s var(--ease); }
  .site-footer a:hover { color: var(--fg); }

  .site-footer__note {
    flex-basis: 100%;
    color: rgb(235 235 245 / 0.32);
    font-size: 0.8125rem;
  }
}

/* ------------------------------------------------------------- components */
@layer components {

  /* --- ガラス面 --- */
  .glass {
    position: relative;
    background: var(--glass);
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    -webkit-backdrop-filter: blur(24px) saturate(150%);
    backdrop-filter: blur(24px) saturate(150%);
    box-shadow:
      inset 0 1px 0 var(--glass-hi),
      0 24px 60px -32px rgb(0 0 0 / 0.9);
  }

  /* --- ボタン --- */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 11px 22px;
    border-radius: var(--radius-pill);
    font-size: 0.9375rem;
    font-weight: 600;
    letter-spacing: 0;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: transform 0.14s var(--ease), opacity 0.14s var(--ease),
      background-color 0.2s var(--ease), border-color 0.2s var(--ease);
  }

  .btn:active { transform: scale(0.97); opacity: 0.9; }

  .btn svg { width: 1.05em; height: 1.05em; fill: currentColor; }

  .btn--gold {
    color: #1a1508;
    background: linear-gradient(145deg, var(--gold-1), var(--gold-2) 40%, var(--gold-3));
    box-shadow: 0 10px 30px -14px rgb(217 198 150 / 0.7), inset 0 1px 0 rgb(255 255 255 / 0.55);
  }

  .btn--glass {
    color: var(--fg);
    background: var(--glass);
    border: 1px solid var(--line-strong);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    backdrop-filter: blur(20px) saturate(150%);
    box-shadow: inset 0 1px 0 var(--glass-hi);
  }

  .btn--glass:hover { background: rgb(255 255 255 / 0.1); }

  .btn--ghost {
    color: var(--fg-2);
    padding-inline: 4px;
  }

  .btn--ghost:hover { color: var(--fg); }

  /* 公式バッジと並ぶボタン。高さ（54px）と角丸をバッジに合わせて対にする。 */
  .btn--lg {
    min-height: 54px;
    padding: 0 28px;
    border-radius: 10px;
    font-size: 1rem;
  }

  .btn--block { display: flex; width: 100%; }

  .btn[aria-disabled="true"] {
    pointer-events: none;
    color: var(--fg-3);
    background: rgb(255 255 255 / 0.05);
    border: 1px solid var(--line);
    box-shadow: none;
  }

  /* App Store の公式バッジ。Apple の指定どおり画像そのままで使い、
     まわりにバッジ高さの 1/10 以上の余白を空ける（.btn-row の gap で確保）。 */
  .store-badge {
    display: inline-flex;
    border-radius: 8px;
    text-decoration: none;
  }

  .store-badge img {
    display: block;
    height: 54px;   /* 隣の .btn--lg と高さを揃える */
    width: auto;
  }

  /* ヘッダーは小さめ（Apple の下限 40px） */
  .site-header .store-badge img { height: 40px; }

  .btn-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
  }

  /* --- ヒーロー --- */
  .hero {
    position: relative;
    padding-block: clamp(56px, 9vw, 108px) var(--section-gap);
  }

  .hero__grid {
    display: grid;
    gap: clamp(40px, 6vw, 72px);
    align-items: center;
    grid-template-columns: minmax(0, 1fr);
  }

  @media (min-width: 900px) {
    .hero__grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); }
  }

  .hero h1 { margin-bottom: 22px; }

  .hero h1 em {
    font-style: normal;
    color: var(--gold-2);
  }

  @supports (background-clip: text) or (-webkit-background-clip: text) {
    .hero h1 em {
      background: var(--gold-text);
      -webkit-background-clip: text;
      background-clip: text;
      color: transparent;
    }
  }

  .hero__lead {
    max-width: 30em;
    margin-bottom: 30px;
    color: var(--fg-2);
    font-size: clamp(1rem, 0.94rem + 0.35vw, 1.1875rem);
  }

  .hero__meta {
    margin-top: 22px;
    color: var(--fg-3);
    font-size: 0.8125rem;
  }

  /* --- 端末モック（Mac・iPad・iPhone の実スクリーンショットを CSS の筐体に入れる）
         上段に iPad（横画面）と iPhone を足元を揃えて横並び、その下に Mac。
         Mac は上段の足元へ少し潜り込ませて、3台がひと塊に見えるようにする。
         大きさは .devices 幅に対する %、ベゼル・角丸は各台の font-size（cqw）
         に対する em。どの画面幅でも3台の比率が崩れない --- */
  .devices {
    position: relative;
    justify-self: center;
    container-type: inline-size;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: min(480px, 100%);
  }

  /* 背面の金の後光 */
  .devices::before {
    content: "";
    position: absolute;
    inset: -12%;
    z-index: -1;
    border-radius: 50%;
    background: var(--gold-line);
    opacity: 0.16;
    filter: blur(46px);
    animation: orbit 24s linear infinite;
  }

  /* 上段: iPad と iPhone を足元揃えで横並び。幅は Mac のふたと同じにして、
     iPad の左端・iPhone の右端が Mac の左右にぴたりと揃うようにする。 */
  .devices__row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    width: 92%;
  }

  .dev { position: relative; }

  .dev__body {
    display: grid;
    padding: var(--bezel);
    border-radius: var(--radius);
    background: linear-gradient(160deg, rgb(255 255 255 / 0.18), rgb(255 255 255 / 0.04) 42%, rgb(255 255 255 / 0.12));
    box-shadow: 0 2.4em 4em -1.8em rgb(0 0 0 / 0.95), 0 0 0 1px rgb(255 255 255 / 0.07);
  }

  .dev__screen {
    width: 100%;
    height: auto;
    border-radius: calc(var(--radius) - var(--bezel));
    background: #0c0c0e;
  }

  /* Mac（下段） */
  .dev--mac {
    --radius: 1em;
    --bezel: 0.45em;
    width: 92%;
    margin-top: 4%;
    font-size: 2.05cqw;
  }

  .dev--mac .dev__base {
    position: relative;
    height: 0.85em;
    margin-inline: -3.5%;
    border-radius: 0 0 0.45em 0.45em;
    background: linear-gradient(180deg, #52565e, #1a1b1e 72%);
    clip-path: polygon(0 0, 100% 0, 98.4% 100%, 1.6% 100%);
    box-shadow: 0 1.4em 2.2em -1em rgb(0 0 0 / 0.9);
  }

  /* ヒンジのくぼみ */
  .dev--mac .dev__base::after {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    translate: -50% 0;
    width: 13%;
    height: 0.26em;
    border-radius: 0 0 0.3em 0.3em;
    background: rgb(0 0 0 / 0.5);
  }

  /* iPad（上段左・横画面。幅は上段の内訳なので % は行に対する割合） */
  .dev--pad {
    --radius: 1.2em;
    --bezel: 0.55em;
    width: 70%;
    font-size: 3.6cqw;
  }

  /* iPhone（上段右） */
  .dev--phone {
    --radius: 2em;
    --bezel: 0.4em;
    width: 23%;
    font-size: 2.35cqw;
  }

  /* --- 特長カード --- */
  .cards {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  }

  .card {
    padding: 26px 24px 28px;
    border-radius: var(--radius-card);
    transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
  }

  .card:hover { border-color: var(--line-strong); transform: translateY(-2px); }

  .card h3 { margin-bottom: 10px; }

  .card p { color: var(--fg-2); font-size: 0.9375rem; }

  .card__icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    margin-bottom: 18px;
    border-radius: 12px;
    background: linear-gradient(160deg, rgb(255 253 220 / 0.16), rgb(196 173 124 / 0.08));
    box-shadow: inset 0 0 0 1px rgb(240 217 166 / 0.28);
  }

  .card__icon svg { width: 20px; height: 20px; stroke: var(--gold-2); fill: none; stroke-width: 1.6; }

  /* --- 料金 --- */
  .plans {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
    align-items: stretch;
  }

  .plan {
    display: flex;
    flex-direction: column;
    padding: 28px 26px;
    border-radius: var(--radius-card);
  }

  .plan--pro {
    border-color: rgb(240 217 166 / 0.4);
    background:
      linear-gradient(180deg, rgb(240 217 166 / 0.09), rgb(240 217 166 / 0.02)),
      var(--glass);
  }

  .plan__name {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    font-size: 1.0625rem;
    font-weight: 650;
  }

  .plan__price {
    margin-bottom: 20px;
    color: var(--fg-3);
    font-size: 0.875rem;
  }

  .plan ul {
    display: grid;
    gap: 10px;
    margin: 0 0 24px;
    padding: 0;
    list-style: none;
    font-size: 0.9375rem;
    color: var(--fg-2);
  }

  .plan li {
    display: grid;
    grid-template-columns: 18px 1fr;
    gap: 10px;
    align-items: start;
  }

  .plan li::before {
    content: "";
    width: 16px;
    height: 16px;
    margin-top: 0.45em;
    border-radius: 50%;
    background: rgb(255 255 255 / 0.08) center / 9px auto no-repeat
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath d='M1 5l3.2 3.4L11 1.2' fill='none' stroke='%23f0d9a6' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }

  .plan > :last-child { margin-top: auto; }

  .badge {
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    background: linear-gradient(145deg, var(--gold-1), var(--gold-3));
    color: #1a1508;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
  }

  .fineprint {
    margin-top: 22px;
    color: var(--fg-3);
    font-size: 0.8125rem;
  }

  /* --- 仕様表 --- */
  .specs {
    display: grid;
    gap: 0;
    border-radius: var(--radius-card);
    overflow: hidden;
  }

  .specs div {
    display: grid;
    grid-template-columns: minmax(8ch, 14ch) 1fr;
    gap: 8px 20px;
    padding: 16px clamp(18px, 3vw, 26px);
    font-size: 0.9375rem;
  }

  .specs div + div { border-top: 1px solid var(--line); }

  .specs dt { color: var(--fg-3); }
  .specs dd { margin: 0; color: var(--fg-2); }

  /* --- FAQ --- */
  .faq { display: grid; gap: 12px; }

  .faq details {
    padding: 4px 22px;
    border-radius: var(--radius-card);
  }

  .faq summary {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 0;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
  }

  .faq summary::-webkit-details-marker { display: none; }

  .faq summary::after {
    content: "";
    flex: none;
    width: 11px;
    height: 11px;
    margin-inline-start: auto;
    border-right: 1.8px solid var(--gold-3);
    border-bottom: 1.8px solid var(--gold-3);
    rotate: 45deg;
    transition: rotate 0.25s var(--ease);
  }

  .faq details[open] summary::after { rotate: -135deg; }

  .faq p {
    padding-bottom: 20px;
    color: var(--fg-2);
    font-size: 0.9375rem;
  }

  /* --- CTA --- */
  .cta {
    padding: clamp(40px, 6vw, 72px) clamp(28px, 5vw, 64px);
    border-radius: var(--radius-sheet);
    text-align: center;
    background:
      radial-gradient(120% 140% at 50% 0%, rgb(240 217 166 / 0.14), transparent 62%),
      var(--glass);
  }

  .cta h2 { margin-bottom: 16px; }

  .cta p { max-width: 32em; margin: 0 auto 30px; color: var(--fg-2); }

  .cta .btn-row { justify-content: center; }

  /* --- 本文ページ（規約・ポリシー） --- */
  .doc { max-width: 38em; }

  /* 見出しは本文の行長に収める（ヒーローほど大きくしない） */
  .doc h1 { font-size: clamp(1.9rem, 1.45rem + 1.8vw, 2.75rem); }

  .doc__meta {
    margin-top: 18px;
    color: var(--fg-3);
    font-size: 0.875rem;
  }

  .doc h2 {
    margin-top: 56px;
    margin-bottom: 16px;
    font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.5rem);
    padding-top: 26px;
    border-top: 1px solid var(--line);
  }

  .doc h3 {
    margin-top: 28px;
    margin-bottom: 10px;
    color: var(--gold-2);
    font-size: 1rem;
  }

  .doc p,
  .doc li { color: var(--fg-2); line-height: 1.95; }

  .doc p + p { margin-top: 1em; }

  .doc ul,
  .doc ol { margin: 14px 0; padding-inline-start: 1.4em; display: grid; gap: 8px; }

  .doc li::marker { color: var(--gold-3); }

  .doc a { color: var(--gold-2); }

  .doc__note {
    margin-top: 18px;
    padding: 18px 22px;
    border-radius: var(--radius-card);
    font-size: 0.9375rem;
  }

  .toc {
    margin-top: 36px;
    padding: 22px 26px;
    border-radius: var(--radius-card);
  }

  .toc h2 {
    margin: 0 0 12px;
    padding: 0;
    border: 0;
    font-size: 0.75rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--fg-3);
  }

  .toc ol {
    display: grid;
    gap: 6px 24px;
    margin: 0;
    padding-inline-start: 1.3em;
    font-size: 0.9375rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  }

  .toc a { color: var(--fg-2); text-decoration: none; }
  .toc a:hover { color: var(--gold-2); }

  /* --- フォーム --- */
  .form {
    display: grid;
    gap: 20px;
    max-width: 40rem;
    padding: clamp(24px, 4vw, 40px);
    border-radius: var(--radius-sheet);
  }

  .field { display: grid; gap: 8px; }

  .field label {
    font-size: 0.875rem;
    font-weight: 600;
  }

  .field label span {
    margin-inline-start: 8px;
    color: var(--fg-3);
    font-weight: 400;
    font-size: 0.75rem;
  }

  .field :is(input, textarea, select) {
    width: 100%;
    padding: 13px 15px;
    border: 1px solid var(--line-strong);
    border-radius: 12px;
    background: rgb(0 0 0 / 0.35);
    font-size: 1rem;
    transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
  }

  .field :is(input, textarea, select):focus {
    border-color: rgb(240 217 166 / 0.65);
    /* background ショートハンドにしないこと。select の金色シェブロン
       （background-image）が :focus 中だけ消える。 */
    background-color: rgb(0 0 0 / 0.5);
    outline: none;
  }

  .field textarea { min-height: 170px; resize: vertical; line-height: 1.7; }

  .field select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23f0d9a6' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 12px auto;
    padding-inline-end: 40px;
  }

  .field__error {
    color: #ff8a80;
    font-size: 0.8125rem;
  }

  .field :is(input, textarea)[aria-invalid="true"] { border-color: #ff8a80; }

  .honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
  }

  .notice {
    display: grid;
    gap: 6px;
    padding: 16px 20px;
    border-radius: 14px;
    font-size: 0.9375rem;
  }

  .notice--ok {
    border: 1px solid rgb(48 209 88 / 0.4);
    background: rgb(48 209 88 / 0.1);
  }

  .notice--ng {
    border: 1px solid rgb(255 138 128 / 0.45);
    background: rgb(255 138 128 / 0.1);
  }

  .notice strong { color: var(--fg); }
  .notice p { color: var(--fg-2); }
}

/* -------------------------------------------------------------- utilities */
@layer utilities {
  .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .skip-link {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 100;
    padding: 10px 18px;
    border-radius: var(--radius-pill);
    background: var(--gold-2);
    color: #1a1508;
    font-weight: 600;
    text-decoration: none;
    translate: 0 -160%;
    transition: translate 0.2s var(--ease);
  }

  .skip-link:focus-visible { translate: 0 0; }

  .center { text-align: center; }
  .mt-lg { margin-top: clamp(28px, 4vw, 44px); }
}

/* ------------------------------------------------------------- animations */
@keyframes orbit {
  to { rotate: 1turn; }
}

@keyframes reveal {
  from { opacity: 0; translate: 0 22px; }
  to { opacity: 1; translate: 0 0; }
}

/* スクロール駆動の出現（対応ブラウザのみ・非対応では最初から見えている） */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal {
      animation: reveal linear both;
      animation-timeline: view();
      animation-range: entry 8% cover 26%;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
