/* =========================================================
   MojiMoji — forge/workshop ダークテーマ
   ベース: 温かみのある近黒 / アクセント: 溶鉱炉のember→spark
   ========================================================= */

:root {
  --bg:      #131019;
  --bg-2:    #1b1723;
  --bg-3:    #241f2f;
  --bg-4:    #2e2839;
  --line:    rgba(255, 255, 255, 0.08);
  --line-2:  rgba(255, 255, 255, 0.14);
  --text:    #efeaf4;
  --text-dim:#a59db4;
  --text-mut:#736c82;

  --ember:   #ff6a3d;
  --ember-2: #ff8f3a;
  --spark:   #ffd24a;
  --cool:    #46e3c6;
  --danger:  #ff5470;
  --ok:      #57d98a;

  --grad-hot: linear-gradient(135deg, #ffd24a 0%, #ff8f3a 42%, #ff5b46 100%);
  --grad-panel: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0));

  --radius:   16px;
  --radius-sm:11px;
  --shadow:   0 18px 50px -22px rgba(0, 0, 0, 0.7);
  --glow:     0 0 0 1px rgba(255,120,60,0.35), 0 10px 30px -10px rgba(255,106,61,0.45);

  --font-ui:   "M PLUS Rounded 1c", "Noto Sans JP", system-ui, sans-serif;
  --font-body: "Noto Sans JP", "M PLUS Rounded 1c", system-ui, sans-serif;
  --font-mark: "Rampart One", "M PLUS Rounded 1c", sans-serif;

  /* テーマ切替対象（ダーク既定値） */
  --page-bg:
    radial-gradient(1200px 620px at 78% -8%, rgba(255,106,61,0.16), transparent 60%),
    radial-gradient(900px 500px at 4% 4%, rgba(70,227,198,0.08), transparent 55%),
    #131019;
  --card-bg: linear-gradient(180deg, #1b1723, rgba(27,23,35,0.6));
  --topbar-bg: rgba(19, 16, 25, 0.72);
  --footer-bg: rgba(19, 16, 25, 0.5);
  --checker-a: #3a3446;
  --checker-b: #2b2636;
  --thumb-a:   #d8d3e0;
  --thumb-b:   #c3bdcd;
  --grain-opacity: 0.045;
}

/* ---------------- ライトテーマ ----------------
   温かみのある紙色ベース。emberアクセントは共通 */
