/* 波の道具 / Wave Tools — shared tokens and parts (v1, 2026-10-16, Polly, T-20261015-32)
   - 外部フォント・外部画像なし。システムフォントのみ。
   - 道具ごとに変えるのは themes.css の4つの変数だけ（--wv-accent / --wv-on-accent / --wv-accent-strong / --wv-accent-soft）。
   - 接頭辞 wv- 。本社の hv-（HIVE）とは混ぜない。名前に「HIVE」を出さない（Mitsu 2026-10-15）。
   - 土台：本社 design-system/project/tokens.json の ink（#14171C は本社の ground #0E1014 に近い黒）と、
     「光らせる所を絞る」「記号か言葉を必ず添える」「数字は等幅」の考え方。色は昼向けの明るい面に作り直した。 */

/* ───────── 1. tokens ───────── */
:root {
  /* 面と線（全部の道具で共通） */
  --wv-ground: #F3F5F8;        /* ページの背景 */
  --wv-panel: #FFFFFF;         /* カード、入力欄の面 */
  --wv-panel-raised: #E9EDF2;  /* 一段くぼんだ面（空のゲージ、ファイルの拡張子札） */
  --wv-line: #D3D9E2;          /* 区切り線（飾り。これだけで押せる物を示さない） */
  --wv-line-strong: #6B7586;   /* 押せる物・入力欄の枠。panelの上で4.5:1 */
  --wv-ink: #14171C;           /* 見出し・本文・枠・押す物の影 */
  --wv-ink-muted: #4A5362;     /* 補足。ground/panel/raised/accent-softの上で4.5:1以上。accentの上には置かない */
  --wv-focus: var(--wv-ink);   /* キーボードの目印（3pxの輪 + 白い隙間） */

  /* 状態（必ず言葉と記号を添える） */
  --wv-ok: #0B6B45;   --wv-ok-soft: #E1F4EA;
  --wv-err: #A8231B;  --wv-err-soft: #FCEBE9;
  --wv-info: #1F4E8C; --wv-info-soft: #E6EEF9;

  /* 差し色：道具ごとに themes.css で差し替える。ここは既定値（ハロウィン） */
  --wv-accent: #FF7A1A;         /* 塗り。上の文字は必ず on-accent（ink）。ink-mutedは置かない */
  --wv-on-accent: #14171C;
  --wv-accent-strong: #A63F00;  /* 明るい面の上の文字・線・ゲージ。ground/panel/soft/raised上で4.5:1以上 */
  --wv-accent-soft: #FFE8D6;    /* 淡い下地（選択中、キャラの吹き出し）。上の文字はink */

  /* 文字 */
  --wv-font: system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, "Noto Sans JP", "Noto Sans CJK JP", sans-serif;

  /* 余白 */
  --wv-space-1: 4px;  --wv-space-2: 8px;  --wv-space-3: 12px; --wv-space-4: 16px;
  --wv-space-5: 20px; --wv-space-6: 24px; --wv-space-7: 32px; --wv-space-8: 48px;

  /* 角 */
  --wv-radius-s: 8px; --wv-radius-m: 12px; --wv-radius-l: 20px;

  /* 押す物の影（硬い影。ぼかさない） */
  --wv-press: 0 3px 0 var(--wv-ink);
}

/* ───────── 2. base ───────── */
.wv, .wv *, .wv *::before, .wv *::after { box-sizing: border-box; }
.wv {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  font-family: var(--wv-font); font-size: 16px; line-height: 26px; font-weight: 400;
  color: var(--wv-ink); background: var(--wv-ground);
  -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
  display: flex; flex-direction: column;
}
.wv :lang(ja) { line-break: strict; word-break: auto-phrase; }
.wv :where(h1, h2, h3, p, ul, ol, figure) { margin: 0; }
.wv h1, .wv h2, .wv h3 { text-wrap: balance; overflow-wrap: anywhere; }
.wv p { text-wrap: pretty; overflow-wrap: anywhere; }
.wv a { color: inherit; }
/* 部品の初期値（強さ0）。`.wv button` と書くと、あとの `.wv-btn{font-weight:800}` より強くなって
   <button> だけ文字が細く（400）なる（2026-10-16 審査 必須2）。:where() で強さを0にして、部品のクラスが必ず勝つ。 */
.wv :where(button, input, select, textarea) { font: inherit; color: inherit; }
button.wv-btn { appearance: none; -webkit-appearance: none; }
.wv-num { font-variant-numeric: tabular-nums; }
.wv-muted { color: var(--wv-ink-muted); }
.wv-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); border: 0; white-space: nowrap; }
.wv :focus-visible { outline: 3px solid var(--wv-focus); outline-offset: 2px; }
.wv-band :focus-visible, .wv-card :focus-visible { outline-color: var(--wv-ink); }

