/* コスめぐり — ネオン／ポップ
 *
 * 白場にネオンと黒を置く。ネオンは全彩度で使い、薄めない。
 * 薄めた瞬間にパステルになって、この製品の熱量から遠ざかる。
 *
 * 規律:
 *   - 色は全彩度か、白か黒。中間のトーンは作らない
 *   - 面には必ず2pxの黒い輪郭と、ずらした黒/ネオンの影を付ける（版ズレの気配）
 *   - 見出しは極太・詰め、本文は普通。落差でリズムを作る
 *   - 節ごとに1色。body.p-* が --hue / --on を配る
 *   - 色に載る文字は必ず --on で受ける（AAを割らない）
 */

/* ---------------------------------------------------------------- 1. トークン */

:root {
  --ink: #0b0b10;
  --ink-2: #55555f;
  --paper: #ffffff;
  --wash: #f2f2f4;
  --line: #0b0b10;

  /* 節の色。くすんだ色は入れない（オレンジと深緑を外したのはそのため） */
  --c1: #ff0060; --c1-on: #ffffff;   /* メイク — マゼンタ */
  --c2: #00e5ff; --c2-on: #0b0b10;   /* プラン — シアン */
  --c3: #7b2bff; --c3-on: #ffffff;   /* できあがり — バイオレット */
  --c4: #d9ff00; --c4-on: #0b0b10;   /* アシッドイエロー（注意の印・3番目の手順） */
  --c5: #00ff87; --c5-on: #0b0b10;   /* ネオンミント（完了・OK の状態色） */

  --accent: #d9ff00;

  /* 波線。page-title の下線をマスクで抜く */
  --squiggle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 12' preserveAspectRatio='none'%3E%3Cpath d='M2 8 C 18 1, 26 11, 42 6 S 70 1, 86 7 S 110 10, 118 4' fill='none' stroke='%23000' stroke-width='6' stroke-linecap='round'/%3E%3C/svg%3E");

  --ok: #00a35a;
  --warn: #ff0060;
  --danger: #ff0060;
  --est: #7b2bff;

  --header-bg: #0b0b10;
  --header-fg: #ffffff;
  --header-h: 62px;
  --rail-w: 96px;
  --chat-w: 320px;

  --r-pill: 999px;
  --r-card: 24px;
  --r-chip: 13px;
  --edge: 2px solid var(--ink);
  --pop: 6px 6px 0 var(--ink);

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

  /* ダークモードは持たない。ただし color-scheme は残す。
     消すと、OSがダークの端末で input と audio だけ黒く描かれる */
  color-scheme: light;
}

.p-home    { --hue: var(--c1); --on: var(--c1-on); }
.p-login   { --hue: var(--c1); --on: var(--c1-on); }
.p-ask     { --hue: var(--c5); --on: var(--c5-on); }
.p-plan    { --hue: var(--c2); --on: var(--c2-on); }
.p-me      { --hue: var(--c3); --on: var(--c3-on); }

/* ---------------------------------------------------------------- 2. 地 */

* { box-sizing: border-box; }

/* 傾けたリボンは画面の外まで伸ばす。横スクロールは出さない。
   clip はスクロール領域を作らないので、body だけに hidden を置くより確実 */
html { overflow-x: clip; }

body {
  margin: 0;
  overflow-x: clip;
  font-family: var(--font-ui);
  background: var(--wash);
  color: var(--ink);
  line-height: 1.8;
  min-height: 100vh;
  -webkit-text-size-adjust: 100%;
}

.hidden { display: none !important; }
/* 英語の人に日本語の原文を一瞬見せない（各ページの <head> が付け、core/i18n.js が外す） */
.i18n-pending body { visibility: hidden; }
/* hidden 属性も必ず効かせる（display を持つ部品が上書きして、隠したはずの案内が出ていた） */
[hidden] { display: none !important; }

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

/* ---------------------------------------------------------------- 3. シェル */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  height: var(--header-h);
  padding: 0 18px;
  background: var(--header-bg);
  color: var(--header-fg);
  position: sticky;
  top: 0;
  z-index: 30;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: inherit;
  text-decoration: none;
}
.brand-name {
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.mark { color: var(--accent); font-size: 1.2rem; }

.top-right { display: flex; align-items: center; gap: 8px; }

.lang-switch { display: flex; }
.lang {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.45);
  color: rgba(255, 255, 255, 0.85);
  padding: 3px 11px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
}
.lang:last-child { border-left: 0; }
.lang.active { background: var(--accent); border-color: var(--accent); color: var(--ink); }