:root[data-theme="light"] {
  --bg:      #f5f1e9;
  --bg-2:    #fdfbf6;
  --bg-3:    #f0ebe0;
  --bg-4:    #e6e0d2;
  --line:    rgba(42, 25, 12, 0.10);
  --line-2:  rgba(42, 25, 12, 0.20);
  --text:    #2b2333;
  --text-dim:#6b6277;
  --text-mut:#948b9f;

  --shadow:  0 16px 40px -24px rgba(80, 50, 20, 0.35);
  --glow:    0 0 0 1px rgba(255,106,61,0.45), 0 10px 26px -12px rgba(255,106,61,0.4);
  --grad-panel: linear-gradient(180deg, rgba(255,255,255,0.5), rgba(255,255,255,0));

  --page-bg:
    radial-gradient(1200px 620px at 78% -8%, rgba(255,143,58,0.14), transparent 60%),
    radial-gradient(900px 500px at 4% 4%, rgba(70,227,198,0.10), transparent 55%),
    #f5f1e9;
  --card-bg: linear-gradient(180deg, #fdfbf6, rgba(253,251,246,0.75));
  --topbar-bg: rgba(245, 241, 233, 0.78);
  --footer-bg: rgba(240, 235, 224, 0.6);
  /* ライトでも透過チェッカーがはっきり見える中明度グレー */
  --checker-a: #d9d4c8;
  --checker-b: #bfbaae;
  --thumb-a:   #e5e0d4;
  --thumb-b:   #cdc7b9;
  --grain-opacity: 0.03;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  min-height: 100vh;
  background: var(--page-bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* フィルム粒子のテクスチャ */
.grain {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* ---------------- トップバー ---------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px clamp(16px, 4vw, 40px);
  background: var(--topbar-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 13px; }

.brand__mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  font-family: var(--font-mark);
  font-size: 30px;
  line-height: 1;
  color: #2a1405;
  background: var(--grad-hot);
  box-shadow: var(--glow);
  transform: rotate(-4deg);
  padding-top: 4px;
}

.brand__name {
  margin: 0;
  font-family: var(--font-ui);
  font-weight: 900;
  font-size: 23px;
  letter-spacing: 0.5px;
  line-height: 1;
}
.brand__tag {
  margin: 3px 0 0;
  font-size: 11.5px;
  color: var(--text-dim);
  letter-spacing: 0.3px;
}

.topbar__actions { display: flex; align-items: center; gap: 12px; }

/* テーマトグル（☀️/🌙） */
.theme-toggle {
  appearance: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: var(--bg-3);
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.12s, border-color 0.15s, box-shadow 0.15s;
}
.theme-toggle:hover { transform: translateY(-1px); border-color: var(--ember); box-shadow: 0 6px 16px -8px rgba(255,106,61,0.5); }
.theme-toggle:active { transform: translateY(0); }

/* ---------------- レイアウト ---------------- */
.layout {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(16px, 3vw, 30px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 400px);
  gap: 22px;
  align-items: start;
}

.preview-panel { position: sticky; top: 88px; }

/* ---------------- カード共通 ---------------- */
.card {
  background: var(--card-bg), var(--grad-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
}
.controls { display: flex; flex-direction: column; gap: 18px; min-width: 0; }

/* ---------------- ステップ ---------------- */
.step__head { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; }
.step__no {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 9px;
  font-family: var(--font-ui);
  font-weight: 900;
  font-size: 15px;
  color: #2a1405;
  background: var(--grad-hot);
  box-shadow: 0 4px 14px -4px rgba(255,120,60,0.6);
}
.step__title {
  margin: 0;
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 16.5px;
  letter-spacing: 0.4px;
}
.step__aside, .step__aside { margin-left: auto; font-size: 11.5px; color: var(--text-mut); }

/* ---------------- テキスト入力 ---------------- */
.textarea {
  width: 100%;
  resize: vertical;
  min-height: 74px;
  padding: 14px 15px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-2);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 20px;
  line-height: 1.35;
  letter-spacing: 0.5px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.textarea::placeholder { color: var(--text-mut); font-weight: 700; }
.textarea:focus { border-color: var(--ember); box-shadow: 0 0 0 3px rgba(255,106,61,0.18); }
.hint { margin: 8px 2px 0; font-size: 11.5px; color: var(--text-mut); }

/* ---------------- テンプレカード ---------------- */
.tpl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
}
.tpl {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 9px 9px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg-3);
  cursor: pointer;
  transition: transform 0.12s, border-color 0.15s, box-shadow 0.15s;
}
.tpl:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: 0 12px 26px -14px rgba(0,0,0,0.8); }
.tpl.is-active { border-color: var(--ember); box-shadow: var(--glow); }
.tpl__thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  background:
    conic-gradient(from 45deg, var(--thumb-a) 0 25%, var(--thumb-b) 0 50%, var(--thumb-a) 0 75%, var(--thumb-b) 0) 0 0 / 16px 16px;
  display: block;
}
.tpl__name { font-family: var(--font-ui); font-weight: 800; font-size: 11.5px; text-align: center; letter-spacing: 0.2px; }

/* ---------------- アコーディオン ---------------- */
.accordion { padding: 0; overflow: hidden; }
.accordion__summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 17px 18px;
}
.accordion__summary::-webkit-details-marker { display: none; }
.accordion__label { font-family: var(--font-ui); font-weight: 800; font-size: 15.5px; }
.accordion__hint { font-size: 11.5px; color: var(--text-mut); }
.accordion__chevron { margin-left: auto; color: var(--text-dim); transition: transform 0.2s; }
.accordion[open] .accordion__chevron { transform: rotate(180deg); }
.accordion__body { padding: 4px 18px 20px; display: flex; flex-direction: column; gap: 20px; }

