/* ホントノ v2 — 白地・現代ゴシック・単一アクセント。トークンは tokens.css 参照 */
@import url("tokens.css");

* { box-sizing: border-box; }
html { overflow-x: clip; }
body {
  overflow-x: clip;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-jp);
  font-size: var(--text-base);
  line-height: 1.72;
  font-feature-settings: "palt";
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
::selection { background: var(--accent-soft); }

.wrap { max-width: 70rem; margin-inline: auto; padding-inline: var(--page-gutter); }
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.muted { color: var(--muted); }

h1, h2, h3 { font-weight: 700; line-height: 1.4; margin: 0; overflow-wrap: anywhere; min-width: 0; text-wrap: balance; }
p { text-wrap: pretty; }

/* ---- 試作版の明示帯 -------------------------------------------------- */
.proto-note {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  font-size: var(--text-xs);
  color: var(--muted);
  padding: var(--space-2xs) var(--page-gutter);
  text-align: center;
}

/* ---- ヘッダー -------------------------------------------------------- */
.top {
  position: sticky; top: 0; z-index: var(--z-sticky-nav);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.top-inner {
  display: flex; align-items: center; gap: var(--space-lg);
  min-height: 60px;
}
.wordmark {
  font-size: var(--text-md); font-weight: 700; letter-spacing: 0.02em;
  text-decoration: none; line-height: 1;
}
.wordmark small {
  font-family: var(--font-num); font-size: var(--text-xs); font-weight: 500;
  color: var(--muted); margin-left: var(--space-xs); letter-spacing: 0.08em;
}
.top-nav { margin-left: auto; }
.top-nav ul { display: flex; gap: var(--space-lg); list-style: none; margin: 0; padding: 0; }
.top-nav a {
  text-decoration: none; font-size: var(--text-sm); color: var(--ink-2);
  white-space: nowrap; padding: var(--space-xs) 0; line-height: 1;
  transition: color var(--dur-micro) var(--ease-out);
}
.top-nav a:hover { color: var(--ink); }
@media (max-width: 24rem) {
  .top-inner { flex-wrap: wrap; row-gap: 0; padding-block: var(--space-sm); min-height: 0; }
  .top-nav { margin-left: 0; width: 100%; }
  .top-nav ul { gap: var(--space-md); }
}

/* ---- ヒーロー -------------------------------------------------------- */
/* 和文の大見出しは字間を詰める（正のアキは緩く見える）。行送りも本文用の1.4から離す。
 * リード文は本文と同じ設定にすると「置いただけ」に見えるので、17pxの中間段階を作る。
 * 最後の一文だけは太らせて独立させる——この計画群でいちばん重要な約束なので。 */
.hero { padding-block: var(--space-2xl) var(--space-xl); }
.hero h2 {
  font-size: var(--text-display);
  line-height: 1.18;
  letter-spacing: -0.03em;
  max-width: 22em;
}
.hero .lede {
  margin: var(--space-lg) 0 0;
  max-width: var(--measure);
  color: var(--ink-2);
  font-size: var(--text-md);
  line-height: 1.8;
  /* 辞書側の改行をそのまま反映する（2文なので文ごとに行を分ける） */
  white-space: pre-line;
}
.hero .punch {
  margin: var(--space-sm) 0 0;
  max-width: var(--measure);
  font-size: var(--text-md);
  font-weight: 700;
  line-height: 1.8;
  letter-spacing: -0.005em;
}
/* いまの熱量を数字で一行。棒グラフではなく文にすることで、SaaSの指標バーに見せない */
.hero .pulse {
  margin: var(--space-xl) 0 0;
  font-size: var(--text-sm);
  color: var(--muted);
}
.hero .pulse b {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: var(--text-md);
  color: var(--ink);
  letter-spacing: -0.01em;
}
@media (max-width: 40rem) {
  /* 狭い画面では数字の拡大が効きすぎて3行に折れるので、1段階落として2行に収める */
  .hero .pulse b { font-size: var(--text-base); }
  .hero .pulse { margin-top: var(--space-lg); }
}

/* ---- 注目の計画（大判カード） ---------------------------------------- */
.featured {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
  background: var(--bg);
}
.featured-media { display: block; background: var(--surface); min-height: 0; }
.featured-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.featured-body { display: flex; flex-direction: column; gap: var(--space-md); padding: var(--space-xl); min-width: 0; }
.featured-body h2 { font-size: var(--text-lg); line-height: 1.5; }
.featured-body h2 a { text-decoration: none; }
.featured-body h2 a:hover { color: var(--accent-strong); }
.featured-sub { margin: 0; color: var(--muted); font-size: var(--text-sm); }
@media (max-width: 60rem) { .featured { grid-template-columns: 1fr; } .featured-body { padding: var(--space-lg); } }

/* ---- チップ・所有者 -------------------------------------------------- */
.chip {
  display: inline-block; align-self: flex-start;
  background: var(--accent-soft); border-radius: var(--r-full);
  font-size: var(--text-xs); font-weight: 700; color: var(--accent-strong);
  padding: 3px 12px; line-height: 1.7;
}
.owner { margin: 0; font-size: var(--text-xs); color: var(--muted); }

/* ---- セクション ------------------------------------------------------ */
.rail { padding-block: var(--space-2xl) 0; }
.rail:last-of-type { padding-bottom: var(--space-2xl); }
.rail-head { display: flex; align-items: baseline; gap: var(--space-sm); margin-bottom: var(--space-lg); }
.rail-head h2 { font-size: var(--text-xl); letter-spacing: 0.01em; }
.rail-head .count { font-family: var(--font-num); font-size: var(--text-sm); color: var(--muted); }

/* ---- カテゴリ絞り込み ------------------------------------------------ */
.filters {
  display: flex; flex-wrap: wrap; gap: var(--space-xs);
  margin: calc(var(--space-lg) * -1 + var(--space-xs)) 0 var(--space-lg);
}
.filter {
  display: inline-flex; align-items: center; gap: 6px;
  font: inherit; font-size: var(--text-sm); line-height: 1;
  background: transparent; color: var(--ink-2);
  border: 1px solid var(--line-strong); border-radius: var(--r-full);
  padding: 0 var(--space-md); min-height: 36px;
  cursor: pointer; white-space: nowrap;
  transition: background-color var(--dur-micro) var(--ease-out), border-color var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out);
}
.filter:hover { border-color: var(--ink); color: var(--ink); }
.filter .n {
  font-family: var(--font-num); font-variant-numeric: tabular-nums;
  font-size: var(--text-xs); color: var(--muted);
}
.filter.is-on {
  background: var(--ink); border-color: var(--ink); color: var(--bg);
}
.filter.is-on .n { color: var(--bg); opacity: 0.7; }
.filter-empty { color: var(--muted); font-size: var(--text-sm); }
@media (max-width: 48rem) {
  /* 狭い画面では折り返すと3行になるので、1行の横スクロールにする。
     左右の余白いっぱいまで伸ばして「まだ続く」ことが見えるようにする */
  .filters {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    margin-inline: calc(var(--page-gutter) * -1);
    padding-inline: var(--page-gutter);
    padding-bottom: var(--space-2xs);
    scroll-snap-type: x proximity;
  }
  .filters::-webkit-scrollbar { display: none; }
  .filter { scroll-snap-align: start; flex: none; }
}