/* 文字のスタイル（日英とも同じ階層。英語は少し短めの行長で組む） */
.wv-display { font-size: 32px; line-height: 40px; font-weight: 800; letter-spacing: 0; }
.wv-title   { font-size: 24px; line-height: 32px; font-weight: 800; }
.wv-heading { font-size: 18px; line-height: 26px; font-weight: 700; }
.wv-body    { font-size: 16px; line-height: 26px; }
.wv-small   { font-size: 14px; line-height: 22px; }
.wv-caption { font-size: 12px; line-height: 16px; }
@media (min-width: 900px) {
  .wv-display { font-size: 44px; line-height: 54px; }
  .wv-title   { font-size: 28px; line-height: 36px; }
}

/* ───────── 3. page frame ───────── */
.wv-wrap   { width: 100%; max-width: 1040px; margin-inline: auto; padding-inline: var(--wv-space-4); }
.wv-narrow { width: 100%; max-width: 600px; }  /* 左そろえ（上のロゴと同じ線）。中央に寄せない */
@media (min-width: 600px) { .wv-wrap { padding-inline: var(--wv-space-6); } }
@media (min-width: 900px) { .wv-wrap { padding-inline: var(--wv-space-7); } }
.wv-main { flex: 1 0 auto; padding-block: var(--wv-space-6) var(--wv-space-8); }

/* 上の色の帯：このページで大胆にする1か所。下の縁が「波」（結果カードの上の面と同じ形） */
.wv-band { position: relative; background: var(--wv-accent); color: var(--wv-on-accent); padding-bottom: 36px; }
.wv-band::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 28px; background: var(--wv-ground);
  -webkit-mask: var(--wv-wave) center bottom / 100% 100% no-repeat; mask: var(--wv-wave) center bottom / 100% 100% no-repeat; }
:root { --wv-wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 360 28' preserveAspectRatio='none'%3E%3Cpath d='M0 14C60 0 120 28 180 14S300 0 360 14V28H0Z'/%3E%3C/svg%3E"); }
.wv-band--tall { padding-bottom: 48px; }
.wv-band--compact { padding-bottom: 32px; }
.wv-header { display: flex; align-items: center; justify-content: space-between; gap: var(--wv-space-3); padding-block: var(--wv-space-3); }
.wv-brand { display: inline-flex; align-items: center; gap: var(--wv-space-2); min-height: 44px; font-size: 16px; line-height: 24px; font-weight: 800; text-decoration: none; }
.wv-brand svg { width: 28px; height: 28px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.wv-lang { display: inline-flex; border: 2px solid var(--wv-ink); border-radius: 999px; overflow: hidden; background: var(--wv-panel); }
.wv-lang a { display: grid; place-items: center; min-width: 48px; min-height: 44px; padding-inline: var(--wv-space-3); font-size: 14px; font-weight: 700; text-decoration: none; color: var(--wv-ink); }
.wv-lang a[aria-current="true"] { background: var(--wv-ink); color: #FFFFFF; }
.wv-hero { display: grid; gap: var(--wv-space-4); padding-top: var(--wv-space-4); }
.wv-hero__tool { font-size: 14px; line-height: 20px; font-weight: 700; }
.wv-hero__lead { font-size: 16px; line-height: 26px; font-weight: 500; max-width: 34em; }
.wv-hero .wv-btn { justify-self: start; }

/* ───────── 4. parts ───────── */
/* 札（無料・ログイン不要・保存しない）。色だけに頼らず言葉で言う */
.wv-chips { display: flex; flex-wrap: wrap; gap: var(--wv-space-2); padding: 0; margin: 0; list-style: none; }
.wv-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 12px; border-radius: 999px; background: var(--wv-panel); color: var(--wv-ink); border: 2px solid var(--wv-ink); font-size: 14px; line-height: 20px; font-weight: 700; }
.wv-chip svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ボタン */
.wv-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--wv-space-2); min-height: 52px; padding: 12px 24px; border: 2px solid var(--wv-ink); border-radius: var(--wv-radius-m); font-size: 16px; line-height: 24px; font-weight: 800; text-align: center; text-decoration: none; cursor: pointer; transition: transform .08s ease-out, box-shadow .08s ease-out; -webkit-tap-highlight-color: transparent; }
.wv-btn svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.wv-btn--primary { background: var(--wv-accent); color: var(--wv-on-accent); box-shadow: var(--wv-press); }
.wv-btn--secondary { background: var(--wv-panel); color: var(--wv-ink); box-shadow: var(--wv-press); }
.wv-btn--primary:active, .wv-btn--secondary:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--wv-ink); }
.wv-btn--quiet { min-height: 44px; padding: 8px 12px; border-color: transparent; background: transparent; color: var(--wv-ink); text-decoration: underline; text-underline-offset: 4px; font-weight: 700; }
.wv-btn--block { width: 100%; }
.wv-btn[disabled], .wv-btn[aria-disabled="true"] { background: var(--wv-panel-raised); color: var(--wv-ink-muted); border-color: var(--wv-line-strong); box-shadow: none; cursor: not-allowed; }
.wv-actions { display: grid; gap: var(--wv-space-3); }
@media (min-width: 600px) { .wv-actions--row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 進み具合。数字と言葉で言う（色だけにしない） */
.wv-progress { display: grid; gap: var(--wv-space-2); }
.wv-progress__row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--wv-space-3); font-size: 14px; line-height: 20px; font-weight: 700; }
.wv-progress__track { height: 10px; border-radius: 999px; background: var(--wv-panel-raised); box-shadow: inset 0 0 0 1px var(--wv-line-strong); overflow: hidden; }
.wv-progress__fill { display: block; height: 100%; width: var(--p, 0%); background: var(--wv-accent-strong); border-radius: 999px; }