.top-right button.ghost {
  border: 2px solid rgba(255, 255, 255, 0.45);
  color: rgba(255, 255, 255, 0.9);
  background: transparent;
}
.top-right button.ghost:hover { background: var(--header-fg); color: var(--header-bg); border-color: var(--header-fg); }

/* 看板の右端。ゲストにはログインと新規登録を出す（お気に入りへのいちばん静かな案内） */
.top-account { display: flex; align-items: center; gap: 6px; }
.top-signup {
  padding: 4px 12px;
  font-size: 0.74rem;
  background: var(--accent);
  border-color: var(--accent);
  color: var(--ink);
  box-shadow: none;
}
.top-signup:hover { box-shadow: none; }

/* ---- 左端のシェブロン ---- */

.rail {
  position: fixed;
  left: 0;
  top: var(--header-h);
  bottom: 0;
  width: var(--rail-w);
  display: flex;
  flex-direction: column;
  align-content: start;
  padding-top: 20px;
  z-index: 20;
  /* clip-path は border を切る。地を黒にして、重なりを2pxずらすことで
     節と節のあいだに黒い線を通す */
  background: var(--ink);
  overflow: hidden;
}

.rail-step {
  flex: 0 0 auto;
  height: 80px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 1px;
  text-decoration: none;
  font-size: 0.83rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  /* 点いていない節は白と黒だけ。薄い色は作らない */
  background: var(--paper);
  color: var(--ink);
  /* 長方形＋三角の五角形。下の節のくぼみが、上の節の先端を受ける */
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 18px), 50% 100%, 0 calc(100% - 18px));
  margin-bottom: -16px;
  padding-bottom: 18px;
}
.rail-step:last-child { margin-bottom: 0; }
.rail-step .n {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  opacity: 0.5;
}

/* 材料がそろった節。番号のかわりに ✓ が入る */
.rail-step[data-done] .n { opacity: 1; color: var(--ok); font-size: 0.86rem; }
.rail-step[data-done][aria-current] .n { color: inherit; }

.rail-step[data-step="ask"]     { --sc: var(--c5); --sc-on: var(--c5-on); }
.rail-step[data-step="plan"]    { --sc: var(--c2); --sc-on: var(--c2-on); }

.rail-step:hover { background: var(--ink); color: var(--paper); }
.rail-step:hover .n { opacity: 0.7; }
.rail-step[aria-current] { background: var(--sc); color: var(--sc-on); }
.rail-step[aria-current] .n { opacity: 1; }

/* clip-path は outline も外側の影も切る。フォーカスは内側の影で見せる */
.rail-step:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 4px var(--accent), inset 0 0 0 7px var(--ink);
}

/* ---- 版面 ---- */

main {
  max-width: 920px;
  margin: 0 auto;
  padding: 30px 22px 80px;
  display: grid;
  gap: 22px;
  align-content: start;
}

body:has(.rail) main { margin-left: var(--rail-w); }

.page-title {
  font-size: clamp(2.1rem, 5vw, 2.9rem);
  font-weight: 900;
  letter-spacing: -0.045em;
  margin: 2px 0 0;
  line-height: 1.15;
}
/* 直線の帯をやめて、トップと同じ波線にする（色はマスク越しに --hue が出る） */
.page-title::after {
  content: "";
  display: block;
  width: 132px;
  height: 15px;
  margin-top: 10px;
  background: var(--hue);
  -webkit-mask: var(--squiggle) no-repeat center / 100% 100%;
  mask: var(--squiggle) no-repeat center / 100% 100%;
}
.page-lead {
  color: var(--ink);
  margin: 0 0 4px;
  font-size: 0.95rem;
  max-width: 44em;
}

.section-title {
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  margin: 20px 0 4px;
}

/* ---------------------------------------------------------------- 4. 部品 */

.card {
  background: var(--paper);
  border: var(--edge);
  border-radius: var(--r-card);
  box-shadow: 7px 7px 0 var(--hue);
  padding: 26px 26px 28px;
  position: relative;
}
/* 面の左肩にネオンの帯。版ズレのように少しはみ出させる */
.card::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 24px;
  width: 16px;
  height: 54px;
  border-radius: var(--r-pill);
  background: var(--hue);
  border: var(--edge);
}