/* ---- 計画カード ------------------------------------------------------ */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-xl) var(--space-lg); }
@media (max-width: 60rem) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 40rem) { .cards { grid-template-columns: 1fr; } }
.card {
  position: relative; display: grid; gap: var(--space-sm); align-content: start;
  border-radius: var(--r-md);
  transition: transform var(--dur-short) var(--ease-out), box-shadow var(--dur-short) var(--ease-out);
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.card-media {
  display: block; aspect-ratio: 16 / 10; overflow: hidden;
  border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface);
}
.card-media img { width: 100%; height: 100%; object-fit: cover; }
/* 写真の左右端と文字の端をぴったり揃える。4pxの内側余白は「わずかにズレている」に見えるため置かない */
.card-meta { display: grid; gap: var(--space-xs); }
.card h3 { font-size: var(--text-base); line-height: 1.6; }
.card h3 a { text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--r-md); }
.card h3 a:hover { color: var(--accent-strong); }

/* ---- 進捗（署名要素: うそ→ほんと） ----------------------------------- */
.progress { display: grid; gap: 6px; }
.progress-track { height: 10px; border-radius: var(--r-full); background: var(--lie-soft); overflow: hidden; }
.progress-track i {
  display: block; height: 100%; border-radius: var(--r-full);
  background: var(--accent);
  transform-origin: left; transform: scaleX(var(--p, 0));
  animation: fill var(--dur-long) var(--ease-out) both;
}
@keyframes fill { from { transform: scaleX(0); } to { transform: scaleX(var(--p, 0)); } }
.progress-ends { display: flex; justify-content: space-between; font-size: 0.6875rem; line-height: 1; }
.progress-ends span { color: var(--lie); }
.progress-ends .to { color: var(--accent); font-weight: 700; }
.progress.is-done .progress-track i { background: var(--ok); }
.progress.is-done .progress-ends .to { color: var(--ok); }
.progress-meta {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-sm) var(--space-md);
  font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: var(--text-sm);
}
.progress-meta .pct { font-size: var(--text-xl); font-weight: 700; color: var(--accent); line-height: 1; }
.progress.is-done .pct { color: var(--ok); }
.progress-meta .label { font-family: var(--font-jp); font-size: var(--text-xs); color: var(--muted); }
/* 締切1週間以内。クラファンは締切前に伸びるので、急ぎだけは色で伝える */
.progress-meta .is-urgent { color: var(--accent-strong); font-weight: 700; }
.progress-meta .is-urgent .label { color: var(--accent-strong); font-weight: 400; }