/* 質問と選ぶ物 */
.wv-q { display: grid; gap: var(--wv-space-5); }
.wv-q__title { font-size: 24px; line-height: 34px; font-weight: 800; }
@media (min-width: 900px) { .wv-q__title { font-size: 30px; line-height: 42px; } }
.wv-options { display: grid; gap: var(--wv-space-3); padding: 0; margin: 0; border: 0; list-style: none; }
.wv-option { position: relative; display: block; }
.wv-option__box { display: flex; align-items: center; gap: var(--wv-space-3); min-height: 60px; padding: 12px var(--wv-space-4); background: var(--wv-panel); border: 2px solid var(--wv-line-strong); border-radius: var(--wv-radius-m); cursor: pointer; font-size: 17px; line-height: 26px; font-weight: 700; overflow-wrap: anywhere; }
.wv-option__text { flex: 1; min-width: 0; }
.wv-option__sub { display: block; font-size: 14px; line-height: 20px; font-weight: 400; color: var(--wv-ink-muted); }
.wv-option__mark { flex: none; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--wv-line-strong); display: grid; place-items: center; background: var(--wv-panel); }
.wv-option__mark svg { width: 16px; height: 16px; fill: none; stroke: var(--wv-on-accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.wv-option input:checked + .wv-option__box { border-color: var(--wv-ink); background: var(--wv-accent-soft); box-shadow: var(--wv-press); }
.wv-option input:checked + .wv-option__box .wv-option__mark { background: var(--wv-accent); border-color: var(--wv-ink); }
.wv-option input:checked + .wv-option__box .wv-option__mark svg { opacity: 1; }
.wv-option input:focus-visible + .wv-option__box { outline: 3px solid var(--wv-focus); outline-offset: 2px; }
.wv-q__nav { display: flex; justify-content: space-between; align-items: center; gap: var(--wv-space-3); flex-wrap: wrap; }

/* 入力欄（16px未満にしない：iPhoneが画面を拡大して横にずれる） */
.wv-field { display: grid; gap: var(--wv-space-2); }
.wv-field__label { font-size: 16px; line-height: 24px; font-weight: 700; }
.wv-field__hint { font-size: 14px; line-height: 22px; color: var(--wv-ink-muted); }
.wv-input, .wv-select { width: 100%; min-height: 48px; padding: 10px var(--wv-space-3); font-size: 16px; line-height: 24px; background: var(--wv-panel); border: 2px solid var(--wv-line-strong); border-radius: var(--wv-radius-s); }
.wv-range { width: 100%; height: 44px; margin: 0; accent-color: var(--wv-accent-strong); background: transparent; }
.wv-range-row { display: flex; align-items: center; gap: var(--wv-space-3); }
.wv-range-row .wv-range { flex: 1; min-width: 0; }
.wv-range-row output { flex: none; min-width: 3.2em; text-align: right; font-size: 18px; line-height: 24px; font-weight: 800; }

/* ファイルを選ぶ場所。押す所はこの箱ぜんぶ */
.wv-drop { position: relative; display: block; }
.wv-drop__box { display: grid; justify-items: center; gap: var(--wv-space-3); min-height: 180px; padding: var(--wv-space-6) var(--wv-space-4); text-align: center; background: var(--wv-panel); border: 2px dashed var(--wv-line-strong); border-radius: var(--wv-radius-l); cursor: pointer; }
.wv-drop__icon { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%; background: var(--wv-accent); border: 2px solid var(--wv-ink); }
.wv-drop__icon svg { width: 28px; height: 28px; fill: none; stroke: var(--wv-on-accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.wv-drop__title { font-size: 18px; line-height: 26px; font-weight: 800; }
.wv-drop input:focus-visible + .wv-drop__box { outline: 3px solid var(--wv-focus); outline-offset: 3px; }
.wv-drop--on .wv-drop__box, .wv-drop input:focus + .wv-drop__box { border-style: solid; border-color: var(--wv-ink); background: var(--wv-accent-soft); }

/* ファイルの行（縦に並べる。スマホで表は使わない） */
.wv-files { display: grid; gap: var(--wv-space-3); padding: 0; margin: 0; list-style: none; }
.wv-file { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--wv-space-3); align-items: center; padding: var(--wv-space-3) var(--wv-space-4); background: var(--wv-panel); border: 2px solid var(--wv-line-strong); border-radius: var(--wv-radius-m); }
.wv-file__ext { display: grid; place-items: center; width: 48px; height: 48px; border-radius: var(--wv-radius-s); background: var(--wv-panel-raised); font-size: 12px; line-height: 16px; font-weight: 800; }
.wv-file__body { min-width: 0; display: grid; gap: 2px; }
.wv-file__name { font-size: 16px; line-height: 24px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wv-file__meta { font-size: 14px; line-height: 22px; color: var(--wv-ink-muted); overflow-wrap: anywhere; }
.wv-file__meta b { color: var(--wv-ink); font-weight: 800; }
.wv-file__act { grid-column: 1 / -1; }
.wv-file--err { border-color: var(--wv-err); background: var(--wv-err-soft); }
.wv-file--err .wv-file__meta { color: var(--wv-ink); }

/* 知らせ（情報・成功・エラー）。言葉で種類を書き、記号を付ける */
.wv-notice { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--wv-space-3); padding: var(--wv-space-4); border: 2px solid var(--wv-info); border-radius: var(--wv-radius-m); background: var(--wv-info-soft); font-size: 15px; line-height: 24px; }
.wv-notice svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; color: var(--wv-info); margin-top: 0; }
.wv-notice__word { display: block; font-weight: 800; color: var(--wv-info); }
.wv-notice--ok { border-color: var(--wv-ok); background: var(--wv-ok-soft); }
.wv-notice--ok svg, .wv-notice--ok .wv-notice__word { color: var(--wv-ok); }
.wv-notice--err { border-color: var(--wv-err); background: var(--wv-err-soft); }
.wv-notice--err svg, .wv-notice--err .wv-notice__word { color: var(--wv-err); }

/* 箱（白いカード） */
.wv-box { background: var(--wv-panel); border: 2px solid var(--wv-ink); border-radius: var(--wv-radius-l); padding: var(--wv-space-5); display: grid; gap: var(--wv-space-4); min-width: 0; }
.wv-box--flat { border-color: var(--wv-line-strong); }
.wv-stack { display: grid; gap: var(--wv-space-5); }
.wv-stack--tight { gap: var(--wv-space-3); }

/* 結果の画面：カード（縦長）と、押す物・出口 */
.wv-result { display: grid; gap: var(--wv-space-6); }
.wv-result__side { display: grid; gap: var(--wv-space-5); align-content: start; min-width: 0; }
@media (min-width: 900px) { .wv-result { grid-template-columns: 360px minmax(0, 1fr); gap: var(--wv-space-8); align-items: start; } }
.wv-cardfit { container-type: inline-size; width: 100%; max-width: 360px; margin-inline: auto; aspect-ratio: 9 / 16; border-radius: var(--wv-radius-m); overflow: hidden; border: 2px solid var(--wv-ink); background: var(--wv-panel); }
@media (min-width: 900px) { .wv-cardfit { margin-inline: 0; } }
@media (prefers-reduced-motion: no-preference) {
  .wv-cardfit--reveal { animation: wv-rise .45s ease-out both; }  /* 動かすのはカードが出る瞬間だけ */
}
@keyframes wv-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* 出口（次の案内）：広告に見えないよう、ラベルを必ず付ける */
.wv-exit { display: grid; gap: var(--wv-space-3); padding: var(--wv-space-4) var(--wv-space-5); background: var(--wv-panel); border: 2px solid var(--wv-line-strong); border-radius: var(--wv-radius-m); }
.wv-exit__tag { font-size: 13px; line-height: 18px; font-weight: 800; color: var(--wv-accent-strong); }
.wv-exit__text { font-size: 16px; line-height: 26px; font-weight: 600; }

/* 足元 */
.wv-footer { border-top: 2px solid var(--wv-ink); background: var(--wv-panel); padding-block: var(--wv-space-6); }
.wv-footer__grid { display: grid; gap: var(--wv-space-3); }
.wv-footer__made { font-size: 14px; line-height: 22px; font-weight: 700; }
.wv-footer__note { font-size: 14px; line-height: 22px; color: var(--wv-ink-muted); }
.wv-footer__links { display: flex; flex-wrap: wrap; gap: 0 var(--wv-space-4); padding: 0; margin: 0; list-style: none; }
.wv-footer__links a { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; font-weight: 700; text-underline-offset: 4px; }
@media (min-width: 900px) { .wv-footer__grid { grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: var(--wv-space-6); } }

/* ───────── 5. 結果カード（縦長 9:16。画像として保存・共有する物） ─────────
   設計の大きさは 360×640 の「u」。全部の長さを --u（= 箱の幅の1/360）の倍数で書くので、
   どの幅に置いても、どの解像度で書き出しても同じ形になる（1080×1920なら 1u = 3px）。
   親に .wv-cardfit（container-type:inline-size）が必要。
   上から：色の面（道具名・見出し・結果の名前）→ 波の縁 → 白い面（説明・キャラの一言・出口）→ 最下段（注記・住所1行）。
   上の90uと下の110uは、ストーリーズの表示で隠れることがある。結果の名前とキャラの一言は隠れない所に置く。 */
.wv-card { --u: calc(100cqw / 360); position: relative; width: 100cqw; height: calc(var(--u) * 640); overflow: hidden; background: var(--wv-panel); color: var(--wv-ink); font-family: var(--wv-font); text-align: left; }
.wv-card *, .wv-card *::before, .wv-card *::after { box-sizing: border-box; }
.wv-card__top { position: absolute; left: 0; right: 0; top: 0; height: calc(var(--u) * 260); display: flex; flex-direction: column; justify-content: flex-end; padding: 0 calc(var(--u) * 24) calc(var(--u) * 40); background: var(--wv-accent); color: var(--wv-on-accent); }
.wv-card__label { position: absolute; left: calc(var(--u) * 24); right: calc(var(--u) * 24); top: calc(var(--u) * 28); display: flex; justify-content: space-between; align-items: baseline; gap: calc(var(--u) * 12); font-size: calc(var(--u) * 13); line-height: calc(var(--u) * 18); font-weight: 800; }
.wv-card__label span:last-child { flex: none; font-weight: 700; }
.wv-card__kicker { margin: 0 0 calc(var(--u) * 6); font-size: calc(var(--u) * 15); line-height: calc(var(--u) * 20); font-weight: 700; }
.wv-card__name { margin: 0; font-size: calc(var(--u) * 40); line-height: calc(var(--u) * 46); font-weight: 800; overflow-wrap: anywhere; }
.wv-card__name:lang(en) { font-size: calc(var(--u) * 36); line-height: calc(var(--u) * 42); }
.wv-card__wave { position: absolute; left: 0; right: 0; top: calc(var(--u) * 232); height: calc(var(--u) * 28); background: var(--wv-panel); -webkit-mask: var(--wv-wave) center / 100% 100% no-repeat; mask: var(--wv-wave) center / 100% 100% no-repeat; }
.wv-card__body { position: absolute; left: 0; right: 0; top: calc(var(--u) * 260); bottom: calc(var(--u) * 84); padding: calc(var(--u) * 4) calc(var(--u) * 24) 0; overflow: hidden; }
.wv-card__summary { margin: 0 0 calc(var(--u) * 16); font-size: calc(var(--u) * 15); line-height: calc(var(--u) * 23); font-weight: 500; overflow-wrap: anywhere; }
.wv-card__who { display: flex; align-items: center; gap: calc(var(--u) * 10); }
.wv-card__mark { flex: none; width: calc(var(--u) * 32); height: calc(var(--u) * 37); display: grid; place-items: center; background: var(--wv-ink); color: #FFFFFF; font-size: calc(var(--u) * 15); line-height: 1; font-weight: 800; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.wv-card__name-line { display: block; font-size: calc(var(--u) * 15); line-height: calc(var(--u) * 19); font-weight: 800; }
.wv-card__tag { display: block; font-size: calc(var(--u) * 12); line-height: calc(var(--u) * 16); font-weight: 500; color: var(--wv-ink-muted); }
.wv-card__quote { position: relative; margin: calc(var(--u) * 14) 0 0; padding: calc(var(--u) * 12) calc(var(--u) * 14); border-radius: calc(var(--u) * 14); background: var(--wv-accent-soft); font-size: calc(var(--u) * 15); line-height: calc(var(--u) * 23); font-weight: 700; overflow-wrap: anywhere; }
.wv-card__quote::before { content: ""; position: absolute; left: calc(var(--u) * 18); top: calc(var(--u) * -6); width: calc(var(--u) * 14); height: calc(var(--u) * 14); background: var(--wv-accent-soft); transform: rotate(45deg); border-radius: calc(var(--u) * 2); }
.wv-card__exit { margin: calc(var(--u) * 12) 0 0; padding-top: calc(var(--u) * 10); border-top: calc(var(--u) * 1) solid var(--wv-line); font-size: calc(var(--u) * 13); line-height: calc(var(--u) * 19); font-weight: 600; overflow-wrap: anywhere; }
.wv-card__foot { position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--u) * 84); padding: 0 calc(var(--u) * 24) calc(var(--u) * 16); display: flex; flex-direction: column; justify-content: flex-end; gap: calc(var(--u) * 6); }
.wv-card__note { margin: 0; font-size: calc(var(--u) * 12); line-height: calc(var(--u) * 16); color: var(--wv-ink-muted); }
.wv-card__addr { margin: 0; display: flex; align-items: center; gap: calc(var(--u) * 8); font-size: calc(var(--u) * 16); line-height: calc(var(--u) * 22); font-weight: 800; white-space: nowrap; overflow: hidden; }
.wv-card__addr svg { flex: none; width: calc(var(--u) * 18); height: calc(var(--u) * 18); fill: none; stroke: var(--wv-accent-strong); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* 動きを減らす設定のとき：全部止める */
@media (prefers-reduced-motion: reduce) {
  .wv *, .wv *::before, .wv *::after { animation: none !important; transition: none !important; }
}

/* 道具ごとの色。変えるのはこの4つの変数だけ（wave.css のあとに読む）。
   使い方：<html data-wave="halloween"> のように道具の名前を付ける。
   新しい道具を足すとき：下の「ひな形」を写し、4つの色を入れ、tools/check_contrast.mjs の表に1行足して合格を確かめる。
   決まり
   - accent        塗り。上の文字は on-accent だけ（ink-muted は置かない）。ink との明暗差 4.5:1 以上
   - on-accent     accent の上の文字。基本は #14171C
   - accent-strong 明るい面（ground・panel・accent-soft・panel-raised）の上の文字・線・ゲージ。4.5:1 以上
   - accent-soft   淡い下地。上の文字は ink。ink との明暗差 4.5:1 以上
   色相は道具ごとに離す（ハロウィン＝橙、画像の変換＝青緑）。紫〜青のグラデーションは使わない。 */

[data-wave="halloween"] {
  --wv-accent: #FF7A1A;
  --wv-on-accent: #14171C;
  --wv-accent-strong: #A63F00;
  --wv-accent-soft: #FFE8D6;
}

[data-wave="png2jpg"] {
  --wv-accent: #2EC4B6;
  --wv-on-accent: #14171C;
  --wv-accent-strong: #0B6159;
  --wv-accent-soft: #D9F4F1;
}

/* ひな形
[data-wave="（道具の名前）"] {
  --wv-accent: #______;
  --wv-on-accent: #14171C;
  --wv-accent-strong: #______;
  --wv-accent-soft: #______;
}
*/

/* extra.css : the few things this site needs on top of the shared look (vendor/wave-tools/wave.css + themes.css, by Polly).
   build.mjs joins  wave.css + themes.css + this file  into dist/assets/waves.css.  Prefix wv- like the shared look. */

/* a theme for the shelf (front page); the tools use png2jpg / halloween from themes.css */
[data-wave="shelf"] {
  --wv-accent: #F2C94C;
  --wv-on-accent: #14171C;
  --wv-accent-strong: #6B5000;
  --wv-accent-soft: #FBF0C8;
}

/* two languages in one page: both are in the HTML, <html lang> decides which one is shown */
html[lang="ja"] .l-en { display: none !important; }
html[lang="en"] .l-ja { display: none !important; }
.wv-file__name .l-ja, .wv-file__name .l-en { display: inline; }

/* the language switch is made of links (they work without scripts: ?lang=en) */
.wv-lang a { cursor: pointer; }

/* buttons that are real <button>s must look like the shared <a> buttons */
button.wv-btn { font-family: inherit; appearance: none; -webkit-appearance: none; }

/* page frame: the band wraps header + hero; the hero fragment decides what is inside */
.wv-band .wv-hero { padding-top: var(--wv-space-3); }
.wv-band--compact .wv-hero__lead { display: none; }
.wv-skip { display: inline-flex; align-items: center; min-height: 44px; position: absolute; left: var(--wv-space-4); top: -100px; z-index: 10; padding: var(--wv-space-2) var(--wv-space-4); background: var(--wv-ink); color: #fff; border-radius: var(--wv-radius-s); font-weight: 800; }
.wv-skip:focus { top: var(--wv-space-2); }

/* the shelf */
.wv-shelf { display: grid; gap: var(--wv-space-4); padding: 0; margin: 0; list-style: none; }
@media (min-width: 720px) { .wv-shelf { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.wv-tool { display: grid; gap: var(--wv-space-3); align-content: start; min-height: 148px; padding: var(--wv-space-5); background: var(--wv-panel); border: 2px solid var(--wv-ink); border-radius: var(--wv-radius-l); color: var(--wv-ink); text-decoration: none; }
a.wv-tool { box-shadow: var(--wv-press); }
a.wv-tool:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--wv-ink); }
.wv-tool--soon { border-color: var(--wv-line-strong); background: var(--wv-panel-raised); }
.wv-tool__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--wv-space-3); }
.wv-tool__title { font-size: 20px; line-height: 28px; font-weight: 800; }
.wv-tool__blurb { font-size: 15px; line-height: 24px; color: var(--wv-ink-muted); }
.wv-tool__go { display: inline-flex; align-items: center; gap: var(--wv-space-2); font-weight: 800; }
.wv-tool__go svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.wv-status { display: inline-flex; align-items: center; min-height: 28px; padding: 2px 12px; border-radius: 999px; border: 2px solid var(--wv-ink); background: var(--wv-accent); color: var(--wv-on-accent); font-size: 13px; line-height: 20px; font-weight: 800; white-space: nowrap; flex: none; }
.wv-status--soon { background: var(--wv-panel); color: var(--wv-ink); border-color: var(--wv-line-strong); }

/* /jpg/ */
.wv-file--work { border-color: var(--wv-ink); }
.wv-file__meta .wv-state { font-weight: 800; color: var(--wv-ink); }
.wv-file__meta--bad { color: var(--wv-ink); }
.wv-file__act:disabled { cursor: not-allowed; }
.wv-drop--drag .wv-drop__box { border-style: solid; border-color: var(--wv-ink); background: var(--wv-accent-soft); }
.wv-drop__hint { display: none; }
@media (hover: hover) and (pointer: fine) { .wv-drop__hint { display: block; } }
.wv-hint-line { font-size: 14px; line-height: 22px; color: var(--wv-ink-muted); }
.wv-heading-row { display: flex; align-items: center; flex-wrap: wrap; gap: var(--wv-space-1) var(--wv-space-3); }
.wv-heading-row .wv-heading { flex: none; }
.wv-heading-row__end { margin-left: auto; }
.wv-rights { margin-top: calc(var(--wv-space-2) * -1); }

/* a row of the file list: [picture or type] [name and state] [one small button]. The button is small so that the convert button stays in view */
.wv-file { grid-template-columns: 48px minmax(0, 1fr) auto; }
.wv-file__ext { overflow: hidden; }
.wv-file__ext img { display: block; width: 48px; height: 48px; object-fit: cover; border-radius: var(--wv-radius-s); }
.wv-file .wv-file__act { grid-column: auto; min-height: 44px; padding: 8px 14px; box-shadow: none; }
.wv-file .wv-file__act:active { transform: none; }
@media (max-width: 359px) { .wv-file .wv-file__act svg { display: none; } }

/* folded boxes (details): the "more options" of /jpg/ and the card text of /halloween/ */
.wv-fold { background: var(--wv-panel); border: 2px solid var(--wv-line-strong); border-radius: var(--wv-radius-m); }
.wv-fold > summary { display: flex; align-items: center; gap: var(--wv-space-3); min-height: 52px; padding: 8px var(--wv-space-4); cursor: pointer; list-style: none; font-size: 16px; line-height: 24px; font-weight: 700; }
.wv-fold > summary::-webkit-details-marker { display: none; }
.wv-fold > summary::after { content: ""; flex: none; width: 9px; height: 9px; margin-left: auto; margin-top: -5px; border-right: 3px solid var(--wv-ink); border-bottom: 3px solid var(--wv-ink); transform: rotate(45deg); }
.wv-fold[open] > summary::after { margin-top: 3px; transform: rotate(-135deg); }
.wv-fold__now { font-weight: 400; min-width: 0; overflow-wrap: anywhere; }
.wv-fold__body { display: grid; gap: var(--wv-space-5); padding: var(--wv-space-2) var(--wv-space-4) var(--wv-space-5); }

/* quiz */
.wv-result-img { display: block; width: 100%; max-width: 360px; height: auto; aspect-ratio: 9 / 16; border-radius: var(--wv-radius-m); border: 2px solid var(--wv-ink); background: var(--wv-panel); margin-inline: auto; }
@media (min-width: 900px) { .wv-result-img { margin-inline: 0; } }
.wv-safety { font-size: 15px; line-height: 24px; }
/* tapping an answer moves on by itself. "Next" stays for keyboards and screen readers: it is out of sight until it has focus, then it is the same full-width button in the same place on every question */
.wv-q__nav { display: grid; gap: var(--wv-space-2); justify-content: stretch; }
.wv-q__nav .wv-btn--quiet { justify-self: start; }
.wv-q__next:not(:focus) { position: absolute; width: 1px; height: 1px; min-height: 0; min-width: 0; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); border: 0; white-space: nowrap; }
.wv-q__next:focus { width: 100%; }
/* result: on a phone the buttons come first (they are never below the fold), then the card; on a computer the card is on the left */
.wv-result { grid-template-areas: "actions" "card" "text" "faq" "exit"; }
.wv-result > #r-actions { grid-area: actions; }
.wv-result > #card-wrap { grid-area: card; }
.wv-result > #r-text { grid-area: text; }
.wv-result > #r-faq { grid-area: faq; }
.wv-result > #r-exit { grid-area: exit; }
.wv-result > * { min-width: 0; }
#r-actions { display: grid; gap: var(--wv-space-3); align-content: start; }
#r-actions .wv-btn--start { margin-top: calc(var(--wv-space-1) * -1); }
@media (min-width: 900px) {
  .wv-result { grid-template-areas: "card actions" "card text" "card faq" "card exit" "card ."; grid-template-rows: auto auto auto auto 1fr; row-gap: var(--wv-space-5); }
}
.wv-fold .wv-stack { padding: var(--wv-space-2) var(--wv-space-4) var(--wv-space-5); }