/* 見出しの後ろにインクの染み。カードごとに置き場所を変える */
.card::after {
  content: "";
  position: absolute;
  background: var(--hue);
  opacity: 0.13;
  pointer-events: none;
  z-index: 0;
}
.card:nth-of-type(1)::after {
  right: 36px; top: 32px; width: 108px; height: 84px;
  border-radius: 58% 42% 36% 64% / 44% 60% 40% 56%;
  transform: rotate(-12deg);
}
.card:nth-of-type(2)::after {
  left: 48px; bottom: 30px; width: 132px; height: 52px;
  border-radius: 44% 56% 52% 48% / 62% 38% 62% 38%;
  transform: rotate(7deg);
}
.card:nth-of-type(3)::after {
  right: 48px; bottom: 34px; width: 72px; height: 86px;
  border-radius: 40% 60% 62% 38% / 34% 62% 38% 66%;
  transform: rotate(19deg);
}
.card:nth-of-type(n + 4)::after { display: none; }
.card > * { position: relative; z-index: 1; }

.card h2 {
  margin: 0 0 8px;
  font-size: 1.32rem;
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.4;
}

.note { color: var(--ink-2); font-size: 0.88rem; margin: 2px 0 18px; max-width: 46em; }
.note strong { color: var(--ink); font-weight: 900; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: var(--ink);
}

input, select {
  background: var(--paper);
  border: var(--edge);
  color: var(--ink);
  border-radius: var(--r-pill);
  padding: 11px 14px;
  font: inherit;
  font-size: 0.92rem;
  width: 100%;
}
input::placeholder { color: var(--ink-2); }
input:focus, select:focus { box-shadow: 4px 4px 0 var(--hue); }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; align-items: center; }
/* チェックボックスは label の grid レイアウトに乗せない */
label.check {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 14px;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0;
}
label.check input { width: 20px; height: 20px; flex: none; accent-color: var(--hue); }


button, .btn {
  display: inline-block;
  background: var(--paper);
  color: var(--ink);
  border: var(--edge);
  border-radius: var(--r-pill);
  padding: 10px 20px;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: 4px 4px 0 var(--ink);
  cursor: pointer;
}
/* 押すと版が沈む */
button:hover:not(:disabled), .btn:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
button:active:not(:disabled), .btn:active { transform: translate(4px, 4px); box-shadow: none; }
button:disabled { opacity: 0.32; box-shadow: none; cursor: not-allowed; }

button.primary, .btn.primary { background: var(--hue); color: var(--on); }

button.ghost {
  border: var(--edge);
  background: transparent;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.78rem;
  padding: 6px 13px;
  box-shadow: none;
}
button.ghost:hover { transform: none; box-shadow: none; background: var(--ink); color: var(--paper); }

/* 下線は文字に重ねない。太い線を字面の下に引く */
.inline-link {
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
  border-bottom: 5px solid var(--hue);
  padding: 0 2px 1px;
}
.inline-link:hover { background: var(--ink); color: var(--paper); }

.tabs { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0 22px; }
.tab {
  border: var(--edge);
  background: var(--paper);
  color: var(--ink);
  padding: 7px 17px;
  font-size: 0.85rem;
  border-radius: var(--r-pill);
  box-shadow: 3px 3px 0 var(--ink);
}
.tab.active { background: var(--hue); color: var(--on); transform: translate(3px, 3px); box-shadow: none; }
.tab.active:hover { transform: translate(3px, 3px); box-shadow: none; }

/* タブの中身。箱を密着させると 2px の枠が重なって 4px の線に見える */
.pane { display: grid; gap: 10px; }

/* 節の頭に置く要約。文章ではなく数字を立てる。.msg とは別の重さにする */
.summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 22px;
  padding: 16px 20px;
  border: var(--edge);
  border-radius: var(--r-card);
  background: var(--wash);
}
.summary .fig { display: grid; gap: 2px; }
/* ☆ は数字の並びの右端に寄せる。折り返したときは行頭に落ちる */
.summary-tail { margin-left: auto; align-self: center; }
.summary .fig b {
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}
.summary .fig b small { font-size: 0.62em; font-weight: 900; margin-left: 1px; }
.summary .fig span { font-size: 0.72rem; font-weight: 900; color: var(--ink-2); letter-spacing: 0.04em; }

/* 脇の文。畳まない（開かないと読めない方針文にはしない）。小さくして末尾に置く */
.fineprint { font-size: 0.78rem; line-height: 1.85; color: var(--ink-2); padding: 0 4px; }
.fineprint b {
  display: block;
  color: var(--ink);
  font-weight: 900;
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  margin-bottom: 3px;
}
.fineprint p { margin: 0; }

.out { margin-top: 16px; font-size: 0.88rem; display: grid; gap: 10px; }