/* ---- しくみ ---------------------------------------------------------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-xl) var(--space-lg); }
@media (max-width: 60rem) { .steps { grid-template-columns: 1fr; } }
.steps .stage { font-family: var(--font-num); font-size: var(--text-xl); font-weight: 700; color: var(--accent); display: block; line-height: 1; }
.steps h3 { font-size: var(--text-md); margin-top: var(--space-sm); }
.steps p { margin: var(--space-xs) 0 0; font-size: var(--text-sm); color: var(--ink-2); }

/* ---- 終了した計画 ---------------------------------------------------- */
.done-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-sm); }
.done-list li {
  display: flex; flex-wrap: wrap; gap: var(--space-md); align-items: center;
  border: 1px solid var(--line); border-radius: var(--r-md);
  padding: var(--space-sm) var(--space-md);
}
.done-list a { text-decoration: none; font-weight: 700; font-size: var(--text-sm); }
.done-list a:hover { color: var(--accent-strong); }
.done-list .result { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: var(--text-sm); color: var(--muted); margin-left: auto; white-space: nowrap; }
.badge {
  font-size: var(--text-xs); line-height: 1.9; border-radius: var(--r-full);
  padding: 0 10px; white-space: nowrap;
}
.badge.ok { background: var(--accent-soft); color: var(--accent-strong); font-weight: 700; }
.badge.ng { background: var(--surface); color: var(--muted); }
.badge.lock { background: var(--lie-soft); color: var(--lie); font-weight: 700; }