/* text pages (terms, privacy, operator) */
.wv-prose { display: grid; gap: var(--wv-space-4); }
.wv-prose h1 { font-size: 28px; line-height: 38px; font-weight: 800; }
.wv-prose h2 { font-size: 20px; line-height: 28px; font-weight: 800; margin-top: var(--wv-space-4); }
.wv-prose h3 { font-size: 17px; line-height: 26px; font-weight: 800; }
.wv-prose ul, .wv-prose ol { margin: 0; padding-left: 1.4em; display: grid; gap: var(--wv-space-2); }
.wv-prose li { padding-left: 4px; }
.wv-prose code { font-size: 0.92em; background: var(--wv-panel-raised); padding: 1px 6px; border-radius: 6px; overflow-wrap: anywhere; }
.wv-prose a { text-underline-offset: 3px; overflow-wrap: anywhere; }
.wv-tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 2px solid var(--wv-line-strong); border-radius: var(--wv-radius-m); background: var(--wv-panel); }
.wv-table { border-collapse: collapse; width: 100%; font-size: 14px; line-height: 22px; }
.wv-table th, .wv-table td { text-align: left; vertical-align: top; padding: 8px 12px; border-bottom: 1px solid var(--wv-line); }
.wv-table th { background: var(--wv-panel-raised); font-weight: 800; }
.wv-table tr:last-child td { border-bottom: 0; }
/* narrow screens: every row is its own box; the first cell is the box title and each other cell shows its column name (no sideways scrolling, nothing cut off) */
@media (max-width: 599px) {
  .wv-tablewrap { overflow: visible; border: 0; background: transparent; }
  .wv-table, .wv-table tbody, .wv-table tr, .wv-table td { display: block; width: 100%; }
  .wv-table thead { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); }
  .wv-table tr { background: var(--wv-panel); border: 2px solid var(--wv-line-strong); border-radius: var(--wv-radius-m); padding: var(--wv-space-3) var(--wv-space-4); display: grid; gap: var(--wv-space-2); margin-bottom: var(--wv-space-3); }
  .wv-table td { padding: 0; border: 0; overflow-wrap: anywhere; }
  .wv-table td:first-child { font-size: 16px; line-height: 24px; font-weight: 800; }
  .wv-table td:not(:first-child)::before { content: attr(data-label); display: block; font-size: 12px; line-height: 18px; font-weight: 800; color: var(--wv-ink-muted); }
}
.wv-btn--center { justify-self: center; }

