/* ============================================================
   Simple GIF — Main Stylesheet
   Simple PDF / Simple Image と同じ明るいテイスト(白基調 + 青アクセント)
   ============================================================ */

:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --text: #2c3e50;
  --text-muted: #8898a8;
  --text-dim: #b0bec5;

  --primary: #5b8def;
  --primary-hover: #4a7bdc;
  --primary-light: #eef4ff;
  --success: #4caf50;
  --success-hover: #43a047;
  --warn-bg: #fff7e6;
  --warn-border: #f7d68c;
  --warn-text: #6f5400;

  --border: #e0e6ed;
  --border-input: #d0d8e0;
  --border-dashed: #b0c4d8;

  --btn-bg: #f5f7fa;
  --btn-hover: #e9eef5;

  --header-height: 53px;
  --panel-width: 300px;

  --canvas-bg: #1c2530;
  --modal-backdrop: rgba(40, 50, 65, 0.55);
  --toast-bg: rgba(44, 62, 80, 0.95);

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;

  --font-en: 'Inter', sans-serif;
  --font-jp: 'Noto Sans JP', sans-serif;
}

/* ===== Reset ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: var(--font-jp);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: transparent; color: inherit; }
input, select { font-family: inherit; }
img { max-width: 100%; display: block; }

/* ===== Header ===== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  padding: 0 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 16px; }
.back-link {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--primary);
  background: var(--surface);
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s;
}
.back-link:hover { background: var(--primary-light); border-color: var(--primary); }
.brand-title {
  font-family: var(--font-en);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.02em;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.brand-fast { color: var(--primary); }
.brand-sub {
  font-family: var(--font-jp);
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0;
}
.header-actions { display: none; gap: 8px; align-items: center; }
body:has(#screen-edit.is-active) .header-actions { display: flex; }

/* ===== Mobile Notice ===== */
.mobile-notice {
  display: none;
  padding: 10px 16px;
  background: var(--warn-bg);
  border-bottom: 1px solid var(--warn-border);
  color: var(--warn-text);
  font-size: 0.82rem;
  text-align: center;
}
.mobile-notice strong { color: var(--warn-text); }

/* ===== Buttons ===== */
.tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: var(--btn-bg);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 500;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.tool-btn:hover:not(:disabled) { background: var(--btn-hover); border-color: var(--primary); }
.tool-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.tool-btn.is-primary {
  background: var(--success);
  color: #fff;
  border-color: var(--success-hover);
  font-weight: 700;
}
.tool-btn.is-primary:hover:not(:disabled) { background: var(--success-hover); border-color: var(--success-hover); }
.tool-btn__icon { font-size: 0.95rem; line-height: 1; }
.btn-primary {
  padding: 12px 36px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}
.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(91, 141, 239, 0.25);
}

/* ===== Screens ===== */
.screen { display: none; }
.screen.is-active { display: flex; }

/* ===== Screen: Drop ===== */
#screen-drop {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  min-height: calc(100vh - var(--header-height) - 220px);
  padding: 56px 24px 40px;
}
.drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: min(100%, 720px);
  padding: 60px 56px;
  background: var(--surface);
  border: 3px dashed var(--border-dashed);
  border-radius: 18px;
  text-align: center;
  transition: all 0.25s ease;
  cursor: pointer;
}
.drop-zone:hover, .drop-zone.is-hover { border-color: var(--primary); background: var(--primary-light); }
.drop-zone__icon { font-size: 3.6rem; }
.drop-zone__title { font-size: 1.2rem; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.drop-zone__or { color: var(--text-muted); font-size: 0.9rem; margin: 8px 0; }
.drop-zone__hint { font-size: 0.82rem; color: var(--text-muted); margin-top: 10px; max-width: 540px; line-height: 1.7; }
.drop-zone__formats { font-size: 0.75rem; color: var(--text-dim); }

.howto-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 14px;
  width: min(100%, 720px);
}
.howto-strip__step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text);
}
.howto-strip__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
}
.howto-strip__arrow { color: var(--text-dim); font-weight: 700; }