/* ---- 計画詳細 -------------------------------------------------------- */
.project-head { padding-block: var(--space-xl) var(--space-lg); display: grid; gap: var(--space-sm); justify-items: start; }
.project-head h1 { font-size: var(--text-display); line-height: 1.4; max-width: 24em; }
.project-head .sub { margin: 0; color: var(--ink-2); max-width: var(--measure); }
.project-cols { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: var(--space-2xl); align-items: start; padding-bottom: var(--space-2xl); }
@media (max-width: 60rem) { .project-cols { grid-template-columns: 1fr; } }
.project-art { margin: 0; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.project-art img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.story { max-width: var(--measure); }
.story p { margin: 0 0 1.5em; }
.story strong { font-weight: 700; }
.story-h {
  font-size: var(--text-md); font-weight: 700;
  margin: 2em 0 0.75em; letter-spacing: -0.01em;
}
.story-h:first-child { margin-top: 0; }
.side { position: sticky; top: calc(60px + var(--space-lg)); display: grid; gap: var(--space-lg); }
@media (max-width: 60rem) { .side { position: static; } }
.side-panel {
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: var(--space-lg); display: grid; gap: var(--space-md); background: var(--bg);
}
.side-panel .big-pct {
  font-family: var(--font-num); font-variant-numeric: tabular-nums;
  font-size: var(--text-3xl); font-weight: 700; line-height: 1; color: var(--accent);
  letter-spacing: -0.02em;
}
.side-panel dl { display: grid; grid-template-columns: auto 1fr; gap: var(--space-2xs) var(--space-md); margin: 0; font-size: var(--text-sm); }
.side-panel dt { color: var(--muted); }
.side-panel dd { margin: 0; font-family: var(--font-num); font-variant-numeric: tabular-nums; text-align: right; }

/* ---- リターン -------------------------------------------------------- */
.tiers { display: grid; gap: var(--space-md); }
.tier {
  border: 1px solid var(--line); border-radius: var(--r-md);
  padding: var(--space-md); display: grid; gap: var(--space-xs); background: var(--bg);
}
.tier-amount { font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: var(--text-md); font-weight: 700; }
.tier h3 { font-size: var(--text-sm); }
.tier p { margin: 0; font-size: var(--text-sm); color: var(--ink-2); }
.tier .left { font-size: var(--text-xs); color: var(--muted); font-family: var(--font-num); }
.tier-img {
  display: block; width: calc(100% + var(--space-md) * 2);
  margin: calc(var(--space-md) * -1) 0 var(--space-xs) calc(var(--space-md) * -1);
  aspect-ratio: 16 / 10; object-fit: cover;
  border-radius: var(--r-md) var(--r-md) 0 0;
}
.tier.is-full { opacity: 0.55; }

/* ---- ボタン ---------------------------------------------------------- */
.btn {
  cursor: pointer;
  font-family: var(--font-jp); font-size: var(--text-base); font-weight: 700; line-height: 1;
  background: var(--accent); color: var(--accent-ink);
  border: 1px solid var(--accent);
  border-radius: var(--r-full);
  padding: 0 var(--space-xl); min-height: 48px;
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; text-align: center; white-space: nowrap;
  transition: background-color var(--dur-micro) var(--ease-out), border-color var(--dur-micro) var(--ease-out), transform var(--dur-micro) var(--ease-out);
}
.btn:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { background: var(--muted); border-color: var(--muted); cursor: not-allowed; opacity: 0.55; }
.btn-ghost {
  background: transparent; color: var(--ink); border: 1px solid var(--line-strong);
  min-height: 42px; padding: 0 var(--space-lg); font-size: var(--text-sm);
}
.btn-ghost:hover { background: var(--surface); border-color: var(--ink); color: var(--ink); }

/* ---- フォーム -------------------------------------------------------- */
.form { display: grid; gap: var(--space-lg); max-width: 34rem; padding-bottom: var(--space-2xl); }
.field { display: grid; gap: var(--space-2xs); }
.field label { font-size: var(--text-sm); font-weight: 700; }
.field .hint { font-size: var(--text-xs); color: var(--muted); min-height: 1lh; }
.field input, .field textarea {
  font: inherit; color: inherit; background: var(--bg);
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  padding: var(--space-sm); min-height: 46px;
}
.field textarea { min-height: 6em; }
.field input:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 0; }
.errors {
  border: 1px solid var(--danger); border-radius: var(--r-md); color: var(--danger);
  padding: var(--space-md); margin: 0 0 var(--space-lg); font-size: var(--text-sm);
}
.errors ul { margin: 0; padding-left: 1.2em; }
.tier-choice { display: grid; gap: var(--space-xs); }
.tier-choice label {
  display: flex; gap: var(--space-sm); align-items: baseline;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: var(--space-sm) var(--space-md); cursor: pointer; font-size: var(--text-sm);
}
.tier-choice label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.tier-choice label:has(input:disabled) { opacity: 0.55; cursor: not-allowed; }
.tier-choice input { accent-color: var(--accent); }

