:root {
  --bg: #15161a;
  --panel: #1f2126;
  --line: #2f323a;
  --text: #f1ede6;
  --muted: #a39d94;
  --accent: #e8a24a;      /* 遊牧民ちゃんのポンチョの琥珀色 */
  --accent-2: #2e8f99;    /* ティール */
  --tile-radius: 12px;
  --bar-h: 176px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text);
  font-family: "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", Meiryo, system-ui, sans-serif;
  -webkit-text-size-adjust: 100%; }
body { padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom)); }

.top { padding: 20px 16px 8px; max-width: 1100px; margin: 0 auto; }
.top h1 { font-size: 22px; margin: 0 0 6px; letter-spacing: .02em; }
.top .lead { margin: 0 0 6px; color: var(--text); font-size: 15px; }
.top .count-users { display: inline-block; margin-left: 8px; padding: 2px 10px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line); color: var(--accent); font-size: 13px; font-weight: 700; }
.top .count-users:empty { display: none; }
.top .how { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.top .how.warn { margin-top: 6px; color: #e9c48a; }
.top .how.warn strong { color: var(--accent); }
.top .how.tip { margin-top: 6px; }
.top .how.tip strong { color: var(--text); }
.top .how.tip a { color: var(--accent); }

.decomp { margin-top: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.decomp summary { cursor: pointer; padding: 10px 12px; font-size: 14px; font-weight: 600; list-style: none; }
.decomp summary::-webkit-details-marker { display: none; }
.decomp summary::before { content: "▸ "; color: var(--accent); }
.decomp[open] summary::before { content: "▾ "; }
.decomp ol { margin: 0; padding: 0 14px 12px 32px; font-size: 13px; line-height: 1.6; }
.decomp li { margin: 6px 0; }
.decomp .note { color: var(--muted); margin-left: 6px; }
.decomp textarea { width: 100%; margin-top: 6px; font: inherit; font-size: 13px; padding: 8px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--bg); color: var(--text); resize: vertical; }
button.mini { font: inherit; font-size: 14px; min-height: 40px; padding: 0 14px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--bg); color: var(--text); cursor: pointer; }
button.mini.primary { background: var(--accent); color: #1a1408; border-color: var(--accent); font-weight: 700; }
button.mini:disabled { opacity: .55; cursor: wait; }

.fmt { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.fmt button { font: inherit; font-size: 13px; min-height: 36px; padding: 0 12px; border: 0; background: var(--panel);
  color: var(--muted); cursor: pointer; }
.fmt button.on { background: var(--accent-2); color: #fff; }

.tile.custom { border-style: dashed; border-color: var(--accent-2); }
.tile.custom .lab { font-size: 12px; color: var(--text); }

main { max-width: 1100px; margin: 0 auto; padding: 4px 12px 16px; }
section.cat { margin: 18px 0 6px; }
.cat h2 { font-size: 16px; margin: 0 0 8px 4px; display: flex; align-items: center; gap: 10px; }
.cat h2 .pick { font-size: 13px; color: var(--accent); font-weight: normal; }
.cat h2 .pick:empty::before { content: "未選択"; color: var(--muted); }
/* 見出しを押すと畳む/開く */
.foldbar { max-width: 1100px; margin: 10px auto 0; padding: 0 16px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.foldbar .note { color: var(--muted); font-size: 13px; margin-right: auto; }
.foldbar .mini { min-height: 36px; font-size: 13px; }
.foldbar .clearall { border-color: var(--accent); color: var(--accent); }
.cat h2 .fold { font: inherit; font-weight: 700; color: inherit; background: none; border: 0; padding: 6px 4px 6px 0;
  cursor: pointer; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; }
.cat h2 .fold .n { font-size: 12px; color: var(--muted); font-weight: normal; }
.cat h2 .chev { width: 9px; height: 9px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(45deg); transition: transform .12s; margin-top: -3px; }
.cat.closed h2 .chev { transform: rotate(-45deg); margin-top: 2px; }
.cat.closed .grid { display: none; }
.cat.closed { margin-bottom: 0; border-bottom: 1px solid var(--line); }

/* 末尾のアンケート(Google フォーム埋め込み。2026-09-15) */
.survey { margin: 48px auto 24px; max-width: 720px; padding: 0 12px; }
.survey details { border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; background: var(--panel); }
.survey summary { cursor: pointer; font-size: 18px; font-weight: 700; list-style: none; }
.survey summary::-webkit-details-marker { display: none; }
.survey summary::before { content: "▸ "; color: var(--accent); }
.survey details[open] summary::before { content: "▾ "; }
.survey .note { margin: 10px 0 14px; color: var(--muted); font-size: 13px; }
.survey a { color: var(--accent-2); }
.survey iframe { max-width: 640px; display: block; margin: 0 auto; background: #fff; border-radius: 8px; }
.survey a.survey-open { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 10px;
  background: var(--accent); color: #1a1408; font-weight: 700; text-decoration: none; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
@media (min-width: 600px) { .grid { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); } }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); } }

.tile { position: relative; border: 3px solid transparent; border-radius: var(--tile-radius);
  background: var(--panel); padding: 0; cursor: pointer; overflow: hidden; color: inherit;
  text-align: left; -webkit-tap-highlight-color: transparent; min-height: 44px;
  transition: transform .08s ease, border-color .12s ease; }
.tile:active { transform: scale(.97); }
.tile img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; background: #000; }
.tile .thumb { display: block; width: 100%; aspect-ratio: 3 / 4; background-repeat: no-repeat; background-color: #000; }
.tile .noimg { aspect-ratio: 3 / 4; display: grid; place-items: center; color: var(--muted); font-size: 12px; }
.tile .lab { display: block; padding: 6px 8px 7px; font-size: 13px; line-height: 1.3; }
.tile .hint { display: block; margin-top: 2px; font-size: 11px; line-height: 1.3; color: var(--muted); }
.tile.on { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(232,162,74,.25); }
.tile.on::after { content: "✓"; position: absolute; top: 6px; right: 6px; width: 24px; height: 24px;
  border-radius: 50%; background: var(--accent); color: #1a1408; font-weight: 700;
  display: grid; place-items: center; font-size: 15px; }
.tile:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

.bar { position: fixed; left: 0; right: 0; bottom: 0; background: rgba(21,22,26,.96);
  border-top: 1px solid var(--line); backdrop-filter: blur(8px);
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); }
.bar-in { max-width: 1100px; margin: 0 auto; }
.bar-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.custom-slot:empty { display: none; }
.bar-title { font-size: 14px; font-weight: 600; }
.count { color: var(--muted); font-weight: normal; font-size: 12px; }
.free { flex: 1; min-width: 180px; }
.free input { width: 100%; font: inherit; font-size: 14px; padding: 8px 10px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--panel); color: var(--text); }
textarea#out { width: 100%; font: inherit; font-size: 14px; line-height: 1.5; padding: 10px;
  border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--text);
  resize: none; }