/* the shared look sets display on many parts; the hidden attribute must still win */
.wv [hidden] { display: none !important; }
.wv-btn--start { justify-self: start; }
.wv-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.wv-fieldset .wv-q__title { padding: 0; margin-bottom: var(--wv-space-5); }
#card-wrap { min-width: 0; }
/* "Terms" is 43px wide in English: footer links get a 44px minimum width (reported to Polly for the shared look) */
.wv-footer__links a { min-width: 44px; justify-content: center; }

/* ---------- round 3 (2026-10-16) ---------- */

/* /jpg/ : the convert button stays at the bottom of the screen ONLY while its place in the page is below the bottom edge (position: sticky; when the page reaches its own place it
   simply sits there). For this the chosen-files area is a flex column (a sticky box inside a grid is held in its own grid cell and would never move). */
#chosen { display: flex; flex-direction: column; gap: var(--wv-space-5); }
#chosen > * { min-width: 0; }
#go-actions { display: contents; }
#go-actions > .wv-btn--center { align-self: center; }
.wv-pin { position: sticky; bottom: 0; z-index: 5; margin-block: -8px; padding: 8px 0 calc(8px + env(safe-area-inset-bottom, 0px)); background: var(--wv-ground); }

/* a long file name is kept at both ends (the page shortens the middle), and may use two lines */
.wv-file__name { white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }

/* a notice with a folded "what to do" part */
.wv-notice__body { display: grid; gap: var(--wv-space-2); min-width: 0; }
.wv-notice__more > summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; list-style: none; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.wv-notice__more > summary::-webkit-details-marker { display: none; }
.wv-notice__more[open] > summary { margin-bottom: var(--wv-space-1); }
.wv-notice__more > p + p { margin-top: var(--wv-space-2); }

/* "Frequently asked" : three folded questions above the exit of every tool */
.wv-faq { margin-top: var(--wv-space-2); }
.wv-fold__text { display: grid; gap: var(--wv-space-3); padding: var(--wv-space-1) var(--wv-space-4) var(--wv-space-5); font-size: 15px; line-height: 24px; }
.wv-fold__text a { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; text-underline-offset: 3px; font-weight: 700; }
.wv-fold > summary { text-wrap: pretty; overflow-wrap: anywhere; }

/* a computer: the column of the page is in the middle (the logo stays at the left edge) */
@media (min-width: 900px) {
  .wv-hero.wv-narrow, .wv-main .wv-narrow { margin-inline: auto; }
  .wv-hero.wv-hero--wide, body[data-layout="wide"] .wv-hero.wv-narrow { margin-inline: 0; }
}

/* the status label on a shelf card is a label, not a button: a thin frame */
.wv-status { border-width: 1px; border-color: var(--wv-line-strong); }

/* "back to the tools" on the text pages */
.wv-back { justify-self: start; margin-left: calc(var(--wv-space-3) * -1); }

/* the headings that the page moves focus to (not controls): no frame unless the person is on the keyboard (set in common.ts). Focus itself still moves, for screen readers. */
html:not([data-kbd]) :is(#h1-result, #q-title, #chosen-h, #main):focus { outline: none; }