/* ---- リスクとチャレンジ ---------------------------------------------- */
.risks {
  border-left: 3px solid var(--accent);
  padding-left: var(--space-md);
}
.risks p { font-size: var(--text-sm); color: var(--ink-2); }

/* ---- FAQ ------------------------------------------------------------- */
.faq { display: grid; gap: var(--space-xs); max-width: var(--measure); }
.faq-item { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg); }
.faq-item summary {
  cursor: pointer; padding: var(--space-sm) var(--space-md);
  font-size: var(--text-sm); font-weight: 700; list-style: none;
  display: flex; align-items: baseline; gap: var(--space-sm);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before { content: "Q"; font-family: var(--font-num); color: var(--accent); font-weight: 700; }
.faq-item[open] summary { border-bottom: 1px solid var(--line); }
.faq-item p { margin: 0; padding: var(--space-sm) var(--space-md) var(--space-md); font-size: var(--text-sm); color: var(--ink-2); white-space: pre-line; }
.faq-item summary:hover { background: var(--surface); }

/* ---- 活動報告・支援者 ------------------------------------------------ */
.updates { display: grid; gap: var(--space-lg); }
.update { border-top: 1px solid var(--line); padding-top: var(--space-md); }
.update-meta { display: flex; align-items: baseline; gap: var(--space-sm); flex-wrap: wrap; }
.update-no { font-weight: 700; color: var(--accent); font-size: var(--text-sm); }
.update time { font-family: var(--font-num); font-size: var(--text-xs); color: var(--muted); }
.update h3 { font-size: var(--text-md); margin-top: var(--space-2xs); }
.update p { margin: var(--space-xs) 0 0; font-size: var(--text-sm); }
.update-img { display: block; width: 100%; border-radius: var(--r-md); border: 1px solid var(--line); margin-top: var(--space-sm); }
.backers { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-xs); }
.backer { display: flex; gap: var(--space-md); align-items: baseline; font-size: var(--text-sm); border-top: 1px solid var(--line); padding-top: var(--space-xs); }
.backer .cmt { color: var(--muted); }
.backer .amt { font-family: var(--font-num); font-variant-numeric: tabular-nums; margin-left: auto; white-space: nowrap; }

/* ---- フッター -------------------------------------------------------- */
.foot { border-top: 1px solid var(--line); margin-top: var(--space-3xl); padding-block: var(--space-xl); }
.foot-inner { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-md) var(--space-xl); font-size: var(--text-sm); }
.foot .fm { font-weight: 700; }
.foot .tagline { color: var(--muted); }
.foot .links { margin-left: auto; display: flex; flex-wrap: wrap; gap: var(--space-lg); font-size: var(--text-xs); }
.foot .links a { color: var(--muted); text-decoration: none; white-space: nowrap; }
.foot .links a:hover { color: var(--ink); }
@media (max-width: 40rem) { .foot .links { margin-left: 0; } }

/* ---- 特商法などの表 -------------------------------------------------- */
.legal-table { width: 100%; max-width: 48rem; border-collapse: collapse; font-size: var(--text-sm); }
.legal-table th, .legal-table td {
  text-align: left; vertical-align: top;
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid var(--line);
  line-height: 1.75;
}
.legal-table th {
  width: 11rem; font-weight: 700; color: var(--ink);
  background: var(--surface);
  border-right: 1px solid var(--line);
}
.legal-table th.accent-th { color: var(--accent-strong); }
.legal-table tr:first-child th, .legal-table tr:first-child td { border-top: 1px solid var(--line); }
.legal-table td strong { font-weight: 700; }
@media (max-width: 40rem) {
  .legal-table th, .legal-table td { display: block; width: auto; border-right: 0; }
  .legal-table th { border-bottom: 0; padding-bottom: var(--space-2xs); }
  .legal-table td { padding-top: var(--space-2xs); }
}

/* ---- 本文中の画像 ---------------------------------------------------- */
.story-fig { margin: var(--space-lg) 0; }
.story-fig img { display: block; width: 100%; border-radius: var(--r-md); border: 1px solid var(--line); }
.story-fig figcaption { font-size: var(--text-xs); color: var(--muted); margin-top: var(--space-2xs); }