/* まだ材料が揃っていない画面 */
.empty {
  border: 3px dashed var(--ink);
  border-radius: var(--r-card);
  padding: 30px 24px;
  text-align: center;
  display: grid;
  gap: 14px;
  justify-items: center;
}
.empty-text { margin: 0; font-size: 0.95rem; font-weight: 700; max-width: 32em; }

.empty-note { margin: 0; font-size: 0.78rem; color: var(--ink-2); }

.step {
  border: var(--edge);
  background: var(--paper);
  padding: 14px 16px;
}
.step h4 {
  margin: 0 0 6px;
  font-size: 0.98rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 11px;
}
.step h4 .idx {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 50%;
  border: var(--edge);
  background: var(--hue);
  color: var(--on);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
}
.step h4 .min {
  margin-left: auto;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.78rem;
  white-space: nowrap;
  background: var(--wash);
  border: var(--edge);
  border-radius: var(--r-pill);
  padding: 0 9px;
}
.step p { margin: 0; font-size: 0.88rem; }
.step .raw { font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink-2); }

.why { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.why span {
  font-size: 0.72rem;
  line-height: 1.7;
  color: var(--ink);
  border: var(--edge);
  border-radius: var(--r-pill);
  padding: 0 10px;
}

.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; font-size: 0.9rem; }
.kv dt { color: var(--ink); font-size: 0.75rem; font-weight: 900; letter-spacing: 0.03em; }
.kv dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 700; }

.pill {
  display: inline-block;
  font-size: 0.71rem;
  font-weight: 900;
  padding: 1px 10px;
  border: var(--edge);
  background: var(--est);
  color: #fff;
}
.pill.ok { background: var(--c5); color: var(--ink); }
.pill.warn { background: var(--c4); color: var(--ink); }
.pill.danger { background: var(--c1); color: #fff; }

.chip {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 900;
  padding: 5px 15px;
  background: var(--paper);
  border: var(--edge);
  box-shadow: 3px 3px 0 var(--ink);
}

.msg {
  padding: 13px 16px;
  border: var(--edge);
  border-left-width: 10px;
  border-radius: 8px var(--r-chip) var(--r-chip) 8px;
  background: var(--paper);
  font-size: 0.88rem;
}
.msg.alert { border-left-color: var(--c4); }
.msg.ok { border-left-color: var(--c5); }
.msg.error { border-left-color: var(--c1); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.fit {
  border: var(--edge);
  border-radius: var(--r-chip);
  box-shadow: 4px 4px 0 var(--hue);
  padding: 14px;
  background: var(--paper);
}
.fit b { font-size: 0.95rem; font-weight: 900; }
.fit small { color: var(--ink-2); }


/* ---- お気に入り ---- */

.fav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 15px;
  font-size: 0.8rem;
  box-shadow: 3px 3px 0 var(--ink);
}
.fav span { font-size: 1.05rem; line-height: 1; }
.fav[aria-pressed="true"] { background: var(--c4); color: var(--c4-on); }

.tab .count {
  display: inline-block;
  min-width: 1.6em;
  margin-left: 8px;
  padding: 0 6px;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-align: center;
}

.fav-list { gap: 16px; }
/* マイページから相談・プランへ。帯を出さない代わりの行き先 */
.page-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: -6px; }
.fav-item {
  display: grid;
  gap: 12px;
  padding: 18px 20px;
  border: var(--edge);
  border-radius: var(--r-card);
  background: var(--paper);
}
.fav-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 14px; }
.fav-head h3 { margin: 0; font-size: 1rem; font-weight: 900; letter-spacing: -0.02em; }
.fav-date { font-size: 0.74rem; color: var(--ink-2); font-family: var(--font-mono); }
.fav-item details summary { cursor: pointer; font-size: 0.84rem; font-weight: 900; }
.fav-item details[open] summary { margin-bottom: 10px; }
.fav-item .actions { margin-top: 0; justify-content: flex-end; }
button.danger { background: var(--c1); color: #fff; border-color: var(--ink); }

/* ヘッダーのマイページ。ログアウトと並ぶので、ボタンではなく文字のリンクにして重さを分ける */
.top-link { color: var(--header-fg); font-size: 0.8rem; font-weight: 900; text-decoration: none; padding: 4px 6px; white-space: nowrap; }
.top-link:hover, .top-link[aria-current] { text-decoration: underline; text-underline-offset: 4px; }

/* ---- フォームの誤り ----
   出す場所は2つだけ（dom.js）。欄の誤りは欄の真下、それ以外はフォームの頭。
   どちらも同じ赤で、枠の色だけで伝えずに文を添える */

.form-alert { margin: 4px 0 18px; }
.form-alert .msg { font-weight: 700; }
.form-alert .msg.error { background: color-mix(in srgb, var(--c1) 7%, var(--paper)); }
.form-alert .msg.ok { background: color-mix(in srgb, var(--c5) 14%, var(--paper)); }
.form-alert .msg.alert { background: color-mix(in srgb, var(--c4) 22%, var(--paper)); }
.form-alert a { color: var(--ink); font-weight: 900; margin-left: 6px; }

input[aria-invalid="true"],
select[aria-invalid="true"] {
  border-color: var(--c1);
  box-shadow: 3px 3px 0 var(--c1);
  background: color-mix(in srgb, var(--c1) 5%, var(--paper));
}
.field-error {
  margin: 0;
  color: #d4004f; /* --c1 だと細字の読みやすさが足りないので、少し沈めた赤 */
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.5;
}
.field-error::before { content: "！"; margin-right: 4px; }

/* ページの末尾に置く行き先の案内 */
.page-note { margin: 0; font-size: 0.88rem; color: var(--ink-2); }

/* 開始と終了は1マスに並べる（狭い画面でも隣り合わせのまま） */
.time-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 700px) { .grid .time-pair { grid-column: span 2; } }