/* ---------------- フィールド ---------------- */
.field { display: flex; flex-direction: column; gap: 10px; }
.field__label {
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 12.5px;
  letter-spacing: 0.5px;
  color: var(--text-dim);
  text-transform: uppercase;
  display: flex; align-items: center; gap: 8px;
}
.badge {
  font-family: var(--font-ui);
  font-weight: 900;
  font-size: 9.5px;
  color: #2a1405;
  background: var(--grad-hot);
  padding: 2px 7px;
  border-radius: 999px;
  letter-spacing: 0.5px;
}
.sub { display: flex; flex-direction: column; gap: 7px; }
.sub__cap { font-size: 11px; color: var(--text-mut); letter-spacing: 0.3px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ---------------- セグメント ボタン ---------------- */
.seg {
  display: inline-flex;
  padding: 4px;
  gap: 4px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.seg--fill { display: flex; width: 100%; }
.seg--fill .seg__btn { flex: 1; }
.seg__btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-dim);
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 9px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  line-height: 1.2;
  transition: color 0.14s, background 0.14s, box-shadow 0.14s;
  white-space: nowrap;
}
.seg__btn small { font-size: 9.5px; font-weight: 700; color: inherit; opacity: 0.7; }
.seg__btn:hover { color: var(--text); }
.seg__btn.is-active {
  color: #2a1405;
  background: var(--grad-hot);
  box-shadow: 0 5px 14px -6px rgba(255,120,60,0.6);
}
.seg__btn.is-active small { color: #4a2708; opacity: 0.85; }
.seg--sm .seg__btn { font-size: 12px; padding: 7px 11px; }

/* ---------------- カラー ---------------- */
.color-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.color-chip {
  appearance: none;
  -webkit-appearance: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 2px solid var(--line-2);
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
}
.color-chip::-webkit-color-swatch-wrapper { padding: 3px; }
.color-chip::-webkit-color-swatch { border: none; border-radius: 8px; }
.color-chip::-moz-color-swatch { border: none; border-radius: 8px; }
.color-chip--sm { width: 34px; height: 34px; border-radius: 10px; }

.swatches { display: flex; flex-wrap: wrap; gap: 7px; }
.swatch {
  width: 26px; height: 26px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.18);
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
}
.swatch:hover { transform: scale(1.12); box-shadow: 0 4px 12px -3px rgba(0,0,0,0.6); }

.grad-row { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.grad-arrow { color: var(--text-dim); font-size: 18px; }
.mini { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.mini__cap { font-size: 10px; color: var(--text-mut); }

/* ---------------- トグルスイッチ ---------------- */
.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle__track {
  position: relative;
  width: 42px; height: 24px;
  border-radius: 999px;
  background: var(--bg-4);
  border: 1px solid var(--line-2);
  transition: background 0.16s;
  flex: none;
}
.toggle__thumb {
  position: absolute;
  top: 2px; left: 2px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--text-dim);
  transition: transform 0.16s, background 0.16s;
}
.toggle input:checked + .toggle__track { background: var(--ember); border-color: transparent; }
.toggle input:checked + .toggle__track .toggle__thumb { transform: translateX(18px); background: #2a1405; }
.toggle input:focus-visible + .toggle__track { box-shadow: 0 0 0 3px rgba(255,106,61,0.3); }
.toggle__text { font-family: var(--font-ui); font-weight: 700; font-size: 13px; }

/* ---------------- スライダー ---------------- */
.slider { display: flex; flex-direction: column; gap: 7px; }
.slider__label { font-size: 11.5px; color: var(--text-dim); font-weight: 700; display: flex; gap: 5px; align-items: baseline; }
.slider__label output { color: var(--spark); font-family: var(--font-ui); font-weight: 800; font-size: 13px; }
input[type="range"] {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--ember) 0%, var(--bg-4) 0%);
  outline: none;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--ember);
  box-shadow: 0 2px 8px -2px rgba(0,0,0,0.7);
  cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--ember);
  cursor: pointer;
}