/* ---- 管理画面 -------------------------------------------------------- */
.admin-table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.admin-table th { text-align: left; font-size: var(--text-xs); color: var(--muted); font-weight: 500; padding: var(--space-xs); border-bottom: 1px solid var(--line-strong); }
.admin-table td { padding: var(--space-sm) var(--space-xs); border-bottom: 1px solid var(--line); vertical-align: top; }
.admin-table a { text-decoration: none; font-weight: 700; }
.admin-table a:hover { color: var(--accent-strong); }
.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-md); }
@media (max-width: 40rem) { .admin-grid { grid-template-columns: 1fr; } }
.admin-msg { background: var(--accent-soft); border: 1px solid var(--accent); border-radius: var(--r-md); padding: var(--space-sm) var(--space-md); font-size: var(--text-sm); overflow-wrap: anywhere; }
.admin-msg code { font-family: var(--font-num); background: var(--bg); padding: 0 4px; border-radius: 4px; }
.field input[type="file"] { padding: var(--space-xs); min-height: 0; }

/* ---- 管理画面のエディタ ---------------------------------------------- */
.ed { border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--bg); }
.ed.is-drop { border-color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent-soft); }
.ed-bar {
  display: flex; align-items: center; gap: var(--space-2xs); flex-wrap: wrap;
  padding: 6px; border-bottom: 1px solid var(--line); background: var(--surface);
  border-radius: var(--r-sm) var(--r-sm) 0 0;
}
.ed-spacer { flex: 1 1 auto; }
.ed-btn {
  font: inherit; font-size: var(--text-xs); line-height: 1;
  background: var(--bg); color: var(--ink-2);
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  padding: 0 10px; min-height: 30px; cursor: pointer; white-space: nowrap;
}
.ed-btn:hover { border-color: var(--ink); color: var(--ink); }
.ed-btn.is-on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.ed-status { font-size: var(--text-xs); color: var(--muted); }
.ed textarea {
  display: block; width: 100%; border: 0; border-radius: 0;
  padding: var(--space-md); background: transparent; resize: vertical;
}
.ed textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.ed-preview {
  border-top: 1px dashed var(--line-strong); padding: var(--space-md);
  background: var(--surface); font-size: var(--text-sm);
}
.ed-preview h4 { font-size: var(--text-md); margin: 1.5em 0 0.5em; }
.ed-preview h4:first-child { margin-top: 0; }
.ed-preview p { margin: 0 0 1em; }
.ed-preview figure { margin: 0 0 1em; }
.ed-preview img { display: block; width: 100%; border-radius: var(--r-sm); border: 1px solid var(--line); }
.ed-preview figcaption { font-size: var(--text-xs); color: var(--muted); margin-top: 4px; }
.ed-hint { margin: 0; padding: 6px var(--space-md); font-size: var(--text-xs); color: var(--muted); border-top: 1px solid var(--line); }

/* 画像1枚を選ぶ欄 */
.pick { border: 1px dashed var(--line-strong); border-radius: var(--r-sm); padding: var(--space-sm); display: grid; gap: var(--space-sm); }
.pick.is-drop { border-color: var(--accent); border-style: solid; background: var(--accent-soft); }
.pick-thumb { display: flex; align-items: center; gap: var(--space-sm); min-height: 64px; }
.pick-thumb img { width: 104px; height: 65px; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--line); }
.pick-thumb code { font-family: var(--font-num); font-size: var(--text-xs); color: var(--muted); overflow-wrap: anywhere; }
.pick-empty { font-size: var(--text-xs); color: var(--muted); }
.pick-acts { display: flex; align-items: center; gap: var(--space-xs); flex-wrap: wrap; }

/* ---- 初回リビール ---------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(6px); animation: reveal var(--dur-long) var(--ease-out) forwards; animation-delay: calc(var(--i, 0) * 60ms); }
@keyframes reveal { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 120ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 120ms !important;
  }
  .reveal { animation: reveal-reduced 120ms linear forwards; }
  @keyframes reveal-reduced { to { opacity: 1; transform: none; } }
  .card:hover { transform: none; }
}