/* ゲストへの案内。ログインすると何ができるかを1行で言い、入口を2つ添える */
.guest-promo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  padding: 14px 18px;
  border: var(--edge);
  border-radius: var(--r-card);
  background: color-mix(in srgb, var(--c4) 20%, var(--paper));
}
.guest-promo p { margin: 0; flex: 1 1 260px; font-size: 0.88rem; font-weight: 700; line-height: 1.6; }
.guest-promo .promo-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.guest-promo .btn { padding: 7px 16px; font-size: 0.8rem; box-shadow: 3px 3px 0 var(--ink); }
.page-note a { color: var(--ink); font-weight: 900; }

/* ---------------------------------------------------------------- 5. ページ別 */

/* トップ（このブロックだけ .p-home 専用。他のページには効かせない） */

.p-home main { position: relative; z-index: 1; padding-bottom: 18px; }
.p-home main.lower { padding-top: 8px; }

/* 飾りは必ず本文の外に置く。重ねると読みにくくなるので、
   広い画面では右の列、狭い画面では見出しの上の帯にする */
.hero {
  display: grid;
  /* 文字はひとかたまり、飾りは右の列。文字を1要素ずつ行に置くと、
     行ごとに縦中央寄せされて間が大きく空く */
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: center;
  gap: 26px;
  padding: 32px 0 8px;
}
.hero-text { grid-column: 1; }

/* ---- 飾りの層。インクの飛沫と粒 ---- */

.deco {
  grid-column: 2;
  grid-row: 1;
  position: relative;
  align-self: stretch;
  min-height: 300px;
  pointer-events: none;
}
.deco > * {
  position: absolute;
  will-change: transform;
}

.splat { width: 290px; height: 290px; }
.splat-acid { right: -54px; top: -30px; fill: var(--accent); }
.splat-magenta { right: 92px; top: 132px; width: 200px; height: 200px; fill: var(--c1); }

.ring-cyan {
  right: -18px;
  top: 214px;
  width: 118px;
  height: 118px;
  border: 12px solid var(--c2);
  border-radius: 50%;
}
.dot-violet {
  left: 28px;
  top: 22px;
  width: 26px;
  height: 26px;
  background: var(--c3);
  border-radius: 50%;
}
.drop { fill: var(--c2); }
.drop-a { width: 32px; height: 44px; right: 60px; top: 330px; transform: rotate(18deg); }
.drop-b { width: 22px; height: 30px; left: 8px; top: 258px; fill: var(--c1); transform: rotate(-24deg); }
.arc {
  left: -6px;
  top: 96px;
  width: 168px;
  height: 88px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 9;
  stroke-linecap: round;
}

/* ---- ヒーローの文字 ---- */

.eyebrow {
  display: inline-block;
  margin: 0 0 16px;
  padding: 4px 16px;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transform: rotate(-2deg);
}
.hero-title {
  margin: 0 0 20px;
  font-size: clamp(2rem, 5.4vw, 3.4rem);
  font-weight: 900;
  letter-spacing: -0.055em;
  line-height: 1.14;
}
/* 手で塗ったインクのように、角を丸めて少し傾ける */
.hero-title em {
  font-style: normal;
  background: var(--accent);
  border: var(--edge);
  border-radius: 42% 58% 46% 54% / 58% 44% 56% 42%;
  padding: 2px 16px;
  display: inline-block;
  transform: rotate(-2deg);
}
.hero-lead { margin: 0 0 22px; font-size: 1rem; max-width: 34em; }
/* 改行は PC の2行組みのためのもの。狭い画面で残すと「入れ／るだけで」のように途中で折れる */
@media (max-width: 560px) { .hero-lead br { display: none; } }
/* 対応ブラウザでは文節の切れ目で折る（「入れ／るだけで」を避ける） */
.hero-lead, .hero-title, .howto-list li, .feature p { word-break: auto-phrase; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 10px; }
/* 入口はボタン1つ。開発用ログインはコス名だけで成立するのでフォームは置かない */
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 22px; }
.hero-cta button {
  font-size: 1rem;
  padding: 13px 34px;
  box-shadow: 5px 5px 0 var(--ink);
}