.privacy-note {
  max-width: 640px;
  padding: 16px 28px;
  color: var(--text-muted);
  font-size: 0.88rem;
  text-align: center;
  line-height: 1.85;
}
.privacy-note strong { color: var(--text); font-weight: 700; }
.privacy-note__detail { display: block; margin-top: 4px; font-size: 0.75rem; color: var(--text-dim); }

/* ===== Screen: Edit ===== */
#screen-edit { flex-direction: column; }
.editor {
  display: flex;
  width: 100%;
  height: calc(100vh - var(--header-height));
  min-height: 520px;
}

/* --- 左:ステージ(プレビュー + タイムライン) --- */
.stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg);
  padding: 16px;
  gap: 14px;
}
.preview-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(45deg, #283543 25%, transparent 25%, transparent 75%, #283543 75%, #283543),
    linear-gradient(45deg, #283543 25%, transparent 25%, transparent 75%, #283543 75%, #283543);
  background-color: var(--canvas-bg);
  background-size: 22px 22px;
  background-position: 0 0, 11px 11px;
  border-radius: var(--radius-md);
  overflow: hidden;
  min-height: 0;
}
#frame-canvas {
  position: absolute;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  background: #000;
}
#overlay-canvas { position: absolute; }
.preview-wrap.is-add-mode #overlay-canvas { cursor: crosshair; }
.preview-wrap.is-cropping #overlay-canvas { cursor: crosshair; }

/* --- 切り抜きのルーペ(拡大鏡)--- */
.crop-loupe {
  position: absolute;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.45);
  pointer-events: none;
  z-index: 20;
  display: none;
}
.crop-loupe.is-show { display: block; }

/* --- パネルのアコーディオン --- */
.acc-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  padding: 2px 0;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  text-align: left;
}
.acc-head:hover .acc-title { color: var(--primary); }
.acc-toggle {
  margin-left: auto;
  flex-shrink: 0;
  padding: 4px 12px;
  border: 1px solid var(--border-input);
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--btn-bg);
  white-space: nowrap;
}
.acc-toggle::after { content: "開く ▾"; }
.accordion.is-open .acc-toggle { color: var(--primary); border-color: var(--primary); background: var(--primary-light); }
.accordion.is-open .acc-toggle::after { content: "閉じる ▴"; }
.acc-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--btn-bg);
  border: 1px solid var(--border-input);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.accordion.is-open .acc-num { background: var(--primary); border-color: var(--primary); color: #fff; }
.acc-title { flex: 1; }
.acc-body { display: none; padding-top: 14px; }
.accordion.is-open .acc-body { display: block; }

/* --- 切り抜き:比率ボタン(形＋用途名)--- */
.crop-ratios { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.ratio-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 0.84rem;
  text-align: left;
  transition: background 0.15s, border-color 0.15s;
}
.ratio-btn:hover { background: var(--btn-hover); }
.ratio-btn.is-active { border-color: var(--primary); background: var(--primary-light); }
.ratio-txt { display: flex; flex-direction: column; line-height: 1.35; font-weight: 700; }
.ratio-txt small { font-weight: 400; font-size: 0.7rem; color: var(--text-muted); margin-top: 1px; }
.ratio-shape {
  flex-shrink: 0;
  border: 2px solid var(--text-muted);
  border-radius: 2px;
  background: rgba(91, 141, 239, 0.12);
}
.ratio-btn.is-active .ratio-shape { border-color: var(--primary); background: rgba(91, 141, 239, 0.22); }
.ratio-shape--free { width: 20px; height: 20px; border-style: dashed; background: none; }
.ratio-shape--wide { width: 24px; height: 14px; }
.ratio-shape--tall { width: 13px; height: 22px; }
.ratio-shape--square { width: 18px; height: 18px; }
.crop-actions { display: flex; gap: 8px; }
.crop-actions .tool-btn { flex: 1; justify-content: center; padding: 9px; }

/* キャンバス上のテキスト直接編集(ダブルクリックで出現) */
.ann-inline-input {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 20;
  min-width: 70px;
  max-width: 80%;
  padding: 2px 8px;
  border: 2px solid var(--primary);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.96);
  font-weight: 700;
  font-family: var(--font-jp);
  line-height: 1.25;
  outline: none;
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.35);
}