/* ---------------- フォントグリッド ---------------- */
.font-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 8px;
}
.font-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--bg-3);
  color: var(--text);
  border-radius: 11px;
  padding: 11px 4px 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  transition: transform 0.12s, border-color 0.14s, box-shadow 0.14s, background 0.14s;
  overflow: hidden;
}
.font-btn:hover { transform: translateY(-2px); border-color: var(--line-2); }
.font-btn.is-active { border-color: var(--ember); box-shadow: var(--glow); background: var(--bg-4); }
.font-btn__sample { font-size: 23px; line-height: 1; white-space: nowrap; }
.font-btn__label { font-family: var(--font-ui); font-weight: 700; font-size: 10px; color: var(--text-dim); }
.font-btn.is-active .font-btn__label { color: var(--spark); }

/* ---------------- アニメグリッド ---------------- */
.anim-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.anim {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--bg-3);
  color: var(--text-dim);
  border-radius: 11px;
  padding: 10px 6px 9px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: transform 0.12s, border-color 0.14s, color 0.14s, box-shadow 0.14s;
}
.anim:hover { transform: translateY(-2px); color: var(--text); border-color: var(--line-2); }
.anim.is-active { border-color: var(--ember); color: var(--text); box-shadow: var(--glow); background: var(--bg-4); }
.anim__ico { font-size: 20px; line-height: 1; }
.anim__name { font-family: var(--font-ui); font-weight: 800; font-size: 11px; }

/* ---------------- プレビュー ---------------- */
.stage { margin-top: 4px; }
.stage__checker {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--line-2);
  background:
    conic-gradient(from 90deg, var(--checker-a) 0 25%, var(--checker-b) 0 50%, var(--checker-a) 0 75%, var(--checker-b) 0) 0 0 / 22px 22px;
  display: grid;
  place-items: center;
  padding: 14px;
}
#preview {
  width: 100%;
  max-width: 288px;
  height: auto;
  aspect-ratio: 1 / 1;
  image-rendering: auto;
  display: block;
}

.filesize {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 14px 2px 0;
  font-size: 12.5px;
}
.filesize__meta { color: var(--text-dim); font-weight: 700; }
.filesize__size { font-family: var(--font-ui); font-weight: 800; color: var(--text); }
.filesize__size.is-warn { color: var(--danger); }
.filewarn {
  margin: 8px 0 0;
  padding: 9px 11px;
  border-radius: 10px;
  background: rgba(255,84,112,0.12);
  border: 1px solid rgba(255,84,112,0.35);
  color: #ff96a8;
  font-size: 11.5px;
  line-height: 1.5;
}

/* ---------------- ボタン ---------------- */
.btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 14px;
  border-radius: 12px;
  padding: 12px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text);
  background: var(--bg-4);
  border: 1px solid var(--line-2);
  transition: transform 0.1s, box-shadow 0.15s, filter 0.15s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn__glyph { font-size: 16px; }
.btn--primary {
  color: #2a1405;
  background: var(--grad-hot);
  border-color: transparent;
  box-shadow: 0 10px 26px -10px rgba(255,120,60,0.7);
}
.btn--primary:hover { filter: brightness(1.05); box-shadow: 0 14px 32px -10px rgba(255,120,60,0.85); }
.btn--block { width: 100%; margin-top: 14px; padding: 14px; font-size: 15px; }
.btn[disabled] { opacity: 0.6; cursor: progress; transform: none; }

/* ---------------- プログレス ---------------- */
.progress {
  margin-top: 12px;
  height: 24px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--line-2);
  position: relative;
  overflow: hidden;
}
.progress__bar { height: 100%; width: 0%; background: var(--grad-hot); transition: width 0.12s; }
.progress__text {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
}