.btns { display: flex; gap: 8px; margin-top: 8px; }
.btns button { font: inherit; font-size: 16px; min-height: 48px; padding: 0 18px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; }
.btns button.primary { flex: 1; background: var(--accent); color: #1a1408; border-color: var(--accent);
  font-weight: 700; }
.btns button:active { transform: scale(.98); }

.toast { position: fixed; left: 50%; bottom: calc(var(--bar-h) + 16px); transform: translateX(-50%) translateY(20px);
  background: var(--accent-2); color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 14px;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: 92vw; text-align: center; }
@media (max-width: 599px) { :root { --bar-h: 232px; } }
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---- 動画版: 全体 / カットの2層 ---- */
.layer { max-width: 1100px; margin: 18px auto 0; padding: 0 16px; }
.layer h2.layer-title { font-size: 18px; margin: 0 0 4px; display: flex; align-items: center; gap: 10px; }
.layer h2.layer-title .badge { font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px;
  background: var(--accent-2); color: #fff; }
.layer h2.layer-title .badge.g { background: var(--accent); color: #1a1408; }
.layer .desc { margin: 0 0 8px; color: var(--muted); font-size: 13px; }
/* タイムライン(カットの札を横に並べる) */
.timeline { display: flex; gap: 8px; overflow-x: auto; padding: 8px 2px 10px; scroll-snap-type: x proximity; }
.shotcard { flex: 0 0 auto; width: 140px; border: 2px solid var(--line); border-radius: 10px; background: var(--panel);
  color: var(--text); text-align: left; padding: 0; cursor: pointer; overflow: hidden; scroll-snap-align: start; position: relative;
  transition: transform .1s ease, border-color .12s ease; }
.shotcard .th { width: 100%; aspect-ratio: 4 / 3; background: #000 center / cover no-repeat; display: grid; place-items: center;
  color: var(--muted); font-size: 12px; position: relative; }
.shotcard .th .cnt { position: absolute; right: 5px; bottom: 5px; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px;
  background: rgba(21,22,26,.85); color: var(--text); border: 1px solid var(--line); }
.shotcard .th .nowtag { position: absolute; left: 0; top: 0; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 0 0 8px 0;
  background: var(--accent); color: #1a1408; }
.shotcard .meta { padding: 6px 8px 8px; font-size: 12px; line-height: 1.4; }
.shotcard .meta b { display: block; font-size: 13px; }
.shotcard .meta .tr { color: var(--accent-2); }
.shotcard.empty { border-style: dashed; }
.shotcard.empty .th { background: repeating-linear-gradient(45deg, #17181c 0 8px, #1c1d22 8px 16px); }
.shotcard.on { border-color: var(--accent); border-style: solid; box-shadow: 0 0 0 3px rgba(232,162,74,.35), 0 6px 18px rgba(0,0,0,.45); transform: translateY(-2px); }
.shotcard.on .meta { background: rgba(232,162,74,.16); }
.shotcard.on .meta b { color: var(--accent); }
.shotcard.on .th .cnt { background: var(--accent); color: #1a1408; border-color: var(--accent); }
.clipmark { flex: 0 0 auto; width: 6px; border-radius: 3px; background: var(--accent-2); opacity: .8; align-self: stretch; }
/* 入口(カット層の先頭): 大きな「＋ カットを足す」1つと、参考動画からの取り込み */
.entry { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 6px 0 4px; }
.entry .big-add { font: inherit; font-size: 17px; font-weight: 700; min-height: 52px; padding: 0 22px; border-radius: 12px; cursor: pointer;
  background: var(--accent); color: #1a1408; border: 2px solid var(--accent); box-shadow: 0 4px 14px rgba(232,162,74,.25); }
.entry .big-add:active { transform: scale(.98); }
.entry .big-alt { font: inherit; font-size: 14px; font-weight: 600; min-height: 52px; padding: 0 16px; border-radius: 12px; cursor: pointer;
  background: var(--panel); color: var(--text); border: 2px solid var(--line); }
.entry .note { color: var(--muted); font-size: 12px; }
@media (max-width: 599px) { .entry .big-add { flex: 1 1 100%; } .entry .big-alt { flex: 1 1 auto; } }
/* 今どのカットを決めているか(琥珀の帯) */
.editing { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 4px 0 8px; padding: 8px 10px; border-radius: 10px;
  background: rgba(232,162,74,.12); border: 1px solid rgba(232,162,74,.45); }
.editing .cur { font-weight: 700; margin-right: auto; font-size: 14px; }
.editing .cur .pill { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--accent); color: #1a1408; margin-right: 4px; }
.editing .cur small { font-weight: normal; color: var(--muted); font-size: 12px; }
.editing .tools { display: flex; gap: 6px; flex-wrap: wrap; }
.editing .mini { min-height: 34px; font-size: 13px; padding: 0 10px; }
.editing .mini.danger { color: #e08a8a; }
.editing .mini.on { background: var(--accent-2); color: #fff; border-color: var(--accent-2); }
/* 使い方の3歩(ヘッダ) */
.steps { display: flex; gap: 6px; align-items: stretch; margin: 6px 0 2px; }
.steps .arrow { align-self: center; color: var(--muted); font-size: 16px; }
.steps .step { flex: 1 1 0; display: flex; align-items: center; gap: 8px; font: inherit; text-align: left; cursor: pointer; min-height: 48px;
  padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--text); }
.steps .step .n { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px;
  background: var(--line); color: var(--text); }
.steps .step .t { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.steps .step .t b { font-size: 14px; }
.steps .step .t small { font-size: 11px; color: var(--muted); }
.steps .step.now { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(232,162,74,.25); }
.steps .step.now .n { background: var(--accent); color: #1a1408; }
.steps .step.done .n { background: var(--accent-2); color: #fff; }
.steps .step.done .n::before { content: "✓"; }
.steps .step.done .n { font-size: 0; }
.steps .step.done .n::before { font-size: 14px; }
@media (max-width: 599px) {
  .steps { gap: 4px; }
  .steps .step { flex-direction: column; justify-content: center; padding: 6px 2px; gap: 3px; min-height: 58px; }
  .steps .step .n { width: 22px; height: 22px; font-size: 12px; }
  .steps .step .t { align-items: center; } .steps .step .t small { display: none; } .steps .step .t b { font-size: 12px; white-space: nowrap; }
  .steps .arrow { font-size: 12px; }
}
.btns button.primary.flash, .entry .big-add.flash { animation: flash .4s ease 3; }
/* ---- 2026-09-17 1本の線: Clip の札と、間の「つなぎ」の小さな札 ---- */
.shotcard .meta .over { color: #ff9c8a; }
.jointcard { flex: 0 0 auto; width: 96px; align-self: center; border: 2px dashed var(--line); border-radius: 10px; background: var(--panel);
  color: var(--text); text-align: left; padding: 0; cursor: pointer; overflow: hidden; position: relative; margin: 0 -2px; }
.jointcard .th { width: 100%; aspect-ratio: 4 / 3; background: #000 center / cover no-repeat; position: relative; }
.jointcard .th .nowtag { position: absolute; left: 0; top: 0; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 0 0 8px 0; background: var(--accent-2); color: #fff; }
.jointcard .meta { padding: 4px 6px 6px; font-size: 11px; line-height: 1.3; color: var(--muted); }
.jointcard .meta b { display: block; font-size: 11px; color: var(--accent-2); }
.jointcard .meta .tr { color: var(--text); }
.jointcard.on { border-style: solid; border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(46,143,153,.35); }
.jointcard.on .meta { background: rgba(46,143,153,.16); color: var(--text); }
.editing.joint { background: rgba(46,143,153,.12); border-color: rgba(46,143,153,.5); }
.editing.joint .cur .pill { background: var(--accent-2); color: #fff; }
/* Clip の中の場面(上級者用のチップ) */
.scenes { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 0 0 6px; }
.scenes .note { font-size: 12px; color: var(--muted); }
.chip { font: inherit; font-size: 13px; min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; }
.chip.on { background: var(--accent); color: #1a1408; border-color: var(--accent); font-weight: 700; }
button.mini.ghost { border-style: dashed; color: var(--muted); font-size: 12px; min-height: 32px; }
button.mini.ghost.danger { color: #e08a8a; }
.layer h3.sub { font-size: 15px; margin: 18px 0 0; padding-top: 12px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.layer h3.sub .badge { font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--accent-2); color: #fff; }
.layer h3.sub .badge.g { background: var(--accent); color: #1a1408; }
.layer h3.sub .note { font-size: 12px; color: var(--muted); font-weight: normal; }
.layer h3.sub .inherit { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); cursor: pointer; font-size: 13px; font-weight: normal; }
.layer h3.sub .inherit input { width: 18px; height: 18px; accent-color: var(--accent); }
/* つなぎの設定(秒数・向き) */
.jopts { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 10px; }
.jrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.jrow .jl { font-size: 13px; font-weight: 700; min-width: 3em; }
.jrow .note { font-size: 12px; color: var(--muted); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { font: inherit; font-size: 13px; min-height: 38px; padding: 0 12px; border: 0; background: var(--panel); color: var(--muted); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--accent-2); color: #fff; }

/* ---- 2026-09-17 3列: 左=線(固定) / 中=絵(スクロール) / 右=できた文(固定)。狭い画面は 線を上に貼り付け・文を下に固定 ---- */
.app { display: block; }
/* ---- 2026-09-17 夕: 線は横長の帯(広い画面は下に固定、狭い画面は上に貼り付け)。文は広い画面では右の列 ---- */
.strip { z-index: 5; background: rgba(21,22,26,.97); backdrop-filter: blur(6px); display: flex; gap: 8px; align-items: stretch; padding: 6px 10px; }
.strip .entry { flex: 0 0 auto; flex-direction: column; gap: 6px; margin: 0; justify-content: center; }
.strip .entry .big-add, .strip .entry .big-alt { min-height: 0; padding: 6px 12px; font-size: 14px; line-height: 1.2; display: flex; flex-direction: column; align-items: flex-start; border-radius: 10px; flex: 1 1 0; }
.strip .entry .big-add small, .strip .entry .big-alt small { font-size: 11px; font-weight: normal; opacity: .85; }
.strip .timeline { flex: 1 1 auto; min-width: 0; padding: 2px 2px 4px; align-items: stretch; touch-action: pan-x; }
.strip .shotcard { width: 112px; }
.strip .shotcard .th, .strip .jointcard .th { aspect-ratio: 16 / 9; }
.strip .shotcard .meta { padding: 3px 6px 5px; font-size: 11px; }
.strip .shotcard .meta b { font-size: 11px; }
.strip .shotcard .meta .tr { display: none; }
.strip .jointcard { width: 72px; }
.strip .shotcard .th .cnt { font-size: 10px; padding: 1px 5px; }
.strip .shotcard .th .nowtag, .strip .jointcard .th .nowtag { font-size: 10px; padding: 2px 6px; }
.strip-hint { position: absolute; left: 50%; top: -16px; transform: translateX(-50%); font-size: 12px; font-weight: 700; padding: 4px 14px; border-radius: 999px;
  background: var(--accent); color: #1a1408; white-space: nowrap; box-shadow: 0 4px 12px rgba(0,0,0,.4); }
/* 入れ替え(2段階): 札の角の「↔」か長押しか「移動」で「どこへ?」の状態にし、行き先の札を押す */
.shotcard .th .grab, .jointcard .th .grab { position: absolute; left: 4px; bottom: 4px; width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center;
  font-size: 15px; font-weight: 700; background: rgba(21,22,26,.85); color: var(--text); border: 1px solid var(--line); cursor: grab; }
.shotcard .th .grab:hover, .jointcard .th .grab:hover { background: var(--accent); color: #1a1408; border-color: var(--accent); }
.jointcard .th .grab { width: 22px; height: 22px; font-size: 13px; }
.timeline .moving { outline: 3px solid var(--accent); outline-offset: 2px; opacity: .7; }
.timeline .target { animation: pulse 1s ease-in-out infinite; cursor: copy; }
.timeline.movemode .shotcard:not(.target):not(.moving), .timeline.movemode .jointcard:not(.target):not(.moving) { opacity: .35; }
@keyframes pulse { 50% { box-shadow: 0 0 0 4px rgba(232,162,74,.6); } }
.shotcard, .jointcard { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
@media (max-width: 1099px) {
  .strip { position: sticky; top: 0; border-bottom: 1px solid var(--line); }
  .strip .entry { width: 92px; }
  .strip .entry .big-add, .strip .entry .big-alt { font-size: 12px; padding: 4px 8px; }
  .strip .entry .big-add small, .strip .entry .big-alt small { display: none; }
  .strip .shotcard { width: 100px; }
  .strip .jointcard { width: 64px; }
}
@media (min-width: 1100px) {
  .top { max-width: 1500px; }
  .app { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; max-width: 1500px; margin: 8px auto 0; padding: 0 12px; align-items: start; }
  .center { min-width: 0; }
  .center .layer { padding: 0; margin: 0; max-width: none; }
  .center .foldbar { padding: 0; }
  .center #layer-line .dialog { margin: 0 0 10px; }
  .strip { position: fixed; left: 0; right: 0; bottom: 0; border-top: 1px solid var(--line); padding: 8px 14px calc(8px + env(safe-area-inset-bottom)); }
  .strip .entry { width: 170px; }
  /* できた文は右の列に置く(下に固定しない) */
  .side.right { position: sticky; top: 8px; max-height: calc(100vh - var(--strip-h, 150px) - 16px); overflow-y: auto; }
  .side.right .bar { position: static; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; backdrop-filter: none; padding: 12px; }
  .side.right .bar-head { flex-direction: column; align-items: stretch; gap: 8px; }
  .side.right .fmt { align-self: flex-start; }
  .side.right textarea#out { height: calc(100vh - var(--strip-h, 150px) - 330px); min-height: 160px; font-size: 13px; }
  .side.right .btns { flex-wrap: wrap; }
  .side.right .btns button { font-size: 14px; min-height: 44px; padding: 0 12px; }
  .side.right .btns button.primary { flex: 1 1 100%; }
  .toast { bottom: calc(var(--strip-h, 150px) + 16px); }
}
@keyframes flash { 50% { box-shadow: 0 0 0 6px rgba(232,162,74,.45); } }
.dialog { margin: 8px 0 2px; }
.dialog label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.dialog input { width: 100%; font: inherit; font-size: 14px; padding: 8px 10px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--panel); color: var(--text); }
.clipnote { color: var(--muted); font-size: 12px; margin: 2px 0 0; }
.fmt button.on.flow { background: #1a73e8; }
/* 8秒ごとのタブ(Flow の時だけ) */
.cliptabs { display: flex; gap: 6px; overflow-x: auto; padding: 0 0 6px; margin-bottom: 4px; }
.cliptab { flex: 0 0 auto; font: inherit; font-size: 13px; min-height: 40px; padding: 4px 12px; border-radius: 8px 8px 0 0;
  border: 1px solid var(--line); border-bottom: 0; background: var(--panel); color: var(--muted); cursor: pointer;
  display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; }
.cliptab .nm { font-weight: 700; color: var(--text); }
.cliptab small { font-size: 11px; }
.cliptab.on { background: #1a73e8; border-color: #1a73e8; color: #fff; }
.cliptab.on .nm { color: #fff; }
.cliptab.tool { border-radius: 8px; border-bottom: 1px solid var(--line); justify-content: center; color: var(--accent); }
.cliptab.tool.add { border-style: dashed; border-color: var(--accent); }
.ghead { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 2px 0 6px; font-size: 13px; }
.ghead .cur { font-weight: 700; }
.ghead .inherit { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--panel); cursor: pointer; }
.ghead .inherit input { width: 18px; height: 18px; accent-color: var(--accent); }
.shot-tools .mini.on { background: var(--accent-2); color: #fff; border-color: var(--accent-2); }