.p-home .chip { border-radius: var(--r-pill); }
.p-home .chip:nth-child(1) { transform: rotate(-1.6deg); }
.p-home .chip:nth-child(2) { transform: rotate(1.2deg); }
.p-home .chip:nth-child(3) { transform: rotate(-0.8deg); }

/* トップのカードは角を丸めて、ステッカーらしく傾ける */

/* ---- 波と垂れ ---- */

.wave, .drip { display: block; line-height: 0; }
.wave svg, .drip svg { display: block; width: 100%; }
.wave svg { height: 74px; }
.wave-in { margin-top: 6px; }
.wave-in svg { fill: var(--ink); }
.drip svg { height: 58px; }
.drip svg * { fill: var(--ink); }

/* ---- できること（黒地の帯） ---- */

.band { background: var(--ink); color: var(--paper); }
.band-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 6px 22px 30px;
}
.section-title.on-dark { color: var(--paper); }
/* カードの番号バッジは上に20px はみ出す。下線（-12px）と重ならないよう空ける */
.band .section-title { margin-bottom: 62px; }


.section-title {
  position: relative;
  display: inline-block;
  font-size: 1.7rem;
  font-weight: 900;
  letter-spacing: -0.045em;
  margin: 18px 0 12px;
}
.squiggle {
  position: absolute;
  left: 0;
  right: -6px;
  bottom: -12px;
  height: 14px;
}
/* display: block を外すと、インラインのベースラインぶん下にずれる */
.squiggle svg { display: block; width: 100%; height: 100%; fill: none; stroke: var(--c1); stroke-width: 6; stroke-linecap: round; }
.on-dark + * .squiggle svg, .on-dark .squiggle svg { stroke: var(--accent); }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(272px, 1fr));
  gap: 26px 22px;
}
.feature {
  position: relative;
  background: var(--paper);
  color: var(--ink);
  border: var(--edge);
  border-radius: 30px;
  padding: 34px 24px 24px;
}
/* 見出しの後ろにインクの染み */
/* インクの染み。位置・数・大きさをカードごとに散らす。
   どれも右上に丸を置くと、結局5枚とも同じに見える。
   複数の粒は box-shadow で写す（overflow: hidden にすると番号バッジが切れる）。 */
.feature::before,
.feature::after {
  content: "";
  position: absolute;
  opacity: 0.16;
  pointer-events: none;
}

/* 1枚目: 下の縁を横切る太い帯 + 左上の小粒 */
.f-makeup::before {
  left: -10px; bottom: 26px; width: 190px; height: 46px;
  border-radius: 52% 48% 38% 62% / 60% 40% 60% 40%;
  transform: rotate(-7deg);
}
.f-makeup::after {
  left: 128px; top: 26px; width: 26px; height: 22px;
  border-radius: 50%;
  box-shadow: 26px 22px 0 -3px currentColor, 8px 46px 0 -7px currentColor;
  opacity: 0.14;
}

/* 2枚目: 右下に大きく1つだけ */
.f-route::before {
  right: -18px; bottom: -12px; width: 168px; height: 132px;
  border-radius: 42% 58% 30% 70% / 56% 44% 56% 44%;
  transform: rotate(13deg);
}
.f-route::after { display: none; }


/* 3枚目: 何も敷かない。1枚くらい素のままがあっていい */
.f-privacy::before,
.f-privacy::after { display: none; }

.feature:nth-child(odd) { transform: rotate(-1deg); }
.feature:nth-child(even) { transform: rotate(1.1deg); }
.feature h3 {
  position: relative;
  margin: 0 0 12px;
  font-size: 1.16rem;
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.45;
}
.feature p { position: relative; margin: 0 0 12px; font-size: 0.88rem; }
.feature-more { color: var(--ink-2); }

.ghost-no {
  position: absolute;
  right: 14px;
  bottom: 2px;
  font-family: var(--font-mono);
  font-size: 3.6rem;
  font-weight: 700;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 2px var(--ink);
  opacity: 0.14;
}