/* ---------------- 実寸プレビュー ---------------- */
.realsize { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.realsize__cap { margin: 0 0 12px; font-size: 11.5px; color: var(--text-mut); letter-spacing: 0.3px; }
.chat {
  display: flex;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 12px;
  margin-bottom: 10px;
}
.chat--dark { background: #1a1d21; }
.chat--light { background: #f6f7f9; }
.chat__avatar { flex: none; width: 32px; height: 32px; border-radius: 9px; background: var(--c, #888); }
.chat__body { min-width: 0; }
.chat__name { margin: 0 0 2px; font-family: var(--font-ui); font-weight: 800; font-size: 12.5px; }
.chat__time { font-weight: 500; font-size: 10px; opacity: 0.6; margin-left: 5px; }
.chat--dark .chat__name { color: #e6e8ea; }
.chat--light .chat__name { color: #1d1c1d; }
.chat__msg { margin: 0; font-size: 13px; line-height: 1.5; display: flex; align-items: center; flex-wrap: wrap; gap: 2px; }
.chat--dark .chat__msg { color: #d1d2d3; }
.chat--light .chat__msg { color: #1d1c1d; }
.rz { width: 22px; height: 22px; vertical-align: middle; display: inline-block; }
.rz-di, .rz-li { margin: 0 3px; }
.reaction {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 7px;
  padding: 2px 9px 2px 6px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.chat--dark .reaction { background: rgba(29,155,209,0.16); border: 1px solid rgba(29,155,209,0.4); color: #7cc9ee; }
.chat--light .reaction { background: #e8f5fb; border: 1px solid #b8def0; color: #1264a3; }

/* ---------------- SEOコンテンツ ---------------- */
.seo {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  background: var(--footer-bg);
}
.seo__inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 44px clamp(16px, 4vw, 40px) 26px;
}
.seo__h2 {
  font-family: var(--font-ui);
  font-weight: 900;
  font-size: 19px;
  letter-spacing: 0.4px;
  margin: 38px 0 14px;
  padding-left: 13px;
  border-left: 4px solid var(--ember);
  line-height: 1.5;
}
.seo__h2:first-child { margin-top: 0; }
.seo__h3 {
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 14.5px;
  margin: 20px 0 6px;
  color: var(--text);
}
.seo__p { margin: 0 0 10px; font-size: 13.5px; line-height: 2; color: var(--text-dim); }
.seo__p strong { color: var(--text); }
.seo__ol { margin: 0 0 10px; padding-left: 22px; font-size: 13.5px; line-height: 2; color: var(--text-dim); }
.seo__ol li { margin-bottom: 4px; }
.seo__ol strong { color: var(--text); }
.seo__ol code {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 7px;
  font-size: 12px;
  color: var(--spark);
}
:root[data-theme="light"] .seo__ol code { color: #b26a00; }
.seo__note { margin: 0 0 8px; font-size: 12px; line-height: 1.9; color: var(--text-mut); }
.seo__faq { margin-bottom: 8px; }

/* ---------------- フッター ---------------- */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  margin-top: 30px;
  background: var(--footer-bg);
}
.footer__link { color: var(--ember); font-weight: 700; text-decoration: none; }
.footer__link:hover { text-decoration: underline; }
.footer__inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 30px clamp(16px, 4vw, 40px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 26px;
}
.footer__h { margin: 0 0 12px; font-family: var(--font-ui); font-weight: 800; font-size: 13px; color: var(--spark); letter-spacing: 0.5px; }
.footer__steps, .footer__tips { margin: 0; padding-left: 18px; font-size: 12.5px; line-height: 1.9; color: var(--text-dim); }
.footer__block--brand { display: flex; flex-direction: column; gap: 8px; }
.footer__mark { font-family: var(--font-mark); font-size: 26px; color: var(--ember); }
.footer__note { margin: 0; font-size: 11.5px; color: var(--text-mut); }

/* ---------------- ユーティリティ ---------------- */
.is-hidden { display: none !important; }

/* ---------------- レスポンシブ ---------------- */
@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .preview-panel { position: static; order: -1; }
  .preview-panel .preview { position: relative; }
}

@media (max-width: 480px) {
  .topbar { padding: 12px 14px; gap: 10px; }
  .brand__mark { width: 40px; height: 40px; font-size: 26px; }
  .brand__name { font-size: 20px; }
  .brand__tag { display: none; }
  .topbar__actions { width: 100%; justify-content: space-between; }
  .seg__btn { padding: 7px 10px; }
  .anim-grid { grid-template-columns: repeat(3, 1fr); }
  .tpl-grid { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
  #preview { max-width: 220px; }
  .grid2 { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