/* --- タイムライン --- */
.timeline {
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px 14px;
}
.timeline-controls { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.tl-play {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, transform 0.1s;
}
.tl-play:hover { background: var(--primary-hover); }
.tl-play:active { transform: scale(0.94); }
.tl-time { font-family: var(--font-en); font-size: 0.9rem; font-variant-numeric: tabular-nums; color: var(--text); }
.timeline-hint { font-size: 0.74rem; color: var(--text-dim); margin-left: auto; }

.track {
  position: relative;
  height: 46px;
  background: #eef2f7;
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  cursor: pointer;
  user-select: none;
  touch-action: none;
}
.track-trim-mask {
  position: absolute;
  top: 0;
  bottom: 0;
  background: rgba(120, 135, 155, 0.42);
  pointer-events: none;
  z-index: 1;
}
.track-trim-mask--left { left: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.track-trim-mask--right { right: 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
/* 追加した全注釈の「表示する区間」レーン */
.annlane { margin-top: 12px; }
.annlane__title { font-size: 0.74rem; color: var(--text-muted); margin-top: 6px; }
.annlane__body {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 132px;
  overflow-y: auto;
  padding-bottom: 1px;
}
.annlane__guide {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #ff4d4f;
  z-index: 5;
  pointer-events: none;
  transform: translateX(-50%);
}
.annrow__track {
  position: relative;
  height: 20px;
  background: repeating-linear-gradient(90deg, #f3f5f9 0 8px, #eef2f7 8px 16px);
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  touch-action: none;
}
.annband {
  position: absolute;
  top: 2px;
  bottom: 2px;
  background: linear-gradient(180deg, #ffd385, #ffc152);
  border: 1px solid #e0a020;
  border-radius: 4px;
  cursor: grab;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.annband.is-selected {
  background: linear-gradient(180deg, #ffc352, #ffb328);
  border-color: #d98e00;
  box-shadow: 0 0 0 2px rgba(91, 141, 239, 0.55);
}
.annband:active { cursor: grabbing; }
.annband__lab {
  font-size: 0.7rem;
  color: #6b4e00;
  font-weight: 700;
  padding: 0 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}
.annband__grip {
  position: absolute;
  top: -1px;
  bottom: -1px;
  width: 11px;
  background: #e89400;
  cursor: ew-resize;
  z-index: 2;
}
.annband__grip::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2px;
  height: 9px;
  background: rgba(255, 255, 255, 0.9);
  transform: translate(-50%, -50%);
}
.annband__grip--start { left: 0; border-radius: 3px 0 0 3px; }
.annband__grip--end { right: 0; border-radius: 0 3px 3px 0; }
.handle {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 12px;
  background: var(--primary);
  border-radius: 3px;
  z-index: 4;
  cursor: ew-resize;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  transform: translateX(-50%);
}
.handle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2px;
  height: 16px;
  background: rgba(255, 255, 255, 0.85);
  transform: translate(-50%, -50%);
  box-shadow: 3px 0 0 rgba(255,255,255,0.5), -3px 0 0 rgba(255,255,255,0.5);
}
.handle--in { margin-left: 0; }
.playhead {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 2px;
  background: #ff4d4f;
  z-index: 5;
  pointer-events: none;
  transform: translateX(-50%);
}
.playhead::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  width: 11px;
  height: 11px;
  background: #ff4d4f;
  border-radius: 50%;
  transform: translateX(-50%);
}

/* --- 右:操作パネル --- */
.panel {
  width: var(--panel-width);
  flex-shrink: 0;
  background: var(--surface);
  border-left: 1px solid var(--border);
  overflow-y: auto;
  padding: 6px 0 24px;
}
.panel-sec { padding: 16px 18px; border-bottom: 1px solid var(--border); }
.panel-sec--export { border-bottom: none; }
.panel-sec__title { font-size: 0.86rem; font-weight: 700; color: var(--text); margin-bottom: 12px; }
.panel-row { display: flex; gap: 8px; margin-bottom: 10px; }
.panel-row .tool-btn { flex: 1; justify-content: center; }
.panel-empty { font-size: 0.78rem; color: var(--text-dim); line-height: 1.6; }
.panel-hint { font-size: 0.74rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 10px; }
.panel-hint b { color: var(--primary); font-weight: 700; }
.panel-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.panel-field__label { font-size: 0.82rem; color: var(--text-muted); }
.panel-note { font-size: 0.76rem; color: var(--text-muted); line-height: 1.6; margin-top: 6px; }
.panel-note--sub { color: var(--text-dim); margin-top: 10px; }
.panel-export-btn { width: 100%; justify-content: center; padding: 11px; margin-bottom: 10px; font-size: 0.88rem; }

.ctx-select {
  padding: 6px 10px;
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 0.82rem;
}

/* --- 注釈リスト & プロパティ --- */
.ann-list { list-style: none; display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.ann-list:empty { display: none; }
.ann-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.ann-item:hover { background: var(--btn-bg); }
.ann-item.is-selected { border-color: var(--primary); background: var(--primary-light); }
.ann-item__icon { font-size: 0.9rem; }
.ann-item__label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ann-item__del {
  font-size: 0.95rem;
  color: var(--text-dim);
  width: 22px;
  height: 22px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ann-item__del:hover { background: #ffe5e5; color: #d9534f; }

.ann-props {
  margin-top: 12px;
  padding: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ann-props__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ann-props__label { font-size: 0.78rem; color: var(--text-muted); white-space: nowrap; }
.ann-props__text {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}
.ann-props input[type="color"] {
  width: 38px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  background: none;
  cursor: pointer;
}
.ann-props input[type="range"] { flex: 1 1 auto; min-width: 0; }
.ann-props__num {
  width: 48px;
  flex: 0 0 auto;
  padding: 5px 4px;
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  text-align: right;
}
.ann-props__unit { font-size: 0.74rem; color: var(--text-muted); flex: 0 0 auto; }
.ann-props__interval { border-top: 1px dashed var(--border); padding-top: 10px; }
.ann-props__interval-title { font-size: 0.78rem; color: var(--text); font-weight: 600; margin-bottom: 8px; }
.ann-props__interval-row { display: flex; gap: 6px; margin-bottom: 6px; }
.ann-props__interval-row .tool-btn { flex: 1; justify-content: center; font-size: 0.74rem; padding: 5px 6px; }
.ann-props__interval-readout { font-size: 0.74rem; color: var(--text-muted); font-variant-numeric: tabular-nums; }

/* ===== Toast ===== */
.toast {
  position: fixed;
  top: 70px;
  left: 50%;
  z-index: 1000;
  padding: 12px 24px;
  background: var(--toast-bg);
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 0.85rem;
  line-height: 1.5;
  box-shadow: 0 6px 24px rgba(40, 50, 65, 0.25);
  opacity: 0;
  transform: translate(-50%, -8px);
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  max-width: min(560px, 92vw);
  white-space: normal;
  word-break: break-word;
  text-align: center;
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* ===== Modal ===== */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  background: var(--modal-backdrop);
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-backdrop.is-show { display: flex; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 540px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(40, 50, 65, 0.35);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}
.modal-header--center { justify-content: center; }
.modal-title { font-size: 1rem; font-weight: 700; color: var(--text); }
.modal-close {
  font-size: 1.4rem;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: background 0.15s, color 0.15s;
}
.modal-close:hover { background: var(--btn-hover); color: var(--text); }
.modal-body { padding: 22px; overflow-y: auto; flex: 1; font-size: 0.9rem; color: var(--text); line-height: 1.8; }
.modal-body--center { text-align: center; }
.modal-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  background: #fafbfc;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* --- 書き出し進捗 --- */
.modal--export { width: 420px; max-width: 92vw; }
.export-status { font-size: 0.9rem; color: var(--text); margin-bottom: 14px; }
.export-hint { font-size: 0.76rem; color: var(--text-dim); margin-top: 12px; }
.progress {
  width: 100%;
  height: 10px;
  background: var(--btn-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar { height: 100%; width: 0%; background: var(--primary); border-radius: 999px; transition: width 0.15s ease; }

/* ===== フィードバックモーダル & フッター常設リンク ===== */
.site-footer__counter {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.sf-counter { padding: 6px 14px; border-radius: 8px; border: 1px solid; }
.sf-counter--tool {
  background: linear-gradient(180deg, rgba(91,141,239,0.10), rgba(91,141,239,0.04));
  border-color: rgba(91, 141, 239, 0.25);
  color: #4a6fb8;
}
.sf-counter--total {
  background: linear-gradient(180deg, rgba(255,179,40,0.13), rgba(255,179,40,0.05));
  border-color: rgba(255, 179, 40, 0.35);
  color: #a87000;
}
.site-footer__feedback { display: flex; justify-content: center; margin-bottom: 16px; }
.footer-feedback {
  display: inline-block;
  padding: 8px 18px;
  background: var(--primary-light);
  color: var(--primary) !important;
  border: 1px solid #c9dcf7;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none !important;
  transition: background 0.2s, transform 0.15s;
}
.footer-feedback:hover { background: #dfecff; transform: translateY(-1px); }

.modal--feedback { width: 480px; max-width: 92vw; }
.feedback-intro { margin-bottom: 16px; line-height: 1.8; font-size: 0.92rem; }
.feedback-block__title { font-size: 0.92rem; color: var(--text); margin-bottom: 8px; font-weight: 700; line-height: 1.6; }
.feedback-block__body { font-size: 0.84rem; color: var(--text); line-height: 1.8; margin-bottom: 14px; }
.feedback-block__body strong { color: var(--primary); }
.feedback-block__note { font-size: 0.74rem; color: var(--text-dim); line-height: 1.6; margin-bottom: 14px; }
.feedback-cta {
  display: block;
  text-align: center;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 700;
  transition: background 0.2s, transform 0.15s;
}
.feedback-cta--primary { background: var(--primary); color: #fff; }
.feedback-cta--primary:hover { background: var(--primary-hover); transform: translateY(-1px); }
.feedback-cta--secondary { background: var(--btn-bg); color: var(--text); border: 1px solid var(--border-input); font-weight: 500; }
.feedback-cta--secondary:hover { background: var(--btn-hover); border-color: var(--primary); }
.feedback-divider { border-top: 1px solid var(--border); margin-top: 22px; padding-top: 18px; }
.feedback-divider__text { font-size: 0.82rem; color: var(--text); line-height: 1.7; margin-bottom: 12px; }

/* ===== Site Footer ===== */
.site-footer { padding: 26px 24px; background: var(--surface); border-top: 1px solid var(--border); text-align: center; }
.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 20px;
  margin-bottom: 12px;
  font-size: 0.82rem;
}
.site-footer__links a { color: var(--primary); transition: color 0.2s; display: inline-flex; align-items: center; gap: 4px; }
.site-footer__links a:hover { color: var(--primary-hover); }
.site-footer__copy { font-size: 0.75rem; color: var(--text-dim); font-family: var(--font-en); }

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .mobile-notice { display: block; }
  .editor { flex-direction: column; height: auto; }
  .panel { width: 100%; border-left: none; border-top: 1px solid var(--border); }
  .stage { height: 60vh; }
  .timeline-hint { display: none; }
}