.feature-step {
  position: absolute;
  top: -20px;
  left: 20px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  border: var(--edge);
  z-index: 1;
}
.f-makeup   .feature-step { background: var(--c1); color: var(--c1-on); }
.f-route    .feature-step { background: var(--c2); color: var(--c2-on); }
.f-privacy  .feature-step { background: var(--c3); color: var(--c3-on); }
.f-makeup   { box-shadow: 9px 9px 0 var(--c1); }
.f-route    { box-shadow: 9px 9px 0 var(--c2); }
.f-privacy  { box-shadow: 9px 9px 0 var(--c3); }

.f-makeup::before, .f-makeup::after { background: currentColor; color: var(--c1); }
.f-route::before                    { background: currentColor; color: var(--c2); }

/* ---- 対応イベントのリボン ---- */

/* 帯は画面の外まで伸ばして傾け、文字は内側に収める。
   流すと端で文字が切れるので、動かさない */
.ribbon {
  background: var(--accent);
  border-top: var(--edge);
  border-bottom: var(--edge);
  margin: 30px -3vw 26px;
  padding: 11px 3vw;
  transform: rotate(-1.4deg);
}
.ribbon-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0 4px;
  margin: 0;
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}
.ribbon-inner i { font-style: normal; color: var(--c1); padding: 0 14px; }

/* ---- 使い方・預からないもの ---- */

/* ---- 画面の写し（トップ） ----
   実物と同じ画像。文字は小さくて読めないので、何の画面かは見出しと1行の説明で伝える */

.guide {
  display: grid;
  grid-template-columns: 172px minmax(0, 1fr);
  gap: 18px;
  margin: 4px 0 8px;
}

/* 一覧。8枚を全部並べると縦に伸びるので、高さを切ってスクロールさせる */
.thumbs {
  list-style: none;
  margin: 0;
  padding: 0 4px 0 0;
  display: grid;
  gap: 8px;
  align-content: start;
  max-height: 520px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.thumb {
  width: 100%;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 2px 6px;
  padding: 6px;
  text-align: left;
  border-radius: 10px;
  box-shadow: none;
  background: var(--paper);
}
.thumb:hover { transform: none; box-shadow: none; }
.thumb[aria-current="true"] { background: var(--hue); color: var(--on); }
.thumb .no { grid-row: 1 / span 2; align-self: center; font-family: var(--font-mono); font-size: 0.7rem; }
.thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
  object-position: top;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: var(--wash);
}
.thumb .label { font-size: 0.68rem; letter-spacing: 0; white-space: normal; }

.shot-main { display: grid; gap: 12px; align-content: start; }
/* 画面の写しは縦の長さがばらばら（プランは長く、ログインは短い）。
   入れ物の高さを決めて、はみ出した下は切る。切るのは表示だけで、画像そのものは撮ったまま */
.shot {
  aspect-ratio: 1120 / 760;
  overflow: hidden;
  border: var(--edge);
  border-radius: var(--r-card);
  box-shadow: var(--pop);
  background: var(--paper);
}
.shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center; /* 上（看板と見出し）から見せる */
}
.shot-nav { display: flex; align-items: center; gap: 12px; }
.shot-nav button { padding: 6px 14px; font-size: 0.8rem; box-shadow: 3px 3px 0 var(--ink); }
.counter { font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-2); }
.shot-caption { margin: 0; display: grid; gap: 3px; }
.shot-caption b { font-size: 1rem; font-weight: 900; letter-spacing: -0.02em; }
.shot-caption span { font-size: 0.86rem; line-height: 1.7; color: var(--ink-2); word-break: auto-phrase; }

/* 狭い画面では一覧を横に流す（縦に置くと本文が細くなる） */
@media (max-width: 640px) {
  .guide { grid-template-columns: minmax(0, 1fr); }
  .thumbs {
    grid-auto-flow: column;
    grid-auto-columns: 128px;
    max-height: none;
    overflow-x: auto;
    padding-bottom: 6px;
  }
}

.howto-list {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: howto;
  display: grid;
  gap: 16px;
  font-size: 0.94rem;
}
.howto-list li {
  counter-increment: howto;
  position: relative;
  padding-left: 58px;
  min-height: 42px;
}
.howto-list li::before {
  content: counter(howto);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: var(--edge);
  font-family: var(--font-mono);
  font-weight: 700;
  background: var(--paper);
}
.howto-list li:nth-child(1)::before { background: var(--c1); color: #fff; transform: rotate(-6deg); }
.howto-list li:nth-child(2)::before { background: var(--c2); transform: rotate(5deg); }
.howto-list li:nth-child(3)::before { background: var(--c4); transform: rotate(-4deg); }
.howto-list b { font-weight: 900; }
.lower-cta { margin-top: 30px; }

.login-card { max-width: 540px; }
.login-card h2 { font-size: 1.7rem; letter-spacing: -0.045em; }
/* 入力欄は1列に積む。ボタンは欄の幅に広げず、押す場所として小さくまとめる */
.login-form { display: grid; gap: 16px; max-width: 420px; }
.login-form .actions { margin-top: 4px; }
.login-form .actions button { min-width: 10em; }
.login-switch {
  margin: 22px 0 0;
  padding-top: 18px;
  border-top: 2px dashed color-mix(in srgb, var(--ink) 25%, transparent);
  font-size: 0.88rem;
  color: var(--ink-2);
}
.login-switch a { color: var(--ink); font-weight: 900; margin-left: 4px; }

/* ---------------------------------------------------------------- 6. レスポンシブ */

/* ヒーローは1列に。飾りは見出しの上の帯になる */
@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .hero-text { grid-column: 1; }
  .deco {
    grid-column: 1;
    grid-row: auto;
    min-height: 150px;
    margin-bottom: 4px;
    overflow: hidden;
  }
  .splat { width: 190px; height: 190px; }
  .splat-acid { right: -30px; top: -46px; }
  .splat-magenta { right: 120px; top: -10px; width: 140px; height: 140px; }
  .ring-cyan { right: 176px; top: 46px; width: 74px; height: 74px; border-width: 9px; }
  .dot-violet { left: 12px; top: 60px; width: 20px; height: 20px; }
  .drop-b { left: 66px; top: 24px; }
  .arc { left: 0; top: 62px; width: 108px; height: 56px; stroke-width: 8; }
}

/* シェブロンは上部の横スクロールになる */
@media (max-width: 960px) {
  .rail {
    position: sticky;
    top: var(--header-h);
    inset-inline: auto;
    bottom: auto;
    width: auto;
    flex-direction: row;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-top: 0;
    border-bottom: var(--edge);
  }
  .rail-step {
    flex: 0 0 auto;
    min-width: 128px;
    height: auto;
    grid-auto-flow: column;
    gap: 8px;
    padding: 11px 20px 11px 32px;
    margin-bottom: 0;
    margin-left: -14px;
    scroll-snap-align: start;
    clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 50%, calc(100% - 16px) 100%, 0 100%, 16px 50%);
  }
  .rail-step:first-child {
    margin-left: 0;
    padding-left: 20px;
    clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 50%, calc(100% - 16px) 100%, 0 100%);
  }
  body:has(.rail) main { margin-left: 0; }
}

@media (max-width: 560px) {
  :root { --header-h: 56px; --pop: 5px 5px 0 var(--ink); }
  .top { padding: 0 12px; gap: 8px; }
  .brand-name { font-size: 1rem; }
  .lang { padding: 3px 8px; font-size: 0.66rem; }
  .top-right { gap: 6px; }
  .top-right button.ghost { font-size: 0.72rem; padding: 4px 9px; }
  .top-link { font-size: 0.72rem; padding: 4px 2px; }
  .top-signup { font-size: 0.7rem; padding: 4px 9px; }
  main { padding: 22px 16px 96px; }
  .card { padding: 22px 18px 24px; }
  /* スマホではヒーローの飾り（インクの飛沫）を出さない。見出しから始める
     （飾りの帯が1画面目の上を占めて、見出しと「使ってみる」が下へ押し出されていた） */
  .deco { display: none; }
}

.lang-short { display: none; }

/* 看板に言語・ログイン・新規登録（マイページ・ログアウト）が並ぶと 375px に収まらない。
   ロゴの文字は消さず、言語の表記を JA / EN に縮める */
@media (max-width: 420px) {
  .brand { gap: 6px; }
  .brand-name { font-size: 0.95rem; }
  .lang { padding: 3px 7px; }
  .lang-long { display: none; }
  .lang-short { display: inline; }
}

/* それでも入らない幅（320px 前後）だけ、ロゴの文字を外す */
@media (max-width: 350px) {
  .brand-name { display: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .card, .feature { animation: rise 0.24s ease both; }
  @keyframes rise { from { opacity: 0; transform: translateY(8px); } }
}
@media (prefers-reduced-motion: reduce) {
  button:hover:not(:disabled), .btn:hover, button:active:not(:disabled) { transform: none; }
}
