/* トンマナ: TBS「THE TIME,」（https://www.tbs.co.jp/thetime_tbs/）に準拠。
   ブランドの濃いブルー×ビビッドイエローの2トーンと、ダークスレートの文字色、
   淡いラベンダーグレーの背景を基調にしている。 */
:root {
  --blue: #0050ff;
  --cyan: #00bcd4;
  --magenta: #d500f9;
  --yellow: #ffd400;
  --bg: #f5f5fa;
  --card: #ffffff;
  --text: #3b3f4a;
  --muted: #6b7480;
  --border: #e1e5ec;
  --dark: #33363b;
  --radius: 14px;
}

/* TBSゴシック（TBSフォント）：ログインした 人だけが よみこめる（/fonts/ は サーバーで ログイン必須） */
@font-face { font-family: "TBS Gothic"; src: url("/fonts/TBSGothicTP-Medium.otf") format("opentype"); font-weight: 100 599; font-display: swap; }
@font-face { font-family: "TBS Gothic"; src: url("/fonts/TBSGothicTP-Bold.otf") format("opentype"); font-weight: 600 1000; font-display: swap; }

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "TBS Gothic", "Noto Sans JP", "Hiragino Sans", "Yu Gothic", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: var(--blue);
  border-bottom: 4px solid var(--yellow);
  color: white;
  flex-wrap: wrap;
  gap: 10px;
}
.brand { color: white; font-weight: 800; font-size: 1.15rem; text-decoration: none; }
.app-nav { display: flex; gap: 18px; }
.app-nav a { color: white; text-decoration: none; font-weight: 600; opacity: 0.92; }
.app-nav a:hover { opacity: 1; text-decoration: underline; }

.app-main { max-width: min(2400px, 98vw); margin: 0 auto; padding: 18px 14px 40px; min-height: 70vh; }

h1 { font-size: 1.5rem; margin-bottom: 4px; }
h2 { font-size: 1.2rem; }
.subtitle { color: var(--muted); margin-top: 0; margin-bottom: 24px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 18px;
  box-shadow: 0 2px 10px rgba(20, 30, 60, 0.04);
}

.genre-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.genre-card {
  border-radius: var(--radius);
  padding: 22px 16px;
  text-align: center;
  font-weight: 700;
  font-size: 1.1rem;
  color: white;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.genre-card:hover:not(:disabled) { transform: translateY(-3px); }
.genre-card:disabled { opacity: 0.45; cursor: not-allowed; }
.genre-card .emoji { display: block; font-size: 2rem; margin-bottom: 8px; }
.genre-card-label { display: block; line-height: 1.4; }
.genre-card-desc { display: block; margin-top: 6px; font-size: 0.78rem; font-weight: 400; opacity: 0.88; line-height: 1.4; }
/* 「どういう動画を作る？」の10種類——それぞれ見分けやすいよう色を分ける。 */
.genre-classroom-favorite { background: linear-gradient(135deg, var(--blue), var(--cyan)); }
.genre-teacher-interview { background: linear-gradient(135deg, #1e3a8a, #3b82f6); }
.genre-club-intro { background: linear-gradient(135deg, #ff7043, var(--magenta)); }
.genre-duty-intro { background: linear-gradient(135deg, #43a047, #1de9b6); }
.genre-committee-intro { background: linear-gradient(135deg, #0f766e, #134e4a); }
.genre-lesson-summary { background: linear-gradient(135deg, #455a64, #263238); }
.genre-summer-vlog { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.genre-self-intro { background: linear-gradient(135deg, #a855f7, #ec4899); }
.genre-today-discovery { background: linear-gradient(135deg, #06b6d4, #3b82f6); }
.genre-dance30 { background: linear-gradient(135deg, #d6336c, #ff7043); }
.genre-note { margin-top: 6px; font-size: 0.8rem; opacity: 0.85; }
/* 選べるものがタップで確定ではなく「後で次へ」で進む場面（音楽・まほうの
   試聴など）向けに、選択中だと分かる枠を付ける。 */
.genre-card.selected { outline: 4px solid #fff; outline-offset: -4px; }

/* ---------- 初心者モード：会話形式で進む編集フロー ---------- */
.beginner-flow { max-width: 900px; }
#bf-back { margin-bottom: 12px; }
.bf-material-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-bottom: 16px; }
.bf-material-card {
  position: relative; border: 3px solid transparent; border-radius: var(--radius); overflow: hidden;
  padding: 0; cursor: pointer; background: #000; aspect-ratio: 16 / 9;
}
.bf-material-card video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.bf-material-card.selected { border-color: var(--blue); }
.bf-material-badge[hidden] { display: none; }
.bf-material-badge {
  position: absolute; top: 6px; left: 6px; min-width: 24px; height: 24px; border-radius: 50%;
  background: var(--blue); color: #fff; font-weight: 800; font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}

/* ---------- カード交換モード：カットカード（もくてき／サイズ／ワーク） ---------- */
.cutcard-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin: 16px 0; }
.cutcard-item { background: var(--card); border: 2px solid var(--border); border-radius: var(--radius); padding: 14px; }
.cutcard-item-cards { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.cutcard-chip { padding: 3px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; color: #fff; }
.cutcard-chip.purpose { background: #e03131; }
.cutcard-chip.size { background: #1971c2; }
.cutcard-chip.work { background: #f08c00; }
.cutcard-purpose-row { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; }
.cutcard-purpose-btn {
  padding: 4px 9px; border-radius: 999px; border: 1.5px solid #e03131; background: #fff;
  color: #e03131; font-size: 0.74rem; font-weight: 700; cursor: pointer;
}
.cutcard-purpose-btn.selected { background: #e03131; color: #fff; }
.cutcard-item-meta { font-size: 0.8rem; color: var(--muted); margin-bottom: 10px; }
.cutcard-item-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.cutcard-slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin: 16px 0; }
.cutcard-slot {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 10px;
  border: 3px solid var(--border); border-radius: var(--radius); background: var(--card); cursor: pointer;
}
.cutcard-slot.active { box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08) inset; }
.cutcard-slot-label { font-size: 0.75rem; font-weight: 800; }
.cutcard-slot-value { font-size: 1rem; font-weight: 700; }

.cutcard-camera-wrap {
  position: relative; width: 100%; max-width: 640px; aspect-ratio: 16 / 9; background: #000;
  border-radius: var(--radius); overflow: hidden; margin: 0 auto 16px;
}
.cutcard-camera-wrap video { width: 100%; height: 100%; object-fit: cover; }
.cutcard-camera-guide {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  border: 3px dashed rgba(255, 255, 255, 0.85); border-radius: 10px;
  display: flex; align-items: center; justify-content: center; pointer-events: none;
}
.cutcard-camera-arrow { font-size: 2.5rem; filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.6)); }
.cutcard-camera-tip {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 8px 12px;
  background: rgba(0, 0, 0, 0.55); color: #fff; font-size: 0.85rem;
}
/* ---------- カットカード撮影ボード（だいほん／さつえい／へんしゅう） ---------- */
.cutcard-chip.empty { background: #fff; color: var(--muted); border: 1.5px dashed var(--border); }
.cut-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.cut-title-row label { font-weight: 800; }
.cut-title-row input { flex: 1 1 220px; min-height: 44px; font-size: 1rem; padding: 6px 12px; border: 2px solid var(--border); border-radius: 10px; }
.cut-pattern-tag { font-weight: 700; color: var(--muted); }
.cut-section-title { font-size: 1.05rem; margin: 8px 0 10px; }
.cut-section-title .hint { font-size: 0.8rem; font-weight: 600; }

.cut-limit { background: var(--card); border: 2px solid var(--border); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 14px; }
.cut-limit-text { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin-bottom: 6px; }
.cut-limit-rest { margin-left: auto; font-weight: 700; color: #2b8a3e; }
.cut-limit-track { height: 14px; background: #edf0f5; border-radius: 999px; overflow: hidden; }
.cut-limit-fill { height: 100%; background: linear-gradient(90deg, #40c057, #2b8a3e); border-radius: 999px; transition: width 0.2s; }
.cut-limit.over { border-color: #e03131; }
.cut-limit.over .cut-limit-rest { color: #e03131; }
.cut-limit.over .cut-limit-fill { background: #e03131; }

.cut-pattern-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin: 16px 0; }
.cut-pattern {
  display: flex; flex-direction: column; gap: 6px; align-items: flex-start; text-align: left; padding: 16px;
  background: var(--card); border: 3px solid var(--border); border-radius: var(--radius); cursor: pointer; font: inherit; color: inherit;
}
.cut-pattern:hover, .cut-pattern:focus-visible { border-color: #e03131; }
.cut-pattern-emoji { font-size: 2rem; }
.cut-pattern-name { font-weight: 800; font-size: 1.1rem; }
.cut-pattern-flow { font-size: 0.82rem; color: var(--muted); line-height: 1.5; }
.cut-pattern-total { font-size: 0.82rem; font-weight: 700; }

.cut-plan-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 860px) { .cut-plan-layout { grid-template-columns: 1fr; } }
.cut-script-list { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cut-script-row { background: var(--card); border: 2px solid var(--border); border-radius: var(--radius); padding: 10px 12px; cursor: pointer; }
.cut-script-row.active { border-color: #343a40; box-shadow: 0 0 0 3px rgba(52, 58, 64, 0.12); }
.cut-script-row.ready { border-left: 6px solid #40c057; }
.cut-script-head, .cut-script-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cut-script-num {
  display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 28px; border-radius: 50%;
  background: #343a40; color: #fff; font-weight: 800; font-size: 0.9rem;
}
.cut-script-stars { margin-left: auto; font-weight: 800; color: #f08c00; }
.cut-script-takes { font-size: 0.8rem; color: var(--muted); margin-top: 6px; }
.cut-subject-toggle { display: flex; gap: 4px; flex-wrap: wrap; }
.cut-subject-btn, .cut-mini-btn, .cut-take-btn {
  min-height: 44px; min-width: 44px; padding: 4px 10px; border-radius: 10px; border: 2px solid var(--border);
  background: #fff; font: inherit; font-size: 0.85rem; font-weight: 700; cursor: pointer; color: var(--text);
}
.cut-subject-btn.selected, .cut-take-btn.selected { background: #343a40; border-color: #343a40; color: #fff; }
.cut-mini-btn:disabled { opacity: 0.4; cursor: default; }
.cut-mini-btn.danger { color: #e03131; }
.cut-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.cut-slot {
  display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 64px; padding: 6px;
  border-radius: 10px; border: 3px dashed; background: #fff; font: inherit; cursor: pointer;
}
.cut-slot.purpose { border-color: #e03131; color: #e03131; }
.cut-slot.size { border-color: #1971c2; color: #1971c2; }
.cut-slot.work { border-color: #f08c00; color: #b35f00; }
.cut-slot.filled { border-style: solid; }
.cut-slot.filled.purpose { background: #fff0f0; }
.cut-slot.filled.size { background: #e7f1fb; }
.cut-slot.filled.work { background: #fff4e0; }
.cut-slot.active { box-shadow: 0 0 0 4px rgba(52, 58, 64, 0.35); }
.cut-slot-label { font-size: 0.72rem; font-weight: 800; }
.cut-slot-value { font-size: 1rem; font-weight: 800; color: var(--text); }
.cut-sec-stepper { display: flex; align-items: center; gap: 6px; font-weight: 800; }
.cut-memo { flex: 1 1 160px; min-height: 44px; padding: 6px 10px; border: 2px solid var(--border); border-radius: 10px; font: inherit; }
.cut-row-actions { display: flex; gap: 4px; }

.cut-palette { position: sticky; top: 12px; }
.cut-palette-group { background: var(--card); border: 2px solid var(--border); border-radius: var(--radius); padding: 10px; margin-bottom: 10px; opacity: 0.75; }
.cut-palette-group.active { opacity: 1; border-color: #343a40; }
.cut-palette-label { font-weight: 800; font-size: 0.85rem; margin-bottom: 6px; }
.cut-palette-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.cut-card {
  display: flex; flex-direction: column; gap: 2px; align-items: flex-start; text-align: left; min-height: 76px; padding: 6px 8px;
  border-radius: 10px; border: 3px solid; background: #fff; font: inherit; cursor: pointer;
}
.cut-card.purpose { border-color: #e03131; }
.cut-card.size { border-color: #1971c2; }
.cut-card.work { border-color: #f08c00; }
.cut-card.selected.purpose { background: #e03131; color: #fff; }
.cut-card.selected.size { background: #1971c2; color: #fff; }
.cut-card.selected.work { background: #f08c00; color: #fff; }
.cut-card-stars { font-size: 0.65rem; color: #f08c00; }
.cut-card.selected .cut-card-stars { color: #fff; }
.cut-card-name { font-weight: 800; font-size: 0.92rem; }
.cut-card-desc { font-size: 0.7rem; line-height: 1.3; opacity: 0.85; }

.cut-shoot-head { display: flex; align-items: center; gap: 6px; font-weight: 700; margin-bottom: 8px; }
.cutcard-item.shot { border-color: #40c057; }
.cut-takes { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.cut-take-dot {
  width: 24px; height: 24px; border-radius: 50%; border: 2px dashed var(--border); display: inline-flex;
  align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 800;
}
.cut-take-dot.filled { border-style: solid; border-color: #40c057; color: #2b8a3e; }
.cut-take-dot.used { background: #40c057; color: #fff; }
.cutcard-camera-cards { position: absolute; top: 8px; left: 8px; display: flex; gap: 4px; }
.cutcard-camera-timer {
  position: absolute; top: 8px; right: 8px; padding: 4px 10px; border-radius: 999px;
  background: rgba(224, 49, 49, 0.9); color: #fff; font-weight: 800;
}
.cutcard-camera-timer.over { background: #f08c00; }

.cut-edit-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.cut-edit-toolbar .btn { min-height: 44px; }
.cut-rule-select { display: flex; gap: 6px; align-items: center; font-size: 0.85rem; font-weight: 700; }
.cut-rule-select select { min-height: 44px; border-radius: 10px; border: 2px solid var(--border); padding: 0 8px; font: inherit; }
.cut-edit-message { padding: 10px 14px; border-radius: 10px; margin-bottom: 10px; font-weight: 700; }
.cut-edit-message.info { background: #e7f5ff; color: #1864ab; }
.cut-edit-message.error { background: #fff0f0; color: #c92a2a; }
.cut-edit-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 860px) { .cut-edit-layout { grid-template-columns: 1fr; } }
.cut-preview-screen { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); overflow: hidden; }
.cut-preview-screen video { width: 100%; height: 100%; object-fit: contain; }
.cut-preview-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #ccc; }
.cut-preview-overlay { position: absolute; top: 8px; left: 8px; display: flex; gap: 4px; align-items: center; }
.cut-preview-empty[hidden], .cut-preview-overlay[hidden], .cut-edit-message[hidden], .cutcard-camera-timer[hidden] { display: none; }
.cut-preview-progress { height: 8px; background: #edf0f5; border-radius: 999px; overflow: hidden; margin: 8px 0 12px; }
.cut-preview-progress > div { height: 100%; width: 0; background: #343a40; }
.cut-inspector { background: var(--card); border: 2px solid var(--border); border-radius: var(--radius); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.cut-inspector-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.cut-stock-item {
  display: flex; gap: 10px; align-items: center; background: var(--card); border: 2px solid var(--border);
  border-radius: var(--radius); padding: 8px 10px; margin-bottom: 8px; transition: background 0.2s;
}
.cut-stock-item.unshot { opacity: 0.55; }
.cut-stock-item.rejected { border-color: #e03131; background: #fff0f0; animation: cut-shake 0.3s 2; }
@keyframes cut-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.cut-stock-body { flex: 1; min-width: 0; }
.cut-stock-body .cutcard-item-cards { margin-bottom: 4px; }
.cut-stock-body .cutcard-item-meta { margin-bottom: 0; }
.cut-timeline {
  display: flex; align-items: stretch; gap: 0; overflow-x: auto; padding: 10px; min-height: 120px;
  background: #262a30; border-radius: var(--radius); margin-bottom: 10px;
}
.cut-timeline-empty { color: #aab; margin: auto; }
.cut-tl-block {
  flex: 0 0 auto; background: #fff; border-radius: 10px; padding: 6px 8px; cursor: grab; border: 3px solid transparent;
  display: flex; flex-direction: column; gap: 4px; user-select: none;
}
.cut-tl-block.selected { border-color: #ffd400; }
.cut-tl-block.dragging { opacity: 0.4; }
.cut-tl-block.drop-target { border-color: #4dabf7; }
.cut-tl-top { display: flex; align-items: center; gap: 4px; font-weight: 800; font-size: 0.85rem; }
.cut-tl-num {
  display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; border-radius: 50%;
  background: #343a40; color: #fff; font-size: 0.75rem; font-weight: 800;
}
.cut-tl-chips { display: flex; gap: 2px; flex-wrap: wrap; }
.cut-tl-chips .cutcard-chip { font-size: 0.62rem; padding: 1px 6px; }
.cut-tl-sec { font-size: 0.75rem; color: var(--muted); font-weight: 700; margin-top: auto; }
.cut-tl-mark {
  flex: 0 0 auto; align-self: center; color: #ffd400; font-size: 0.68rem; font-weight: 800; padding: 0 4px;
  writing-mode: vertical-rl; letter-spacing: 1px;
}
.cut-warnings { list-style: none; padding: 0; margin: 0 0 12px; color: #b35f00; font-weight: 700; font-size: 0.88rem; }

.vtr-card {
  width: 280px; max-width: 100%; margin: 0 auto 16px; padding: 10px; border-radius: 14px;
  background: linear-gradient(160deg, #9c36b5, #5f3dc4); color: #fff; box-shadow: 0 6px 18px rgba(95, 61, 196, 0.35);
}
.vtr-card-name { display: flex; justify-content: space-between; font-weight: 800; background: rgba(255,255,255,0.18); border-radius: 8px; padding: 6px 10px; }
.vtr-card-stars { color: #ffd43b; }
.vtr-card-window { aspect-ratio: 4 / 3; background: rgba(255,255,255,0.92); border-radius: 8px; margin: 8px 0; display: flex; align-items: center; justify-content: center; font-size: 3rem; }
.vtr-card-type { font-size: 0.8rem; font-weight: 700; }
.vtr-card-effect { background: rgba(255,255,255,0.92); color: var(--text); border-radius: 8px; padding: 8px; min-height: 60px; font-size: 0.85rem; margin: 6px 0; }
.vtr-card-foot { display: flex; justify-content: space-between; font-size: 0.8rem; font-weight: 700; }
.cutcard-camera-countdown {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: center;
  font-size: 5rem; font-weight: 800; color: #fff; background: rgba(0, 0, 0, 0.35);
}

/* 新規プロジェクト作成画面の「個人VTR／班の番組」選択——以前は地味な
   ラジオボタン+テキストラベルだったが、どちらを作るかを間違えやすい
   重要な分岐点なので、目立つ色付きカードのボタンに変える。選択中の
   方には白いチェックマークと縁取りを付けて一目でわかるようにする。 */
.mode-select-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 8px;
}
.mode-select-card {
  position: relative;
  text-align: left;
  color: #fff;
  border: 3px solid transparent;
  border-radius: var(--radius);
  padding: 20px 20px 18px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 2px 8px rgba(20, 30, 60, 0.08);
}
.mode-select-card:hover { transform: translateY(-2px); }
.mode-select-card.selected {
  border-color: #fff;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.35), 0 8px 20px rgba(20, 30, 60, 0.25);
  transform: translateY(-2px);
}
.mode-select-card .mode-select-check {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  border: 2px solid rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 900;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.mode-select-card.selected .mode-select-check {
  opacity: 1;
  background: #fff;
  color: #0369a1;
  border-color: #fff;
}
.mode-select-card .emoji { display: block; font-size: 1.9rem; margin-bottom: 6px; }
.mode-select-card h3 { margin: 0 0 4px; font-size: 1.2rem; }
.mode-select-card p { margin: 0; font-size: 0.85rem; color: rgba(255, 255, 255, 0.92); font-weight: 500; line-height: 1.4; }
.mode-select-individual { background: linear-gradient(135deg, var(--blue), var(--cyan)); }
.mode-select-team { background: linear-gradient(135deg, #d97706, #92400e); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 999px;
  border: none;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  background: var(--blue);
  color: white;
}
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.secondary { background: #eef1f6; color: var(--text); }
.btn.ai { background: linear-gradient(90deg, var(--magenta), var(--cyan)); }
.btn.yellow { background: var(--yellow); color: #4a3800; }
.btn.danger { background: #e53935; }
.btn.small { padding: 6px 12px; font-size: 0.82rem; }

.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; font-size: 0.92rem; }
.field textarea, .field input[type=text], .field input[type=email], .field select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 0.95rem;
  font-family: inherit;
}
textarea { resize: none; overflow: hidden; }
.field .hint { color: var(--muted); font-size: 0.78rem; margin-top: 4px; }

.step-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.step-row input[type=text], .step-row input[type=email] {
  padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); font-size: 0.9rem; font-family: inherit;
}

/* 制作の流れ全体を見せる共通ナビゲーション（企画→台本→絵コンテ→素材集め→
   編集→視聴→振り返り）— どの工程の画面からでも今どこにいるか分かり、
   クリックで他の工程へすぐ移動できるようにする。 */
.project-stepper {
  display: flex; align-items: center; flex-wrap: wrap; gap: 2px;
  margin-bottom: 14px; padding: 8px 10px; background: var(--card);
  border: 1px solid var(--border); border-radius: 12px; font-size: 0.78rem;
}
.project-stepper-step {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 8px;
  color: var(--muted); text-decoration: none; font-weight: 700; white-space: nowrap;
}
a.project-stepper-step:hover { background: #f0f4fb; color: var(--text); }
.project-stepper-step.current { background: var(--blue); color: white; }
.project-stepper-step.disabled { opacity: 0.4; cursor: default; }
.project-stepper-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%; background: rgba(0, 0, 0, 0.08);
  font-size: 0.72rem; flex-shrink: 0;
}
.project-stepper-step.current .project-stepper-num { background: rgba(255, 255, 255, 0.3); }
.project-stepper-arrow { color: var(--border); font-size: 0.9rem; padding: 0 1px; }

/* やることリスト画面: 役割（ディレクター／カメラマン／タイムキーパー）ごとに
   カードを分け、一覧性を優先して縦に並べる。 */
.role-task-list { display: flex; flex-direction: column; gap: 16px; }
.role-task-card { border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; background: #fafbff; }
.role-task-card h2 { margin: 0 0 8px; font-size: 1.05rem; }
.role-task-card ul { margin: 0; padding-left: 1.3em; display: flex; flex-direction: column; gap: 6px; }
.role-task-card .hint { margin: 0 0 8px; }
/* 個人VTR用「撮影＆リポートしよう！」画面の見本トグル。 */
.shoot-report-sample { margin-top: 16px; }
.shoot-report-sample #shoot-report-sample-body,
.shoot-report-sample #camera-list-body { margin-top: 12px; }
.shoot-report-sample ul { margin: 0; padding-left: 1.3em; display: flex; flex-direction: column; gap: 8px; }
/* カメラワークのおすすめチップ——チートシート画像の内容をもとに、各
   アドバイスに合う技を2〜4個だけ厳選して並べる。 */
.camera-tip-block { margin-top: 12px; }
.camera-tip-chips { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 6px; }
.camera-tip-chip { display: flex; flex-direction: column; width: 300px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: #fff; }
.camera-tip-chip[hidden] { display: none; }
.camera-tip-chip .camera-tip-icon { display: block; width: 100%; aspect-ratio: 16 / 9; }
.camera-tip-chip .camera-tip-text { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px 12px; }
.camera-tip-chip strong { font-size: 0.95rem; }
.camera-tip-chip .camera-tip-desc { color: var(--muted); font-size: 0.8rem; }
/* カットの種類一覧の「人物／モノ」タグと絞り込みボタン。 */
.camera-tip-subject-tag { display: inline-block; align-self: flex-start; font-size: 0.68rem; font-weight: 700; padding: 2px 7px; border-radius: 999px; margin-bottom: 2px; }
.camera-tip-subject-tag.subject-person { background: #e0f2fe; color: #0369a1; }
.camera-tip-subject-tag.subject-object { background: #fef3c7; color: #92400e; }
.camera-tip-subject-tag.subject-both { background: #ede9fe; color: #5b21b6; }
.shot-subject-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.shot-subject-filter-btn { border: 1px solid var(--border); background: #fff; border-radius: 999px; padding: 6px 14px; font-size: 0.85rem; font-weight: 700; cursor: pointer; }
.shot-subject-filter-btn.active { background: var(--blue); color: #fff; border-color: var(--blue); }
/* 「集める・作るパーツ」（完成させて④素材集めへ持っていく具体物）と
   「作業（すること）」（プロセス）を、見た目でもはっきり分ける——同じ
   役割カードの中で混ざって見えないよう、それぞれ小見出し＋色のアクセントを
   付ける。 */
.role-task-group { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); }
.role-task-group:first-of-type { margin-top: 0; }
.role-task-group-title { margin: 0 0 6px; font-size: 0.78rem; font-weight: 800; color: var(--muted); }
.role-task-group-parts .role-task-group-title { color: var(--blue); }
.role-task-group-actions .role-task-group-title { color: #c25a00; }

.ai-note { background: #fef3f8; border: 1px dashed var(--magenta); border-radius: 10px; padding: 10px 12px; font-size: 0.85rem; margin-top: 10px; color: #7a1466; }

.actions-row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }

/* ①調べる・企画会議: 上半分（調べたこと）から下半分（テーマ・伝えること・
   構成）をAIで作ることが一目で分かるよう、大きな下矢印とAIボタンを縦に
   並べてカードとカードの間に挟む。 */
.plan-ai-arrow-row { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 4px 0 18px; }
.plan-ai-arrow { font-size: 1.8rem; line-height: 1; color: var(--muted); }

/* ①企画会議「調べたこと・わかったこと」— 1本の大きなテキストエリアでは
   なく、付せんを1枚ずつ追加していく掲示板のような見た目にする。少しずつ
   傾きを変えて、手で貼ったような雰囲気を出す。 */
/* gridにしているのは、同じ行の付せんの高さを揃えるため——flexのwrapでは
   行をまたいで高さが揃わない。grid-auto-rowsが各行の高さを「その行で一番
   背の高い付せん」に合わせてJS側（equalizeStickyRows）が明示的に高さを
   揃える——flex-grow等CSSだけに任せると、一度伸びた後に文字を減らしても
   scrollHeightの再計測がその時点の伸びた高さを拾ってしまい、縮まなくなる
   バグになるため、揃える処理は必ずJS側で「まず全部auto計測→その後で行
   ごとに最大値へ揃える」の2段階で行う。 */
.sticky-note-wall { display: grid; grid-template-columns: repeat(auto-fill, 200px); gap: 16px; margin-bottom: 10px; }
.sticky-note {
  position: relative; width: 200px; min-height: 100px;
  background: #fff6a3; border-radius: 2px; padding: 16px 10px 10px;
  box-shadow: 3px 5px 10px rgba(20, 20, 0, 0.18);
  transform: rotate(-1.5deg);
  transition: transform 0.15s ease;
}
.sticky-note:nth-child(3n+2) { transform: rotate(1.2deg); }
.sticky-note:nth-child(3n+3) { transform: rotate(-0.6deg); }
.sticky-note:hover { transform: rotate(0deg) scale(1.02); }
.sticky-note-text {
  display: block; width: 100%; min-height: 68px; border: none; background: transparent; resize: none;
  font-family: inherit; font-size: 0.85rem; line-height: 1.5; color: #3d3410;
  padding: 0;
}
.sticky-note-text:focus { outline: none; }
.sticky-note-remove {
  position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%;
  background: rgba(0, 0, 0, 0.08); border: none; color: #6b5f20; font-size: 0.68rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center; line-height: 1;
}
.sticky-note-remove:hover { background: rgba(0, 0, 0, 0.2); }

.project-list { display: grid; gap: 12px; }
.project-item {
  display: flex; justify-content: space-between; align-items: center;
  background: white; border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px;
}
.project-item .meta { color: var(--muted); font-size: 0.82rem; }
.status-pill { padding: 3px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; }
.status-draft { background: #fff3cd; color: #8a6600; }
.status-published { background: #d7f5e3; color: #1b7a3d; }

/* 個人VTR／班の番組の切り替えタブ——以前は見出しの右端に小さく寄せて
   置いていたが、画面に入ってまず目にする・押す場所なので見出しの下、
   左寄せで大きく表示する。 */
.project-mode-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.project-mode-tab-btn {
  padding: 14px 26px;
  font-size: 1.05rem;
  font-weight: 800;
  border-radius: 999px;
  border: 2px solid var(--border);
  background: #fff;
  color: var(--text);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.project-mode-tab-btn:hover { transform: translateY(-1px); }
.project-mode-tab-btn.active.mode-individual {
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(0, 80, 255, 0.3);
}
.project-mode-tab-btn.active.mode-team {
  background: linear-gradient(135deg, #d97706, #92400e);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.3);
}

/* 制作中のプロジェクト一覧——縦積みの味気ないリスト表示から、1件ずつが
   独立したカードとして並ぶグリッド表示に変更。個人VTRと班の番組を上の
   帯の色（左の.mode-stripeではなく上辺のborder-top）で視覚的に見分け
   られるようにする。 */
.project-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.project-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: white;
  border: 1px solid var(--border);
  border-top: 5px solid var(--blue);
  border-radius: 14px;
  padding: 16px 18px 14px;
  box-shadow: 0 2px 10px rgba(20, 30, 60, 0.05);
}
.project-card.mode-team { border-top-color: #d97706; }
.project-card-badges { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.project-card-title { margin: 0; font-size: 1.05rem; font-weight: 800; line-height: 1.35; }
.project-card-meta { color: var(--muted); font-size: 0.8rem; }
.project-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

/* 編集する画面のレイアウト: 上段を左右2カラム（左＝プレビュー、右＝映像・
   テロップの素材）にし、その下にタイムラインを横幅いっぱいで置く —
   タイムラインは映像・テロップの両方のトラックをまとめて扱う場所なので、
   素材選びとは別の行として広く使いたい。 */
.edit-top-row { display: grid; grid-template-columns: minmax(360px, 46%) minmax(0, 1fr); gap: 16px; align-items: stretch; margin-bottom: 18px; }
.edit-preview-col { position: sticky; top: 12px; min-width: 0; }
/* 右の素材エリアの高さは左のプレビューに合わせ（align-items:stretchで行の
   高さ＝プレビューの高さになる）、中身はそこに収まるようスクロールさせる
   — こうしないと、素材カードが増えた時にプレビューより右側だけ縦に伸びて
   しまい、その下のタイムラインの開始位置がプレビューの下端とズレてしまう。
   position:relative + absolute の子要素（.edit-area-full）にすることで、
   このカラム自身の「中身の自然な高さ」がグリッドの行の高さ計算に影響しない
   ようにしている（素材集め画面の削除ボタンなどで使っているのと同じ手法）。 */
.edit-materials-col { min-width: 0; position: relative; }
.edit-materials-col .edit-area-full { position: absolute; inset: 0; overflow-y: auto; margin-bottom: 0; }
.preview-card { max-height: calc(100vh - 24px); overflow-y: auto; padding: 14px; margin-bottom: 0; }
@media (max-width: 980px) {
  .edit-top-row { grid-template-columns: 1fr; }
  .edit-preview-col { position: static; }
  /* 1カラムに積む幅では、プレビューと高さを揃える意味が無い（別々の行に
     なるため）— 普通に中身の高さ分だけ伸びる通常表示に戻す。 */
  .edit-materials-col { position: static; }
  .edit-materials-col .edit-area-full { position: static; overflow-y: visible; margin-bottom: 18px; }
}

.script-empty { color: var(--muted); font-size: 0.85rem; padding: 6px 0; }
.script-line {
  display: flex; gap: 8px; align-items: flex-start; padding: 5px 0;
  border-bottom: 1px dashed var(--border); font-size: 0.88rem; line-height: 1.55;
}
.script-line:last-child { border-bottom: none; }
.script-speaker {
  flex: 0 0 auto; font-weight: 800; color: white; background: var(--blue);
  padding: 1px 9px; border-radius: 999px; font-size: 0.78rem; line-height: 1.6;
  min-width: 1.6em; text-align: center; margin-top: 1px;
}
.script-qa-label {
  flex: 0 0 auto; font-weight: 800; color: white; background: var(--blue);
  width: 1.4em; height: 1.4em; border-radius: 4px; display: inline-flex;
  align-items: center; justify-content: center; font-size: 0.78rem;
}
.script-direction {
  background: var(--yellow); color: #4a3800; font-size: 0.82rem; font-weight: 700;
  padding: 6px 10px; border-radius: 6px; margin: 6px 0; line-height: 1.5;
}
.script-cue {
  text-align: center; font-size: 0.8rem; font-weight: 700; color: var(--muted);
  border: 1px solid var(--border); border-radius: 999px; padding: 3px 12px;
  margin: 8px auto; width: fit-content; font-style: italic;
}
.script-image-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.script-image { flex: 1 1 140px; max-width: 220px; }
.script-image img { width: 100%; max-height: 160px; object-fit: contain; border-radius: 8px; border: 1px solid var(--border); display: block; }

/* 台本テーブル: 入力欄と台本プレビューを統合した1枚のテーブル。実際のテレビ
   番組の進行表と同じ「時間／映像／音声／内容」の4カラム構造そのものが編集画面
   になっている——別立てのプレビューはない。ト書き（音楽・効果音など）は音声列
   にアイコン付きでそのまま入り、内容列は実際のセリフだけを載せる。各行
   （`.script-cut-row`）がドラッグで並び替え・セクション間移動できる1カット。 */
/* はっきりした格子線＋列ごとの薄い色分けで、「時間・映像・音声・内容」の
   それぞれの役割が一目で分かるようにしている（プロの台本が色分けされたタブで
   区切られているのと同じねらい）。ヘッダーは列に関わらず全部同じ青帯で統一し、
   「ここが見出し行」だと分かりやすくしてある。 */
.script-table { width: 100%; border-collapse: collapse; border: 1px solid var(--border); }
.script-table th {
  text-align: left; font-size: 0.72rem; color: white; font-weight: 800;
  padding: 7px 8px; border: 1px solid rgba(255, 255, 255, 0.45); white-space: nowrap; background: var(--blue);
}
.script-table td { padding: 10px 8px; border: 1px solid var(--border); vertical-align: top; font-size: 0.86rem; line-height: 1.5; }
.script-cut-row { cursor: grab; transition: opacity 0.15s ease; }
.script-cut-row:active { cursor: grabbing; }
.script-cut-row.dragging { opacity: 0.35; }
.script-cut-row.drag-over td:first-child { box-shadow: inset 4px 0 0 var(--magenta); }
.script-table tbody.drag-over { outline: 2px dashed var(--cyan); outline-offset: -2px; }
/* 列ごとの薄い色分け（AIの下書き表示がこれより後に来るので、そちらが優先される） */
.script-table-reorder, .script-table-remove { background: #fafbff; }
.script-table-lap { background: #eef1f6; }
.script-table-visual { background: #eaf2ff; }
.script-table-audio { background: #fffaf0; }
.script-table-content { background: #ffffff; }
.script-cut-row.script-cut-ai-draft td { background: #e3e5ea; }

.script-table-reorder { width: 24px; padding-left: 4px; padding-right: 0; }
.script-cut-reorder { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.script-cut-move-btn {
  width: 18px; height: 16px; border: 1px solid var(--border); background: #f4f6fa; border-radius: 4px;
  font-size: 0.65rem; line-height: 1; cursor: pointer; padding: 0;
}
.script-cut-move-btn:disabled { opacity: 0.25; cursor: default; }
.script-cut-move-btn:not(:disabled):hover { background: var(--border); }

.script-table-lap { width: 118px; white-space: nowrap; font-size: 0.78rem; font-weight: 700; color: var(--muted); }
.script-table-lap-value { margin-bottom: 6px; }
.script-cut-duration {
  display: inline-flex; align-items: center; gap: 3px; font-size: 0.72rem; color: var(--muted); font-weight: 700;
  padding-top: 6px; border-top: 1px dashed var(--border);
}
/* The box itself (not just the column around it) was too narrow — a 2-digit
   number plus the browser's own spin-button arrows need real room, or the
   digits get crushed up against (or behind) the arrows. */
.script-cut-duration-input {
  width: 48px; padding: 3px 4px; border-radius: 6px; border: 1px solid var(--border); font-size: 0.8rem; text-align: center;
}

.script-table-visual { width: 180px; }
.script-table-visual .script-image { max-width: 100%; }
.script-table-visual .script-image img { max-height: none; }
.script-visual-empty {
  width: 100%; aspect-ratio: 4 / 3; border: 2px dashed var(--border); border-radius: 8px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--muted); font-size: 0.66rem; line-height: 1.4; text-align: center;
}
/* 16:9（映像のコマ）に合わせた横長の枠 — 以前は160x160の正方形で object-fit:
   cover だったため、横長の画像（AI生成・絵コンテとも16:9基調）の左右が
   切り取られていた。contain にして枠内に収め、余白は背景色で埋める。 */
.script-cut-image {
  position: relative; width: 220px; aspect-ratio: 16 / 9; border-radius: 8px;
  overflow: hidden; border: 1px solid var(--border); background: #eef1f7;
}
.script-cut-image img { width: 100%; height: 100%; object-fit: contain; cursor: zoom-in; }
.script-cut-image-remove {
  position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border: none;
  border-radius: 50%; background: rgba(0,0,0,0.6); color: white; font-size: 0.78rem;
  line-height: 22px; text-align: center; padding: 0; cursor: pointer;
}
.script-cut-image-remove:hover { background: #c62828; }
.script-cut-empty {
  width: 220px; aspect-ratio: 16 / 9; border: 2px dashed var(--border); border-radius: 8px;
  display: flex; align-items: center; justify-content: center; gap: 4px;
}

/* 画像クリックでの拡大表示（絵コンテ画像など） */
.image-lightbox-overlay { background: rgba(10, 14, 24, 0.85); }
.image-lightbox-img { max-width: 92vw; max-height: 92vh; border-radius: 8px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5); }
.image-lightbox-close {
  position: fixed; top: 20px; right: 24px; width: 40px; height: 40px; border-radius: 50%;
  border: none; background: rgba(255, 255, 255, 0.15); color: white; font-size: 1.1rem; cursor: pointer;
}
.image-lightbox-close:hover { background: rgba(255, 255, 255, 0.3); }
.script-cut-upload-btn, .script-cut-ai-btn, .script-cut-draw-btn {
  border: none; background: none; cursor: pointer; font-size: 1rem; padding: 2px; line-height: 1;
}

.script-table-audio { width: 140px; }
.script-table-audio-row { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.script-cut-type-select, .script-cut-speaker-select {
  width: 100%; padding: 3px 6px; border-radius: 6px; border: 1px solid var(--border);
  font-size: 0.76rem; background: white;
}
.script-cut-tts { border: none; background: none; cursor: pointer; font-size: 0.95rem; padding: 0 2px; }
.script-audio-direction { color: #4a3800; font-weight: 700; font-size: 0.82rem; line-height: 1.5; }

.script-table-content { min-width: 240px; }
.script-cut-text {
  width: 100%; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--border);
  font-size: 0.88rem; font-family: inherit; resize: none; overflow: hidden;
}
.script-cut-text-furigana { padding: 6px 8px; font-size: 0.88rem; line-height: 1.6; }
.script-cut-ai-badge { font-size: 0.68rem; color: var(--muted); font-weight: 700; }
.script-cut-rewrite-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.chip-btn {
  border: 1px solid var(--border); background: #f4f6fa; border-radius: 999px; padding: 3px 10px;
  font-size: 0.72rem; cursor: pointer; color: var(--text);
}
.chip-btn:hover { background: var(--border); }
.script-cut-add-line {
  display: block; width: 100%; margin-top: 8px; padding: 6px; border-radius: 8px;
  border: 1.5px dashed var(--blue); background: rgba(0, 80, 255, 0.05); color: var(--blue);
  font-size: 0.74rem; font-weight: 800; cursor: pointer;
}
.script-cut-add-line:hover { border-color: var(--cyan); color: var(--cyan); background: rgba(0, 188, 212, 0.08); }

.script-table-remove { width: 26px; padding-left: 0; }
.script-cut-remove {
  width: 22px; height: 22px; border-radius: 50%; border: none; background: rgba(0,0,0,0.06);
  color: var(--muted); font-size: 0.7rem; cursor: pointer;
}
.script-cut-remove:hover:not(:disabled) { background: #ffcdd2; color: #c62828; }
.script-cut-remove:disabled { opacity: 0.3; cursor: default; }

/* 台本ヘッダー: タイトルは他の白いカードに埋もれないよう、番組ブランドの青で
   はっきり目立たせる——帯の上に大きく白文字で入力する、新聞の題字のような
   見た目。ゲージ・役割などの補助情報はその下の白い部分に続く。 */
.script-header { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 0 16px 14px; margin-bottom: 10px; overflow: hidden; }
.script-header-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 0 -16px 14px; padding: 14px 16px; background: var(--blue);
}
.script-title-group { flex: 1; min-width: 160px; display: flex; flex-direction: column; gap: 2px; }
.script-title-label { font-size: 0.68rem; font-weight: 800; color: rgba(255, 255, 255, 0.85); letter-spacing: 0.03em; }
.script-title-input {
  width: 100%; font-size: 1.4rem; font-weight: 700; line-height: 1.6; padding: 6px 4px;
  border: none; border-bottom: 3px solid var(--yellow); border-radius: 0; font-family: inherit;
  background: transparent; color: white;
}
.script-title-input::placeholder { color: rgba(255, 255, 255, 0.75); }
.script-header-actions { display: flex; gap: 8px; }
.script-header-actions .btn { background: white; }
.script-header-actions .btn.active { outline: 2px solid var(--yellow); }
.script-gauge-row { display: flex; align-items: center; gap: 10px; }
.script-gauge-bar { flex: 1; height: 10px; background: #eef1f6; border-radius: 999px; overflow: hidden; }
.script-gauge-fill { height: 100%; background: var(--cyan); border-radius: 999px; transition: width 0.2s ease; }
.script-gauge-fill.over { background: #e65100; }
/* 台本入力の進捗（導入・本編・まとめそれぞれに中身があるか）— 尺のゲージとは
   別に、AIレビューボタンが押せる条件を生徒自身にも分かるようにする。 */
.script-progress-row { display: flex; gap: 8px; margin: 2px 0 10px; flex-wrap: wrap; }
.script-progress-chip {
  font-size: 0.78rem; font-weight: 700; color: var(--muted); background: #eef1f6;
  border-radius: 999px; padding: 3px 10px;
}
.script-progress-chip.done { color: #1a7a3a; background: #e3f6e9; }
/* 「この番組を作る子どもたち」— 名前の行を自由に追加・削除できる一覧
   （付せんの壁と同じ操作感）＋行ごとに役割タグ（複数選択可）。企画画面・
   台本画面の両方で同じ見た目を使う。 */
.member-list { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.member-list-item { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.member-list-input {
  font-size: 0.9rem; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--border); flex: 0 1 180px;
}
.member-list-add { margin-top: 4px; }
.member-role-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.member-role-tag {
  display: inline-flex; align-items: center; gap: 3px; font-size: 0.74rem; padding: 3px 9px; border-radius: 999px;
  border: 1px solid var(--border); background: #fff; color: var(--muted); cursor: pointer; user-select: none;
  transition: background-color 0.1s ease, border-color 0.1s ease, color 0.1s ease;
}
.member-role-tag input[type='checkbox'] { margin: 0; }
.member-role-tag.active { background: var(--cyan); border-color: var(--cyan); color: white; font-weight: 700; }

/* ③やることリストの各作業につける「担当」トグル——メンバー一覧から選ぶ
   ボタンの並び。複数人を同じ作業に割り当てられるよう、チェックボックスと
   同じ意味合いのオン/オフボタンにする（ラジオボタンのような排他選択では
   ない）。 */
.task-assignee-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 4px 0 2px; }
.task-assignee-label { font-size: 0.72rem; color: var(--muted); font-weight: 700; }
.task-assignee-pill {
  font-size: 0.78rem; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border);
  background: #fff; color: var(--text); cursor: pointer; transition: background-color 0.1s ease, border-color 0.1s ease, color 0.1s ease;
}
.task-assignee-pill:hover { border-color: var(--cyan); }
.task-assignee-pill.active { background: var(--cyan); border-color: var(--cyan); color: white; font-weight: 700; }

.script-ai-prompt {
  width: 100%; padding: 10px; border-radius: 8px; border: 1px solid var(--border); font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 0.78rem; line-height: 1.5; color: var(--text); background: #fafbff; resize: vertical;
}

/* チャット吹き出し（🦉ホゥ博士の全画面オーバーレイで使用） */
.chat-bubble { max-width: 85%; padding: 8px 12px; border-radius: 14px; font-size: 0.88rem; line-height: 1.5; }
.chat-bubble-user { align-self: flex-end; background: var(--blue); color: white; border-bottom-right-radius: 2px; }
.chat-bubble-assistant { align-self: flex-start; background: white; border: 1px solid var(--border); border-bottom-left-radius: 2px; }
.chat-bubble-text { white-space: pre-wrap; }

/* 印刷/PDF: 入力欄とプレビューが同じテーブルなので、ウィザードなど編集専用の
   カードを丸ごと隠し、台本テーブル自体は残した上で「触る」ための部品（並び替え・
   削除・画像アップロード/AI生成・リライト・秒数入力）だけを隠す。セリフ種別/
   話者セレクトやテキストは選択中の内容が見えるので、あえて隠さない。 */
@media print {
  .app-header, .script-header-actions, .actions-row,
  .script-gauge-row select, .add-material-btn, .script-table-reorder, .script-table-remove,
  .script-cut-rewrite-row, .script-cut-ai-btn, .script-cut-upload-btn, .script-cut-draw-btn, .script-cut-image-remove,
  .script-cut-tts, .script-cut-duration, .script-ai-tools,
  .howl-launcher, .howl-panel, #ai-tasks-widget { display: none !important; }
}

/* 絵コンテ（ストーリーボード）画面 */
.storyboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; margin: 18px 0; }
.storyboard-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px; box-shadow: 0 2px 10px rgba(20, 30, 60, 0.04);
}
.storyboard-card-header { font-weight: 800; margin-bottom: 8px; }
.storyboard-canvas-wrap {
  aspect-ratio: 16 / 9; border: 2px solid var(--border); border-radius: 8px; overflow: hidden;
  background: white; margin-bottom: 8px;
}
.storyboard-canvas { width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; }
.storyboard-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.storyboard-colors { display: flex; gap: 6px; }
.storyboard-color {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid white;
  box-shadow: 0 0 0 1px var(--border); cursor: pointer; padding: 0;
}
.storyboard-color.active { box-shadow: 0 0 0 2px var(--blue); }
.storyboard-note-input {
  width: 100%; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); font-size: 0.9rem;
}
.storyboard-script { margin: 10px 0; max-height: 180px; overflow-y: auto; }
.storyboard-ai-row { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.storyboard-ai-row .btn { flex: 1 1 auto; justify-content: center; }
.storyboard-ai-panel {
  margin-top: 10px; padding: 10px 12px; border-radius: 10px;
  background: #fef3f8; border: 1px dashed var(--magenta);
}
.storyboard-ai-label { font-weight: 800; margin-bottom: 4px; }
.storyboard-ai-prompt {
  width: 100%; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border);
  font-size: 0.88rem; font-family: inherit; resize: vertical;
}
.storyboard-ai-status { margin-top: 6px; }

.edit-area-full {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; margin-bottom: 18px; box-shadow: 0 2px 10px rgba(20, 30, 60, 0.04);
}
.edit-zone-label { font-weight: 700; font-size: 0.82rem; color: var(--text); margin: 14px 0 6px; }
.edit-zone-label:first-of-type { margin-top: 0; }

.clip-strip {
  display: flex; gap: 10px; overflow-x: auto; padding: 6px 2px 14px;
  scroll-snap-type: x proximity; border-radius: 10px; transition: background-color 0.15s ease;
  min-height: 90px;
}
.clip-strip.drag-over { background-color: rgba(0, 188, 212, 0.08); }
.clip-item {
  flex: 0 0 152px; width: 152px; border: 2px solid var(--border); border-radius: 10px;
  background: var(--card); padding: 6px; cursor: grab; scroll-snap-align: start;
  transition: border-color 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
  position: relative;
}
.clip-item:active { cursor: grabbing; }
.clip-item.dragging { opacity: 0.35; }
.clip-item.drag-over { border-color: var(--magenta); transform: scale(1.04); }
/* まだタイムラインで使っていない素材は、使用中のものと見分けられるよう
   破線・半透明にする（使う/使わないを別々のエリアに分けない代わりの見分け方）。 */
.clip-item-unused { border-style: dashed; opacity: 0.85; }
.clip-order-badge {
  position: absolute; top: 4px; left: 4px; z-index: 1;
  background: rgba(0,0,0,0.65); color: white; font-size: 0.72rem; font-weight: 700;
  width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.clip-delete-btn {
  position: absolute; top: 2px; right: 2px; z-index: 1; width: 20px; height: 20px;
  border: none; border-radius: 50%; background: rgba(0,0,0,0.55); color: white;
  font-size: 0.72rem; line-height: 20px; text-align: center; padding: 0; cursor: pointer;
}
.clip-delete-btn:hover { background: #c62828; }
.clip-thumb {
  position: relative; aspect-ratio: 16 / 9; background: #11151c; border-radius: 6px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.clip-thumb video { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.clip-thumb-empty { color: var(--muted); font-size: 0.72rem; }
.clip-label {
  margin-top: 6px; font-size: 0.78rem; font-weight: 700; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.clip-zone-btn {
  display: block; width: 100%; margin-top: 4px; border: 1px solid var(--border); background: #f4f6fa;
  border-radius: 6px; font-size: 0.72rem; font-weight: 700; padding: 3px 0; cursor: pointer; color: var(--text);
}
.clip-zone-btn:hover { background: var(--border); }
.clip-zone-btn-add { background: var(--cyan); color: white; border-color: var(--cyan); }
.clip-zone-btn-add:hover { filter: brightness(0.95); }

.clip-item-add {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; border-style: dashed; border-color: var(--blue); cursor: pointer; color: var(--blue); font-size: 0.78rem; font-weight: 800;
  min-height: 100%; background: rgba(0, 80, 255, 0.05);
  /* .clip-item-add doubles as a <button> (ブランド素材を追加) as well as the
     original <label> (動画を追加) — reset the browser's own button chrome so
     both render identically. */
  font-family: inherit; text-align: center;
}
.clip-item-add:hover { border-color: var(--cyan); color: var(--cyan); background: rgba(0, 188, 212, 0.08); }
.clip-add-icon { font-size: 1.6rem; line-height: 1; }

.brand-clip-category { margin-bottom: 14px; }
.brand-clip-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.brand-clip-item {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  width: 120px; border: 2px solid var(--border); border-radius: 10px; background: var(--card);
  padding: 6px; cursor: pointer; font-family: inherit; font-size: 0.75rem; font-weight: 700; color: var(--text);
}
.brand-clip-item:hover { border-color: var(--cyan); }
.brand-clip-item:disabled { opacity: 0.5; cursor: not-allowed; }
.brand-clip-item video { width: 100%; height: 68px; object-fit: cover; border-radius: 6px; background: black; }

/* 個人VTRを班の番組へ提出するモーダル——タップして選ぶ一覧。 */
.team-submit-list { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.team-submit-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; text-align: left; border: 2px solid var(--border); border-radius: 10px;
  background: var(--card); padding: 12px 14px; cursor: pointer; font-family: inherit;
}
.team-submit-item:hover { border-color: var(--blue); background: #f0f5ff; }
.team-submit-item:disabled { opacity: 0.5; cursor: not-allowed; }
.team-submit-title { font-weight: 700; font-size: 0.95rem; color: var(--text); }
.team-submit-name { color: var(--muted); font-size: 0.82rem; white-space: nowrap; }

.clip-timeline {
  padding: 10px 12px 6px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--card); margin-bottom: 20px; overflow-x: auto;
}
.pro-timeline-zoom { display: flex; align-items: center; gap: 4px; }
.pro-timeline-zoom .btn { padding: 2px 10px; line-height: 1.4; }
#timeline-zoom-value { min-width: 42px; text-align: center; }
/* Premiere-風の時間軸タイムライン: 上にルーラー、下に映像/テロップのトラックを
   段組みで重ねる。各クリップは実際の尺に応じた幅・位置で配置される。映像トラックは
   縦幅を広くとり、サムネイルでひと目でどの素材か分かるようにしている。 */
/* クリック・ホバーで再生位置を操作する場所なので、数字をドラッグして選択・
   コピーできてしまうと邪魔になる（普通のテキストのようにマウスに反応しない
   ようにする）。 */
.pro-timeline-ruler { position: relative; height: 30px; margin: 0 0 0 76px; border-bottom: 1px solid var(--border); cursor: pointer; user-select: none; }
/* .clip-timelineの上側パディング（カード上端〜ルーラーの間の余白）は見た目
   上ルーラーの続きに見えるのに、要素としてはルーラーの外——そこをクリック
   /ドラッグしても反応しない「死角」になっていた。::beforeでその高さ分だけ
   ルーラー自身の当たり判定を上へ伸ばし、見た目を変えずに隙間ごとルーラーの
   操作範囲にする。 */
.pro-timeline-ruler::before { content: ''; position: absolute; top: -10px; left: 0; right: 0; height: 10px; }
.pro-ruler-tick { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--border); }
.pro-ruler-tick span { position: absolute; left: 3px; top: 0; font-size: 0.65rem; color: var(--muted); white-space: nowrap; }
/* ルーラー・映像・音声・音楽/SE・テロップの間に余白を置かない——隙間が
   あると、そこは映像ブロックでもルーラーでもない「選択解除される外側」の
   判定になり、ルーラーのすぐ近くを触っただけのつもりでも選択中のクリップが
   外れてしまっていた。marginを0にして隙間自体を無くし、どこを押しても
   必ずルーラーかいずれかのレーンの範囲内になるようにする。 */
.pro-track { display: flex; align-items: stretch; gap: 8px; margin-bottom: 0; }
.pro-track-label {
  flex: 0 0 68px; display: flex; align-items: center; font-size: 0.72rem; font-weight: 700; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  user-select: none; cursor: default; pointer-events: none;
}
.pro-track-lane {
  position: relative; flex: 1; height: 72px; background: #eef1f6; border-radius: 0; overflow: hidden;
  transition: background-color 0.15s ease;
}
/* 行間の余白を無くした分、境目が分かるように細い線だけ足す——borderは要素
   自身の箱の内側なので、margin/paddingの隙間と違って押しても反応しない
   死角にはならない。 */
.pro-track + .pro-track .pro-track-lane { border-top: 1px solid rgba(0, 0, 0, 0.08); }
/* 高さはJS側で「同時刻に重なるテロップの最大本数」に応じて動的に広げる
   （複数のテロップを時刻が重なった状態で積めるように、行ごとに縦に並べる）。
   min-heightは重なりが無い（1行で足りる）時の既定値。 */
.pro-track-lane-telop { min-height: 34px; height: auto; }
.pro-track-lane.drag-over { background-color: rgba(0, 188, 212, 0.18); }
/* 映像が1本も無くても、タイムラインの形（ルーラー・映像/テロップのレーン）
   自体は常に出しておく — 空のレーンだとただの灰色の箱に見えてしまうので、
   何をすればいいかの案内だけ添える。 */
#pro-track-video:empty::before {
  content: 'ここに素材をドラッグ、または上の「動画を追加」で追加してください';
  display: flex; align-items: center; justify-content: center; height: 100%;
  color: var(--muted); font-size: 0.78rem; text-align: center; padding: 0 10px;
}
.pro-clip-block {
  /* 上下3pxの余白があると、帯（レーン）同士は密着していても色付きのブロック
     自体は映像と音声の間に隙間が空いて見えてしまっていた——レーンいっぱいに
     敷き詰めて見た目上も隙間ゼロにする。 */
  position: absolute; top: 0; bottom: 0; border-radius: 0; overflow: hidden;
  background: linear-gradient(135deg, var(--blue), var(--cyan)); color: white; cursor: pointer;
  font-size: 0.9rem; font-weight: 700; border-right: 2px solid white; transition: filter 0.1s ease, outline-color 0.1s ease;
  outline: 2px solid transparent; outline-offset: -2px;
}
.pro-clip-block:hover { filter: brightness(1.12); }
.pro-clip-block.drag-over { outline-color: var(--magenta); }
.pro-clip-block.dragging { opacity: 0.35; }
.pro-video-block { cursor: grab; }
.pro-video-block:active { cursor: grabbing; }
.pro-subrange-ghost {
  background: linear-gradient(135deg, var(--magenta), #ff80ab); opacity: 0.7;
  border: 2px dashed white; pointer-events: none; z-index: 5;
}

.pro-timeline-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
/* The thumbnail is shown at its real aspect ratio, never cropped or stretched
   to fill the (duration-driven) block width — it's anchored to the block's
   left edge instead, so a short clip just shows a smaller, still-complete
   thumbnail rather than a zoomed-in sliver of it. */
.pro-video-block video {
  position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 5px;
  object-fit: contain; object-position: left center; pointer-events: none;
}
.pro-video-block span {
  position: absolute; left: 3px; bottom: 2px; right: 3px; background: rgba(0, 0, 0, 0.6);
  padding: 1px 5px; border-radius: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* テロップはセグメントと独立した自分だけのタイムラインブロック — 本体をドラッグ
   すると表示タイミング（開始・終了とも）が一緒にずれ、左右のつまみをドラッグする
   と開始・終了のどちらかだけを個別に伸縮できる（動画編集ソフトのクリップ操作と
   同じ操作感）。 */
.pro-telop-block {
  background: #dde1e8; cursor: grab; display: flex; align-items: center; justify-content: flex-start;
  font-size: 0.9rem; padding: 0 10px; user-select: none; border-right: none;
}
.pro-telop-block:active { cursor: grabbing; }
.pro-telop-block.has-telop { background: linear-gradient(135deg, var(--magenta), #ff80ab); }
/* 他のテロップの始点・終点に吸着した時の「カチッ」というマグネット感 —
   ドラッグ中だけ一瞬で切り替わるようtransitionは掛けない。 */
.pro-telop-block.pro-telop-block-snapped { outline: 2px solid var(--magenta); outline-offset: 1px; }
/* テロップ・音楽/SEのブロック全体を選択中であることを示す枠——映像の
   区間選択（.pro-clip-selectionオーバーレイ）と違い、こちらは区間の概念が
   無いのでブロック全体にそのまま付ける。 */
.pro-element-selected {
  outline: 3px solid #ffd600; outline-offset: -3px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.55), 0 0 6px 1px rgba(255, 214, 0, 0.55);
}
.pro-telop-block-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; pointer-events: none; }
.pro-telop-handle {
  position: absolute; top: 0; bottom: 0; width: 8px; cursor: ew-resize;
}
.pro-telop-handle[data-telop-handle="start"] { left: 0; }
.pro-telop-handle[data-telop-handle="end"] { right: 0; }
.pro-telop-handle[data-audio-handle="start"] { left: 0; }
.pro-telop-handle[data-audio-handle="end"] { right: 0; }
/* 音楽・SEブロックのフェードイン/アウト — 端からのグラデーション
   （pro-audio-fade-overlay、クリックは無視）で音量が0に近づく範囲を示し、
   その境界に置いた小さなつまみ（pro-audio-fade-handle）をドラッグして
   長さを変える。フェード秒数が0でもつまみ自体は端に常に表示され続ける
   ので、フェードが無い状態からでも掴んで新しく作り始められる。 */
.pro-audio-fade-overlay {
  position: absolute; top: 0; bottom: 0; z-index: 1; pointer-events: none; max-width: 100%;
}
.pro-audio-fade-overlay-in {
  left: 0;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
}
.pro-audio-fade-overlay-out {
  right: 0;
  background: linear-gradient(to left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
}
.pro-audio-fade-handle {
  position: absolute; top: 0; bottom: 0; width: 10px; z-index: 3; cursor: ew-resize;
}
.pro-audio-fade-handle[data-audio-fade="in"] { transform: translateX(-50%); }
.pro-audio-fade-handle[data-audio-fade="out"] { transform: translateX(50%); }
.pro-audio-fade-handle::after {
  content: ''; position: absolute; top: 50%; left: 50%; width: 4px; height: 14px;
  background: rgba(255, 255, 255, 0.85); border-radius: 2px; transform: translate(-50%, -50%);
}
/* テロップ一覧 — 横に並べたチップではなく縦のリストにして、1件ずつ
   ドラッグしやすく・見やすくする（ラベル・状態・操作が常に同じ位置に揃う）。 */
.telop-list-heading { font-size: 0.74rem; font-weight: 700; color: var(--muted); margin: 10px 0 8px; }
.telop-list-heading.telop-list-row-noindent { margin-left: 0; }
/* テロップ一覧はリスト（文字だけ）ではなく、実際の座布団デザインがそのまま
   見えるカードを並べる — どんな見た目のテロップになるか一目で分かるように
   するため。折り返して複数枚並ぶ、小さめのカードグリッド。 */
.telop-list-row { display: flex; flex-wrap: wrap; gap: 12px; align-content: flex-start; }
.telop-list-row.telop-list-row-noindent { margin-left: 0; }
/* .telop-itemは本来480px固定（素材集め画面の座布団と同じ比率で大きく見せる
   ため）だが、ここは「どんなデザインか分かればいい」小さなプレビューなので
   幅を縮める — cqw基準のフォントサイズは比率のままなので縮小しても崩れない。
   .telop-item単体より詳細度を上げて、後からファイル内に出てくる.telop-item
   側のwidth:480pxに上書きされないようにする。 */
.telop-item.telop-preview-card {
  width: 240px; flex: 0 0 240px;
  background: #fff; border: 1.5px solid var(--border); border-radius: 10px; padding: 10px;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  overflow: visible;
  display: flex; flex-direction: column; justify-content: space-between;
}
.telop-preview-card:hover { border-color: var(--cyan); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(20, 30, 60, 0.14); }
.telop-preview-card-header { display: flex; align-items: center; gap: 6px; font-size: 0.72rem; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.telop-preview-card-kind { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.telop-preview-card-header .meta { font-weight: 400; flex-shrink: 0; user-select: none; }

/* 編集画面のテロップ一覧プレビュー枠: 座布団の形を保ちながら拡大表示して見やすくする */
.telop-preview-card .telop-box-wrap {
  position: relative; display: inline-flex; flex-direction: column;
  align-items: stretch; justify-content: center; align-self: center;
  width: fit-content; max-width: 100%; min-height: 80px; padding: 4px 0; overflow: visible;
}
.telop-preview-card .tv-telop-box {
  outline: none; font-family: inherit;
  width: fit-content; max-width: none;
  box-sizing: border-box;
}
.telop-preview-card.kind-setsumei .telop-box-wrap,
.telop-preview-card.kind-haraobi .telop-box-wrap,
.telop-preview-card.kind-voiceover .telop-box-wrap {
  transform: scale(1);
}
.telop-preview-card.kind-name .telop-box-wrap {
  transform: scale(1.35);
  transform-origin: center center;
}
.telop-preview-card.kind-basho .telop-box-wrap {
  transform: scale(2.2);
  transform-origin: center center;
}
.telop-preview-card.kind-side .telop-box-wrap {
  transform: scale(1.85);
  transform-origin: center center;
}
/* 掴める場所だと文字無しで伝わるよう、左のハンドルを大きく・太く・色付きで
   目立たせる（「ドラッグしてタイムラインへ」という説明文は無くした代わり）。 */
.telop-list-item-handle { color: var(--blue); font-size: 1.1rem; line-height: 1; flex-shrink: 0; font-weight: 900; }
/* 未配置のテロップはテロップトラックへドラッグして配置する — つかめる見た目
   にする（破線の枠＋grabカーソル＋左の太いハンドル）。 */
.telop-preview-card-draggable { border-style: dashed; cursor: grab; }
.telop-preview-card-draggable:active { cursor: grabbing; }
/* 配置済みのテロップは、逆にテロップトラック上のブロックをつまんでこちらへ
   ドラッグで戻す（外す）こともできる — その間はドロップ先として光らせる。 */
.telop-list-row.drag-over-unplace { outline: 2px dashed var(--magenta); outline-offset: 2px; border-radius: 8px; }
/* ドラッグでテロップトラックの外（＝テロップ一覧側）まで持ってきている間、
   「離せば外れる」ことが分かるよう薄くする。 */
.pro-telop-block.pro-telop-block-removing { opacity: 0.35; }

/* 🎵 音楽・SEトラック — テロップブロックと同じ操作感（本体ドラッグで移動、
   左右のつまみで伸縮）だが、映像・テロップと見分けがつくよう色だけ変える。
   BGMは紫系、SEは橙系。 */
.pro-track-lane-audio { min-height: 38px; height: auto; }
.pro-audio-block {
  background: #ded5f5; cursor: grab; display: flex; align-items: center; justify-content: flex-start;
  font-size: 0.9rem; padding: 0 10px; user-select: none; border-right: none;
}
.pro-audio-block:active { cursor: grabbing; }
.pro-audio-block.kind-bgm.has-audio { background: linear-gradient(135deg, #7c4dff, #b388ff); color: white; }
.pro-audio-block.kind-se.has-audio { background: linear-gradient(135deg, #ff6d00, #ffab40); color: white; }
/* 音楽・SE一覧のカード — テロップカードと同じ枠・大きさを使い、座布団の
   プレビューに相当するものとして、タイムライン上のブロックと同じ色味
   （BGMは紫系、SEは橙系）の塗りつぶしカードに大きめのアイコン＋ファイル名
   を乗せる——テロップと同じ「実際どう見えるかが一目で分かる」見た目にする。 */
.audio-preview-card-body {
  min-height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 4px; padding: 10px; border-radius: 10px; color: white;
}
.audio-preview-card-body.kind-bgm { background: linear-gradient(135deg, #7c4dff, #b388ff); }
.audio-preview-card-body.kind-se { background: linear-gradient(135deg, #ff6d00, #ffab40); }
.audio-preview-label { font-size: 0.78rem; font-weight: 700; word-break: break-all; }
.pro-timeline-total { margin-left: auto; user-select: none; }

/* 🔊 映像自身の音声の行 — 映像の行と全く同じ位置・幅のブロックを緑系の色で
   並べ、画（映像）と音を別の行として見分けられるようにする。背景
   （.pro-video-audio-fill）の濃さが音量をそのまま表す——タイトル文字は
   映像の行に既に出ているので繰り返さず、音量%だけを小さく添える。 */
.pro-track-lane-clip-audio { min-height: 42px; height: auto; }
.pro-video-audio-block {
  background: #1b5e20; color: white; display: flex; align-items: center;
  font-size: 0.9rem; padding: 0 6px; user-select: none; cursor: pointer;
}
.pro-video-audio-fill {
  position: absolute; inset: 0; background: linear-gradient(135deg, #2e7d32, #66bb6a);
  pointer-events: none;
}
.pro-video-audio-block span { position: relative; z-index: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 音量スライダー（タイムラインツールバー、クリップ選択中だけ表示） */
.pro-timeline-volume { display: flex; align-items: center; gap: 6px; }
.pro-timeline-volume input[type='range'] { width: 110px; }
/* 映像ブロック（映像の行・音声の行どちらも）をドラッグで動かしている間の
   見た目——他のクリップにマグネットで吸着した時は枠で強調し、タイムラインの
   下へドラッグして外そうとしている間は薄くする（テロップ・音楽/SEと同じ
   見た目だが、.pro-telop-blockに限定されたクラスとは別の汎用クラスにして
   どのブロック種別にも使えるようにしている）。 */
.pro-clip-block.pro-clip-block-snapped { outline: 2px solid var(--magenta); outline-offset: 1px; }
.pro-clip-block.pro-clip-block-removing { opacity: 0.35; }

/* 🎨 エフェクト一覧 — テロップ・音楽/SE一覧と同じ場所に並ぶ、常設の小さな
   チップ。ドラッグ＆ドロップで下の映像クリップへ付ける（チップ自体は
   増減しない、素材一覧と違って「外す」操作もここには無い）。 */
.effect-list-row { display: flex; flex-wrap: wrap; gap: 8px; }
.effect-chip {
  display: flex; align-items: center; gap: 4px; padding: 6px 10px; border-radius: 999px;
  background: #eef1f6; border: 1px dashed var(--border); font-size: 0.78rem; font-weight: 700;
  cursor: grab; user-select: none;
}
.effect-chip:active { cursor: grabbing; }
/* ニュース/ドラマ/バラエティ風のシーン演出チップの前に挟む小見出し——
   flex-basis:100%で.effect-list-row（flex-wrap）内で必ず改行させる。 */
.effect-chip-genre-label {
  flex-basis: 100%; font-size: 0.72rem; font-weight: 900; color: var(--muted);
  margin: 4px 0 -2px;
}
/* 効果が1つでも付いている映像クリップは、縮小表示されていてもひと目で
   分かるよう、ブロック全体にはっきりした色の枠を付ける。overflow:visibleも
   ここで解除する——カットで細くなったクリップでも下のバッジ自体はブロック
   幅に押し潰されず、はみ出して全部読める形で表示するため（動画のサムネ
   自体は.pro-video-block videoに付けたborder-radiusで角丸を保つので、
   overflowを解除しても見た目は崩れない）。 */
.pro-video-block.has-clip-effects { outline: 3px solid var(--cyan); outline-offset: -3px; overflow: visible; }
/* クリップ（映像ブロック）に今付いている効果を、名前の分かるタグとして
   左上に縦に並べる——アイコンだけでは何の効果か分からない・クリックで
   外せることが伝わりにくいという声を受け、名前と✕（外すボタン）をはっきり
   出す。何枚も重ねて示したいので縦積み。カットで細切れになったクリップ
   でもバッジ自体は常に読める大きさを保つため、ブロック幅には合わせず
   固定の最大幅を持たせ、ブロックからはみ出す形で表示する（隣のブロック
   より手前に出すようz-indexも高くする）。 */
.clip-effect-badges {
  position: absolute; top: 2px; left: 2px; z-index: 5;
  display: flex; flex-direction: column; gap: 3px;
}
.clip-effect-badge {
  display: flex; align-items: center; gap: 4px; height: 20px; padding: 0 5px 0 6px;
  border-radius: 10px; background: rgba(0, 0, 0, 0.85); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 1; cursor: pointer;
  max-width: 140px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}
.clip-effect-badge:hover { background: var(--magenta); }
.clip-effect-badge-icon { flex: 0 0 auto; }
.clip-effect-badge-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
/* ✕（外す）はバッジの中で一番つぶれやすい要素だったので、丸背景を付けて
   独立した押せるボタンに見えるようにし、最小サイズを確保して文字と一緒に
   縮まないようにする。 */
.clip-effect-badge-close {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
  width: 14px; height: 14px; margin-left: 1px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.25); font-size: 10px; font-weight: 900;
}
.clip-effect-badge:hover .clip-effect-badge-close { background: rgba(255, 255, 255, 0.4); }

/* ディゾルブ（クロスフェード）つまみ — 隣り合う映像クリップの境界に浮かせる
   小さな菱形。重なりが無い（まだディゾルブしていない）間は控えめな見た目
   にし、ドラッグして重なりを作ると目立つ色に変わる。 */
.pro-dissolve-handle {
  position: absolute; top: 50%; width: 14px; height: 14px; z-index: 4;
  transform: translate(-50%, -50%) rotate(45deg); cursor: ew-resize;
  background: rgba(255, 255, 255, 0.85); border: 2px solid var(--muted); box-sizing: border-box;
}
.pro-dissolve-handle:hover { border-color: var(--blue); }
.pro-dissolve-handle.pro-dissolve-handle-active { background: var(--blue); border-color: var(--blue); }

/* 現在位置を示すプレイヘッド — 赤い線1本のみ。ルーラー・映像/テロップ
   トラックの高さ全体を貫く縦線。`#pro-timeline-inner`がルーラー+トラック分の
   高さちょうどのラッパーなので、そこを基準に絶対配置する。left はJS側で
   「ラベル列76px + 残り幅の割合」として計算している（トラックレーンの座標系
   に正確に合わせるため）。
   線自体（この要素）はpointer-events:noneにして、映像・音楽・テロップの
   トラックを貫く部分がクリップのクリックや分割・選択の邪魔にならないように
   する——掴んでドラッグできる判定は::before（ルーラーの高さ分＝上端30px、
   .pro-timeline-rulerのheightと揃えてある）だけに限定し、見た目は2px幅の
   まま左右だけ少し広げて掴みやすくしている。 */
.pro-timeline-inner { position: relative; }
.pro-playhead-playback {
  position: absolute; top: 0; bottom: 0; width: 3px; background: #e53935; z-index: 7;
  pointer-events: none;
}
.pro-playhead-playback::before {
  content: ''; position: absolute; top: 0; height: 30px; left: -5px; right: -5px;
  pointer-events: auto; cursor: ew-resize;
}
.pro-playhead-flag {
  position: absolute; top: -4px; left: -4px; width: 0; height: 0;
  border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 6px solid #e53935;
}

/* ✂ 分割の印 — 実際にはクリップを割らず、1つのブロックの中に細い縦線を
   足すだけ。クリックで外せるよう、見た目より少し広い当たり判定にする。 */
.pro-split-markers { position: absolute; inset: 0; pointer-events: none; }
.pro-split-marker {
  position: absolute; top: 0; bottom: 0; width: 10px; margin-left: -5px;
  cursor: pointer; pointer-events: auto;
}
.pro-split-marker::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: 4px; width: 2px;
  background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4);
}
.pro-split-marker:hover::after { background: var(--magenta); }

/* 選択中のクリップ（分割されていれば、その中の1区間だけ）の枠 — 分割の印
   より目立つ、はっきりした色の二重枠にして「これが選ばれている」と一目で
   分かるようにする。クリック判定は持たない（区間だけの移動も含め、すべて
   ブロック本体のポインターベースのドラッグ＝wireVideoBlockDragに任せる）。 */
.pro-clip-selection {
  position: absolute; top: 0; bottom: 0; pointer-events: none; z-index: 2;
  outline: 4px solid #ffd600; outline-offset: -4px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.6), 0 0 10px 2px rgba(255, 214, 0, 0.65);
  background: rgba(255, 214, 0, 0.18);
}

/* 「追加する」系のボタンは、グレーの点線＋薄い文字色だと目立たず気づかれ
   にくかったため、はっきりした色（ブランドブルー）の枠線・文字・薄い背景
   色で、押せる操作だとひと目で分かるようにする。 */
.add-material-btn {
  display: block; width: 100%; padding: 14px; border: 2px dashed var(--blue); border-radius: 12px;
  background: rgba(0, 80, 255, 0.05); color: var(--blue); font-weight: 800; cursor: pointer; margin-top: 4px;
}
.add-material-btn:hover { border-color: var(--cyan); color: var(--cyan); background: rgba(0, 188, 212, 0.08); }

.segment-delete-btn {
  width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,0.06); color: var(--muted);
  display: flex; align-items: center; justify-content: center; font-size: 0.7rem; flex-shrink: 0;
}
.segment-delete-btn:hover { background: #ffcdd2; color: #c62828; }

/* No more accordion — every segment card is always fully visible (so the
   student can see at a glance how much material exists overall). Category
   sections (映像/テロップ/フリップ/画像) stack full-width, one per row, so
   each one has the whole row's width to lay its own cards out horizontally
   (see .category-section-cards) instead of being squeezed into a grid column. */
.timeline { display: flex; flex-direction: column; gap: 16px; margin: 18px 0; }
/* 画面全体を「どのステップか」ではなく「映像／テロップ／フリップ／画像」の
   種類で区切る — 各カードにはどのステップの素材かを示す小さなタグを付けるが、
   それが主たる構成軸にはならないようにする。 */
.category-section {
  border: 2px solid var(--border); border-radius: 14px; background: #fff; padding: 14px;
  display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px;
}
.category-section-header { font-weight: 800; font-size: 1.05rem; }
/* 同じ分類（映像／テロップ／フリップ／画像）内のカードは横に並べ、入り切らない
   分は折り返す — 縦積みより一覧性が高く、同じ種類の素材を横に見比べやすい。 */
/* テロップは型ごとに座布団の高さがまちまち（強調ボタン・バリエーション・
   トーン選択の有無で変わる）なので、横方向の余白（column-gap）より縦方向
   （row-gap）を広めに取り、上の行の操作ボタン類と下の行のラベルが近づき
   すぎないようにする。 */
.category-section-cards { display: flex; flex-direction: row; flex-wrap: wrap; align-items: flex-start; column-gap: 40px; row-gap: 28px; }
.simple-media-card .video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  max-height: 500px;
  background: black;
}
.simple-media-card .video-frame video {
  width: 100%; height: 100%; display: block; object-fit: contain; background: black;
}
/* シークバー（ネイティブcontrols）は一切使わず、常にこの自前の再生/一時停止
   ボタンだけを使う。ボタンはホバー中だけ見せ、離れたら消す。 */
.video-frame-play-btn {
  position: absolute; inset: 0; width: 100%; height: 100%; border: none; padding: 0;
  background: rgba(0, 0, 0, 0.15); color: white; font-size: 2.2rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center; text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
  opacity: 0; transition: opacity 0.15s ease;
}
.video-frame:hover .video-frame-play-btn { opacity: 1; }
.video-frame-play-btn:hover { background: rgba(0, 0, 0, 0.3); }
/* 素材を集める画面のカード — 見出しや使用範囲などは出さず、映像と削除ボタン
   だけのシンプルな見た目にする（どう使うかは④編集する画面で決めるため）。
   幅の上限が無いと、カードが1〜2枚しか無いときに横に間延びして大きく見えて
   しまうので、小さめの幅で揃える。 */
.simple-media-card {
  position: relative; border: 2px solid var(--border); border-radius: 12px;
  overflow: hidden; flex: 0 1 360px;
}
.simple-media-card-delete {
  position: absolute; top: 6px; right: 6px; z-index: 2;
  background: rgba(0, 0, 0, 0.55); color: white;
}
.simple-media-card-delete:hover { background: #c62828; color: white; }
.simple-media-card .media-generating {
  aspect-ratio: 16 / 9; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; background: #fafbff; border: none; border-radius: 0;
  font-size: 0.82rem; color: var(--muted); padding: 10px;
}
/* テロップは外枠カードを持たず、テロップ本体（座布団）だけを置く — 配置
   （ON/OFF・タイミング）はここでは一切管理しない（④編集するの担当）ので、
   枠や状態表示で画面を占有しない。 */
/* 素材を集める画面のテロップカード:
   1行に4個収まるグリッドレイアウトにし、プレビュー枠内で座布団の比率を保ったままズーム拡大して見せる。 */
.category-section[data-category="telop"] .category-section-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}
@media (max-width: 1200px) {
  .category-section[data-category="telop"] .category-section-cards {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }
}
@media (max-width: 600px) {
  .category-section[data-category="telop"] .category-section-cards {
    grid-template-columns: 1fr;
  }
}

.telop-item {
  position: relative; display: flex; flex-direction: column; gap: 8px;
  width: 100%; max-width: 100%; container-type: inline-size;
  background: #fff; border: 1.5px solid var(--border); border-radius: 12px;
  padding: 12px 14px; box-shadow: 0 2px 8px rgba(20, 30, 60, 0.04);
  box-sizing: border-box; justify-content: space-between;
}

.telop-card-wrap { display: flex; flex-direction: column; width: 100%; align-items: center; }
.telop-card-header { display: flex; align-items: center; justify-content: space-between; width: 100%; line-height: 1; margin-bottom: 6px; }
.telop-card-header .telop-kind-label { font-size: 0.75rem; font-weight: 800; color: var(--muted); }
.telop-card-header .segment-delete-btn { position: static; cursor: pointer; color: var(--muted); font-size: 0.85rem; }
.telop-card-header .segment-delete-btn:hover { color: #c62828; }

.telop-box-wrap {
  position: relative; display: inline-flex; flex-direction: column; align-items: stretch; justify-content: center;
  align-self: center; min-height: 105px; padding: 6px 0; overflow: visible;
}

/* 座布団のサイズは本来の形状（fit-content）のまま、文字全体を確実に包み込む */
.telop-item .tv-telop-box {
  outline: none; font-family: inherit; cursor: text;
  width: fit-content;
  max-width: none;
  box-sizing: border-box;
}

/* プレビュー時に種類に応じて拡大表示し、同じような視認性・存在感の大きさに見せる */
.telop-item.kind-setsumei .telop-box-wrap,
.telop-item.kind-haraobi .telop-box-wrap,
.telop-item.kind-voiceover .telop-box-wrap {
  transform: scale(1);
}
.telop-item.kind-name .telop-box-wrap {
  transform: scale(1.35);
  transform-origin: center center;
}
.telop-item.kind-basho .telop-box-wrap {
  transform: scale(2.2);
  transform-origin: center center;
}
.telop-item.kind-side .telop-box-wrap {
  transform: scale(1.85);
  transform-origin: center center;
}
/* 部分強調（強調①＝青字／強調②＝黄色アンダーライン）を行ごとに分けて持つため
   の行ボックス。座布団自体がwidth:fit-contentで文字量に応じて伸び縮みする
   ため、行の幅もwidth:100%ではなくauto（中身の幅）にする——100%のままだと
   「子が親の100%・親は子に合わせてfit-content」という循環参照になり、
   座布団がfit-contentのつもりでも実際には広がってしまう。white-space:
   nowrapで、1行に書いた文字が幅の都合で勝手に2行に折り返されないようにする
   （座布団側はmax-widthを設けていないので、折り返す代わりに座布団自体が
   その1行分の幅まで広がる）。 */
.telop-rich-line { width: auto; text-align: left; min-height: 1.32em; white-space: nowrap; }
.telop-rich-line:empty::before {
  content: attr(data-placeholder); color: rgba(0, 0, 0, 0.35); font-weight: 400;
}
.tv-telop-box.variant-blue .telop-rich-line:empty::before,
.tv-telop-box.variant-sports .telop-rich-line:empty::before { color: rgba(255, 255, 255, 0.6); }
.tv-telop-box .em-1 { color: #0050ff; }
.tv-telop-box.variant-blue .em-1 { color: #ffe800; }
/* 下線だけだと弱く見えるので、マーカーで引いたような太い黄色のハイライト
   （文字の下半分を黄色で塗る）にする。 */
.tv-telop-box .em-2 { background-image: linear-gradient(transparent 55%, #ffe800 55%); }
/* サイドスーパーだけは強調②を黄色ハイライトではなく赤字強調にする
   （マニュアルの「速報」のような赤強調に対応するため）。 */
.tv-telop-box.kind-side .em-2 { background-image: none; color: #ff0000; }
/* 文字数カウンター（.telop-counter）は強調ボタンと同じ行の右下に置く——
   強調ボタンが無い型（名前スーパー等）でも margin-left:auto で右端に残る。 */
.telop-emphasis-toolbar {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  width: 100%; border-top: 1px solid #f1f5f9; padding-top: 8px; margin-top: 4px;
}
.telop-emphasis-btn-1 { color: #0050ff; border-color: #0050ff; }
.telop-emphasis-btn-2 { background-image: linear-gradient(transparent 55%, #ffe800 55%); }
.telop-emphasis-btn-2.kind-side { background-image: none; color: #ff0000; border-color: #ff0000; }
.telop-counter { font-size: 0.78rem; color: var(--muted); margin-left: auto; white-space: nowrap; }
.telop-variant-picker { display: flex; gap: 6px; }
.telop-variant-swatch {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border);
  background-size: cover; background-position: center; cursor: pointer; padding: 0;
}
.telop-variant-swatch.active { border-color: var(--text); box-shadow: 0 0 0 2px var(--text) inset; }

/* テロップの座布団バリエーション — brand/CGマニュアル・ルールのテロップ
   マニュアル・ニュースSPマニュアルと、brand/CGベースの素材を参考にした。 */
.tv-telop-box.variant-white { background: #fff; color: #141414; border-bottom: 0.14em solid var(--blue); }
.tv-telop-box.variant-blue { background: #0050ff; color: #fff; border-bottom: 0.14em solid #ffe800; }
.tv-telop-box.variant-yellow { background: #ffe800; color: #141414; border-bottom: 0.14em solid #141414; }
.tv-telop-box.variant-sports {
  background-image: url('/brand/CGベース/スポーツ・エンタメbase.png'); background-size: cover; background-position: center;
  color: #fff; border-bottom: 0.14em solid #141414;
  -webkit-text-stroke: 0.05em #141414; paint-order: stroke fill;
}
.tv-telop-box.variant-noushaki {
  background-image: url('/brand/CGベース/脳シャキ用薄黄色.png'); background-size: cover; background-position: center;
  color: #141414; border-bottom: 0.14em solid var(--blue);
}

/* ハラオビスーパーは「説明スーパーの1行のみバージョン」— 幅・文字サイズ・
   中央揃えは説明スーパーと完全に同じ比率をそのまま使う（1行あたりの文字数が
   揃ったので同じcqw比率で成立する）。見た目だけ、本物のハラオビ（白地・黒字
   ＋右端の青い縦線・下の黄色い太線）に合わせる。色のバリエーションは持たず
   常に白地（variant-whiteそのまま）。 */
.tv-telop-box.kind-haraobi { border-right: 0.06em solid var(--blue); border-bottom: 0.08em solid #ffe800; }

/* 名前スーパー: 本物の人名SPと同じ、左の青い縦線＋名前の下の黄色い線、さらに
   その下に肩書き（自由入力）を右寄せの小さい青字で表示する帯を続ける。帯は
   .telop-box-wrap内でstretchして座布団と同じ幅に揃う。 */
.kind-name .telop-box-wrap,
.telop-item.kind-name .telop-box-wrap,
.telop-preview-card.kind-name .telop-box-wrap,
.telop-overlay.kind-name .telop-box-wrap {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  background: #fff;
  border-left: 0.1em solid var(--blue);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  width: fit-content;
  max-width: 90cqw;
  overflow: hidden;
  box-sizing: border-box;
}
/* 素材を集める画面の一覧カード（.telop-item/.telop-preview-card）は、他の
   種類と並べた時にカードの縦幅を揃えるため、汎用の.telop-box-wrap
   （min-height:105px、素材一覧カード用の既定値）をそのまま使う。だが実際の
   映像オーバーレイ（.telop-overlay）側ではその105pxという固定pxの最低
   高さに意味が無く、名前＋肩書きの実際の中身（通常は105pxよりずっと低い）
   より白い座布団だけが縦に間延びして大きく見えてしまっていた——中身の
   高さにぴったり合わせる。 */
.telop-overlay.kind-name .telop-box-wrap {
  min-height: 0;
  padding: 0;
}

.tv-telop-box.kind-name {
  background: transparent;
  border-left: none;
  border-bottom: 0.09em solid #ffd400;
  box-shadow: none;
  width: fit-content; min-width: 2em; max-width: 100%;
  min-height: auto;
  padding: 0.1em 0.5em 0.12em 0.5em;
  margin: 0;
  white-space: nowrap; overflow: hidden;
  font-size: 4.3cqw; font-weight: 900; line-height: 1.15;
  letter-spacing: 0.03em;
  box-sizing: border-box;
}
.telop-role-strip {
  background: transparent;
  border-left: none;
  box-shadow: none;
  padding: 0.08em 0.5em 0.12em;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
  display: flex; justify-content: flex-end;
}
.telop-role-input, .telop-role-text {
  border: none; outline: none; background: transparent; color: var(--blue); font-weight: 900;
  text-align: right; font-size: 0.42em; line-height: 1.1; font-family: inherit;
  letter-spacing: 0.02em;
}
.telop-role-text { width: 100%; }
/* input要素は中身に関係なく既定の横幅を持つため、それにつられて
   .telop-role-stripが座布団（名前スーパーはfit-contentで文字数に応じて
   伸び縮みする）より広くなってしまい、黄色い線（座布団のborder-bottom）が
   帯の右端まで届いていないように見えてしまっていた。幅をinputの中身に依存
   させず、常に親（.telop-role-strip、= 座布団と同じ幅にstretchされる）に
   合わせる。 */
.telop-role-input { width: 0; min-width: 0; flex: 1 1 auto; }
.telop-role-input::placeholder { color: rgba(0, 80, 255, 0.35); font-weight: 400; }

/* しゃべりスーパー: 座布団（背景）を持たない、本物の映像に直接重ねる字幕 —
   白字＋黒縁取りが基本形（ニュースSPマニュアルの「しゃべりSP」仕様）。強調は
   黄字（通常の強調①＝青字の代わり）。本番の映像オーバーレイでは完全に透明
   背景にするが、素材を集める画面のカードだけは白いページの上だと白文字が
   見えなくなるので、確認用に暗い背景を敷く。 */
.tv-telop-box.kind-shaberi {
  background: transparent; border: none; box-shadow: none;
  color: #fff; -webkit-text-stroke: 0.06em #141414; paint-order: stroke fill;
}
.tv-telop-box.kind-shaberi .em-1 { color: #ffe800; -webkit-text-stroke: 0.06em #141414; }
.telop-item .tv-telop-box.kind-shaberi { background: linear-gradient(160deg, #3a4a63, #222c3d); }
/* 確認用の暗い背景の上だと、既定の薄黒いプレースホルダーが見えなくなるので
   明るい色にする。 */
.tv-telop-box.kind-shaberi .telop-rich-line:empty::before { color: rgba(255, 255, 255, 0.55); }

/* ボイスオーバースーパー: ポジティブ（CGベースの白い柄の座布団・黒字）／
   ネガティブ（黒ベース・白字）の2トーン（ニュースSPマニュアルの「ボイス
   オーバー」仕様：ポジ用＝外国語・政治家のONなど、ネガ用＝事件事故の供述）。
   基本座布団と同じく枠線は無し。 */
.tv-telop-box.kind-voiceover.tone-positive {
  background-image: url('/brand/CGベース/白.png'); background-size: cover; background-position: center;
  color: #141414; border-bottom: none;
}
.tv-telop-box.kind-voiceover.tone-negative { background: #222; color: #fff; border-bottom: none; }
.tv-telop-box.kind-voiceover.tone-negative .em-1 { color: #6c9aff; }
.telop-tone-picker { display: flex; gap: 6px; }
.telop-tone-picker .active { background: var(--blue); color: #fff; border-color: var(--blue); }

/* 場所スーパー: しゃべりスーパーと同じく座布団（背景）を持たず、本物の映像に
   直接重ねる — ただし字幕ではなく「地名＋時刻」などを左寄せで積む、ニュース
   SPマニュアルの「場所SP」仕様。1つの共通の座布団枠ではなく、行ごとに自分の
   文字幅ぴったりの細い帯（左の縦線＋下線）を持つ（行によって文字数が違えば
   帯の長さも変わる）。白字＋黒縁取りで本物の映像の上でも読める。 */
.tv-telop-box.kind-basho {
  background: transparent; border-bottom: none; box-shadow: none;
  width: fit-content; max-width: 90cqw; min-height: 0; padding: 0;
  align-items: flex-start; text-align: left;
  color: #fff; -webkit-text-stroke: 0.14em #141414; paint-order: stroke fill;
  /* 他のスーパーは文字サイズを何度か拡大してきたが、場所スーパーだけは
     控えめな大きさのまま。rem上限を外してcqwだけにした際、全体の基準も
     下げ直している。 */
  font-size: 1.9cqw;
}
.tv-telop-box.kind-basho .telop-rich-line {
  width: fit-content; text-align: left;
  border-left: 0.14em solid var(--blue); border-bottom: 0.1em solid var(--blue);
  padding: 0.05em 0.4em 0.1em; margin-bottom: 0.16em; min-height: 1em;
}
.tv-telop-box.kind-basho .telop-rich-line:last-child { margin-bottom: 0; }
/* 確認用カードだけ、白いページの上でも見えるよう暗い背景を敷く（本番の映像
   オーバーレイでは完全に透明）。 */
.telop-item .tv-telop-box.kind-basho {
  background: linear-gradient(160deg, #3a4a63, #222c3d); padding: 0.4em 0.5em; box-shadow: 0 3px 14px rgba(0, 0, 0, 0.3);
  font-size: 1.9cqw;
}
.tv-telop-box.kind-basho .telop-rich-line:empty::before { color: rgba(255, 255, 255, 0.55); }

/* サイドスーパー: ニュースSPマニュアルの「サイド」仕様——白地に青の上線・
   黄色の下線、右下に小さく「NEWS」ラベル（固定の飾り文字、擬似要素）。
   画面右上に固定で出すため、.telop-overlay.kind-sideで右端基準の配置に
   している。 */
.tv-telop-box.kind-side {
  position: relative; background: #fff; color: #141414;
  border-top: 0.14em solid var(--blue); border-bottom: 0.08em solid var(--yellow);
  /* サイドスーパーは画面の隅に小さく出す補足情報用の型なので、他のスーパー
     向けに拡大してきた共通フォントサイズは使わず、控えめなサイズに戻す
     （場所スーパーと同じ考え方）。max-widthも明示しておく——無いと、長い
     1行がmax-widthの無い座布団の方は際限なく伸び、外側の.telop-overlay
     （max-width:92%で頭打ち）からはみ出して、右端基準の配置がずれて
     見えてしまう。以前は560pxのような絶対px上限も混ぜていたが、全画面で
     コンテナが大きくなった時にフォントサイズ（cqw）だけが伸び続け、
     箱の幅は560pxで頭打ちになって文字が箱からはみ出す（崩れて見える）
     原因になっていたため、88cqwのみの相対値に統一した。 */
  font-size: 2cqw;
  max-width: 88cqw;
}
.tv-telop-box.kind-side::after {
  content: 'NEWS'; position: absolute; right: 0.3em; bottom: 0.05em;
  font-size: 0.3em; font-weight: 700; color: var(--blue); letter-spacing: 0.02em;
}

.telop-counter.at-limit { color: #c62828; font-weight: 700; }

.file-drop {
  border: 2px dashed var(--blue); border-radius: 8px; padding: 12px; text-align: center; font-size: 0.82rem;
  color: var(--blue); font-weight: 700; cursor: pointer; background: rgba(0, 80, 255, 0.05);
}
.file-drop:hover { border-color: var(--cyan); color: var(--cyan); background: rgba(0, 188, 212, 0.08); }

.media-source-choice { display: flex; flex-wrap: wrap; gap: 8px; }
.media-source-choice .file-drop { flex: 1 1 200px; }
.media-source-choice .btn { flex: 1 1 200px; justify-content: center; }
/* 同じ理由で.howl-panel[hidden]にもある上書き — display:flexな要素は、
   素のhidden属性だけでは本当には隠れない（同じ詳細度で後勝ちになるため）。 */
.media-source-choice[hidden] { display: none; }
.media-generating {
  border: 2px dashed var(--cyan); border-radius: 8px; padding: 24px 16px;
  text-align: center; font-size: 0.85rem; color: var(--muted);
  background: rgba(0, 188, 212, 0.05); line-height: 1.6;
}
.busy-spinner {
  display: inline-block; width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid rgba(21, 101, 192, 0.25); border-top-color: var(--blue);
  animation: spin 0.7s linear infinite;
}
.busy-spinner-lg {
  display: inline-block; width: 26px; height: 26px; border-radius: 50%;
  border: 3px solid rgba(0, 188, 212, 0.25); border-top-color: var(--cyan);
  animation: spin 0.8s linear infinite; margin-bottom: 8px;
}

.modal-overlay {
  position: fixed; inset: 0; background: rgba(10, 14, 24, 0.7);
  display: flex; align-items: center; justify-content: center;
  z-index: 100; padding: 16px;
}
.modal-box {
  background: var(--card); border-radius: var(--radius); padding: 22px;
  max-width: 640px; width: 100%; max-height: 92vh; overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}
.modal-box h2 { margin-top: 0; }
.modal-box textarea { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); font-family: inherit; font-size: 0.95rem; }

.modal-box.camera-modal { max-width: 960px; }

/* 🖼 フリップ作成モーダル — 「かんたん」(内容を書くだけ)／「くわしく」
   (THE TIME,スタイルの構造化入力＋テンプレート or AI生成の選択) の2モード。 */
.flip-modal-box .field { margin-bottom: 10px; }
.flip-modal-box .field label { display: block; font-size: 0.82rem; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.flip-modal-box .field input[type="text"] {
  width: 100%; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); font-family: inherit; font-size: 0.92rem;
}
.flip-mode-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.flip-mode-tab {
  flex: 1; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); background: #eef1f6;
  font-weight: 700; font-size: 0.85rem; cursor: pointer; color: var(--text);
}
.flip-mode-tab.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.flip-image-preview-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.flip-image-preview-thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }
.flip-method-row { display: flex; gap: 16px; margin-top: 6px; font-size: 0.88rem; }
.flip-method-row label { display: flex; align-items: center; gap: 4px; cursor: pointer; }

/* 全画面・横画面での撮影 — スマホサイズの画面でカメラを開いたときだけ適用。
   カメラ映像（.camera-stage）を画面いっぱいの絶対配置にして、タイトル・
   バーチャル背景・操作ボタンはその上に浮かせる「本物のカメラアプリ」の
   レイアウトにする — 縦に並べて積み上げると、横向きの狭い高さの画面では
   映像エリアがどんどん押しつぶされてしまうため。 */
.modal-overlay.camera-modal-fullscreen { padding: 0; align-items: stretch; justify-content: stretch; }
.camera-modal-fullscreen .modal-box.camera-modal {
  max-width: none; width: 100%; height: 100%; height: 100dvh; max-height: none;
  border-radius: 0; padding: 0; position: relative; overflow: hidden;
}
.camera-modal-fullscreen .camera-stage {
  position: absolute; inset: 0; margin: 0; border-radius: 0; aspect-ratio: unset;
}
/* No room (or real need) for a title bar once this is a full-bleed camera
   view — real camera apps don't show one either. */
.camera-modal-fullscreen h2 { display: none; }
.camera-modal-fullscreen .camera-bg-row {
  position: absolute; left: 0; right: 0; bottom: 76px; z-index: 3; margin: 0;
  max-height: 42vh; overflow-y: auto; box-sizing: border-box;
  background: rgba(10, 14, 24, 0.78); padding: 10px 12px; border-radius: 14px 14px 0 0;
}
.camera-modal-fullscreen .camera-bg-label { color: white; }
.camera-modal-fullscreen .meta#cam-bg-status { color: rgba(255, 255, 255, 0.85); }
.camera-modal-fullscreen .camera-controls {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; margin: 0;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgba(0, 0, 0, 0.65), transparent);
  justify-content: center;
  /* Three buttons (録画開始・カメラ切替・キャンセル) don't fit one row on a
     narrow phone at normal size — wrapping to 2 lines pushed the 2nd line
     past this bar's own height and under the bg-row panel above it. Shrink
     and keep to one (scrollable, if truly needed) line instead, so this
     bar's height stays predictable. */
  flex-wrap: nowrap; overflow-x: auto; gap: 6px;
}
.camera-modal-fullscreen .camera-controls .btn {
  padding: 9px 12px; font-size: 0.8rem; white-space: nowrap; flex-shrink: 0;
}
.camera-modal-fullscreen #cam-status {
  position: absolute; top: 10px; left: 10px; z-index: 3; margin: 0;
  color: white; background: rgba(0, 0, 0, 0.55); padding: 3px 10px; border-radius: 8px; font-size: 0.75rem;
}
.camera-modal-fullscreen #cam-status:empty { display: none; }

/* 横（ランドスケープ）選択時: 映像プレビューは縦のときと同じ全画面表示の
   ままにし（黒帯を出さない）、代わりに操作UIを「実機を横に持ち替えたとき」と
   同じ配置・向きへ再配置する — 子どもはスマホを縦に持ったままの方が構えやすい
   が、録画結果は横長（16:9）にしたい、という撮り方を想定している。 */
.camera-ui-landscape .camera-controls {
  left: auto; right: 0; top: 0; bottom: 0; width: auto;
  flex-direction: column; justify-content: center; align-items: center;
  padding: 12px calc(8px + env(safe-area-inset-right)) 12px 8px;
  background: linear-gradient(to left, rgba(0, 0, 0, 0.65), transparent);
  /* Rotating each button in place doesn't shrink the column space it still
     reserves (its un-rotated width/height) — a wide "カメラ切替" label's
     rotated height is taller than its own reserved row, so a plain small gap
     lets neighbors visually collide. This gap is sized for the longest label. */
  gap: 58px; overflow-x: visible; overflow-y: auto;
}
.camera-ui-landscape .camera-controls .btn { transform: rotate(90deg); }
/* 録画中はカメラ切替・キャンセルを一旦隠す（どちらも録画中は押せない操作な
   ので、押せないボタンを並べておくより消しておく方が分かりやすい）。 */
#cam-record { background: #e53935; }
.camera-ui-landscape .camera-indicators { transform: rotate(90deg); }
.camera-ui-landscape .camera-orientation-toggle,
.camera-ui-landscape .camera-bg-toggle {
  transform: rotate(90deg);
}
/* バーチャル背景パネルも、主要操作ボタン（.camera-controls、右側面）と対に
   なる形で左側面に配置し、中身も90°回転させる。 */
.camera-ui-landscape .camera-bg-row {
  left: 0; right: auto; top: 0; bottom: 0; width: 220px;
  border-radius: 0 14px 14px 0; max-height: none; overflow-y: auto;
}
.camera-ui-landscape .camera-bg-row > * { transform: rotate(90deg); }

.camera-stage {
  position: relative; background: black; border-radius: 12px; overflow: hidden;
  aspect-ratio: 16 / 9; margin-bottom: 14px;
}
/* 縦画面・横画面の切り替えボタン — 常に表示（物理的な回転は検知しない。検知
   して自動対応しようとすると、回転のたびにカメラが勝手にズームし直すような
   挙動を招いたため）。インジケーター（音声/明るさ）が右上にあるため、左上に
   置いて重ならないようにする。 */
.camera-orientation-toggle {
  position: absolute; top: 10px; left: 10px; z-index: 4;
  border: none; border-radius: 999px; background: rgba(0, 0, 0, 0.55); color: white;
  font-size: 0.8rem; font-weight: 700; cursor: pointer; padding: 6px 12px;
}
/* バーチャル背景パネルを開閉するトグル — 全画面モードでのみ表示（通常の
   ダイアログ表示ではパネルは映像の邪魔にならない場所に常に出ているので不要）。
   既定では閉じておき、映像の邪魔にならないようにする。 */
.camera-bg-toggle {
  display: none; position: absolute; top: 54px; left: 10px; z-index: 4;
  width: 34px; height: 34px; border-radius: 50%; border: none;
  background: rgba(0, 0, 0, 0.55); color: white; font-size: 1.05rem; cursor: pointer;
  align-items: center; justify-content: center; padding: 0;
}
.camera-modal-fullscreen .camera-bg-toggle { display: flex; }
.camera-bg-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.camera-bg-close {
  border: none; background: none; color: inherit; cursor: pointer; font-size: 0.95rem;
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
}
.camera-bg-close:hover { background: rgba(255, 255, 255, 0.2); }
.camera-stage video { width: 100%; height: 100%; object-fit: cover; display: block; }
/* The raw feed is only a frame source now (see cam-bg-canvas below) — it still
   decodes in the background but is never shown directly. */
.camera-stage video#cam-preview { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.camera-stage canvas.cam-bg-canvas { width: 100%; height: 100%; display: block; object-fit: cover; }
/* Mirror only the live self-view (selfie-style, front camera only — a rear-
   camera shot of something else being mirrored just looks backwards) — the
   actual recorded pixels in the canvas buffer stay unmirrored either way. */
.camera-stage canvas.cam-bg-canvas.mirror-selfie { transform: scaleX(-1); }
.face-guide {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 34%; height: 62%; border: 3px dashed var(--cyan); border-radius: 50% / 40%;
  pointer-events: none;
}
.camera-indicators { position: absolute; top: 10px; right: 10px; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.indicator {
  background: rgba(0,0,0,0.6); color: #ffb74d; padding: 4px 10px; border-radius: 999px;
  font-size: 0.78rem; font-weight: 700;
}
.indicator.ok { color: #69f0ae; }

.camera-bg-row { margin-bottom: 10px; }
.camera-bg-label { font-weight: 700; font-size: 0.85rem; margin-bottom: 6px; color: var(--muted); }
.camera-bg-options { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.camera-bg-thumb {
  border: 2px solid var(--border); background: #fff; border-radius: 10px;
  padding: 6px 12px; font-size: 0.82rem; cursor: pointer; font-weight: 600; color: var(--text);
}
.camera-bg-thumb.active { border-color: var(--blue); background: rgba(0, 80, 255, 0.08); color: var(--blue); }
/* Approved background photos (public/background/) — shown as a cropped
   preview of the actual image rather than a text label. */
.camera-bg-thumb.camera-bg-photo {
  width: 64px; height: 44px; padding: 0; border-radius: 8px; overflow: hidden;
  background-size: cover; background-position: center; position: relative;
}
.camera-bg-thumb.camera-bg-photo.active { border-color: var(--blue); box-shadow: 0 0 0 2px var(--blue) inset; }

.camera-controls { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }

#graphic-preview-wrap canvas { width: 100%; height: auto; border-radius: 12px; margin-top: 14px; display: block; }

/* 編集する画面のプレビューだけ、本物のテレビのような枠で囲む（mountPlayer
   のopts.editableTelopがtrueの時だけ.preview-wrapをこれで包む）— 視聴・
   発表会モードなど他の画面のプレビューは対象外、素の.preview-wrapのまま。 */
.tv-frame {
  background: linear-gradient(155deg, #4a5058, #16181c 65%);
  border-radius: 20px;
  padding: 14px 14px 26px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  position: relative;
}
.tv-frame .preview-stage {
  border-radius: 6px;
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.7);
}
/* 本体下部の電源ランプ風のアクセント——テレビらしさを出すための小さな飾り。 */
.tv-frame::after {
  content: '';
  position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%);
  width: 6px; height: 6px; border-radius: 50%;
  background: #ff5252; box-shadow: 0 0 5px 1px rgba(255, 82, 82, 0.8);
}

/* .preview-wrapは「全画面にする要素」そのもの——ブラウザのFullscreen API
   は、実際にrequestFullscreen()した要素自身には強制的にwidth:100%・
   height:100%を当ててしまい（CSSのaspect-ratioやmax-height、さらにJSで
   inline styleに直接pxを指定しても、要素自身が全画面対象だとそれらが
   効かない——実機で検証して判明）、普通のCSS/JSでは16:9を保てない。
   そのため、実際に16:9を保ってサイズ・位置を決めるのは内側の.preview-stage
   に任せ、.preview-wrap自体は「全画面になったら画面いっぱいの黒い舞台になり、
   .preview-stageを中央に配置するだけの入れ物」に徹する。通常時（全画面で
   ない時）は.preview-wrapはただの透明な入れ物で、見た目（黒背景・角丸・
   16:9の比率）は全部.preview-stage側が持つ。 */
.preview-wrap { position: relative; }
.preview-stage {
  position: relative; background: black; border-radius: 12px; overflow: hidden;
  aspect-ratio: 16 / 9; max-height: min(640px, 62vh); margin: 0 auto;
  container-type: inline-size;
}
/* ⛶ 全画面プレビュー — .preview-wrap自体をFullscreen APIで全画面にする
   （wireFullscreenButton）。.preview-wrap:fullscreenは画面いっぱいの黒い
   舞台（flexで中央寄せ）になり、実際の16:9の矩形（.preview-stage）は
   applyFullscreenPreviewSize()がJSで「画面に収まる最大の16:9」のpxを
   直接計算して指定する。動画・テロップ・時計天気ウィジェットは.preview-
   stage基準の%指定・cqw単位なので、.preview-stageが大きくなれば同じ比率で
   一緒に大きくなる。 */
.preview-wrap:fullscreen, .preview-wrap:-webkit-full-screen {
  display: flex; align-items: center; justify-content: center; background: #000;
}
.preview-wrap:fullscreen .preview-stage, .preview-wrap:-webkit-full-screen .preview-stage {
  max-height: none; margin: 0; border-radius: 0;
}
/* 動画がまだ無い編集する画面でも、動画がある時と同じ16:9の枠を確保する
   （黒背景の上に白文字で案内を出す）。 */
.preview-wrap-empty { display: flex; align-items: center; justify-content: center; }
.preview-wrap-empty .empty-state { color: rgba(255, 255, 255, 0.75); padding: 20px; }
.preview-wrap video { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: contain; background: black; }
.preview-wrap video.inactive { opacity: 0; pointer-events: none; }
.preview-wrap video.active { opacity: 1; }
/* 映像の尺より後ろ（テロップ/音楽だけの「尻尾」区間）は、最後のフレームを
   映したままにせず真っ黒にする——.preview-wrap自体が黒背景なので、重なって
   いる<video>を隠すだけで済む。 */
.preview-wrap.in-tail video.active { opacity: 0; }

/* 🕐 左上の時計・天気ウィジェット（「THE TIME,」風の常設ブランディング
   オーバーレイ）— テロップと違いタイムライン配置を持たず、編集するの
   ボタンひとつでON/OFFするだけ。時刻・天気の中身は今は仮の固定表示。 */
.clock-weather-overlay {
  position: absolute; top: 4%; left: 4%; z-index: 5; pointer-events: none;
  display: flex; align-items: flex-start; gap: 2.2cqw; font-size: 2.6cqw;
}
.clock-weather-overlay[hidden] { display: none; }
.cw-clock-box {
  position: relative; background: var(--blue); color: #fff; border-radius: 0.4em;
  padding: 0.35em 0.7em 0.55em; display: flex; align-items: baseline; gap: 0.2em;
  box-shadow: 0 0.15em 0.5em rgba(0, 0, 0, 0.35); font-weight: 900; white-space: nowrap;
}
.cw-clock-brand { font-size: 0.4em; line-height: 1.05; margin-right: 0.2em; }
.cw-clock-time { font-size: 1.3em; }
.cw-clock-sec { font-size: 0.55em; margin-left: 0.1em; }
.cw-clock-date {
  position: absolute; left: 0.6em; bottom: -0.65em; background: var(--yellow); color: #141414;
  font-size: 0.42em; font-weight: 900; border-radius: 0.3em; padding: 0.15em 0.5em;
  box-shadow: 0 0.1em 0.3em rgba(0, 0, 0, 0.3); white-space: nowrap;
}
.cw-weather-box {
  display: flex; align-items: center; gap: 0.15em; color: #141414; font-weight: 900;
  text-shadow: 0 0 0.2em #fff, 0 0 0.2em #fff, 0 0 0.2em #fff; white-space: nowrap;
}
.cw-weather-city { font-size: 1em; }
.cw-weather-icon { font-size: 1.3em; }
.cw-weather-temp { font-size: 0.95em; color: #e65100; }

/* 🎬 シーン演出（ニュース/ドラマ/バラエティ風の重ね合わせ演出）—
   エフェクト一覧（CLIP_EFFECTS）の色フィルターとは別枠で、seg.sceneEffect
   として付ける「画面に重ねる」演出。sceneEffectOverlayHtml()が描く中身と
   対応する。色み自体はSCENE_EFFECTS[].videoFilterとして<video>のCSS
   filterに合成されるので、ここはあくまで重ねる要素・ビネット・粒子だけを
   持つ（文字やバッジなどのグラフィックは出さない）。 */
.scene-effect-layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.preview-wrap.in-tail .scene-effect-layer { opacity: 0; }

/* 中継カメラ風 — プロのカメラマンが肩に乗せて構えているような、ごく微細な
   手持ちの揺れ（サスペンスの揺れよりさらに控えめ）。 */
video.scene-fx-engCam { animation: scene-shake-subtle 3.4s ease-in-out infinite; }
@keyframes scene-shake-subtle {
  0%, 100% { transform: translate(0, 0); }
  30% { transform: translate(0.15%, -0.1%); }
  60% { transform: translate(-0.1%, 0.15%); }
}

/* 記録映像風（防犯カメラ・アーカイブ）— 均一なデジタルノイズが常にちらつく。 */
.scene-surveillance-noise {
  position: absolute; inset: -2%;
  background-image:
    repeating-linear-gradient(0deg, rgba(255,255,255,0.08) 0px, rgba(255,255,255,0.08) 1px, transparent 1px, transparent 2px),
    repeating-linear-gradient(90deg, rgba(0,0,0,0.06) 0px, rgba(0,0,0,0.06) 1px, transparent 1px, transparent 3px);
  mix-blend-mode: overlay;
  animation: scene-noise-flicker 0.2s steps(2) infinite;
}
@keyframes scene-noise-flicker { 0% { opacity: 0.3; } 50% { opacity: 0.5; } 100% { opacity: 0.35; } }

/* ゴールデンアワー — 画面上から淡く差し込む夕暮れの光被り。 */
.scene-golden-glow {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 30% 0%, rgba(255,196,110,0.5) 0%, rgba(255,196,110,0) 55%),
    radial-gradient(ellipse at center, rgba(255,255,255,0) 60%, rgba(120,60,10,0.16) 100%);
}

/* ツッコミ衝撃（質感のみ版）— グラフィックは出さず、一瞬だけ画面全体が
   寒色のモノトーンに沈み、直後に白飛びするコマ落ち風の変調だけで衝撃を
   伝える。stepsで敢えてカクカクした変化にし、フレームレートが落ちた
   ような間の抜けたテンポ感を出す。 */
video.scene-fx-shockTint { animation: scene-shock-tint 0.7s linear both; }
@keyframes scene-shock-tint {
  0% { filter: none; }
  15% { filter: grayscale(0.8) hue-rotate(180deg) saturate(2) brightness(0.8); }
  35% { filter: none; }
  50% { filter: brightness(2.2) contrast(1.3) saturate(0); }
  70% { filter: none; }
  100% { filter: none; }
}

/* 回想ノスタルジー／サスペンス緊迫 — 色みは<video>自身のCSS filter
   （SCENE_EFFECTS[].videoFilter）が担当し、ここはビネット（四隅を暗く/
   明るく縁取る）だけを重ねる。 */
.scene-vignette { position: absolute; inset: 0; }
.scene-vignette-warm { background: radial-gradient(ellipse at center, rgba(255,255,255,0) 55%, rgba(255,244,214,0.55) 100%); }
.scene-vignette-cool { background: radial-gradient(ellipse at center, rgba(0,0,0,0) 45%, rgba(0,10,20,0.6) 100%); }
/* 回想シーンの定番、上下の黒味（シネマスコープ風レターボックス）。 */
.scene-letterbox-top, .scene-letterbox-bottom { position: absolute; left: 0; width: 100%; height: 10%; background: #000; }
.scene-letterbox-top { top: 0; }
.scene-letterbox-bottom { bottom: 0; }
/* サスペンスは呼吸に合わせた小刻みな手持ちカメラ風の揺れを<video>自体に。 */
video.scene-fx-suspense { animation: scene-shake 2.6s ease-in-out infinite; }
@keyframes scene-shake {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(0.4%, -0.3%); }
  50% { transform: translate(-0.3%, 0.2%); }
  75% { transform: translate(0.3%, 0.3%); }
}

/* 運命の出会い — 斜めに差し込んで引いていくライトリーク。 */
.scene-light-leak {
  position: absolute; top: -40%; left: -60%; width: 90%; height: 220%;
  background: linear-gradient(115deg, rgba(255,214,140,0) 30%, rgba(255,214,140,0.85) 50%, rgba(255,214,140,0) 70%);
  transform: rotate(-12deg);
  animation: scene-light-leak-sweep 2.6s ease-in-out infinite;
}
@keyframes scene-light-leak-sweep {
  0% { left: -60%; opacity: 0; }
  15% { opacity: 1; }
  55% { opacity: 0.4; }
  100% { left: 110%; opacity: 0; }
}
/* Positioned per-segment via inline left/top (see renderActiveTelops / TELOP_KINDS
   defaultPosition in app.js) — a real TV telop isn't always dead-center at the
   bottom, so this is a free-floating anchor rather than a fixed flexbox-centered
   bar. The x/y coordinate is the box's CENTER point by default (translate(-50%,-50%)). */
/* width指定なし（auto）だと、position:absoluteのshrink-to-fit計算が
   「left〜コンテナ右端までの残り幅」を利用可能幅として使ってしまう——
   leftが右端近く（96%など）だと残り幅がほぼ0になり、本来の内容の幅を無視
   して箱が極端に細く潰れ、日本語テキストが1文字ずつ改行されて縦書きの
   ように見えてしまっていた。width:max-contentにして、位置に関係なく常に
   内容そのものの幅（max-widthで上限は従来通り掛ける）で決まるようにする。 */
.telop-overlay {
  position: absolute; left: 50%; top: 88%; transform: translate(-50%, -50%);
  pointer-events: none; width: max-content; max-width: 92%;
}
.telop-overlay:empty { display: none; }
.telop-overlay.telop-editable { pointer-events: auto; cursor: grab; touch-action: none; }
.telop-overlay.telop-editable:active { cursor: grabbing; }
/* 場所スーパーだけは中央揃え（水平方向のtranslate(-50%)）をやめ、左端を
   x座標に合わせる——場所によって文字数（箱の横幅）が変わるため、中央揃え
   のままだと文字数ごとに箱の左端（＝画面左からの位置）がずれて見えてしまう
   （縦方向のセンタリングはそのまま残す）。 */
.telop-overlay.kind-basho { transform: translateY(-50%); }
/* サイドスーパーは画面右上の決まった位置に出す型なので、中央揃えではなく
   右端をx座標に合わせる——文字量が増えても右端の位置はずれず、箱が左へ
   伸びる（場所スーパーの左揃えと逆向きの考え方）。 */
.telop-overlay.kind-side { transform: translateY(-50%) translateX(-100%); }
/* News-telop look: solid white card, bold black text, a colored accent bar along
   the bottom edge — replacing the old dark rounded "cushion" caption style. */
/* Fixed footprint regardless of character count (1 char or the full 16×2 max
   looks the same size) — a real news telop's box doesn't resize itself to fit
   less text, it just centers short text inside the same frame. */
.tv-telop-box {
  background: #fff; color: #141414; font-weight: 700; box-sizing: border-box;
  /* 座布団の横幅は文字量にあわせて伸び縮みする（fit-content）——固定幅の
     ままだと短い文字でも長い文字でも同じ幅になってしまうため。max-widthを
     設けない（.telop-overlay側のmax-width:92%が外側の安全弁）ことで、1行
     分の文字がそのまま収まる幅まで必ず広がり、.telop-rich-line側のnowrapと
     合わせて、意図しない自動改行が起きないようにする。 */
  width: fit-content;
  min-height: calc(1.5em * 2 + 0.05em + 0.08em);
  padding: 0.05em 0.4em 0.08em;
  /* 以前はclamp(rem下限, cqw, rem上限)で、プレビューが小さい/大きい時に
     rem側の下限・上限が先に効いてしまい、映像に対するテロップの大きさの
     「割合」がプレビューのサイズによって変わって見えていた（全画面にした
     時に相対的に小さく見える、など）。cqwだけにして、映像に対する比率が
     常に一定になるようにする。 */
  font-size: 5cqw; line-height: 1.32;
  white-space: pre-line; border-bottom: 0.14em solid var(--blue);
  box-shadow: 0 3px 14px rgba(0,0,0,0.3);
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; text-align: left;
}
.seek-row { display: flex; gap: 10px; align-items: center; margin-top: 10px; }
.seek-row .meta { min-width: 38px; text-align: center; font-variant-numeric: tabular-nums; }
.seek-track-wrap { position: relative; flex: 1; display: flex; align-items: center; height: 22px; }

/* The colored bands ARE the visible track — the native range track is made fully
   transparent (below) so these show through. Width of each band is set inline
   (proportional to that clip's actual duration), so the bar itself reads as a
   literal, colored map of each material's IN-OUT range. */
.seek-segments {
  position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%);
  height: 10px; border-radius: 5px; overflow: hidden; display: flex;
  background: var(--border); pointer-events: none; z-index: 1;
  box-shadow: inset 0 1px 2px rgba(20, 30, 60, 0.12);
}
.seek-segments .seg-band { flex: 1 1 0; min-width: 3px; height: 100%; background: var(--border); position: relative; }
.seek-segments .seg-band:not(:last-child)::after {
  content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 1px; background: rgba(255, 255, 255, 0.6);
}
.seek-segments .seg-band.active { background: linear-gradient(90deg, var(--cyan), #26e0f5); }
.seek-segments .seg-band.done { background: var(--blue); }

/* Marks each clip's exact IN point on top of the colored bands. */
.seek-ticks { position: absolute; left: 0; right: 0; top: 50%; height: 0; pointer-events: none; z-index: 3; }
.seek-ticks .tick {
  position: absolute; top: -9px; width: 4px; height: 18px; border-radius: 2px;
  background: var(--yellow); box-shadow: 0 0 0 1.5px rgba(20, 30, 60, 0.55);
  transform: translateX(-2px);
}
.seek-ticks .tick::before {
  content: ''; position: absolute; top: -6px; left: 50%; transform: translateX(-50%);
  border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 6px solid var(--yellow);
  filter: drop-shadow(0 1px 0.5px rgba(20, 30, 60, 0.55));
}

/* The range input itself: fully transparent track (the bands above provide the
   visible color), custom thumb on top so dragging still feels native. */
.seek-bar {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 18px; margin: 0; background: transparent;
  cursor: pointer; position: relative; z-index: 4;
}
.seek-bar:disabled { cursor: not-allowed; }
.seek-bar::-webkit-slider-runnable-track { height: 10px; background: transparent; }
.seek-bar::-moz-range-track { height: 10px; background: transparent; }
.seek-bar::-moz-range-progress { background: transparent; }
.seek-bar::-webkit-slider-thumb {
  -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%;
  background: var(--cyan); border: 2px solid white; box-shadow: 0 1px 3px rgba(20, 30, 60, 0.45);
  margin-top: -3px; cursor: pointer;
}
.seek-bar::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%; border: 2px solid white;
  background: var(--cyan); box-shadow: 0 1px 3px rgba(20, 30, 60, 0.45); cursor: pointer;
}
.seek-bar:disabled::-webkit-slider-thumb { background: var(--muted); }
.seek-bar:disabled::-moz-range-thumb { background: var(--muted); }

.seek-labels-row { margin-top: 4px; }
.seek-labels { display: flex; flex: 1; min-width: 0; }
.seek-labels .seg-label {
  flex: 1 1 0; min-width: 0; text-align: center; font-size: 0.68rem; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 3px;
}
.seek-labels .seg-label.active { color: var(--blue); font-weight: 700; }
.seek-labels .seg-label.done { color: var(--muted); }

.player-controls { display: flex; gap: 10px; align-items: center; margin-top: 10px; flex-wrap: wrap; }

.playlist { display: grid; gap: 12px; }
.playlist-item {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: white; border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px; cursor: pointer;
}
.playlist-item:hover { border-color: var(--cyan); }
.playlist-item .rating-badge { font-weight: 800; color: var(--blue); }

.stars { display: flex; gap: 4px; font-size: 1.6rem; cursor: pointer; }
.stars span { color: #dcdfe6; }
.stars span.filled { color: var(--yellow); }

.comment-list { max-height: 220px; overflow-y: auto; display: grid; gap: 8px; margin-top: 10px; }
.comment-item { background: #f4f6fa; border-radius: 8px; padding: 8px 12px; font-size: 0.85rem; }
.comment-item b { color: var(--blue); margin-right: 6px; }

.empty-state { text-align: center; color: var(--muted); padding: 40px 10px; }

.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: #202634; color: white; padding: 10px 20px; border-radius: 999px;
  font-size: 0.85rem; opacity: 0; pointer-events: none; transition: opacity 0.2s ease;
  z-index: 1100;
}
.toast.show { opacity: 1; }

.spinner {
  display: inline-block; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.5); border-top-color: white;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 600px) {
  .app-header { flex-direction: column; align-items: flex-start; }
}

/* 管理者画面（AI下書きプロンプト設定） */
.admin-placeholder-list { font-size: 0.82rem; color: var(--muted); line-height: 1.8; margin: 8px 0 14px; }
.admin-placeholder-list code { background: #eef1f6; padding: 1px 6px; border-radius: 4px; color: var(--blue); font-weight: 700; }
.admin-preview-output {
  white-space: pre-wrap; background: #f4f6fa; border: 1px solid var(--border); border-radius: 8px;
  padding: 12px; font-size: 0.8rem; line-height: 1.6; min-height: 60px; margin-top: 10px;
}

/* Always-visible background-AI-task panel — bottom-left (ホゥ博士 owns
   bottom-right) so the two never collide. Only rendered into when at least
   one task is running; otherwise emptied and hidden entirely. */
#ai-tasks-widget {
  position: fixed; left: 20px; bottom: 20px; z-index: 199;
  width: 300px; max-width: calc(100vw - 24px);
  background: white; border-radius: 14px; box-shadow: 0 8px 28px rgba(20, 30, 60, 0.25);
  border: 1px solid var(--border); overflow: hidden;
}
#ai-tasks-widget[hidden] { display: none; }
.ai-tasks-header { padding: 10px 14px; background: var(--blue); color: white; font-weight: 800; font-size: 0.85rem; }
.ai-tasks-list { max-height: 220px; overflow-y: auto; padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.ai-task-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; }
.ai-task-row:hover { background: #f4f6fa; }
.ai-task-label { flex: 1; min-width: 0; font-size: 0.8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-task-cancel {
  border: none; background: none; color: var(--muted); cursor: pointer; font-size: 0.9rem;
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
}
.ai-task-cancel:hover { background: #ffcdd2; color: #c62828; }

/* 🦉 ホゥ博士（全画面オーバーレイのAIアシスタント） — どの画面にも右下固定で
   常駐する。ボタンを押すとチャットパネルが開き、今の画面の編集可能な項目を
   把握した上で、生徒が承認した変更だけをその場の項目に反映する。 */
.howl-launcher {
  position: fixed; right: 20px; bottom: 20px; z-index: 200;
  width: 56px; height: 56px; border-radius: 50%; border: none;
  background: var(--blue); color: white; font-size: 1.7rem; cursor: pointer;
  box-shadow: 0 4px 16px rgba(20, 30, 60, 0.3);
  display: flex; align-items: center; justify-content: center; padding: 0;
}
.howl-launcher:hover { filter: brightness(1.1); }
.howl-panel {
  position: fixed; right: 20px; bottom: 86px; z-index: 200;
  width: 380px; max-width: calc(100vw - 24px); max-height: min(560px, 70vh);
  background: white; border-radius: 16px; box-shadow: 0 10px 40px rgba(20, 30, 60, 0.3);
  display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--border);
}
/* Author stylesheets beat the browser's default `[hidden] { display:none }` at
   equal specificity, so the plain `.howl-panel { display: flex }` rule above
   was winning and the panel never actually minimized when `hidden` got set —
   this rule needs to win instead. */
.howl-panel[hidden] { display: none; }
.howl-panel-header { display: flex; align-items: center; gap: 8px; padding: 12px 14px; background: var(--blue); color: white; font-weight: 800; }
.howl-panel-header .meta { flex: 1; min-width: 0; color: rgba(255, 255, 255, 0.85); font-size: 0.72rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.howl-panel-close { background: none; border: none; color: white; font-size: 1rem; cursor: pointer; line-height: 1; padding: 2px; }
.howl-messages { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; min-height: 160px; }
.howl-input-row { display: flex; gap: 6px; padding: 10px; border-top: 1px solid var(--border); }
.howl-input-row input { flex: 1; min-width: 0; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); font-family: inherit; }

.howl-edit-card { margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: #fef3f8; border: 1px solid var(--magenta); }
.howl-edit-label { font-size: 0.78rem; font-weight: 800; color: #7a1466; }
.howl-edit-value { font-size: 0.85rem; margin: 4px 0; color: var(--text); word-break: break-word; }
.howl-edit-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.howl-edit-card.howl-edit-applied { background: #e8f8ee; border-color: #2e7d32; }
.howl-edit-card.howl-edit-applied .howl-edit-label { color: #1b7a3d; }

/* 反映した項目がどこか分かるよう、実際のフォーム要素を一瞬ハイライトする */
@keyframes howl-field-flash-anim {
  0%, 100% { box-shadow: none; }
  25% { box-shadow: 0 0 0 4px rgba(0, 80, 255, 0.35); }
}
.howl-field-flash { animation: howl-field-flash-anim 1.6s ease; border-radius: 6px; }

@media (max-width: 600px) {
  .howl-panel { right: 10px; left: 10px; width: auto; bottom: 82px; }
  .howl-launcher { right: 14px; bottom: 14px; }
  #ai-tasks-widget { left: 10px; bottom: 14px; width: auto; max-width: calc(100vw - 20px); }
}

/* 自動保存インジケーター — どの画面でも「今ちゃんと保存されているか」が常に
   見える場所に出す（生徒が「消えたらどうしよう」と不安にならないように）。
   ホゥ博士の吹き出しパネルより低いz-indexで、重なってもパネル操作を邪魔しない。
   編集する画面ではプレビューが右上に固定表示される（sticky）ため、右側に
   置くとプレビュー上のテロップをドラッグしている最中にこのバッジが重なって
   見えなくなってしまう — 左側に置く。 */
.autosave-indicator {
  position: fixed; top: 74px; left: 20px; z-index: 150;
  background: white; border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 14px; font-size: 0.78rem; font-weight: 800;
  box-shadow: 0 2px 10px rgba(20, 30, 60, 0.12);
  transition: opacity 0.25s ease; color: var(--muted);
}
.autosave-indicator.autosave-saving { color: var(--blue); }
.autosave-indicator.autosave-saved { color: #1b7a3d; border-color: #a5d6b7; }
.autosave-indicator.autosave-error { color: #c62828; border-color: #ffcdd2; }
@media (max-width: 600px) {
  .autosave-indicator { top: auto; bottom: 86px; left: 14px; font-size: 0.72rem; padding: 5px 10px; }
}
/* ==============================================================================
   プレビュー再生用 音声レベルメーター (VU/ピークメーター)
   ============================================================================== */
.pv-audio-meter-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: #111827;
  border: 1px solid #374151;
  border-radius: 6px;
  padding: 5px 8px;
  min-width: 140px;
  max-width: 180px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
  user-select: none;
}
.meter-channel-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.meter-ch-name {
  font-size: 0.65rem;
  font-weight: 800;
  color: #9ca3af;
  width: 8px;
  line-height: 1;
}
.meter-track {
  flex: 1;
  height: 6px;
  background: #1f2937;
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}
.meter-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #10b981 0%, #10b981 60%, #f59e0b 60%, #f59e0b 85%, #ef4444 85%, #ef4444 100%);
  border-radius: 3px;
  transition: width 0.04s ease-out;
}
.meter-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 0.55rem;
  color: #6b7280;
  font-weight: 700;
  line-height: 1;
  padding-left: 14px;
}

/* 🔐 ログイン画面・学校管理（アドレス登録制アクセス制御）。 */
.login-screen { max-width: 420px; margin: 40px auto; text-align: center; }
.login-card { text-align: left; }
.form-error { color: #d93025; font-size: 0.85rem; margin-top: 8px; }
.nav-user-email {
  color: rgba(255, 255, 255, 0.85); font-size: 0.8rem; align-self: center;
  margin-left: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px;
}
.admin-school-list, .admin-member-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.admin-school-row, .admin-member-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #f4f6fa; border-radius: 8px; padding: 10px 14px;
}
.admin-school-row.active { outline: 2px solid var(--blue); outline-offset: -2px; }
.admin-school-name { font-weight: 700; }
.admin-member-row > span:first-child { font-weight: 700; }
.admin-school-row .meta, .admin-member-row .meta { color: var(--muted); font-size: 0.8rem; }
/* ボタン（1個 or 2個）をまとめて行の右端へ寄せる——最初のボタンにだけ
   margin-left:autoを付ければ、flexの仕組みで後続のボタンも一緒に右へ
   押し出される。 */
.admin-school-row button:first-of-type, .admin-member-row button:first-of-type { margin-left: auto; }

.camera-tip-chip .shot-image { object-fit: cover; background: #f3f4f6; cursor: zoom-in; transition: filter 0.1s ease; }
.camera-tip-chip .shot-image:hover { filter: brightness(1.06); }

/* ---------- カードボード（だいほん・さつえい・へんしゅうを1画面で） ---------- */
.studio { display: flex; flex-direction: column; gap: 12px; }
.studio-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.studio-title { flex: 1 1 240px; min-height: 44px; font-size: 1.15rem; font-weight: 800; padding: 6px 12px; border: 2px solid var(--border); border-radius: 10px; }
.studio-plan-total { font-size: 0.9rem; color: var(--muted); }
.studio-plan-total strong { font-size: 1.1rem; color: var(--text); }
.studio-plan-total strong.over { color: #e03131; }
.studio-col-label { font-size: 0.75rem; font-weight: 800; color: var(--muted); letter-spacing: 1px; margin-bottom: 6px; }

.studio-top { display: grid; grid-template-columns: 172px minmax(0, 1fr); gap: 12px; align-items: stretch; }
.studio-patterns { display: flex; flex-direction: column; gap: 6px; }
.studio-pattern {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 8px 10px; min-height: 56px; text-align: left;
  background: var(--card); border: 2px solid var(--border); border-radius: 12px; font: inherit; color: inherit; cursor: pointer;
}
.studio-pattern.selected { border-color: #343a40; background: #f1f3f5; box-shadow: inset 4px 0 0 #e03131; }
.studio-pattern-stars { font-size: 0.65rem; color: #f08c00; }
.studio-pattern-name { font-weight: 800; font-size: 0.8rem; white-space: nowrap; }
.studio-pattern-total { font-size: 0.7rem; color: var(--muted); }

.studio-cards {
  display: flex; gap: 12px; overflow-x: auto; padding: 8px 8px 12px;
  background: repeating-linear-gradient(45deg, #2b2f36, #2b2f36 12px, #30353d 12px, #30353d 24px); border-radius: var(--radius);
}
.studio-cards-empty { color: #ced4da; margin: auto; font-weight: 700; padding: 40px 0; }

/* トレーディングカード（オリジナルデザイン） */
.tcard { position: relative; flex: 0 0 180px; padding-top: 16px; scroll-snap-align: start; cursor: pointer; transition: transform 0.15s; }
.tcard.selected { transform: translateY(-6px); }
.tcard.rejected { animation: cut-shake 0.3s 2; }
.tcard-frame {
  display: flex; flex-direction: column; gap: 5px; padding: 7px; border-radius: 12px; height: 252px;
  background: linear-gradient(160deg, #1d3557, #14213d 60%, #0b132b); border: 3px solid #c9a227;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}
.tcard.selected .tcard-frame { border-color: #ffd43b; box-shadow: 0 0 0 3px #ffd43b, 0 8px 18px rgba(0, 0, 0, 0.45); }
.tcard.ready .tcard-frame { background: linear-gradient(160deg, #22577a, #14213d 60%, #0b132b); }
.tcard-gems { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: center; gap: 3px; z-index: 2; }
.tcard-gem {
  min-height: 30px; min-width: 30px; padding: 2px 7px; border-radius: 999px; border: 2px solid #fff; font: inherit; white-space: nowrap;
  font-size: 0.62rem; font-weight: 800; color: #fff; cursor: pointer; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
}
.tcard-gem.subject { background: #495057; font-size: 0.85rem; padding: 0 6px; }
.tcard-gem.size { background: #1971c2; }
.tcard-gem.work { background: #f08c00; }
.tcard-gem.empty { background: #fff; color: var(--muted); border-style: dashed; border-color: #adb5bd; }
.tcard-gem.active { outline: 3px solid #ffd43b; outline-offset: 1px; }
.tcard-namebar {
  display: flex; justify-content: space-between; align-items: center; gap: 4px; padding: 4px 7px; min-height: 30px; margin-top: 10px;
  background: linear-gradient(90deg, #c92a2a, #e03131); color: #fff; border: 1px solid #ffc9c9; border-radius: 6px;
  font: inherit; cursor: pointer; text-align: left;
}
.tcard-namebar.empty { background: #fff; color: #e03131; border: 2px dashed #e03131; }
.tcard-namebar.active { outline: 3px solid #ffd43b; }
.tcard-name { font-weight: 900; font-size: 0.95rem; letter-spacing: 1px; white-space: nowrap; }
.tcard-stars { font-size: 0.55rem; color: #ffd43b; white-space: nowrap; overflow: hidden; max-width: 70px; }
.tcard-namebar.empty .tcard-stars { color: #f08c00; }
.tcard-window { position: relative; aspect-ratio: 16 / 10; border: 2px solid #c9a227; border-radius: 4px; overflow: hidden; background: #000; }
.tcard-picto, .tcard-thumb { display: block; width: 100%; height: 100%; object-fit: cover; }
.tcard-work-arrow { position: absolute; right: 4px; bottom: 2px; font-size: 1.1rem; filter: drop-shadow(0 0 2px #000); }
.tcard-num {
  position: absolute; left: 4px; top: 4px; min-width: 20px; height: 20px; border-radius: 50%; background: rgba(0,0,0,0.7);
  color: #fff; font-size: 0.72rem; font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.tcard-type { font-size: 0.62rem; font-weight: 800; color: #ffe8a1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tcard-effect { flex: 1; display: flex; flex-direction: column; gap: 3px; background: #fdf6e3; border-radius: 5px; padding: 4px 5px; min-height: 0; }
.tcard-memo { width: 100%; border: none; border-bottom: 1px dashed #c9a227; background: transparent; font: inherit; font-size: 0.74rem; font-weight: 700; padding: 2px 0; }
.tcard-memo:focus { outline: none; border-bottom-color: #e03131; }
.tcard-tip { font-size: 0.6rem; line-height: 1.3; color: #5c4d1a; overflow: hidden; }
.tcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 4px; color: #fff; font-size: 0.75rem; font-weight: 800; }
.tcard-sec { display: flex; align-items: center; gap: 2px; }
.tcard-mini {
  min-width: 26px; min-height: 26px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.4); background: rgba(255,255,255,0.12);
  color: #fff; font: inherit; font-weight: 800; cursor: pointer; padding: 0 4px;
}
.studio-palette .tcard-mini { color: var(--text); background: #fff; border-color: var(--border); }
.tcard-mini.danger { color: #e03131; }
.tcard-takes { display: flex; gap: 2px; }
.tcard-takes i { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,0.6); }
.tcard-takes i.filled { background: #8ce99a; border-color: #8ce99a; }
.tcard-takes i.used { background: #ffd43b; border-color: #ffd43b; }
.tcard-shoot {
  min-width: 36px; min-height: 32px; border-radius: 8px; border: none; background: #e03131; color: #fff; font-size: 1rem; cursor: pointer;
}
.tcard-shoot:disabled { background: #495057; opacity: 0.6; cursor: default; }
.tcard-add {
  flex: 0 0 120px; align-self: stretch; margin-top: 0; border: 3px dashed #868e96; border-radius: 12px; background: transparent;
  color: #ced4da; font-size: 2rem; font-weight: 800; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.tcard-add span { font-size: 0.75rem; }

.studio-mid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 12px; align-items: start; }
.studio-palette { background: var(--card); border: 2px solid var(--border); border-radius: var(--radius); padding: 8px 10px; min-width: 0; }
.studio-palette-head { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; margin-bottom: 6px; }
.studio-palette-head .tcard-mini { margin-left: auto; min-height: 32px; }
.studio-palette-groups { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.studio-pal-group { flex: 0 0 auto; border: 2px solid transparent; border-radius: 10px; padding: 4px 6px; opacity: 0.6; }
.studio-pal-group.active { opacity: 1; border-color: var(--cat); background: #f8f9fa; }
.studio-pal-label { font-size: 0.72rem; font-weight: 800; color: var(--cat); margin-bottom: 4px; }
.studio-pal-cards { display: flex; gap: 4px; }
.studio-pal-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px; width: 78px; min-height: 64px; padding: 4px 6px; text-align: left;
  border: 2px solid var(--cat); border-radius: 8px; background: #fff; font: inherit; color: inherit; cursor: pointer;
}
.studio-pal-card.selected { background: var(--cat); color: #fff; }
.studio-pal-stars { font-size: 0.55rem; color: #f08c00; }
.studio-pal-card.selected .studio-pal-stars { color: #fff; }
.studio-pal-name { font-weight: 800; font-size: 0.8rem; }
.studio-pal-desc { font-size: 0.6rem; line-height: 1.25; opacity: 0.85; }

.studio-takes { background: var(--card); border: 2px solid var(--border); border-radius: var(--radius); padding: 8px 10px; }
.studio-take-slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 8px; }
.studio-take { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.studio-take.empty {
  aspect-ratio: 16 / 10; border: 2px dashed var(--border); border-radius: 8px; display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-weight: 800;
}
.studio-take-view { position: relative; display: block; width: 100%; padding: 0; border: 2px solid #40c057; border-radius: 8px; overflow: hidden; aspect-ratio: 16 / 10; background: #000; cursor: pointer; }
.studio-take.used .studio-take-view { border-color: #f59f00; }
.studio-take-view video { width: 100%; height: 100%; object-fit: cover; display: block; }
.studio-take-no { position: absolute; left: 3px; top: 3px; background: rgba(0,0,0,0.7); color: #fff; font-size: 0.7rem; font-weight: 800; border-radius: 4px; padding: 0 4px; }
.studio-take-dur { position: absolute; right: 3px; bottom: 3px; background: rgba(0,0,0,0.7); color: #fff; font-size: 0.65rem; border-radius: 4px; padding: 0 4px; }
.studio-take-add { width: 100%; white-space: nowrap; min-height: 32px; border-radius: 6px; border: 1.5px solid #343a40; background: #fff; font: inherit; font-size: 0.72rem; font-weight: 800; cursor: pointer; }
.studio-shoot-btn { width: 100%; min-height: 48px; background: #e03131; }
.studio-takes .hint { margin: 6px 0 0; font-size: 0.75rem; }

.studio-timeline-wrap { background: var(--card); border: 2px solid var(--border); border-radius: var(--radius); padding: 8px 10px; transition: border-color 0.15s; }
.studio-timeline-wrap.drop-active { border-color: #4dabf7; background: #e7f5ff; }
.studio-tl-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.studio-tl-tools { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.studio-tl-tools .btn { min-height: 40px; }
.studio-rule { min-height: 40px; border-radius: 10px; border: 2px solid var(--border); padding: 0 6px; font: inherit; font-size: 0.8rem; }
.studio-tl-sec { font-size: 1rem; font-weight: 800; }
.studio-tl-sec strong { font-size: 1.6rem; }
.studio-tl-sec strong.over { color: #e03131; }
.studio-tl-sec span { font-size: 0.8rem; margin-left: 2px; }
.studio-limitbar { margin-bottom: 6px; }
.studio-limitbar .cut-limit-track { height: 8px; }

.studio-bottom { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) 190px; gap: 12px; align-items: start; }
.studio-preview-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.studio-preview-tools .btn { min-height: 44px; }
.studio-output {
  display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 12px; border-radius: var(--radius);
  background: linear-gradient(160deg, #9c36b5, #5f3dc4); color: #fff;
}
.studio-output-label { font-weight: 900; letter-spacing: 3px; font-size: 0.8rem; opacity: 0.85; }
.studio-output-btn { min-height: 56px; background: #fff; color: #5f3dc4; font-weight: 900; text-align: center; }
.studio-output .hint { color: #e5dbff; font-size: 0.72rem; margin: 0; }

.studio-camera {
  position: fixed; inset: 0; z-index: 1000; background: rgba(10, 12, 16, 0.92); display: flex; align-items: center; justify-content: center; padding: 16px;
}
.studio-camera[hidden] { display: none; }
.studio-camera-inner { width: min(760px, 100%); max-height: 100%; overflow-y: auto; color: #fff; }
.studio-camera-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; font-weight: 700; }
.studio-camera-head .btn { margin-left: auto; }
.studio-camera-warn { color: #ffd8a8; text-align: center; }
.studio-rec-btn { min-width: 160px; min-height: 56px; font-size: 1.1rem; background: #e03131; }
#cam-review video { width: 100%; border-radius: 10px; }

@media (max-width: 900px) {
  .studio-top { grid-template-columns: 1fr; }
  .studio-patterns { flex-direction: row; overflow-x: auto; }
  .studio-pattern { flex: 0 0 140px; }
  .studio-mid, .studio-bottom { grid-template-columns: 1fr; }
}

/* ---------- カードボード v3：30まいのカード（絵が上、その下に もくてき・説明） ---------- */
.studio-size-tabs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.studio-size-tabs .studio-col-label { margin: 0 4px 0 0; }
.studio-size-tab { min-height: 40px; padding: 4px 14px; border-radius: 999px; border: 2px solid #1971c2; background: #fff; color: #1971c2; font: inherit; font-weight: 800; cursor: pointer; }
.studio-shot-count { margin-left: auto; font-weight: 800; font-size: 0.9rem; }
/* 左右に余白。スクロールのスナップは使わない（再描画のたびに勝手にスライドするため） */
.studio-cards { padding: 14px 18px 16px; gap: 14px; scroll-snap-type: none; overscroll-behavior-x: contain; }
.studio-cards::after { content: ''; flex: 0 0 4px; }

.pcard {
  --c1: #a9e34b; --c2: #74b816; --c3: #e9fac8;
  position: relative; flex: 0 0 262px; width: 262px; min-width: 0; max-width: 262px; box-sizing: border-box; display: flex; flex-direction: column; gap: 4px;
  padding: 8px 9px 6px; border-radius: 14px; cursor: pointer; color: #212529;
  background: linear-gradient(165deg, var(--c3), var(--c1) 30%, var(--c2));
  border: 6px solid #f1f3f5; box-shadow: 0 0 0 1px #adb5bd, 0 5px 12px rgba(0, 0, 0, 0.35); transition: transform 0.15s;
}
.pcard.work-fix { --c1: #a9e34b; --c2: #74b816; --c3: #f4fce3; }
.pcard.work-pan { --c1: #74c0fc; --c2: #1c7ed6; --c3: #e7f5ff; }
.pcard.work-tilt { --c1: #b197fc; --c2: #7048e8; --c3: #f3f0ff; }
.pcard.work-zoomin { --c1: #ffa94d; --c2: #f76707; --c3: #fff4e6; }
.pcard.work-zoomout { --c1: #63e6be; --c2: #0ca678; --c3: #e6fcf5; }
.pcard.work-follow { --c1: #f783ac; --c2: #d6336c; --c3: #fff0f6; }
.pcard.selected { transform: translateY(-6px); border-color: #ffd43b; box-shadow: 0 0 0 2px #f59f00, 0 10px 20px rgba(0, 0, 0, 0.45); }
.pcard.rejected { animation: cut-shake 0.3s 2; }
.pcard-top { display: flex; align-items: center; gap: 4px; }
.pcard-stage {
  flex: 0 0 auto; font-size: 0.58rem; font-weight: 900; padding: 1px 6px; border-radius: 4px 10px 10px 4px;
  background: linear-gradient(180deg, #f8f9fa, #ced4da); border: 1px solid #868e96;
}
.pcard-name { flex: 1; min-width: 0; font-weight: 900; font-size: 0.9rem; letter-spacing: -0.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard-name small { font-size: 0.7rem; margin: 0 1px; }
.pcard-sec { flex: 0 0 auto; font-weight: 900; font-size: 1.4rem; line-height: 1; }
.pcard-sec small { font-size: 0.62rem; margin-right: 1px; }
.pcard-type {
  flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 2px solid var(--c2);
  display: flex; align-items: center; justify-content: center; font-size: 0.85rem;
}
.pcard-window {
  position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; padding: 0; overflow: hidden; cursor: pointer;
  border: 3px solid #e9ecef; outline: 1px solid #868e96; border-radius: 2px; background: #000;
}
.pcard-window .tcard-picto, .pcard-thumb { display: block; width: 100%; height: 100%; object-fit: cover; }
.pcard-shoot-hint {
  position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); white-space: nowrap; padding: 3px 10px; border-radius: 999px;
  background: rgba(224, 49, 49, 0.92); color: #fff; font-size: 0.85rem; font-weight: 900; opacity: 0.9;
}
.pcard-window:hover .pcard-shoot-hint, .pcard-window:focus-visible .pcard-shoot-hint { opacity: 1; transform: translateX(-50%) scale(1.06); }
.pcard-info {
  font-size: 0.7rem; font-weight: 700; font-style: italic; text-align: center; padding: 2px 4px; border-radius: 2px;
  background: linear-gradient(90deg, #e9ecef, #fff, #e9ecef); border: 1px solid #adb5bd; white-space: nowrap; overflow: hidden;
}
.pcard-purpose { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.pcard-badge {
  font-size: 0.72rem; font-weight: 900; color: #fff; padding: 2px 12px 2px 7px; background: #c92a2a; border: 1px solid #fff;
  border-radius: 3px 12px 12px 3px; box-shadow: 0 0 0 1px #c92a2a;
}
.pcard-purpose-name { font-size: 1.3rem; font-weight: 900; color: #c92a2a; letter-spacing: 1px; }
.pcard-text { font-size: 0.82rem; line-height: 1.45; font-weight: 700; }
.pcard-move { display: flex; align-items: center; gap: 5px; margin-top: 2px; }
.pcard-move-icon {
  width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 1.5px solid var(--c2);
  display: flex; align-items: center; justify-content: center; font-size: 0.62rem;
}
.pcard-move-name { flex: 1; font-size: 0.86rem; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard-move-sec { font-size: 0.95rem; font-weight: 900; }
.pcard-bottom {
  display: grid; grid-template-columns: 1.3fr 1fr 1fr; margin-top: auto; padding-top: 3px; border-top: 1px solid rgba(0, 0, 0, 0.25);
  font-size: 0.72rem; font-weight: 800;
}
.pcard-bottom > span { padding: 0 3px; border-right: 1px solid rgba(0, 0, 0, 0.2); display: flex; align-items: center; gap: 3px; white-space: nowrap; }
.pcard-bottom > span:last-child { border-right: none; }
.pcard-takes { display: inline-flex; gap: 2px; }
.pcard-takes i { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid #495057; background: #fff; }
.pcard-takes i.filled { background: #2f9e44; border-color: #2f9e44; }
.pcard-takes i.used { background: #f59f00; border-color: #f59f00; }
.pcard-stars { color: #e8590c; }
.pcard-foot { display: flex; justify-content: space-between; gap: 6px; font-size: 0.66rem; font-weight: 700; color: rgba(0, 0, 0, 0.7); }
.pcard-flavor { text-align: right; font-style: italic; }

.studio-takes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) 200px; gap: 12px; align-items: center; }
.studio-takes-info { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.studio-takes-title { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-weight: 800; }
.studio-takes .studio-take-slots { margin-bottom: 0; }
.studio-takes-info .cut-memo { flex: none; }
.studio-takes-shoot .hint { margin: 4px 0 0; text-align: center; }
@media (max-width: 900px) { .studio-takes { grid-template-columns: 1fr; } }
.pcard-add {
  min-height: 30px; padding: 0 8px; border-radius: 6px; border: 1.5px solid #212529; background: #fff;
  font: inherit; font-size: 0.74rem; font-weight: 900; cursor: pointer; white-space: nowrap;
}
.pcard-add:hover { background: #ffd43b; }

/* カメラ画面：低い画面でも「とる」ボタンが見えるよう、映像の高さを画面に合わせる */
.studio-camera .cutcard-camera-wrap { width: min(100%, calc((100vh - 230px) * 16 / 9)); max-width: 760px; }
.studio-camera-error {
  margin: 0 auto 8px; max-width: 640px; padding: 10px 14px; border-radius: 10px;
  background: #fff3bf; color: #5c3c00; font-weight: 800; line-height: 1.5; text-align: center;
}
.studio-camera-error[hidden] { display: none; }
.studio-rec-btn:disabled { background: #868e96; }
.studio-camera-review-label { font-weight: 800; margin-bottom: 6px; text-align: center; }
#cam-review video { display: block; width: min(100%, calc((100vh - 200px) * 16 / 9)); max-width: 760px; margin: 0 auto; background: #000; }

/* 撮ったカードだけ、いちばん下に「タイムラインに いれる」 */
.pcard .pcard-add { margin-top: auto; width: 100%; min-height: 36px; font-size: 0.82rem; }
.pcard-text, .pcard-info { overflow-wrap: anywhere; }

/* カードを開いたときの「裏→表」めくり（左から順番に） */
.pcard.flip-in { animation: pcard-flip 0.55s ease-in-out var(--flip-delay, 0ms) both; }
.pcard.flip-in::after {
  content: ''; position: absolute; inset: -6px; z-index: 5; border-radius: 14px; pointer-events: none;
  background:
    url('/brand/ai-for-school.png?v=1') center / 58% auto no-repeat,
    radial-gradient(circle at center, #fff 0 96px, #ffd43b 97px 103px, transparent 104px),
    repeating-linear-gradient(45deg, #1d3557 0 10px, #243b6b 10px 20px);
  border: 6px solid #f1f3f5; box-shadow: inset 0 0 0 3px #c9a227;
  animation: pcard-flip-back 0.55s linear var(--flip-delay, 0ms) both;
}
@keyframes pcard-flip {
  0% { transform: perspective(900px) rotateY(0deg); }
  50% { transform: perspective(900px) rotateY(90deg); }
  50.01% { transform: perspective(900px) rotateY(-90deg); }
  100% { transform: perspective(900px) rotateY(0deg); }
}
@keyframes pcard-flip-back {
  0%, 50% { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .pcard.flip-in, .pcard.flip-in::after { animation: none; }
  .pcard.flip-in::after { display: none; }
}
.pcard-gif { display: block; width: 100%; height: 100%; object-fit: cover; background: #e7f5ff; }
.pcard-shot-badge {
  position: absolute; left: 6px; top: 6px; padding: 2px 8px; border-radius: 999px;
  background: rgba(43, 138, 62, 0.92); color: #fff; font-size: 0.72rem; font-weight: 900;
}

/* GIFの下はレポートのテロップがあるので、「さつえい」は上のまんなか、テイク印は右下へ */
.pcard-window .pcard-shoot-hint { top: 6px; bottom: auto; font-size: 0.78rem; padding: 2px 9px; }
.pcard-window .pcard-shot-badge { left: auto; top: auto; right: 6px; bottom: 6px; }
.pcard-window .pcard-shoot-hint { left: 22px; transform: none; }
.pcard-window:hover .pcard-shoot-hint, .pcard-window:focus-visible .pcard-shoot-hint { transform: scale(1.06); transform-origin: left center; }

/* カードのならぶところ：上下の余白を広めに（えらんだカードが上に浮いても切れない） */
.studio-cards { padding-top: 26px; padding-bottom: 30px; }
/* もくてきの文字は黒 */
.pcard-purpose-name { color: #212529; }

/* 番組素材カード（オープニング・スイッシュ） */
.studio-cards-label {
  flex: 0 0 auto; align-self: center; writing-mode: horizontal-tb; padding: 10px 8px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.12); color: #fff; font-weight: 900; font-size: 0.85rem; line-height: 1.4; text-align: center;
}
.pcard.bcard { --c1: #ffe066; --c2: #f59f00; --c3: #fff9db; }
.bcard-window { cursor: pointer; }
.bcard-play {
  position: absolute; left: 8px; top: 6px; padding: 2px 9px; border-radius: 999px;
  background: rgba(33, 37, 41, 0.75); color: #fff; font-size: 0.74rem; font-weight: 900; pointer-events: none;
}
.bcard-where { font-size: 1.05rem; letter-spacing: 0; }
.cut-tl-block.brand { background: linear-gradient(180deg, #fff3bf, #ffd43b); color: #212529; }
.cut-tl-brand-name { font-size: 0.72rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cutcard-chip.brand { background: #f59f00; color: #fff; }

/* ---------- 撮影ずみ／タイムラインに入っているカードの目じるし ---------- */
.pcard.shot { border-color: #8ce99a; box-shadow: 0 0 0 2px #2f9e44, 0 5px 12px rgba(0, 0, 0, 0.35); }
.pcard-window .pcard-shot-badge {
  display: flex; flex-direction: column; align-items: center; line-height: 1.15; padding: 4px 10px; border-radius: 8px;
  background: #2f9e44; border: 2px solid #fff; font-size: 0.8rem; transform: rotate(-6deg); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}
.pcard-window .pcard-shot-badge small { font-size: 0.66rem; font-weight: 800; }
.pcard.in-tl { box-shadow: 0 0 0 3px #fab005, 0 0 18px rgba(250, 176, 5, 0.75), 0 5px 12px rgba(0, 0, 0, 0.35); }
.pcard.in-tl.selected { box-shadow: 0 0 0 3px #f59f00, 0 0 22px rgba(250, 176, 5, 0.9), 0 10px 20px rgba(0, 0, 0, 0.45); }
.pcard-tl-ribbon {
  position: absolute; top: -21px; left: 50%; transform: translateX(-50%); z-index: 3; white-space: nowrap;
  padding: 3px 12px; border-radius: 999px; background: linear-gradient(180deg, #ffe066, #fab005); color: #5c3c00;
  border: 2px solid #fff; font-size: 0.78rem; font-weight: 900; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

/* ---------- タイムラインも カードの見た目で ---------- */
.cut-tl-block.tl-card {
  --c1: #a9e34b; --c2: #74b816; --c3: #f4fce3;
  flex: 0 0 150px; width: 150px; padding: 5px; gap: 3px; border-radius: 10px; color: #212529;
  background: linear-gradient(165deg, var(--c3), var(--c1) 30%, var(--c2)); border: 4px solid #f1f3f5; box-shadow: 0 0 0 1px #adb5bd;
}
.tl-card.work-fix { --c1: #a9e34b; --c2: #74b816; --c3: #f4fce3; }
.tl-card.work-pan { --c1: #74c0fc; --c2: #1c7ed6; --c3: #e7f5ff; }
.tl-card.work-tilt { --c1: #b197fc; --c2: #7048e8; --c3: #f3f0ff; }
.tl-card.work-zoomin { --c1: #ffa94d; --c2: #f76707; --c3: #fff4e6; }
.tl-card.work-zoomout { --c1: #63e6be; --c2: #0ca678; --c3: #e6fcf5; }
.tl-card.work-follow { --c1: #f783ac; --c2: #d6336c; --c3: #fff0f6; }
.tl-card.brand { --c1: #ffe066; --c2: #f59f00; --c3: #fff9db; }
.cut-tl-block.tl-card.selected { border-color: #ffd400; box-shadow: 0 0 0 2px #f59f00, 0 0 14px rgba(255, 212, 0, 0.8); }
.tl-card.unshot .tl-card-window img { filter: saturate(0.35) brightness(1.05); }
.tl-card-top { display: flex; align-items: center; gap: 3px; }
.tl-card-top .cut-tl-num { flex: 0 0 auto; }
.tl-card-name { flex: 1; min-width: 0; font-size: 0.72rem; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-card-sec { font-size: 0.8rem; font-weight: 900; }
.tl-card-window { position: relative; aspect-ratio: 4 / 3; border: 2px solid #e9ecef; outline: 1px solid #868e96; overflow: hidden; background: #000; }
.tl-card-window img, .tl-card-window video { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.tl-card-flag {
  position: absolute; right: 3px; bottom: 3px; padding: 1px 6px; border-radius: 999px; font-size: 0.62rem; font-weight: 900;
  background: #2f9e44; color: #fff;
}
.tl-card.unshot .tl-card-flag { background: #e03131; }
.tl-card-info { font-size: 0.62rem; font-weight: 700; font-style: italic; text-align: center; background: linear-gradient(90deg, #e9ecef, #fff, #e9ecef); border: 1px solid #adb5bd; }
.tl-card-purpose { display: flex; align-items: center; gap: 4px; font-size: 0.82rem; white-space: nowrap; overflow: hidden; }
.tl-card-purpose .pcard-badge { font-size: 0.58rem; padding: 1px 7px 1px 5px; }
.cut-tl-block.landing { visibility: hidden; }
.studio-still { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #e7f5ff; }
.studio-still[hidden] { display: none; }

/* ---------- カードを タイムラインに セットする演出 ---------- */
.card-flying {
  position: fixed; z-index: 1200; margin: 0; pointer-events: none; transform-origin: center;
  box-shadow: 0 0 0 3px #ffd43b, 0 0 30px 8px rgba(255, 212, 59, 0.85), 0 16px 30px rgba(0, 0, 0, 0.5) !important;
}
.cut-tl-block.tl-slam { animation: tl-slam 0.55s cubic-bezier(.2, 1.6, .4, 1); position: relative; z-index: 2; }
@keyframes tl-slam {
  0% { transform: scale(1.35); box-shadow: 0 0 0 4px #fff, 0 0 40px 14px rgba(255, 212, 59, 1); }
  60% { transform: scale(0.94); }
  100% { transform: scale(1); }
}
.card-burst { position: fixed; inset: 0; z-index: 1201; pointer-events: none; }
.card-spark { position: fixed; width: 9px; height: 9px; border-radius: 50%; font-size: 18px; line-height: 9px; text-align: center; }
.card-burst-ring {
  position: fixed; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; border: 5px solid #ffd43b;
  animation: card-ring 0.6s ease-out forwards;
}
@keyframes card-ring { from { transform: scale(0.3); opacity: 1; } to { transform: scale(5); opacity: 0; } }
.card-burst-text {
  position: fixed; transform: translate(-50%, -100%); font-size: 1.7rem; font-weight: 900; color: #fff; white-space: nowrap;
  -webkit-text-stroke: 2px #e8590c; text-shadow: 0 3px 0 #e8590c, 0 0 12px rgba(255, 212, 59, 0.9);
  animation: card-pop 1s ease-out forwards;
}
@keyframes card-pop {
  0% { transform: translate(-50%, -60%) scale(0.3); opacity: 0; }
  25% { transform: translate(-50%, -110%) scale(1.25); opacity: 1; }
  70% { transform: translate(-50%, -120%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -150%) scale(1); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .cut-tl-block.tl-slam { animation: none; } }

/* ---------- カメラ画面：大きく。右に この カットの とりかた ---------- */
.studio-camera { padding: 12px; }
.studio-camera-inner { width: min(1500px, 100%); }
.studio-camera-head { margin-bottom: 8px; }
.studio-camera-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; align-items: start; }
.studio-camera-main { min-width: 0; }
.studio-camera .cutcard-camera-wrap { width: min(100%, calc((100vh - 150px) * 16 / 9)); max-width: none; margin-bottom: 10px; }
#cam-review video { width: min(100%, calc((100vh - 170px) * 16 / 9)); max-width: none; }
.studio-camera .actions-row { margin-top: 0; justify-content: center; }
.cam-guide {
  --c1: #a9e34b; --c2: #74b816; --c3: #f4fce3;
  background: linear-gradient(165deg, var(--c3), var(--c1) 35%, var(--c2)); color: #212529; border: 5px solid #f1f3f5;
  border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - 80px); overflow-y: auto;
}
.cam-guide.work-pan { --c1: #74c0fc; --c2: #1c7ed6; --c3: #e7f5ff; }
.cam-guide.work-tilt { --c1: #b197fc; --c2: #7048e8; --c3: #f3f0ff; }
.cam-guide.work-zoomin { --c1: #ffa94d; --c2: #f76707; --c3: #fff4e6; }
.cam-guide.work-zoomout { --c1: #63e6be; --c2: #0ca678; --c3: #e6fcf5; }
.cam-guide.work-follow { --c1: #f783ac; --c2: #d6336c; --c3: #fff0f6; }
.cam-guide-title { font-weight: 900; font-size: 1.05rem; }
.cam-guide-gif { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 3px solid #fff; border-radius: 6px; background: #e7f5ff; }
.cam-guide-step { display: flex; gap: 8px; align-items: flex-start; background: rgba(255, 255, 255, 0.85); border-radius: 10px; padding: 7px 9px; font-size: 0.86rem; line-height: 1.45; font-weight: 700; }
.cam-guide-step b { font-size: 0.92rem; }
.cam-guide-step ol { margin: 2px 0 0; padding-left: 1.2em; }
.cam-guide-no { flex: 0 0 26px; height: 26px; border-radius: 50%; background: #212529; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 900; }
.cam-guide-purpose { background: rgba(255, 255, 255, 0.85); border-radius: 10px; padding: 7px 9px; font-size: 0.86rem; font-weight: 700; line-height: 1.5; }
.cam-guide-warn { margin: 0; color: #c92a2a; font-weight: 800; font-size: 0.8rem; text-align: center; background: #fff; border-radius: 8px; padding: 5px; }
@media (max-width: 900px) {
  .studio-camera-body { grid-template-columns: 1fr; }
  .cam-guide { max-height: none; }
}

/* ---------- さつえい：カウントダウン・さつえいちゅう・「とる！」ボタン ---------- */
.cutcard-camera-countdown[hidden] { display: none; }
.cutcard-camera-countdown span {
  font-size: 9rem; font-weight: 900; color: #fff; -webkit-text-stroke: 3px #e8590c; text-shadow: 0 6px 0 #e8590c, 0 0 30px rgba(255, 212, 59, 0.9);
  animation: cam-count-pop 0.9s ease-out both;
}
@keyframes cam-count-pop {
  0% { transform: scale(2.2); opacity: 0; }
  25% { transform: scale(0.9); opacity: 1; }
  40% { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 0.9; }
}
.cam-rec-badge, .cam-rec-progress { display: none; }
.cutcard-camera-wrap.recording { outline: 8px solid #e03131; outline-offset: -8px; animation: cam-rec-glow 1s ease-in-out infinite; }
@keyframes cam-rec-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(224, 49, 49, 0.9); }
  50% { box-shadow: 0 0 0 10px rgba(224, 49, 49, 0.35), 0 0 40px 10px rgba(224, 49, 49, 0.5); }
}
.cutcard-camera-wrap.recording .cam-rec-badge {
  display: flex; align-items: center; gap: 8px; position: absolute; top: 16px; left: 16px; padding: 6px 16px; border-radius: 999px;
  background: #e03131; color: #fff; font-size: 1.4rem; font-weight: 900; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
}
.cam-rec-badge i { width: 16px; height: 16px; border-radius: 50%; background: #fff; animation: cam-rec-blink 1s steps(2, start) infinite; }
@keyframes cam-rec-blink { to { visibility: hidden; } }
.cutcard-camera-wrap.recording .cutcard-camera-timer { top: 16px; right: 16px; font-size: 1.4rem; padding: 6px 16px; }
.cutcard-camera-wrap.recording .cam-rec-progress { display: block; position: absolute; left: 0; right: 0; bottom: 0; height: 12px; background: rgba(0, 0, 0, 0.45); }
.cam-rec-progress > div { height: 100%; width: 0; background: linear-gradient(90deg, #ff8787, #e03131); transition: width 0.2s linear; }
.cam-rec-progress > div.over { background: linear-gradient(90deg, #ffd43b, #f08c00); }

.studio-rec-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-width: 240px; min-height: 76px; padding: 0 34px;
  border: 4px solid #fff; border-radius: 999px; cursor: pointer; font: inherit; font-size: 1.7rem; font-weight: 900; color: #fff; letter-spacing: 2px;
  background: linear-gradient(180deg, #ff8787 0%, #f03e3e 45%, #c92a2a 100%);
  box-shadow: 0 6px 0 #862e2e, 0 10px 22px rgba(0, 0, 0, 0.45); text-shadow: 0 2px 0 rgba(0, 0, 0, 0.25);
  transition: transform 0.1s, box-shadow 0.1s;
}
.studio-rec-btn .rec-icon { font-size: 2rem; }
.studio-rec-btn.ready { animation: rec-btn-bounce 1.6s ease-in-out infinite; }
.studio-rec-btn.ready:hover { transform: translateY(-3px) scale(1.04); }
.studio-rec-btn:active { transform: translateY(5px); box-shadow: 0 1px 0 #862e2e, 0 4px 10px rgba(0, 0, 0, 0.4); animation: none; }
@keyframes rec-btn-bounce {
  0%, 100% { transform: translateY(0) scale(1); box-shadow: 0 6px 0 #862e2e, 0 10px 22px rgba(0, 0, 0, 0.45), 0 0 0 0 rgba(255, 135, 135, 0.7); }
  50% { transform: translateY(-4px) scale(1.04); box-shadow: 0 10px 0 #862e2e, 0 14px 26px rgba(0, 0, 0, 0.4), 0 0 0 14px rgba(255, 135, 135, 0); }
}
.studio-rec-btn.counting { background: linear-gradient(180deg, #ffe066, #fab005 50%, #e67700); box-shadow: 0 6px 0 #a35c00, 0 10px 22px rgba(0, 0, 0, 0.45); }
.studio-rec-btn.recording { background: linear-gradient(180deg, #495057, #212529); box-shadow: 0 6px 0 #000, 0 0 0 6px rgba(224, 49, 49, 0.8); }
.studio-rec-btn:disabled, .studio-rec-btn.error { background: #868e96; box-shadow: 0 6px 0 #495057; animation: none; cursor: not-allowed; font-size: 1.2rem; }
@media (prefers-reduced-motion: reduce) {
  .studio-rec-btn.ready, .cutcard-camera-wrap.recording { animation: none; }
}

/* ---------- ①きかく ---------- */
.plan-page { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; margin-top: 12px; }
.plan-h1 { margin: 0 0 4px; }
.plan-lead { margin: 0 0 14px; font-weight: 700; color: #495057; }
.plan-q { background: #fff; border-radius: 14px; padding: 14px 16px; margin-bottom: 12px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); }
.plan-q-head { display: flex; align-items: center; gap: 8px; font-weight: 900; font-size: 1.1rem; margin-bottom: 10px; }
.plan-q-head em { font-style: normal; font-size: 0.7rem; color: #fff; background: #e03131; border-radius: 999px; padding: 1px 8px; }
.plan-q-no { flex: 0 0 30px; height: 30px; border-radius: 50%; background: #d6336c; color: #fff; display: flex; align-items: center; justify-content: center; }
.plan-input { width: 100%; box-sizing: border-box; font: inherit; font-size: 1.1rem; font-weight: 700; padding: 10px 12px; border: 2px solid #ced4da; border-radius: 10px; resize: vertical; }
.plan-input:focus { outline: none; border-color: #d6336c; box-shadow: 0 0 0 3px rgba(214, 51, 108, 0.2); }
.plan-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
#pl-audience { margin-top: 0; }
.plan-chip { min-height: 40px; padding: 4px 14px; border-radius: 999px; border: 2px solid #f59f00; background: #fff9db; font: inherit; font-weight: 800; cursor: pointer; }
.plan-chip:hover { background: #ffec99; }
.plan-chip.selected { background: #f59f00; color: #fff; }
.plan-side { position: sticky; top: 12px; display: flex; flex-direction: column; gap: 12px; }
.plan-card {
  border-radius: 14px; padding: 10px; border: 6px solid #f1f3f5; box-shadow: 0 0 0 1px #adb5bd, 0 5px 12px rgba(0, 0, 0, 0.3);
  background: linear-gradient(165deg, #fff0f6, #f783ac 35%, #d6336c); display: flex; flex-direction: column; gap: 8px;
}
.plan-card-top { font-weight: 900; color: #fff; letter-spacing: 2px; font-size: 0.85rem; }
.plan-card-title { background: #fff; border-radius: 8px; padding: 14px 10px; font-size: 1.3rem; font-weight: 900; text-align: center; min-height: 3em; display: flex; align-items: center; justify-content: center; }
.plan-card-row { display: flex; gap: 6px; align-items: center; background: rgba(255, 255, 255, 0.9); border-radius: 8px; padding: 6px 8px; font-size: 0.9rem; }
.plan-card-row.col { flex-direction: column; align-items: flex-start; }
.plan-go {
  min-height: 64px; border: 4px solid #fff; border-radius: 999px; cursor: pointer; font: inherit; font-size: 1.3rem; font-weight: 900; color: #fff;
  background: linear-gradient(180deg, #ff8787, #f03e3e 50%, #c92a2a); box-shadow: 0 6px 0 #862e2e, 0 10px 20px rgba(0, 0, 0, 0.3);
}
.plan-go:active { transform: translateY(4px); box-shadow: 0 2px 0 #862e2e; }
.plan-go:disabled { background: #adb5bd; box-shadow: 0 6px 0 #868e96; cursor: not-allowed; }
.plan-go-hint { margin: 0; text-align: center; font-weight: 800; color: #495057; }
@media (max-width: 860px) { .plan-page { grid-template-columns: 1fr; } .plan-side { position: static; } }

/* カードボードの上の「テーマ」 */
.studio-plan { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 10px; padding: 8px 14px; border-radius: 12px; background: #fff0f6; border: 2px solid #f783ac; font-size: 1rem; }
.studio-plan.empty { background: #fff9db; border-color: #fab005; font-weight: 800; }
.studio-plan-tag { background: #d6336c; color: #fff; border-radius: 999px; padding: 2px 10px; font-weight: 900; font-size: 0.8rem; }
.studio-plan-msg { color: #495057; font-weight: 700; }
.studio-plan-edit { margin-left: auto; font-weight: 800; }

/* ---------- 撮ったあと：「とる」はかくして、「もう一度」「これにする！」を大きく ---------- */
#cam-actions[hidden] { display: none; }
#cam-review .actions-row { justify-content: center; gap: 18px; margin-top: 12px; }
.cam-big-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 70px; padding: 0 30px; border: 4px solid #fff; border-radius: 999px;
  font: inherit; font-size: 1.5rem; font-weight: 900; color: #fff; cursor: pointer; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.25);
}
.cam-big-btn span { font-size: 1.8rem; }
.cam-big-btn.retry { background: linear-gradient(180deg, #74c0fc, #1c7ed6); box-shadow: 0 6px 0 #1864ab, 0 10px 20px rgba(0, 0, 0, 0.4); }
.cam-big-btn.use {
  background: linear-gradient(180deg, #8ce99a, #2f9e44); box-shadow: 0 6px 0 #1e6b30, 0 10px 20px rgba(0, 0, 0, 0.4);
  animation: rec-btn-bounce-g 1.6s ease-in-out infinite;
}
.cam-big-btn:active { transform: translateY(5px); animation: none; }
.cam-big-btn:disabled { background: #868e96; box-shadow: 0 6px 0 #495057; animation: none; }
@keyframes rec-btn-bounce-g { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-4px) scale(1.05); } }

/* ---------- カードゲームの テーブル（デッキ と フィールド） ---------- */
.game-zone { position: relative; margin-top: 14px; }
.zone-label {
  position: absolute; top: -15px; left: 18px; z-index: 4; display: flex; align-items: baseline; gap: 8px;
  padding: 4px 16px; border-radius: 8px; background: linear-gradient(180deg, #ffe066, #f59f00); color: #3d2600;
  border: 2px solid #fff; font-weight: 900; font-size: 1rem; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35); letter-spacing: 1px;
}
.zone-label small { font-size: 0.72rem; font-weight: 800; letter-spacing: 0; opacity: 0.85; }
.deck-zone .studio-cards {
  border: 4px solid #c9a227; border-radius: 18px; box-shadow: inset 0 0 0 3px #7a5c10, inset 0 0 40px rgba(0, 0, 0, 0.55), 0 6px 16px rgba(0, 0, 0, 0.3);
  background:
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.07) 1px, transparent 1.5px) 0 0 / 14px 14px,
    radial-gradient(ellipse at 50% 40%, #2f9e44 0%, #1b6b2a 55%, #0f3d17 100%);
}
.studio-timeline-wrap.field-zone {
  border: 4px solid #c9a227; border-radius: 18px; padding: 22px 14px 12px; color: #fff;
  box-shadow: inset 0 0 0 3px #7a5c10, inset 0 0 50px rgba(0, 0, 0, 0.5), 0 6px 16px rgba(0, 0, 0, 0.3);
  background:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px) 0 0 / 24px 24px,
    radial-gradient(ellipse at 50% 30%, #4c3fbf 0%, #2b2373 55%, #15113d 100%);
}
.studio-timeline-wrap.field-zone.drop-active { border-color: #ffd43b; box-shadow: inset 0 0 0 3px #ffd43b, inset 0 0 60px rgba(255, 212, 59, 0.45), 0 0 24px rgba(255, 212, 59, 0.8); }
.field-zone .studio-tl-sec { color: #fff; display: flex; align-items: baseline; gap: 4px; }
.field-zone .studio-tl-sec strong.over { color: #ff8787; }
.tl-gauge-label { font-size: 0.85rem; font-weight: 900; background: rgba(255, 255, 255, 0.15); border-radius: 999px; padding: 2px 10px; margin-right: 6px; }
.field-zone .studio-limitbar .cut-limit-track { height: 12px; background: rgba(0, 0, 0, 0.45); border: 2px solid rgba(255, 255, 255, 0.35); }
.field-zone .studio-limitbar .cut-limit-fill { background: linear-gradient(90deg, #69db7c, #ffd43b 70%, #ff922b); box-shadow: 0 0 10px rgba(255, 212, 59, 0.7); }
.field-zone .cut-timeline { background: transparent; gap: 4px; padding: 14px 6px; min-height: 200px; align-items: center; }
.field-zone .cut-edit-message { color: #212529; }
.field-zone .cut-warnings { color: #ffd8a8; }
.field-zone .studio-rule { color: #212529; }
.tl-slot {
  flex: 0 0 150px; height: 196px; box-sizing: border-box; border: 3px dashed rgba(255, 255, 255, 0.45); border-radius: 12px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: rgba(255, 255, 255, 0.75);
  font-weight: 800; font-size: 0.85rem; text-align: center; line-height: 1.3; background: rgba(255, 255, 255, 0.04); position: relative;
}
.tl-slot b { position: absolute; top: 6px; left: 8px; font-size: 0.8rem; opacity: 0.8; }
.tl-slot span { font-size: 2rem; line-height: 1; }
.field-zone.drop-active .tl-slot { border-color: #ffd43b; color: #ffd43b; animation: tl-slot-pulse 0.8s ease-in-out infinite; }
@keyframes tl-slot-pulse { 50% { background: rgba(255, 212, 59, 0.15); } }
.field-zone .cut-tl-mark { color: #ffd43b; text-shadow: 0 0 6px rgba(255, 212, 59, 0.8); }
.field-zone .cut-tl-block.tl-card { box-shadow: 0 0 0 1px #adb5bd, 0 6px 14px rgba(0, 0, 0, 0.5); }
.field-zone .cut-tl-block.tl-card:hover { transform: translateY(-4px); }
.deck-zone .pcard:hover { transform: translateY(-6px) rotate(-1deg); }
/* ゾーン名は 盤の上に のせる タブにして、カードの リボンと かさならないように */
.game-zone { margin-top: 4px; }
.deck-zone .zone-label { position: relative; top: auto; left: auto; display: inline-flex; margin: 0 0 -4px 18px; border-radius: 10px 10px 0 0; border-bottom: none; box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.2); }
.field-zone .zone-label { position: relative; top: auto; left: auto; display: inline-flex; margin: -22px 0 8px 4px; }
.studio-timeline-wrap.field-zone { padding-top: 14px; margin-top: 22px; }

/* プレビューの再生バー：素材の切れめが わかるように */
.cut-preview-progress.studio-seekbar { position: relative; height: 22px; overflow: visible; background: #343a40; border-radius: 6px; margin: 8px 0 12px; }
.studio-seekbar > #st-progress {
  position: absolute; left: 0; top: -3px; bottom: -3px; z-index: 2; pointer-events: none; background: rgba(0, 0, 0, 0.35);
  border-right: 3px solid #fff; box-shadow: 2px 0 6px rgba(0, 0, 0, 0.5); border-radius: 6px 0 0 6px;
}
.studio-segs { position: absolute; inset: 0; display: flex; gap: 3px; z-index: 1; }
.studio-seg {
  --c1: #a9e34b; min-width: 0; padding: 0; border: none; border-radius: 4px; cursor: pointer; font: inherit; font-size: 0.7rem; font-weight: 900; color: #212529;
  background: var(--c1); display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.studio-seg.work-fix { --c1: #a9e34b; }
.studio-seg.work-pan { --c1: #74c0fc; }
.studio-seg.work-tilt { --c1: #b197fc; }
.studio-seg.work-zoomin { --c1: #ffa94d; }
.studio-seg.work-zoomout { --c1: #63e6be; }
.studio-seg.work-follow { --c1: #f783ac; }
.studio-seg.brand { --c1: #ffd43b; }
.studio-seg.unshot { background: repeating-linear-gradient(45deg, var(--c1) 0 6px, #dee2e6 6px 12px); }
.studio-seg.selected { outline: 3px solid #ffd400; outline-offset: 1px; z-index: 1; }
.studio-seg span { pointer-events: none; }
.cut-preview-progress > .studio-segs { width: auto; height: auto; background: none; }

/* ---------- プレビューの左：IN／OUT と テロップ ---------- */
.studio-bottom { grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) 190px; }
.studio-inspector { background: #fff; border-radius: 14px; padding: 12px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); }
.inout-empty { font-weight: 700; line-height: 1.6; color: #495057; padding: 8px; }
.inout { display: flex; flex-direction: column; gap: 10px; }
.inout-head { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; }
.inout-len { margin-left: auto; font-weight: 900; font-size: 1.2rem; color: #1971c2; }
.inout-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.inout-bar { position: relative; height: 22px; background: #343a40; border-radius: 6px; margin: 14px 6px 4px; }
.inout-range { position: absolute; top: 0; bottom: 0; background: linear-gradient(90deg, #69db7c, #ffd43b); border-radius: 4px; }
.inout-flag { position: absolute; top: -16px; transform: translateX(-50%); font-size: 0.66rem; font-weight: 900; color: #fff; padding: 0 5px; border-radius: 4px; }
.inout-flag.in { background: #2f9e44; }
.inout-flag.out { background: #e8590c; }
.inout-slider { display: flex; flex-direction: column; gap: 2px; font-weight: 800; font-size: 0.85rem; }
.inout-slider span b { font-size: 1rem; }
.inout-slider input { width: 100%; height: 28px; }
.inout-slider.in input { accent-color: #2f9e44; }
.inout-slider.out input { accent-color: #e8590c; }
.inout-btn { flex: 1; min-height: 40px; border-radius: 10px; border: 2px solid; background: #fff; font: inherit; font-weight: 900; font-size: 0.82rem; cursor: pointer; }
.inout-btn.in { border-color: #2f9e44; color: #2b8a3e; }
.inout-btn.out { border-color: #e8590c; color: #d9480f; }
.inout-btn.play { border-color: #1c7ed6; color: #1971c2; }
.inout-note { margin: 0; font-weight: 700; font-size: 0.85rem; }
.inout-telop { border-top: 2px dashed #dee2e6; padding-top: 10px; }
.inout-telop-add {
  width: 100%; min-height: 52px; border: 3px solid #fff; border-radius: 999px; cursor: pointer; font: inherit; font-size: 1.15rem; font-weight: 900; color: #fff;
  background: linear-gradient(180deg, #4dabf7, #1971c2); box-shadow: 0 5px 0 #0b4f8a, 0 8px 14px rgba(0, 0, 0, 0.25);
}
.inout-telop-add:active { transform: translateY(4px); box-shadow: 0 1px 0 #0b4f8a; }
.inout-telop-tag { font-weight: 900; color: #1971c2; }
.inout-telop-input { width: 100%; box-sizing: border-box; font: inherit; font-size: 1.05rem; font-weight: 800; padding: 8px 10px; border: 2px solid #4dabf7; border-radius: 8px; margin-top: 6px; }
.inout-move { border-top: 1px solid #e9ecef; padding-top: 8px; }
/* プレビューの テロップ（ニュースの したの 帯） */
.studio-telop {
  position: absolute; left: 6%; right: 6%; bottom: 8%; z-index: 3; padding: 0.4em 0.8em; border-radius: 6px;
  background: linear-gradient(180deg, rgba(25, 113, 194, 0.95), rgba(16, 80, 150, 0.95)); border-left: 0.5em solid #ffd43b;
  color: #fff; font-weight: 900; font-size: clamp(0.9rem, 2.4vw, 1.6rem); text-shadow: 0 2px 2px rgba(0, 0, 0, 0.4); text-align: center;
}
.studio-telop[hidden] { display: none; }
.tl-card .tl-card-telop { position: absolute; left: 3px; top: 3px; font-size: 0.62rem; background: #1971c2; color: #fff; border-radius: 999px; padding: 1px 6px; font-weight: 900; }

/* ---------- 撮るまでは 色なし、撮ったら 色づく ---------- */
.pcard:not(.bcard) { transition: filter 0.6s ease; }
.pcard:not(.bcard):not(.shot) { filter: grayscale(1) brightness(1.05); }
.pcard:not(.bcard):not(.shot):hover, .pcard:not(.bcard):not(.shot).selected { filter: grayscale(0.6) brightness(1.03); }
.tl-card.unshot { filter: grayscale(1) brightness(1.05); }

/* ---------- きかく：右の きかくカードを 大きく ---------- */
.plan-page { grid-template-columns: minmax(0, 1fr) minmax(360px, 440px); }
.plan-card { padding: 14px; gap: 12px; }
.plan-card-top { font-size: 1.05rem; }
.plan-card-title { font-size: 1.9rem; padding: 22px 14px; min-height: 4em; line-height: 1.3; }
.plan-card-row { font-size: 1.15rem; padding: 10px 12px; line-height: 1.5; }
.plan-card-row .pcard-badge { font-size: 0.85rem; }

/* ---------- ①きかく：ミッションカードの ゲーム ---------- */
.planx { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 420px); gap: 22px; align-items: start; margin-top: 12px; }
.planx-h1 { margin: 0 0 4px; }
.planx-lead { margin: 0 0 14px; font-weight: 700; color: #495057; }
.planx-main {
  border: 4px solid #c9a227; border-radius: 18px; padding: 16px; color: #fff;
  box-shadow: inset 0 0 0 3px #7a5c10, inset 0 0 40px rgba(0, 0, 0, 0.5);
  background: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.07) 1px, transparent 1.5px) 0 0 / 14px 14px, radial-gradient(ellipse at 50% 30%, #2f9e44 0%, #1b6b2a 55%, #0f3d17 100%);
}
.planx-main .planx-lead { color: #d3f9d8; }
.planx-missions { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.px-mission {
  --c1: #f783ac; --c2: #d6336c; --c3: #fff0f6;
  position: relative; aspect-ratio: 3 / 4; border: 4px solid #f1f3f5; border-radius: 12px; cursor: pointer; font: inherit; color: #fff; padding: 6px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; overflow: hidden; text-align: center;
  background: repeating-linear-gradient(45deg, #1d3557 0 8px, #243b6b 8px 16px); box-shadow: inset 0 0 0 2px #c9a227, 0 4px 10px rgba(0, 0, 0, 0.4);
  transition: transform 0.15s;
}
.px-mission.blue { --c1: #74c0fc; --c2: #1c7ed6; --c3: #e7f5ff; }
.px-mission.orange { --c1: #ffa94d; --c2: #f76707; --c3: #fff4e6; }
.px-mission.red { --c1: #ff8787; --c2: #e03131; --c3: #fff5f5; }
.px-mission.green { --c1: #8ce99a; --c2: #2f9e44; --c3: #ebfbee; }
.px-mission:hover { transform: translateY(-4px) rotate(-1deg); }
.px-mission.current { box-shadow: inset 0 0 0 2px #c9a227, 0 0 0 4px #ffd43b, 0 0 22px rgba(255, 212, 59, 0.9); animation: px-bob 1.4s ease-in-out infinite; }
@keyframes px-bob { 50% { transform: translateY(-5px); } }
.px-mission.done { background: linear-gradient(165deg, var(--c3), var(--c1) 35%, var(--c2)); color: #212529; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4); animation: px-flip 0.5s ease-out; }
.px-mission.done.current { box-shadow: 0 0 0 4px #ffd43b, 0 0 22px rgba(255, 212, 59, 0.9); }
@keyframes px-flip { from { transform: rotateY(90deg); } to { transform: rotateY(0); } }
.px-mission-no { position: absolute; top: 4px; left: 0; right: 0; font-size: 0.62rem; font-weight: 900; opacity: 0.85; }
.px-mission-q { font-size: 2.6rem; font-weight: 900; color: #ffd43b; text-shadow: 0 0 10px rgba(255, 212, 59, 0.7); line-height: 1; }
.px-mission b { font-size: 0.85rem; }
.px-mission-icon { font-size: 1.6rem; }
.px-mission-answer { font-size: 0.68rem; font-weight: 800; background: rgba(255, 255, 255, 0.9); border-radius: 6px; padding: 2px 4px; max-width: 100%; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.px-mission-ok { position: absolute; bottom: 4px; font-size: 0.66rem; font-weight: 900; background: #2f9e44; color: #fff; border-radius: 999px; padding: 1px 7px; }
.px-mission-req { font-size: 0.6rem; font-weight: 900; color: #fff; background: #e03131; border-radius: 999px; padding: 1px 6px; margin-left: 6px; }

.px-stage-card {
  --c1: #f783ac; --c2: #d6336c; --c3: #fff0f6;
  color: #212529; border: 6px solid #f1f3f5; border-radius: 16px; padding: 16px; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
  background: linear-gradient(165deg, var(--c3), var(--c3) 40%, var(--c1));
}
.px-stage-card.blue { --c1: #74c0fc; --c3: #e7f5ff; }
.px-stage-card.orange { --c1: #ffa94d; --c3: #fff4e6; }
.px-stage-card.red { --c1: #ff8787; --c3: #fff5f5; }
.px-stage-card.green { --c1: #8ce99a; --c3: #ebfbee; }
.px-stage-card.flip { animation: px-stage-in 0.45s cubic-bezier(.2, 1.3, .4, 1); }
@keyframes px-stage-in { from { transform: perspective(800px) rotateX(-70deg) translateY(-30px); opacity: 0; } to { transform: none; opacity: 1; } }
.px-stage-card.shake { animation: cut-shake 0.3s 1; }
.px-stage-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 1.35rem; font-weight: 900; margin-bottom: 12px; }
.px-stage-no { font-size: 0.75rem; background: #212529; color: #fff; border-radius: 999px; padding: 2px 10px; }
.px-stage-icon { font-size: 1.8rem; }
.px-deal { display: flex; gap: 12px; flex-wrap: wrap; align-items: stretch; }
.px-topic-card {
  flex: 0 0 140px; aspect-ratio: 3 / 4; border: 4px solid #fff; border-radius: 12px; cursor: pointer; font: inherit; font-weight: 900; font-size: 0.95rem;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 8px; color: #212529;
  background: linear-gradient(165deg, #fff9db, #ffe066 40%, #fab005); box-shadow: 0 0 0 1px #adb5bd, 0 6px 12px rgba(0, 0, 0, 0.3);
  animation: px-deal-in 0.5s cubic-bezier(.2, 1.4, .4, 1) var(--d, 0ms) both; transition: transform 0.15s;
}
.px-topic-card span { font-size: 2.4rem; }
.px-topic-card:hover { transform: translateY(-8px) rotate(-2deg) scale(1.04); }
@keyframes px-deal-in { from { transform: translateY(-60px) rotateY(180deg) scale(0.6); opacity: 0; } to { transform: none; opacity: 1; } }
.px-draw {
  align-self: center; min-height: 52px; padding: 0 18px; border-radius: 999px; border: 3px solid #fff; cursor: pointer; font: inherit; font-weight: 900; font-size: 1rem; color: #fff;
  background: linear-gradient(180deg, #b197fc, #7048e8); box-shadow: 0 5px 0 #4c2fb0;
}
.px-draw:active { transform: translateY(4px); box-shadow: 0 1px 0 #4c2fb0; }
.px-or { margin: 14px 0 6px; font-weight: 800; color: #495057; font-size: 0.85rem; }
.px-choices { display: flex; flex-wrap: wrap; gap: 10px; }
.px-choice {
  min-width: 120px; min-height: 64px; padding: 6px 14px; border: 4px solid #fff; border-radius: 12px; cursor: pointer; font: inherit; font-weight: 900; font-size: 1.05rem;
  background: linear-gradient(165deg, #e7f5ff, #a5d8ff); box-shadow: 0 0 0 1px #adb5bd, 0 4px 10px rgba(0, 0, 0, 0.25); transition: transform 0.15s;
}
.px-choice:hover { transform: translateY(-4px); }
.px-choice.selected { background: linear-gradient(165deg, #74c0fc, #1c7ed6); color: #fff; }
.px-stage-foot { display: flex; gap: 10px; align-items: center; margin-top: 14px; }
.px-decide {
  min-height: 58px; padding: 0 30px; border: 4px solid #fff; border-radius: 999px; cursor: pointer; font: inherit; font-size: 1.3rem; font-weight: 900; color: #fff;
  background: linear-gradient(180deg, #8ce99a, #2f9e44); box-shadow: 0 5px 0 #1e6b30, 0 8px 14px rgba(0, 0, 0, 0.3); animation: rec-btn-bounce-g 1.6s ease-in-out infinite;
}
.px-decide:active { transform: translateY(4px); animation: none; }
.px-skip { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 2px solid #868e96; background: #fff; font: inherit; font-weight: 800; cursor: pointer; }

.planx-side { position: sticky; top: 12px; display: flex; flex-direction: column; gap: 12px; }
.planx-card {
  border-radius: 16px; padding: 14px; border: 6px solid #f1f3f5; display: flex; flex-direction: column; gap: 10px;
  box-shadow: 0 0 0 1px #adb5bd, 0 8px 18px rgba(0, 0, 0, 0.35); background: linear-gradient(165deg, #f8f9fa, #dee2e6 40%, #adb5bd); transition: background 0.4s, box-shadow 0.4s;
}
.planx-card.rank-2, .planx-card.rank-3 { background: linear-gradient(165deg, #e7f5ff, #74c0fc 40%, #1c7ed6); }
.planx-card.rank-4 { background: linear-gradient(165deg, #fff0f6, #f783ac 40%, #d6336c); }
.planx-card.legend {
  background: linear-gradient(165deg, #fff9db, #ffd43b 35%, #f08c00); border-color: #fff3bf;
  box-shadow: 0 0 0 2px #f59f00, 0 0 30px rgba(255, 212, 59, 0.9), 0 8px 18px rgba(0, 0, 0, 0.35); animation: px-legend 2s ease-in-out infinite;
}
@keyframes px-legend { 50% { box-shadow: 0 0 0 2px #f59f00, 0 0 50px rgba(255, 212, 59, 1), 0 8px 18px rgba(0, 0, 0, 0.35); } }
.planx-card.launch { animation: px-launch 0.45s ease-in forwards; }
@keyframes px-launch { to { transform: translateY(-40px) scale(1.1) rotate(8deg); opacity: 0; } }
.planx-card-top { display: flex; justify-content: space-between; align-items: center; font-weight: 900; letter-spacing: 2px; color: #212529; }
.planx-rank { background: #212529; color: #ffd43b; border-radius: 999px; padding: 2px 12px; letter-spacing: 1px; font-size: 0.9rem; }
.planx-stars { font-size: 1.8rem; color: #f59f00; letter-spacing: 4px; text-align: center; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.2); }
.planx-card-title { background: #fff; border-radius: 10px; padding: 18px 12px; font-size: 1.8rem; font-weight: 900; text-align: center; line-height: 1.3; min-height: 3.2em; display: flex; align-items: center; justify-content: center; }
.planx-card-row { background: rgba(255, 255, 255, 0.6); border-radius: 10px; padding: 8px 10px; font-size: 1.05rem; line-height: 1.45; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; color: #868e96; }
.planx-card-row.filled { background: rgba(255, 255, 255, 0.95); color: #212529; }
.planx-card-row .pcard-badge { font-size: 0.78rem; }
.planx-card .pop { animation: px-pop 0.5s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes px-pop { 0% { transform: scale(1.25); box-shadow: 0 0 0 4px #ffd43b; } 100% { transform: scale(1); } }
@media (max-width: 900px) {
  .planx { grid-template-columns: 1fr; }
  .planx-side { position: static; }
  .planx-missions { grid-template-columns: repeat(5, minmax(90px, 1fr)); overflow-x: auto; }
}
/* 撮るまでは カードは 色なし。ただし 撮影の れいの GIF は 色つきの まま */
.pcard:not(.bcard):not(.shot), .pcard:not(.bcard):not(.shot):hover, .pcard:not(.bcard):not(.shot).selected { filter: none; --c1: #dee2e6; --c2: #adb5bd; --c3: #f8f9fa; }
.pcard:not(.bcard):not(.shot) > :not(.pcard-window):not(.pcard-tl-ribbon) { filter: grayscale(1); }
.tl-card.unshot { filter: none; --c1: #dee2e6; --c2: #adb5bd; --c3: #f8f9fa; }
.tl-card.unshot > :not(.tl-card-window) { filter: grayscale(1); }
.tl-card.unshot .tl-card-window img { filter: none; }

/* プレビューは 左、そうさは 右 */
.studio-bottom { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) 190px; }
/* 上級者編と おなじ テロップ・時計天気を プレビューに 出す（cqw で 大きさを あわせる） */
.cut-preview-screen { container-type: inline-size; }
#st-telop[hidden] { display: none; }
.cut-preview-screen .clock-weather-overlay { z-index: 4; }
.inout-telop-title { font-weight: 900; font-size: 1rem; margin-bottom: 6px; }
.inout-telop-title small { font-size: 0.72rem; color: #868e96; margin-left: 4px; }
.inout-telop-kinds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 8px; }
.inout-telop-kind {
  display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 64px; padding: 6px 4px; border-radius: 12px; cursor: pointer;
  border: 3px solid #fff; font: inherit; font-weight: 900; font-size: 0.8rem; color: #fff; box-shadow: 0 4px 0 rgba(0, 0, 0, 0.25);
}
.inout-telop-kind span { font-size: 1.4rem; }
.inout-telop-kind.kind-name { background: linear-gradient(180deg, #ffa94d, #f76707); }
.inout-telop-kind.kind-setsumei { background: linear-gradient(180deg, #4dabf7, #1971c2); }
.inout-telop-kind.kind-side { background: linear-gradient(180deg, #b197fc, #7048e8); }
.inout-telop-kind:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); }
.inout-telop-kind.selected { outline: 4px solid #ffd43b; outline-offset: 1px; }
.inout-telop-input.small { font-size: 0.9rem; }
textarea.inout-telop-input { resize: vertical; }
#io-telop-del { margin-top: 6px; }
.inout-clock {
  width: 100%; margin-top: 10px; min-height: 44px; border-radius: 10px; border: 2px dashed #adb5bd; background: #f8f9fa;
  font: inherit; font-weight: 900; cursor: pointer; color: #495057;
}
.inout-clock.on { border-style: solid; border-color: #1971c2; background: #e7f5ff; color: #1971c2; }

/* カメラ画面：画面いっぱい。右の とりかたは 大きな 文字で */
.studio-camera { padding: 10px 14px; align-items: stretch; }
.studio-camera-inner { width: 100%; max-height: 100%; display: flex; flex-direction: column; }
.studio-camera-head { font-size: 1.1rem; }
.studio-camera-body { grid-template-columns: minmax(0, 1fr) clamp(320px, 28vw, 460px); gap: 16px; flex: 1; min-height: 0; }
.studio-camera .cutcard-camera-wrap { width: min(100%, calc((100vh - 140px) * 16 / 9)); }
#cam-review video { width: min(100%, calc((100vh - 160px) * 16 / 9)); }
.cam-guide { max-height: calc(100vh - 70px); padding: 14px; gap: 10px; }
.cam-guide-title { font-size: 1.35rem; }
.cam-guide-step { font-size: 1.12rem; line-height: 1.55; padding: 10px 12px; }
.cam-guide-step b { font-size: 1.2rem; }
.cam-guide-no { flex-basis: 34px; height: 34px; font-size: 1.1rem; }
.cam-guide-purpose { font-size: 1.1rem; line-height: 1.6; padding: 10px 12px; }
/* 時計・天気を 出している ときは、左上の ばんごう表示を かくす（かさならないように） */
.cut-preview-screen:has(#pv-clock-weather:not([hidden])) .cut-preview-overlay { display: none; }

/* きかくから えらんだ おすすめカード */
.pcard.picked { box-shadow: 0 0 0 3px #f59f00, 0 0 16px rgba(245, 159, 0, 0.7), 0 5px 12px rgba(0, 0, 0, 0.35); }
.pcard-pick-badge {
  position: absolute; top: -12px; left: -8px; z-index: 4; padding: 3px 10px; border-radius: 8px; transform: rotate(-8deg);
  background: linear-gradient(180deg, #fff3bf, #fab005); color: #5c3c00; border: 2px solid #fff; font-size: 0.82rem; font-weight: 900;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35);
}
.pcard.in-tl .pcard-pick-badge { top: -14px; }
.pcard-pick-why { font-size: 0.76rem; font-weight: 800; background: #fff9db; border: 1px dashed #f59f00; border-radius: 6px; padding: 3px 6px; filter: none !important; }
.st-picks-btn { background: linear-gradient(180deg, #ffe066, #f59f00); color: #3d2600; font-weight: 900; }
.pcard:not(.bcard):not(.shot) > .pcard-pick-why { filter: none; }
.pcard-pick-why { display: flex; flex-direction: column; gap: 1px; background: linear-gradient(180deg, #fff9db, #ffec99); border: 2px solid #f59f00; font-size: 0.78rem; line-height: 1.35; }
.pcard-pick-why b { color: #c25e00; font-size: 0.85rem; }

/* カードの中の おすすめの りゆうを 大きく */
.pcard-pick-why { font-size: 0.95rem; line-height: 1.45; padding: 5px 8px; }
.pcard-pick-why b { font-size: 1.05rem; }

/* ---------- ①きかく：すごろくの マップ ---------- */
.qx { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 420px); gap: 22px; align-items: start; margin-top: 12px; }
.qx-h1 { margin: 0 0 4px; color: #3d2600; }
.qx-lead { margin: 0 0 14px; font-weight: 700; color: #5c3c00; }
.qx-main {
  border-radius: 18px; padding: 16px; border: 4px solid #8d6e3f;
  background:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.35) 0 40px, transparent 41px),
    radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.25) 0 60px, transparent 61px),
    linear-gradient(160deg, #fff3bf, #ffe8a3 50%, #f6d38a);
  box-shadow: inset 0 0 30px rgba(141, 110, 63, 0.35), 0 6px 16px rgba(0, 0, 0, 0.2);
}
.qmap { display: flex; align-items: center; gap: 0; overflow-x: auto; padding: 26px 6px 12px; margin-bottom: 14px; }
.qmap-start, .qgoal { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; font-weight: 900; color: #5c3c00; text-align: center; font-size: 0.85rem; }
.qmap-start { background: #fff; border: 3px solid #8d6e3f; border-radius: 999px; padding: 6px 12px; }
.qmap-road { flex: 1 0 18px; min-width: 18px; height: 0; border-top: 6px dotted #b08a4f; margin: 0 2px; align-self: center; transform: translateY(-14px); }
.qmap-road.done { border-top-style: solid; border-color: #2f9e44; }
.qstone {
  --c: #d6336c; position: relative; flex: 0 0 auto; width: 104px; display: flex; flex-direction: column; align-items: center; gap: 3px;
  border: none; background: none; cursor: pointer; font: inherit; color: #3d2600; padding: 0;
}
.qstone.blue { --c: #1c7ed6; } .qstone.orange { --c: #f76707; } .qstone.red { --c: #e03131; } .qstone.green { --c: #2f9e44; }
.qstone-disc {
  position: relative; width: 76px; height: 76px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 2.2rem; font-weight: 900; color: #fff; background: radial-gradient(circle at 35% 30%, #fff8, transparent 45%), var(--c);
  border: 5px solid #fff; box-shadow: 0 6px 0 rgba(0, 0, 0, 0.25), 0 8px 14px rgba(0, 0, 0, 0.25); transition: transform 0.15s;
}
.qstone:not(.done) .qstone-disc { background: radial-gradient(circle at 35% 30%, #fff8, transparent 45%), #adb5bd; }
.qstone:hover .qstone-disc { transform: translateY(-4px); }
.qstone-no { position: absolute; top: -8px; left: -8px; width: 26px; height: 26px; border-radius: 50%; background: #3d2600; color: #fff; font-size: 0.85rem; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; }
.qstone b { font-size: 0.9rem; }
.qstone small { font-size: 0.72rem; font-weight: 800; background: #fff; border-radius: 6px; padding: 1px 5px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qstone em { font-style: normal; font-size: 0.62rem; font-weight: 900; color: #fff; background: #e03131; border-radius: 999px; padding: 1px 7px; }
.qstone.current .qstone-disc { box-shadow: 0 0 0 5px #ffd43b, 0 0 20px rgba(255, 212, 59, 0.9), 0 6px 0 rgba(0, 0, 0, 0.25); }
.qtoken { position: absolute; top: -30px; left: 50%; transform: translateX(-50%); font-size: 2rem; z-index: 2; animation: qtoken-hop 0.9s ease-in-out infinite; filter: drop-shadow(0 3px 2px rgba(0, 0, 0, 0.3)); }
@keyframes qtoken-hop { 50% { transform: translate(-50%, -8px); } }
.qgoal-box { font-size: 2.6rem; width: 80px; height: 80px; border-radius: 16px; display: flex; align-items: center; justify-content: center; background: #868e96; border: 4px solid #fff; box-shadow: 0 6px 0 rgba(0, 0, 0, 0.25); }
.qgoal.open .qgoal-box { background: linear-gradient(180deg, #ffe066, #f59f00); animation: qgoal-glow 1.4s ease-in-out infinite; }
@keyframes qgoal-glow { 50% { box-shadow: 0 0 24px 6px rgba(255, 212, 59, 0.9), 0 6px 0 rgba(0, 0, 0, 0.25); transform: rotate(-4deg) scale(1.05); } }

/* しつもんは 木の たてふだ */
.qsign {
  position: relative; color: #3d2600; border-radius: 14px; padding: 16px 18px; border: 5px solid #8d6e3f;
  background: repeating-linear-gradient(0deg, #f3d9a4 0 22px, #ecd096 22px 24px); box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
}
.qsign::before, .qsign::after { content: ''; position: absolute; top: 10px; width: 12px; height: 12px; border-radius: 50%; background: #8d6e3f; }
.qsign::before { left: 10px; } .qsign::after { right: 10px; }
.qsign.drop { animation: qsign-drop 0.45s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes qsign-drop { from { transform: translateY(-30px) rotate(-3deg); opacity: 0; } to { transform: none; opacity: 1; } }
.qsign.shake { animation: cut-shake 0.3s 1; }
.qsign-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 1.35rem; font-weight: 900; margin: 4px 0 12px; }
.qsign-no { font-size: 0.75rem; background: #3d2600; color: #fff; border-radius: 999px; padding: 2px 10px; }
.qsign-icon { font-size: 1.8rem; }
.qideas { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.qdice {
  display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 110px; min-height: 90px; border-radius: 16px; border: 4px solid #fff; cursor: pointer;
  font: inherit; font-weight: 900; color: #fff; background: linear-gradient(180deg, #b197fc, #7048e8); box-shadow: 0 6px 0 #4c2fb0;
}
.qdice span { font-size: 2.4rem; display: inline-block; }
.qdice.rolling span { animation: qdice-roll 0.5s linear; }
@keyframes qdice-roll { to { transform: rotate(720deg) scale(1.2); } }
.qidea {
  display: flex; align-items: center; gap: 6px; min-height: 64px; padding: 6px 16px 6px 10px; border-radius: 999px; border: 3px solid #fff; cursor: pointer;
  font: inherit; font-weight: 900; font-size: 1rem; color: #3d2600; background: radial-gradient(circle at 30% 25%, #fff, #c5f6fa 60%, #66d9e8);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.2); animation: qidea-pop 0.5s cubic-bezier(.2, 1.5, .4, 1) var(--d, 0ms) both; transition: transform 0.15s;
}
.qidea span { font-size: 1.8rem; }
.qidea:hover { transform: translateY(-5px) scale(1.04); }
@keyframes qidea-pop { from { transform: scale(0); opacity: 0; } to { transform: none; opacity: 1; } }

/* 右：クリップボードの さくせんメモ */
.qx-side { position: sticky; top: 12px; display: flex; flex-direction: column; gap: 12px; }
.qmemo {
  position: relative; border-radius: 14px; padding: 30px 16px 16px; background: #8d6e3f; box-shadow: 0 8px 18px rgba(0, 0, 0, 0.3);
  display: flex; flex-direction: column; gap: 10px;
}
.qmemo::before { content: ''; position: absolute; inset: 22px 10px 10px; background: repeating-linear-gradient(180deg, #fff 0 30px, #d0ebff 30px 31px); border-radius: 6px; z-index: 0; }
.qmemo > * { position: relative; z-index: 1; }
.qmemo-clip { position: absolute !important; top: 6px; left: 50%; transform: translateX(-50%); width: 110px; height: 30px; border-radius: 8px; background: linear-gradient(180deg, #ced4da, #868e96); border: 2px solid #495057; z-index: 2 !important; }
.qmemo-head { display: flex; justify-content: space-between; align-items: center; font-weight: 900; color: #212529; padding: 0 6px; }
.qmemo-lv { background: #2f9e44; color: #fff; border-radius: 999px; padding: 2px 12px; }
.qmemo-gauge { height: 12px; margin: 0 6px; border-radius: 999px; background: #e9ecef; border: 2px solid #adb5bd; overflow: hidden; }
.qmemo-gauge div { height: 100%; background: linear-gradient(90deg, #69db7c, #ffd43b); transition: width 0.4s; }
.qmemo-title { margin: 0 6px; font-size: 1.7rem; font-weight: 900; text-align: center; line-height: 1.3; color: #212529; padding: 10px 4px; border-bottom: 3px double #f783ac; }
.qmemo-row { margin: 0 6px; display: flex; flex-direction: column; gap: 2px; font-size: 1.05rem; color: #adb5bd; padding: 4px 2px; }
.qmemo-row span { font-size: 0.82rem; font-weight: 900; color: #495057; }
.qmemo-row.filled { color: #212529; }
.qmemo .pop { animation: px-pop 0.5s cubic-bezier(.2, 1.6, .4, 1); }
.qx-go { background: linear-gradient(180deg, #ffe066, #f59f00 50%, #e67700); color: #3d2600; box-shadow: 0 6px 0 #a35c00, 0 10px 20px rgba(0, 0, 0, 0.3); }

/* ゴール：カードパックが あいて 5まい とびだす */
.qpack-overlay { position: fixed; inset: 0; z-index: 1300; background: rgba(10, 12, 30, 0.8); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; }
.qpack { font-size: 8rem; animation: qpack-shake 0.8s ease-in-out both, qpack-burst 0.4s ease-in 0.8s forwards; }
@keyframes qpack-shake { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-12deg) scale(1.05); } 40% { transform: rotate(12deg) scale(1.1); } 60% { transform: rotate(-10deg) scale(1.15); } 80% { transform: rotate(10deg) scale(1.2); } }
@keyframes qpack-burst { to { transform: scale(1.8); opacity: 0; } }
.qpack-cards { position: absolute; top: 50%; left: 50%; }
.qpack-cards span {
  position: absolute; width: 60px; height: 84px; margin: -42px 0 0 -30px; border-radius: 8px; border: 3px solid #fff;
  background: repeating-linear-gradient(45deg, #1d3557 0 6px, #243b6b 6px 12px); box-shadow: 0 0 0 2px #c9a227, 0 4px 10px rgba(0, 0, 0, 0.5);
  opacity: 0; animation: qpack-fly 0.8s cubic-bezier(.2, 1.2, .4, 1) calc(0.9s + var(--i) * 0.05s) forwards;
}
@keyframes qpack-fly {
  from { opacity: 0; transform: scale(0.2); }
  to { opacity: 1; transform: rotate(calc((var(--i) - 2) * 12deg)) translateY(-150px) translateX(calc((var(--i) - 2) * 60px)); }
}
.qpack-text { position: relative; top: 120px; font-size: 2rem; font-weight: 900; color: #fff; -webkit-text-stroke: 2px #e8590c; text-shadow: 0 3px 0 #e8590c; opacity: 0; animation: card-pop 1.2s ease-out 1s forwards; }
@media (max-width: 900px) { .qx { grid-template-columns: 1fr; } .qx-side { position: static; } }
.qstone { width: 86px; }
.qstone-disc { width: 64px; height: 64px; font-size: 1.9rem; }
.qmap-start { font-size: 0.75rem; padding: 5px 9px; }
.qgoal-box { width: 68px; height: 68px; font-size: 2.2rem; }
.qmap-road { flex-basis: 12px; min-width: 12px; }
/* デッキの きりかえ（おすすめ／ぜんぶ） */
.deck-zone { position: relative; }
.deck-tabs { position: absolute; top: 0; right: 18px; display: flex; gap: 6px; z-index: 4; }
.deck-tab {
  min-height: 34px; padding: 2px 14px; border-radius: 10px 10px 0 0; border: 2px solid #fff; border-bottom: none; cursor: pointer;
  font: inherit; font-weight: 900; font-size: 0.85rem; background: #495057; color: #fff;
}
.deck-tab.on { background: linear-gradient(180deg, #ffe066, #f59f00); color: #3d2600; }

/* カメラ：うしろの 画面も カメラ画面も スクロールしない */
html.cam-open, html.cam-open body { overflow: hidden; overscroll-behavior: none; }
.studio-camera { overflow: hidden; overscroll-behavior: contain; touch-action: none; }
.studio-camera-inner { overflow: hidden; height: 100%; }
.studio-camera-body { overflow: hidden; }
.cam-guide { overflow: hidden; max-height: calc(100vh - 64px); gap: 8px; }
.cam-guide-gif { max-height: 24vh; width: auto; max-width: 100%; align-self: center; }
@media (max-height: 760px) {
  .cam-guide-step, .cam-guide-purpose { font-size: 0.95rem; padding: 6px 9px; line-height: 1.4; }
  .cam-guide-step b { font-size: 1rem; }
  .cam-guide-gif { max-height: 18vh; }
}
/* のこり びょうは 映像の まんなか下に 大きく */
.studio-camera .cutcard-camera-timer { display: none !important; }
.cam-bigsec {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 3; display: flex; align-items: center; gap: 8px;
  padding: 6px 22px; border-radius: 999px; border: 4px solid #fff; color: #fff; font-weight: 900; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}
.cam-bigsec b { font-size: 3.4rem; line-height: 1; min-width: 1.2em; text-align: center; }
.cam-bigsec small { font-size: 1.1rem; }
.cam-bigsec span { font-size: 1.8rem; }
.cam-bigsec.ready { background: rgba(33, 37, 41, 0.75); }
.cam-bigsec.rec { background: #e03131; animation: cam-sec-pulse 1s ease-in-out infinite; }
.cam-bigsec.done { background: #2f9e44; animation: cam-sec-pulse 0.6s ease-in-out infinite; }
@keyframes cam-sec-pulse { 50% { transform: translateX(-50%) scale(1.08); } }

/* すごろく：えらんだ ことばが ぜんぶ 見えるように */
.qstone { width: 108px; }
.qstone small { white-space: normal; overflow: visible; text-overflow: clip; font-size: 0.78rem; line-height: 1.3; padding: 3px 6px; border: 2px solid var(--c); text-align: center; word-break: break-all; }
.qmap { align-items: flex-start; }
.qmap-road { margin-top: 58px; transform: none; align-self: flex-start; }
.qmap-start, .qgoal { align-self: flex-start; margin-top: 38px; }
.qgoal { margin-top: 16px; }
.qmap-start { padding: 4px 7px; font-size: 0.7rem; }

/* ワイルドカード（すきなように とろう） */
.pcard.wcard { --c1: #e599f7; --c2: #845ef7; --c3: #fff0f6; background: linear-gradient(135deg, #ff8787, #ffd43b 25%, #69db7c 50%, #4dabf7 75%, #b197fc); }
.pcard.wcard:not(.shot) { filter: none; }
.pcard.wcard > * { filter: none !important; }
.wcard-window { background: radial-gradient(circle, #fff9db, #ffe066 60%, #fab005) !important; }
.wcard-art { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; font-weight: 900; font-size: 1.3rem; color: #5f3dc4; text-align: center; line-height: 1.3; }
.wcard-art b { font-size: 3rem; animation: qtoken-hop 1.2s ease-in-out infinite; }
.wcard-art.guide { height: auto; padding: 14px; border-radius: 10px; background: radial-gradient(circle, #fff9db, #ffe066 70%, #fab005); }
.deck-tab.add { background: linear-gradient(180deg, #8ce99a, #2f9e44); color: #fff; }
.qstone { width: 98px; }
.qmap-road { flex: 1 1 8px; min-width: 6px; }
.qmap { padding-left: 2px; padding-right: 2px; }
.qx { grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); }
.cam-guide-step { font-size: 1.02rem; line-height: 1.45; padding: 8px 10px; }
.cam-guide-step b { font-size: 1.08rem; }
.cam-guide-purpose { font-size: 1rem; line-height: 1.7; padding: 8px 10px; }
.cam-guide-title { font-size: 1.2rem; }
/* カメラ：上の 表示を なくし、下の ボタンが 画面に おさまるように */
.studio-camera-head { justify-content: flex-end; margin-bottom: 6px; min-height: 0; }
.studio-camera .cutcard-camera-wrap { width: min(100%, calc((100vh - 200px) * 16 / 9)); margin-bottom: 12px; }
#cam-review video { width: min(100%, calc((100vh - 210px) * 16 / 9)); max-height: calc(100vh - 210px); }
#cam-review .actions-row { margin-top: 12px; }
.studio-rec-btn { min-height: 70px; }
.cam-big-btn { min-height: 64px; }

/* カードの 絵・映像も カメラと おなじ 16:9 */
.pcard-window, .tl-card-window, .cam-guide-gif { aspect-ratio: 16 / 9; }

/* 「タップで さつえい」は 絵の 下の 帯に（絵に かさねない） */
.pcard-shoot {
  display: block; width: 100%; margin-top: -4px; padding: 5px 6px; border: none; border-radius: 0 0 6px 6px; cursor: pointer;
  background: linear-gradient(180deg, #ff6b6b, #e03131); color: #fff; font: inherit; font-weight: 900; font-size: 0.88rem; text-align: center;
  box-shadow: 0 2px 0 #a61e1e;
}
.pcard-shoot:hover { background: linear-gradient(180deg, #ff8787, #f03e3e); }
.pcard.shot .pcard-shoot { background: linear-gradient(180deg, #74c0fc, #1c7ed6); box-shadow: 0 2px 0 #1864ab; }
.pcard-shoot.brand { cursor: default; background: rgba(33, 37, 41, 0.75); box-shadow: none; font-size: 0.8rem; }
.pcard:not(.bcard):not(.shot) > .pcard-shoot { filter: none; }
/* ヒキ／ヨリ・被写体は 説明文の なかの タグで */
.pcard-tag { display: inline-block; margin: 0 4px 2px 0; padding: 0 7px; border-radius: 999px; background: #212529; color: #fff; font-size: 0.74rem; font-weight: 900; vertical-align: 1px; }
/* VTR フィールドの 見出しも 盤の 上の タブに */
.field-outer { margin-top: 10px; }
.field-outer > .zone-label { position: relative; top: auto; left: auto; display: inline-flex; margin: 0 0 -4px 18px; border-radius: 10px 10px 0 0; border-bottom: none; box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.2); }
.studio-timeline-wrap.field-zone { margin-top: 0; padding-top: 14px; }

/* デッキの 区画（はじめ・なか・おわり など） */
.deck-zone-group { flex: 0 0 auto; display: flex; flex-direction: column; gap: 8px; padding: 8px 10px 12px; border-radius: 16px; border: 3px dashed rgba(255, 255, 255, 0.45); background: rgba(255, 255, 255, 0.08); }
.deck-zone-label { align-self: flex-start; padding: 3px 14px; border-radius: 999px; font-weight: 900; font-size: 0.95rem; color: #fff; background: rgba(0, 0, 0, 0.45); letter-spacing: 1px; }
.deck-zone-cards { display: flex; gap: 14px; padding-top: 18px; }
.zone-はじめ { background: rgba(116, 192, 252, 0.18); border-color: rgba(116, 192, 252, 0.8); }
.zone-はじめ .deck-zone-label { background: #1c7ed6; }
.zone-なか { background: rgba(255, 212, 59, 0.15); border-color: rgba(255, 212, 59, 0.8); }
.zone-なか .deck-zone-label { background: #f59f00; }
.zone-おわり { background: rgba(247, 131, 172, 0.18); border-color: rgba(247, 131, 172, 0.8); }
.zone-おわり .deck-zone-label { background: #d6336c; }
.zone-ついか { background: rgba(140, 233, 154, 0.15); border-color: rgba(140, 233, 154, 0.8); }
.zone-ついか .deck-zone-label { background: #2f9e44; }
.zone-さいご { background: rgba(177, 151, 252, 0.18); border-color: rgba(177, 151, 252, 0.85); }
.zone-さいご .deck-zone-label { background: #7048e8; }
.zone-brand .deck-zone-label { background: #495057; }
.studio-cards { align-items: flex-start; padding-top: 14px; }

/* タイムラインの カードを ✕ で はずす */
.tl-card { position: relative; }
.tl-card-del {
  position: absolute; top: -10px; right: -10px; z-index: 3; width: 28px; height: 28px; border-radius: 50%; border: 3px solid #fff; cursor: pointer;
  background: #e03131; color: #fff; font: inherit; font-weight: 900; font-size: 0.85rem; line-height: 1; padding: 0; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  display: flex; align-items: center; justify-content: center;
}
.tl-card-del:hover { transform: scale(1.15); background: #c92a2a; }
.tl-card.unshot > .tl-card-del { filter: none; }
.field-zone .cut-timeline { padding-top: 18px; }
.cut-tl-block.tl-removing { animation: tl-remove 0.22s ease-in forwards; }
@keyframes tl-remove { to { transform: scale(0.3) rotate(-15deg); opacity: 0; } }

/* カードを ふやした ときの 演出：とびこんで、しばらく 金色に 光る */
.pcard.just-added { animation: pcard-arrive 0.75s cubic-bezier(.2, 1.4, .4, 1), pcard-glow 1.1s ease-in-out 0.75s 3; z-index: 5; }
@keyframes pcard-arrive {
  0% { transform: translateY(-260px) rotate(-25deg) scale(0.3); opacity: 0; }
  60% { transform: translateY(12px) rotate(4deg) scale(1.12); opacity: 1; }
  100% { transform: none; }
}
@keyframes pcard-glow {
  0%, 100% { box-shadow: 0 0 0 3px #f59f00, 0 0 16px rgba(245, 159, 0, 0.7), 0 5px 12px rgba(0, 0, 0, 0.35); }
  50% { box-shadow: 0 0 0 6px #fff3bf, 0 0 40px 14px rgba(255, 212, 59, 1), 0 5px 12px rgba(0, 0, 0, 0.35); transform: scale(1.05); }
}
.pcard-new {
  position: absolute; top: -16px; right: -10px; z-index: 6; padding: 3px 12px; border-radius: 999px; transform: rotate(10deg);
  background: linear-gradient(180deg, #ff8787, #e03131); color: #fff; border: 3px solid #fff; font-weight: 900; font-size: 1rem; letter-spacing: 1px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4); animation: pcard-new-bob 0.8s ease-in-out infinite;
}
@keyframes pcard-new-bob { 50% { transform: rotate(10deg) scale(1.15); } }
.pcard:not(.bcard):not(.shot) > .pcard-new { filter: none; }
@media (prefers-reduced-motion: reduce) { .pcard.just-added, .pcard-new { animation: none; } }

/* ---------- カード こうかん・班の番組へ おくる ---------- */
.deck-tab.trade { background: linear-gradient(180deg, #74c0fc, #1c7ed6); }
.deck-tab.team { background: linear-gradient(180deg, #b197fc, #7048e8); }
.zone-gift { background: rgba(255, 169, 77, 0.18); border-color: rgba(255, 169, 77, 0.85); }
.zone-gift .deck-zone-label { background: #f76707; }
.pcard-gift { font-size: 0.85rem; font-weight: 900; color: #fff; background: linear-gradient(90deg, #ff922b, #f76707); border-radius: 6px; padding: 3px 8px; text-align: center; filter: none !important; }
.trade-overlay { position: fixed; inset: 0; z-index: 1200; background: rgba(10, 12, 30, 0.75); display: flex; align-items: center; justify-content: center; padding: 16px; }
.trade-box {
  width: min(1100px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; border-radius: 18px; padding: 18px 20px; color: #fff;
  border: 4px solid #c9a227; box-shadow: inset 0 0 0 3px #7a5c10, 0 10px 30px rgba(0, 0, 0, 0.5);
  background: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.07) 1px, transparent 1.5px) 0 0 / 14px 14px, radial-gradient(ellipse at 50% 30%, #4c3fbf 0%, #2b2373 55%, #15113d 100%);
}
.trade-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.trade-head h2 { margin: 0; }
.trade-lead { margin: 6px 0 10px; color: #e5dbff; font-weight: 700; }
.trade-name { display: inline-flex; align-items: center; gap: 8px; font-weight: 900; background: rgba(255, 255, 255, 0.12); padding: 6px 12px; border-radius: 10px; }
.trade-name input { font: inherit; font-weight: 800; padding: 6px 10px; border-radius: 8px; border: 2px solid #fff; width: 180px; }
.trade-name input.need { border-color: #ff6b6b; box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.6); }
.trade-h3 { margin: 16px 0 8px; font-size: 1.1rem; }
.trade-h3 small { font-size: 0.75rem; opacity: 0.8; }
.trade-row { display: flex; gap: 12px; overflow-x: auto; padding: 6px 2px 10px; }
.trade-card {
  flex: 0 0 180px; display: flex; flex-direction: column; gap: 5px; padding: 6px; border-radius: 12px; border: 4px solid #f1f3f5; color: #212529;
  background: linear-gradient(165deg, #fff9db, #ffe066 40%, #fab005); box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4); transition: transform 0.15s;
}
.trade-card.offered { background: linear-gradient(165deg, #e7f5ff, #74c0fc 40%, #1c7ed6); }
.trade-card.pickable { cursor: pointer; }
.trade-card.pickable:hover { transform: translateY(-5px); }
.trade-card.chosen { box-shadow: 0 0 0 4px #69db7c, 0 0 16px rgba(105, 219, 124, 0.9); }
.trade-card.busy { opacity: 0.5; pointer-events: none; }
.trade-card-name { font-weight: 900; font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trade-card-window { aspect-ratio: 16 / 9; background: #000; border-radius: 4px; overflow: hidden; }
.trade-card-window video { width: 100%; height: 100%; object-fit: cover; display: block; }
.trade-card-sub { font-size: 0.8rem; font-weight: 900; }
.trade-btn { min-height: 36px; border-radius: 999px; border: 2px solid #fff; cursor: pointer; font: inherit; font-weight: 900; font-size: 0.85rem; color: #fff; background: linear-gradient(180deg, #ff8787, #e03131); }
.trade-btn.off { background: #495057; }
.trade-done { text-align: center; font-weight: 900; font-size: 0.82rem; background: #2f9e44; color: #fff; border-radius: 999px; padding: 4px; }
.trade-empty { color: #d0bfff; font-weight: 700; }
.trade-pick { margin-top: 12px; padding: 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.1); }
.trade-pick-title { font-weight: 900; margin-bottom: 6px; }
.trade-success { text-align: center; padding: 30px 10px; }
.trade-swap { display: flex; justify-content: center; align-items: center; gap: 18px; font-size: 4rem; }
.trade-swap b { color: #ffd43b; animation: qtoken-hop 0.8s ease-in-out infinite; }
.team-pick { display: flex; gap: 10px; flex-wrap: wrap; }
.team-pick-btn { display: flex; flex-direction: column; align-items: flex-start; min-width: 180px; padding: 8px 14px; border-radius: 12px; border: 3px solid #fff; cursor: pointer; font: inherit; background: rgba(255, 255, 255, 0.15); color: #fff; }
.team-pick-btn.on { background: linear-gradient(180deg, #ffe066, #f59f00); color: #3d2600; }
.trade-foot { margin-top: 12px; display: flex; justify-content: flex-end; }
.trade-loading { font-weight: 900; }
.deck-tabs { flex-wrap: wrap; justify-content: flex-end; max-width: calc(100% - 340px); }
/* デッキの カードは ぜんぶ おなじ 高さに（いちばん 高い カードに そろえる） */
.studio-cards { align-items: stretch; }
.deck-zone-group { align-self: stretch; }
.deck-zone-cards { flex: 1; align-items: stretch; }
.deck-zone-cards > .pcard { align-self: stretch; }
/* デッキの 見出しと ボタンを 1れつに（かさならないように） */
.deck-zone { display: flex; flex-wrap: wrap; align-items: flex-end; column-gap: 8px; }
.deck-zone > .zone-label { flex: 0 0 auto; }
.deck-zone > .deck-tabs { position: static; flex: 1 1 auto; max-width: none; margin: 0 18px 0 auto; justify-content: flex-end; }
.deck-zone > .studio-cards { flex: 0 0 100%; }
/* プレビューの 映像は 2まい かさねて こうたいで つかう */
.cut-preview-screen > video { position: absolute; inset: 0; }
.cut-preview-screen > video.st-video-back { visibility: hidden; }

/* PC操作：カメラの画面を クリックしても とれる */
.studio-camera .cutcard-camera-wrap { cursor: pointer; }

/* デッキの カード：なにを どう とるか（3ぎょう） */
.pcard-how { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 3px; }
.pcard-how li { display: flex; gap: 6px; align-items: flex-start; background: #eef6ff; border-radius: 8px; padding: 4px 6px; font-size: 0.78rem; line-height: 1.35; color: #1f2937; }
.pcard-how li > span { flex: none; width: 18px; height: 18px; border-radius: 50%; background: #1f2937; color: #fff; font-size: 0.7rem; font-weight: 800; display: grid; place-items: center; margin-top: 1px; }
.pcard-how b { display: block; font-size: 0.8rem; color: #0b3a75; }

/* プレビュー：再生／停止を 動画の 上に かさねる */
.cut-preview-screen .pv-bigplay { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 6; width: 84px; height: 84px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, 0.55); color: #fff; font-size: 2.2rem; cursor: pointer; display: grid; place-items: center; box-shadow: 0 4px 18px rgba(0,0,0,.35); transition: transform .15s, background .15s; }
.cut-preview-screen .pv-bigplay span { margin-left: 6px; }
.cut-preview-screen .pv-bigplay:hover { background: rgba(0, 102, 255, 0.85); transform: translate(-50%, -50%) scale(1.08); }
.cut-preview-screen.is-playing .pv-bigplay, .cut-preview-screen.no-items .pv-bigplay, .cut-preview-screen.no-items .pv-ctrl { display: none; }
.cut-preview-screen .pv-ctrl { position: absolute; left: 10px; bottom: 10px; z-index: 6; display: flex; gap: 6px; transition: opacity .2s; }
.cut-preview-screen.is-playing .pv-ctrl { opacity: 0; }
.cut-preview-screen.is-playing:hover .pv-ctrl { opacity: 1; }
.cut-preview-screen .pv-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 1.15rem; cursor: pointer; display: grid; place-items: center; }
.cut-preview-screen .pv-btn:hover { background: rgba(0, 102, 255, 0.9); }
.cut-preview-screen .pv-btn:disabled { opacity: .4; cursor: default; }

/* エフェクト */
.cut-preview-screen .telop-overlay { z-index: 3; }
.st-fx-layer { position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; }
.cut-preview-screen.fx-mono > video, .cut-preview-screen.fx-mono > .studio-still { filter: grayscale(1) contrast(1.05); }
.cut-preview-screen.fx-sepia > video, .cut-preview-screen.fx-sepia > .studio-still { filter: sepia(0.9) contrast(1.05) brightness(0.95); }
.cut-preview-screen.fx-vivid > video, .cut-preview-screen.fx-vivid > .studio-still { filter: saturate(1.8) contrast(1.12); }
.cut-preview-screen.fx-zoom > video, .cut-preview-screen.fx-zoom > .studio-still { animation: fx-zoom var(--fx-dur, 3s) linear forwards; }
.cut-preview-screen.fx-shake > video, .cut-preview-screen.fx-shake > .studio-still { animation: fx-shake 0.55s ease-out; }
.cut-preview-screen.fx-fade .st-fx-layer { background: #000; animation: fx-fade 0.9s ease-out forwards; }
.cut-preview-screen.fx-flash .st-fx-layer { background: #fff; animation: fx-fade 0.45s ease-out forwards; }
@keyframes fx-zoom { from { transform: scale(1); } to { transform: scale(1.3); } }
@keyframes fx-fade { from { opacity: 1; } to { opacity: 0; } }
@keyframes fx-shake {
  0% { transform: scale(1.12) translate(0, 0); }
  15% { transform: scale(1.12) translate(-14px, 8px); }
  30% { transform: scale(1.1) translate(12px, -8px); }
  45% { transform: scale(1.08) translate(-8px, 6px); }
  60% { transform: scale(1.05) translate(6px, -4px); }
  80% { transform: scale(1.02) translate(-2px, 2px); }
  100% { transform: scale(1) translate(0, 0); }
}
.inout-fx-kinds { display: flex; flex-wrap: wrap; gap: 5px; margin: 4px 0 8px; }
.inout-fx-kind { display: inline-flex; align-items: center; gap: 4px; border: 2px solid #d0d7e2; background: #fff; border-radius: 999px; padding: 5px 10px; font-weight: 800; font-size: 0.82rem; cursor: pointer; }
.inout-fx-kind:hover { border-color: #7048e8; }
.inout-fx-kind.selected { background: #7048e8; border-color: #7048e8; color: #fff; }
.inout-fx-title { margin-top: 8px; }
.tl-card .tl-card-telop.tl-card-fx { background: #7048e8; }
.tl-card .tl-card-telop + .tl-card-fx { top: 20px; }

/* オレンジの ふちどり（おすすめ）は なくす。えらんでいる カードは 青で はっきり */
.pcard.picked { box-shadow: 0 5px 12px rgba(0, 0, 0, 0.35); }
.pcard.selected, .pcard.picked.selected {
  transform: translateY(-8px);
  border-color: #1c7ed6;
  box-shadow: 0 0 0 4px #1c7ed6, 0 0 0 8px rgba(28, 126, 214, 0.35), 0 14px 24px rgba(0, 0, 0, 0.45);
}

/* 「クリックで さつえい」は おしたくなる ボタンに */
.pcard.pcard > .pcard-shoot:not(.brand) {
  filter: none !important;
  position: relative; margin: 6px 0 2px; padding: 9px 8px; border-radius: 999px;
  background: linear-gradient(180deg, #ff922b 0%, #f03e3e 100%);
  color: #fff; font-size: 0.98rem; letter-spacing: 0.04em; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
  box-shadow: 0 4px 0 #a61e1e, 0 6px 14px rgba(240, 62, 62, 0.45);
  transition: transform 0.12s, box-shadow 0.12s, filter 0.12s;
  animation: shoot-pulse 1.8s ease-in-out infinite;
}
.pcard.pcard > .pcard-shoot:not(.brand):hover { transform: translateY(-2px) scale(1.04); filter: brightness(1.08) !important; animation: none; }
.pcard.pcard > .pcard-shoot:not(.brand):active { transform: translateY(3px); box-shadow: 0 1px 0 #a61e1e, 0 2px 6px rgba(240, 62, 62, 0.4); }
.pcard.shot.pcard > .pcard-shoot:not(.brand) {
  background: linear-gradient(180deg, #4dabf7 0%, #1971c2 100%);
  box-shadow: 0 4px 0 #0b4f8f, 0 6px 14px rgba(25, 113, 194, 0.4);
  animation: none; font-size: 0.88rem;
}
@keyframes shoot-pulse {
  0%, 100% { box-shadow: 0 4px 0 #a61e1e, 0 6px 14px rgba(240, 62, 62, 0.45); }
  50% { box-shadow: 0 4px 0 #a61e1e, 0 6px 22px rgba(255, 146, 43, 0.85); }
}
@media (prefers-reduced-motion: reduce) { .pcard.pcard > .pcard-shoot:not(.brand) { animation: none; } }

/* 秒数の 表示は ボタンに 見えないように：映像の 右上に 四角い タイマー（ふちどり なし） */
.cam-bigsec {
  left: auto; right: 14px; top: 14px; bottom: auto; transform: none; cursor: default; pointer-events: none;
  border: none; border-radius: 12px; padding: 4px 14px; gap: 4px; box-shadow: none;
}
.cam-bigsec b { font-size: 2.6rem; font-variant-numeric: tabular-nums; }
.cam-bigsec small { font-size: 1rem; }
.cam-bigsec span { font-size: 1.4rem; }
.cam-bigsec.ready { background: rgba(0, 0, 0, 0.55); }
.cam-bigsec.ready b { font-size: 1.8rem; }
@keyframes cam-sec-pulse { 50% { transform: scale(1.08); } }

/* 「これにする！」の あと：ほぞんちゅうの ローディング */
.cam-review-screen { position: relative; width: fit-content; max-width: 100%; margin: 0 auto; border-radius: 10px; overflow: hidden; }
.cam-saving { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: rgba(15, 23, 42, 0.78); color: #fff; border-radius: inherit; }
.cam-saving[hidden] { display: none; }
.cam-saving b { font-size: 1.8rem; letter-spacing: 2px; }
.cam-saving small { font-size: 1rem; opacity: 0.9; }
.cam-saving-spinner { display: flex; gap: 12px; margin-bottom: 6px; }
.cam-saving-spinner i { width: 22px; height: 22px; border-radius: 50%; background: #ffd43b; animation: cam-saving-bounce 0.9s ease-in-out infinite; }
.cam-saving-spinner i:nth-child(2) { background: #ff922b; animation-delay: 0.15s; }
.cam-saving-spinner i:nth-child(3) { background: #f03e3e; animation-delay: 0.3s; }
@keyframes cam-saving-bounce { 0%, 100% { transform: translateY(0) scale(0.8); opacity: 0.6; } 50% { transform: translateY(-16px) scale(1); opacity: 1; } }

/* えらんでいる カード：紺の 背景でも ひと目で わかる 白＋ピンクの ふち と ラベル */
.pcard.selected, .pcard.picked.selected {
  transform: translateY(-10px) scale(1.03);
  border-color: #fff;
  box-shadow: 0 0 0 4px #fff, 0 0 0 9px #f03e8a, 0 0 28px 10px rgba(240, 62, 138, 0.75), 0 16px 26px rgba(0, 0, 0, 0.5);
  z-index: 2;
}
.pcard.selected:not(.flip-in)::after {
  content: '👆 選んでいます'; position: absolute; left: 50%; bottom: -16px; transform: translateX(-50%); z-index: 4; white-space: nowrap;
  padding: 3px 12px; border-radius: 999px; background: #f03e8a; color: #fff; border: 2px solid #fff;
  font-size: 0.8rem; font-weight: 900; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4); pointer-events: none;
}

/* カメラの とじる ボタン：右上に 大きく、はっきり */
.studio-camera-head #cam-close {
  margin-left: auto; display: inline-flex; align-items: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 3px solid #fff;
  background: #fff; color: #c92a2a; font-size: 1.15rem; font-weight: 900; cursor: pointer;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.35), 0 6px 16px rgba(0, 0, 0, 0.4);
}
.studio-camera-head #cam-close:hover { background: #c92a2a; color: #fff; transform: translateY(-1px); }
.studio-camera-head #cam-close:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.35); }

/* カメラ：映像は「のこりの 高さ」に あわせて ちぢむ（とる ボタンが 画面の 下に はみ出さない） */
@media (min-width: 901px) {
  .studio-camera-body { grid-template-rows: minmax(0, 1fr); align-items: stretch; }
  .studio-camera-main { position: relative; container-type: size; min-height: 0; height: 100%; }
  .studio-camera .studio-camera-main .cutcard-camera-wrap {
    width: min(100cqw, calc((100cqh - 112px) * 16 / 9)); max-width: none; margin: 0 auto 12px;
  }
  .studio-camera-main #cam-review video {
    width: min(100cqw, calc((100cqh - 104px) * 16 / 9)); max-height: none; max-width: none;
  }
  /* マイクの ちゅうい などは 映像の 上に かさねて、高さを とらない */
  .studio-camera-main .studio-camera-error { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 6; width: max-content; max-width: 90%; margin: 0; box-shadow: 0 4px 12px rgba(0,0,0,.35); }
  .studio-camera-main #cam-actions { margin: 0; padding-bottom: 6px; }
}

/* とじる ボタンは、とる ボタンと おなじ 行の 左 */
.studio-camera .cam-bottom-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; }
#cam-review .cam-bottom-row { grid-template-columns: 1fr auto auto 1fr; }
#cam-review .cam-bottom-row > .cam-big-btn.retry { grid-column: 2; }
.studio-camera .cam-bottom-row > .cam-close-btn { justify-self: start; }
.studio-camera .cam-bottom-row[hidden] { display: none; }
.cam-close-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 22px; border-radius: 999px; border: 3px solid #fff;
  background: #fff; color: #c92a2a; font: inherit; font-size: 1.15rem; font-weight: 900; cursor: pointer;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.35), 0 6px 16px rgba(0, 0, 0, 0.4);
}
.cam-close-btn:hover { background: #c92a2a; color: #fff; }
.cam-close-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.35); }
.cam-close-btn:disabled { opacity: 0.5; cursor: default; }

/* カメラ：とる まえに、ワークの うごきを 半透明の 矢印で 見せる */
.cam-work-guide { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.cam-work-guide[hidden] { display: none; }
.cam-work-guide svg { width: 100%; height: 100%; display: block; fill: rgba(255, 255, 255, 0.55); stroke: rgba(0, 0, 0, 0.25); stroke-width: 2; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35)); }
.cwg-label { position: absolute; left: 50%; top: 50%; transform: translate(-50%, 70px); padding: 4px 16px; border-radius: 999px; background: rgba(0, 0, 0, 0.45); color: rgba(255, 255, 255, 0.95); font-size: 1.3rem; font-weight: 900; letter-spacing: 2px; white-space: nowrap; }
.cwg-arrow { position: absolute; width: 18%; aspect-ratio: 3 / 2; left: 50%; top: 50%; transform: translate(-50%, -50%); }
/* パン：ひだり → みぎ */
.cwg-pan .cwg-arrow { animation: cwg-pan 2.6s ease-in-out infinite; }
@keyframes cwg-pan { 0% { left: 14%; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { left: 86%; opacity: 0; } }
/* ティルト：した → うえ */
.cwg-tilt .cwg-arrow { width: 13%; animation: cwg-tilt 2.6s ease-in-out infinite; }
.cwg-tilt .cwg-arrow svg { transform: rotate(-90deg); }
@keyframes cwg-tilt { 0% { top: 84%; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { top: 16%; opacity: 0; } }
.cwg-tilt .cwg-label { transform: translate(-50%, -50%); left: 70%; }
/* わく（フィックス・ズーム） */
.cwg-frame { position: absolute; inset: 12%; }
.cwg-c { position: absolute; width: 16%; height: 22%; border: 0 solid rgba(255, 255, 255, 0.7); filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4)); }
.cwg-c.tl { left: 0; top: 0; border-left-width: 8px; border-top-width: 8px; border-top-left-radius: 10px; }
.cwg-c.tr { right: 0; top: 0; border-right-width: 8px; border-top-width: 8px; border-top-right-radius: 10px; }
.cwg-c.bl { left: 0; bottom: 0; border-left-width: 8px; border-bottom-width: 8px; border-bottom-left-radius: 10px; }
.cwg-c.br { right: 0; bottom: 0; border-right-width: 8px; border-bottom-width: 8px; border-bottom-right-radius: 10px; }
.cwg-fix .cwg-frame { animation: cwg-fix 2s ease-in-out infinite; }
@keyframes cwg-fix { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
.cwg-zoomin .cwg-frame { animation: cwg-zoomin 2.6s ease-in-out infinite; }
@keyframes cwg-zoomin { 0% { inset: 4%; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { inset: 30% 34%; opacity: 0; } }
.cwg-zoomout .cwg-frame { animation: cwg-zoomout 2.6s ease-in-out infinite; }
@keyframes cwg-zoomout { 0% { inset: 30% 34%; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { inset: 4%; opacity: 0; } }
.cwg-zoomin .cwg-label, .cwg-zoomout .cwg-label { transform: translate(-50%, -50%); }
/* フォロー：うごく まるを 矢印が おいかける */
.cwg-follow { position: absolute; inset: 0; animation: cwg-follow 3.2s ease-in-out infinite; }
.cwg-follow .cwg-dot { position: absolute; left: 50%; top: 50%; width: 7%; aspect-ratio: 1; border-radius: 50%; background: rgba(255, 212, 59, 0.75); transform: translate(60%, -50%); box-shadow: 0 0 0 6px rgba(255, 212, 59, 0.3); }
.cwg-follow .cwg-arrow { width: 13%; transform: translate(-110%, -50%); }
@keyframes cwg-follow { 0% { transform: translateX(-32%); opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { transform: translateX(28%); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cam-work-guide * { animation-duration: 6s !important; } }

/* 撮影中の「とめる」ボタンの 赤い わと かげが 下で 切れないように、下に よゆうを とる */
@media (min-width: 901px) {
  .studio-camera .studio-camera-main .cutcard-camera-wrap { width: min(100cqw, calc((100cqh - 126px) * 16 / 9)); }
  .studio-camera-main #cam-actions { padding: 6px 0 16px; }
  .studio-camera-main #cam-review video { width: min(100cqw, calc((100cqh - 118px) * 16 / 9)); }
  .studio-camera-main #cam-review .cam-bottom-row { padding-bottom: 12px; }
}

/* カードボード：VTR タイトルを ゲームの 看板ふうに */
.studio-titlebar { gap: 10px; align-items: stretch; }
.stb-plate {
  flex: 1 1 360px; display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 6px 16px 6px 8px; border-radius: 16px;
  background: linear-gradient(180deg, #7048e8 0%, #4c2bb3 55%, #3b1f8f 100%);
  border: 3px solid #ffd43b; box-shadow: 0 0 0 3px #2b1470, 0 6px 0 #1a0b4a, 0 10px 20px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.stb-badge {
  flex: none; padding: 6px 12px; border-radius: 10px; background: linear-gradient(180deg, #ffe066, #fab005); color: #5c3c00;
  font-weight: 900; font-size: 0.9rem; letter-spacing: 1px; box-shadow: 0 3px 0 #a35c00; white-space: nowrap;
}
.stb-title-wrap { flex: 1; min-width: 0; position: relative; display: flex; align-items: center; cursor: text; }
.studio-titlebar .studio-title {
  flex: 1; min-width: 0; min-height: 44px; padding: 4px 40px 4px 10px; border: 2px dashed transparent; border-radius: 10px;
  background: transparent; color: #fff; font-size: 1.6rem; font-weight: 900; letter-spacing: 2px;
  text-shadow: 0 2px 0 #1a0b4a, 0 0 12px rgba(255, 212, 59, 0.45);
}
.studio-titlebar .studio-title::placeholder { color: rgba(255, 255, 255, 0.55); text-shadow: none; }
.studio-titlebar .studio-title:hover { border-color: rgba(255, 255, 255, 0.35); }
.studio-titlebar .studio-title:focus { outline: none; border-color: #ffd43b; background: rgba(255, 255, 255, 0.1); }
.stb-pen { position: absolute; right: 10px; font-size: 1.1rem; opacity: 0.7; pointer-events: none; }
.stb-sec { flex: none; padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.14); color: #fff; font-weight: 900; border: 2px solid rgba(255, 255, 255, 0.35); white-space: nowrap; }
.stb-btn {
  flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 0 18px; min-height: 58px; border-radius: 16px; text-decoration: none;
  font-weight: 900; font-size: 1rem; color: #fff; border: 3px solid #fff; white-space: nowrap; transition: transform 0.1s;
}
.stb-btn.plan { background: linear-gradient(180deg, #4dabf7, #1971c2); box-shadow: 0 5px 0 #0b4f8f, 0 8px 16px rgba(0, 0, 0, 0.3); }
.stb-btn.quit { background: linear-gradient(180deg, #868e96, #495057); box-shadow: 0 5px 0 #212529, 0 8px 16px rgba(0, 0, 0, 0.3); }
.stb-btn:hover { transform: translateY(-2px); color: #fff; }
.stb-btn:active { transform: translateY(3px); }

/* OUTPUT は 画面の いちばん下に 横長で */
.studio-bottom, .studio-bottom:is(*) { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
.studio-output.studio-output-bar {
  display: flex; flex-direction: row; align-items: center; gap: 18px; margin-top: 14px; padding: 12px 18px; border-radius: 16px;
}
.studio-output-bar .studio-output-label { font-size: 1rem; letter-spacing: 4px; }
.studio-output-bar .hint { flex: 1; font-size: 0.95rem; }
.studio-output-bar .studio-output-btn { min-width: 260px; min-height: 56px; font-size: 1.2rem; display: inline-flex; align-items: center; justify-content: center; }
@media (max-width: 900px) { .studio-bottom, .studio-bottom:is(*) { grid-template-columns: 1fr; } }

/* ===== 右の カード せってい パネル：ボードと おなじ 紺×金の ゲーム ふう ===== */
.studio-inspector {
  background: linear-gradient(180deg, #24306f 0%, #161d4f 100%); color: #fff; border-radius: 18px; padding: 14px;
  border: 3px solid #ffd43b; box-shadow: 0 0 0 3px #10163d, 0 8px 0 #0a0f2e, 0 12px 24px rgba(0, 0, 0, 0.35);
}
.studio-inspector .inout-empty { color: #dbe4ff; }
.studio-inspector .inout { gap: 12px; }
/* カード名の 帯 */
.studio-inspector .inout-head {
  margin: -4px -4px 0; padding: 8px 12px; border-radius: 12px; color: #3b2a00;
  background: linear-gradient(180deg, #fff3bf, #ffd43b); box-shadow: 0 3px 0 #b8860b, inset 0 1px 0 #fff;
}
.studio-inspector .inout-head b { font-size: 1.1rem; }
.studio-inspector .inout-head .cut-tl-num { background: #3b2a00; color: #ffd43b; }
.studio-inspector .inout-len { color: #3b2a00; font-size: 1.5rem; }
.studio-inspector .inout-len::after { content: ''; }
.studio-inspector .inout-note { color: #ffe8a3; background: rgba(255, 255, 255, 0.08); border: 2px dashed rgba(255, 212, 59, 0.5); border-radius: 12px; padding: 8px 10px; }
.studio-inspector .inout-note .cut-mini-btn { background: linear-gradient(180deg, #ff922b, #f03e3e); color: #fff; border: 2px solid #fff; box-shadow: 0 3px 0 #a61e1e; font-weight: 900; }
.studio-inspector .inout-slider { color: #dbe4ff; }
.studio-inspector .inout-slider b { color: #ffd43b; font-size: 1.05rem; }
.studio-inspector input[type="range"] { accent-color: #ffd43b; }
.studio-inspector .inout-bar { background: #0a0f2e; border: 2px solid rgba(255, 255, 255, 0.25); }
.studio-inspector .inout-btn { background: rgba(255, 255, 255, 0.1); color: #fff; border-color: rgba(255, 255, 255, 0.5); }
.studio-inspector .inout-btn:hover { background: rgba(255, 255, 255, 0.2); }
.studio-inspector .inout-btn.play { background: linear-gradient(180deg, #69db7c, #2f9e44); border-color: #fff; box-shadow: 0 3px 0 #1b5e20; }
.studio-inspector .cut-take-btn { border-radius: 8px; }
/* セクションの 見出しは リボンに */
.studio-inspector .inout-telop { border-top: none; padding-top: 0; }
.studio-inspector .inout-telop-title {
  display: inline-flex; align-items: baseline; gap: 8px; margin: 4px 0 8px; padding: 4px 14px 4px 10px; border-radius: 8px 999px 999px 8px;
  background: linear-gradient(90deg, #7048e8, #9c36b5); color: #fff; font-size: 0.95rem; box-shadow: 0 3px 0 #3b1f8f;
}
.studio-inspector .inout-telop-title small { color: #e5dbff; font-size: 0.72rem; }
.studio-inspector .inout-fx-title { margin-top: 14px; }
/* テロップ カード：カードの 形で、セットすると 光る */
.studio-inspector .inout-telop-kinds { gap: 10px; }
.studio-inspector .inout-telop-kind {
  position: relative; min-height: 84px; border-radius: 12px; justify-content: center; gap: 4px; font-size: 0.85rem;
  border: 3px solid #fff; box-shadow: 0 5px 0 rgba(0, 0, 0, 0.35), inset 0 0 0 2px rgba(255, 255, 255, 0.25);
  transition: transform 0.12s, box-shadow 0.12s;
}
.studio-inspector .inout-telop-kind span { font-size: 1.8rem; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.2)); }
.studio-inspector .inout-telop-kind:hover { transform: translateY(-4px) rotate(-1.5deg); }
/* エフェクト カード：小さな カードを ならべる */
.studio-inspector .inout-fx-kinds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0 0 6px; }
.studio-inspector .inout-fx-kind {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 66px; padding: 14px 4px 6px;
  border-radius: 10px; border: 3px solid #fff; background: #f8f9fa; color: #212529; font-size: 0.78rem; font-weight: 900; overflow: hidden;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.35); transition: transform 0.12s, box-shadow 0.12s;
}
.studio-inspector .inout-fx-kind::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 10px; background: var(--fxc, #adb5bd); }
.studio-inspector .inout-fx-kind span { font-size: 1.5rem; line-height: 1; }
.studio-inspector .inout-fx-kind:hover { transform: translateY(-4px) rotate(1.5deg); border-color: #fff; }
.studio-inspector .fxc-none { --fxc: #868e96; }
.studio-inspector .fxc-mono { --fxc: linear-gradient(90deg, #212529, #adb5bd); }
.studio-inspector .fxc-sepia { --fxc: #c08a4d; }
.studio-inspector .fxc-vivid { --fxc: linear-gradient(90deg, #ff6b6b, #fcc419, #51cf66, #339af0, #cc5de8); }
.studio-inspector .fxc-zoom { --fxc: #1c7ed6; }
.studio-inspector .fxc-fade { --fxc: #364fc7; }
.studio-inspector .fxc-flash { --fxc: #fab005; }
.studio-inspector .fxc-shake { --fxc: #f03e3e; }
/* セット ちゅうの カード（テロップ・エフェクト おなじ） */
.studio-inspector .inout-telop-kind.selected, .studio-inspector .inout-fx-kind.selected, .studio-inspector .inout-fx-kind.selected:hover {
  outline: none; transform: translateY(-4px);
  box-shadow: 0 0 0 3px #fff, 0 0 0 7px #f03e8a, 0 0 18px 6px rgba(240, 62, 138, 0.7);
}
.studio-inspector .inout-fx-kind.selected { background: #fff0f6; }
.studio-inspector .inout-telop-kind.selected::after, .studio-inspector .inout-fx-kind.selected::after {
  content: 'セット中'; position: absolute; top: -10px; right: -6px; padding: 1px 7px; border-radius: 999px; background: #f03e8a; color: #fff;
  border: 2px solid #fff; font-size: 0.62rem; font-weight: 900; transform: rotate(8deg); z-index: 1;
}
.studio-inspector .inout-fx-kind.selected::after { top: 12px; right: -2px; }
.studio-inspector .inout-fx-kind.fxc-none.selected::after { content: none; }
.studio-inspector .inout-fx-kind.fxc-none.selected { box-shadow: 0 0 0 3px #fff, 0 0 0 6px #868e96; }
.studio-inspector .just-set { animation: card-set 0.45s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes card-set {
  0% { transform: translateY(-30px) scale(1.25) rotate(-8deg); }
  60% { transform: translateY(2px) scale(0.96) rotate(1deg); }
  100% { transform: translateY(-4px) scale(1) rotate(0); }
}
.studio-inspector .inout-telop-input { border-color: #ffd43b; background: #fff; }
.studio-inspector #io-telop-del { background: transparent; color: #ffc9c9; border: 2px solid rgba(255, 201, 201, 0.6); }
/* 時計・天気は スイッチ ふう */
.studio-inspector .inout-clock { background: rgba(255, 255, 255, 0.08); border: 2px solid rgba(255, 255, 255, 0.35); color: #dbe4ff; border-radius: 999px; }
.studio-inspector .inout-clock.on { background: linear-gradient(180deg, #3bc9db, #1098ad); border-color: #fff; color: #fff; box-shadow: 0 3px 0 #0b7285; }
/* まえへ／うしろへ／はずす */
.studio-inspector .inout-move { border-top: 2px dashed rgba(255, 255, 255, 0.2); padding-top: 10px; }
.studio-inspector .inout-move .cut-mini-btn { min-height: 40px; padding: 0 14px; border-radius: 10px; border: 2px solid #fff; font-weight: 900; color: #fff; background: linear-gradient(180deg, #4dabf7, #1971c2); box-shadow: 0 3px 0 #0b4f8f; }
.studio-inspector .inout-move .cut-mini-btn.danger { background: linear-gradient(180deg, #ff8787, #e03131); box-shadow: 0 3px 0 #a61e1e; margin-left: auto; }
.studio-inspector .inout-move .cut-mini-btn:disabled { opacity: 0.35; box-shadow: none; }
@media (prefers-reduced-motion: reduce) { .studio-inspector .just-set { animation: none; } }
.studio-inspector .inout-fx-kind.selected::after { content: none; }
.studio-inspector .inout-fx-kind { white-space: nowrap; font-size: 0.74rem; }

/* テロップは 3しゅるい いっしょに かさねられる */
.st-telops { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.studio-inspector .inout-telop-edit { margin-top: 8px; padding: 8px 10px 10px; border-radius: 12px; background: rgba(255, 255, 255, 0.08); border-left: 6px solid #adb5bd; }
.studio-inspector .inout-telop-edit.kind-name { border-left-color: #ff922b; }
.studio-inspector .inout-telop-edit.kind-setsumei { border-left-color: #339af0; }
.studio-inspector .inout-telop-edit.kind-side { border-left-color: #9775fa; }
.studio-inspector .inout-telop-edit-head { display: flex; align-items: center; justify-content: space-between; font-weight: 900; font-size: 0.85rem; color: #fff; }
.studio-inspector .inout-telop-edit .inout-telop-input { margin-top: 6px; }
.studio-inspector .inout-telop-x { border: 2px solid rgba(255, 201, 201, 0.7); background: transparent; color: #ffc9c9; border-radius: 999px; padding: 2px 10px; font: inherit; font-size: 0.75rem; font-weight: 900; cursor: pointer; }
.studio-inspector .inout-telop-x:hover { background: #e03131; color: #fff; border-color: #fff; }

/* 再生の すすみぐあいは VTRフィールドの カードの 下の バーで（クリックで その ところから 再生） */
.tl-card .tl-card-prog {
  position: relative; height: 10px; margin: 6px 2px 0; border-radius: 999px; background: rgba(0, 0, 0, 0.25);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35); overflow: hidden; cursor: pointer;
}
.tl-card .tl-card-prog:hover { box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35), 0 0 0 2px #fff; }
.tl-card .tl-card-prog > i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 999px; background: linear-gradient(90deg, #ffd43b, #ff922b); }
.tl-card.tl-now { box-shadow: 0 0 0 3px #fff, 0 0 0 7px #ff922b, 0 0 20px 6px rgba(255, 146, 43, 0.7) !important; transform: translateY(-6px); z-index: 2; }
.tl-card.tl-now::before {
  content: '▶ 再生中'; position: absolute; top: -14px; left: 50%; transform: translateX(-50%); z-index: 5; white-space: nowrap;
  padding: 1px 10px; border-radius: 999px; background: #ff922b; color: #fff; border: 2px solid #fff; font-size: 0.68rem; font-weight: 900;
}
.tl-card.tl-played .tl-card-window { filter: brightness(0.85); }

/* 再生バー：まだの ところは 紺＋白ふち、見た ところは あかるい オレンジ、いまの 位置に まるい つまみ */
.tl-card .tl-card-prog {
  height: 14px; margin: 7px 2px 1px; background: #1b2466; border: 2px solid #fff; overflow: visible;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.35);
}
.tl-card .tl-card-prog > i {
  background: linear-gradient(90deg, #ffe066, #ff922b 60%, #f76707); border-radius: 999px;
  box-shadow: 0 0 6px rgba(255, 146, 43, 0.9);
}
.tl-card .tl-card-prog > i::after {
  content: ''; position: absolute; right: -7px; top: 50%; width: 14px; height: 14px; transform: translateY(-50%);
  border-radius: 50%; background: #fff; border: 3px solid #f76707; box-sizing: border-box; display: none;
}
.tl-card.tl-now .tl-card-prog > i::after { display: block; }
.tl-card .tl-card-prog:hover { box-shadow: 0 2px 0 rgba(0, 0, 0, 0.35), 0 0 0 3px #ffd43b; }
.tl-card.unshot > .tl-card-prog { filter: none; }

/* VTRフィールドの カードの ✕（はずす）は いったん かくす。はずすのは 右の パネルの「はずす」で */
.tl-card .tl-card-del { display: none !important; }

/* デッキ：「つかわない」で カードを うらがえす */
.pcard .pcard-off-btn {
  position: absolute; top: -12px; right: -8px; z-index: 4; padding: 3px 9px; border-radius: 999px; cursor: pointer;
  border: 2px solid #fff; background: #495057; color: #fff; font: inherit; font-size: 0.7rem; font-weight: 900;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35); opacity: 0.85; transition: transform 0.12s, opacity 0.12s, background 0.12s;
}
.pcard:hover .pcard-off-btn { opacity: 1; }
.pcard .pcard-off-btn:hover { background: #212529; transform: scale(1.08) rotate(-3deg); }
.pcard.off .pcard-off-btn { display: none; }
.pcard.off { filter: none !important; }
.pcard.off > :not(.pcard-back) { visibility: hidden; }
.pcard-back {
  position: absolute; inset: -3px; z-index: 6; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 10px; padding: 0 12px 18px;
  background:
    url('/brand/ai-for-school.png?v=1') center 38% / 58% auto no-repeat,
    radial-gradient(circle at 50% 38%, #fff 0 88px, #ffd43b 89px 95px, transparent 96px),
    repeating-linear-gradient(45deg, #1d3557 0 10px, #243b6b 10px 20px);
  border: 6px solid #f1f3f5; box-shadow: inset 0 0 0 3px #c9a227, 0 6px 14px rgba(0, 0, 0, 0.35);
}
.pcard-back-label { padding: 4px 14px; border-radius: 999px; background: rgba(0, 0, 0, 0.6); color: #fff; font-weight: 900; font-size: 0.9rem; letter-spacing: 1px; }
.pcard-back-btn {
  min-height: 40px; padding: 0 20px; border-radius: 999px; border: 3px solid #fff; cursor: pointer;
  background: linear-gradient(180deg, #ffe066, #fab005); color: #5c3c00; font: inherit; font-weight: 900; font-size: 0.95rem; box-shadow: 0 4px 0 #a35c00;
}
.pcard-back-btn:hover { transform: translateY(-2px); }
.pcard.pcard-flip-out { animation: pcard-flip-out 0.26s ease-in forwards; }
.pcard.pcard-flip-in2 { animation: pcard-flip-in2 0.3s ease-out; }
@keyframes pcard-flip-out { to { transform: perspective(900px) rotateY(90deg); } }
@keyframes pcard-flip-in2 { from { transform: perspective(900px) rotateY(-90deg); } to { transform: perspective(900px) rotateY(0deg); } }
.pcard .pcard-off-btn { top: auto; bottom: -12px; right: -8px; }
.pcard-back { background-size: 46% auto, auto, auto; }

/* ホバーで カードが うく ぶん、下に 見えない あたり判定を のばして ガクガク しないように */
.deck-zone .pcard::before { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 14px; }
.deck-zone .pcard.selected:hover { transform: translateY(-10px) scale(1.03); }

/* ホバーで カードを うごかすと、ふちに マウスが あるとき ガクガク するので、うごかさずに 光らせる */
.deck-zone .pcard:hover { transform: none; box-shadow: 0 0 0 3px #fff, 0 0 16px 4px rgba(255, 255, 255, 0.55), 0 8px 16px rgba(0, 0, 0, 0.4); }
.deck-zone .pcard.selected:hover { transform: translateY(-10px) scale(1.03); box-shadow: 0 0 0 4px #fff, 0 0 0 9px #f03e8a, 0 0 28px 10px rgba(240, 62, 138, 0.75), 0 16px 26px rgba(0, 0, 0, 0.5); }
.deck-zone .pcard::before { content: none; }
.pcard.pcard > .pcard-shoot:not(.brand):hover { transform: scale(1.04); }

/* ===================== テレビ局ごっこ ===================== */
/* きょくの 看板（3つの へや） */
.tvst {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 0 0 14px; padding: 8px 12px; border-radius: 14px;
  background: linear-gradient(180deg, #2b2f36, #16191d); color: #fff; border: 2px solid #495057;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 4px 10px rgba(0, 0, 0, 0.25);
}
.tvst-station { display: flex; align-items: center; gap: 10px; flex: none; }
.tvst-name { font-size: 1rem; letter-spacing: 1px; white-space: nowrap; }
.tvst-lamp {
  padding: 3px 10px; border-radius: 6px; font-weight: 900; font-size: 0.8rem; letter-spacing: 2px; white-space: nowrap;
  background: #3b1d1d; color: #7a4a4a; border: 2px solid #5c2b2b; transition: all 0.2s;
}
.tvst-lamp.on { background: #e03131; color: #fff; border-color: #ff8787; box-shadow: 0 0 14px 3px rgba(240, 62, 62, 0.8); animation: tv-lamp 1.4s ease-in-out infinite; }
@keyframes tv-lamp { 50% { box-shadow: 0 0 6px 1px rgba(240, 62, 62, 0.5); } }
.tvst-rooms { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; flex-wrap: wrap; }
.tvst-room {
  position: relative; display: flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 10px; text-decoration: none; color: #ced4da;
  background: rgba(255, 255, 255, 0.06); border: 2px solid rgba(255, 255, 255, 0.12);
}
.tvst-room:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }
.tvst-room-icon { font-size: 1.4rem; }
.tvst-room-text { display: flex; flex-direction: column; line-height: 1.15; }
.tvst-room-text small { font-size: 0.62rem; opacity: 0.7; }
.tvst-room-text b { font-size: 0.92rem; }
.tvst-room-text i { font-style: normal; font-size: 0.68rem; opacity: 0.75; }
.tvst-room.current { background: linear-gradient(180deg, #ffe066, #fab005); color: #3b2a00; border-color: #fff; box-shadow: 0 3px 0 #a35c00; }
.tvst-here { position: absolute; top: -10px; right: -6px; padding: 0 7px; border-radius: 999px; background: #e03131; color: #fff; border: 2px solid #fff; font-size: 0.6rem; font-weight: 900; }
.tvst-arrow { color: #868e96; font-size: 0.7rem; }

/* ばんぐみ タイトルは カチンコ ふう */
.stb-plate.clapper {
  position: relative; padding-top: 22px; border-radius: 10px 10px 14px 14px;
  background: linear-gradient(180deg, #2b2f36, #1a1d21); border: 3px solid #f1f3f5;
  box-shadow: 0 6px 0 #0b0d10, 0 10px 20px rgba(0, 0, 0, 0.35);
}
.stb-plate.clapper::before {
  content: ''; position: absolute; left: -3px; right: -3px; top: -3px; height: 18px; border-radius: 8px 8px 0 0;
  background: repeating-linear-gradient(-55deg, #f8f9fa 0 18px, #212529 18px 36px); border: 3px solid #f1f3f5; border-bottom: 2px solid #868e96;
}
.stb-plate.clapper .stb-badge { background: transparent; color: #f8f9fa; border: 2px solid rgba(255, 255, 255, 0.6); box-shadow: none; font-family: inherit; }
.stb-plate.clapper .studio-title { text-shadow: 0 2px 0 #000; }
.stb-plate.clapper .stb-sec { display: inline-flex; align-items: baseline; gap: 6px; background: transparent; border: 2px solid rgba(255, 255, 255, 0.6); border-radius: 8px; }
.stb-plate.clapper .stb-sec small { font-size: 0.65rem; letter-spacing: 2px; opacity: 0.8; }

/* プレビューは モニター ふう */
.pv-monitor-bar {
  display: flex; align-items: center; justify-content: space-between; padding: 5px 12px; border-radius: 12px 12px 0 0;
  background: linear-gradient(180deg, #343a40, #212529); color: #dee2e6; font-weight: 900; font-size: 0.82rem; letter-spacing: 1px;
}
.pv-onair { padding: 1px 10px; border-radius: 6px; background: #3b1d1d; color: #7a4a4a; border: 2px solid #5c2b2b; font-size: 0.72rem; letter-spacing: 2px; }
.studio-preview:has(.is-playing) .pv-onair { background: #e03131; color: #fff; border-color: #ff8787; box-shadow: 0 0 12px 2px rgba(240, 62, 62, 0.8); }
.pv-monitor-bar + .cut-preview-screen { border-radius: 0 0 var(--radius) var(--radius); border: 6px solid #212529; border-top: none; }

/* オンエアへ ボタン */
.studio-output-bar { background: linear-gradient(180deg, #2b2f36, #16191d) !important; border: 2px solid #495057; }
.studio-output-bar .studio-output-btn {
  display: inline-flex; gap: 10px; background: linear-gradient(180deg, #ff6b6b, #c92a2a); color: #fff; border: 3px solid #fff;
  box-shadow: 0 5px 0 #7a1d1d, 0 0 0 0 rgba(240, 62, 62, 0.6); letter-spacing: 1px;
}
.studio-output-bar .studio-output-btn:hover { box-shadow: 0 5px 0 #7a1d1d, 0 0 18px 4px rgba(240, 62, 62, 0.7); color: #fff; }
.onair-dot { width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 0 8px #fff; animation: cam-rec-blink 1s steps(2, start) infinite; }
.studio-output-bar .hint { color: #ced4da; }

/* カメラ：ほうそう用 カメラの ファインダー ふう */
.studio-camera .cam-tc {
  position: absolute; left: 14px; bottom: 20px; z-index: 3; padding: 2px 10px; border-radius: 6px; pointer-events: none;
  background: rgba(0, 0, 0, 0.55); color: #fff; font-family: ui-monospace, Menlo, Consolas, monospace; font-weight: 700; font-size: 1rem; letter-spacing: 1px;
}
.cutcard-camera-wrap.recording .cam-tc { color: #ffc9c9; }
.studio-camera .cam-vf { position: absolute; z-index: 2; width: 34px; height: 34px; border: 0 solid rgba(255, 255, 255, 0.8); pointer-events: none; }
.studio-camera .cam-vf.tl { left: 10px; top: 10px; border-left-width: 4px; border-top-width: 4px; }
.studio-camera .cam-vf.tr { right: 10px; top: 10px; border-right-width: 4px; border-top-width: 4px; }
.studio-camera .cam-vf.bl { left: 10px; bottom: 10px; border-left-width: 4px; border-bottom-width: 4px; }
.studio-camera .cam-vf.br { right: 10px; bottom: 10px; border-right-width: 4px; border-bottom-width: 4px; }
.cutcard-camera-wrap.recording .cam-vf { border-color: rgba(255, 107, 107, 0.9); }
/* カチンコの カウントダウン */
.cutcard-camera-countdown .clapper { width: min(46%, 340px); animation: cam-count-pop 0.9s ease-out both; }
.clapper-stick {
  height: 34px; border-radius: 8px 8px 0 0; transform-origin: 4% 100%; transform: rotate(-24deg);
  background: repeating-linear-gradient(-55deg, #f8f9fa 0 24px, #212529 24px 48px); border: 4px solid #f8f9fa;
}
.clapper.clap .clapper-stick { animation: clapper-snap 0.25s ease-in forwards; }
@keyframes clapper-snap { to { transform: rotate(0deg); } }
.clapper-board {
  display: flex; flex-direction: column; align-items: center; padding: 8px 10px 14px; border-radius: 0 0 12px 12px;
  background: #212529; border: 4px solid #f8f9fa; border-top-width: 3px; color: #fff; box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
}
.clapper-board small { font-size: 1rem; letter-spacing: 4px; opacity: 0.8; min-height: 1.2em; }
.clapper-board b { font-size: 6rem; line-height: 1; }
.clapper.clap .clapper-board b { font-size: 2.6rem; padding: 18px 0; color: #ffd43b; }

/* オンエア・きかく かいぎの 見出し */
.tv-h1 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tv-h1 small, .qx-h1 small { font-size: 0.9rem; font-weight: 700; color: #6c757d; }
.tv-h1-lamp { padding: 3px 12px; border-radius: 6px; background: #e03131; color: #fff; font-size: 0.9rem; letter-spacing: 3px; box-shadow: 0 0 14px 3px rgba(240, 62, 62, 0.7); animation: tv-lamp 1.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .tvst-lamp.on, .tv-h1-lamp, .onair-dot { animation: none; } }

/* カメラ：ナレーションの カンペ（映像の すぐ下。テレビ局の ADが もつ スケッチブック ふう） */
.cam-kanpe {
  display: flex; align-items: center; gap: 12px; width: min(100%, 1100px); margin: 0 auto 10px; padding: 8px 12px; box-sizing: border-box;
  background: #fffbe6; color: #212529; border-radius: 10px; border: 3px solid #fff; box-shadow: 0 4px 0 rgba(0, 0, 0, 0.35), inset 0 -3px 0 #ffe066;
}
.cam-kanpe[hidden] { display: none; }
.cam-kanpe-tag { flex: none; display: flex; flex-direction: column; align-items: center; padding: 4px 10px; border-radius: 8px; background: #212529; color: #fff; font-weight: 900; font-size: 0.85rem; line-height: 1.2; }
.cam-kanpe-tag small { font-size: 0.65rem; color: #ffd43b; letter-spacing: 2px; }
.cam-kanpe-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cam-kanpe-text { font-size: 1.35rem; font-weight: 900; line-height: 1.35; color: #212529; overflow-wrap: anywhere; }
.cam-kanpe-input { font: inherit; font-size: 1.2rem; font-weight: 900; padding: 4px 8px; border: 3px solid #fab005; border-radius: 8px; }
.cam-kanpe-meta { font-size: 0.75rem; color: #868e96; font-weight: 700; }
.cam-kanpe-edit { flex: none; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 2px solid #212529; background: #fff; font: inherit; font-weight: 900; cursor: pointer; }
.cam-kanpe-edit:hover { background: #ffd43b; }
@media (min-width: 901px) {
  .studio-camera .studio-camera-main .cutcard-camera-wrap { width: min(100cqw, calc((100cqh - 236px) * 16 / 9)); }
  .studio-camera-main .cam-kanpe { width: min(100cqw, calc((100cqh - 236px) * 16 / 9)); }
}

/* ===== デッキのカード：よこはばを ひろげて トレカの かたち（たて:よこ ≒ 1.5）に ===== */
.pcard { flex: 0 0 380px; width: 380px; max-width: 380px; }
.pcard-how { grid-template-columns: repeat(3, 1fr); }
.pcard-how li { flex-direction: column; align-items: flex-start; }

/* カードの 絵（GIF）は さわっても カメラが うごかない。カードを えらぶ だけ */
.pcard-window { cursor: inherit; }

/* ===== ナレーション カンペ：ADさんの スケッチブック。大きな 文字で 読みたくなる デザイン ===== */
.cam-kanpe {
  position: relative; gap: 14px; padding: 18px 16px 10px; margin-top: 4px;
  background:
    repeating-linear-gradient(180deg, transparent 0 37px, rgba(77, 171, 247, 0.18) 37px 39px),
    linear-gradient(180deg, #ffffff, #fff9db);
  border: 0; border-radius: 6px 6px 14px 14px;
  box-shadow: 0 0 0 3px #212529, 0 6px 0 3px #212529, 0 10px 18px rgba(0, 0, 0, 0.45);
  animation: kanpe-in 0.45s cubic-bezier(.2, 1.4, .4, 1);
}
/* スケッチブックの リング */
.cam-kanpe-rings {
  position: absolute; left: 18px; right: 18px; top: -9px; height: 18px; pointer-events: none;
  background: radial-gradient(circle at 50% 50%, #fff 0 3px, #868e96 3.5px 6px, transparent 6.5px) 0 0 / 34px 18px repeat-x;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.5));
}
.cam-kanpe-tag {
  align-self: stretch; justify-content: center; gap: 2px; padding: 6px 12px; border-radius: 12px;
  background: linear-gradient(180deg, #ff6b6b, #e03131); color: #fff; font-size: 1rem; letter-spacing: 1px;
  box-shadow: 0 3px 0 #a51111; transform: rotate(-3deg);
}
.cam-kanpe-tag small { color: #fff3bf; font-size: 0.7rem; letter-spacing: 1px; }
.cam-kanpe-mic { font-size: 1.7rem; line-height: 1; display: block; animation: kanpe-mic 1.6s ease-in-out infinite; }
.cam-kanpe-text {
  position: relative; font-size: clamp(1.6rem, 2.6vw, 2.3rem); line-height: 1.45; letter-spacing: 0.04em; color: #1b1f3b;
  text-shadow: 0 2px 0 #fff;
}
.cam-kanpe-text::before, .cam-kanpe-text::after { color: #f76707; font-size: 1.1em; font-weight: 900; }
.cam-kanpe-text::before { content: '「'; margin-left: -0.35em; }
.cam-kanpe-text::after { content: '」'; }
.cam-kanpe-input { font-size: clamp(1.4rem, 2.2vw, 2rem); padding: 6px 10px; border-width: 4px; background: #fff; }
.cam-kanpe-meta { font-size: 0.85rem; color: #495057; }
.cam-kanpe-edit { min-height: 46px; font-size: 1rem; background: #ffd43b; border-width: 3px; box-shadow: 0 3px 0 #212529; }
.cam-kanpe-edit:hover { background: #ffe066; transform: translateY(-1px); }
.cam-kanpe-edit:active { transform: translateY(2px); box-shadow: 0 1px 0 #212529; }
@keyframes kanpe-in { from { opacity: 0; transform: translateY(14px) rotate(-1.5deg); } }
@keyframes kanpe-mic { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg) scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .cam-kanpe, .cam-kanpe-mic { animation: none; } }
@media (min-width: 901px) {
  .studio-camera .studio-camera-main .cutcard-camera-wrap,
  .studio-camera-main .cam-kanpe { width: min(100cqw, calc((100cqh - 290px) * 16 / 9)); }
}
/* カンペは 映像より よこに ひろく つかって、2ぎょうに おさめる */
.cam-kanpe { padding: 16px 14px 8px; gap: 12px; }
.cam-kanpe-tag { align-self: center; flex-direction: row; gap: 6px; padding: 8px 12px; font-size: 0.95rem; }
.cam-kanpe-tag small { display: none; }
.cam-kanpe-mic { font-size: 1.4rem; }
.cam-kanpe-text { font-size: clamp(1.45rem, 2.1vw, 1.9rem); line-height: 1.4; }
@media (min-width: 901px) {
  .studio-camera .studio-camera-main .cutcard-camera-wrap { width: min(100cqw, calc((100cqh - 300px) * 16 / 9)); }
  .studio-camera-main .cam-kanpe { width: 100cqw; }
}

/* ===== じどうで ならべる：ならべかた（プルダウン）と ボタンを ひとつの まとまりに ===== */
.st-auto-group {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 4px 4px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.95); border: 3px solid #7048e8; box-shadow: 0 3px 0 #4c2fb0;
}
.st-auto-step { display: inline-flex; align-items: center; gap: 4px; font-size: 0.8rem; font-weight: 900; color: #4c2fb0; white-space: nowrap; cursor: pointer; }
.st-auto-step b, .st-auto-btn b {
  display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  background: #7048e8; color: #fff; font-size: 0.75rem; line-height: 1;
}
.st-auto-btn b { background: #fff; color: #7048e8; margin-right: 4px; }
.st-auto-group .studio-rule { min-height: 36px; border: 2px solid #b197fc; border-radius: 999px; padding: 0 10px; font-weight: 800; background: #f3f0ff; color: #212529; cursor: pointer; }
.st-auto-arrow { color: #7048e8; font-size: 0.8rem; animation: st-auto-arrow 1.2s ease-in-out infinite; }
.st-auto-group .st-auto-btn { min-height: 36px; border-radius: 999px; background: linear-gradient(180deg, #9775fa, #7048e8); color: #fff; font-weight: 900; border: 0; }
.st-auto-btn.nudge { animation: st-auto-nudge 0.5s ease-in-out 3; }
@keyframes st-auto-arrow { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(3px); } }
@keyframes st-auto-nudge { 0%, 100% { transform: scale(1); box-shadow: none; } 50% { transform: scale(1.08); box-shadow: 0 0 0 4px rgba(151, 117, 250, 0.5); } }
@media (prefers-reduced-motion: reduce) { .st-auto-arrow, .st-auto-btn.nudge { animation: none; } }

/* =====================================================================
   スマホ（はば 600px いか）：カードボードの テレビ局ごっこ を 1れつに おさめる
   ===================================================================== */
@media (max-width: 600px) {
  /* テレビ局の バー：へやの ボタンは 3つ よこならび、局の なまえは 小さく */
  .tvst { flex-wrap: wrap; gap: 8px; padding: 8px; }
  .tvst-station { flex: 1 1 100%; min-width: 0; gap: 6px; font-size: 0.85rem; }
  .tvst-station > * { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  /* カチンコの タイトル */
  .stb-plate, .stb-plate.clapper { flex: 1 1 100%; min-width: 0; flex-wrap: wrap; gap: 6px; padding: 18px 8px 8px; }
  .stb-badge { font-size: 0.75rem; padding: 4px 8px; }
  .stb-title-wrap { flex: 1 1 140px; }
  .studio-titlebar .studio-title { font-size: 1.15rem; letter-spacing: 1px; padding-right: 30px; min-height: 38px; }
  .stb-sec { font-size: 0.85rem; padding: 4px 8px; }
  /* ゾーンの ラベル：せつめいは 下の ぎょうへ */
  .zone-label, .field-outer > .zone-label, .deck-zone .zone-label { flex-wrap: wrap; max-width: calc(100% - 24px); font-size: 0.9rem; padding: 4px 10px; }
  .zone-label small { flex-basis: 100%; white-space: normal; }
  /* デッキの カード：スマホの はばに あわせる */
  .pcard { flex: 0 0 min(300px, 80vw); width: min(300px, 80vw); max-width: min(300px, 80vw); }
  .pcard-how li { font-size: 0.72rem; padding: 4px; }
  /* フィールドの ツール */
  .studio-tl-tools { width: 100%; }
  .st-auto-group { flex-wrap: wrap; border-radius: 16px; padding: 6px 8px; width: 100%; box-sizing: border-box; }
  .st-auto-group .studio-rule { flex: 1 1 140px; min-width: 0; }
  .st-auto-arrow { display: none; }
  .st-auto-group .st-auto-btn { flex: 1 1 100%; }
  /* オンエアへ すすむ バー */
  .studio-output.studio-output-bar { flex-wrap: wrap; gap: 8px; }
  .studio-output-bar .studio-output-btn { min-width: 0; width: 100%; font-size: 1.05rem; white-space: normal; }
}
@media (max-width: 600px) {
  /* へやの ボタンを 3つ よこに ならべる（せつめいの 小さい 字は かくす） */
  .tvst-rooms { flex: 1 1 100%; flex-wrap: nowrap; gap: 4px; }
  .tvst-room { flex: 1 1 0; min-width: 0; flex-direction: column; gap: 2px; padding: 6px 4px; text-align: center; }
  .tvst-room-icon { font-size: 1.2rem; }
  .tvst-room-text small, .tvst-room-text i { display: none; }
  .tvst-room-text b { font-size: 0.72rem; line-height: 1.2; white-space: normal; }
  .tvst-arrow { display: none; }
  .tvst-lamp { flex: none; font-size: 0.65rem; padding: 2px 6px; letter-spacing: 1px; overflow: visible !important; }
  /* デッキの ボタン：ラベルの 下に よこならび */
  .deck-zone > .deck-tabs { flex: 1 1 100%; margin: 6px 8px 0; justify-content: flex-start; gap: 4px; }
  .deck-tab { font-size: 0.75rem; padding: 4px 8px; }
  /* きかくを なおす・やめる */
  .studio-titlebar { flex-wrap: wrap; }
  .studio-titlebar > .btn { flex: 1 1 0; min-height: 44px; font-size: 0.9rem; }
}
@media (max-width: 900px) {
  /* カメラ：スマホ・タブレットでは たて 1れつ（映像 → カンペ → ボタン → とりかた）。下へ スクロールできる */
  .studio-camera { padding: 8px; touch-action: pan-y; }
  .studio-camera-inner { overflow-y: auto; height: 100%; -webkit-overflow-scrolling: touch; }
  .studio-camera-body { grid-template-columns: minmax(0, 1fr) !important; grid-template-rows: auto auto; overflow: visible; gap: 12px; }
  .studio-camera-main { position: relative; container-type: normal; height: auto; min-height: 0; }
  .studio-camera .studio-camera-main .cutcard-camera-wrap,
  .studio-camera-main .cam-kanpe,
  .studio-camera-main #cam-review video { width: 100% !important; }
  .studio-camera-main .studio-camera-error { top: 8px; font-size: 0.8rem; }
  .cam-guide { max-height: none; overflow: visible; }
}
@media (max-width: 600px) {
  .cam-kanpe { flex-wrap: wrap; padding: 16px 10px 8px; gap: 8px; }
  .cam-kanpe-tag { order: 0; }
  .cam-kanpe-edit { order: 1; margin-left: auto; min-height: 38px; font-size: 0.85rem; }
  .cam-kanpe-body { order: 2; flex: 1 1 100%; }
  .cam-kanpe-text { font-size: 1.3rem; }
  .studio-camera-main #cam-actions { gap: 8px; }
}
@media (max-width: 900px) {
  .studio-camera-main .studio-camera-error { position: absolute; left: 50%; transform: translateX(-50%); z-index: 6; width: max-content; max-width: 92%; margin: 0; box-shadow: 0 4px 12px rgba(0,0,0,.35); }
}
@media (max-width: 900px) {
  .studio-camera-body { flex: none !important; height: auto !important; min-height: auto !important; }
}
@media (max-width: 600px) {
  /* とじる ＋ とる ボタン：よこ 1れつ。とじるは 小さく、とるは のこりの はば いっぱい */
  .studio-camera .cam-bottom-row { grid-template-columns: auto minmax(0, 1fr); gap: 8px; }
  .studio-camera .cam-bottom-row > * { grid-column: auto !important; }
  #cam-review .cam-bottom-row { grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr); }
  .cam-close-btn { white-space: nowrap; min-width: 0; padding: 0 12px; font-size: 0.9rem; }
  .studio-camera .cam-big-btn { min-width: 0; width: 100%; font-size: 1rem; padding: 0 10px; white-space: normal; }
}
@media (max-width: 900px) {
  /* きかく かいぎ：しつもん → メモ の たて 1れつ */
  .qx { grid-template-columns: minmax(0, 1fr) !important; }
  .qx-side { position: static !important; width: auto; }
  .qmap { overflow-x: auto; justify-content: flex-start; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
  .qmap > * { flex: none; }
}

/* ===== きかく → カードパック：パックが やぶれて カードが とびだす ===== */
.qpk-overlay {
  position: fixed; inset: 0; z-index: 1300; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px;
  background: radial-gradient(circle at 50% 45%, #3b2a7a 0%, #140f33 60%, #07051a 100%); overflow: hidden; cursor: default;
  --cw: clamp(92px, 20vw, 132px); --ch: calc(var(--cw) * 1.4);
}
.qpk-stage { position: relative; width: min(680px, 96vw); height: calc(var(--ch) + 160px); display: grid; place-items: center; }
.qpk-glow {
  position: absolute; width: 420px; height: 420px; border-radius: 50%; opacity: 0;
  background: conic-gradient(from 0deg, rgba(255, 212, 59, 0.0), rgba(255, 212, 59, 0.55), rgba(255, 212, 59, 0.0) 25%, rgba(255, 212, 59, 0.55) 50%, rgba(255, 212, 59, 0.0) 75%, rgba(255, 212, 59, 0.55));
  -webkit-mask: radial-gradient(circle, #000 0 30%, transparent 70%); mask: radial-gradient(circle, #000 0 30%, transparent 70%);
}
.qpk-overlay.open .qpk-glow { animation: qpk-glow-in 0.5s ease-out 0.25s forwards, qpk-spin 6s linear infinite; }

/* パック */
.qpk-pack { position: relative; z-index: 3; width: 190px; height: 270px; animation: qpk-wobble 0.9s ease-in-out infinite; transform-origin: 50% 90%; }
.qpk-top, .qpk-body {
  position: absolute; left: 0; right: 0;
  background: linear-gradient(115deg, #7048e8 0%, #9775fa 22%, #e5dbff 32%, #9775fa 42%, #5f3dc4 70%, #f783ac 100%);
  background-size: 300% 100%; animation: qpk-foil 2.4s linear infinite; box-shadow: 0 0 0 3px #ffd43b inset;
}
.qpk-top { top: 0; height: 46px; border-radius: 10px 10px 0 0; clip-path: polygon(0 0, 100% 0, 100% 80%, 92% 100%, 84% 80%, 76% 100%, 68% 80%, 60% 100%, 52% 80%, 44% 100%, 36% 80%, 28% 100%, 20% 80%, 12% 100%, 4% 80%, 0 100%); }
.qpk-top span { position: absolute; left: 12px; right: 12px; top: 16px; height: 6px; border-radius: 3px; background: repeating-linear-gradient(90deg, #fff 0 8px, transparent 8px 14px); opacity: 0.8; }
.qpk-body {
  top: 38px; bottom: 0; border-radius: 0 0 12px 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #fff; text-align: center;
  clip-path: polygon(0 8px, 4% 0, 12% 8px, 20% 0, 28% 8px, 36% 0, 44% 8px, 52% 0, 60% 8px, 68% 0, 76% 8px, 84% 0, 92% 8px, 100% 0, 100% 100%, 0 100%);
}
.qpk-logo { font-size: 3.2rem; filter: drop-shadow(0 4px 0 rgba(0, 0, 0, 0.3)); }
.qpk-body b { font-size: 1.15rem; font-weight: 900; letter-spacing: 1px; text-shadow: 0 2px 0 #3b1f8f; }
.qpk-body small { font-size: 1.5rem; font-weight: 900; color: #ffd43b; -webkit-text-stroke: 1px #3b1f8f; text-shadow: 0 3px 0 #3b1f8f; }
.qpk-body i { margin-top: 6px; padding: 2px 10px; border-radius: 999px; background: #e03131; font-style: normal; font-size: 0.75rem; font-weight: 900; border: 2px solid #fff; }
.qpk-overlay.open .qpk-pack { animation: none; }
.qpk-overlay.open .qpk-top { animation: qpk-tear 0.45s cubic-bezier(.3, .6, .5, 1) forwards; }
.qpk-overlay.open .qpk-body { animation: qpk-drop 0.6s ease-in 0.35s forwards; }

/* カード：パックの なかから 1まいずつ とびだして、おうぎがたに ならび、くるっと おもてに なる */
.qpk-cards { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; pointer-events: none; }
.qpk-card {
  grid-area: 1 / 1; width: var(--cw); height: var(--ch); perspective: 800px; opacity: 0;
  transform: translate(0, 40px) scale(0.6);
  animation: qpk-card-out 0.7s cubic-bezier(.2, 1.3, .4, 1) calc(0.45s + var(--i) * 0.18s) forwards;
}
.qpk-card-in { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transform: rotateY(180deg); animation: qpk-flip 0.55s ease-in-out calc(1.35s + var(--i) * 0.16s) forwards; }
.qpk-back, .qpk-front { position: absolute; inset: 0; border-radius: 10px; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 8px 18px rgba(0, 0, 0, 0.5); }
.qpk-back {
  transform: rotateY(180deg); display: grid; place-items: center; border: 4px solid #fff;
  background: repeating-linear-gradient(45deg, #1c2e6b 0 8px, #22377d 8px 16px);
}
.qpk-back span { width: 52%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: #fff; font-size: 1.6rem; border: 3px solid #ffd43b; }
.qpk-front {
  --c1: #a9e34b; --c2: #74b816; --c3: #f4fce3;
  display: flex; flex-direction: column; gap: 4px; padding: 6px; box-sizing: border-box; border: 4px solid #f1f3f5;
  background: linear-gradient(165deg, var(--c3), var(--c1) 35%, var(--c2));
}
.qpk-card.work-pan .qpk-front { --c1: #74c0fc; --c2: #1c7ed6; --c3: #e7f5ff; }
.qpk-card.work-tilt .qpk-front { --c1: #b197fc; --c2: #7048e8; --c3: #f3f0ff; }
.qpk-card.work-zoomin .qpk-front { --c1: #ffa94d; --c2: #f76707; --c3: #fff4e6; }
.qpk-card.work-zoomout .qpk-front { --c1: #63e6be; --c2: #0ca678; --c3: #e6fcf5; }
.qpk-card.work-follow .qpk-front { --c1: #f783ac; --c2: #d6336c; --c3: #fff0f6; }
.qpk-card.wild .qpk-front { background: linear-gradient(135deg, #ff8787, #ffd43b 25%, #69db7c 50%, #4dabf7 75%, #b197fc); }
.qpk-front-head { font-size: 0.68rem; font-weight: 900; color: #212529; background: rgba(255, 255, 255, 0.85); border-radius: 6px; padding: 2px 4px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qpk-front-art { flex: 1; min-height: 0; border-radius: 4px; overflow: hidden; background: #fff; display: grid; place-items: center; border: 2px solid rgba(0, 0, 0, 0.2); font-size: 1.8rem; text-align: center; }
.qpk-front-art img { width: 100%; height: 100%; object-fit: cover; }
.qpk-front-art small { display: block; font-size: 0.62rem; font-weight: 900; color: #5f3dc4; line-height: 1.3; }
.qpk-front-foot { font-size: 0.75rem; font-weight: 900; color: #fff; text-align: center; background: #e03131; border-radius: 999px; padding: 1px 4px; }

.qpk-text { position: relative; z-index: 4; font-size: clamp(1.2rem, 4.5vw, 2rem); font-weight: 900; color: #fff; text-align: center; padding: 0 12px; }
.qpk-overlay:not(.open) .qpk-text { animation: qpk-blink 1s ease-in-out infinite; }
.qpk-overlay.open .qpk-text { -webkit-text-stroke: 2px #e8590c; text-shadow: 0 3px 0 #e8590c; animation: card-pop 0.9s ease-out calc(1.4s + var(--n, 5) * 0.16s) both; }

@keyframes qpk-wobble { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-6deg) scale(1.03); } 75% { transform: rotate(6deg) scale(1.03); } }
@keyframes qpk-foil { to { background-position: -300% 0; } }
@keyframes qpk-tear { to { transform: translate(140px, -200px) rotate(38deg); opacity: 0; } }
@keyframes qpk-drop { to { transform: translateY(260px) rotate(-6deg); opacity: 0; } }
@keyframes qpk-glow-in { to { opacity: 1; } }
@keyframes qpk-spin { to { rotate: 360deg; } }
@keyframes qpk-blink { 50% { opacity: 0.5; } }
@keyframes qpk-card-out {
  0% { opacity: 0; transform: translate(0, 40px) scale(0.6); }
  45% { opacity: 1; transform: translate(0, calc(var(--ch) * -0.55)) scale(1.05); }
  100% { opacity: 1; transform: translate(calc(var(--o) * var(--cw) * var(--sp, 0.92)), calc(var(--o2) * 7px - 10px)) rotate(calc(var(--o) * 7deg)); }
}
@keyframes qpk-flip { to { transform: rotateY(0deg); } }
@media (prefers-reduced-motion: reduce) {
  .qpk-overlay *, .qpk-overlay { animation-duration: 0.01s !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; }
}

/* プロジェクトを けしたら すぐに ちいさく なって きえる */
.project-card.removing { transition: opacity 0.2s ease, transform 0.2s ease; opacity: 0; transform: scale(0.9); pointer-events: none; }

/* ===== カードの うら：ロゴは 白い まるの なかに。白い まるは カードの まんなか ===== */
.pcard-back { background: repeating-linear-gradient(45deg, #1d3557 0 10px, #243b6b 10px 20px) !important; }
.pcard-back-emblem {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 58%; aspect-ratio: 1; border-radius: 50%; background: #fff; display: grid; place-items: center;
  box-shadow: 0 0 0 6px #ffd43b, 0 6px 14px rgba(0, 0, 0, 0.35); pointer-events: none;
}
.pcard-back-emblem img { width: 74%; height: auto; display: block; }
/* くばる ときの うらめんも おなじ（ロゴが まるから はみださない 大きさ） */
.pcard.flip-in::after {
  background:
    url('/brand/ai-for-school.png?v=1') center / 42% auto no-repeat,
    radial-gradient(circle at center, #fff 0 29%, #ffd43b calc(29% + 1px) 31%, transparent calc(31% + 1px)),
    repeating-linear-gradient(45deg, #1d3557 0 10px, #243b6b 10px 20px);
}
/* うらに した カードには「えらんでいるよ」も ピンクの わくも 出さない */
.pcard.off.selected::after { display: none; }
.pcard.off.selected { transform: none; box-shadow: 0 5px 12px rgba(0, 0, 0, 0.35); }

/* 30びょうを こえた ときの ちゅうい（ならべる ことは できる） */
.tl-over-warn {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-top: 8px; padding: 8px 14px; border-radius: 10px;
  background: #fff5f5; color: #c92a2a; border: 3px solid #e03131; box-shadow: 0 3px 0 #a51111;
}
.tl-over-warn b { font-size: 1rem; font-weight: 900; }
.tl-over-warn span { font-size: 0.85rem; font-weight: 800; color: #495057; }
@keyframes tl-over-in { from { opacity: 0; transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .tl-over-warn { animation: none; } }

/* ===== きかく かいぎ：作戦メモを 大きく 読みやすく ===== */
.qmemo-head { font-size: 1.05rem; }
.qmemo-title { font-size: 2rem; }
.qmemo-row { font-size: 1.3rem; font-weight: 900; line-height: 1.4; padding: 6px 2px; }
.qmemo-row span { font-size: 0.95rem; }
.qmemo::before { background: repeating-linear-gradient(180deg, #fff 0 36px, #d0ebff 36px 37px); }

/* カードパックを あける ボタン：がめんの まんなか 下 */
.qx-go-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 22px auto 10px; padding: 0 12px; }
.qx-go-wrap .plan-go { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-width: min(420px, 100%); min-height: 72px; padding: 0 30px; font-size: 1.45rem; }
.pack-icon { width: 34px; height: 44px; flex: none; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.25)); }
.pack-icon-top { transform-origin: 90% 100%; }
.qx-go:not(:disabled):hover .pack-icon-top { animation: pack-icon-tear 0.6s ease-in-out infinite alternate; }
@keyframes pack-icon-tear { to { transform: rotate(-14deg) translate(-2px, -3px); } }
.qx-go:disabled .pack-icon { filter: grayscale(1) opacity(0.7); }
@media (prefers-reduced-motion: reduce) { .qx-go .pack-icon-top { animation: none !important; } }

/* カードパックの アニメーション：カードを 大きく */
.qpk-overlay { --cw: clamp(130px, 17vw, 210px); }
.qpk-stage { width: min(1100px, 98vw); }
.qpk-front-head { font-size: clamp(0.72rem, 1.1vw, 0.95rem); padding: 3px 6px; }
.qpk-front-foot { font-size: clamp(0.8rem, 1.2vw, 1rem); padding: 2px 6px; }
.qpk-front-art small { font-size: clamp(0.66rem, 1vw, 0.85rem); }
.qpk-back span { font-size: 2.4rem; }
@media (max-width: 600px) { .qpk-overlay { --cw: 30vw; --sp: 0.62; } }

/* えらんだ カードは タイムラインに いれていても（番組素材も）ピンクの わく */
.pcard.selected.in-tl, .pcard.bcard.selected, .pcard.bcard.in-tl.selected {
  transform: translateY(-10px) scale(1.03); border-color: #fff;
  box-shadow: 0 0 0 4px #fff, 0 0 0 9px #f03e8a, 0 0 28px 10px rgba(240, 62, 138, 0.75), 0 16px 26px rgba(0, 0, 0, 0.5);
  z-index: 2;
}
.qgoal-box .pack-icon { width: 30px; height: 39px; }
.qpk-overlay.open .qpk-text { animation: qpk-text-pop 0.6s cubic-bezier(.2, 1.5, .4, 1) 2s both; }
@keyframes qpk-text-pop { from { opacity: 0; transform: scale(0.4); } to { opacity: 1; transform: scale(1); } }

/* きかく かいぎ：ひだり 7わり・みぎ 3わり。たての 高さも そろえる */
@media (min-width: 901px) {
  .qx { grid-template-columns: minmax(0, 7fr) minmax(0, 3fr); align-items: stretch; }
  .qx-side { position: static; height: 100%; }
  .qx-side .qmemo { flex: 1; box-sizing: border-box; }
  .qx-main { box-sizing: border-box; height: 100%; }
}

/* 名前スーパーの いちを ずらす じゅうじキー */
.tel-nudge { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; padding: 6px 8px; border-radius: 10px; background: rgba(255, 255, 255, 0.08); }
.tel-nudge-label { font-size: 0.8rem; font-weight: 900; color: #ffd43b; }
.tel-nudge-pad { display: grid; grid-template-columns: repeat(3, 32px); grid-template-rows: repeat(3, 28px); gap: 3px; }
.tel-nudge-pad button { border: 2px solid #fff; border-radius: 8px; background: linear-gradient(180deg, #4dabf7, #1c7ed6); color: #fff; font-weight: 900; font-size: 0.75rem; cursor: pointer; padding: 0; box-shadow: 0 2px 0 #1864ab; }
.tel-nudge-pad button:active { transform: translateY(2px); box-shadow: none; }
.tel-nudge-pad [data-tel-nudge="up"] { grid-column: 2; grid-row: 1; }
.tel-nudge-pad [data-tel-nudge="left"] { grid-column: 1; grid-row: 2; }
.tel-nudge-pad [data-tel-nudge="reset"] { grid-column: 2; grid-row: 2; background: linear-gradient(180deg, #ffe066, #fab005); color: #5c3c00; box-shadow: 0 2px 0 #a35c00; }
.tel-nudge-pad [data-tel-nudge="right"] { grid-column: 3; grid-row: 2; }
.tel-nudge-pad [data-tel-nudge="down"] { grid-column: 2; grid-row: 3; }

/* =====================================================================
   📡 オンエア：テレビ局の ほうそう しつ
   ===================================================================== */
.oa { display: flex; flex-direction: column; gap: 16px; margin-top: 12px; }
.oa-head {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 12px 18px; border-radius: 16px;
  background: linear-gradient(180deg, #2b2f36, #16191d); color: #fff; border: 3px solid #f1f3f5; box-shadow: 0 6px 0 #0b0d10, 0 10px 20px rgba(0, 0, 0, 0.3);
}
.oa-lamp { padding: 6px 14px; border-radius: 8px; font-weight: 900; letter-spacing: 3px; background: #3b0d0d; color: #7a2b2b; border: 2px solid #5c1a1a; transition: all 0.2s; }
.oa-lamp.on { background: #e03131; color: #fff; border-color: #ff8787; box-shadow: 0 0 18px 4px rgba(240, 62, 62, 0.8); animation: tv-lamp 1.4s ease-in-out infinite; }
.oa-head-title { flex: 1; min-width: 200px; display: flex; flex-direction: column; }
.oa-head-title small { font-size: 0.75rem; color: #adb5bd; font-weight: 800; letter-spacing: 1px; }
.oa-head-title b { font-size: 1.7rem; font-weight: 900; letter-spacing: 2px; text-shadow: 0 2px 0 #000; }
.oa-head-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.oa-head-meta span { padding: 6px 12px; border-radius: 999px; border: 2px solid rgba(255, 255, 255, 0.4); font-weight: 900; font-size: 0.9rem; }

.oa-main { display: grid; grid-template-columns: minmax(0, 7fr) minmax(280px, 3fr); gap: 18px; align-items: start; }
@media (max-width: 900px) { .oa-main { grid-template-columns: 1fr; } }

/* テレビ */
.oa-tv { padding: 16px 16px 10px; border-radius: 24px; background: linear-gradient(180deg, #3a3f47, #1d2025); box-shadow: 0 0 0 4px #0b0d10, 0 14px 30px rgba(0, 0, 0, 0.45), inset 0 2px 0 rgba(255, 255, 255, 0.15); }
.oa-tv-screen { border-radius: 10px; box-shadow: inset 0 0 0 3px #000; }
.oa-tv-screen > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.oa-tv-screen > video.oa-back { visibility: hidden; }
.oa-tv-screen .studio-still { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #e7f5ff; }
.oa-tv-foot { display: flex; align-items: center; justify-content: space-between; padding: 8px 6px 0; }
.oa-tv-brand { color: #868e96; font-weight: 900; letter-spacing: 4px; font-size: 0.8rem; }
.oa-tv-ctrl { display: flex; gap: 8px; }
.oa-ctrl { width: 40px; height: 34px; border-radius: 8px; border: 2px solid #495057; background: #212529; color: #fff; font-size: 1rem; cursor: pointer; }
.oa-ctrl:disabled { opacity: 0.35; cursor: default; }
.oa-ctrl:not(:disabled):hover { background: #e03131; border-color: #ff8787; }
.oa-bug { position: absolute; right: 2.5%; top: 4%; z-index: 5; display: flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 6px; background: rgba(0, 0, 0, 0.55); color: #fff; font-weight: 900; font-size: clamp(0.6rem, 1.4cqw, 0.9rem); opacity: 0; transition: opacity 0.3s; }
.oa-bug-dot { width: 8px; height: 8px; border-radius: 50%; background: #e03131; box-shadow: 0 0 6px #ff6b6b; }
.oa-tc { position: absolute; left: 2.5%; bottom: 4%; z-index: 5; font-family: ui-monospace, Menlo, monospace; font-weight: 800; color: #fff; font-size: clamp(0.6rem, 1.3cqw, 0.85rem); background: rgba(0, 0, 0, 0.5); padding: 2px 8px; border-radius: 4px; opacity: 0; transition: opacity 0.3s; }
.oa-tv-screen.is-playing .oa-bug, .oa-tv-screen.is-playing .oa-tc { opacity: 1; }
.oa-tv-screen:has(#pv-clock-weather:not([hidden])) .oa-bug { top: auto; bottom: 4%; }

/* スタート がめん */
.oa-start { position: absolute; inset: 0; z-index: 7; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: radial-gradient(circle, rgba(20, 15, 50, 0.55), rgba(5, 5, 20, 0.85)); color: #fff; text-align: center; padding: 12px; }
.oa-start[hidden] { display: none; }
.oa-start-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; filter: blur(3px) brightness(0.6); }
.oa-start-btn {
  display: inline-flex; align-items: center; gap: 12px; padding: 16px 34px; border-radius: 999px; border: 4px solid #fff; cursor: pointer;
  background: linear-gradient(180deg, #ff6b6b, #e03131 55%, #a51111); color: #fff; font: inherit; font-size: clamp(1.1rem, 3cqw, 1.8rem); font-weight: 900; letter-spacing: 2px;
  box-shadow: 0 6px 0 #6b0f0f, 0 0 30px 6px rgba(240, 62, 62, 0.55); animation: oa-breathe 1.6s ease-in-out infinite;
}
.oa-start-btn:hover { filter: brightness(1.1); }
.oa-start-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #6b0f0f; }
.oa-start-dot { width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 0 10px #fff; }
.oa-start p { margin: 0; font-weight: 800; font-size: clamp(0.75rem, 1.6cqw, 1rem); text-shadow: 0 2px 4px #000; }
@keyframes oa-breathe { 50% { transform: scale(1.05); } }

/* カウントダウン */
.oa-count { position: absolute; inset: 0; z-index: 8; display: grid; place-items: center; background: rgba(0, 0, 0, 0.75); color: #fff; font-weight: 900; font-size: clamp(4rem, 18cqw, 10rem); text-shadow: 0 6px 0 #e03131; }
.oa-count[hidden] { display: none; }
.oa-count::before { content: ''; position: absolute; width: min(60cqw, 360px); aspect-ratio: 1; border-radius: 50%; border: 8px solid rgba(255, 255, 255, 0.25); }
.oa-count.go { font-size: clamp(2rem, 9cqw, 5rem); color: #ffd43b; text-shadow: 0 5px 0 #e8590c; }
.oa-count.pop { animation: oa-pop 0.6s cubic-bezier(.2, 1.5, .4, 1); }
@keyframes oa-pop { from { transform: scale(1.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* おわり */
.oa-end { position: absolute; inset: 0; z-index: 7; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: rgba(10, 10, 30, 0.82); color: #fff; text-align: center; overflow: hidden; }
.oa-end[hidden] { display: none; }
.oa-end b { font-size: clamp(1.3rem, 4cqw, 2.4rem); font-weight: 900; color: #ffd43b; text-shadow: 0 4px 0 #e8590c; animation: oa-pop 0.6s cubic-bezier(.2, 1.5, .4, 1); }
.oa-end > span { font-weight: 900; font-size: clamp(0.9rem, 2.2cqw, 1.3rem); }
.oa-end-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.oa-confetti i { position: absolute; top: -10%; left: calc(var(--k) * 4.2%); width: 10px; height: 16px; border-radius: 2px; background: hsl(calc(var(--k) * 47deg), 85%, 60%); animation: oa-fall calc(1.6s + var(--k) * 0.06s) ease-in calc(var(--k) * 0.05s) infinite; }
@keyframes oa-fall { to { transform: translateY(120cqh) rotate(calc(var(--k) * 90deg)); } }

/* ながれ（チップ） */
.oa-rundown { display: flex; gap: 3px; margin-top: 10px; padding: 6px; border-radius: 10px; background: #1d2025; }
.oa-chip { position: relative; min-width: 18px; height: 30px; border: 0; border-radius: 6px; background: #495057; color: #fff; font-weight: 900; font-size: 0.75rem; cursor: pointer; overflow: hidden; padding: 0; }
.oa-chip.is-brand { background: #8f6b00; }
.oa-chip.unshot { background: repeating-linear-gradient(45deg, #495057 0 6px, #5c636a 6px 12px); }
.oa-chip i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, #ff922b, #f76707); }
.oa-chip.done i { width: 100%; }
.oa-chip span { position: relative; }
.oa-chip.now { box-shadow: 0 0 0 2px #fff, 0 0 10px rgba(255, 146, 43, 0.9); }
.oa-chip:hover { filter: brightness(1.2); }

/* みぎ：VTRカードと チェック */
.oa-side { display: flex; flex-direction: column; gap: 14px; }
.oa-vtr-card { margin: 0; width: auto; max-width: none; }
.oa-vtr-card .vtr-card-window { overflow: hidden; padding: 0; }
.oa-vtr-card .vtr-card-window video { width: 100%; height: 100%; object-fit: cover; display: block; }
.oa-check { padding: 12px 14px; border-radius: 14px; background: #fff; border: 3px solid #212529; box-shadow: 0 4px 0 #212529; }
.oa-check-head { display: flex; justify-content: space-between; align-items: center; font-weight: 900; font-size: 1.05rem; margin-bottom: 8px; }
.oa-check-head b { padding: 2px 10px; border-radius: 999px; background: #2f9e44; color: #fff; }
.oa-check ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.oa-check li { display: flex; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 10px; background: #f8f9fa; }
.oa-check li.ok { background: #ebfbee; }
.oa-check li.ng { background: #fff5f5; }
.oa-check li.tip { background: #fff9db; }
.oa-check-icon { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 0.85rem; background: #fff; }
.oa-check li.ok .oa-check-icon { background: #2f9e44; color: #fff; }
.oa-check li b { display: block; font-size: 0.92rem; font-weight: 900; color: #212529; }
.oa-check li small { display: block; font-size: 0.75rem; font-weight: 700; color: #6c757d; }

/* キューシート */
.oa-cue { padding: 14px 16px; border-radius: 16px; background: #fffdf5; border: 3px solid #212529; box-shadow: 0 5px 0 #212529; }
.oa-cue-head { font-weight: 900; font-size: 1.15rem; margin-bottom: 10px; }
.oa-cue-head small { font-size: 0.8rem; color: #868e96; margin-left: 6px; }
.oa-cue-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.oa-cue-row { display: grid; grid-template-columns: 32px 96px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 6px 10px; border-radius: 10px; background: #fff; border: 2px solid #e9ecef; cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.oa-cue-row:hover { border-color: #f03e8a; }
.oa-cue-row.now { border-color: #f76707; background: #fff4e6; box-shadow: 0 0 0 2px #ffc078; }
.oa-cue-no { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #212529; color: #fff; font-weight: 900; font-size: 0.85rem; }
.oa-cue-thumb { position: relative; width: 96px; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: #000; display: grid; place-items: center; font-size: 1.6rem; }
.oa-cue-thumb.is-brand { background: linear-gradient(135deg, #ffe066, #f59f00); }
.oa-cue-thumb video, .oa-cue-thumb img { width: 100%; height: 100%; object-fit: cover; }
.oa-cue-thumb i { position: absolute; right: 3px; bottom: 3px; padding: 0 5px; border-radius: 4px; background: #e03131; color: #fff; font-style: normal; font-size: 0.6rem; font-weight: 900; }
.oa-cue-row.unshot .oa-cue-thumb img { filter: grayscale(0.6); }
.oa-cue-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.oa-cue-body b { font-size: 0.95rem; font-weight: 900; }
.oa-cue-body em { font-style: normal; font-size: 0.72rem; padding: 1px 7px; border-radius: 999px; background: #e03131; color: #fff; margin-left: 4px; }
.oa-cue-body em.fx { background: #7048e8; }
.oa-cue-body > span { font-size: 0.8rem; font-weight: 700; color: #495057; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.oa-cue-narr { color: #1b1f3b !important; }
.oa-cue-tc { font-family: ui-monospace, Menlo, monospace; font-size: 0.8rem; color: #868e96; font-weight: 700; }
.oa-cue-sec { font-weight: 900; font-size: 0.9rem; padding: 2px 8px; border-radius: 999px; background: #e9ecef; }
@media (max-width: 600px) {
  .oa-cue-row { grid-template-columns: 26px 72px minmax(0, 1fr) auto; gap: 8px; }
  .oa-cue-thumb { width: 72px; }
  .oa-cue-tc { display: none; }
  .oa-head-title b { font-size: 1.3rem; }
}
.oa-empty { padding: 40px 20px; border-radius: 16px; background: #fff; border: 3px dashed #adb5bd; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.oa-empty-tv { font-size: 4rem; }
.oa-actions { display: flex; gap: 10px; flex-wrap: wrap; }
@media (prefers-reduced-motion: reduce) { .oa-start-btn, .oa-confetti i, .oa-lamp.on { animation: none; } }
@media (max-width: 600px) {
  .oa-start-btn { font-size: 1rem; padding: 10px 18px; gap: 8px; letter-spacing: 1px; white-space: nowrap; }
  .oa-start-dot { width: 10px; height: 10px; }
  .oa-start p { font-size: 0.7rem; }
  .oa-head { gap: 8px; padding: 10px 12px; }
  .oa-lamp { padding: 3px 8px; font-size: 0.75rem; letter-spacing: 1px; }
  .oa-head-meta span { padding: 3px 8px; font-size: 0.78rem; }
  .oa-tv { padding: 8px 8px 6px; border-radius: 16px; }
  .oa-end-btns .btn { font-size: 0.8rem; min-height: 36px; padding: 0 10px; }
}

/* カードボード（スタジオ・オンエア）の 名前スーパー：肩書きを 大きく */
.st-telops .telop-role-text { font-size: 2.4cqw; line-height: 1.15; }

/* カードボードの サイドスーパー：1ぎょう 16もじ。文字を 大きく */
.st-telops .tv-telop-box.kind-side { font-size: 3cqw; white-space: nowrap; }
.st-telops .tv-telop-box.kind-side .telop-rich-line { white-space: nowrap; }
.oa-vtr-label { font-weight: 900; font-size: 1rem; color: #212529; margin-bottom: -6px; }
.oa-vtr-label small { display: block; font-size: 0.72rem; font-weight: 700; color: #868e96; }
.oa-vtr-card .vtr-card-window { position: relative; aspect-ratio: 16 / 9; height: auto; min-height: 0; display: grid; place-items: center; font-size: 2.4rem; }
.oa-vtr-card .vtr-card-window img { width: 100%; height: 100%; object-fit: cover; display: block; }
.oa-vtr-unshot { position: absolute; right: 6px; bottom: 6px; padding: 2px 8px; border-radius: 999px; background: #e03131; color: #fff; font-size: 0.7rem; font-weight: 900; }
/* カウントダウン：黒い 背景は うごかさず、数字だけ ぽんと 出す */
.oa-count.pop { animation: none; }
.oa-count-num { position: relative; display: inline-block; }
.oa-count.pop .oa-count-num { animation: oa-pop 0.6s cubic-bezier(.2, 1.5, .4, 1); }

/* カードボード（スタジオ・オンエア）：左上の 時計・天気は 左はしから 3%、サイドスーパーは 右はしから 3% */
.cut-preview-screen .clock-weather-overlay { left: 3%; }
.st-telops .telop-overlay.kind-side { left: 97% !important; }

/* すごろくの コマ（🧒）が はねても 上が きれないように、道の 上に よゆうを とる */
.qmap { padding-top: 50px !important; }

/* カードボードの テロップ：サイドスーパーは 1ぎょうぶんの 高さに。名前は 座布団の まんなかに */
.st-telops .tv-telop-box.kind-side { min-height: 0; line-height: 1.2; padding: 0.1em 0.55em 0.14em; }
.st-telops .tv-telop-box.kind-name { align-items: center; text-align: center; }
.st-telops .tv-telop-box.kind-name .telop-rich-line { text-align: center; }

/* ===== 作戦メモ：すごろくの ボードと おなじ モチーフ ===== */
.qmemo {
  padding: 16px 14px 16px; gap: 12px; border: 4px solid #8d6e3f; border-radius: 18px;
  background:
    radial-gradient(circle at 85% 12%, rgba(255, 255, 255, 0.4) 0 34px, transparent 35px),
    linear-gradient(160deg, #fff3bf, #ffe8a3 50%, #f6d38a);
  box-shadow: inset 0 0 30px rgba(141, 110, 63, 0.35), 0 6px 16px rgba(0, 0, 0, 0.2);
}
.qmemo::before { display: none; }
.qmemo-head { padding: 0; font-size: 1.05rem; color: #5c3c00; }
.qmemo-lv { background: #8d6e3f; color: #fff; border: 2px solid #fff; box-shadow: 0 2px 0 rgba(0, 0, 0, 0.2); font-size: 0.85rem; padding: 2px 10px; }
.qmemo-gauge { display: flex; gap: 6px; height: auto; margin: 0; padding: 0; border: 0; background: none; overflow: visible; }
.qmemo-gauge i { flex: 1; height: 12px; border-radius: 999px; background: rgba(141, 110, 63, 0.25); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2); transition: background 0.3s; }
.qmemo-gauge i.on.pink { background: #e64980; } .qmemo-gauge i.on.blue { background: #1c7ed6; } .qmemo-gauge i.on.orange { background: #f76707; }
.qmemo-gauge i.on.red { background: #e03131; } .qmemo-gauge i.on.green { background: #2f9e44; }
.qmemo-title {
  position: relative; margin: 0; padding: 12px 12px 12px 48px; border: 3px solid #fff; border-radius: 14px; text-align: left;
  background: linear-gradient(180deg, #ff8fb8, #e64980); color: #fff; font-size: 1.6rem; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.2);
  box-shadow: 0 5px 0 #a61e4d;
}
.qmemo-title:not(.filled) { background: #ced4da; box-shadow: 0 5px 0 #868e96; font-size: 1rem; color: #495057; text-shadow: none; }
.qmemo-title small { display: block; font-size: 0.75rem; letter-spacing: 2px; opacity: 0.9; }
.qmemo-flag { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-size: 1.8rem; }
.qmemo-path { position: relative; display: flex; flex-direction: column; gap: 10px; }
.qmemo-path::before { content: ''; position: absolute; left: 21px; top: 20px; bottom: 20px; border-left: 4px dotted rgba(141, 110, 63, 0.55); }
.qmemo-row { --c: #868e96; position: relative; margin: 0; padding: 0; flex-direction: row; align-items: center; gap: 12px; color: #868e96; }
.qmemo-row.blue { --c: #1c7ed6; } .qmemo-row.orange { --c: #f76707; } .qmemo-row.red { --c: #e03131; } .qmemo-row.green { --c: #2f9e44; }
.qmemo-stone {
  position: relative; z-index: 1; flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  background: #adb5bd; color: #fff; font-size: 1.15rem; font-weight: 900; border: 3px solid #fff; box-shadow: 0 4px 0 rgba(0, 0, 0, 0.2);
}
.qmemo-row.filled .qmemo-stone { background: radial-gradient(circle at 35% 30%, #fff 0 8%, var(--c) 9%); font-size: 1.3rem; }
.qmemo-row-body { flex: 1; min-width: 0; padding: 8px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.55); border: 2px dashed rgba(141, 110, 63, 0.4); }
.qmemo-row.filled .qmemo-row-body { background: #fff; border: 3px solid var(--c); box-shadow: 0 3px 0 var(--c); }
.qmemo-row-body > span { display: block; font-size: 0.8rem; font-weight: 900; color: var(--c); }
.qmemo-row:not(.filled) .qmemo-row-body > span { color: #868e96; }
.qmemo-row-body b { display: block; font-size: 1.2rem; font-weight: 900; line-height: 1.35; color: #212529; overflow-wrap: anywhere; }
.qmemo-row:not(.filled) .qmemo-row-body b { font-size: 0.85rem; color: #adb5bd; }

/* テレビ局の へや：えらんでいない へやも「おせる ボタン」に みえるように */
.tvst-room:not(.current) {
  color: #fff; cursor: pointer;
  background: linear-gradient(180deg, #5c7cfa, #3b5bdb); border: 2px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 3px 0 #233a99, 0 4px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.12s, box-shadow 0.12s, filter 0.12s;
}
.tvst-room:not(.current) .tvst-room-text small, .tvst-room:not(.current) .tvst-room-text i { opacity: 0.9; }
.tvst-room:not(.current):hover { color: #fff; background: linear-gradient(180deg, #748ffc, #4263eb); transform: translateY(-2px); box-shadow: 0 5px 0 #233a99, 0 6px 12px rgba(0, 0, 0, 0.35); }
.tvst-room:not(.current):active { transform: translateY(2px); box-shadow: 0 1px 0 #233a99; }
.tvst-room:not(.current):focus-visible { outline: 3px solid #ffd43b; outline-offset: 2px; }
.tvst-room[aria-disabled="true"], .tvst-room.disabled { filter: grayscale(1) opacity(0.6); cursor: not-allowed; transform: none !important; }
.tvst-arrow { color: #adb5bd; }
/* 名前スーパー：名前の 文字を 座布団の たての まんなかに（フォントの 下の よはくを うちけす） */
.st-telops .tv-telop-box.kind-name { padding: 0.22em 0.5em 0.02em; justify-content: center; }
.st-telops .telop-role-strip:has(.telop-role-text:empty) { display: none; }

/* 作戦メモの テーマ：うすい ピンクの 札に 黒い 文字。旗は 白い まるの 上で 赤が はっきり 見える */
.qmemo-title.filled {
  background: linear-gradient(180deg, #fff 0%, #fff0f6 100%); color: #212529; text-shadow: none;
  border: 3px solid #e64980; box-shadow: 0 5px 0 #c2255c;
}
.qmemo-title.filled small { color: #c2255c; opacity: 1; font-weight: 900; }
.qmemo-flag {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 1.3rem;
  background: #fff; border: 2px solid #e64980; box-shadow: 0 2px 0 rgba(0, 0, 0, 0.15);
}
.qmemo-title { padding-left: 54px; }

/* カードボードの 3つの スーパー：かどを まるく */
.st-telops .telop-overlay.kind-name .telop-box-wrap { border-radius: 1.2cqw; overflow: hidden; }
.st-telops .tv-telop-box.kind-setsumei,
.st-telops .tv-telop-box.kind-side { border-radius: 1.2cqw; overflow: hidden; }

/* ===== すごろく：みちを みじかく、マスを 大きく ===== */
.qmap { justify-content: center; gap: 0; }
.qmap-road { flex: 0 1 36px !important; min-width: 14px !important; max-width: 48px; margin-top: 70px !important; }
.qstone { flex: 1 1 140px; width: auto !important; max-width: 190px; min-width: 110px; gap: 5px; }
.qstone-disc { width: 96px !important; height: 96px !important; font-size: 2.8rem !important; border-width: 6px; }
.qstone-no { width: 32px; height: 32px; font-size: 1rem; top: -8px; left: -8px; }
.qstone b { font-size: 1.1rem; line-height: 1.3; }
.qstone small {
  font-size: 0.9rem !important; line-height: 1.35 !important; padding: 4px 8px !important; max-width: 100%; box-sizing: border-box;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden !important;
}
.qstone em { font-size: 0.75rem; padding: 2px 9px; }
.qmap-start { margin-top: 52px !important; font-size: 0.85rem !important; padding: 6px 10px !important; }
.qgoal { margin-top: 26px !important; font-size: 0.95rem; }
.qgoal-box { width: 92px !important; height: 92px !important; }
.qgoal-box .pack-icon { width: 38px; height: 50px; }
.qtoken { font-size: 2.4rem; top: -38px; }
.qmap { padding-top: 58px !important; }
.cut-preview-screen.vid-playing .pv-bigplay { display: none; }

/* 時計・天気と サイドスーパー：上から 3% */
.cut-preview-screen .clock-weather-overlay { top: 3%; }
.st-telops .telop-overlay.kind-side { top: 3% !important; transform: translateX(-100%) !important; }
.st-telops .telop-overlay.kind-side .telop-box-wrap { min-height: 0; padding: 0; justify-content: flex-start; }
.qmap-road { margin-top: 48px !important; }
.qmap-start { margin-top: 32px !important; }
.qgoal { margin-top: 2px !important; }

/* ===== かくにん・へんしゅう：VTRフィールドと おなじ ラベルと わくで 区切る ===== */
.edit-outer { margin-top: 18px; }
.edit-outer > .zone-label {
  position: relative; top: auto; left: auto; display: inline-flex; margin: 0 0 -4px 18px; border-radius: 10px 10px 0 0; border-bottom: none;
  box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.2); background: linear-gradient(180deg, #96f2d7, #20c997); color: #063b2c;
}
.studio-bottom.edit-zone {
  position: relative; padding: 16px 14px 14px; border: 4px solid #12b886; border-radius: 18px;
  background: linear-gradient(180deg, #e6fcf5, #c3fae8);
  box-shadow: inset 0 0 0 3px #0ca678, 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* すごろく：スタートなし。みちを すこし ながく、マスを もっと 大きく */
.qmap-road { flex: 0 1 64px !important; max-width: 80px; min-width: 18px !important; margin-top: 56px !important; }
.qstone { flex: 1 1 160px; max-width: 210px; min-width: 120px; }
.qstone-disc { width: 112px !important; height: 112px !important; font-size: 3.2rem !important; }
.qstone-no { width: 36px; height: 36px; font-size: 1.1rem; }
.qstone b { font-size: 1.25rem; }
.qstone small { font-size: 1rem !important; max-height: calc(1.35em * 3 + 8px); }
.qstone em { font-size: 0.8rem; }
.qgoal-box { width: 104px !important; height: 104px !important; }
.qgoal-box .pack-icon { width: 44px; height: 57px; }
.qgoal { font-size: 1rem; margin-top: 4px !important; }
.qtoken { font-size: 2.6rem; top: -42px; }
.qmap { padding-top: 62px !important; }
/* 名前スーパー：下はしを 画面の 下から 3% に そろえる */
.st-telops .telop-overlay.kind-name.at-bottom { transform: translate(-50%, -100%); }

/* えらんだ カード：大きく しないで 少し うかせるだけ。となりと かさならない よう カードの あいだを ひろげる */
.pcard.selected, .pcard.picked.selected, .pcard.selected.in-tl, .pcard.bcard.selected, .pcard.bcard.in-tl.selected { transform: translateY(-10px) !important; }
.deck-zone-cards { gap: 26px !important; padding-left: 10px; padding-right: 10px; }

/* よけいな 白い まるを けす（すごろくの ボードの 背景・メモの 背景・メモの コマの ハイライト） */
.qx-main { background: linear-gradient(160deg, #fff3bf, #ffe8a3 50%, #f6d38a) !important; }
.qmemo { background: linear-gradient(160deg, #fff3bf, #ffe8a3 50%, #f6d38a) !important; }
.qmemo-row.filled .qmemo-stone { background: var(--c) !important; }
/* サイドスーパー：文字の 上に すこし よはく */
.st-telops .tv-telop-box.kind-side { padding-top: 0.24em; }

/* =====================================================================
   カットカード撮影ボード（分割）
   shoot：カードで とる だけ（タイムライン・へんしゅうは かくす）
   edit ：タイムラインと へんしゅう（カードデッキは かくす）
   ===================================================================== */
.studio.layout-shoot .field-outer,
.studio.layout-shoot .edit-outer,
.studio.layout-shoot .studio-output-bar,
.studio.layout-shoot .pcard-add,
.studio.layout-shoot .pcard-tl-ribbon,
.studio.layout-shoot .stb-sec { display: none !important; }
.studio.layout-shoot .pcard.in-tl:not(.selected) { box-shadow: 0 5px 12px rgba(0, 0, 0, 0.35); }
.studio.layout-edit .deck-zone { display: none !important; }

.shoot-confirm {
  position: sticky; bottom: 10px; z-index: 20; margin-top: 18px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 14px 18px; border-radius: 18px; background: linear-gradient(180deg, #2b2f36, #16191d); color: #fff;
  border: 3px solid #f1f3f5; box-shadow: 0 6px 0 #0b0d10, 0 10px 24px rgba(0, 0, 0, 0.35);
}
.shoot-confirm-info { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 2px; }
.shoot-confirm-info b { font-size: 1.15rem; font-weight: 900; }
.shoot-confirm-info span { font-size: 0.85rem; color: #ced4da; font-weight: 700; }
.shoot-confirm-btn {
  min-height: 60px; padding: 0 28px; border-radius: 999px; border: 4px solid #fff; font-size: 1.2rem; font-weight: 900;
  background: linear-gradient(180deg, #69db7c, #2f9e44); color: #fff; box-shadow: 0 5px 0 #1b5e20;
}
.shoot-confirm-btn:hover { filter: brightness(1.08); }
.shoot-confirm-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #1b5e20; }
.shoot-confirm.all-shot .shoot-confirm-btn { animation: oa-breathe 1.4s ease-in-out infinite; }
.edit-back-row { display: flex; justify-content: flex-start; margin: 10px 0 -4px; }
@media (max-width: 600px) {
  .shoot-confirm-btn { width: 100%; font-size: 1rem; min-height: 52px; }
}
@media (prefers-reduced-motion: reduce) { .shoot-confirm.all-shot .shoot-confirm-btn { animation: none; } }
/* へやが 4つの とき（分割）も 1れつに おさめる */
@media (min-width: 601px) {
  .tvst-rooms { flex-wrap: nowrap; }
  .tvst-room { min-width: 0; }
  .tvst-room-text b, .tvst-room-text i { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
@media (min-width: 601px) and (max-width: 1280px) {
  .tvst-rooms:has(> .tvst-room:nth-of-type(4)) .tvst-room-text i { display: none; }
  .tvst-rooms:has(> .tvst-room:nth-of-type(4)) .tvst-room { padding: 5px 9px; }
  .tvst:has(.tvst-room:nth-of-type(4)) .tvst-name { font-size: 0.85rem; }
}
@media (min-width: 601px) and (max-width: 1280px) {
  .tvst:has(.tvst-room:nth-of-type(4)) .tvst-name { display: none; }
  .tvst:has(.tvst-room:nth-of-type(4)) .tvst-arrow { margin: 0 -2px; }
}
/* オンエア：VTRカードを なくした ぶん、テレビを 大きく */
@media (min-width: 901px) { .oa-main { grid-template-columns: minmax(0, 3fr) minmax(260px, 1fr); } }

/* キューシートを みぎの はばに：コンパクトに、ながい ときは なかで スクロール */
.oa-cue-side { padding: 10px 10px 8px; }
.oa-cue-side .oa-cue-head { font-size: 1rem; margin-bottom: 6px; }
.oa-cue-side .oa-cue-head small { display: block; margin: 0; font-size: 0.72rem; }
.oa-cue-side .oa-cue-list { max-height: 520px; overflow-y: auto; padding-right: 2px; gap: 5px; }
.oa-cue-side .oa-cue-row { grid-template-columns: 24px 64px minmax(0, 1fr) auto; gap: 8px; padding: 5px 6px; }
.oa-cue-side .oa-cue-no { width: 22px; height: 22px; font-size: 0.72rem; }
.oa-cue-side .oa-cue-thumb { width: 64px; font-size: 1.1rem; }
.oa-cue-side .oa-cue-tc { display: none; }
.oa-cue-side .oa-cue-body b { font-size: 0.8rem; }
.oa-cue-side .oa-cue-body em { font-size: 0.62rem; padding: 0 5px; }
.oa-cue-side .oa-cue-body > span { font-size: 0.7rem; }
.oa-cue-side .oa-cue-sec { font-size: 0.75rem; padding: 1px 6px; }
@media (min-width: 901px) { .oa-main { grid-template-columns: minmax(0, 5fr) minmax(320px, 2fr); } }
/* オンエア チェックを すこし コンパクトに（キューシートの ばしょを ふやす） */
.oa-side { gap: 10px; }
.oa-check { padding: 8px 10px; }
.oa-check-head { font-size: 0.95rem; margin-bottom: 6px; }
.oa-check ul { gap: 4px; }
.oa-check li { padding: 4px 6px; gap: 8px; }
.oa-check-icon { width: 22px; height: 22px; font-size: 0.75rem; }
.oa-check li b { font-size: 0.82rem; }
.oa-check li small { font-size: 0.68rem; }

/* オンエア：ぜんがめん */
.oa-fs-btn { width: auto; padding: 0 10px; display: inline-flex; align-items: center; gap: 4px; font-size: 0.85rem; font-weight: 900; }
.oa-fs-btn span { font-size: 0.75rem; }
.oa-tv:fullscreen { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 0; border-radius: 0; background: #000; box-shadow: none; }
.oa-tv:-webkit-full-screen { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 0; border-radius: 0; background: #000; box-shadow: none; }
.oa-tv:fullscreen .oa-tv-screen { width: min(100vw, calc((100vh - 56px) * 16 / 9)); border-radius: 0; box-shadow: none; }
.oa-tv:-webkit-full-screen .oa-tv-screen { width: min(100vw, calc((100vh - 56px) * 16 / 9)); border-radius: 0; box-shadow: none; }
.oa-tv:fullscreen .oa-tv-foot { width: min(100vw, calc((100vh - 56px) * 16 / 9)); padding: 0 10px; box-sizing: border-box; }
.oa-tv:-webkit-full-screen .oa-tv-foot { width: min(100vw, calc((100vh - 56px) * 16 / 9)); padding: 0 10px; box-sizing: border-box; }

/* アプリ名：AI for School スタジオ */
.brand { display: inline-flex; align-items: baseline; gap: 6px; }
.brand-name { font-size: 1.3rem; font-weight: 900; letter-spacing: 2px; }
.brand-sub { font-size: 0.78rem; font-weight: 700; opacity: 0.85; letter-spacing: 1px; }
@media (max-width: 600px) { .brand-sub { display: none; } }

/* もくてきの くわしい せつめい：名前の となりに 1ぎょうで */
.pcard-purpose { min-width: 0; }
.pcard-purpose-name { flex: none; }
.pcard-purpose-detail {
  flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-size: 0.85rem; font-weight: 900; color: #343a40; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.75);
}
/* もくてきの せつめいも 名前と おなじ 太字で（1ぎょうに おさまる 大きさ） */
.pcard-purpose-detail { background: none; padding: 0; border-radius: 0; font-weight: 900; color: #212529; font-size: 1.12rem; letter-spacing: 0.5px; }

/* カードの 左上の タイトル（ロング×パン など）を 大きく */
.pcard-top .pcard-name { font-size: 1.2rem; letter-spacing: 0; }

/* カードの ナレーション（台本の ようそ）。「なにを・サイズ・うごき」の 3つの らんの かわり */
.pcard-narr { margin: 4px 0 0; background: #fff9db; border: 2px solid #ffd43b; border-radius: 10px; padding: 6px 8px; }
.pcard-narr-tag { display: inline-block; font-size: 0.72rem; font-weight: 900; color: #5c3d00; }
.pcard-narr-tag small { font-weight: 700; color: #868e96; margin-left: 2px; }
.pcard-narr-text { margin: 2px 0 0; font-size: 0.85rem; font-weight: 700; line-height: 1.45; color: #1f2937; }
.pcard-narr.pcard-narr-example .pcard-narr-text { color: #6b7280; }

/* ===== すごろく：横スクロールを 出さない =====
   中央よせ ＋ マスの 最小はば で はみだすと、左の マス1が かくれて もどせず、
   ゴールの ひかる アニメ（拡大）で はみだし はばが かわって スクロールが かってに うごいていた。
   マスを はばに あわせて ちぢめ、はみだしは きりおとす（スクロールしない） */
.qmap { overflow-x: clip !important; overflow-y: visible; justify-content: safe center !important; }
.qmap > * { min-width: 0; }
.qstone { flex: 1 1 0 !important; min-width: 0 !important; max-width: 190px; }
.qstone-disc { width: clamp(52px, 7.5vw, 96px) !important; height: clamp(52px, 7.5vw, 96px) !important; font-size: clamp(1.6rem, 2.6vw, 2.8rem) !important; }
.qstone b { font-size: clamp(0.78rem, 1.2vw, 1.1rem); text-align: center; overflow-wrap: anywhere; }
.qstone small { font-size: clamp(0.7rem, 1vw, 0.9rem) !important; }
.qmap-road { flex: 0 1 36px !important; min-width: 4px !important; margin-top: clamp(40px, 5.5vw, 70px) !important; }
.qgoal { flex: 0 1 auto; min-width: 0; }
.qgoal-box { width: clamp(52px, 7vw, 80px); height: clamp(52px, 7vw, 80px); font-size: clamp(1.6rem, 2.6vw, 2.6rem); }
.qgoal b { font-size: clamp(0.7rem, 1vw, 0.85rem); }
@media (max-width: 900px) {
  .qmap { overflow-x: clip !important; justify-content: safe center !important; }
  .qmap > * { flex-shrink: 1; }
  .qstone-disc { width: clamp(44px, 12vw, 80px) !important; height: clamp(44px, 12vw, 80px) !important; font-size: clamp(1.3rem, 4vw, 2.2rem) !important; }
  .qstone b { font-size: clamp(0.7rem, 2.6vw, 0.95rem); }
  .qmap-road { margin-top: clamp(32px, 8vw, 60px) !important; }
  .qgoal-box { width: clamp(44px, 11vw, 72px); height: clamp(44px, 11vw, 72px); font-size: clamp(1.3rem, 4vw, 2.2rem); }
}
/* すごろく：みちは のこりの すきまで のびちぢみ、マスには さいてい はばを のこす。ゴールの 箱も はばに あわせる */
.qstone { min-width: 44px !important; }
.qmap-road { flex: 1 1 4px !important; max-width: 36px; }
.qgoal-box { width: clamp(52px, 7vw, 80px) !important; height: clamp(52px, 7vw, 80px) !important; }
.qgoal-box .pack-icon { width: 55%; height: auto; }
@media (max-width: 900px) {
  .qgoal-box { width: clamp(44px, 11vw, 72px) !important; height: clamp(44px, 11vw, 72px) !important; }
  .qgoal b { font-size: 0.68rem; }
}

/* カードの ナレーション：もっと 目立つように（大きく・こく・ふちどりを ふとく） */
.pcard-narr { margin-top: 8px; background: #fff3bf; border: 3px solid #f59f00; border-radius: 12px; padding: 8px 12px 10px; box-shadow: 0 3px 0 #e8590c33; }
.pcard-narr-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 0.82rem; font-weight: 900; color: #fff; background: #e8590c; border-radius: 999px; padding: 2px 10px; }
.pcard-narr-tag small { color: #fff3bf; font-weight: 800; }
.pcard-narr-text { margin: 6px 0 0; font-size: 1.12rem; font-weight: 900; line-height: 1.5; color: #212529; }
.pcard-narr.pcard-narr-example .pcard-narr-text { color: #343a40; }
/* まだ とっていない カードは 中みを 白黒に するが、ナレーションは よみやすさ 優先で 色の まま */
.pcard:not(.bcard):not(.shot) > .pcard-narr { filter: none !important; }

/* VTRの かたち（作戦メモと カードパック） */
.qmemo-structure { margin: -4px 0 0; padding: 6px 10px; border-radius: 10px; background: #fff; border: 2px dashed #8d6e3f; font-size: 0.8rem; font-weight: 900; color: #5c3c00; }
.qmemo-structure b { display: block; font-size: 1rem; color: #212529; }
.qpk-structure { display: block; margin-top: 8px; font-size: clamp(0.9rem, 2.4vw, 1.2rem); color: #ffe066; -webkit-text-stroke: 0; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.4); }

/* ===== どうして この カード？（えらばれた りくつ） ===== */
.pick-explain { margin: 8px 14px 4px; border-radius: 14px; background: rgba(255, 255, 255, 0.95); border: 3px solid #ffd43b; box-shadow: 0 3px 0 rgba(0, 0, 0, 0.2); color: #212529; position: relative; z-index: 3; }
.pick-explain[hidden] { display: none; }
.pick-explain > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 14px; font-weight: 900; font-size: 1rem; }
.pick-explain > summary::-webkit-details-marker { display: none; }
.pe-sum { font-size: 0.9rem; color: #495057; }
.pe-sum b { color: #c2255c; font-size: 1rem; }
.pe-open { margin-left: auto; font-size: 0.8rem; padding: 2px 10px; border-radius: 999px; background: #fff3bf; color: #5c3c00; }
.pick-explain[open] .pe-open { visibility: hidden; }
.pe-body { padding: 0 16px 14px; display: grid; gap: 10px; }
.pe-step h4 { margin: 0 0 4px; font-size: 0.95rem; font-weight: 900; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pe-step h4 i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; background: #212529; color: #fff; font-size: 0.75rem; }
.pe-step h4 b { color: #c2255c; }
.pe-step p { margin: 0 0 0 30px; font-size: 0.88rem; font-weight: 700; line-height: 1.55; color: #343a40; }
.pe-tweaks { margin: 6px 0 0 30px; padding-left: 18px; font-size: 0.84rem; font-weight: 700; color: #495057; }
.pe-cards { list-style: none; margin: 4px 0 0 30px; padding: 0; display: grid; gap: 4px; }
.pe-cards li { display: grid; grid-template-columns: 24px 56px minmax(140px, auto) 1fr; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 10px; background: #f8f9fa; font-size: 0.86rem; }
.pe-no { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: #495057; color: #fff; font-weight: 900; font-size: 0.75rem; }
.pe-pos { text-align: center; padding: 1px 6px; border-radius: 999px; font-weight: 900; font-size: 0.75rem; color: #fff; background: #4263eb; }
.pe-pos.pos-start { background: #1c7ed6; } .pe-pos.pos-mid { background: #f76707; } .pe-pos.pos-end { background: #2f9e44; } .pe-pos.pos-add { background: #7048e8; } .pe-pos.pos-free { background: #c2255c; }
.pe-cards b { font-weight: 900; }
.pe-why { color: #495057; font-weight: 700; }
.pe-note { margin: 0; font-size: 0.78rem; color: #868e96; font-weight: 700; }
@media (max-width: 600px) {
  .pe-cards li { grid-template-columns: 22px 50px 1fr; }
  .pe-why { grid-column: 2 / -1; }
  .pe-step p, .pe-tweaks, .pe-cards { margin-left: 0; }
}
.qmemo-structure small { display: block; margin-top: 2px; font-size: 0.75rem; font-weight: 700; color: #6c5a3a; line-height: 1.4; }

/* ===== テーマを VTRの かたちから えらぶ ===== */
.qkind-lead { margin: 4px 0 8px; font-weight: 900; font-size: 0.95rem; color: #5c3c00; }
.qkinds { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.qkind {
  --c: #e64980; --bg: #fff0f6;
  border-radius: 14px; background: var(--bg); border: 3px solid var(--c); padding: 8px 10px 10px; box-shadow: 0 3px 0 rgba(0, 0, 0, 0.15);
  animation: card-pop-in 0.35s ease-out var(--d, 0ms) both;
}
.qkind.kind-singlePerson { --c: #e64980; --bg: #fff0f6; }
.qkind.kind-singleObject { --c: #f59f00; --bg: #fff9db; }
.qkind.kind-multiPeople { --c: #1c7ed6; --bg: #e7f5ff; }
.qkind.kind-multiObject { --c: #7048e8; --bg: #f3f0ff; }
.qkind.kind-personObject { --c: #2f9e44; --bg: #ebfbee; }
.qkind.kind-teacher { --c: #0b7285; --bg: #e3fafc; } /* [CA-4] */
.qkind.selected { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--c); }
.qkind-head { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 6px; margin-bottom: 6px; }
.qkind-icon { grid-row: span 2; font-size: 1.8rem; }
.qkind-head b { font-size: 1.05rem; font-weight: 900; color: #212529; }
.qkind-head small { font-size: 0.72rem; font-weight: 800; color: #495057; }
.qkind-themes { display: grid; gap: 5px; }
.qkind-theme {
  text-align: left; padding: 6px 10px; border-radius: 10px; border: 2px solid var(--c); background: #fff; color: #212529;
  font: inherit; font-size: 0.86rem; font-weight: 900; cursor: pointer; transition: transform 0.12s, background 0.12s;
}
.qkind-theme:hover { background: var(--c); color: #fff; transform: translateY(-1px); }
.qkind-theme.selected { background: var(--c); color: #fff; }
@keyframes card-pop-in { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .qkind { animation: none; } }

/* AIが つくった 撮りかた・ナレーション */
.pcard-ai-tag { display: inline-block; margin-right: 6px; padding: 0 6px; border-radius: 999px; background: #7048e8; color: #fff; font-size: 0.68rem; font-weight: 900; vertical-align: 1px; }
.pcard-pick-why.is-ai { display: block; }
.deck-tab.ai { background: linear-gradient(180deg, #9775fa, #7048e8); color: #fff; }
.deck-tab.ai:disabled { opacity: 0.8; cursor: progress; }

/* うらの カードの 右上：デッキから なくす ✕ */
.pcard-back-x {
  position: absolute; top: 10px; right: 10px; width: 38px; height: 38px; border-radius: 50%; border: 3px solid #fff; cursor: pointer;
  background: #e03131; color: #fff; font-size: 1.1rem; font-weight: 900; line-height: 1; display: grid; place-items: center;
  box-shadow: 0 3px 0 #a51111, 0 4px 10px rgba(0, 0, 0, 0.35); transition: transform 0.12s;
}
.pcard-back-x:hover { transform: scale(1.1); }
.pcard-back-x:active { transform: translateY(2px); box-shadow: 0 1px 0 #a51111; }
.pcard.pcard-removing { transition: transform 0.28s ease-in, opacity 0.28s ease-in; transform: scale(0.6) rotate(-8deg) !important; opacity: 0; }

/* ---- 制作中のプロジェクト：えらんで まとめて 削除 ---- */
.plist-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 14px; }
.plist-bulkbar {
  position: sticky; top: 8px; z-index: 20;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 0 0 14px; padding: 10px 14px;
  background: #fff1f2; border: 2px solid #fda4af; border-radius: 14px;
  box-shadow: 0 6px 18px rgba(225, 29, 72, 0.12);
}
.plist-bulk-count { font-size: 0.95rem; color: #9f1239; }
.plist-bulk-count b { font-size: 1.2rem; }
.plist-bulk-spacer { flex: 1; }
.plist-bulkbar .btn[disabled] { opacity: 0.45; cursor: not-allowed; }
.project-card.selecting { position: relative; cursor: pointer; user-select: none; transition: box-shadow 0.15s, transform 0.15s, outline-color 0.15s; outline: 3px solid transparent; outline-offset: 2px; }
.project-card.selecting:hover { transform: translateY(-2px); }
.project-card.selecting .project-card-actions { opacity: 0.35; pointer-events: none; }
.project-card.selecting.is-checked { outline-color: #e11d48; box-shadow: 0 8px 22px rgba(225, 29, 72, 0.22); }
.plist-check {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center;
  background: #fff; border: 2px solid #cbd5e1;
  font-weight: 900; font-size: 1rem; color: #fff;
}
.project-card.is-checked .plist-check { background: #e11d48; border-color: #e11d48; }
@media (max-width: 600px) {
  .plist-bulk-spacer { display: none; }
  .plist-bulkbar .btn { flex: 1 1 auto; }
}

/* ==== 制作中のプロジェクト：ホームと おなじ グラデーションの カードで ワクワク・みやすく ==== */
.plist-hero {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  margin: 0 0 18px; padding: 22px 24px;
  border-radius: 20px; color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  box-shadow: 0 10px 28px rgba(0, 80, 255, 0.22);
}
.plist-hero::before, .plist-hero::after {
  content: ''; position: absolute; border-radius: 50%; pointer-events: none;
  background: rgba(255, 255, 255, 0.12);
}
.plist-hero::before { width: 220px; height: 220px; right: -60px; top: -90px; }
.plist-hero::after { width: 120px; height: 120px; right: 180px; bottom: -70px; }
.plist-hero-emoji {
  flex: none; display: grid; place-items: center;
  width: 64px; height: 64px; border-radius: 18px;
  background: rgba(255, 255, 255, 0.22); font-size: 2.1rem;
  animation: plist-bob 3s ease-in-out infinite;
}
@keyframes plist-bob { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-4px) rotate(4deg); } }
.plist-hero-text { flex: 1 1 260px; min-width: 0; position: relative; }
.plist-hero-text h1 { margin: 0 0 4px; color: #fff; font-size: 1.7rem; font-weight: 900; letter-spacing: 0.02em; }
.plist-hero-text p { margin: 0; color: rgba(255, 255, 255, 0.92); font-size: 0.95rem; font-weight: 600; }
.plist-hero-actions { position: relative; display: flex; gap: 10px; flex-wrap: wrap; }
.plist-new-btn, .plist-select-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 11px 18px; border-radius: 999px;
  font-size: 0.95rem; font-weight: 800; text-decoration: none; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.plist-new-btn { background: #fff; color: var(--blue); border: none; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); }
.plist-select-btn { background: rgba(255, 255, 255, 0.16); color: #fff; border: 2px solid rgba(255, 255, 255, 0.7); }
.plist-new-btn:hover, .plist-select-btn:hover { transform: translateY(-2px); }
.plist-new-btn:hover { text-decoration: none; }

.plist-tabs { display: inline-flex; gap: 6px; padding: 6px; margin: 0 0 18px; background: #fff; border: 1px solid var(--border); border-radius: 999px; box-shadow: 0 2px 10px rgba(20, 30, 60, 0.05); }
.plist-tab {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border: none; border-radius: 999px;
  background: transparent; color: var(--muted);
  font-size: 1rem; font-weight: 800; cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.plist-tab b { min-width: 26px; padding: 1px 8px; border-radius: 999px; background: #eef1f6; color: var(--text); font-size: 0.85rem; }
.plist-tab:hover:not(.active) { background: #f3f5fa; color: var(--text); }
.plist-tab.active { color: #fff; }
.plist-tab.active b { background: rgba(255, 255, 255, 0.28); color: #fff; }
.plist-tab.t-ind.active { background: linear-gradient(135deg, var(--blue), var(--cyan)); box-shadow: 0 4px 12px rgba(0, 80, 255, 0.28); }
.plist-tab.t-team.active { background: linear-gradient(135deg, #f59e0b, #d97706); box-shadow: 0 4px 12px rgba(217, 119, 6, 0.28); }

.plist-empty {
  grid-column: 1 / -1;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 40px 16px; border: 2px dashed #cdd5e1; border-radius: 18px;
  color: var(--muted); font-weight: 700; background: #fff;
}
.plist-empty span { font-size: 2.4rem; }

.project-card-grid { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.project-card {
  --k1: var(--blue); --k2: var(--cyan);
  gap: 0; padding: 0; overflow: hidden;
  border: none; border-top: none; border-radius: 18px;
  box-shadow: 0 4px 16px rgba(20, 30, 60, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.plist-intro .project-card { animation: plist-in 0.4s ease both; animation-delay: calc(var(--i, 0) * 40ms); }
.project-card.removing { animation: none; }
@keyframes plist-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .plist-intro .project-card, .plist-hero-emoji { animation: none; } }
.project-card:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(20, 30, 60, 0.14); }
.project-card.k-ind { --k1: var(--blue); --k2: var(--cyan); }
.project-card.k-team { --k1: #f59e0b; --k2: #d97706; }
.project-card.k-card { --k1: #d6336c; --k2: #f59e0b; }
.project-card.k-split { --k1: #7048e8; --k2: #1c7ed6; }
.project-card.k-beginner { --k1: #2f9e44; --k2: #94d82d; }
.pc-band {
  position: relative; display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; min-height: 64px;
  background: linear-gradient(135deg, var(--k1), var(--k2)); color: #fff; text-decoration: none;
}
.pc-band:hover { text-decoration: none; }
.pc-band::after { content: ''; position: absolute; right: -24px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: rgba(255, 255, 255, 0.14); }
.pc-band-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: rgba(255, 255, 255, 0.25); font-size: 1.4rem; flex: none; }
.pc-band-kind { font-weight: 800; font-size: 0.92rem; letter-spacing: 0.02em; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15); }
.pc-new { position: relative; z-index: 1; margin-left: auto; padding: 3px 9px; border-radius: 999px; background: var(--yellow); color: #5c4400; font-size: 0.72rem; font-weight: 900; letter-spacing: 0.06em; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15); }
.project-card.selecting .pc-new { margin-right: 34px; }
.pc-body { display: flex; flex-direction: column; gap: 8px; flex: 1; padding: 14px 18px 14px; }
.pc-meta-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.pc-status { padding: 3px 10px; border-radius: 999px; background: #fff3cd; color: #8a6600; font-size: 0.75rem; font-weight: 800; }
.pc-status.is-pub { background: #d7f5e3; color: #1b7a3d; }
.pc-when { color: var(--muted); font-size: 0.8rem; font-weight: 700; }
.project-card .project-card-title { font-size: 1.2rem; font-weight: 900; color: var(--dark); overflow-wrap: anywhere; }
.project-card .project-card-meta { font-size: 0.85rem; font-weight: 600; }
.project-card .project-card-actions { display: flex; align-items: flex-end; gap: 8px; flex-wrap: nowrap; margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--border); }
.pc-steps { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; min-width: 0; }
.pc-step {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 7px 11px; border-radius: 10px;
  background: #f3f5fa; border: 1.5px solid #e1e5ec; color: var(--text);
  font-size: 0.82rem; font-weight: 800; text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
}
.pc-step span { font-size: 0.9rem; }
.pc-step:hover { text-decoration: none; transform: translateY(-1px); background: #fff; border-color: var(--k1); color: var(--k1); box-shadow: 0 3px 8px rgba(20, 30, 60, 0.08); }
.pc-del {
  flex: none; width: 36px; height: 36px; border-radius: 10px;
  border: 1.5px solid #fecdd3; background: #fff1f2; cursor: pointer; font-size: 1rem;
  transition: background 0.15s, transform 0.15s;
}
.pc-del:hover { background: #ffe4e6; transform: translateY(-1px); }
.project-card.selecting:hover { transform: translateY(-3px); }
.project-card .plist-check { top: 18px; right: 14px; border-color: rgba(255, 255, 255, 0.9); background: rgba(255, 255, 255, 0.3); }
.project-card.is-checked .plist-check { background: #e11d48; border-color: #fff; }
.project-card.selecting.is-checked { outline: 4px solid #e11d48; outline-offset: 2px; }
@media (max-width: 600px) {
  .plist-hero { padding: 18px 16px; gap: 12px; }
  .plist-hero-emoji { width: 52px; height: 52px; font-size: 1.7rem; }
  .plist-hero-text h1 { font-size: 1.35rem; }
  .plist-hero-actions { width: 100%; }
  .plist-new-btn, .plist-select-btn { flex: 1; justify-content: center; }
  .plist-tabs { display: flex; }
  .plist-tab { flex: 1; justify-content: center; padding: 10px 8px; }
  .project-card-grid { grid-template-columns: 1fr; }
}
.plist-new-btn, .plist-select-btn { white-space: nowrap; }

/* ==== カットカード撮影ボード：ファーストページ（4つの こうてい） ==== */
.cstart { max-width: 1100px; margin: 0 auto; }
.cstart-hero {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 18px;
  padding: 24px 26px; margin: 0 0 22px; border-radius: 22px; color: #fff;
  background: var(--cs-grad); box-shadow: 0 12px 30px rgba(20, 30, 60, 0.18);
}
.cstart-hero::before, .cstart-hero::after { content: ''; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, 0.13); pointer-events: none; }
.cstart-hero::before { width: 240px; height: 240px; right: -70px; top: -110px; }
.cstart-hero::after { width: 130px; height: 130px; right: 200px; bottom: -80px; }
.cstart-hero > div { position: relative; min-width: 0; }
.cstart-hero-icon { flex: none; display: grid; place-items: center; width: 76px; height: 76px; border-radius: 22px; background: rgba(255, 255, 255, 0.24); font-size: 2.6rem; animation: plist-bob 3s ease-in-out infinite; }
.cstart-kicker { display: inline-block; margin-bottom: 6px; padding: 3px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.22); font-size: 0.8rem; font-weight: 800; }
.cstart-hero h1 { margin: 0 0 6px; color: #fff; font-size: 1.75rem; font-weight: 900; line-height: 1.3; }
.cstart-hero p { margin: 0; font-size: 1.05rem; font-weight: 700; color: rgba(255, 255, 255, 0.95); }
.cstart-hero p b { font-size: 1.2rem; background: rgba(255, 255, 255, 0.22); padding: 0 6px; border-radius: 6px; }

.cstart-steps { list-style: none; margin: 0; padding: 0; display: flex; align-items: stretch; gap: 8px; }
.cstart-step {
  position: relative; flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px;
  padding: 26px 14px 16px; border-radius: 20px;
  background: #fff; border: 2px solid var(--border);
  box-shadow: 0 4px 16px rgba(20, 30, 60, 0.07);
  animation: cstart-pop 0.45s cubic-bezier(.2,1.4,.4,1) both; animation-delay: calc(var(--i) * 120ms);
}
@keyframes cstart-pop { from { opacity: 0; transform: translateY(14px) scale(0.94); } to { opacity: 1; transform: none; } }
.cstart-step:nth-of-type(1) { --c: #0ea5e9; }
.cstart-step:nth-of-type(3) { --c: #f97316; }
.cstart-step:nth-of-type(5) { --c: #8b5cf6; }
.cstart-step:nth-of-type(7) { --c: #e11d48; }
.cstart-step { border-top: 6px solid var(--c); }
.cstart-num {
  position: absolute; top: -16px; left: 50%; transform: translateX(-50%);
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--c); color: #fff; font-weight: 900; font-size: 1.05rem;
  border: 3px solid #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}
.cstart-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; font-size: 2.1rem; background: color-mix(in srgb, var(--c) 14%, #fff); }
.cstart-room { font-size: 1.12rem; font-weight: 900; color: var(--dark); }
.cstart-what { padding: 2px 12px; border-radius: 999px; background: var(--c); color: #fff; font-size: 0.85rem; font-weight: 800; }
.cstart-desc { margin: 4px 0 0; font-size: 0.9rem; line-height: 1.6; color: var(--text); font-weight: 600; flex: 1; }
.cstart-get { width: 100%; padding: 7px 8px; border-radius: 12px; background: #f6f7fb; border: 1.5px dashed #d6dbe5; font-size: 0.82rem; font-weight: 800; color: var(--text); }
.cstart-arrow { flex: none; align-self: center; color: #c3cad6; font-size: 1.2rem; }
.cstart-note { margin: 16px 0 0; padding: 10px 14px; border-radius: 12px; background: #fff8e1; border: 1px solid #ffe08a; color: #7a5a00; font-weight: 700; font-size: 0.92rem; text-align: center; }
.cstart-go { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 28px 0 10px; }
.cstart-btn {
  padding: 18px 44px; border: none; border-radius: 999px; cursor: pointer;
  background: linear-gradient(135deg, #ff3d7f, #ff9f1c); color: #fff;
  font-size: 1.35rem; font-weight: 900; letter-spacing: 0.04em;
  box-shadow: 0 8px 0 #c2410c, 0 14px 26px rgba(255, 61, 127, 0.35);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  animation: cstart-pulse 2.2s ease-in-out 1s infinite;
}
.cstart-btn:hover:not(:disabled) { transform: translateY(-2px); }
.cstart-btn:active:not(:disabled) { transform: translateY(6px); box-shadow: 0 2px 0 #c2410c, 0 6px 14px rgba(255, 61, 127, 0.3); }
.cstart-btn:disabled { opacity: 0.7; cursor: wait; animation: none; }
@keyframes cstart-pulse { 0%, 100% { filter: none; } 50% { filter: brightness(1.08) saturate(1.1); } }
.cstart-back { color: var(--muted); font-weight: 700; font-size: 0.95rem; }
@media (prefers-reduced-motion: reduce) { .cstart-step, .cstart-btn, .cstart-hero-icon { animation: none; } }
@media (max-width: 860px) {
  .cstart-steps { flex-direction: column; gap: 22px; }
  .cstart-step { display: grid; grid-template-columns: 64px 1fr; grid-template-areas: "icon room" "icon what" "desc desc" "get get"; justify-items: start; text-align: left; column-gap: 14px; row-gap: 4px; padding: 22px 16px 14px; }
  .cstart-icon { grid-area: icon; align-self: center; }
  .cstart-room { grid-area: room; }
  .cstart-what { grid-area: what; }
  .cstart-desc { grid-area: desc; }
  .cstart-get { grid-area: get; }
  .cstart-num { left: 18px; transform: none; }
  .cstart-arrow { display: none; }
  .cstart-hero { padding: 18px 16px; gap: 12px; }
  .cstart-hero-icon { width: 56px; height: 56px; font-size: 1.9rem; }
  .cstart-hero h1 { font-size: 1.3rem; }
  .cstart-btn { width: 100%; padding: 16px 20px; font-size: 1.2rem; }
}

/* ==== さいしょの 画面（モード選択） ==== */
.rsel { max-width: 920px; margin: 0 auto; padding: 18px 0 30px; }
.rsel-hero { text-align: center; margin: 0 0 30px; }
.rsel-onair { display: inline-flex; align-items: center; gap: 7px; padding: 4px 14px; border-radius: 999px; background: #fff; border: 1.5px solid #fecdd3; color: #e11d48; font-size: 0.78rem; font-weight: 900; letter-spacing: 0.14em; box-shadow: 0 2px 8px rgba(225, 29, 72, 0.1); }
.rsel-onair i { width: 8px; height: 8px; border-radius: 50%; background: #e11d48; box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.18); animation: rsel-blink 1.6s ease-in-out infinite; }
@keyframes rsel-blink { 50% { opacity: 0.35; } }
.rsel-logo { width: 92px; height: 92px; margin: 18px auto 14px; display: grid; place-items: center; font-size: 3rem; border-radius: 28px; background: linear-gradient(135deg, var(--blue), var(--cyan)); box-shadow: 0 14px 30px rgba(0, 80, 255, 0.28); animation: plist-bob 3.4s ease-in-out infinite; }
.rsel-hero h1 { margin: 0 0 8px; font-size: 1.9rem; font-weight: 900; color: var(--dark); line-height: 1.35; }
.rsel-hero h1 b { background: linear-gradient(135deg, var(--blue), var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rsel-hero h1 small { margin: 0 4px; font-size: 0.6em; font-weight: 800; color: var(--muted); }
.rsel-hero p { margin: 0; color: var(--muted); font-size: 1rem; font-weight: 600; }
.rsel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.rsel-card {
  --g1: var(--blue); --g2: var(--cyan);
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; align-items: flex-start; gap: 16px;
  padding: 28px 26px 24px; border: none; border-radius: 24px; cursor: pointer; text-align: left; color: #fff;
  background: linear-gradient(135deg, var(--g1), var(--g2));
  box-shadow: 0 12px 28px color-mix(in srgb, var(--g1) 30%, transparent);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.rsel-card.is-teacher { --g1: #1e3a8a; --g2: #0f172a; }
.rsel-card::before, .rsel-card::after { content: ''; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, 0.1); pointer-events: none; }
.rsel-card::before { width: 220px; height: 220px; right: -70px; top: -90px; }
.rsel-card::after { width: 110px; height: 110px; right: 90px; bottom: -60px; }
.rsel-card:hover { transform: translateY(-4px); box-shadow: 0 18px 36px color-mix(in srgb, var(--g1) 38%, transparent); }
.rsel-card:focus-visible { outline: 4px solid var(--yellow); outline-offset: 3px; }
.rsel-card-icon { position: relative; display: grid; place-items: center; width: 68px; height: 68px; border-radius: 20px; background: rgba(255, 255, 255, 0.2); font-size: 2.3rem; }
.rsel-card-body { position: relative; display: flex; flex-direction: column; gap: 8px; }
.rsel-card-title { font-size: 1.4rem; font-weight: 900; }
.rsel-card-desc { font-size: 0.95rem; line-height: 1.65; font-weight: 600; color: rgba(255, 255, 255, 0.9); }
.rsel-card-go { position: relative; margin-top: auto; display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; border-radius: 999px; background: #fff; color: var(--g1); font-weight: 900; font-size: 0.95rem; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); transition: gap 0.18s ease; }
.rsel-card:hover .rsel-card-go { gap: 12px; }
@media (prefers-reduced-motion: reduce) { .rsel-logo, .rsel-onair i { animation: none; } }
@media (max-width: 680px) {
  .rsel-grid { grid-template-columns: 1fr; gap: 14px; }
  .rsel-hero h1 { font-size: 1.4rem; }
  .rsel-logo { width: 72px; height: 72px; font-size: 2.4rem; border-radius: 22px; }
  .rsel-card { padding: 22px 20px 20px; }
}
/* 生徒の ホームも おなじ デザインで */
.rsel-hero.is-compact { margin-bottom: 22px; }
.rsel-hero.is-compact .rsel-logo { margin-top: 0; width: 80px; height: 80px; font-size: 2.6rem; }
.rsel-section { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 26px 0 12px; font-size: 1.1rem; font-weight: 900; color: var(--dark); }
.rsel-section small { font-size: 0.82rem; font-weight: 700; color: var(--muted); }
.rsel-grid.is-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rsel-grid.is-three .rsel-card { padding: 22px 20px 20px; gap: 12px; }
.rsel-grid.is-three .rsel-card-title { font-size: 1.12rem; line-height: 1.4; }
.rsel-grid.is-three .rsel-card-desc { font-size: 0.86rem; }
.rsel-grid.is-three .rsel-card-icon { width: 56px; height: 56px; font-size: 1.9rem; border-radius: 16px; }
.rsel-card.g-teal { --g1: #0f766e; --g2: #134e4a; }
.rsel-card.g-card { --g1: #d6336c; --g2: #f59e0b; }
.rsel-card.g-split { --g1: #7048e8; --g2: #1c7ed6; }
.rsel-card.g-solo { --g1: #0ca678; --g2: #1c7ed6; }
.rsel-card.g-beginner { --g1: #2f9e44; --g2: #94d82d; }
.rsel-card.g-beginner .rsel-card-go { color: #2b8a3e; }
@media (max-width: 900px) { .rsel-grid.is-three { grid-template-columns: 1fr; } }
/* ファーストページ：4つの こうてい だけを 大きく */
.cstart { max-width: 1200px; padding-top: 28px; }
.cstart-steps { gap: 12px; }
.cstart-step { padding: 38px 18px 22px; gap: 10px; border-radius: 24px; border-top-width: 8px; }
.cstart-num { top: -24px; width: 50px; height: 50px; font-size: 1.5rem; border-width: 4px; }
.cstart-icon { width: 96px; height: 96px; border-radius: 26px; font-size: 3.2rem; }
.cstart-room { font-size: 1.5rem; }
.cstart-what { padding: 4px 16px; font-size: 1.08rem; }
.cstart-desc { font-size: 1.08rem; line-height: 1.7; }
.cstart-get { padding: 10px 10px; font-size: 1rem; border-radius: 14px; }
.cstart-arrow { font-size: 1.6rem; }
.cstart-go { margin-top: 34px; }
.cstart-btn { padding: 20px 52px; font-size: 1.5rem; }
@media (max-width: 860px) {
  .cstart { padding-top: 20px; }
  .cstart-steps { gap: 34px; }
  .cstart-step { grid-template-columns: 80px 1fr; padding: 32px 18px 18px; }
  .cstart-icon { width: 80px; height: 80px; font-size: 2.7rem; }
  .cstart-room { font-size: 1.35rem; }
  .cstart-btn { padding: 18px 20px; font-size: 1.3rem; }
}
.cstart-room { white-space: nowrap; font-size: clamp(1.1rem, 1.7vw, 1.5rem); }
.cstart-step { padding-left: 14px; padding-right: 14px; }
.cstart-steps { gap: 8px; }
@media (max-width: 860px) { .cstart-room { font-size: 1.35rem; } }
/* ファーストページ：さらに 大きく */
.cstart { max-width: 1440px; padding-top: 40px; }
.cstart-steps { gap: 6px; }
.cstart-step { padding: 48px 16px 26px; gap: 14px; border-radius: 28px; border-top-width: 10px; }
.cstart-num { top: -30px; width: 62px; height: 62px; font-size: 1.9rem; }
.cstart-icon { width: 128px; height: 128px; border-radius: 34px; font-size: 4.4rem; }
.cstart-room { font-size: clamp(1.15rem, 1.95vw, 2rem); }
.cstart-what { padding: 6px 20px; font-size: clamp(1rem, 1.45vw, 1.4rem); }
.cstart-desc { font-size: clamp(1rem, 1.35vw, 1.3rem); line-height: 1.7; }
.cstart-get { padding: 12px 10px; font-size: clamp(0.95rem, 1.25vw, 1.2rem); border-radius: 16px; }
.cstart-arrow { font-size: 1.4rem; }
.cstart-go { margin-top: 44px; }
.cstart-btn { padding: 24px 64px; font-size: 1.8rem; }
@media (max-width: 860px) {
  .cstart { padding-top: 28px; }
  .cstart-steps { gap: 44px; }
  .cstart-step { grid-template-columns: 96px 1fr; padding: 40px 18px 20px; row-gap: 8px; }
  .cstart-icon { width: 96px; height: 96px; font-size: 3.3rem; border-radius: 26px; }
  .cstart-num { top: -28px; width: 56px; height: 56px; font-size: 1.7rem; }
  .cstart-room { font-size: 1.55rem; }
  .cstart-what { font-size: 1.15rem; }
  .cstart-desc { font-size: 1.15rem; }
  .cstart-get { font-size: 1.05rem; }
  .cstart-btn { padding: 20px 16px; font-size: 1.45rem; }
}
@media (max-width: 860px) { .cstart-room { font-size: clamp(1.15rem, 5.4vw, 1.55rem); } }
@media (max-width: 420px) { .cstart-step { grid-template-columns: 80px 1fr; column-gap: 12px; } .cstart-icon { width: 80px; height: 80px; font-size: 2.8rem; } }

/* ==== タブレット・スマホ 最適化 ==== */
/* ヘッダー：スマホでは メニューを 1行に（はみ出す ぶんは よこに スクロール） */
@media (max-width: 600px) {
  .app-header { flex-direction: row; align-items: center; flex-wrap: wrap; padding: 10px 14px; gap: 6px 10px; }
  .app-nav { width: 100%; display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-bottom: 2px; }
  .app-nav::-webkit-scrollbar { display: none; }
  .app-nav > * { flex: none; white-space: nowrap; font-size: 0.85rem; }
  .app-nav .nav-user-email { max-width: 7em; overflow: hidden; text-overflow: ellipsis; opacity: 0.85; }
  .app-nav .btn { min-height: 30px; }
}
/* タブレット（たて）：テレビ局の へやボタンを 4つ ならべて、ぜんぶ 見えるように */
@media (min-width: 601px) and (max-width: 900px) {
  .tvst { gap: 8px; padding: 8px 10px; }
  .tvst-name { display: none; }
  .tvst-rooms { flex: 1 1 auto; gap: 6px; }
  .tvst-room { flex: 1 1 0; min-width: 0; flex-direction: column; gap: 2px; padding: 6px 4px !important; text-align: center; }
  .tvst-room-text { align-items: center; }
  .tvst-room-text small, .tvst-room-text i { display: none; }
  .tvst-room-text b { font-size: 0.82rem; white-space: nowrap; }
  .tvst-arrow { display: none; }
}
/* スマホ：へやの なまえは ことばの きれめで おりかえす */
@media (max-width: 600px) {
  .tvst-room-text b { word-break: keep-all; overflow-wrap: anywhere; }
}
/* さつえいの「かくてい」バー：タブレット・スマホでは コンパクトに（カードを かくさない） */
@media (max-width: 900px) {
  .shoot-confirm { padding: 10px 12px; gap: 10px; bottom: 6px; }
  .shoot-confirm-info span { display: none; }
  .shoot-confirm-info { min-width: 0; }
  .shoot-confirm-info b { font-size: 1rem; }
  .shoot-confirm-btn { min-height: 50px; padding: 0 18px; font-size: 1.02rem; }
}
/* タップしやすく：ボタンや リンクの 最小の 高さ */
@media (pointer: coarse) {
  .pc-step, .plist-tab, .deck-tab, .stb-btn { min-height: 40px; }
}
@media (max-width: 600px) {
  .shoot-confirm { gap: 6px; padding: 8px 10px; border-width: 2px; }
  .shoot-confirm-info b { font-size: 0.92rem; }
  .shoot-confirm-btn { min-height: 46px; padding: 0 10px; font-size: 0.95rem; white-space: nowrap; border-width: 3px; }
}
/* スマホ：番組タイトルは 1行 まるごと つかって、えんぴつに かくれないように */
.studio-titlebar .studio-title { padding-right: 38px; }
@media (max-width: 600px) {
  .stb-plate { flex-wrap: wrap; }
  .stb-title-wrap { flex: 1 1 100%; order: 3; }
  .studio-titlebar .studio-title { font-size: 1.1rem; }
}

/* =====================================================================
   よこむきの タブレット：画面の たかさが ひくいので、ぜんたいを ひとまわり 小さく
   （html.tablet-compact は タッチ＆はば 901px いじょうの とき JSで つける）
   ===================================================================== */
html.tablet-compact { font-size: 14px; }
.tablet-compact .app-header { padding: 8px 16px; }
.tablet-compact .app-main { padding: 10px 12px 28px; }
.tablet-compact h1 { font-size: 1.3rem; }
/* テレビ局の バー・タイトル */
.tablet-compact .tvst { padding: 6px 10px; gap: 8px; margin-bottom: 8px; }
.tablet-compact .tvst-room { padding: 4px 10px !important; }
.tablet-compact .tvst-room-icon { font-size: 1.1rem; }
.tablet-compact .tvst-room-text i { display: none; }
.tablet-compact .studio-titlebar { gap: 8px; }
.tablet-compact .stb-plate { padding-top: 14px; padding-bottom: 6px; }
.tablet-compact .studio-titlebar .studio-title { min-height: 36px; font-size: 1.05rem; }
.tablet-compact .stb-btn { padding: 6px 14px; font-size: 0.95rem; }
/* カード：はばを 300px に して、1まいが 画面に おさまるように */
.tablet-compact .pcard { flex: 0 0 290px; width: 290px; max-width: 290px; border-width: 5px; padding: 6px 8px 6px; }
.tablet-compact .pcard-sec { font-size: 1.2rem; }
.tablet-compact .pcard-narr { margin-top: 4px; padding: 5px 9px 7px; border-width: 2px; }
.tablet-compact .pcard-narr-text { font-size: 0.98rem; margin-top: 3px; }
.tablet-compact .pcard-narr-tag { font-size: 0.72rem; }
.tablet-compact .pcard .pcard-add { min-height: 32px; }
.tablet-compact .deck-tab, .tablet-compact .pc-step, .tablet-compact .plist-tab, .tablet-compact .stb-btn { min-height: 34px; }
.tablet-compact .shoot-confirm { padding: 8px 14px; gap: 10px; margin-top: 10px; }
.tablet-compact .shoot-confirm-info span { display: none; }
.tablet-compact .shoot-confirm-btn { min-height: 46px; font-size: 1.05rem; }
/* ファーストページ */
.tablet-compact .cstart { padding-top: 24px; max-width: 1200px; }
.tablet-compact .cstart-step { padding: 38px 14px 18px; gap: 10px; }
.tablet-compact .cstart-num { top: -24px; width: 50px; height: 50px; font-size: 1.5rem; }
.tablet-compact .cstart-icon { width: 96px; height: 96px; font-size: 3.2rem; border-radius: 26px; }
.tablet-compact .cstart-room { font-size: 1.5rem; }
.tablet-compact .cstart-what { font-size: 1.1rem; }
.tablet-compact .cstart-desc { font-size: 1.05rem; }
.tablet-compact .cstart-get { font-size: 0.98rem; }
.tablet-compact .cstart-go { margin-top: 26px; }
.tablet-compact .cstart-btn { padding: 18px 48px; font-size: 1.5rem; }
/* ホーム・一覧 */
.tablet-compact .rsel { padding-top: 6px; }
.tablet-compact .rsel-hero { margin-bottom: 18px; }
.tablet-compact .rsel-logo { width: 68px; height: 68px; font-size: 2.2rem; margin: 10px auto 10px; border-radius: 20px; }
.tablet-compact .rsel-card { padding: 20px 20px 18px; gap: 12px; }
.tablet-compact .rsel-section { margin: 18px 0 10px; }
.tablet-compact .plist-hero { padding: 16px 20px; margin-bottom: 12px; }
.tablet-compact .plist-hero-emoji { width: 52px; height: 52px; font-size: 1.7rem; }
.tablet-compact #st-cards { padding-top: 6px; padding-bottom: 14px; gap: 12px; }
.tablet-compact .deck-zone-group { padding-top: 4px; gap: 6px; }
.tablet-compact #st-pick-explain { margin-top: 4px; }
.tablet-compact #st-pick-explain summary { padding-top: 4px; padding-bottom: 4px; }
.tablet-compact .pcard { flex-basis: 270px; width: 270px; max-width: 270px; }
.tablet-compact .pcard-window { aspect-ratio: 16 / 11; }
.tablet-compact .shoot-confirm { bottom: 4px; padding: 6px 12px; }
.tablet-compact .shoot-confirm-btn { min-height: 42px; }
/* よこむき タブレットでは「かくてい」バーを カードの うえに かさねない（デッキの すぐ下に おく） */
.tablet-compact .shoot-confirm { position: static; }
/* デッキの うえの ボタン（カードこうかん・班へおくる・AI・ふやす）と「どうして このカード？」は いったん かくす */
#st-deck-tabs, #st-pick-explain { display: none !important; }
/* どうがせいさくちゅうは うえの ヘッダーを かくす */
html.no-app-header .app-header { display: none; }
html.no-app-header .app-main { padding-top: 12px; }
.tvst-exit { flex: none; align-self: center; padding: 6px 12px; border-radius: 10px; background: linear-gradient(180deg, #868e96, #495057); color: #fff; font-weight: 900; font-size: 0.85rem; text-decoration: none; white-space: nowrap; box-shadow: 0 3px 0 #212529; }
.tvst-exit:hover { color: #fff; text-decoration: none; filter: brightness(1.1); }
@media (max-width: 600px) { .tvst-exit { position: absolute; top: 8px; right: 8px; padding: 3px 8px; font-size: 0.72rem; } .tvst { position: relative; } }
/* さつえいの しんちょく＋「かくてい」は 画面の うえ（デッキの まえ）に */
.shoot-confirm.at-top { position: static; margin: 0 0 12px; padding: 10px 16px; }
.shoot-confirm.at-top .shoot-confirm-info { gap: 6px; }
.shoot-progress { display: flex; gap: 6px; flex-wrap: wrap; }
.shoot-progress i { width: 34px; height: 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.18); border: 1px solid rgba(255, 255, 255, 0.3); }
.shoot-progress i.on { background: linear-gradient(90deg, #69db7c, #2f9e44); border-color: #b2f2bb; }
.shoot-confirm.at-top .shoot-confirm-btn { min-height: 48px; font-size: 1.05rem; }
@media (max-width: 600px) { .shoot-confirm.at-top .shoot-confirm-btn { min-height: 44px; } .shoot-progress i { width: 24px; } }
/* VTRフィールド：えらんだ カットの ならべかえ ◀ ▶ */
.tl-move { display: flex; align-items: center; justify-content: space-between; gap: 4px; margin-top: 4px; padding: 3px; border-radius: 10px; background: #fff3bf; border: 2px solid #fab005; }
.tl-move span { font-size: 0.68rem; font-weight: 900; color: #7a5a00; white-space: nowrap; }
.tl-move button { flex: none; width: 34px; height: 30px; border-radius: 8px; border: none; background: linear-gradient(180deg, #ffd43b, #f59f00); color: #3b2a00; font-weight: 900; font-size: 0.95rem; cursor: pointer; box-shadow: 0 2px 0 #b35c00; }
.tl-move button:active:not(:disabled) { transform: translateY(2px); box-shadow: none; }
.tl-move button:disabled { opacity: 0.35; cursor: not-allowed; box-shadow: none; }
/* デッキの みだし「カット デッキ」は かくす */
.deck-zone > .zone-label { display: none !important; }
/* よこむき タブレット：カメラの 映像を 大きく（みぎの とりかたを ほそく、カンペを うすく） */
.tablet-compact .studio-camera { padding: 6px 8px; }
.tablet-compact .studio-camera-body { grid-template-columns: minmax(0, 1fr) 220px; gap: 8px; }
.tablet-compact .cam-guide { padding: 8px; gap: 6px; font-size: 0.85rem; }
.tablet-compact .cam-guide-title { font-size: 0.9rem; }
.tablet-compact .cam-guide-gif { max-height: 110px; object-fit: cover; }
.tablet-compact .cam-guide-step { font-size: 0.8rem; gap: 6px; }
.tablet-compact .studio-camera .studio-camera-main .cutcard-camera-wrap { width: min(100cqw, calc((100cqh - 150px) * 16 / 9)); margin-bottom: 6px; }
.tablet-compact .studio-camera-main .cam-kanpe { width: min(100cqw, calc((100cqh - 150px) * 16 / 9)); margin: 0 auto 4px; padding: 6px 10px; }
.tablet-compact .cam-kanpe-text { font-size: 1.15rem; }
.tablet-compact .cam-kanpe-meta { display: none; }
.tablet-compact .studio-camera-main #cam-actions { padding: 2px 0 8px; }
.tablet-compact .studio-camera .cam-close-btn { min-height: 44px; }
.tablet-compact .studio-camera-main #cam-review video { width: min(100cqw, calc((100cqh - 90px) * 16 / 9)); }
/* 「VTR フィールド」の みだしも かくす */
.field-outer > .zone-label { display: none !important; }
/* テレビ局の バーの「ON AIR」ランプは かくす */
.tvst-lamp { display: none !important; }

/* ==== くろい バーが 3つ ならぶと わかりにくい → やくわりごとに 色を わける ====
   ① テレビ局の バー（どこに いるか）＝ くろ のまま
   ② ばんぐみ タイトル ＝ しろい カード（カチンコの しまもようは ほそく のこす）
   ③ とった カット（すすみぐあい）＋ かくてい ＝ みどりの カード */
.stb-plate.clapper {
  padding-top: 16px; background: #fff; border: 2px solid #dee2e6; border-radius: 14px;
  box-shadow: 0 3px 10px rgba(20, 30, 60, 0.08);
}
.stb-plate.clapper::before { left: -2px; right: -2px; top: -2px; height: 10px; border-width: 2px; border-bottom-width: 1px; border-radius: 12px 12px 0 0; background: repeating-linear-gradient(-55deg, #343a40 0 12px, #f8f9fa 12px 24px); border-color: #dee2e6; }
.stb-plate.clapper .stb-badge { color: #495057; border: 2px solid #ced4da; background: #f1f3f5; font-size: 0.78rem; }
.stb-plate.clapper .studio-title, .studio-titlebar .studio-title { color: #212529; text-shadow: none; }
.studio-titlebar .studio-title::placeholder { color: #adb5bd; }
.studio-titlebar .studio-title:hover { border-color: #ced4da; }
.studio-titlebar .studio-title:focus { border-color: #fab005; background: #fffbea; }
.stb-plate.clapper .stb-sec { color: #495057; border-color: #ced4da; }
.stb-pen { opacity: 0.55; }

.shoot-confirm, .shoot-confirm.at-top {
  background: linear-gradient(180deg, #f4fce3, #ebfbee); color: #1b4332;
  border: 2px solid #8ce99a; box-shadow: 0 3px 10px rgba(47, 158, 68, 0.12);
}
.shoot-confirm-info b { color: #1b4332; }
.shoot-confirm-info span { color: #2b8a3e; }
.shoot-progress i { background: #fff; border: 2px solid #b2f2bb; height: 12px; }
.shoot-progress i.on { background: linear-gradient(90deg, #51cf66, #2f9e44); border-color: #2f9e44; }
.shoot-confirm-btn { border-color: #fff; box-shadow: 0 4px 0 #1b5e20, 0 4px 10px rgba(47, 158, 68, 0.3); }
/* へんしゅうしつ：ならんだ カットの うしろの「＋ カットを おこう」は かくす */
.studio.layout-edit .tl-slot-tail { display: none !important; }
/* テレビ局の バーの「📺 ミニテレ ほうそうきょく」も かくす */
.tvst-station { display: none !important; }
/* プレビューの 左上の「2 ばしょ ロング パン」は かくす */
#st-overlay { display: none !important; }
/* オンエア：右上の タイトル（REC）と 左下の タイムコードは かくす */
#oa-screen .oa-bug, #oa-screen .oa-tc { display: none !important; }
/* タイトルと「とった カット」の バーを ほそく・すっきり */
.studio-titlebar { align-items: center; }
.stb-plate, .stb-plate.clapper { min-height: 0; padding: 12px 12px 4px 8px; gap: 10px; }
.stb-plate.clapper::before { height: 7px; }
.studio-titlebar .studio-title { min-height: 34px; font-size: 1.25rem; letter-spacing: 1px; padding-top: 2px; padding-bottom: 2px; }
.stb-plate.clapper .stb-badge { padding: 3px 8px; font-size: 0.72rem; }
.studio-titlebar > .stb-btn { padding: 8px 14px; font-size: 0.9rem; align-self: stretch; display: inline-flex; align-items: center; }
.shoot-confirm.at-top { padding: 6px 8px 6px 14px; gap: 12px; margin-bottom: 10px; border-radius: 14px; }
.shoot-confirm.at-top .shoot-confirm-info { flex-direction: row; align-items: center; gap: 12px; flex-wrap: wrap; }
.shoot-confirm.at-top .shoot-confirm-info b { font-size: 1rem; }
.shoot-confirm.at-top .shoot-progress i { width: 26px; height: 10px; }
.shoot-confirm.at-top .shoot-confirm-btn { min-height: 40px; padding: 0 18px; font-size: 0.95rem; border-width: 3px; box-shadow: 0 3px 0 #1b5e20; }
/* えらんだ カット：わくを ほそく・うかせかたも ひかえめに（ラベルとの すきまも つめる） */
.pcard.selected, .pcard.picked.selected, .pcard.selected.in-tl, .pcard.bcard.selected, .pcard.bcard.in-tl.selected,
.deck-zone .pcard.selected:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 0 0 2px #fff, 0 0 0 5px #f03e8a, 0 6px 14px rgba(240, 62, 138, 0.35), 0 8px 16px rgba(0, 0, 0, 0.35) !important;
}
.deck-zone-cards { padding-top: 8px !important; gap: 16px !important; }
.deck-zone-group { gap: 4px !important; }
/* 「さつえいずみ」は 映像に かさねず、カットの なまえの よこに */
.pcard-shot-badge.top { position: static; flex: none; display: inline-flex; align-items: baseline; gap: 3px; padding: 2px 7px; border-radius: 999px; background: #2f9e44; color: #fff; font-size: 0.68rem; font-weight: 900; white-space: nowrap; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transform: none; }
.pcard-shot-badge.top small { font-size: 0.6rem; font-weight: 800; opacity: 0.9; }
/* 「とった カット」の バーと デッキの すきまを つめる */
.shoot-confirm.at-top { margin-bottom: 4px !important; }
.studio.layout-shoot .deck-zone { margin-top: 0 !important; }
.studio.layout-shoot .deck-zone .studio-cards { padding-top: 6px !important; }
.studio.layout-shoot { row-gap: 6px; }
.shoot-confirm.at-top { margin-bottom: 0 !important; }
.studio.layout-shoot .deck-zone-group { padding-top: 4px !important; }
/* VTRフィールドの うえの「おすすめを ならべる／ならべかた／じどう／もどす」は かくす */
.studio-tl-tools { display: none !important; }

/* ==== オンエア：1がめんに おさめる（テレビの 大きさを 画面の たかさに あわせる） ==== */
@media (min-width: 901px) {
  .oa-head { padding: 6px 14px; gap: 12px; box-shadow: 0 4px 0 #0b0d10; border-width: 2px; }
  .oa-head .oa-lamp { display: none; }
  .oa-head-title { flex-direction: row; align-items: baseline; gap: 10px; }
  .oa-head-title b { font-size: 1.3rem; letter-spacing: 1px; }
  .oa-head-meta span { padding: 3px 10px; font-size: 0.82rem; }
  .oa-main { grid-template-columns: max-content minmax(260px, 1fr) !important; gap: 14px; margin-top: 10px; }
  .oa-tv-wrap { width: min(calc(100vw - 340px), calc((100vh - 270px) * 16 / 9 + 32px)); max-width: 100%; }
  .oa-tv { padding: 10px 12px 6px; }
  .oa-rundown { margin-top: 6px; padding: 4px; }
  .oa-side { max-height: calc(100vh - 190px); min-height: 0; overflow: hidden; }
  .oa-check { flex: none; }
  .oa-cue-side { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
  .oa-cue-side .oa-cue-list { max-height: none; flex: 1; min-height: 0; overflow-y: auto; }
}
@media (min-width: 901px) {
  .oa-tv-wrap { width: min(calc(100vw - 340px), calc((100vh - 305px) * 16 / 9 + 32px)); }
  .oa-side { max-height: calc(100vh - 195px); }
}
html.no-app-header .app-main { padding-bottom: 12px; }
/* プレビューの うえの「プレビュー モニター／ON AIR」の おびは かくす */
.pv-monitor-bar { display: none !important; }

/* ==== へんしゅうしつ：プレビューを L字に かこむ（みぎ＝カットの IN/OUT・はずす、した＝テロップ・エフェクト） ==== */
@media (min-width: 901px) {
  .studio-bottom.edit-zone {
    grid-template-columns: minmax(0, 1fr) clamp(280px, 26vw, 400px) !important;
    grid-template-areas: "pv side" "bottom side";
    grid-template-rows: auto 1fr;
    align-items: stretch; gap: 12px;
  }
  .studio-bottom.edit-zone > .studio-preview { grid-area: pv; }
  .studio-bottom.edit-zone > .studio-inspector { display: contents; }
  .studio-bottom.edit-zone .inout { display: contents; }
  .studio-bottom.edit-zone .inout-side,
  .studio-bottom.edit-zone .inout-bottom,
  .studio-bottom.edit-zone .inout-empty {
    background: linear-gradient(180deg, #24306f 0%, #161d4f 100%); color: #fff; border-radius: 18px; padding: 14px;
    border: 3px solid #ffd43b; box-shadow: 0 0 0 3px #10163d, 0 6px 0 #0a0f2e;
  }
  .studio-bottom.edit-zone .inout-side { grid-area: side; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
  .studio-bottom.edit-zone .inout-empty { grid-area: side; }
  .studio-bottom.edit-zone .inout-bottom { grid-area: bottom; display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; min-width: 0; }
  .studio-bottom.edit-zone .inout-fx { border-left: 2px dashed rgba(255, 212, 59, 0.35); padding-left: 14px; }
  .studio-bottom.edit-zone .inout-side .inout-move { margin-top: auto; }
}
/* タブレット・スマホでは たてに ならべる（右の らんの なかで じゅんばんに） */
@media (max-width: 900px) {
  .inout-side, .inout-bottom { display: flex; flex-direction: column; gap: 12px; }
}

/* オンエア：チェックの らんは なくして、キューシートだけ */
.oa-side .oa-check { display: none !important; }
/* iPad の Safari は 100vh が タブ・アドレスバーの ぶん 大きいので、見えている たかさ（svh）で はかる */
@media (min-width: 901px) {
  .oa-tv-wrap { width: min(calc(100vw - 340px), calc((100svh - 305px) * 16 / 9 + 32px)); }
  .oa-side { max-height: calc(100svh - 195px); }
  .oa-cue-side { flex: 1 1 auto; }
}
/* よこむき タブレットは さらに すこし ひくく */
.tablet-compact .oa-tv-wrap { width: min(calc(100vw - 300px), calc((100svh - 300px) * 16 / 9 + 28px)); }
.tablet-compact .oa-side { max-height: calc(100svh - 180px); }
.tablet-compact .tvst { margin-bottom: 6px; }
.tablet-compact .oa-main { margin-top: 6px; }
/* よこむき タブレットの カット：もう すこし ひくく（ブラウザの タブの ぶん） */
.tablet-compact .pcard { flex-basis: 250px; width: 250px; max-width: 250px; }
.tablet-compact .pcard-narr-text { font-size: 0.92rem; line-height: 1.4; }
.tablet-compact .pcard .pcard-add { min-height: 28px; }
@media (min-width: 901px) { .oa-side { align-self: stretch; } }
/* タブレット・スマホの ぜんがめん（ブラウザの ぜんがめんを つかわず、テレビを 画面いっぱいに） */
html.oa-pseudo-fs-open, html.oa-pseudo-fs-open body { overflow: hidden; }
.oa-tv.oa-pseudo-fs {
  position: fixed; inset: 0; z-index: 10000; margin: 0; width: auto; height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 0; border-radius: 0; background: #000; box-shadow: none;
}
.oa-tv.oa-pseudo-fs .oa-tv-screen { width: min(100vw, calc((100svh - 56px) * 16 / 9)); border-radius: 0; box-shadow: none; }
.oa-tv.oa-pseudo-fs .oa-tv-foot { width: min(100vw, calc((100svh - 56px) * 16 / 9)); padding: 0 10px; box-sizing: border-box; }
/* へんしゅうしつ：プレビューは 画面の 6わり くらいに */
@media (min-width: 901px) {
  .studio-bottom.edit-zone { grid-template-columns: minmax(0, 6fr) minmax(280px, 4fr) !important; }
}
/* よこむき タブレット：カットを よこに ひろく して、たてながに しない */
.tablet-compact .pcard { flex-basis: 330px; width: 330px; max-width: 330px; }
.tablet-compact .pcard-window { aspect-ratio: 16 / 9; }
.tablet-compact .pcard-narr-text { font-size: 0.9rem; line-height: 1.4; }
/* エフェクトは 右の らん。下の だんは テロップだけ */
@media (min-width: 901px) {
  .studio-bottom.edit-zone .inout-bottom { grid-template-columns: 1fr; }
  .studio-bottom.edit-zone .inout-fx { border-left: none; padding-left: 0; border-top: 2px dashed rgba(255, 212, 59, 0.35); padding-top: 10px; }
}
.cstart-get { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.cstart-get small { font-size: 0.72em; font-weight: 800; color: var(--muted); letter-spacing: 1px; }
.cstart-what { white-space: nowrap; font-size: clamp(0.85rem, 1.25vw, 1.4rem); }
@media (max-width: 860px) { .cstart-what { font-size: 1.05rem; } }
.tablet-compact .cstart-what { font-size: 1rem; }
/* せつめいは ことばの きれめ（スペース）で おりかえす */
.cstart-desc { word-break: keep-all; overflow-wrap: anywhere; }
/* せつめいは かならず 2ぎょう（もじの 大きさを はばに あわせる） */
@media (min-width: 861px) {
  .cstart-steps { gap: 4px; }
  .cstart-step { padding-left: 10px !important; padding-right: 10px !important; }
  .cstart-desc { white-space: nowrap; font-size: clamp(0.8rem, 1.12vw, 1.3rem) !important; line-height: 1.7; }
  .cstart-arrow { font-size: 1rem; margin: 0 -2px; }
}
/* ファーストページの「← もどる」：ボタンから はなして、すこし 大きく */
.cstart-go { gap: 0 !important; }
.cstart-back { margin-top: 34px; display: inline-flex; align-items: center; gap: 6px; padding: 10px 22px; border-radius: 999px; border: 2px solid #ced4da; background: #fff; color: #495057; font-size: 1.1rem; font-weight: 900; text-decoration: none; }
.cstart-back:hover { background: #f1f3f5; color: #212529; text-decoration: none; }

/* ==== へんしゅうしつ：タイトル・びょうは かくす ／ じかんの メーターを すっきり ／ カットの おおきさを かえない ==== */
/* じかんの メーター（左上）：1ぎょうに まとめる */
.field-zone .studio-tl-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.field-zone .studio-tl-sec { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 8px; border-radius: 999px; background: rgba(0, 0, 0, 0.35); border: 2px solid rgba(255, 255, 255, 0.25); color: #fff; }
.tl-time-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #ffd43b; color: #3b2a00; font-size: 1rem; }
.tl-time-now { display: inline-flex; align-items: baseline; gap: 2px; }
.tl-time-now strong { font-size: 1.5rem; font-weight: 900; line-height: 1; color: #fff; }
.tl-time-now strong.over { color: #ff8787; }
.tl-time-now small { font-size: 0.85rem; font-weight: 800; color: #dbe4ff; }
.field-zone .studio-tl-sec .tl-gauge-label { margin: 0; padding: 3px 10px; border-radius: 999px; background: #2f9e44; color: #fff; font-size: 0.8rem; font-weight: 900; }
.field-zone .studio-tl-sec .tl-gauge-label.over { background: #e03131; }
/* カット：なまえが きれない はばに */
.cut-tl-block.tl-card { flex: 0 0 176px; width: 176px; }
.tl-card-name { overflow: visible; text-overflow: clip; font-size: 0.74rem; letter-spacing: -0.3px; }
/* ならべかえ ◀ ▶ は カットの 下に かさねて、カットの たかさを かえない */
.cut-tl-block.tl-card { position: relative; }
.tl-move { position: absolute; left: -4px; right: -4px; top: calc(100% + 8px); margin: 0; z-index: 3; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35); }
#st-timeline { padding-bottom: 50px; }
.cut-tl-block.tl-card { flex: 0 0 188px; width: 188px; }
.tl-card-top { gap: 4px; }
.tl-card-sec { flex: none; margin-left: auto; }
/* へんしゅうしつ：のこった「カットの がめんへ／やめる」は テレビ局の バーの 右に のせる（空いた 行を なくす） */
/* フィールドの ドラッグ＆ドロップ */
.field-zone .tl-card[data-item] { touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.tl-card.tl-dragging { opacity: 0.35; }
.tl-drag-ghost { position: fixed; left: 0; top: 0; z-index: 10000; pointer-events: none; opacity: 0.92; box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45) !important; cursor: grabbing; }
.tl-card.drop-before::before, .tl-card.drop-after::after {
  content: ''; position: absolute; top: -6px; bottom: -6px; width: 6px; border-radius: 3px; background: #ffd43b; box-shadow: 0 0 10px rgba(255, 212, 59, 0.9); z-index: 4;
}
.tl-card.drop-before::before { left: -14px; }
.tl-card.drop-after::after { right: -14px; }
/* まだ とっていない カットでも「ならべかえ」ボタンは 色つき */
.tl-card.unshot > .tl-move { filter: none; }
/* 番組素材（オープニングなど）の カードでも 再生バーを よこいっぱいに */
.tl-card .tl-card-prog { align-self: stretch; flex: none; }

/* へんしゅうしつ：右の らんの いちばん上（カットの なまえ・びょう）は かくす */
.studio-bottom.edit-zone .inout-head { display: none !important; }
/* じかんの メーター：びょうと バーを 1ぎょうに まとめて ほそく */
.field-zone#st-tl-drop { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; align-items: center; }
.field-zone#st-tl-drop > .studio-tl-head { grid-column: 1; margin: 0; }
.field-zone#st-tl-drop > #st-limitbar { grid-column: 2; margin: 0; }
.field-zone#st-tl-drop > #st-timeline, .field-zone#st-tl-drop > #st-message, .field-zone#st-tl-drop > #st-warnings { grid-column: 1 / -1; }
.field-zone .studio-tl-sec { padding: 2px 10px 2px 3px; gap: 7px; border-width: 1px; }
.tl-time-icon { width: 22px; height: 22px; font-size: 0.78rem; }
.tl-time-now strong { font-size: 1.1rem; }
.tl-time-now small { font-size: 0.75rem; }
.field-zone .studio-tl-sec .tl-gauge-label { padding: 1px 8px; font-size: 0.72rem; }
.field-zone .studio-limitbar .cut-limit-track { height: 10px; }
/* 番組素材の カード：中の 行を よこいっぱいに（びょうを 右はしに） */
.cut-tl-block.tl-card.brand { align-items: stretch; }
.tl-card.brand .tl-card-top { align-self: stretch; }
/* タイトルの おびと ボタンの たかさを そろえる（ボタンの 下の かげも ふくめて おなじ たかさに） */
.studio-titlebar { align-items: stretch !important; }
.studio-titlebar > .stb-btn { align-self: stretch; margin-bottom: 4px; display: inline-flex; align-items: center; height: auto !important; }
.studio-titlebar > .stb-btn.plan { box-shadow: 0 4px 0 #0b4f8f !important; }
.studio-titlebar > .stb-btn.quit { box-shadow: 0 4px 0 #212529 !important; }
/* へんしゅうしつ：タイトルの おびと フィールドの あいだを つめる */
.studio.layout-edit { row-gap: 6px; }
.studio.layout-edit .field-outer { margin-top: 0 !important; }
/* ならべかえの 下の すきまを つめる */
.tl-move { top: calc(100% + 5px); }
#st-timeline { padding-bottom: 46px; }
.field-zone#st-tl-drop { padding-bottom: 8px; }
.field-zone #st-warnings:empty, .field-zone #st-message[hidden] { display: none; }
.field-zone #st-warnings { margin: 0; }
/* 「かくにん・へんしゅう」の みだしも かくす */
.edit-outer > .zone-label { display: none !important; }
.studio.layout-edit .edit-outer { margin-top: 0 !important; }
/* へんしゅうしつ：プレビュー・へんしゅうパーツを 上に、VTRの リスト（フィールド）を 下に（テレコ） */
.studio.layout-edit > .studio-titlebar { order: 0; }
.studio.layout-edit > .edit-outer { order: 1; }
.studio.layout-edit > .field-outer { order: 2; }
.studio.layout-edit > .studio-output { order: 3; }
/* へんしゅうしつの プレビュー：くろい わくを 4へん おなじ ふとさに（映像は 16:9 の まま） */
.studio-bottom.edit-zone > .studio-preview { background: #22262c; padding: 6px; border-radius: 16px; align-self: start; }
.studio-bottom.edit-zone > .studio-preview .cut-preview-screen { border: 0 !important; border-radius: 10px !important; overflow: hidden; }
/* PC：へんしゅうしつの プレビューを すこし 小さく（タブレットは そのまま） */
@media (min-width: 901px) {
  html:not(.tablet-compact) .studio-bottom.edit-zone { grid-template-columns: minmax(0, 5fr) minmax(280px, 4fr) !important; }
}
/* SVG アイコン：ボタンの まんなかに */
.ic { display: block; width: 1em; height: 1em; fill: currentColor; flex: none; }
.cut-preview-screen .pv-bigplay { display: flex; align-items: center; justify-content: center; padding: 0; line-height: 0; }
.cut-preview-screen .pv-bigplay .ic { width: 42%; height: 42%; transform: translateX(6%); }
.cut-preview-screen .pv-btn { display: flex; align-items: center; justify-content: center; padding: 0; line-height: 0; }
.cut-preview-screen .pv-btn .ic { width: 46%; height: 46%; }
.oa-ctrl { display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.oa-ctrl .ic { width: 18px; height: 18px; }
.tl-move button { display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.tl-move button .ic { width: 16px; height: 16px; }
.tl-move .ic-flip { display: inline-flex; transform: scaleX(-1); }
.tl-move span.ic-flip { font-size: inherit; color: inherit; }

/* ==== へんしゅうしつ 右の らん：コンパクトに すっきり ==== */
.studio-bottom.edit-zone .inout-side { gap: 10px; padding: 12px; }
/* IN/OUT：バーは ほそく、スライダーは「ラベル＋つまみ」を 1ぎょうに */
.studio-inspector .inout-bar { height: 12px; margin: 16px 4px 2px; border-width: 1px; border-radius: 999px; }
.studio-inspector .inout-range { border-radius: 999px; }
.studio-inspector .inout-flag { font-size: 0.6rem; padding: 0 5px; top: -15px; }
.studio-inspector .inout-slider { display: grid; grid-template-columns: 74px minmax(0, 1fr); align-items: center; gap: 8px; font-size: 0.8rem; }
.studio-inspector .inout-slider > span { white-space: nowrap; }
.studio-inspector .inout-slider b { font-size: 0.95rem; }
.studio-inspector .inout-slider input[type="range"] { width: 100%; margin: 0; }
.studio-inspector .trim-btns { display: grid; grid-template-columns: 1fr auto 1fr; gap: 6px; }
.studio-inspector .trim-btns .inout-btn { min-height: 34px; padding: 0 8px; font-size: 0.76rem; border-width: 1px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.studio-inspector .trim-btns .inout-btn.play { padding: 0 14px; background: linear-gradient(180deg, #51cf66, #2f9e44); border-color: #b2f2bb; color: #fff; }
.studio-inspector .trim-btns .inout-btn.play .ic { width: 12px; height: 12px; }
/* エフェクト：ちいさな タイル 4れつ（アイコン＋なまえを よこならび） */
.studio-bottom.edit-zone .inout-fx { padding-top: 10px; }
.studio-inspector .inout-fx-title { margin-bottom: 6px; font-size: 0.8rem; padding: 3px 10px; }
.studio-inspector .inout-fx-kinds { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; margin: 0; }
.studio-inspector .inout-fx-kind {
  flex-direction: row !important; min-height: 32px !important; height: 32px; padding: 0 6px 0 9px !important; gap: 4px !important;
  border-width: 1px !important; border-radius: 8px !important; font-size: 0.72rem !important; justify-content: flex-start !important; white-space: nowrap; overflow: hidden;
}
.studio-inspector .inout-fx-kind::before { left: 0; right: auto; top: 0; bottom: 0; width: 4px; height: auto; }
.studio-inspector .inout-fx-kind span { font-size: 0.95rem !important; }
.studio-inspector .inout-fx-kind:hover { transform: translateY(-1px) !important; }
.studio-inspector .inout-fx-kind.selected::after { display: none !important; }
.studio-inspector .inout-fx-kind.selected { box-shadow: 0 0 0 2px #ffd43b !important; }
/* とけい・てんき：ちいさな トグル */
.studio-inspector .inout-clock { min-height: 32px; padding: 4px 12px; font-size: 0.78rem; border-width: 1px; }
.studio-bottom.edit-zone .inout-side .inout-move { margin-top: 2px; }

/* ==== エフェクト ＝ シール（カットに すきな シールを はる） ==== */
.inout-fx-kind.sticker, .tl-card-sticker { --st: #868e96; --st-ink: #fff; }
.fxc-mono, .fxs-mono { --st: linear-gradient(135deg, #343a40, #868e96); }
.fxc-sepia, .fxs-sepia { --st: linear-gradient(135deg, #a86b32, #d9a066); }
.fxc-vivid, .fxs-vivid { --st: linear-gradient(135deg, #ff6b6b, #fcc419, #51cf66, #339af0, #cc5de8); }
.fxc-zoom, .fxs-zoom { --st: linear-gradient(135deg, #1971c2, #4dabf7); }
.fxc-fade, .fxs-fade { --st: linear-gradient(135deg, #4c6ef5, #9775fa); }
.fxc-flash, .fxs-flash { --st: linear-gradient(135deg, #f59f00, #ffe066); --st-ink: #3b2a00; }
.fxc-shake, .fxs-shake { --st: linear-gradient(135deg, #e03131, #ff8787); }
/* シールの ボタン：しろい ふちどり・すこし かたむき・めくれた かど */
.studio-inspector .inout-fx-kind.sticker {
  position: relative; overflow: visible !important; justify-content: center !important;
  height: 38px; min-height: 38px !important; padding: 0 8px !important;
  background: var(--st) !important; color: var(--st-ink) !important;
  border: 3px solid #fff !important; border-radius: 12px !important;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.25), 0 4px 10px rgba(0, 0, 0, 0.3) !important;
  font-size: 0.74rem !important; font-weight: 900; text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s, box-shadow 0.15s;
}
.studio-inspector .inout-fx-kind.sticker:nth-child(odd) { transform: rotate(-2.5deg); }
.studio-inspector .inout-fx-kind.sticker:nth-child(even) { transform: rotate(2deg); }
.studio-inspector .inout-fx-kind.sticker::before {
  content: '' !important; position: absolute; top: -3px; right: -3px; left: auto; bottom: auto; width: 14px; height: 14px;
  background: linear-gradient(225deg, #1b2466 50%, #e9ecef 50%, #fff 75%) !important;
  border-bottom-left-radius: 6px; box-shadow: -1px 1px 2px rgba(0, 0, 0, 0.25);
}
.studio-inspector .inout-fx-kind.sticker span { font-size: 1.05rem !important; filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.5)); }
.studio-inspector .inout-fx-kind.sticker:hover { transform: rotate(0deg) translateY(-2px) scale(1.04) !important; }
/* はった シール：ぺたっと まっすぐ ＋ きいろい ひかり */
.studio-inspector .inout-fx-kind.sticker.selected { transform: rotate(0deg) scale(1.06) !important; box-shadow: 0 0 0 3px #ffd43b, 0 6px 14px rgba(0, 0, 0, 0.35) !important; }
.studio-inspector .inout-fx-kind.sticker.selected::before { display: none; }
/* はがす：てんせんの わく */
.studio-inspector .inout-fx-kind.sticker.fxc-none { background: transparent !important; color: #dbe4ff !important; border: 2px dashed rgba(255, 255, 255, 0.55) !important; box-shadow: none !important; text-shadow: none; transform: none !important; }
.studio-inspector .inout-fx-kind.sticker.fxc-none::before { display: none; }
.studio-inspector .inout-fx-kind.sticker.fxc-none.selected { border-color: rgba(255, 255, 255, 0.3) !important; color: rgba(255, 255, 255, 0.5) !important; box-shadow: none !important; }
.studio-inspector .inout-fx-kinds { gap: 9px 8px !important; padding: 2px; }
/* VTRフィールドの カットに はられた シール */
.tl-card .tl-card-sticker {
  position: absolute; right: 4px; bottom: 4px; z-index: 3; display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 8px 2px 5px; border-radius: 10px; border: 2px solid #fff; background: var(--st); color: var(--st-ink);
  font-size: 0.62rem; font-weight: 900; transform: rotate(-6deg); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35); white-space: nowrap;
}
.tl-card .tl-card-sticker b { font-size: 0.85rem; line-height: 1; }
.tl-card .tl-card-flag ~ .tl-card-sticker { bottom: 26px; }
.inout-fx-kind.sticker.fxc-mono, .tl-card-sticker.fxs-mono { --st: linear-gradient(135deg, #343a40, #868e96); }
.inout-fx-kind.sticker.fxc-sepia, .tl-card-sticker.fxs-sepia { --st: linear-gradient(135deg, #a86b32, #d9a066); }
.inout-fx-kind.sticker.fxc-vivid, .tl-card-sticker.fxs-vivid { --st: linear-gradient(135deg, #ff6b6b, #fcc419, #51cf66, #339af0, #cc5de8); }
.inout-fx-kind.sticker.fxc-zoom, .tl-card-sticker.fxs-zoom { --st: linear-gradient(135deg, #1971c2, #4dabf7); }
.inout-fx-kind.sticker.fxc-fade, .tl-card-sticker.fxs-fade { --st: linear-gradient(135deg, #4c6ef5, #9775fa); }
.inout-fx-kind.sticker.fxc-flash, .tl-card-sticker.fxs-flash { --st: linear-gradient(135deg, #f59f00, #ffe066); --st-ink: #3b2a00; }
.inout-fx-kind.sticker.fxc-shake, .tl-card-sticker.fxs-shake { --st: linear-gradient(135deg, #e03131, #ff8787); }

/* ==== きかくを 見る（ポップ） ==== */
.tvst-plan { flex: none; align-self: center; margin-left: auto; padding: 7px 14px; border-radius: 10px; border: 2px solid #fff; background: linear-gradient(180deg, #ffe066, #fab005); color: #3b2a00; font: inherit; font-weight: 900; font-size: 0.85rem; white-space: nowrap; cursor: pointer; box-shadow: 0 3px 0 #a35c00; }
.tvst-plan:hover { filter: brightness(1.06); }
.tvst-plan:active { transform: translateY(2px); box-shadow: 0 1px 0 #a35c00; }
.tvst-plan + .tvst-exit { margin-left: 8px; }
.plan-pop { position: fixed; inset: 0; z-index: 9000; display: grid; place-items: center; padding: 16px; background: rgba(10, 15, 46, 0.55); animation: plan-pop-fade 0.15s ease; }
@keyframes plan-pop-fade { from { opacity: 0; } }
.plan-pop-box { width: min(560px, 100%); max-height: calc(100svh - 32px); overflow-y: auto; border-radius: 20px; padding: 16px 18px; background: linear-gradient(160deg, #fff9db, #fff3bf); border: 4px solid #fab005; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35); animation: plan-pop-in 0.2s cubic-bezier(.2, 1.3, .4, 1); }
@keyframes plan-pop-in { from { transform: translateY(12px) scale(0.96); opacity: 0; } }
.plan-pop-loading { text-align: center; font-weight: 800; color: #7a5a00; margin: 20px 0; }
.plan-pop-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.plan-pop-head > span { font-size: 1.4rem; }
.plan-pop-head b { flex: 1; font-size: 1.25rem; font-weight: 900; color: #3b2a00; }
.plan-pop-x { width: 36px; height: 36px; border-radius: 50%; border: 2px solid #e8b100; background: #fff; font-weight: 900; cursor: pointer; }
.plan-pop-shape { margin: 0 0 10px; padding: 6px 12px; border-radius: 999px; background: #fff; border: 2px dashed #f59f00; font-size: 0.85rem; font-weight: 800; color: #7a5a00; display: inline-block; }
.plan-pop-shape b { color: #d6336c; }
.plan-pop-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.plan-pop-row { display: flex; align-items: flex-start; gap: 10px; padding: 8px 12px; border-radius: 14px; background: #fff; border-left: 6px solid var(--pc, #adb5bd); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08); }
.plan-pop-row.c-pink { --pc: #f06595; } .plan-pop-row.c-blue { --pc: #339af0; } .plan-pop-row.c-orange { --pc: #ff922b; } .plan-pop-row.c-red { --pc: #fa5252; } .plan-pop-row.c-green { --pc: #51cf66; }
.plan-pop-ic { font-size: 1.3rem; line-height: 1.4; }
.plan-pop-row small { display: block; font-size: 0.72rem; font-weight: 800; color: #868e96; }
.plan-pop-row b { display: block; font-size: 1rem; font-weight: 900; color: #212529; line-height: 1.45; overflow-wrap: anywhere; }
.plan-pop-row b.empty { color: #adb5bd; font-weight: 700; }
.plan-pop-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; }
.plan-pop-edit, .plan-pop-close { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 18px; border-radius: 999px; font: inherit; font-weight: 900; font-size: 0.92rem; text-decoration: none; cursor: pointer; }
.plan-pop-edit { background: #fff; border: 2px solid #f59f00; color: #7a5a00; }
.plan-pop-edit:hover { text-decoration: none; background: #fff9db; }
.plan-pop-close { background: linear-gradient(180deg, #4dabf7, #1971c2); border: 2px solid #fff; color: #fff; box-shadow: 0 3px 0 #0b4f8f; }
@media (max-width: 600px) { .tvst-plan { position: absolute; top: 8px; right: 8px; padding: 3px 8px; font-size: 0.72rem; } }

/* へんしゅうしつ：プレビュー まわりの みどりの ざぶとんは なくす */
.studio-bottom.edit-zone { background: none !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; border-radius: 0 !important; }
/* きかく ポップ：ボタンの 下に 右よせ・上よせで 出す */
.plan-pop.anchored { display: block; padding: 0; background: rgba(10, 15, 46, 0.18); }
.plan-pop.anchored .plan-pop-box { position: fixed; width: min(460px, calc(100vw - 16px)); transform-origin: top right; animation: plan-pop-drop 0.18s ease-out; }
@keyframes plan-pop-drop { from { opacity: 0; transform: translateY(-6px) scale(0.97); } }
.plan-pop.anchored .plan-pop-box::before { content: ''; position: absolute; top: -12px; right: 28px; border: 8px solid transparent; border-bottom-color: #fab005; }
/* さつえい・へんしゅう：タイトルの おびと「きかくを なおす／カットの がめんへ／やめる」は なくす（きかくは ポップで 見る、やめるは バーの 右） */
.studio.layout-shoot > .studio-titlebar, .studio.layout-edit > .studio-titlebar, .studio.layout-full > .studio-titlebar { display: none !important; }
/* きかく ポップ：きかく かいぎの「さくせんメモ」と おなじ かたち */
.plan-pop-box { position: relative; background: transparent; border: 0; padding: 0; box-shadow: none; overflow: visible; }
.plan-pop.anchored .plan-pop-box { width: min(560px, calc(100vw - 16px)); overflow-y: auto; }
.plan-pop.anchored .plan-pop-box::before { border-bottom-color: #c9a26a; right: 30px; }
.plan-pop-memo { margin: 0; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35); }
.plan-pop-x { position: absolute; top: 8px; right: 8px; z-index: 5; }
.plan-pop-memo .qmemo-head { padding-right: 44px; }
.plan-pop-foot { margin-top: 10px; padding: 10px 12px; border-radius: 16px; background: rgba(255, 255, 255, 0.92); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25); }

/* ==== シール：エフェクトごとの デザイン ==== */
/* しろくろ：ななめに しろと くろ、まるい シール */
.inout-fx-kind.sticker.fxc-mono, .tl-card-sticker.fxs-mono {
  background: linear-gradient(135deg, #1a1a1a 0 50%, #f1f3f5 50% 100%) !important; color: #fff !important;
  border-radius: 999px !important; text-shadow: 0 0 2px #000, 0 0 2px #000, 0 1px 0 #000 !important;
}
/* むかしふう：ふるい かみ・セピアの しみ・てんせんの ふち */
.inout-fx-kind.sticker.fxc-sepia, .tl-card-sticker.fxs-sepia {
  background: radial-gradient(circle at 20% 30%, rgba(120, 72, 30, 0.35) 0 12%, transparent 13%), radial-gradient(circle at 80% 75%, rgba(120, 72, 30, 0.25) 0 10%, transparent 11%), linear-gradient(135deg, #f1dcb0, #d9b47c) !important;
  color: #5c3a14 !important; text-shadow: none !important; border-color: #fff8e7 !important;
  border-radius: 10px 4px 12px 5px !important; outline: 2px dashed #8b5a2b; outline-offset: -6px;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif !important;
}
/* あざやか：にじの しまもよう ＋ つやつや */
.inout-fx-kind.sticker.fxc-vivid, .tl-card-sticker.fxs-vivid {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0 35%, rgba(255, 255, 255, 0) 36%), repeating-linear-gradient(115deg, #ff6b6b 0 10px, #ffa94d 10px 20px, #ffd43b 20px 30px, #69db7c 30px 40px, #4dabf7 40px 50px, #b197fc 50px 60px) !important;
  color: #fff !important; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55), 0 0 4px rgba(0, 0, 0, 0.35) !important; border-radius: 14px !important;
}
/* ぐっと ズーム：まとの ような どうしんえん */
.inout-fx-kind.sticker.fxc-zoom, .tl-card-sticker.fxs-zoom {
  background: repeating-radial-gradient(circle at 50% 50%, #1971c2 0 6px, #74c0fc 6px 12px) !important;
  color: #fff !important; border-radius: 999px !important; text-shadow: 0 0 3px #0b3a6e, 0 1px 0 #0b3a6e !important;
}
/* ふわっと：くもの ように やわらかい パステル ＋ ぼんやり ひかる */
.inout-fx-kind.sticker.fxc-fade, .tl-card-sticker.fxs-fade {
  background: radial-gradient(circle at 25% 30%, #fff 0 18%, transparent 40%), linear-gradient(135deg, #e5dbff, #d0ebff 60%, #fff0f6) !important;
  color: #5f3dc4 !important; text-shadow: 0 1px 0 #fff !important; border-radius: 22px !important; border-style: dotted !important;
  box-shadow: 0 0 12px 3px rgba(177, 151, 252, 0.7), 0 3px 8px rgba(0, 0, 0, 0.2) !important;
}
/* ピカッ：きいろの ひかりの すじ（ほうしゃせん） */
.inout-fx-kind.sticker.fxc-flash, .tl-card-sticker.fxs-flash {
  background: radial-gradient(circle, #fff9db 0 18%, transparent 48%), repeating-conic-gradient(from 0deg, #ffd43b 0 12deg, #fab005 12deg 24deg) !important;
  color: #5c3c00 !important; text-shadow: 0 0 3px #fff, 0 0 3px #fff !important; border-radius: 6px !important;
  box-shadow: 0 0 10px 2px rgba(255, 212, 59, 0.85), 0 3px 8px rgba(0, 0, 0, 0.25) !important;
}
/* ドーン：あかい ばくはつ（まんがの あみてん） */
.inout-fx-kind.sticker.fxc-shake, .tl-card-sticker.fxs-shake {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.35) 22%, transparent 24%) 0 0 / 7px 7px, radial-gradient(circle at 50% 50%, #ffe066 0 16%, #ff922b 30%, #e03131 62%) !important;
  color: #fff !important; text-shadow: 0 0 2px #7d0b0b, 0 2px 0 #7d0b0b !important; border-radius: 4px 14px 4px 14px !important; font-style: italic;
}
.studio-inspector .inout-fx-kind.sticker.fxc-shake { transform: rotate(-5deg); }
.studio-inspector .inout-fx-kind.sticker.fxc-shake:hover { animation: sticker-shake 0.35s linear infinite; }
@keyframes sticker-shake { 0%, 100% { transform: translate(0, 0) rotate(-4deg); } 25% { transform: translate(-1px, 1px) rotate(-6deg); } 75% { transform: translate(1px, -1px) rotate(-2deg); } }
.studio-inspector .inout-fx-kind.sticker.fxc-flash:hover { filter: brightness(1.15); }
.studio-inspector .inout-fx-kind.sticker.fxc-fade:hover { opacity: 0.85; }
@media (prefers-reduced-motion: reduce) { .studio-inspector .inout-fx-kind.sticker.fxc-shake:hover { animation: none; } }
/* まるい シールは めくれの かどを ひかえめに */
.studio-inspector .inout-fx-kind.sticker.fxc-mono::before, .studio-inspector .inout-fx-kind.sticker.fxc-zoom::before { top: -2px; right: 6px; }

/* ==== シール：エフェクトごとの かたち（りんかく） ==== */
.studio-inspector .inout-fx-kind.sticker:not(.fxc-none), .tl-card .tl-card-sticker { background: none !important; border: 0 !important; box-shadow: none !important; outline: none !important; padding: 0 !important; filter: drop-shadow(0 2px 2px rgba(0,0,0,.35)); }
.studio-inspector .inout-fx-kind.sticker:not(.fxc-none)::before { display: none !important; }
.inout-fx-kind.sticker .st-shape, .tl-card-sticker .st-shape { position: absolute; inset: 0; background: #fff; }
.inout-fx-kind.sticker .st-face, .tl-card-sticker .st-face { position: absolute; inset: 3px; display: flex; align-items: center; justify-content: center; gap: 3px; font-style: normal; background: var(--st); }
.inout-fx-kind.sticker.fxc-none .st-shape { display: none; } .inout-fx-kind.sticker.fxc-none .st-face { position: static; background: none; }
.tl-card .tl-card-sticker { width: 84px; height: 26px; } .tl-card-sticker .st-face { inset: 2px; font-size: 0.6rem; }
/* はった シールは きいろく ひかる */
.studio-inspector .inout-fx-kind.sticker.selected:not(.fxc-none) { filter: drop-shadow(0 0 2px #ffd43b) drop-shadow(0 0 4px #ffd43b) drop-shadow(0 3px 3px rgba(0,0,0,.35)) !important; }
.inout-fx-kind.sticker.fxc-mono .st-shape, .inout-fx-kind.sticker.fxc-mono .st-face, .tl-card-sticker.fxs-mono .st-shape, .tl-card-sticker.fxs-mono .st-face { clip-path: polygon(12.0% 0.0%, 88.0% 0.0%, 100.0% 30.0%, 100.0% 70.0%, 88.0% 100.0%, 12.0% 100.0%, 0.0% 70.0%, 0.0% 30.0%); }
.inout-fx-kind.sticker.fxc-sepia .st-shape, .inout-fx-kind.sticker.fxc-sepia .st-face, .tl-card-sticker.fxs-sepia .st-shape, .tl-card-sticker.fxs-sepia .st-face { clip-path: polygon(0.0% 0.0%, 100.0% 0.0%, 94.0% 12.5%, 100.0% 25.0%, 94.0% 37.5%, 100.0% 50.0%, 94.0% 62.5%, 100.0% 75.0%, 94.0% 87.5%, 100.0% 100.0%, 0.0% 100.0%, 6.0% 87.5%, 0.0% 75.0%, 6.0% 62.5%, 0.0% 50.0%, 6.0% 37.5%, 0.0% 25.0%, 6.0% 12.5%); }
.inout-fx-kind.sticker.fxc-vivid .st-shape, .inout-fx-kind.sticker.fxc-vivid .st-face, .tl-card-sticker.fxs-vivid .st-shape, .tl-card-sticker.fxs-vivid .st-face { clip-path: polygon(0.0% 6.0%, 2.5% 10.9%, 5.0% 11.7%, 7.5% 7.9%, 10.0% 2.5%, 12.5% 0.0%, 15.0% 2.5%, 17.5% 7.9%, 20.0% 11.7%, 22.5% 10.9%, 25.0% 6.0%, 27.5% 1.1%, 30.0% 0.3%, 32.5% 4.1%, 35.0% 9.5%, 37.5% 12.0%, 40.0% 9.5%, 42.5% 4.1%, 45.0% 0.3%, 47.5% 1.1%, 50.0% 6.0%, 52.5% 10.9%, 55.0% 11.7%, 57.5% 7.9%, 60.0% 2.5%, 62.5% 0.0%, 65.0% 2.5%, 67.5% 7.9%, 70.0% 11.7%, 72.5% 10.9%, 75.0% 6.0%, 77.5% 1.1%, 80.0% 0.3%, 82.5% 4.1%, 85.0% 9.5%, 87.5% 12.0%, 90.0% 9.5%, 92.5% 4.1%, 95.0% 0.3%, 97.5% 1.1%, 100.0% 6.0%, 100.0% 94.0%, 97.5% 98.9%, 95.0% 99.7%, 92.5% 95.9%, 90.0% 90.5%, 87.5% 88.0%, 85.0% 90.5%, 82.5% 95.9%, 80.0% 99.7%, 77.5% 98.9%, 75.0% 94.0%, 72.5% 89.1%, 70.0% 88.3%, 67.5% 92.1%, 65.0% 97.5%, 62.5% 100.0%, 60.0% 97.5%, 57.5% 92.1%, 55.0% 88.3%, 52.5% 89.1%, 50.0% 94.0%, 47.5% 98.9%, 45.0% 99.7%, 42.5% 95.9%, 40.0% 90.5%, 37.5% 88.0%, 35.0% 90.5%, 32.5% 95.9%, 30.0% 99.7%, 27.5% 98.9%, 25.0% 94.0%, 22.5% 89.1%, 20.0% 88.3%, 17.5% 92.1%, 15.0% 97.5%, 12.5% 100.0%, 10.0% 97.5%, 7.5% 92.1%, 5.0% 88.3%, 2.5% 89.1%, 0.0% 94.0%); }
.inout-fx-kind.sticker.fxc-zoom .st-shape, .inout-fx-kind.sticker.fxc-zoom .st-face, .tl-card-sticker.fxs-zoom .st-shape, .tl-card-sticker.fxs-zoom .st-face { clip-path: ellipse(50% 50% at 50% 50%); }
.inout-fx-kind.sticker.fxc-fade .st-shape, .inout-fx-kind.sticker.fxc-fade .st-face, .tl-card-sticker.fxs-fade .st-shape, .tl-card-sticker.fxs-fade .st-face { clip-path: polygon(8.0% 14.0%, 10.6% 8.6%, 13.2% 4.1%, 15.9% 1.1%, 18.5% 0.0%, 21.1% 1.1%, 23.8% 4.1%, 26.4% 8.6%, 29.0% 14.0%, 29.0% 14.0%, 31.6% 8.6%, 34.2% 4.1%, 36.9% 1.1%, 39.5% 0.0%, 42.1% 1.1%, 44.8% 4.1%, 47.4% 8.6%, 50.0% 14.0%, 50.0% 14.0%, 52.6% 8.6%, 55.2% 4.1%, 57.9% 1.1%, 60.5% 0.0%, 63.1% 1.1%, 65.8% 4.1%, 68.4% 8.6%, 71.0% 14.0%, 71.0% 14.0%, 73.6% 8.6%, 76.2% 4.1%, 78.9% 1.1%, 81.5% 0.0%, 84.1% 1.1%, 86.8% 4.1%, 89.4% 8.6%, 92.0% 14.0%, 95.1% 16.7%, 97.7% 24.5%, 99.4% 36.2%, 100.0% 50.0%, 99.4% 63.8%, 97.7% 75.5%, 95.1% 83.3%, 92.0% 86.0%, 89.4% 91.4%, 86.8% 95.9%, 84.1% 98.9%, 81.5% 100.0%, 78.9% 98.9%, 76.2% 95.9%, 73.6% 91.4%, 71.0% 86.0%, 71.0% 86.0%, 68.4% 91.4%, 65.8% 95.9%, 63.1% 98.9%, 60.5% 100.0%, 57.9% 98.9%, 55.2% 95.9%, 52.6% 91.4%, 50.0% 86.0%, 50.0% 86.0%, 47.4% 91.4%, 44.8% 95.9%, 42.1% 98.9%, 39.5% 100.0%, 36.9% 98.9%, 34.2% 95.9%, 31.6% 91.4%, 29.0% 86.0%, 29.0% 86.0%, 26.4% 91.4%, 23.8% 95.9%, 21.1% 98.9%, 18.5% 100.0%, 15.9% 98.9%, 13.2% 95.9%, 10.6% 91.4%, 8.0% 86.0%, 4.9% 83.3%, 2.3% 75.5%, 0.6% 63.8%, 0.0% 50.0%, 0.6% 36.2%, 2.3% 24.5%, 4.9% 16.7%); }
.inout-fx-kind.sticker.fxc-flash .st-shape, .inout-fx-kind.sticker.fxc-flash .st-face, .tl-card-sticker.fxs-flash .st-shape, .tl-card-sticker.fxs-flash .st-face { clip-path: polygon(0.0% 50.0%, 6.0% 14.0%, 14.0% 26.0%, 22.0% 0.0%, 32.0% 18.0%, 42.0% 2.0%, 52.0% 18.0%, 62.0% 0.0%, 72.0% 20.0%, 82.0% 4.0%, 90.0% 24.0%, 100.0% 50.0%, 90.0% 76.0%, 82.0% 96.0%, 72.0% 80.0%, 62.0% 100.0%, 52.0% 82.0%, 42.0% 98.0%, 32.0% 82.0%, 22.0% 100.0%, 14.0% 74.0%, 6.0% 86.0%); }
.inout-fx-kind.sticker.fxc-shake .st-shape, .inout-fx-kind.sticker.fxc-shake .st-face, .tl-card-sticker.fxs-shake .st-shape, .tl-card-sticker.fxs-shake .st-face { clip-path: polygon(100.0% 50.0%, 85.5% 60.4%, 92.1% 77.0%, 75.0% 78.9%, 70.8% 95.5%, 55.3% 87.1%, 42.9% 99.5%, 34.0% 84.9%, 17.3% 87.8%, 17.6% 70.8%, 2.0% 64.1%, 13.7% 50.0%, 2.0% 35.9%, 19.7% 30.5%, 17.3% 12.2%, 33.7% 14.2%, 42.9% 0.5%, 55.3% 13.3%, 70.8% 4.5%, 74.2% 22.1%, 92.1% 23.0%, 88.4% 38.7%); }
/* もようは かおの ぶぶんに */
.inout-fx-kind.sticker.fxc-mono .st-face, .tl-card-sticker.fxs-mono .st-face { background: linear-gradient(135deg, #1a1a1a 0 50%, #f1f3f5 50% 100%); }
.inout-fx-kind.sticker.fxc-sepia .st-face, .tl-card-sticker.fxs-sepia .st-face { background: radial-gradient(circle at 20% 30%, rgba(120,72,30,.35) 0 12%, transparent 13%), radial-gradient(circle at 80% 75%, rgba(120,72,30,.25) 0 10%, transparent 11%), linear-gradient(135deg, #f1dcb0, #d9b47c); }
.inout-fx-kind.sticker.fxc-vivid .st-face, .tl-card-sticker.fxs-vivid .st-face { background: linear-gradient(180deg, rgba(255,255,255,.5) 0 35%, rgba(255,255,255,0) 36%), repeating-linear-gradient(115deg, #ff6b6b 0 10px, #ffa94d 10px 20px, #ffd43b 20px 30px, #69db7c 30px 40px, #4dabf7 40px 50px, #b197fc 50px 60px); }
.inout-fx-kind.sticker.fxc-zoom .st-face, .tl-card-sticker.fxs-zoom .st-face { background: repeating-radial-gradient(ellipse at 50% 50%, #1971c2 0 6px, #74c0fc 6px 12px); }
.inout-fx-kind.sticker.fxc-fade .st-face, .tl-card-sticker.fxs-fade .st-face { background: radial-gradient(circle at 25% 30%, #fff 0 18%, transparent 40%), linear-gradient(135deg, #e5dbff, #d0ebff 60%, #fff0f6); }
.inout-fx-kind.sticker.fxc-flash .st-face, .tl-card-sticker.fxs-flash .st-face { background: radial-gradient(circle, #fff9db 0 18%, transparent 48%), repeating-conic-gradient(from 0deg, #ffd43b 0 12deg, #fab005 12deg 24deg); }
.inout-fx-kind.sticker.fxc-shake .st-face, .tl-card-sticker.fxs-shake .st-face { background: radial-gradient(circle, rgba(255,255,255,.35) 22%, transparent 24%) 0 0 / 7px 7px, radial-gradient(circle at 50% 50%, #ffe066 0 16%, #ff922b 30%, #e03131 62%); }
/* かたちに あわせて おおきさ・もじの いちを ととのえる */
.studio-inspector .inout-fx-kind.sticker.fxc-shake, .studio-inspector .inout-fx-kind.sticker.fxc-flash { height: 44px; min-height: 44px !important; margin: -3px 0; }
.studio-inspector .inout-fx-kind.sticker.fxc-fade { height: 42px; min-height: 42px !important; margin: -2px 0; }
.inout-fx-kind.sticker.fxc-shake .st-face, .inout-fx-kind.sticker.fxc-flash .st-face { font-size: 0.68rem; }
.studio-inspector .inout-fx-kind.sticker.fxc-sepia { outline: none !important; }
.inout-fx-kind.sticker.fxc-sepia .st-face { outline: none; box-shadow: inset 0 0 0 2px rgba(139,90,43,.5); }


/* ==== テロップ：へんしゅうは ポップで（場所を ふやさない） ==== */
.studio-bottom.edit-zone .inout-telop { position: relative; }
.studio-bottom.edit-zone .inout-telop-edit {
  display: none; position: absolute; left: 0; right: 0; top: calc(100% + 10px); z-index: 30; margin: 0;
  background: linear-gradient(180deg, #24306f, #161d4f); border: 3px solid #ffd43b; border-radius: 16px; padding: 12px 14px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.5);
}
.studio-bottom.edit-zone .inout-telop-edit.is-open { display: block; animation: tel-pop 0.15s ease-out; }
@keyframes tel-pop { from { opacity: 0; transform: translateY(-6px); } }
.studio-bottom.edit-zone .inout-telop-edit::before { content: ''; position: absolute; top: -13px; border: 10px solid transparent; border-bottom-color: #ffd43b; border-top: 0; }
.studio-bottom.edit-zone .inout-telop-edit.kind-name::before { left: 15%; }
.studio-bottom.edit-zone .inout-telop-edit.kind-setsumei::before { left: calc(50% - 10px); }
.studio-bottom.edit-zone .inout-telop-edit.kind-side::before { right: 15%; }
.tel-pop-acts { display: inline-flex; gap: 6px; }
.tel-pop-done { border: 2px solid #fff; background: linear-gradient(180deg, #51cf66, #2f9e44); color: #fff; border-radius: 999px; padding: 2px 12px; font: inherit; font-size: 0.78rem; font-weight: 900; cursor: pointer; }
/* テロップの ボタン：はいっている もじを ちいさく 見せる・いま なおして いる ものは きいろ */
.studio-inspector .inout-telop-kind { position: relative; }
.studio-inspector .inout-telop-kind .tel-preview { display: block; max-width: 100%; margin-top: 2px; padding: 1px 8px; border-radius: 999px; background: rgba(0, 0, 0, 0.25); font-size: 0.68rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.studio-inspector .inout-telop-kind.editing { box-shadow: 0 0 0 4px #ffd43b, 0 6px 14px rgba(0, 0, 0, 0.35) !important; transform: translateY(-2px); }
/* きかく ポップ：✕ は なくして「とじる」だけ */
.plan-pop-x { display: none !important; }
.plan-pop-memo .qmemo-head { padding-right: 6px; }
/* テロップの ボタンは もじが はいっても たかさを かえない */
.studio-inspector .inout-telop-kind { height: 92px; min-height: 92px; box-sizing: border-box; }
.studio-inspector .inout-telop-kind .tel-preview { position: absolute; left: 8px; right: 8px; bottom: 6px; margin: 0; }
.studio-inspector .inout-telop-kind.selected { padding-bottom: 22px; }
/* オンエアの キューシート：ぎょうを ひきのばさず、なかみを すこし 大きく */
.oa-cue-side .oa-cue-list { align-content: start; grid-auto-rows: max-content; }
.oa-cue-side .oa-cue-row { grid-template-columns: 26px 96px minmax(0, 1fr) auto !important; gap: 10px !important; padding: 8px 10px !important; }
.oa-cue-side .oa-cue-thumb { width: 96px !important; aspect-ratio: 16 / 9; height: auto !important; font-size: 1.4rem !important; }
.oa-cue-side .oa-cue-no { width: 24px !important; height: 24px !important; font-size: 0.8rem !important; }
.oa-cue-side .oa-cue-body b { font-size: 0.95rem !important; }
.oa-cue-side .oa-cue-body span { font-size: 0.8rem; }
.oa-cue-side .oa-cue-head { font-size: 1.1rem !important; }
/* シールを ひとまわり 大きく */
.studio-inspector .inout-fx-kinds { gap: 12px 10px !important; }
.studio-inspector .inout-fx-kind.sticker { height: 50px !important; min-height: 50px !important; font-size: 0.86rem !important; }
.studio-inspector .inout-fx-kind.sticker .st-face span, .studio-inspector .inout-fx-kind.sticker span { font-size: 1.3rem !important; }
.studio-inspector .inout-fx-kind.sticker.fxc-shake, .studio-inspector .inout-fx-kind.sticker.fxc-flash { height: 58px !important; min-height: 58px !important; margin: -4px 0; }
.studio-inspector .inout-fx-kind.sticker.fxc-fade { height: 54px !important; min-height: 54px !important; margin: -2px 0; }
.inout-fx-kind.sticker.fxc-shake .st-face, .inout-fx-kind.sticker.fxc-flash .st-face { font-size: 0.8rem; }
.tl-card .tl-card-sticker { width: 96px; height: 30px; }
.tl-card-sticker .st-face { font-size: 0.68rem; }
/* 再生ボタン：アイコンを まるの まんなかに（よぶんな ずらしを なくす） */
.cut-preview-screen .pv-bigplay .ic { transform: none !important; }
.cut-preview-screen .pv-bigplay span { margin: 0 !important; }

/* オンエアの キューシート：わくは 画面に あわせた 高さの まま、なかみを わくに あわせて 大きく */
.oa-cue-side .oa-cue-list { align-content: stretch !important; grid-auto-rows: minmax(64px, 1fr) !important; }
.oa-cue-side .oa-cue-row { container-type: size; height: auto; min-height: 0; padding: 6px 12px !important; gap: 12px !important; grid-template-columns: auto auto minmax(0, 1fr) auto !important; align-items: center; }
.oa-cue-side .oa-cue-thumb { height: calc(100cqh - 12px) !important; width: auto !important; aspect-ratio: 16 / 9; max-height: 120px; max-width: 42cqw; font-size: clamp(1.2rem, 30cqh, 2.6rem) !important; display: grid; place-items: center; overflow: hidden; }
.oa-cue-side .oa-cue-thumb img, .oa-cue-side .oa-cue-thumb video { width: 100%; height: 100%; object-fit: cover; }
.oa-cue-side .oa-cue-no { width: clamp(22px, 26cqh, 34px) !important; height: clamp(22px, 26cqh, 34px) !important; font-size: clamp(0.75rem, 14cqh, 1.1rem) !important; }
.oa-cue-side .oa-cue-body b { font-size: clamp(0.9rem, 16cqh, 1.35rem) !important; }
.oa-cue-side .oa-cue-body span { font-size: clamp(0.72rem, 11cqh, 1rem) !important; }
.oa-cue-side .oa-cue-row > :last-child { font-size: clamp(0.75rem, 12cqh, 1.05rem); }
.oa-cue-side .oa-cue-thumb { max-width: 34cqw; max-height: 96px; }
.oa-cue-side .oa-cue-body b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.oa-cue-side .oa-cue-body b { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; word-break: keep-all; line-height: 1.35; }
/* はじめ／おわりの ラベルが はいる はばに */
.studio-inspector .inout-slider { grid-template-columns: 92px minmax(0, 1fr); }
.studio-inspector .inout-flag { white-space: nowrap; }
.studio-inspector .inout-flag.out { transform: translateX(-100%); }
/* テロップの ボタン：アイコンと なまえを よこに ならべて ひくく */
.studio-inspector .inout-telop-kind { height: 54px !important; min-height: 54px !important; display: grid !important; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: 1fr auto; column-gap: 8px; align-items: center; justify-items: start; padding: 6px 12px !important; text-align: left; font-size: 0.9rem; }
.studio-inspector .inout-telop-kind > span:first-child { grid-row: 1 / span 2; font-size: 1.5rem !important; line-height: 1; margin: 0 !important; }
.studio-inspector .inout-telop-kind .tel-preview { position: static !important; grid-column: 2; max-width: 100%; margin: 1px 0 0; font-size: 0.66rem; padding: 0 7px; }
.studio-inspector .inout-telop-kind.selected { padding-bottom: 6px !important; }
.studio-inspector .inout-telop-kinds { gap: 8px !important; }

/* ==== へんしゅうしつ：左上＝プレビュー、左下＝VTRフィールド、右＝へんしゅう（はじめ/おわり・テロップ・シール） ==== */
@media (min-width: 901px) {
  .studio.layout-edit .studio-bottom.edit-zone { grid-template-areas: "pv side" "field side" !important; grid-template-rows: auto 1fr; }
  .studio.layout-edit .studio-bottom.edit-zone > .field-outer { grid-area: field; margin: 0 !important; min-width: 0; }
  .studio.layout-edit .studio-bottom.edit-zone .inout { display: flex !important; flex-direction: column; gap: 10px; grid-area: side; min-width: 0; }
  .studio.layout-edit .studio-bottom.edit-zone .inout-side { grid-area: auto; flex: none; }
  .studio.layout-edit .studio-bottom.edit-zone .inout-bottom { grid-area: auto; flex: 1 1 auto; display: block; }
  .studio.layout-edit .studio-bottom.edit-zone .inout-side .inout-move { margin-top: 0; }
  .studio.layout-edit .studio-bottom.edit-zone #st-timeline { overflow-x: auto; }
}
@media (min-width: 901px) {
  .studio.layout-edit .studio-bottom.edit-zone { grid-template-columns: minmax(0, 3fr) minmax(300px, 2fr) !important; }
  html:not(.tablet-compact) .studio.layout-edit .studio-bottom.edit-zone > .studio-preview { max-width: 760px; width: 100%; justify-self: start; }
}
/* へんしゅうしつ：プレビューは 左の れつ いっぱいに */
html:not(.tablet-compact) .studio.layout-edit .studio-bottom.edit-zone > .studio-preview { max-width: none !important; width: auto; justify-self: stretch; }
/* へんしゅうしつ 右の れつ：上（はじめ/おわり・シール）と 下（テロップ）を ひとつの わくに まとめる */
@media (min-width: 901px) {
  .studio.layout-edit .studio-bottom.edit-zone .inout {
    gap: 0 !important; padding: 12px; border-radius: 18px;
    background: linear-gradient(180deg, #24306f 0%, #161d4f 100%); color: #fff;
    border: 3px solid #ffd43b; box-shadow: 0 0 0 3px #10163d, 0 6px 0 #0a0f2e;
  }
  .studio.layout-edit .studio-bottom.edit-zone .inout-side,
  .studio.layout-edit .studio-bottom.edit-zone .inout-bottom { background: none !important; border: 0 !important; box-shadow: none !important; border-radius: 0 !important; padding: 0 !important; }
  .studio.layout-edit .studio-bottom.edit-zone .inout-bottom { margin-top: 12px; padding-top: 12px !important; border-top: 2px dashed rgba(255, 212, 59, 0.35) !important; flex: none; }
  .studio.layout-edit .studio-bottom.edit-zone .inout-side .inout-move { order: 99; }
}
@media (min-width: 901px) {
  .studio.layout-edit .studio-bottom.edit-zone .inout { gap: 10px !important; }
  .studio.layout-edit .studio-bottom.edit-zone .inout-side { display: contents !important; }
  .studio.layout-edit .studio-bottom.edit-zone .inout-bottom { order: 50; margin-top: 2px; }
  .studio.layout-edit .studio-bottom.edit-zone .inout .inout-move { order: 99; margin-top: auto !important; justify-content: flex-end; }
}
/* せつめいスーパー：1ぎょうの ときは 1ぎょうぶんの 座布団（2ぎょうの ときは いままでどおり） */
.tv-telop-box.kind-setsumei.lines-1 { min-height: calc(1.5em + 0.05em + 0.08em) !important; }

/* はじめ／おわり：よゆうの ある レイアウトに */
.studio-inspector .inout-bar { margin: 22px 6px 8px !important; height: 14px !important; }
.studio-inspector .inout-flag { top: -19px !important; font-size: 0.66rem !important; padding: 1px 6px !important; }
.studio-inspector .inout-slider { gap: 12px !important; padding: 4px 2px; }
.studio-inspector .inout-slider + .inout-slider { margin-top: 4px; }
.studio-inspector .trim-btns { gap: 10px !important; margin-top: 8px; }
.studio-inspector .trim-btns .inout-btn { min-height: 42px !important; font-size: 0.82rem !important; border-radius: 10px !important; }
.studio-inspector .trim-btns .inout-btn.play { padding: 0 18px !important; }
/* シール・テロップ・とけいの ラベルを おなじ 大きさに */
.studio-inspector .inout-telop-title, .studio-inspector .inout-fx-title, .studio-inspector .inout-clock-title {
  display: inline-flex !important; align-items: baseline; gap: 8px; margin: 0 0 8px !important;
  padding: 4px 14px !important; font-size: 0.95rem !important; border-radius: 999px;
}
.studio-inspector .inout-telop-title small, .studio-inspector .inout-fx-title small, .studio-inspector .inout-clock-title small { font-size: 0.72rem !important; }
/* とけい・てんき：テロップと おなじ あつかいの おおきな スイッチ */
.inout-clock-wrap { border-top: 2px dashed rgba(255, 212, 59, 0.35); padding-top: 12px; }
.studio-inspector .inout-clock {
  width: 100%; min-height: 54px !important; display: flex; align-items: center; gap: 12px; padding: 6px 14px !important;
  border-radius: 14px !important; border: 3px solid #fff !important; font-size: 0.95rem !important; font-weight: 900;
  background: linear-gradient(180deg, #868e96, #495057) !important; color: #fff !important; box-shadow: 0 4px 0 #212529; cursor: pointer;
}
.studio-inspector .inout-clock.on { background: linear-gradient(180deg, #38d9a9, #0ca678) !important; box-shadow: 0 4px 0 #087f5b, 0 0 0 3px rgba(56, 217, 169, 0.35); }
.studio-inspector .inout-clock:active { transform: translateY(3px); box-shadow: 0 1px 0 #212529; }
.inout-clock .clk-ic { font-size: 1.5rem; line-height: 1; }
.inout-clock .clk-txt { flex: 1; text-align: left; }
.inout-clock .clk-sw { position: relative; flex: none; width: 74px; height: 32px; border-radius: 999px; background: rgba(0, 0, 0, 0.35); border: 2px solid rgba(255, 255, 255, 0.7); }
.inout-clock .clk-sw i { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4); transition: left 0.2s; }
.inout-clock .clk-sw b { position: absolute; top: 50%; right: 9px; transform: translateY(-50%); font-size: 0.78rem; }
.inout-clock.on .clk-sw i { left: 45px; }
.inout-clock.on .clk-sw b { right: auto; left: 10px; }
.studio-bottom.edit-zone .inout-fx { border-top: 2px dashed rgba(255, 212, 59, 0.35) !important; padding-top: 12px !important; }
.studio-inspector .inout-telop-title, .studio-inspector .inout-fx-title, .studio-inspector .inout-clock-title { border-radius: 8px 999px 999px 8px !important; padding: 4px 14px 4px 10px !important; }
/* つかう ところ：ラベル｜みじかい バー｜びょう を 1ぎょうに すっきり */
.studio-inspector .trim-sum { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 12px; background: rgba(0, 0, 0, 0.22); }
.studio-inspector .trim-sum-label { font-size: 0.82rem; font-weight: 900; color: #dbe4ff; white-space: nowrap; }
.studio-inspector .trim-sum-len { padding: 2px 10px; border-radius: 999px; background: #ffd43b; color: #3b2a00; font-size: 0.85rem; font-weight: 900; white-space: nowrap; }
.studio-inspector .trim-sum .inout-bar { position: relative; height: 10px !important; margin: 0 !important; border: 0 !important; border-radius: 999px; background: rgba(255, 255, 255, 0.15) !important; }
.studio-inspector .trim-sum .inout-range { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: linear-gradient(90deg, #69db7c, #ffd43b); }
.studio-inspector .trim-sum .inout-flag { position: absolute; top: 50%; width: 14px; height: 14px; padding: 0 !important; border-radius: 50%; background: #fff; border: 3px solid #2f9e44; transform: translate(-50%, -50%); font-size: 0 !important; }
.studio-inspector .trim-sum .inout-flag.in { left: 0; }
.studio-inspector .trim-sum .inout-flag.out { left: 100%; border-color: #f08c00; }
.studio-inspector .trim-sum .inout-flag { top: 50% !important; transform: translate(-50%, -50%) !important; padding: 0 !important; width: 14px; height: 14px; }
.studio-inspector .inout-trim-title { align-self: flex-start; display: inline-flex !important; align-items: baseline; gap: 8px; margin: 0 0 2px !important; padding: 4px 14px 4px 10px !important; border-radius: 8px 999px 999px 8px !important; font-size: 0.95rem !important; }
.studio-inspector .inout-trim-title small { font-size: 0.72rem !important; }
.studio-inspector .trim-sum-label { display: none; }
.studio-inspector .trim-sum { grid-template-columns: minmax(0, 1fr) auto; }
/* キューシート：ばんぐみ そざいも 映像の サムネイル／もくてきの ラベルを 大きく */
.oa-cue-thumb.is-brand { background: #000; }
.oa-cue-thumb.is-brand video { width: 100%; height: 100%; object-fit: cover; display: block; }
.oa-cue-side .oa-cue-body em { display: inline-block; vertical-align: middle; margin-left: 6px; padding: 2px 10px !important; border-radius: 999px; font-style: normal; font-size: clamp(0.75rem, 12cqh, 1rem) !important; font-weight: 900; line-height: 1.4; }
/* プレビューの 下の シークバー */
.pv-seek { display: flex; align-items: center; gap: 12px; margin-top: 8px; padding: 6px 12px; border-radius: 999px; background: #22262c; }
.pv-seek input[type="range"] { flex: 1; min-width: 0; margin: 0; height: 22px; accent-color: #ff922b; cursor: pointer; }
.pv-seek-time { flex: none; font-size: 0.82rem; font-weight: 900; color: #fff; font-variant-numeric: tabular-nums; white-space: nowrap; }
.studio-bottom.edit-zone > .studio-preview { padding-bottom: 6px; }
.studio-bottom.edit-zone > .studio-preview .pv-seek { margin: 6px 0 0; border-radius: 0 0 10px 10px; }

/* はじめ／おわり：1ぽんの バーで きめる（2つの スライダーは かくす） */
.studio-inspector .trim-sum ~ .inout-slider:not(.seam) { display: none !important; }
.studio-inspector .trim-sum { padding: 12px 14px 30px; }
.studio-inspector .trim-sum .inout-bar { height: 12px !important; cursor: pointer; touch-action: none; }
.studio-inspector .trim-sum .inout-flag { width: 22px !important; height: 22px !important; border-width: 4px !important; cursor: grab; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4); z-index: 2; }
.studio-inspector .trim-sum .inout-bar.dragging .inout-flag { cursor: grabbing; }
.studio-inspector .trim-sum .inout-flag em { position: absolute; top: calc(100% + 6px); font-style: normal; font-size: 0.7rem; font-weight: 900; white-space: nowrap; padding: 1px 7px; border-radius: 999px; color: #fff; pointer-events: none; }
.studio-inspector .trim-sum .inout-flag.in em { left: -6px; background: #2f9e44; }
.studio-inspector .trim-sum .inout-flag.out em { right: -6px; background: #f08c00; }
/* 時計：秒は 出さない */
.cw-clock-sec { display: none; }
/* シークバーの じかん：「100.0 / 100.0びょう」が はいる はばを さきに とっておく（バーの ながさが かわらない） */
.pv-seek-time { display: inline-block; min-width: 13.5ch; text-align: right; font-variant-numeric: tabular-nums; }
.pv-seek-time { min-width: 0; width: 11.8em; flex: none; overflow: hidden; }
/* つかう ところの びょう：けたが かわっても バーの ながさが かわらない */
.studio-inspector .trim-sum-len { width: 6.6em; text-align: center; box-sizing: border-box; font-variant-numeric: tabular-nums; }
/* 右の らんの じゅんばん：はじめ／おわり → とけい・てんき → テロップ → シール */
@media (min-width: 901px) {
  .studio.layout-edit .studio-bottom.edit-zone .inout .inout-clock-wrap { order: 10; }
  .studio.layout-edit .studio-bottom.edit-zone .inout .inout-bottom { order: 20 !important; margin-top: 0 !important; }
  .studio.layout-edit .studio-bottom.edit-zone .inout .inout-fx { order: 30; }
  .studio.layout-edit .studio-bottom.edit-zone .inout .inout-move { order: 99; }
}
/* タブレット：カットは ドラッグで うごかさない（スクロールできる よう に） */
@media (pointer: coarse) { .field-zone .tl-card[data-item] { touch-action: auto; cursor: pointer; } }
/* シークバーに カットの わかれめ */
.pv-seek-track { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; }
.pv-seek-track input[type="range"] { flex: 1; position: relative; z-index: 1; }
.pv-seek-ticks { position: absolute; left: 8px; right: 8px; top: 50%; height: 16px; transform: translateY(-50%); pointer-events: none; z-index: 2; }
.pv-seek-ticks i { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; border-radius: 1px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45); }

/* テロップの へんしゅう ポップ：もじと アイコンを 大きく わかりやすく */
.studio-bottom.edit-zone .inout-telop-edit { padding: 14px 16px 16px; }
.studio-inspector .inout-telop-edit-head { font-size: 1.1rem !important; gap: 10px; margin-bottom: 4px; }
.studio-inspector .inout-telop-edit-head > span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.studio-inspector .inout-telop-x, .tel-pop-done { min-height: 38px; padding: 4px 16px !important; font-size: 0.95rem !important; border-radius: 999px; }
.studio-inspector .inout-telop-edit .inout-telop-input { font-size: 1.25rem !important; padding: 12px 14px !important; margin-top: 10px !important; border-width: 3px; border-radius: 12px; }
.studio-inspector .inout-telop-edit .inout-telop-input.small { font-size: 1.05rem !important; padding: 10px 14px !important; }
.studio-inspector .inout-telop-edit .inout-telop-input::placeholder { font-size: 0.95em; }
.tel-nudge { margin-top: 10px; padding: 10px 14px; gap: 14px; border-radius: 14px; }
.tel-nudge-label { font-size: 1rem; }
.tel-nudge-pad { grid-template-columns: repeat(3, 46px); grid-template-rows: repeat(3, 40px); gap: 5px; }
.tel-nudge-pad button { font-size: 1.1rem; border-radius: 10px; border-width: 3px; box-shadow: 0 3px 0 #1864ab; }
/* テロップ：セット中の きょうちょうを ひかえめに（となりや ラベルに かぶらない） */
.studio-inspector .inout-telop-kind.selected { transform: none !important; box-shadow: 0 0 0 2px #fff, 0 0 0 4px #f03e8a !important; }
.studio-inspector .inout-telop-kind.selected::after { top: 4px !important; right: 4px !important; transform: none !important; padding: 0 7px !important; font-size: 0.6rem !important; border-width: 1px !important; }
.studio-inspector .inout-telop-kind.editing { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #ffd43b !important; transform: none !important; }
.studio-inspector .inout-telop-kinds { gap: 12px !important; padding: 4px; }
/* プレビュー：ひだり下の ▶ と ⏮ は なくす。まんなかの ボタンは 再生ちゅう ⏸ に かわり、マウスを のせた ときだけ 出る */
.cut-preview-screen .pv-ctrl { display: none !important; }
.cut-preview-screen.is-playing .pv-bigplay, .cut-preview-screen.vid-playing .pv-bigplay { display: flex !important; opacity: 0; transition: opacity 0.2s; }
.cut-preview-screen.is-playing:hover .pv-bigplay, .cut-preview-screen.vid-playing:hover .pv-bigplay { opacity: 1; }
.cut-preview-screen.is-playing .pv-bigplay .ic { transform: none !important; }
@media (hover: none) { .cut-preview-screen.is-playing .pv-bigplay { opacity: 0.55; } }
/* テロップの ポップ：なおして いる あいだ（いちを ずらす など）は ちらつかせない。ひらいた ときだけ ふわっと */
.studio-bottom.edit-zone .inout-telop-edit.is-open { animation: none !important; }
.studio-bottom.edit-zone .inout-telop-edit.is-open.pop-in { animation: tel-pop 0.15s ease-out !important; }
/* タブレット：再生したら ⏸ は すぐ けす。プレビューを タップした ときだけ 出す */
@media (hover: none) {
  .cut-preview-screen.is-playing .pv-bigplay, .cut-preview-screen.vid-playing .pv-bigplay { opacity: 0 !important; pointer-events: none; transition: none; }
  .cut-preview-screen.is-playing.show-ctrl .pv-bigplay, .cut-preview-screen.vid-playing.show-ctrl .pv-bigplay { opacity: 1 !important; pointer-events: auto; }
}
/* テロップの ボタン：なかの もじを なくした ぶん コンパクトに */
.studio-inspector .inout-telop-kind { height: 44px !important; min-height: 44px !important; grid-template-rows: 1fr !important; padding: 4px 12px !important; }
.studio-inspector .inout-telop-kind > span:first-child { grid-row: 1 !important; font-size: 1.3rem !important; }
.studio-inspector .inout-telop-kind.selected { padding-bottom: 4px !important; }

/* ==== ホバーで うごかさない（わくの 下はしで ガクガク しない よう に）。かわりに あかるさ・かげで しらせる ==== */
.genre-card:hover:not(:disabled), .mode-select-card:hover, .project-mode-tab-btn:hover, .telop-preview-card:hover,
.studio-rec-btn.ready:hover, .field-zone .cut-tl-block.tl-card:hover, .deck-zone .pcard:not(.selected):hover,
.px-mission:hover, .px-topic-card:hover, .px-choice:hover, .qidea:hover, .trade-card.pickable:hover,
.pcard.pcard > .pcard-shoot:not(.brand):hover, .studio-camera-head #cam-close:hover, .stb-btn:hover,
.studio-inspector .inout-telop-kind:hover, .studio-inspector .inout-fx-kind:not(.sticker):hover, .pcard-back-btn:hover,
.cam-kanpe-edit:hover, .tvst-room:not(.current):hover, .qkind-theme:hover, .project-card.selecting:hover,
.plist-new-btn:hover, .plist-select-btn:hover, .project-card:hover, .pc-step:hover, .pc-del:hover,
.cstart-btn:hover:not(:disabled), .rsel-card:hover {
  transform: none !important;
}
.genre-card:hover:not(:disabled), .rsel-card:hover, .project-card:hover, .qkind-theme:hover, .qidea:hover,
.px-topic-card:hover, .px-choice:hover, .px-mission:hover, .deck-zone .pcard:not(.selected):hover,
.field-zone .cut-tl-block.tl-card:hover, .studio-inspector .inout-telop-kind:hover, .tvst-room:not(.current):hover { filter: brightness(1.06); }
.deck-zone .pcard.selected:hover { transform: translateY(-4px) !important; }
.studio-inspector .inout-fx-kind.sticker:hover { transform: rotate(0deg) scale(1.04) !important; }
.studio-inspector .inout-fx-kind.sticker.fxc-shake:hover { animation: none; }
.qstone:hover .qstone-disc { transform: none !important; filter: brightness(1.08); }
.cut-preview-screen .pv-bigplay:hover { transform: translate(-50%, -50%) !important; }
/* テロップの ポップは ボタンの 上に 出す（えいぞうを 見ながら なおせる） */
.studio-bottom.edit-zone .inout-telop-edit { top: auto !important; bottom: calc(100% + 10px); }
.studio-bottom.edit-zone .inout-telop-edit::before { top: auto !important; bottom: -13px; border-top: 10px solid #ffd43b !important; border-bottom: 0 !important; }
@keyframes tel-pop { from { opacity: 0; transform: translateY(6px); } }
/* キューシート：カットの なまえを ひかえめな 大きさに、びょうに かぶらない よう に */
.oa-cue-side .oa-cue-body { min-width: 0; overflow: hidden; }
.oa-cue-side .oa-cue-body b { font-size: clamp(0.85rem, 12cqh, 1.05rem) !important; word-break: normal !important; overflow-wrap: anywhere !important; }
.oa-cue-side .oa-cue-body em { font-size: clamp(0.7rem, 10cqh, 0.85rem) !important; }
.oa-cue-side .oa-cue-body .oa-cue-tel, .oa-cue-side .oa-cue-body .oa-cue-narr { font-size: clamp(0.68rem, 9cqh, 0.82rem) !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.oa-cue-side .oa-cue-thumb { max-width: 30cqw !important; }
.oa-cue-side .oa-cue-sec { flex: none; white-space: nowrap; font-size: clamp(0.75rem, 11cqh, 0.95rem) !important; }
/* オンエア：「ぜんがめん」ボタンに よはくを */
.oa-ctrl.oa-fs-btn { width: auto !important; padding: 0 14px !important; gap: 6px; white-space: nowrap; }

/* ==== シール：ふやした 20しゅるい（かたち・もよう） ==== */
.inout-fx-kind.sticker.fxc-cool .st-shape, .inout-fx-kind.sticker.fxc-cool .st-face, .tl-card-sticker.fxs-cool .st-shape, .tl-card-sticker.fxs-cool .st-face { clip-path: polygon(8.0% 0.0%, 92.0% 0.0%, 92.0% 8.0%, 100.0% 8.0%, 100.0% 92.0%, 92.0% 92.0%, 92.0% 100.0%, 8.0% 100.0%, 8.0% 92.0%, 0.0% 92.0%, 0.0% 8.0%, 8.0% 8.0%); }
.inout-fx-kind.sticker.fxc-cool .st-face, .tl-card-sticker.fxs-cool .st-face { background: linear-gradient(135deg,#d0ebff,#74c0fc); color: #0b3a6e; }
.inout-fx-kind.sticker.fxc-cool, .tl-card-sticker.fxs-cool { color: #0b3a6e !important; text-shadow: none !important; }
.inout-fx-kind.sticker.fxc-warm .st-shape, .inout-fx-kind.sticker.fxc-warm .st-face, .tl-card-sticker.fxs-warm .st-shape, .tl-card-sticker.fxs-warm .st-face { clip-path: polygon(91.0% 50.0%, 95.4% 53.4%, 98.2% 57.3%, 98.7% 61.1%, 96.6% 64.4%, 92.4% 66.6%, 86.9% 67.8%, 89.4% 72.8%, 90.3% 77.5%, 89.1% 81.2%, 85.8% 83.2%, 80.9% 83.4%, 75.6% 82.1%, 75.6% 87.6%, 74.4% 92.3%, 71.7% 95.0%, 67.8% 95.4%, 63.4% 93.5%, 59.1% 90.0%, 56.8% 95.0%, 53.6% 98.7%, 50.0% 100.0%, 46.4% 98.7%, 43.2% 95.0%, 40.9% 90.0%, 36.6% 93.5%, 32.2% 95.4%, 28.3% 95.0%, 25.6% 92.3%, 24.4% 87.6%, 24.4% 82.1%, 19.1% 83.4%, 14.2% 83.2%, 10.9% 81.2%, 9.7% 77.5%, 10.6% 72.8%, 13.1% 67.8%, 7.6% 66.6%, 3.4% 64.4%, 1.3% 61.1%, 1.8% 57.3%, 4.6% 53.4%, 9.0% 50.0%, 4.6% 46.6%, 1.8% 42.7%, 1.3% 38.9%, 3.4% 35.6%, 7.6% 33.4%, 13.1% 32.2%, 10.6% 27.3%, 9.7% 22.5%, 10.9% 18.8%, 14.2% 16.8%, 19.1% 16.6%, 24.4% 17.9%, 24.4% 12.4%, 25.6% 7.7%, 28.3% 5.0%, 32.2% 4.6%, 36.6% 6.5%, 40.9% 10.0%, 43.2% 5.0%, 46.4% 1.3%, 50.0% 0.0%, 53.6% 1.3%, 56.8% 5.0%, 59.1% 10.0%, 63.4% 6.5%, 67.8% 4.6%, 71.7% 5.0%, 74.4% 7.7%, 75.6% 12.4%, 75.6% 17.9%, 80.9% 16.6%, 85.8% 16.8%, 89.1% 18.8%, 90.3% 22.5%, 89.4% 27.2%, 86.9% 32.2%, 92.4% 33.4%, 96.6% 35.6%, 98.7% 38.9%, 98.2% 42.7%, 95.4% 46.6%); }
.inout-fx-kind.sticker.fxc-warm .st-face, .tl-card-sticker.fxs-warm .st-face { background: radial-gradient(circle,#fff3bf 0 25%,#ffa94d 70%); color: #7a3500; }
.inout-fx-kind.sticker.fxc-warm, .tl-card-sticker.fxs-warm { color: #7a3500 !important; text-shadow: none !important; }
.inout-fx-kind.sticker.fxc-dream .st-shape, .inout-fx-kind.sticker.fxc-dream .st-face, .tl-card-sticker.fxs-dream .st-shape, .tl-card-sticker.fxs-dream .st-face { clip-path: polygon(0.0% 0.0%, 100.0% 0.0%, 100.0% 58.0%, 50.0% 100.0%, 0.0% 58.0%); }
.inout-fx-kind.sticker.fxc-dream .st-face, .tl-card-sticker.fxs-dream .st-face { background: linear-gradient(135deg,#fcc2d7,#d0bfff 50%,#a5d8ff); color: #5f3dc4; }
.inout-fx-kind.sticker.fxc-dream, .tl-card-sticker.fxs-dream { color: #5f3dc4 !important; text-shadow: none !important; }
.inout-fx-kind.sticker.fxc-night .st-shape, .inout-fx-kind.sticker.fxc-night .st-face, .tl-card-sticker.fxs-night .st-shape, .tl-card-sticker.fxs-night .st-face { clip-path: polygon(50.0% 0.0%, 100.0% 32.0%, 100.0% 100.0%, 0.0% 100.0%, 0.0% 32.0%); }
.inout-fx-kind.sticker.fxc-night .st-face, .tl-card-sticker.fxs-night .st-face { background: linear-gradient(180deg,#1b2466,#364fc7); color: #ffe066; }
.inout-fx-kind.sticker.fxc-night, .tl-card-sticker.fxs-night { color: #ffe066 !important; text-shadow: none !important; }
.inout-fx-kind.sticker.fxc-zoomout .st-shape, .inout-fx-kind.sticker.fxc-zoomout .st-face, .tl-card-sticker.fxs-zoomout .st-shape, .tl-card-sticker.fxs-zoomout .st-face { clip-path: polygon(0.0% 50.0%, 5.0% 42.2%, 10.0% 34.5%, 15.0% 27.3%, 20.0% 20.6%, 25.0% 14.6%, 30.0% 9.5%, 35.0% 5.4%, 40.0% 2.4%, 45.0% 0.6%, 50.0% 0.0%, 55.0% 0.6%, 60.0% 2.4%, 65.0% 5.4%, 70.0% 9.5%, 75.0% 14.6%, 80.0% 20.6%, 85.0% 27.3%, 90.0% 34.5%, 95.0% 42.2%, 100.0% 50.0%, 95.0% 57.8%, 90.0% 65.5%, 85.0% 72.7%, 80.0% 79.4%, 75.0% 85.4%, 70.0% 90.5%, 65.0% 94.6%, 60.0% 97.6%, 55.0% 99.4%, 50.0% 100.0%, 45.0% 99.4%, 40.0% 97.6%, 35.0% 94.6%, 30.0% 90.5%, 25.0% 85.4%, 20.0% 79.4%, 15.0% 72.7%, 10.0% 65.5%, 5.0% 57.8%); }
.inout-fx-kind.sticker.fxc-zoomout .st-face, .tl-card-sticker.fxs-zoomout .st-face { background: repeating-radial-gradient(ellipse,#e64980 0 6px,#fcc2d7 6px 12px); color: #fff; }
.inout-fx-kind.sticker.fxc-zoomout, .tl-card-sticker.fxs-zoomout { color: #fff !important; text-shadow: none !important; }
.inout-fx-kind.sticker.fxc-sway .st-shape, .inout-fx-kind.sticker.fxc-sway .st-face, .tl-card-sticker.fxs-sway .st-shape, .tl-card-sticker.fxs-sway .st-face { clip-path: polygon(0.0% 0.0%, 100.0% 0.0%, 88.0% 50.0%, 100.0% 100.0%, 0.0% 100.0%); }
.inout-fx-kind.sticker.fxc-sway .st-face, .tl-card-sticker.fxs-sway .st-face { background: linear-gradient(135deg,#63e6be,#20c997); color: #064e3b; }
.inout-fx-kind.sticker.fxc-sway, .tl-card-sticker.fxs-sway { color: #064e3b !important; text-shadow: none !important; }
.inout-fx-kind.sticker.fxc-spin .st-shape, .inout-fx-kind.sticker.fxc-spin .st-face, .tl-card-sticker.fxs-spin .st-shape, .tl-card-sticker.fxs-spin .st-face { clip-path: polygon(100.0% 50.0%, 99.7% 55.6%, 90.9% 59.3%, 89.6% 63.9%, 95.0% 71.7%, 92.3% 76.6%, 82.8% 76.2%, 79.7% 79.7%, 81.2% 89.1%, 76.6% 92.3%, 68.2% 87.8%, 63.9% 89.6%, 61.1% 98.7%, 55.6% 99.7%, 50.0% 92.0%, 45.3% 91.7%, 38.9% 98.7%, 33.5% 97.2%, 31.8% 87.8%, 27.7% 85.6%, 18.8% 89.1%, 14.6% 85.4%, 17.2% 76.2%, 14.4% 72.3%, 5.0% 71.7%, 2.8% 66.5%, 9.1% 59.3%, 8.3% 54.7%, 0.0% 50.0%, 0.3% 44.4%, 9.1% 40.7%, 10.4% 36.1%, 5.0% 28.3%, 7.7% 23.4%, 17.2% 23.8%, 20.3% 20.3%, 18.8% 10.9%, 23.4% 7.7%, 31.8% 12.2%, 36.1% 10.4%, 38.9% 1.3%, 44.4% 0.3%, 50.0% 8.0%, 54.7% 8.3%, 61.1% 1.3%, 66.5% 2.8%, 68.2% 12.2%, 72.3% 14.4%, 81.2% 10.9%, 85.4% 14.6%, 82.8% 23.8%, 85.6% 27.7%, 95.0% 28.3%, 97.2% 33.5%, 90.9% 40.7%, 91.7% 45.3%); }
.inout-fx-kind.sticker.fxc-spin .st-face, .tl-card-sticker.fxs-spin .st-face { background: conic-gradient(#4dabf7,#9775fa,#f783ac,#4dabf7); color: #fff; }
.inout-fx-kind.sticker.fxc-spin, .tl-card-sticker.fxs-spin { color: #fff !important; text-shadow: none !important; }
.inout-fx-kind.sticker.fxc-slide .st-shape, .inout-fx-kind.sticker.fxc-slide .st-face, .tl-card-sticker.fxs-slide .st-shape, .tl-card-sticker.fxs-slide .st-face { clip-path: polygon(0.0% 0.0%, 82.0% 0.0%, 100.0% 50.0%, 82.0% 100.0%, 0.0% 100.0%); }
.inout-fx-kind.sticker.fxc-slide .st-face, .tl-card-sticker.fxs-slide .st-face { background: linear-gradient(90deg,#495057,#868e96 60%,#f8f9fa); color: #fff; }
.inout-fx-kind.sticker.fxc-slide, .tl-card-sticker.fxs-slide { color: #fff !important; text-shadow: none !important; }
.inout-fx-kind.sticker.fxc-bounce .st-shape, .inout-fx-kind.sticker.fxc-bounce .st-face, .tl-card-sticker.fxs-bounce .st-shape, .tl-card-sticker.fxs-bounce .st-face { clip-path: polygon(10.0% 0.0%, 90.0% 0.0%, 90.0% 20.0%, 100.0% 20.0%, 100.0% 80.0%, 90.0% 80.0%, 90.0% 100.0%, 10.0% 100.0%, 10.0% 80.0%, 0.0% 80.0%, 0.0% 20.0%, 10.0% 20.0%); }
.inout-fx-kind.sticker.fxc-bounce .st-face, .tl-card-sticker.fxs-bounce .st-face { background: radial-gradient(circle at 30% 30%,#ffc078,#f76707); color: #fff; }
.inout-fx-kind.sticker.fxc-bounce, .tl-card-sticker.fxs-bounce { color: #fff !important; text-shadow: none !important; }
.inout-fx-kind.sticker.fxc-sparkle .st-shape, .inout-fx-kind.sticker.fxc-sparkle .st-face, .tl-card-sticker.fxs-sparkle .st-shape, .tl-card-sticker.fxs-sparkle .st-face { clip-path: polygon(50.0% 0.0%, 100.0% 50.0%, 50.0% 100.0%, 0.0% 50.0%); }
.inout-fx-kind.sticker.fxc-sparkle .st-face, .tl-card-sticker.fxs-sparkle .st-face { background: radial-gradient(circle,#fff 0 12%,#ffe066 40%,#fab005); color: #5c3c00; }
.inout-fx-kind.sticker.fxc-sparkle, .tl-card-sticker.fxs-sparkle { color: #5c3c00 !important; text-shadow: none !important; }
.inout-fx-kind.sticker.fxc-hearts .st-shape, .inout-fx-kind.sticker.fxc-hearts .st-face, .tl-card-sticker.fxs-hearts .st-shape, .tl-card-sticker.fxs-hearts .st-face { clip-path: polygon(50.0% 29.0%, 50.1% 28.2%, 50.4% 26.1%, 51.4% 22.8%, 53.3% 18.7%, 56.1% 14.5%, 59.9% 10.6%, 64.6% 7.6%, 70.0% 5.8%, 75.8% 5.5%, 81.7% 6.9%, 87.2% 9.8%, 92.0% 14.1%, 95.7% 19.6%, 98.0% 25.8%, 98.8% 32.4%, 98.0% 39.2%, 95.7% 45.9%, 92.0% 52.5%, 87.2% 58.7%, 81.7% 64.7%, 75.8% 70.4%, 70.0% 76.0%, 64.6% 81.3%, 59.9% 86.4%, 56.1% 91.1%, 53.3% 95.3%, 51.4% 98.8%, 50.4% 101.5%, 50.1% 103.2%, 50.0% 103.8%, 49.9% 103.2%, 49.6% 101.5%, 48.6% 98.8%, 46.7% 95.3%, 43.9% 91.1%, 40.1% 86.4%, 35.4% 81.3%, 30.0% 76.0%, 24.2% 70.4%, 18.3% 64.7%, 12.8% 58.7%, 8.0% 52.5%, 4.3% 45.9%, 2.0% 39.2%, 1.2% 32.4%, 2.0% 25.8%, 4.3% 19.6%, 8.0% 14.1%, 12.8% 9.8%, 18.3% 6.9%, 24.2% 5.5%, 30.0% 5.8%, 35.4% 7.6%, 40.1% 10.6%, 43.9% 14.5%, 46.7% 18.7%, 48.6% 22.8%, 49.6% 26.1%, 49.9% 28.2%); }
.inout-fx-kind.sticker.fxc-hearts .st-face, .tl-card-sticker.fxs-hearts .st-face { background: radial-gradient(circle at 40% 35%,#ffdeeb,#f06595 70%); color: #fff; }
.inout-fx-kind.sticker.fxc-hearts, .tl-card-sticker.fxs-hearts { color: #fff !important; text-shadow: none !important; }
.inout-fx-kind.sticker.fxc-snow .st-shape, .inout-fx-kind.sticker.fxc-snow .st-face, .tl-card-sticker.fxs-snow .st-shape, .tl-card-sticker.fxs-snow .st-face { clip-path: polygon(14.0% 0.0%, 86.0% 0.0%, 100.0% 50.0%, 86.0% 100.0%, 14.0% 100.0%, 0.0% 50.0%); }
.inout-fx-kind.sticker.fxc-snow .st-face, .tl-card-sticker.fxs-snow .st-face { background: radial-gradient(circle,#fff 0 2px,transparent 3px) 0 0/10px 10px,linear-gradient(180deg,#74c0fc,#1971c2); color: #fff; }
.inout-fx-kind.sticker.fxc-snow, .tl-card-sticker.fxs-snow { color: #fff !important; text-shadow: none !important; }
.inout-fx-kind.sticker.fxc-sakura .st-shape, .inout-fx-kind.sticker.fxc-sakura .st-face, .tl-card-sticker.fxs-sakura .st-shape, .tl-card-sticker.fxs-sakura .st-face { clip-path: polygon(0.0% 50.0%, 30.0% 4.0%, 70.0% 0.0%, 73.1% 0.3%, 76.2% 1.1%, 79.3% 2.4%, 82.2% 4.3%, 85.0% 6.7%, 87.6% 9.5%, 90.1% 12.8%, 92.3% 16.5%, 94.3% 20.6%, 96.0% 25.0%, 97.4% 29.7%, 98.5% 34.5%, 99.3% 39.6%, 99.8% 44.8%, 100.0% 50.0%, 99.8% 55.2%, 99.3% 60.4%, 98.5% 65.5%, 97.4% 70.3%, 96.0% 75.0%, 94.3% 79.4%, 92.3% 83.5%, 90.1% 87.2%, 87.6% 90.5%, 85.0% 93.3%, 82.2% 95.7%, 79.3% 97.6%, 76.2% 98.9%, 73.1% 99.7%, 70.0% 100.0%, 30.0% 96.0%); }
.inout-fx-kind.sticker.fxc-sakura .st-face, .tl-card-sticker.fxs-sakura .st-face { background: linear-gradient(135deg,#ffdeeb,#faa2c1); color: #a61e4d; }
.inout-fx-kind.sticker.fxc-sakura, .tl-card-sticker.fxs-sakura { color: #a61e4d !important; text-shadow: none !important; }
.inout-fx-kind.sticker.fxc-confetti .st-shape, .inout-fx-kind.sticker.fxc-confetti .st-face, .tl-card-sticker.fxs-confetti .st-shape, .tl-card-sticker.fxs-confetti .st-face { clip-path: polygon(0.0% 0.0%, 100.0% 0.0%, 92.0% 50.0%, 100.0% 100.0%, 0.0% 100.0%, 8.0% 50.0%); }
.inout-fx-kind.sticker.fxc-confetti .st-face, .tl-card-sticker.fxs-confetti .st-face { background: repeating-linear-gradient(45deg,#ff6b6b 0 6px,#ffd43b 6px 12px,#51cf66 12px 18px,#4dabf7 18px 24px); color: #fff; }
.inout-fx-kind.sticker.fxc-confetti, .tl-card-sticker.fxs-confetti { color: #fff !important; text-shadow: none !important; }
.inout-fx-kind.sticker.fxc-clap .st-shape, .inout-fx-kind.sticker.fxc-clap .st-face, .tl-card-sticker.fxs-clap .st-shape, .tl-card-sticker.fxs-clap .st-face { clip-path: polygon(0.0% 0.0%, 86.0% 0.0%, 100.0% 50.0%, 86.0% 100.0%, 0.0% 100.0%, 14.0% 50.0%); }
.inout-fx-kind.sticker.fxc-clap .st-face, .tl-card-sticker.fxs-clap .st-face { background: linear-gradient(135deg,#ffe066,#fcc419); color: #5c3c00; }
.inout-fx-kind.sticker.fxc-clap, .tl-card-sticker.fxs-clap { color: #5c3c00 !important; text-shadow: none !important; }
.inout-fx-kind.sticker.fxc-spot .st-shape, .inout-fx-kind.sticker.fxc-spot .st-face, .tl-card-sticker.fxs-spot .st-shape, .tl-card-sticker.fxs-spot .st-face { clip-path: polygon(14.0% 0.0%, 86.0% 0.0%, 100.0% 100.0%, 0.0% 100.0%); }
.inout-fx-kind.sticker.fxc-spot .st-face, .tl-card-sticker.fxs-spot .st-face { background: radial-gradient(ellipse at 50% 0,#fff9db 0 30%,#343a40 75%); color: #fff; }
.inout-fx-kind.sticker.fxc-spot, .tl-card-sticker.fxs-spot { color: #fff !important; text-shadow: none !important; }
.inout-fx-kind.sticker.fxc-focus .st-shape, .inout-fx-kind.sticker.fxc-focus .st-face, .tl-card-sticker.fxs-focus .st-shape, .tl-card-sticker.fxs-focus .st-face { clip-path: polygon(14.0% 0.0%, 100.0% 0.0%, 86.0% 100.0%, 0.0% 100.0%); }
.inout-fx-kind.sticker.fxc-focus .st-face, .tl-card-sticker.fxs-focus .st-face { background: repeating-conic-gradient(from 0deg at 50% 50%,#fff 0 6deg,#ced4da 6deg 12deg); color: #212529; }
.inout-fx-kind.sticker.fxc-focus, .tl-card-sticker.fxs-focus { color: #212529 !important; text-shadow: none !important; }
.inout-fx-kind.sticker.fxc-hanamaru .st-shape, .inout-fx-kind.sticker.fxc-hanamaru .st-face, .tl-card-sticker.fxs-hanamaru .st-shape, .tl-card-sticker.fxs-hanamaru .st-face { clip-path: polygon(0.0% 0.0%, 5.0% 8.0%, 10.0% 0.0%, 15.0% 8.0%, 20.0% 0.0%, 25.0% 8.0%, 30.0% 0.0%, 35.0% 8.0%, 40.0% 0.0%, 45.0% 8.0%, 50.0% 0.0%, 55.0% 8.0%, 60.0% 0.0%, 65.0% 8.0%, 70.0% 0.0%, 75.0% 8.0%, 80.0% 0.0%, 85.0% 8.0%, 90.0% 0.0%, 95.0% 8.0%, 100.0% 0.0%, 95.0% 16.7%, 100.0% 33.3%, 95.0% 50.0%, 100.0% 66.7%, 95.0% 83.3%, 100.0% 100.0%, 100.0% 100.0%, 95.0% 92.0%, 90.0% 100.0%, 85.0% 92.0%, 80.0% 100.0%, 75.0% 92.0%, 70.0% 100.0%, 65.0% 92.0%, 60.0% 100.0%, 55.0% 92.0%, 50.0% 100.0%, 45.0% 92.0%, 40.0% 100.0%, 35.0% 92.0%, 30.0% 100.0%, 25.0% 92.0%, 20.0% 100.0%, 15.0% 92.0%, 10.0% 100.0%, 5.0% 92.0%, 0.0% 100.0%, 5.0% 83.3%, 0.0% 66.7%, 5.0% 50.0%, 0.0% 33.3%, 5.0% 16.7%); }
.inout-fx-kind.sticker.fxc-hanamaru .st-face, .tl-card-sticker.fxs-hanamaru .st-face { background: radial-gradient(circle,#fff 0 30%,#ffe3e3 60%); color: #e03131; }
.inout-fx-kind.sticker.fxc-hanamaru, .tl-card-sticker.fxs-hanamaru { color: #e03131 !important; text-shadow: none !important; }
.inout-fx-kind.sticker.fxc-hatena .st-shape, .inout-fx-kind.sticker.fxc-hatena .st-face, .tl-card-sticker.fxs-hatena .st-shape, .tl-card-sticker.fxs-hatena .st-face { clip-path: polygon(0.0% 0.0%, 100.0% 0.0%, 100.0% 76.0%, 34.0% 76.0%, 18.0% 100.0%, 22.0% 76.0%, 0.0% 76.0%); }
.inout-fx-kind.sticker.fxc-hatena .st-face, .tl-card-sticker.fxs-hatena .st-face { background: linear-gradient(135deg,#a5d8ff,#4dabf7); color: #0b3a6e; }
.inout-fx-kind.sticker.fxc-hatena, .tl-card-sticker.fxs-hatena { color: #0b3a6e !important; text-shadow: none !important; }
.inout-fx-kind.sticker.fxc-bikkuri .st-shape, .inout-fx-kind.sticker.fxc-bikkuri .st-face, .tl-card-sticker.fxs-bikkuri .st-shape, .tl-card-sticker.fxs-bikkuri .st-face { clip-path: polygon(0.0% 0.0%, 100.0% 0.0%, 100.0% 68.0%, 50.0% 100.0%, 0.0% 68.0%); }
.inout-fx-kind.sticker.fxc-bikkuri .st-face, .tl-card-sticker.fxs-bikkuri .st-face { background: linear-gradient(135deg,#ffa8a8,#fa5252); color: #fff; }
.inout-fx-kind.sticker.fxc-bikkuri, .tl-card-sticker.fxs-bikkuri { color: #fff !important; text-shadow: none !important; }

/* ==== シールの こうか（プレビュー・オンエア きょうつう） ==== */
/* いろ */
.cut-preview-screen.fx-cool .st-fx-layer { opacity: 1; background: rgba(77, 171, 247, 0.28); }
.cut-preview-screen.fx-cool > video, .cut-preview-screen.fx-cool > .studio-still { filter: saturate(0.85) brightness(1.05); }
.cut-preview-screen.fx-warm .st-fx-layer { opacity: 1; background: rgba(255, 146, 43, 0.25); }
.cut-preview-screen.fx-warm > video, .cut-preview-screen.fx-warm > .studio-still { filter: saturate(1.15) brightness(1.05); }
.cut-preview-screen.fx-dream > video, .cut-preview-screen.fx-dream > .studio-still { filter: blur(1px) saturate(1.3) brightness(1.1); }
.cut-preview-screen.fx-dream .st-fx-layer { opacity: 1; background: radial-gradient(ellipse at 50% 50%, transparent 45%, rgba(255, 222, 235, 0.75) 100%); }
.cut-preview-screen.fx-night > video, .cut-preview-screen.fx-night > .studio-still { filter: brightness(0.6) saturate(0.85); }
.cut-preview-screen.fx-night .st-fx-layer { opacity: 1; background: rgba(25, 40, 110, 0.35); }
/* うごき */
.cut-preview-screen.fx-zoomout > video, .cut-preview-screen.fx-zoomout > .studio-still { animation: fx-zoomout var(--fx-dur, 3s) linear forwards; }
@keyframes fx-zoomout { from { transform: scale(1.3); } to { transform: scale(1); } }
.cut-preview-screen.fx-sway > video, .cut-preview-screen.fx-sway > .studio-still { animation: fx-sway 2.4s ease-in-out infinite; }
@keyframes fx-sway { 0%, 100% { transform: scale(1.08) rotate(-2deg); } 50% { transform: scale(1.08) rotate(2deg); } }
.cut-preview-screen.fx-spin > video, .cut-preview-screen.fx-spin > .studio-still { animation: fx-spin 0.8s ease-out; }
@keyframes fx-spin { from { transform: rotate(-200deg) scale(0.2); opacity: 0; } to { transform: none; opacity: 1; } }
.cut-preview-screen.fx-slide > video, .cut-preview-screen.fx-slide > .studio-still { animation: fx-slide 0.6s cubic-bezier(.2, .9, .3, 1); }
@keyframes fx-slide { from { transform: translateX(100%); } to { transform: none; } }
.cut-preview-screen.fx-bounce > video, .cut-preview-screen.fx-bounce > .studio-still { animation: fx-bounce 0.9s ease-out; }
@keyframes fx-bounce { 0% { transform: scale(0.6); } 40% { transform: scale(1.12); } 60% { transform: scale(0.95); } 80% { transform: scale(1.03); } 100% { transform: scale(1); } }
/* とうじょう（えいぞうの うえに かさねる。テロップより 下） */
.cut-preview-screen[class*="fx-"] .st-fx-layer { overflow: hidden; }
.cut-preview-screen.fx-sparkle .st-fx-layer, .cut-preview-screen.fx-hearts .st-fx-layer, .cut-preview-screen.fx-snow .st-fx-layer,
.cut-preview-screen.fx-sakura .st-fx-layer, .cut-preview-screen.fx-confetti .st-fx-layer, .cut-preview-screen.fx-clap .st-fx-layer,
.cut-preview-screen.fx-spot .st-fx-layer, .cut-preview-screen.fx-focus .st-fx-layer, .cut-preview-screen.fx-hanamaru .st-fx-layer,
.cut-preview-screen.fx-hatena .st-fx-layer, .cut-preview-screen.fx-bikkuri .st-fx-layer { opacity: 1; animation: none; }
.st-fx-layer::before, .st-fx-layer::after { position: absolute; pointer-events: none; white-space: pre; line-height: 1; }
/* キラキラ */
.fx-sparkle .st-fx-layer::before { content: '✨　　　　✨　　　　　✨'; top: 8%; left: 6%; font-size: 6cqw; animation: fx-twinkle 1.2s ease-in-out infinite; }
.fx-sparkle .st-fx-layer::after { content: '　✨　　　　　✨　　　✨'; bottom: 18%; left: 4%; font-size: 5cqw; animation: fx-twinkle 1.2s ease-in-out 0.6s infinite; }
@keyframes fx-twinkle { 0%, 100% { opacity: 0.2; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1.1); } }
/* ハート */
.fx-hearts .st-fx-layer::before { content: '💕　　　💗　　　　💖　　💕'; left: 4%; bottom: -10%; font-size: 6cqw; animation: fx-rise 3s linear infinite; }
.fx-hearts .st-fx-layer::after { content: '　　💗　　　💕　　　　💗'; left: 10%; bottom: -10%; font-size: 4.5cqw; animation: fx-rise 3s linear 1.5s infinite; }
@keyframes fx-rise { from { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } to { transform: translateY(-62cqw); opacity: 0; } }
/* ゆき */
.fx-snow .st-fx-layer { background-image: radial-gradient(circle, #fff 0 1.6px, transparent 2.4px), radial-gradient(circle, rgba(255,255,255,.8) 0 1px, transparent 1.8px); background-size: 46px 46px, 28px 28px; background-position: 0 0, 13px 7px; animation: fx-snow 6s linear infinite !important; }
@keyframes fx-snow { to { background-position: 30px 460px, 40px 290px; } }
/* さくら */
.fx-sakura .st-fx-layer::before { content: '🌸　　　🌸　　　　🌸　　🌸'; top: -12%; left: 2%; font-size: 4.5cqw; animation: fx-fall 4s linear infinite; }
.fx-sakura .st-fx-layer::after { content: '　　🌸　　　　🌸　　　🌸'; top: -12%; left: 8%; font-size: 3.6cqw; animation: fx-fall 4s linear 2s infinite; }
@keyframes fx-fall { from { transform: translate(0, 0) rotate(0); opacity: 0; } 10% { opacity: 1; } to { transform: translate(6cqw, 62cqw) rotate(40deg); opacity: 0.2; } }
/* おめでとう */
.fx-confetti .st-fx-layer { background-image: radial-gradient(circle, #ff6b6b 0 3px, transparent 4px), radial-gradient(circle, #ffd43b 0 3px, transparent 4px), radial-gradient(circle, #51cf66 0 3px, transparent 4px), radial-gradient(circle, #4dabf7 0 3px, transparent 4px); background-size: 70px 70px, 90px 90px, 60px 60px, 80px 80px; background-position: 0 0, 30px 20px, 50px 40px, 10px 60px; animation: fx-snow 3s linear infinite !important; }
.fx-confetti .st-fx-layer::before { content: '🎉'; left: 4%; top: 6%; font-size: 10cqw; animation: fx-pop 0.6s cubic-bezier(.2, 1.6, .4, 1) both; }
.fx-confetti .st-fx-layer::after { content: '🎊'; right: 4%; top: 6%; font-size: 10cqw; animation: fx-pop 0.6s cubic-bezier(.2, 1.6, .4, 1) 0.15s both; }
@keyframes fx-pop { from { transform: scale(0) rotate(-30deg); } to { transform: none; } }
/* はくしゅ */
.fx-clap .st-fx-layer::before { content: '👏　　　👏　　　👏'; left: 50%; bottom: 6%; font-size: 7cqw; transform: translateX(-50%); animation: fx-clap 0.5s ease-in-out infinite alternate; }
@keyframes fx-clap { from { transform: translateX(-50%) scale(0.9); } to { transform: translateX(-50%) scale(1.1); } }
/* スポットライト */
.fx-spot .st-fx-layer { background: radial-gradient(circle at 50% 50%, transparent 0 22%, rgba(0, 0, 0, 0.78) 42%); animation: fx-spot 1s ease-out both !important; }
@keyframes fx-spot { from { opacity: 0; transform: scale(1.6); } to { opacity: 1; transform: none; } }
/* ちゅうもく（しゅうちゅうせん） */
.fx-focus .st-fx-layer { background: repeating-conic-gradient(from 0deg at 50% 50%, transparent 0 5deg, rgba(255, 255, 255, 0.85) 5deg 6deg); -webkit-mask-image: radial-gradient(circle, transparent 30%, #000 62%); mask-image: radial-gradient(circle, transparent 30%, #000 62%); animation: fx-focus 0.25s steps(2) infinite !important; }
@keyframes fx-focus { 50% { transform: rotate(2deg); } }
/* はなまる・はてな・びっくり（すみに ポン） */
.fx-hanamaru .st-fx-layer::after { content: '💮'; right: 5%; top: 6%; font-size: 20cqw; animation: fx-pop 0.6s cubic-bezier(.2, 1.6, .4, 1) both; }
.fx-hatena .st-fx-layer::after { content: '❓'; right: 6%; top: 8%; font-size: 16cqw; animation: fx-pop 0.5s cubic-bezier(.2, 1.6, .4, 1) both, fx-bob 1.4s ease-in-out 0.5s infinite; }
@keyframes fx-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -1.2cqw; } }
.fx-bikkuri .st-fx-layer::after { content: '❗'; right: 7%; top: 8%; font-size: 16cqw; animation: fx-pop 0.4s cubic-bezier(.2, 1.6, .4, 1) both, fx-jolt 0.6s 0.4s; }
@keyframes fx-jolt { 25% { translate: -0.6cqw 0; } 50% { translate: 0.6cqw 0; } 75% { translate: -0.3cqw 0; } }
@media (prefers-reduced-motion: reduce) { .st-fx-layer, .st-fx-layer::before, .st-fx-layer::after { animation: none !important; } }

/* ==== シールの いちらん：ふえても わくは のびない（スクロール） ==== */
.studio-inspector .inout-fx-kinds { max-height: 196px; overflow-y: auto; overscroll-behavior: contain; padding: 8px 8px 14px !important; margin: 0 -4px !important; scrollbar-width: thin; }
.studio-inspector .inout-fx { position: relative; }
.studio-inspector .inout-fx::after { content: '↓ 下にもっとあります'; position: absolute; left: 0; right: 0; bottom: 0; height: 26px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 2px; font-size: 0.68rem; font-weight: 900; color: #ffe066; background: linear-gradient(180deg, transparent, rgba(22, 29, 79, 0.95)); pointer-events: none; }
.studio-inspector .inout-fx.at-end::after { display: none; }
@keyframes fx-spot { from { transform: scale(1.8); } to { transform: none; } }
.inout-fx-kind.sticker.fxc-zoomout .st-face, .tl-card-sticker.fxs-zoomout .st-face { color: #7a0f3a !important; text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 2px #fff; }
.inout-fx-kind.sticker.fxc-zoomout, .tl-card-sticker.fxs-zoomout { color: #7a0f3a !important; }
/* すみの ポン は みだし（右上）に かぶらない よう 右の まんなかへ */
.fx-hanamaru .st-fx-layer::after, .fx-hatena .st-fx-layer::after, .fx-bikkuri .st-fx-layer::after { top: 34% !important; right: 5% !important; }
.fx-confetti .st-fx-layer::after { top: 34% !important; }
/* ちゅうもく：ちらつかせない（せんは うごかさない） */
.fx-focus .st-fx-layer { animation: none !important; }
/* シールの いちらん：よこスクロールは ださない */
.studio-inspector .inout-fx-kinds { overflow-x: hidden !important; }
/* シールの いちらん：わくの あいて いる ところまでは ふつうに 出す（はみ出る ぶんだけ スクロール） */
@media (min-width: 901px) {
  .studio.layout-edit .studio-bottom.edit-zone .inout { contain: size; min-height: 0; overflow: hidden; }
  .studio.layout-edit .studio-bottom.edit-zone .inout .inout-fx { flex: 1 1 auto; min-height: 150px; display: flex; flex-direction: column; }
  .studio.layout-edit .studio-bottom.edit-zone .inout .inout-fx .inout-fx-kinds { flex: 1 1 auto; min-height: 0; max-height: none !important; align-content: start; }
  .studio.layout-edit .studio-bottom.edit-zone .inout .inout-move { margin-top: 0 !important; }
}
/* テロップの ポップ：PC・スマホは ボタンの 下、タブレットだけ 上 */
.studio-bottom.edit-zone .inout-telop-edit { top: calc(100% + 10px) !important; bottom: auto !important; }
.studio-bottom.edit-zone .inout-telop-edit::before { top: -13px !important; bottom: auto !important; border-top: 0 !important; border-bottom: 10px solid #f59f00 !important; }
.tablet-compact .studio-bottom.edit-zone .inout-telop-edit { top: auto !important; bottom: calc(100% + 10px) !important; }
.tablet-compact .studio-bottom.edit-zone .inout-telop-edit::before { top: auto !important; bottom: -13px !important; border-bottom: 0 !important; border-top: 10px solid #f59f00 !important; }
@media (min-width: 901px) { .studio.layout-edit .studio-bottom.edit-zone .inout { overflow: visible !important; } }
/* ポップの いろ：うしろの 紺と ちがう あかるい クリーム */
.studio-bottom.edit-zone .inout-telop-edit { background: linear-gradient(180deg, #fffbea, #fff3bf) !important; border-color: #f59f00 !important; color: #212529; box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45), 0 0 0 3px rgba(245, 159, 0, 0.25) !important; }
.studio-bottom.edit-zone .inout-telop-edit .inout-telop-edit-head { color: #3b2a00 !important; }
.studio-bottom.edit-zone .inout-telop-edit .inout-telop-x { color: #c92a2a !important; border-color: #ffa8a8 !important; background: #fff !important; }
.studio-bottom.edit-zone .inout-telop-edit .inout-telop-x:hover { background: #fff5f5 !important; }
.studio-bottom.edit-zone .inout-telop-edit .inout-telop-input { border-color: #fcc419 !important; }
.studio-bottom.edit-zone .inout-telop-edit .tel-nudge { background: rgba(245, 159, 0, 0.12) !important; }
.studio-bottom.edit-zone .inout-telop-edit .tel-nudge-label { color: #7a5a00 !important; }
.studio-bottom.edit-zone .inout-telop-edit.kind-name { border-left-color: #f59f00 !important; }

/* ==== うめこみ（先生用プレイヤーの 中の オンエア画面）：テレビだけ ==== */
html.embed, html.embed body { background: #000 !important; overflow: hidden; }
html.embed .app-header, html.embed .tvst, html.embed .oa-head, html.embed .oa-side, html.embed .oa-rundown, html.embed #autosave-indicator, html.embed #ai-tasks-widget, html.embed #howl-widget { display: none !important; }
html.embed .app-main { padding: 0 !important; max-width: none !important; min-height: 0; }
html.embed .oa-main { display: block !important; margin: 0 !important; }
html.embed .oa-tv-wrap { width: min(100vw, calc((100vh - 50px) * 16 / 9 + 24px)) !important; max-width: 100%; margin: 0 auto; }
html.embed .oa-tv { border-radius: 0; box-shadow: none; }

/* ==== 先生用ダッシュボード ==== */
.tdash { max-width: 1400px; margin: 0 auto; }
.tdash-hero { position: relative; overflow: hidden; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 22px 24px; margin: 0 0 16px; border-radius: 20px; color: #fff; background: linear-gradient(135deg, #1e3a8a, #0f172a); box-shadow: 0 10px 28px rgba(15, 23, 42, 0.3); }
.tdash-hero::before { content: ''; position: absolute; width: 240px; height: 240px; right: -70px; top: -100px; border-radius: 50%; background: rgba(255, 255, 255, 0.08); }
.tdash-hero-icon { flex: none; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; background: rgba(255, 255, 255, 0.15); font-size: 2.1rem; }
.tdash-hero-text { flex: 1 1 280px; position: relative; }
.tdash-hero-text h1 { margin: 0 0 4px; color: #fff; font-size: 1.6rem; font-weight: 900; }
.tdash-hero-text p { margin: 0; color: rgba(255, 255, 255, 0.85); font-size: 0.92rem; font-weight: 600; }
.tdash-hero-actions { position: relative; display: flex; gap: 10px; flex-wrap: wrap; }
.tdash-watchall { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border: none; border-radius: 999px; background: linear-gradient(135deg, #ff3d7f, #ff9f1c); color: #fff; font: inherit; font-weight: 900; font-size: 0.95rem; cursor: pointer; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25); }
.tdash-watchall .ic { width: 16px; height: 16px; }
.tdash-watchall:disabled { opacity: 0.5; cursor: not-allowed; }
.tdash-ghost { display: inline-flex; align-items: center; padding: 10px 16px; border-radius: 999px; border: 2px solid rgba(255, 255, 255, 0.6); color: #fff; font-weight: 800; font-size: 0.9rem; text-decoration: none; }
.tdash-ghost:hover { background: rgba(255, 255, 255, 0.12); color: #fff; text-decoration: none; }
.tdash-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin: 0 0 16px; }
.tdash-stat { --sc: #1e3a8a; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; border-radius: 14px; background: #fff; border: 2px solid #e1e5ec; border-left: 6px solid var(--sc); font: inherit; text-align: left; cursor: pointer; }
.tdash-stat b { font-size: 1.6rem; font-weight: 900; color: var(--sc); line-height: 1.1; }
.tdash-stat span { font-size: 0.8rem; font-weight: 800; color: var(--muted); }
.tdash-stat.on { border-color: var(--sc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sc) 20%, transparent); }
.tdash-stat.static { cursor: default; --sc: #495057; }
.st-none { --sc: #868e96; } .st-plan { --sc: #7048e8; } .st-shoot { --sc: #f08c00; } .st-edit { --sc: #1c7ed6; } .st-ready { --sc: #2f9e44; }
.tdash-tabs { display: inline-flex; gap: 6px; padding: 5px; margin: 0 0 12px; background: #fff; border: 1px solid #e1e5ec; border-radius: 999px; }
.tdash-tab { display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border: none; border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-weight: 800; cursor: pointer; }
.tdash-tab em { font-style: normal; padding: 0 8px; border-radius: 999px; background: #eef1f6; color: var(--text); font-size: 0.8rem; }
.tdash-tab.on { background: linear-gradient(135deg, #1e3a8a, #3b5bdb); color: #fff; }
.tdash-tab.on em { background: rgba(255, 255, 255, 0.25); color: #fff; }
.tdash-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 0 0 14px; }
.tdash-search { flex: 1 1 260px; min-height: 42px; padding: 0 14px; border: 2px solid #dee2e6; border-radius: 12px; font: inherit; font-size: 0.95rem; }
.tdash-search:focus { outline: none; border-color: #3b5bdb; }
.tdash-view { display: inline-flex; border: 2px solid #dee2e6; border-radius: 12px; overflow: hidden; }
.tdash-view button { padding: 9px 14px; border: none; background: #fff; font: inherit; font-weight: 800; font-size: 0.85rem; cursor: pointer; color: var(--muted); }
.tdash-view button.on { background: #1e3a8a; color: #fff; }
.tdash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.tdash-card { display: flex; flex-direction: column; overflow: hidden; border-radius: 16px; background: #fff; box-shadow: 0 4px 14px rgba(20, 30, 60, 0.08); border-top: 5px solid var(--sc); }
.tdash-thumb { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 0; background: #111; cursor: pointer; overflow: hidden; }
.tdash-thumb:disabled { cursor: default; }
.tdash-thumb video, .tdash-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tdash-thumb-empty { display: grid; place-items: center; width: 100%; height: 100%; font-size: 2.4rem; color: #555; }
.tdash-play { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; transform: translate(-50%, -50%); display: grid; place-items: center; border-radius: 50%; background: rgba(0, 0, 0, 0.55); color: #fff; transition: background 0.15s; }
.tdash-play .ic { width: 22px; height: 22px; }
.tdash-thumb:not(:disabled):hover .tdash-play { background: rgba(255, 61, 127, 0.9); }
.tdash-nowatch { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 4px 12px; border-radius: 999px; background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 0.78rem; font-weight: 800; white-space: nowrap; }
.tdash-stage { position: absolute; left: 8px; top: 8px; padding: 3px 10px; border-radius: 999px; background: var(--sc); color: #fff; font-size: 0.75rem; font-weight: 900; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); }
.tdash-body { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px 14px; flex: 1; }
.tdash-title-row { display: flex; align-items: flex-start; gap: 8px; }
.tdash-title-row h3 { flex: 1; margin: 0; font-size: 1.05rem; font-weight: 900; line-height: 1.35; overflow-wrap: anywhere; }
.tdash-kind { flex: none; padding: 2px 8px; border-radius: 6px; background: #f1f3f5; color: #495057; font-size: 0.7rem; font-weight: 800; }
.tdash-meta { color: var(--muted); font-size: 0.78rem; font-weight: 600; }
.tdash-bars { display: grid; gap: 5px; }
.tdash-bar { display: grid; grid-template-columns: 2.6em 1fr auto; align-items: center; gap: 8px; font-size: 0.75rem; font-weight: 800; color: #495057; }
.tdash-bar i { height: 8px; border-radius: 999px; background: #eef1f6; overflow: hidden; }
.tdash-bar b { display: block; height: 100%; border-radius: 999px; background: var(--sc); }
.tdash-bar.over b { background: #e03131; }
.tdash-bar.over em { color: #e03131; }
.tdash-bar em { font-style: normal; font-variant-numeric: tabular-nums; }
.tdash-links, .tdash-table-links { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.tdash-links a, .tdash-table-links a { padding: 5px 10px; border-radius: 8px; background: #f1f3f5; border: 1px solid #e1e5ec; color: #343a40; font-size: 0.78rem; font-weight: 800; text-decoration: none; }
.tdash-links a:hover, .tdash-table-links a:hover { background: #e7f5ff; border-color: #74c0fc; text-decoration: none; }
.tdash-table-wrap { overflow-x: auto; border-radius: 14px; background: #fff; box-shadow: 0 4px 14px rgba(20, 30, 60, 0.08); }
.tdash-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.tdash-table th { text-align: left; padding: 10px 12px; background: #f8f9fa; color: #495057; font-size: 0.78rem; white-space: nowrap; border-bottom: 2px solid #e9ecef; }
.tdash-table td { padding: 10px 12px; border-bottom: 1px solid #f1f3f5; vertical-align: middle; }
.tdash-table td small { display: block; color: var(--muted); font-weight: 700; }
.tdash-table td.over { color: #e03131; font-weight: 800; }
.tdash-mini-play { width: 36px; height: 36px; border-radius: 50%; border: none; background: #1e3a8a; color: #fff; display: grid; place-items: center; cursor: pointer; }
.tdash-mini-play .ic { width: 14px; height: 14px; }
.tdash-mini-play:disabled { background: #ced4da; cursor: default; }
.tdash-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--sc); color: #fff; font-size: 0.75rem; font-weight: 900; white-space: nowrap; }
.tdash-empty { padding: 36px 16px; text-align: center; color: var(--muted); font-weight: 700; background: #fff; border: 2px dashed #dee2e6; border-radius: 16px; }
.tdash-note { margin: 14px 2px 0; color: var(--muted); font-size: 0.78rem; }
.tdash-other { display: grid; gap: 8px; }
.tdash-other-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border-radius: 12px; background: #fff; box-shadow: 0 2px 8px rgba(20, 30, 60, 0.06); }
.tdash-other-row .tdash-table-links { margin: 0 0 0 auto; }
/* プレイヤー */
html.tplayer-open, html.tplayer-open body { overflow: hidden; }
.tplayer { position: fixed; inset: 0; z-index: 9500; display: grid; place-items: center; padding: 16px; background: rgba(5, 8, 20, 0.85); }
.tplayer-box { width: min(1200px, 100%); max-height: calc(100svh - 32px); display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: #0b0d12; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6); }
.tplayer-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; background: #161a23; color: #fff; }
.tplayer-title { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; }
.tplayer-title b { font-size: 1.05rem; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tplayer-title small { color: #adb5bd; font-weight: 700; font-size: 0.78rem; }
.tplayer-auto { display: inline-flex; align-items: center; gap: 6px; font-size: 0.82rem; font-weight: 800; color: #dee2e6; cursor: pointer; }
.tplayer-count { font-weight: 900; font-variant-numeric: tabular-nums; color: #ffd43b; }
.tplayer-nav, .tplayer-close { padding: 8px 14px; border-radius: 999px; border: 2px solid rgba(255, 255, 255, 0.4); background: transparent; color: #fff; font: inherit; font-weight: 800; font-size: 0.85rem; cursor: pointer; }
.tplayer-nav:hover, .tplayer-close:hover { background: rgba(255, 255, 255, 0.12); }
.tplayer-close { border-color: #ffa8a8; color: #ffc9c9; }
.tplayer-stage { position: relative; width: 100%; aspect-ratio: 16 / 9.6; max-height: calc(100svh - 120px); background: #000; }
.tplayer-stage iframe { width: 100%; height: 100%; border: 0; display: block; }
.tplayer-card { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: radial-gradient(circle, #1e3a8a, #0b0d12); color: #fff; text-align: center; padding: 20px; }
.tplayer-card span { font-size: 0.9rem; font-weight: 800; color: #ffd43b; letter-spacing: 2px; }
.tplayer-card b { font-size: 1.8rem; font-weight: 900; }
.tplayer-card em { font-style: normal; font-weight: 800; color: #dee2e6; }
@media (max-width: 600px) {
  .tdash-hero { padding: 18px 16px; }
  .tdash-hero-text h1 { font-size: 1.3rem; }
  .tdash-hero-actions { width: 100%; }
  .tdash-watchall { flex: 1; justify-content: center; }
  .tdash-grid { grid-template-columns: 1fr; }
  .tplayer { padding: 0; }
  .tplayer-box { border-radius: 0; max-height: 100svh; }
}
@media (max-width: 600px) {
  .tdash-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .tdash-stat { padding: 8px 8px; border-left-width: 4px; }
  .tdash-stat b { font-size: 1.2rem; }
  .tdash-stat span { font-size: 0.66rem; }
  .tdash-hero-icon { width: 48px; height: 48px; font-size: 1.6rem; }
}

/* 先生画面: 動画ダウンロード */
.tdash-dl { margin-top: 8px; width: 100%; padding: 8px 12px; border-radius: 10px; border: 1.5px solid #2f9e44; background: #ebfbee; color: #2b8a3e; font: inherit; font-size: 0.82rem; font-weight: 900; cursor: pointer; }
.tdash-dl:hover:not(:disabled) { background: #d3f9d8; }
.tdash-dl.sm { width: auto; margin-top: 0; padding: 5px 10px; font-size: 0.78rem; border-radius: 8px; }
.tdash-dl.busy, .tdash-dl:disabled { border-color: #ced4da; background: #f1f3f5; color: #868e96; cursor: progress; }
.tplayer-dl { border-color: #8ce99a; color: #b2f2bb; }
.tplayer-dl:disabled { opacity: 0.6; cursor: progress; }

/* オンエア：せんせいに ていしゅつ */
.oa-submit { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; margin-left: auto; }
.oa-submit-btn { padding: 10px 20px; border-radius: 999px; border: 0; background: linear-gradient(180deg, #ffe066, #fcc419); color: #3b2a00; font: inherit; font-size: 1rem; font-weight: 900; cursor: pointer; box-shadow: 0 4px 0 #e8a800, 0 6px 14px rgba(0, 0, 0, 0.3); white-space: nowrap; }
.oa-submit-btn:hover:not(:disabled) { filter: brightness(1.05); }
.oa-submit-btn:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 2px 0 #e8a800; }
.oa-submit-btn:disabled { opacity: 0.7; cursor: progress; }
.oa-submit-btn.again { padding: 7px 14px; font-size: 0.85rem; background: transparent; color: #fff; border: 2px solid rgba(255, 255, 255, 0.5); box-shadow: none; }
.oa-submit-btn.again:active:not(:disabled) { transform: none; }
.oa-submit-done { display: inline-flex; align-items: baseline; gap: 8px; padding: 7px 14px; border-radius: 999px; background: #2f9e44; color: #fff; font-weight: 900; font-size: 0.95rem; white-space: nowrap; }
.oa-submit-done small { font-size: 0.78rem; opacity: 0.9; font-weight: 800; }
.oa-submit-done.pop { animation: oa-sub-pop 0.5s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes oa-sub-pop { from { transform: scale(0.6); } to { transform: none; } }
html.embed .oa-submit { display: none; }
@media (max-width: 640px) { .oa-submit-btn { padding: 8px 14px; font-size: 0.88rem; } .oa-submit-done { font-size: 0.82rem; } }
/* 先生画面：提出ずみ */
.tdash-sub { position: absolute; right: 8px; top: 8px; padding: 3px 10px; border-radius: 999px; background: #2f9e44; color: #fff; font-size: 0.72rem; font-weight: 900; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); }
.tdash-sub-cell { display: block; margin-top: 3px; color: #2b8a3e; font-weight: 800; font-size: 0.72rem; white-space: nowrap; }
/* テロップ（説明）：座布団の 下はしを 画面の 下から 5% に（top:95% を 下はし きじゅんに。wrap の うえした 6px ぶん ずらす） */
.st-telops .telop-overlay.kind-setsumei { transform: translate(-50%, calc(-100% + 6px)); }
.st-telops .telop-overlay.kind-setsumei .telop-box-wrap { min-height: 0; }
/* 先生プレイヤー：「つぎの動画」カードは hidden の ときは かならず かくす（display:flex に まけて 映像を おおっていた） */
.tplayer-card[hidden] { display: none !important; }

/* ==== 授業（先生） ==== */
.tles { margin: 0 0 14px; padding: 14px 16px; border-radius: 16px; background: #fff; border: 1px solid #e1e5ec; box-shadow: 0 2px 10px rgba(16, 24, 40, 0.06); }
.tles-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.tles-head > b { font-size: 1.05rem; font-weight: 900; color: #212529; }
.tles-hint { color: #868e96; font-size: 0.8rem; font-weight: 700; }
.tles-new { margin-left: auto; padding: 8px 16px; border-radius: 999px; border: 0; background: linear-gradient(135deg, #1c7ed6, #4dabf7); color: #fff; font: inherit; font-weight: 900; font-size: 0.88rem; cursor: pointer; box-shadow: 0 3px 0 #1864ab; }
.tles-new:active { transform: translateY(2px); box-shadow: 0 1px 0 #1864ab; }
.tles-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.tles-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; border: 1.5px solid #dee2e6; background: #f8f9fa; color: #343a40; font: inherit; font-size: 0.86rem; font-weight: 800; cursor: pointer; }
.tles-chip small { color: #868e96; font-weight: 700; font-size: 0.74rem; }
.tles-chip em { font-style: normal; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: #e9ecef; color: #495057; font-size: 0.74rem; text-align: center; }
.tles-chip:hover { border-color: #74c0fc; background: #e7f5ff; }
.tles-chip.on { border-color: #1c7ed6; background: #1c7ed6; color: #fff; }
.tles-chip.on small { color: #d0ebff; }
.tles-chip.on em { background: rgba(255, 255, 255, 0.25); color: #fff; }
.tles-chip.closed:not(.on) { opacity: 0.7; }
.tles-chip.none:not(.on) { border-style: dashed; }
.tles-detail { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px dashed #dee2e6; font-size: 0.86rem; color: #495057; font-weight: 700; }
.tles-status { padding: 3px 10px; border-radius: 999px; font-weight: 900; font-size: 0.78rem; }
.tles-status.open { background: #d3f9d8; color: #2b8a3e; }
.tles-status.closed { background: #f1f3f5; color: #868e96; }
.tles-memo { color: #5c677d; }
.tles-actions { margin-left: auto; display: flex; gap: 6px; }
.tles-actions button { padding: 6px 12px; border-radius: 8px; border: 1px solid #dee2e6; background: #fff; font: inherit; font-size: 0.8rem; font-weight: 800; cursor: pointer; color: #343a40; }
.tles-actions button:hover { background: #f1f3f5; }
.tles-actions button.danger { color: #e03131; border-color: #ffc9c9; }
.tles-modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px; background: rgba(10, 14, 30, 0.55); }
.tles-dialog { width: min(520px, 100%); display: flex; flex-direction: column; gap: 12px; padding: 22px; border-radius: 18px; background: #fff; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35); }
.tles-dialog h2 { margin: 0 0 4px; font-size: 1.2rem; }
.tles-dialog label { display: flex; flex-direction: column; gap: 5px; font-size: 0.85rem; font-weight: 800; color: #343a40; }
.tles-dialog .req { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 4px; background: #ffe3e3; color: #e03131; font-size: 0.7rem; }
.tles-dialog input, .tles-dialog select, .tles-dialog textarea { padding: 10px 12px; border-radius: 10px; border: 1.5px solid #ced4da; font: inherit; font-size: 0.95rem; font-weight: 600; }
.tles-dialog input:focus, .tles-dialog select:focus, .tles-dialog textarea:focus { outline: none; border-color: #4dabf7; box-shadow: 0 0 0 3px rgba(77, 171, 247, 0.25); }
.tles-dialog-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.tles-cancel, .tles-save { padding: 10px 18px; border-radius: 999px; font: inherit; font-weight: 900; cursor: pointer; }
.tles-cancel { border: 1.5px solid #ced4da; background: #fff; color: #495057; }
.tles-save { border: 0; background: #1c7ed6; color: #fff; }
.tles-save:disabled { opacity: 0.6; }

/* ==== 授業（生徒） ==== */
.slesson-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.slesson-card { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-radius: 18px; background: linear-gradient(135deg, #1c7ed6, #22b8cf); color: #fff; text-decoration: none; box-shadow: 0 5px 0 #1864ab, 0 10px 20px rgba(28, 126, 214, 0.25); }
.slesson-card:hover { text-decoration: none; filter: brightness(1.05); }
.slesson-card:active { transform: translateY(3px); box-shadow: 0 2px 0 #1864ab; }
.slesson-icon { font-size: 2rem; }
.slesson-body { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.slesson-body b { font-size: 1.2rem; font-weight: 900; }
.slesson-body small { font-size: 0.85rem; font-weight: 800; opacity: 0.9; }
.slesson-go { padding: 8px 16px; border-radius: 999px; background: #fff; color: #1864ab; font-weight: 900; white-space: nowrap; }
.slesson-memo { display: inline-block; margin-top: 10px; padding: 8px 14px; border-radius: 12px; background: #fff9db; color: #5c3c00; font-weight: 800; font-size: 0.92rem; }
.slesson-name { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; font-weight: 900; font-size: 1rem; }
.slesson-name input { flex: 1 1 220px; max-width: 360px; padding: 12px 14px; border-radius: 12px; border: 2px solid #ced4da; font: inherit; font-size: 1.05rem; font-weight: 800; }
.slesson-name input:focus { outline: none; border-color: #4dabf7; }
.slesson-name input.need { border-color: #fa5252; box-shadow: 0 0 0 3px rgba(250, 82, 82, 0.25); }
.slesson-projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.slesson-proj { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 14px; background: #fff; border: 2px solid #e1e5ec; color: #212529; text-decoration: none; }
.slesson-proj:hover { border-color: #74c0fc; text-decoration: none; }
.slesson-proj b { font-weight: 900; font-size: 1rem; }
.slesson-proj small { color: #868e96; font-weight: 700; font-size: 0.78rem; }
.slesson-back { display: inline-block; margin-top: 18px; }
.slesson-missing { text-align: center; padding: 40px 16px; }
/* テロップ・とけい を 1つの ラベルに まとめた ので、テロップの まえの くぎり線は なくす */
.studio.layout-edit .studio-bottom.edit-zone .inout-bottom { margin-top: 8px !important; padding-top: 0 !important; border-top: none !important; }
/* きかくが おわるまで さつえい いこうは ロック */
.tvst-room.locked { opacity: 0.45; filter: grayscale(0.6); cursor: not-allowed; }
.tvst-room.locked:hover { transform: none; box-shadow: none; }

/* ==== へんしゅうしつ：さいしょは「映像／カードリスト」だけ。「えいぞうを へんしゅうする」で「映像｜へんしゅう／カードリスト」 ==== */
.tl-edit-toggle { display: none; }
.studio.layout-edit .field-outer { position: relative; }
.studio.layout-edit .tl-edit-toggle {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%); z-index: 5;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  width: 104px; min-height: 150px; padding: 12px 8px; border-radius: 18px; border: 3px solid #fff;
  background: linear-gradient(180deg, #ff8fab, #e64980); color: #fff; font: inherit; cursor: pointer; text-align: center;
  box-shadow: 0 5px 0 #a61e4d, 0 10px 18px rgba(0, 0, 0, 0.35);
}
.studio.layout-edit .tl-edit-toggle:active { transform: translateY(calc(-50% + 3px)); box-shadow: 0 2px 0 #a61e4d; }
.studio.layout-edit .tl-edit-toggle .tl-edit-ic { font-size: 1.9rem; line-height: 1; }
.studio.layout-edit .tl-edit-toggle b { font-size: 0.95rem; font-weight: 900; line-height: 1.25; }
.studio.layout-edit .tl-edit-toggle small { font-size: 0.62rem; font-weight: 800; line-height: 1.3; opacity: 0.92; }
.studio.layout-edit .tl-edit-toggle.on { background: linear-gradient(180deg, #5c677d, #343a40); box-shadow: 0 5px 0 #1d2125, 0 10px 18px rgba(0, 0, 0, 0.35); }
.studio.layout-edit .tl-edit-toggle.on:active { box-shadow: 0 2px 0 #1d2125; }
/* カードが ボタンの したに かくれない ように */
.studio.layout-edit .field-outer #st-tl-drop { padding-right: 126px !important; }
@media (min-width: 901px) {
  .studio.layout-edit .studio-bottom.edit-zone { grid-template-rows: auto auto !important; }
  /* とじて いる とき：映像（まんなか・大きめ）と カードリストだけ */
  .studio.layout-edit:not(.edit-open) .studio-bottom.edit-zone { grid-template-columns: minmax(0, 1fr) !important; grid-template-areas: "pv" "field" !important; }
  .studio.layout-edit:not(.edit-open) .studio-bottom.edit-zone .inout,
  .studio.layout-edit:not(.edit-open) .studio-bottom.edit-zone .inout-empty { display: none !important; }
  .studio.layout-edit:not(.edit-open) .studio-bottom.edit-zone > .studio-preview { justify-self: center !important; width: min(100%, calc((100svh - 470px) * 16 / 9), 1100px) !important; max-width: none !important; }
  /* ひらいた とき：映像が ちぢんで 右に へんしゅう、カードリストは よこ いっぱい */
  .studio.layout-edit.edit-open .studio-bottom.edit-zone { grid-template-columns: minmax(0, 11fr) minmax(320px, 9fr) !important; grid-template-areas: "pv side" "field field" !important; }
  .studio.layout-edit.edit-open .studio-bottom.edit-zone .inout,
  .studio.layout-edit.edit-open .studio-bottom.edit-zone .inout-empty { grid-area: side !important; animation: tl-edit-in 0.25s ease-out; }
}
@keyframes tl-edit-in { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
/* タブレット（たて）・スマホ：とじて いる ときは へんしゅうを かくす */
@media (max-width: 900px) {
  .studio.layout-edit:not(.edit-open) .studio-inspector { display: none !important; }
  .studio.layout-edit .tl-edit-toggle { position: static; transform: none; flex-direction: row; width: 100%; min-height: 0; margin-top: 10px; }
  .studio.layout-edit .tl-edit-toggle:active { transform: translateY(3px); }
  .studio.layout-edit .tl-edit-toggle br { display: none; }
  .studio.layout-edit .field-outer #st-tl-drop { padding-right: 0 !important; }
}
@media (prefers-reduced-motion: reduce) { .studio.layout-edit.edit-open .studio-bottom.edit-zone .inout { animation: none; } }
@media (min-width: 901px) {
  /* へんしゅうの わくは 映像と おなじ たかさ。はみ出る ぶんは わくの なかで スクロール */
  .studio.layout-edit.edit-open .studio-bottom.edit-zone .inout { contain: size; overflow-y: auto !important; overflow-x: hidden !important; overscroll-behavior: contain; scrollbar-width: thin; }
  .studio.layout-edit.edit-open .studio-bottom.edit-zone .inout .inout-fx { flex: none !important; min-height: 0 !important; }
  .studio.layout-edit.edit-open .studio-bottom.edit-zone .inout .inout-fx .inout-fx-kinds { max-height: none !important; overflow: visible !important; flex: none !important; }
  .studio.layout-edit.edit-open .studio-bottom.edit-zone .inout .inout-fx::after { display: none !important; }
  .studio.layout-edit.edit-open .studio-bottom.edit-zone .inout .inout-move { margin-top: 4px !important; }
}
@media (min-width: 901px) {
  .studio.layout-edit.edit-open .studio-bottom.edit-zone .inout,
  .studio.layout-edit.edit-open .studio-bottom.edit-zone .inout-empty { margin: 0 !important; min-width: 0; box-sizing: border-box; }
  /* とじて いる ときの 映像は、ひらいた ときより かならず 大きく */
  .studio.layout-edit:not(.edit-open) .studio-bottom.edit-zone > .studio-preview { width: min(100%, max(calc((100svh - 400px) * 16 / 9), 62%), 1100px) !important; }
}
@media (min-width: 901px) {
  /* とじて いる とき：映像と カードリストが 1がめんに おさまる 大きさ */
  .studio.layout-edit:not(.edit-open) .studio-bottom.edit-zone > .studio-preview { width: min(100%, calc((100svh - 440px) * 16 / 9), 1100px) !important; }
  /* ひらいた とき：映像は 左はんぶん（とじて いる ときより ちいさく） */
  .studio.layout-edit.edit-open .studio-bottom.edit-zone { grid-template-columns: minmax(0, 1fr) minmax(320px, 1fr) !important; }
}
@media (min-width: 901px) {
  .studio.layout-edit:not(.edit-open) .studio-bottom.edit-zone > .studio-preview { width: min(100%, calc((100svh - 465px) * 16 / 9), 1100px) !important; }
  .studio.layout-edit.edit-open .studio-bottom.edit-zone { grid-template-columns: minmax(0, 9fr) minmax(320px, 11fr) !important; }
}

/* ==== へんしゅうしつの カードリスト：たて幅を コンパクトに ==== */
.studio .tl-card-info { display: none !important; }
.studio #st-timeline { padding-top: 8px !important; padding-bottom: 8px !important; }
.studio .cut-tl-block.tl-card { padding: 4px !important; gap: 3px !important; }
.studio .tl-card .tl-card-top { min-height: 0 !important; padding: 0 2px !important; font-size: 0.78rem; line-height: 1.2; }
.studio .tl-card .tl-card-window { aspect-ratio: 16 / 8.2 !important; height: auto !important; }
.studio .tl-card .tl-card-purpose { margin: 0 !important; padding: 1px 2px !important; font-size: 0.78rem; line-height: 1.2; min-height: 0 !important; }
.studio .tl-card .tl-card-purpose .pcard-badge { font-size: 0.62rem; padding: 0 6px; }
/* 再生バーは ほそく */
.studio .tl-card .tl-card-prog { height: 8px !important; margin: 3px 2px 1px !important; border-width: 1.5px !important; }
.studio .tl-card .tl-card-prog > i::after { width: 11px; height: 11px; right: -5px; border-width: 2px; }
/* ならべかえ（◀ ▶）は カードの 下に はみ出さず、えいぞうの 下はしに かさねる */
.studio .tl-card { position: relative; }
.studio .tl-card > .tl-move { position: absolute !important; top: auto !important; bottom: 34px !important; left: 6px !important; right: 6px !important; padding: 2px !important; background: rgba(255, 243, 191, 0.95) !important; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) !important; }
.studio .tl-card > .tl-move button { width: 30px !important; height: 24px !important; }
.studio .tl-card > .tl-move span { font-size: 0.62rem !important; }
/* つなぎの しるし（ヒキ→ミドル）も ちいさく */
.studio .cut-tl-mark { font-size: 0.62rem !important; }

/* ==== 部屋の ならび：3ぎょうめの ほそく（なにを つくるか きめる など）は なくして コンパクトに ==== */
.tvst-room-text i { display: none !important; }
.tvst-room { padding-top: 5px !important; padding-bottom: 5px !important; min-height: 0 !important; }
.tvst-room-text { line-height: 1.15 !important; }
.tvst-room-text small { font-size: 0.6rem !important; }
.tvst-room-icon { font-size: 1.15rem !important; }
/* ならべかえ：えらんだ カード（きいろ）と まざらない よう、こい 紺に 白い もじ */
.studio .tl-card > .tl-move { background: rgba(16, 22, 61, 0.92) !important; border: 2px solid #fff !important; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45) !important; }
.studio .tl-card > .tl-move span { color: #fff !important; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5); }
.studio .tl-card > .tl-move button { background: linear-gradient(180deg, #ffe066, #fab005) !important; color: #2b1d00 !important; box-shadow: 0 2px 0 #b07800 !important; }
.studio .tl-card > .tl-move button:disabled { background: rgba(255, 255, 255, 0.18) !important; color: rgba(255, 255, 255, 0.5) !important; box-shadow: none !important; opacity: 1 !important; }

/* ==== へんしゅうしつ：番組素材を いれる ==== */
.tl-brand-add { flex: none; align-self: center; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; width: 112px; min-height: 120px; margin-left: 6px; padding: 10px 6px; border-radius: 14px; border: 2.5px dashed #ffd43b; background: rgba(255, 212, 59, 0.1); color: #fff3bf; font: inherit; cursor: pointer; text-align: center; }
.tl-brand-add:hover { background: rgba(255, 212, 59, 0.2); }
.tl-brand-add-ic { font-size: 1.6rem; line-height: 1; }
.tl-brand-add b { font-size: 0.86rem; font-weight: 900; line-height: 1.2; color: #fff; }
.tl-brand-add small { font-size: 0.62rem; font-weight: 800; line-height: 1.3; opacity: 0.85; }
.brand-pick { position: fixed; z-index: 2000; padding: 12px; border-radius: 16px; background: #fff; color: #212529; border: 3px solid #ffd43b; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4); }
.brand-pick-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 0.95rem; }
.brand-pick-x { width: 30px; height: 30px; border-radius: 50%; border: 0; background: #f1f3f5; font-size: 0.9rem; cursor: pointer; }
.brand-pick-list { display: flex; flex-direction: column; gap: 8px; }
.brand-pick-item { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; border: 2px solid #e9ecef; background: #f8f9fa; font: inherit; text-align: left; cursor: pointer; }
.brand-pick-item:hover { border-color: #fab005; background: #fff9db; }
.brand-pick-thumb { flex: none; width: 96px; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #000; }
.brand-pick-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand-pick-body { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.brand-pick-body b { font-size: 1rem; font-weight: 900; }
.brand-pick-body small { font-size: 0.72rem; color: #868e96; font-weight: 700; }
.brand-pick-body em { font-style: normal; font-size: 0.7rem; color: #e8590c; font-weight: 800; }
.brand-pick-go { flex: none; padding: 6px 12px; border-radius: 999px; background: linear-gradient(180deg, #ffd43b, #fab005); color: #3b2a00; font-weight: 900; font-size: 0.85rem; }

/* カードリスト：「あと ◯びょう」は 出さない（オーバーの ときだけ 出す）／カードの 下の すきまを なくす */
.studio .tl-gauge-label:not(.over) { display: none !important; }
.studio.layout-edit #st-timeline { min-height: 0 !important; margin-bottom: 0 !important; padding-bottom: 4px !important; }
.studio.layout-edit .field-outer #st-tl-drop { padding-bottom: 8px !important; }
.studio.layout-edit .studio-tl-head { margin-bottom: 0 !important; }
/* へんしゅうしつ：びょうすうと ゲージの 行は なくす（30びょうを こえた ときの けいこくだけ のこす） */
.studio.layout-edit .studio-tl-head { display: none !important; }
.studio.layout-edit #st-limitbar .cut-limit-track { display: none !important; }
.studio.layout-edit #st-limitbar:not(:has(.tl-over-warn)) { display: none !important; }
.studio.layout-edit #st-limitbar { grid-column: 1 / -1 !important; margin: 0 0 6px !important; }
.studio.layout-edit .field-outer #st-tl-drop { padding-top: 8px !important; }

/* ==== えいぞうを へんしゅうする ボタン：プレビューの 右の あいている ところ ==== */
@media (min-width: 901px) {
  .studio.layout-edit .studio-bottom.edit-zone { position: relative; }
  .studio.layout-edit .field-outer #st-tl-drop { padding-right: 14px !important; }
  .studio.layout-edit .studio-bottom.edit-zone > .tl-edit-toggle { position: absolute; right: auto; transform: translateY(-50%); width: 168px; min-height: 180px; gap: 6px; }
  .studio.layout-edit .studio-bottom.edit-zone > .tl-edit-toggle:active { transform: translateY(calc(-50% + 3px)); }
  .studio.layout-edit .studio-bottom.edit-zone > .tl-edit-toggle .tl-edit-ic { font-size: 2.6rem; }
  .studio.layout-edit .studio-bottom.edit-zone > .tl-edit-toggle b { font-size: 1.15rem; }
  .studio.layout-edit .studio-bottom.edit-zone > .tl-edit-toggle small { font-size: 0.74rem; }
  /* ひらいて いる とき：へんしゅうの わくの 右上に ちいさく「とじる」 */
  .studio.layout-edit.edit-open .studio-bottom.edit-zone > .tl-edit-toggle { top: 8px !important; right: 10px !important; left: auto !important; transform: none; width: auto; min-height: 0; flex-direction: row; gap: 4px; padding: 4px 12px; border-width: 2px; border-radius: 999px; z-index: 6; box-shadow: 0 3px 0 #1d2125; }
  .studio.layout-edit.edit-open .studio-bottom.edit-zone > .tl-edit-toggle:active { transform: translateY(2px); }
  .studio.layout-edit.edit-open .studio-bottom.edit-zone > .tl-edit-toggle .tl-edit-ic { font-size: 0.9rem; }
  .studio.layout-edit.edit-open .studio-bottom.edit-zone > .tl-edit-toggle b { font-size: 0.8rem; }
  .studio.layout-edit.edit-open .studio-bottom.edit-zone > .tl-edit-toggle br { display: none; }
}
/* タイムライン：えらんで いる カットには「✕ はずす」を 出す（番組素材も） */
.studio .tl-card.selected > .tl-card-del { display: flex !important; top: 30px !important; right: 8px !important; width: auto !important; height: 26px !important; padding: 0 10px !important; border-radius: 999px !important; border-width: 2px !important; gap: 3px; font-size: 0.74rem !important; white-space: nowrap; z-index: 4; }
.studio .tl-card.selected > .tl-card-del::after { content: '外す'; }
/* はずした カットを もどす ボタン（みどり） */
.tl-restore-add { border-color: #69db7c; background: rgba(105, 219, 124, 0.12); color: #d3f9d8; }
.tl-restore-add:hover { background: rgba(105, 219, 124, 0.22); }
.brand-pick { overflow-y: auto; }
.restore-pick { border-color: #69db7c; }
.restore-pick .brand-pick-go { background: linear-gradient(180deg, #8ce99a, #40c057); color: #0b3d16; }
.brand-pick-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* へんしゅうの わくを 出す ときの アニメーションは なくす（ちらつき たいさく） */
.studio.layout-edit.edit-open .studio-bottom.edit-zone .inout,
.studio.layout-edit.edit-open .studio-bottom.edit-zone .inout-empty { animation: none !important; }
/* ==== おんがくの 帯（タイムライン・オンエア） ==== */
.studio #st-timeline { position: relative; }
.studio #st-timeline.has-bgm { padding-bottom: 34px !important; }
.tl-bgm-lane { position: absolute; bottom: 6px; height: 24px; display: flex; align-items: center; gap: 6px; padding: 0 10px; border-radius: 999px; border: 2px solid #fff; background: linear-gradient(90deg, #7048e8, #ae3ec9); color: #fff; font: inherit; font-size: 0.74rem; cursor: pointer; overflow: hidden; white-space: nowrap; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35); z-index: 2; }
.tl-bgm-lane:hover { filter: brightness(1.1); }
.tl-bgm-lane .tl-bgm-ic { font-size: 0.95rem; }
.tl-bgm-lane b { font-weight: 900; font-size: 0.82rem; }
.tl-bgm-lane small { font-weight: 800; opacity: 0.85; }
.tl-bgm-wave { flex: 1; min-width: 20px; height: 10px; opacity: 0.55; background: repeating-linear-gradient(90deg, #fff 0 2px, transparent 2px 6px); -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 30%, #000 70%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0, #000 30%, #000 70%, transparent 100%); }
.tl-bgm-lane .tl-bgm-end { font-weight: 900; font-size: 0.68rem; opacity: 0.9; }
.oa-bgm-line { display: flex; align-items: center; gap: 6px; margin-top: 6px; padding: 3px 10px; border-radius: 999px; background: linear-gradient(90deg, #7048e8, #ae3ec9); color: #fff; font-size: 0.78rem; white-space: nowrap; overflow: hidden; }
.oa-bgm-line b { font-weight: 900; }

/* ==== シール 3まいまで ==== */
.inout-fx-kind.sticker { position: relative; }
.inout-fx-kind.sticker .fx-n { position: absolute; top: -6px; left: -6px; z-index: 3; width: 20px; height: 20px; border-radius: 50%; background: #e64980; color: #fff; border: 2px solid #fff; font-style: normal; font-size: 0.7rem; font-weight: 900; display: grid; place-items: center; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35); }
.inout-fx-kind.sticker:disabled { opacity: 0.4; cursor: default; }
.tl-card-stickers { position: absolute; right: 4px; bottom: 4px; display: flex; gap: 2px; z-index: 2; }
.tl-card-stickers .tl-card-sticker.mini { position: relative !important; inset: auto !important; width: 26px !important; height: 26px !important; min-width: 0 !important; padding: 0 !important; transform: none !important; }
.tl-card-stickers .tl-card-sticker.mini .st-face { font-size: 0.85rem; justify-content: center; }
.tl-card-stickers .tl-card-sticker.mini .st-face b { margin: 0; }

/* ==== へんしゅうしつ：おんがく ==== */
.inout-bgm-wrap { display: flex; flex-direction: column; gap: 8px; border-top: 2px dashed rgba(255, 212, 59, 0.35); padding-top: 10px; }
.studio.layout-edit .studio-bottom.edit-zone .inout .inout-bgm-wrap { order: 40; }
.inout-bgm-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.inout-bgm { display: flex; align-items: center; justify-content: center; gap: 5px; min-height: 40px; padding: 6px 8px; border-radius: 12px; border: 2px solid rgba(255, 255, 255, 0.35); background: rgba(255, 255, 255, 0.08); color: #fff; font: inherit; font-size: 0.85rem; font-weight: 900; cursor: pointer; }
.inout-bgm span { font-size: 1.15rem; line-height: 1; }
.inout-bgm:hover { background: rgba(255, 255, 255, 0.16); }
.inout-bgm.selected { background: linear-gradient(180deg, #ffe066, #fab005); color: #3b2a00; border-color: #fff; box-shadow: 0 3px 0 #b07800; }
.inout-bgm-vol { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 0.8rem; font-weight: 900; color: #dbe4ff; }
.inout-bgm-vol button { padding: 5px 12px; border-radius: 999px; border: 2px solid rgba(255, 255, 255, 0.35); background: transparent; color: #fff; font: inherit; font-size: 0.78rem; font-weight: 900; cursor: pointer; }
.inout-bgm-vol button.selected { background: #fff; color: #1b2466; border-color: #fff; }

/* へんしゅうの わくを ひらいた とき：右上の「とじる」は 見出しと おなじ ぎょうに ならべる（上の すきまは つくらない） */
@media (min-width: 901px) {
  .studio.layout-edit.edit-open .studio-bottom.edit-zone .inout { padding-top: 0 !important; }
  .studio.layout-edit.edit-open .studio-bottom.edit-zone .inout-trim-title { max-width: calc(100% - 160px); white-space: nowrap; overflow: hidden; flex-shrink: 0; align-items: center !important; }
  .studio.layout-edit.edit-open .studio-bottom.edit-zone .inout-trim-title small { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
}

/* ==== GENERATED: fx layers (scripts/gen_fx_css.py) ==== */
.cut-preview-screen.vfx-mono > video, .cut-preview-screen.vfx-mono > .studio-still {filter: grayscale(1) contrast(1.05); }
.cut-preview-screen.vfx-sepia > video, .cut-preview-screen.vfx-sepia > .studio-still {filter: sepia(0.9) contrast(1.05) brightness(0.95); }
.cut-preview-screen.vfx-vivid > video, .cut-preview-screen.vfx-vivid > .studio-still {filter: saturate(1.8) contrast(1.12); }
.cut-preview-screen.vfx-zoom > video, .cut-preview-screen.vfx-zoom > .studio-still {animation: fx-zoom var(--fx-dur, 3s) linear forwards; }
.cut-preview-screen.vfx-shake > video, .cut-preview-screen.vfx-shake > .studio-still {animation: fx-shake 0.55s ease-out; }
.st-fx-layer.fxl-fade {background: #000; animation: fx-fade 0.9s ease-out forwards; }
.st-fx-layer.fxl-flash {background: #fff; animation: fx-fade 0.45s ease-out forwards; }
.st-fx-layer.fxl-cool {opacity: 1; background: rgba(77, 171, 247, 0.28); }
.cut-preview-screen.vfx-cool > video, .cut-preview-screen.vfx-cool > .studio-still {filter: saturate(0.85) brightness(1.05); }
.st-fx-layer.fxl-warm {opacity: 1; background: rgba(255, 146, 43, 0.25); }
.cut-preview-screen.vfx-warm > video, .cut-preview-screen.vfx-warm > .studio-still {filter: saturate(1.15) brightness(1.05); }
.cut-preview-screen.vfx-dream > video, .cut-preview-screen.vfx-dream > .studio-still {filter: blur(1px) saturate(1.3) brightness(1.1); }
.st-fx-layer.fxl-dream {opacity: 1; background: radial-gradient(ellipse at 50% 50%, transparent 45%, rgba(255, 222, 235, 0.75) 100%); }
.cut-preview-screen.vfx-night > video, .cut-preview-screen.vfx-night > .studio-still {filter: brightness(0.6) saturate(0.85); }
.st-fx-layer.fxl-night {opacity: 1; background: rgba(25, 40, 110, 0.35); }
.cut-preview-screen.vfx-zoomout > video, .cut-preview-screen.vfx-zoomout > .studio-still {animation: fx-zoomout var(--fx-dur, 3s) linear forwards; }
.cut-preview-screen.vfx-sway > video, .cut-preview-screen.vfx-sway > .studio-still {animation: fx-sway 2.4s ease-in-out infinite; }
.cut-preview-screen.vfx-spin > video, .cut-preview-screen.vfx-spin > .studio-still {animation: fx-spin 0.8s ease-out; }
.cut-preview-screen.vfx-slide > video, .cut-preview-screen.vfx-slide > .studio-still {animation: fx-slide 0.6s cubic-bezier(.2, .9, .3, 1); }
.cut-preview-screen.vfx-bounce > video, .cut-preview-screen.vfx-bounce > .studio-still {animation: fx-bounce 0.9s ease-out; }
.st-fx-layer.fxl {overflow: hidden; }
.st-fx-layer.fxl-sparkle, .st-fx-layer.fxl-hearts, .st-fx-layer.fxl-snow, .st-fx-layer.fxl-sakura, .st-fx-layer.fxl-confetti, .st-fx-layer.fxl-clap, .st-fx-layer.fxl-spot, .st-fx-layer.fxl-focus, .st-fx-layer.fxl-hanamaru, .st-fx-layer.fxl-hatena, .st-fx-layer.fxl-bikkuri {opacity: 1; animation: none; }
.st-fx-layer.fxl-sparkle::before {content: '✨　　　　✨　　　　　✨'; top: 8%; left: 6%; font-size: 6cqw; animation: fx-twinkle 1.2s ease-in-out infinite; }
.st-fx-layer.fxl-sparkle::after {content: '　✨　　　　　✨　　　✨'; bottom: 18%; left: 4%; font-size: 5cqw; animation: fx-twinkle 1.2s ease-in-out 0.6s infinite; }
.st-fx-layer.fxl-hearts::before {content: '💕　　　💗　　　　💖　　💕'; left: 4%; bottom: -10%; font-size: 6cqw; animation: fx-rise 3s linear infinite; }
.st-fx-layer.fxl-hearts::after {content: '　　💗　　　💕　　　　💗'; left: 10%; bottom: -10%; font-size: 4.5cqw; animation: fx-rise 3s linear 1.5s infinite; }
.st-fx-layer.fxl-snow {background-image: radial-gradient(circle, #fff 0 1.6px, transparent 2.4px), radial-gradient(circle, rgba(255,255,255,.8) 0 1px, transparent 1.8px); background-size: 46px 46px, 28px 28px; background-position: 0 0, 13px 7px; animation: fx-snow 6s linear infinite !important; }
.st-fx-layer.fxl-sakura::before {content: '🌸　　　🌸　　　　🌸　　🌸'; top: -12%; left: 2%; font-size: 4.5cqw; animation: fx-fall 4s linear infinite; }
.st-fx-layer.fxl-sakura::after {content: '　　🌸　　　　🌸　　　🌸'; top: -12%; left: 8%; font-size: 3.6cqw; animation: fx-fall 4s linear 2s infinite; }
.st-fx-layer.fxl-confetti {background-image: radial-gradient(circle, #ff6b6b 0 3px, transparent 4px), radial-gradient(circle, #ffd43b 0 3px, transparent 4px), radial-gradient(circle, #51cf66 0 3px, transparent 4px), radial-gradient(circle, #4dabf7 0 3px, transparent 4px); background-size: 70px 70px, 90px 90px, 60px 60px, 80px 80px; background-position: 0 0, 30px 20px, 50px 40px, 10px 60px; animation: fx-snow 3s linear infinite !important; }
.st-fx-layer.fxl-confetti::before {content: '🎉'; left: 4%; top: 6%; font-size: 10cqw; animation: fx-pop 0.6s cubic-bezier(.2, 1.6, .4, 1) both; }
.st-fx-layer.fxl-confetti::after {content: '🎊'; right: 4%; top: 6%; font-size: 10cqw; animation: fx-pop 0.6s cubic-bezier(.2, 1.6, .4, 1) 0.15s both; }
.st-fx-layer.fxl-clap::before {content: '👏　　　👏　　　👏'; left: 50%; bottom: 6%; font-size: 7cqw; transform: translateX(-50%); animation: fx-clap 0.5s ease-in-out infinite alternate; }
.st-fx-layer.fxl-spot {background: radial-gradient(circle at 50% 50%, transparent 0 22%, rgba(0, 0, 0, 0.78) 42%); animation: fx-spot 1s ease-out both !important; }
.st-fx-layer.fxl-focus {background: repeating-conic-gradient(from 0deg at 50% 50%, transparent 0 5deg, rgba(255, 255, 255, 0.85) 5deg 6deg); -webkit-mask-image: radial-gradient(circle, transparent 30%, #000 62%); mask-image: radial-gradient(circle, transparent 30%, #000 62%); animation: fx-focus 0.25s steps(2) infinite !important; }
.st-fx-layer.fxl-hanamaru::after {content: '💮'; right: 5%; top: 6%; font-size: 20cqw; animation: fx-pop 0.6s cubic-bezier(.2, 1.6, .4, 1) both; }
.st-fx-layer.fxl-hatena::after {content: '❓'; right: 6%; top: 8%; font-size: 16cqw; animation: fx-pop 0.5s cubic-bezier(.2, 1.6, .4, 1) both, fx-bob 1.4s ease-in-out 0.5s infinite; }
.st-fx-layer.fxl-bikkuri::after {content: '❗'; right: 7%; top: 8%; font-size: 16cqw; animation: fx-pop 0.4s cubic-bezier(.2, 1.6, .4, 1) both, fx-jolt 0.6s 0.4s; }
.st-fx-layer.fxl-hanamaru::after, .st-fx-layer.fxl-hatena::after, .st-fx-layer.fxl-bikkuri::after {top: 34% !important; right: 5% !important; }
.st-fx-layer.fxl-confetti::after {top: 34% !important; }
.st-fx-layer.fxl-focus {animation: none !important; }
/* ==== END GENERATED fx layers ==== */

/* スタンプ（はなまる・はてな・びっくり）を 何まいも はった ときの ばしょ。
   applyFxToScreen（app.js）が fxl-slot-r / l / t を つける。生成ブロックの !important より つよく する。 */
.st-fx-layer.fxl.fxl-slot-r::after { top: 34% !important; right: 5% !important; left: auto !important; }
.st-fx-layer.fxl.fxl-slot-l::after { top: 34% !important; left: 5% !important; right: auto !important; }
.st-fx-layer.fxl.fxl-slot-t::after { top: 4% !important; left: 50% !important; right: auto !important; font-size: 11cqw !important; translate: -50% 0; }

/* 撮影画面：とる ボタンは 下の 1行 ぜんぶ。とじるは 右の「とりかた」の 見出しの 右に */
.studio-camera .cam-bottom-row.cam-rec-row { display: flex; }
.studio-camera .cam-bottom-row.cam-rec-row > .studio-rec-btn { flex: 1 1 auto; width: 100%; max-width: none; justify-content: center; }
#cam-review .cam-bottom-row { grid-template-columns: 1fr auto auto 1fr; }
.cam-guide-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cam-guide-head .cam-guide-title { flex: 1 1 auto; min-width: 0; }
.studio-camera .cam-guide-head .cam-close-corner { flex: 0 0 auto; min-height: 40px; padding: 0 14px; font-size: 0.95rem; white-space: nowrap; }

/* 先生：授業の 素材（生徒が使える素材） */
.tmat-dialog { width: min(620px, 100%); max-height: calc(100vh - 32px); overflow: auto; }
.tmat-lead { margin: 0; font-size: 0.85rem; color: #495057; line-height: 1.6; }
.tmat-list { display: flex; flex-direction: column; gap: 8px; }
.tmat-item { display: flex; align-items: center; gap: 12px; padding: 8px; border: 1px solid #e9ecef; border-radius: 12px; background: #f8f9fa; }
.tmat-thumb { width: 128px; aspect-ratio: 16 / 9; flex: 0 0 auto; border-radius: 8px; background: #212529; object-fit: cover; }
.tmat-info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.tmat-name { width: 100%; padding: 6px 8px; border: 1px solid #dee2e6; border-radius: 8px; font: inherit; font-weight: 800; }
.tmat-info small { color: #868e96; font-weight: 700; }
.tmat-del { flex: 0 0 auto; padding: 6px 12px; border-radius: 8px; border: 1px solid #ffc9c9; background: #fff; color: #e03131; font: inherit; font-size: 0.8rem; font-weight: 800; cursor: pointer; }
.tmat-del:hover { background: #fff5f5; }
.tmat-empty { padding: 18px; border: 2px dashed #dee2e6; border-radius: 12px; text-align: center; color: #868e96; font-weight: 700; }
.tmat-add { flex-direction: row !important; justify-content: center; padding: 12px; border: 2px dashed #74c0fc; border-radius: 12px; background: #e7f5ff; color: #1971c2 !important; font-size: 0.95rem !important; cursor: pointer; }
.tmat-add:hover { background: #d0ebff; }
.tmat-add.disabled { pointer-events: none; opacity: 0.45; }
.tmat-status { min-height: 1.2em; font-size: 0.85rem; font-weight: 700; color: #1971c2; }
@media (max-width: 560px) { .tmat-thumb { width: 88px; } .tmat-item { flex-wrap: wrap; } }
.tmat-status { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.tmat-up { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 8px; background: #f1f3f5; font-size: 0.82rem; font-weight: 700; color: #495057; }
.tmat-up-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tmat-up-msg { flex: 0 0 auto; }
.tmat-up.busy { background: #e7f5ff; color: #1971c2; }
.tmat-up.done { background: #ebfbee; color: #2b8a3e; }
.tmat-up.fail { background: #fff5f5; color: #c92a2a; }
.tmat-up.fail .tmat-up-msg { flex: 1 1 auto; white-space: normal; }

/* タイムラインの カード：ながい なまえは「…」で きって、カードから はみださない（全文は マウスを のせると 出る） */
.studio .tl-card .tl-card-top { min-width: 0; overflow: hidden; }
.studio .tl-card .tl-card-name { flex: 1 1 auto; min-width: 0; overflow: hidden !important; text-overflow: ellipsis !important; white-space: nowrap; }
.studio .tl-card .tl-card-top > .cut-tl-num, .studio .tl-card .tl-card-top > .tl-card-sec { flex: 0 0 auto; }
/* 「▶ さいせいちゅう」が タイムラインの 上で きれない よう、上に すきまを とる（カードは 6px うき、バッジは さらに 14px 上） */
.studio #st-timeline { padding-top: 26px !important; }

/* タイムラインの そざい ボタン：せんせい・じぶん は いろを かえる */
.tl-brand-add.tl-teacher-add { border-color: #ff8fab; }
.tl-brand-add.tl-teacher-add:hover { background: rgba(255, 143, 171, 0.2); }
.tl-brand-add.tl-own-add { border-color: #63e6be; }
.tl-brand-add.tl-own-add:hover { background: rgba(99, 230, 190, 0.2); }
/* そざいの えらぶ まど：じぶんの そざいは アップロードと けす */
.brand-pick { max-height: calc(100vh - 16px); overflow: auto; }
.brand-pick-row { display: flex; align-items: stretch; gap: 6px; }
.brand-pick-row > .brand-pick-item { flex: 1 1 auto; min-width: 0; }
.brand-pick-body b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-pick-del { flex: 0 0 auto; width: 40px; border-radius: 12px; border: 2px solid #ffc9c9; background: #fff; font-size: 1rem; cursor: pointer; }
.brand-pick-del:hover { background: #fff5f5; }
.brand-pick-empty { padding: 14px; border: 2px dashed #dee2e6; border-radius: 12px; text-align: center; color: #868e96; font-weight: 800; font-size: 0.85rem; }
.own-upload { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-bottom: 8px; padding: 12px; border: 2px dashed #20c997; border-radius: 12px; background: #e6fcf5; color: #087f5b; font-weight: 900; cursor: pointer; }
.own-upload:hover { background: #c3fae8; }
.own-upload small { font-size: 0.72rem; font-weight: 700; opacity: 0.85; }
.own-upload-status { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.own-upload-status:empty { display: none; }
.own-upload-status li { display: flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 8px; background: #f1f3f5; font-size: 0.78rem; }
.own-upload-status li b { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.own-upload-status li small { flex: 0 0 auto; font-weight: 800; color: #495057; }
.pcard.own-upload-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 220px; border: 3px dashed #63e6be; background: rgba(99, 230, 190, 0.12); color: #fff; font: inherit; text-align: center; cursor: pointer; }
.pcard.own-upload-card:hover { background: rgba(99, 230, 190, 0.25); }
.own-upload-card-ic { font-size: 2.2rem; line-height: 1; }
.own-upload-card b { font-size: 1rem; font-weight: 900; line-height: 1.3; }
.own-upload-card small { font-size: 0.72rem; font-weight: 700; opacity: 0.9; line-height: 1.4; }

/* ==== 【中級】きかく：入力フォーム ＋ AIが はじめ・なか・おわりに わける ==== */
.mp { max-width: 980px; margin: 0 auto; padding: 8px 16px 24px; }
.mp-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; padding: 20px; border-radius: 20px; background: #fff; box-shadow: 0 4px 16px rgba(120, 80, 0, 0.12); }
.mp-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mp-field label { display: flex; align-items: center; gap: 8px; font-size: 0.95rem; color: #3b2a00; }
.mp-req { font-style: normal; padding: 1px 8px; border-radius: 999px; background: #e03131; color: #fff; font-size: 0.7rem; font-weight: 900; }
.mp-field input, .mp-field textarea { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 2px solid #ffd43b; border-radius: 12px; font: inherit; font-size: 1rem; font-weight: 700; background: #fffdf0; resize: vertical; }
.mp-field input:focus, .mp-field textarea:focus { outline: none; border-color: #fab005; box-shadow: 0 0 0 3px rgba(250, 176, 5, 0.25); background: #fff; }
.mp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mp-chip { padding: 4px 10px; border-radius: 999px; border: 1px solid #ffe066; background: #fff9db; font: inherit; font-size: 0.78rem; font-weight: 800; color: #5c3c00; cursor: pointer; }
.mp-chip:hover { background: #ffec99; }
.mp-items-field { grid-column: 1 / -1; padding: 14px; border-radius: 16px; background: #fff4e6; border: 2px dashed #ffa94d; }
.mp-sub { color: #7a4d00; font-weight: 700; }
.mp-items { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mp-item-row { display: flex; align-items: center; gap: 8px; }
.mp-item-no { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #ff922b; color: #fff; font-weight: 900; }
.mp-item-row .mp-item { flex: 1 1 auto; min-width: 0; padding: 10px 12px; border: 2px solid #ffc078; border-radius: 12px; font: inherit; font-size: 1rem; font-weight: 700; background: #fff; }
.mp-item-x { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 10px; border: 1px solid #ffc9c9; background: #fff; color: #e03131; font-weight: 900; cursor: pointer; }
.mp-item-x:disabled { opacity: 0.35; cursor: default; }
.mp-add { align-self: flex-start; margin-top: 4px; padding: 8px 14px; border-radius: 10px; border: 2px dashed #ff922b; background: #fff; color: #d9480f; font: inherit; font-weight: 900; cursor: pointer; }
.mp-add:disabled { opacity: 0.4; cursor: default; }
.mp-confirm { grid-column: 1 / -1; padding: 16px; border: 0; border-radius: 16px; background: linear-gradient(180deg, #51cf66, #2f9e44); color: #fff; font: inherit; font-size: 1.15rem; font-weight: 900; box-shadow: 0 5px 0 #2b8a3e; cursor: pointer; }
.mp-confirm:active { transform: translateY(3px); box-shadow: 0 2px 0 #2b8a3e; }
.mp-confirm:disabled { background: #adb5bd; box-shadow: 0 5px 0 #868e96; cursor: wait; }
.mp-hint { grid-column: 1 / -1; margin: 0; text-align: center; font-weight: 800; color: #c92a2a; }
.mp-hint.ok { color: #2b8a3e; }
.mp-result { margin-top: 18px; padding: 18px; border-radius: 20px; background: #fff; box-shadow: 0 4px 16px rgba(120, 80, 0, 0.12); }
.mp-result-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.mp-result-head b { font-size: 1.1rem; }
.mp-result-head span { color: #495057; font-weight: 700; }
.mp-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.mp-col { border-radius: 16px; padding: 10px; min-width: 0; }
.mp-col-hajime { background: #e7f5ff; border: 2px solid #74c0fc; }
.mp-col-naka { background: #fff9db; border: 2px solid #ffd43b; }
.mp-col-owari { background: #fff0f6; border: 2px solid #faa2c1; }
.mp-col-head { display: flex; align-items: baseline; gap: 6px; margin-bottom: 8px; }
.mp-col-head b { font-size: 1.1rem; }
.mp-col-head small { color: #495057; font-weight: 700; }
.mp-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.mp-col li { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 10px; background: #fff; font-weight: 800; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); }
.mp-col li.mp-empty { justify-content: center; color: #adb5bd; background: transparent; box-shadow: none; }
.mp-chip-text { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.mp-move { flex: 0 0 auto; display: flex; gap: 4px; }
.mp-move button { width: 30px; height: 30px; border-radius: 8px; border: 1px solid #dee2e6; background: #f8f9fa; font-size: 0.8rem; cursor: pointer; }
.mp-move button:hover { background: #e9ecef; }
.mp-result-note { margin: 12px 0 0; text-align: center; color: #495057; font-weight: 700; font-size: 0.85rem; }
@media (max-width: 760px) {
  .mp-form { grid-template-columns: 1fr; }
  .mp-cols { grid-template-columns: 1fr; }
}
/* 【中級】きかく：生徒が はじめ・なか・おわりに わけて かく ＋ プロの チェック */
.mp-secs-field { grid-column: 1 / -1; }
.mp-sec { border-radius: 16px; padding: 10px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.mp-sec .mp-item-row .mp-item { font-size: 0.92rem; padding: 8px 10px; }
.mp-sec .mp-item-no { width: 24px; height: 24px; font-size: 0.8rem; }
.mp-col-hajime .mp-item-no { background: #339af0; }
.mp-col-naka .mp-item-no { background: #f59f00; }
.mp-col-owari .mp-item-no { background: #e64980; }
.mp-sec .mp-add { margin-top: 0; padding: 6px 10px; font-size: 0.85rem; }
.mp-check { background: linear-gradient(180deg, #845ef7, #5f3dc4); box-shadow: 0 5px 0 #4c2fa0; }
.mp-check:active { box-shadow: 0 2px 0 #4c2fa0; }
.mp-check:disabled { background: #adb5bd; box-shadow: 0 5px 0 #868e96; cursor: not-allowed; }
.mp-advice { margin-top: 18px; padding: 18px 20px; border-radius: 20px; background: #f3f0ff; border: 3px solid #b197fc; box-shadow: 0 4px 16px rgba(95, 61, 196, 0.15); }
.mp-advice-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.mp-advice-ic { font-size: 1.6rem; }
.mp-advice-head b { font-size: 1.15rem; color: #5f3dc4; }
.mp-advice-head small { color: #7950f2; font-weight: 700; }
.mp-advice-good { margin: 0 0 8px; padding: 8px 12px; border-radius: 12px; background: #fff; font-weight: 800; color: #2b8a3e; }
.mp-advice-tips { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.mp-advice-tips li { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: 12px; background: #fff; font-weight: 800; line-height: 1.5; }
.mp-advice-sec { flex: 0 0 auto; padding: 1px 8px; border-radius: 999px; font-size: 0.75rem; font-weight: 900; color: #fff; background: #7950f2; }
.mp-advice-sec.sec-hajime { background: #339af0; }
.mp-advice-sec.sec-naka { background: #f59f00; }
.mp-advice-sec.sec-owari { background: #e64980; }
.mp-advice-note { margin: 10px 0 0; font-size: 0.82rem; font-weight: 700; color: #5f3dc4; }
.mp-advice-stale-note { display: none; margin: 8px 0 0; font-size: 0.82rem; font-weight: 800; color: #e8590c; }
.mp-advice.stale { opacity: 0.75; }
.mp-advice.stale .mp-advice-stale-note { display: block; }
/* はじめ → なか → おわり は 上から 下へ（入力らんを ひろく） */
.mp-secs-field .mp-cols { grid-template-columns: 1fr; gap: 10px; }
.mp-sec { display: grid; grid-template-columns: 150px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; row-gap: 6px; align-items: start; }
.mp-sec .mp-col-head { grid-row: 1 / span 2; flex-direction: column; align-items: flex-start; gap: 2px; margin: 0; padding-top: 4px; }
.mp-sec .mp-items { grid-column: 2; margin: 0; }
.mp-sec .mp-add { grid-column: 2; }
@media (max-width: 640px) { .mp-sec { grid-template-columns: 1fr; } .mp-sec .mp-col-head { grid-row: auto; flex-direction: row; align-items: baseline; } .mp-sec .mp-items, .mp-sec .mp-add { grid-column: 1; } }
/* 【中級】アドバイスを もとに なおす */
.mp-fix { margin-top: 10px; width: 100%; padding: 12px; border: 0; border-radius: 14px; background: linear-gradient(180deg, #ff922b, #e8590c); color: #fff; font: inherit; font-size: 1.05rem; font-weight: 900; box-shadow: 0 4px 0 #c2410c; cursor: pointer; }
.mp-fix:active { transform: translateY(3px); box-shadow: 0 1px 0 #c2410c; }
.mp-fix:disabled { background: #adb5bd; box-shadow: 0 4px 0 #868e96; cursor: wait; }
.mp-fixed { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: #fff4e6; border: 2px solid #ffa94d; }
.mp-fixed[hidden] { display: none; }
.mp-fixed-ic { font-size: 1.4rem; }
.mp-fixed > div { flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; }
.mp-fixed b { color: #d9480f; }
.mp-fixed small { color: #5c3c00; font-weight: 700; }
.mp-fixed button { flex: 0 0 auto; padding: 8px 12px; border-radius: 10px; border: 1px solid #ffc078; background: #fff; font: inherit; font-weight: 900; color: #d9480f; cursor: pointer; }
.mp-item-row.fixed .mp-item { border-color: #ff922b; background: #fff4e6; box-shadow: 0 0 0 3px rgba(255, 146, 43, 0.2); }
/* 【中級】きかく：画面の 幅を ひろく つかう（ひろい 画面では 入力らんを 3れつ） */
.mp { max-width: none; width: 100%; box-sizing: border-box; padding: 8px 24px 24px; }
@media (min-width: 1200px) {
  .mp-form { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 22px; padding: 24px 28px; }
}
/* 【中級】1ぎょう＝1カット：うつすもの と ナレーションを わけて かく */
.mp-cut-row { align-items: flex-end; }
.mp-cut-field { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mp-cut-field > span { font-size: 0.72rem; font-weight: 900; color: #495057; }
.mp-cut-field .mp-item { width: 100%; box-sizing: border-box; }
.mp-cut-field:first-of-type { flex: 0.8 1 0; }
/* 番号と ✕ は 入力らん（高さ 42px）の まんなかに そろえる */
.mp-cut-row .mp-item-no { margin-bottom: 9px; }
.mp-cut-row .mp-item-x { margin-bottom: 3px; }
@media (max-width: 640px) { .mp-cut-row { flex-wrap: wrap; } .mp-cut-field { flex: 1 1 100%; } }
/* カードの 黄色い おび：「🎥 うつすもの」の ラベル（ナレーションの ラベルと おなじ かたち） */
.pcard-pick-why, .pcard-pick-why.is-ai { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.pcard-shot-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 0.82rem; font-weight: 900; color: #fff; background: #f08c00; border-radius: 999px; padding: 2px 10px; line-height: 1.3; }
.tablet-compact .pcard-shot-tag { font-size: 0.72rem; }

/* カードの ナレーション：その場で かきかえる */
.pcard-narr-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.pcard-narr-edit { flex: 0 0 auto; padding: 2px 10px; border-radius: 999px; border: 2px solid #e8590c; background: #fff; color: #e8590c; font: inherit; font-size: 0.75rem; font-weight: 900; cursor: pointer; }
.pcard-narr-edit:hover { background: #fff4e6; }
.pcard-narr-input { width: 100%; box-sizing: border-box; margin-top: 4px; padding: 6px 8px; border: 2px solid #ffa94d; border-radius: 8px; font: inherit; font-size: 0.95rem; font-weight: 800; line-height: 1.4; resize: vertical; background: #fff; }
.pcard-narr-input:focus { outline: none; border-color: #e8590c; box-shadow: 0 0 0 3px rgba(232, 89, 12, 0.2); }
.pcard-narr-btns { display: flex; justify-content: flex-end; gap: 6px; margin-top: 4px; }
.pcard-narr-btns button { padding: 4px 12px; border-radius: 8px; font: inherit; font-size: 0.8rem; font-weight: 900; cursor: pointer; }
.pcard-narr-cancel { border: 1px solid #ced4da; background: #fff; color: #495057; }
.pcard-narr-save { border: 0; background: #2f9e44; color: #fff; }

/* カードの いろ：はじめ（あお）・なか（きいろ）・おわり（ピンク）の 色を さいしょから つける（撮る まえも） */
.deck-zone-group.zone-はじめ .pcard.pcard:not(.bcard) { --c1: #74c0fc; --c2: #1c7ed6; --c3: #e7f5ff; filter: none; }
.deck-zone-group.zone-なか .pcard.pcard:not(.bcard) { --c1: #ffd43b; --c2: #f59f00; --c3: #fff9db; filter: none; }
.deck-zone-group.zone-おわり .pcard.pcard:not(.bcard) { --c1: #faa2c1; --c2: #d6336c; --c3: #fff0f6; filter: none; }
.deck-zone-group:is(.zone-はじめ, .zone-なか, .zone-おわり) .pcard.pcard:not(.bcard) > * { filter: none; }
/* カットパック：でてきた カットを 見てから 自分で すすむ ボタン */
.qpk-next { position: relative; z-index: 5; margin-top: 18px; padding: 14px 28px; border: 0; border-radius: 999px; background: linear-gradient(180deg, #ff922b, #e8590c); color: #fff; font: inherit; font-size: 1.15rem; font-weight: 900; box-shadow: 0 5px 0 #c2410c, 0 8px 20px rgba(0, 0, 0, 0.35); cursor: pointer; opacity: 0; animation: qpk-next-in 0.5s ease-out 2.4s forwards; }
.qpk-next:active { transform: translateY(3px); box-shadow: 0 2px 0 #c2410c; }
@keyframes qpk-next-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .qpk-next { animation: none; opacity: 1; } }
/* カードの「🎥 うつすもの」：ナレーションと おなじ 大きさ・よはく・文字に そろえて 見やすく */
.pcard > .pcard-pick-why.pcard-pick-why { margin-top: 8px; border: 3px solid #f59f00; border-radius: 12px; padding: 8px 12px 10px; box-shadow: 0 3px 0 #e8590c33; font-size: 1rem; line-height: 1.5; }
.pcard-pick-why .pcard-shot-text { margin: 3px 0 0; font-size: 1.12rem; font-weight: 900; line-height: 1.5; color: #212529; }
.tablet-compact .pcard > .pcard-pick-why.pcard-pick-why { margin-top: 4px; padding: 5px 9px 7px; border-width: 2px; }
.tablet-compact .pcard-pick-why .pcard-shot-text { font-size: 0.9rem; line-height: 1.4; }

/* ==== カットパック：ふたが パカッ では なく、ビリビリ やぶく ==== */
/* 1) やぶれめが 左から 右へ カクカク すすむ（0〜0.8びょう）。パックは こまかく ふるえる */
.qpk-seam {
  position: absolute; z-index: 5; left: -6px; top: 34px; width: calc(100% + 12px); height: 14px; opacity: 0;
  transform-origin: left center; transform: scaleX(0); pointer-events: none;
  background: #fff;
  clip-path: polygon(0 50%, 3% 0, 6% 70%, 9% 10%, 12% 80%, 15% 20%, 18% 90%, 21% 0, 24% 60%, 27% 10%, 30% 85%, 33% 20%, 36% 75%, 39% 0, 42% 70%, 45% 15%, 48% 90%, 51% 5%, 54% 65%, 57% 20%, 60% 85%, 63% 0, 66% 70%, 69% 15%, 72% 80%, 75% 5%, 78% 75%, 81% 20%, 84% 90%, 87% 0, 90% 65%, 93% 15%, 96% 80%, 100% 40%, 100% 60%, 96% 100%, 93% 35%, 90% 85%, 87% 30%, 84% 100%, 81% 40%, 78% 95%, 75% 25%, 72% 100%, 69% 35%, 66% 90%, 63% 20%, 60% 100%, 57% 40%, 54% 85%, 51% 25%, 48% 100%, 45% 35%, 42% 90%, 39% 20%, 36% 95%, 33% 40%, 30% 100%, 27% 30%, 24% 80%, 21% 20%, 18% 100%, 15% 40%, 12% 100%, 9% 30%, 6% 90%, 3% 20%, 0 70%);
  filter: drop-shadow(0 0 4px #fff) drop-shadow(0 0 10px #ffd43b);
}
.qpk-overlay.open .qpk-seam { animation: qpk-seam 0.8s steps(9, end) forwards; }
@keyframes qpk-seam { 0% { opacity: 1; transform: scaleX(0); } 92% { opacity: 1; transform: scaleX(1); } 100% { opacity: 0; transform: scaleX(1); } }
.qpk-overlay.open .qpk-pack { animation: qpk-rip-shake 0.85s linear forwards; }
@keyframes qpk-rip-shake {
  0%, 100% { transform: none; }
  8% { transform: translate(-3px, 1px) rotate(-2deg); } 16% { transform: translate(3px, -1px) rotate(2deg); }
  24% { transform: translate(-4px, 0) rotate(-3deg); } 32% { transform: translate(4px, 1px) rotate(3deg); }
  40% { transform: translate(-3px, -1px) rotate(-2deg); } 48% { transform: translate(3px, 0) rotate(2deg); }
  56% { transform: translate(-4px, 1px) rotate(-3deg); } 64% { transform: translate(4px, -1px) rotate(3deg); }
  72% { transform: translate(-3px, 0) rotate(-2deg); } 80% { transform: translate(5px, -2px) rotate(4deg); }
  90% { transform: translate(-2px, 1px) rotate(-1deg); }
}
/* 「ビリビリッ！」 */
.qpk-rip-text {
  position: absolute; z-index: 6; right: -78px; top: -34px; opacity: 0; pointer-events: none; white-space: nowrap;
  font-size: 2rem; font-weight: 900; color: #ffe066; -webkit-text-stroke: 2px #c92a2a; text-shadow: 0 4px 0 #c92a2a, 0 0 18px rgba(255, 224, 102, 0.8);
  transform: rotate(12deg) scale(0.4);
}
.qpk-overlay.open .qpk-rip-text { animation: qpk-rip-pop 1.1s ease-out 0.05s forwards; }
@keyframes qpk-rip-pop {
  0% { opacity: 0; transform: rotate(12deg) scale(0.4); }
  15% { opacity: 1; transform: rotate(8deg) scale(1.15); }
  25%, 45%, 65% { transform: rotate(14deg) scale(1) translateX(-3px); }
  35%, 55%, 75% { transform: rotate(10deg) scale(1.05) translateX(3px); }
  85% { opacity: 1; }
  100% { opacity: 0; transform: rotate(12deg) scale(1.1) translateY(-14px); }
}
/* やぶれた ときの かみくず */
.qpk-scraps { position: absolute; z-index: 5; left: 0; right: 0; top: 34px; height: 14px; pointer-events: none; }
.qpk-scraps i {
  position: absolute; top: 0; width: 12px; height: 10px; opacity: 0;
  background: linear-gradient(135deg, #e5dbff, #9775fa 50%, #f783ac);
  clip-path: polygon(0 20%, 40% 0, 100% 30%, 80% 100%, 30% 80%);
}
.qpk-scraps i:nth-child(1) { left: 6%; --dx: -60px; --dy: -70px; --r: -140deg; }
.qpk-scraps i:nth-child(2) { left: 18%; --dx: -30px; --dy: -110px; --r: 200deg; }
.qpk-scraps i:nth-child(3) { left: 30%; --dx: 10px; --dy: -90px; --r: -260deg; }
.qpk-scraps i:nth-child(4) { left: 42%; --dx: -20px; --dy: -130px; --r: 160deg; }
.qpk-scraps i:nth-child(5) { left: 54%; --dx: 30px; --dy: -100px; --r: -200deg; }
.qpk-scraps i:nth-child(6) { left: 66%; --dx: 50px; --dy: -120px; --r: 240deg; }
.qpk-scraps i:nth-child(7) { left: 78%; --dx: 70px; --dy: -80px; --r: -180deg; }
.qpk-scraps i:nth-child(8) { left: 90%; --dx: 90px; --dy: -110px; --r: 220deg; }
.qpk-overlay.open .qpk-scraps i { animation: qpk-scrap 0.7s ease-out calc(var(--k, 0) * 1s) forwards; }
.qpk-scraps i:nth-child(1) { --k: 0.05; } .qpk-scraps i:nth-child(2) { --k: 0.14; } .qpk-scraps i:nth-child(3) { --k: 0.23; } .qpk-scraps i:nth-child(4) { --k: 0.32; }
.qpk-scraps i:nth-child(5) { --k: 0.41; } .qpk-scraps i:nth-child(6) { --k: 0.5; } .qpk-scraps i:nth-child(7) { --k: 0.59; } .qpk-scraps i:nth-child(8) { --k: 0.68; }
@keyframes qpk-scrap {
  0% { opacity: 1; transform: translate(0, 0) rotate(0) scale(1); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--r)) scale(0.6); }
}
/* 2) やぶりおわったら、うえの ふちが めくれて とんでいく（0.85びょう〜） */
.qpk-overlay.open .qpk-top { transform-origin: 100% 100%; animation: qpk-rip-off 0.65s cubic-bezier(.45, .05, .6, 1) 0.85s forwards; }
@keyframes qpk-rip-off {
  0% { transform: none; opacity: 1; }
  30% { transform: translate(6px, -14px) rotate(-14deg); opacity: 1; }
  100% { transform: translate(240px, -280px) rotate(70deg) scale(0.85); opacity: 0; }
}
/* 3) ふくろが おちて、カットが でてくる（ぜんぶ 0.6びょう おそく） */
.qpk-overlay.open .qpk-body { animation: qpk-drop 0.6s ease-in 1s forwards; }
.qpk-overlay.open .qpk-glow { animation: qpk-glow-in 0.5s ease-out 0.85s forwards, qpk-spin 6s linear infinite; }
.qpk-card { animation: qpk-card-out 0.7s cubic-bezier(.2, 1.3, .4, 1) calc(1.05s + var(--i) * 0.18s) forwards; }
.qpk-card-in { animation: qpk-flip 0.55s ease-in-out calc(1.95s + var(--i) * 0.16s) forwards; }
.qpk-overlay.open .qpk-text { animation: qpk-text-pop 0.6s cubic-bezier(.2, 1.5, .4, 1) 2.6s both; }
.qpk-next { animation: qpk-next-in 0.5s ease-out 3s forwards; }
/* やぶれめ・かみくずを もっと めだたせる */
.qpk-seam { top: 30px; height: 20px; filter: drop-shadow(0 0 4px #fff) drop-shadow(0 0 12px #ffd43b) drop-shadow(0 0 22px #ff922b); }
.qpk-scraps { top: 30px; height: 20px; }
.qpk-scraps i { width: 20px; height: 16px; box-shadow: 0 0 0 2px #fff inset; }

/* ==== 撮影テイクの 未送信バッジ（弱い Wi-Fi・オフライン） ==== */
.outbox-badge { position: fixed; z-index: 1400; left: 12px; bottom: 12px; max-width: min(520px, calc(100vw - 24px)); border-radius: 16px; background: #fff; border: 3px solid #f59f00; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3); font-size: 0.85rem; color: #212529; }
.outbox-main { display: flex; align-items: center; gap: 8px; padding: 8px 10px; }
.outbox-ic { font-size: 1.4rem; }
.outbox-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.outbox-text b { font-size: 0.95rem; }
.outbox-text small { color: #495057; font-weight: 700; }
.outbox-now { flex: 0 0 auto; padding: 8px 12px; border: 0; border-radius: 10px; background: #f08c00; color: #fff; font: inherit; font-weight: 900; cursor: pointer; }
.outbox-now:disabled { background: #adb5bd; cursor: wait; }
.outbox-more { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 8px; border: 1px solid #dee2e6; background: #f8f9fa; cursor: pointer; }
.outbox-list { list-style: none; margin: 0; padding: 0 10px 10px; display: flex; flex-direction: column; gap: 6px; max-height: 40vh; overflow: auto; }
.outbox-list li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; background: #f8f9fa; }
.outbox-when { flex: 1 1 auto; min-width: 0; font-weight: 700; }
.outbox-when em { display: block; font-style: normal; font-size: 0.75rem; color: #c92a2a; }
.outbox-list button { flex: 0 0 auto; padding: 4px 10px; border-radius: 8px; border: 1px solid #ced4da; background: #fff; font: inherit; font-size: 0.8rem; font-weight: 800; cursor: pointer; }
.outbox-st { flex: 0 0 auto; padding: 1px 8px; border-radius: 999px; font-size: 0.72rem; font-weight: 900; color: #fff; background: #868e96; }
.outbox-st.st-sending { background: #1c7ed6; }
.outbox-st.st-failed { background: #f08c00; }
.outbox-st.st-blocked { background: #e03131; }
/* 撮影：カメラ きりかえ・インカメラは かがみうつし */
.studio-camera .cam-guide-head .cam-flip-btn { flex: 0 0 auto; min-height: 40px; padding: 0 12px; font-size: 0.9rem; white-space: nowrap; background: #fff; color: #1c7ed6; border-color: #74c0fc; }
.studio-camera .cam-guide-head .cam-flip-btn:hover { background: #e7f5ff; color: #1864ab; }
.studio-camera .cam-guide-head .cam-flip-btn:disabled { opacity: 0.5; }
#cam-live.mirror video { transform: scaleX(-1); }
.pcard-shot-badge.pending { background: #f08c00 !important; }
/* 【中級】きかく：「わかったこと、つたえたいこと」は 大きく、ほかの 項目と わけて */
.mp-message-field { grid-column: 1 / -1; margin-top: 4px; padding: 16px 18px; border-radius: 16px; background: #fff9db; border: 3px solid #fcc419; box-shadow: 0 3px 0 rgba(245, 159, 0, 0.25); }
.mp-message-field label b { font-size: 1.15rem; }
.mp-message-field textarea { min-height: 7.5em; font-size: 1.15rem; line-height: 1.6; background: #fff; border-color: #fab005; }
@media (min-width: 1200px) { .mp-form { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* 入力らんの 右下の「わくを ひろげる」つまみは 出さない */
.mp-field textarea, .mp-message-field textarea, .pcard-narr-input { resize: none; }

/* 【中級】きかく：1行の 入力らん（4項目・VTRの流れ）。高さを そろえ、折り返したら 自動で 広がる */
.mp-form textarea.mp-grow { display: block; width: 100%; box-sizing: border-box; min-height: 0; overflow: hidden; resize: none; line-height: 1.4; padding: 10px 12px; }
/* VTRの 流れ：表の 形の リスト */
.mp-flow { display: flex; flex-direction: column; border: 2px solid #e9ecef; border-radius: 16px; overflow: hidden; background: #fff; }
.mp-flow-head, .mp-flow-row { display: grid; grid-template-columns: 180px minmax(0, 1fr); align-items: stretch; }
.mp-flow-head { grid-template-columns: 180px minmax(0, 1fr) minmax(0, 1.4fr); background: #f1f3f5; font-size: 0.85rem; font-weight: 900; color: #495057; }
.mp-flow-head > span { padding: 8px 12px; }
.mp-flow-row { border-top: 2px solid #e9ecef; }
.mp-flow-label { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-left: 8px solid var(--flow-c, #adb5bd); }
.mp-flow-label b { display: block; font-size: 1.05rem; }
.mp-flow-label small { display: block; font-size: 0.75rem; font-weight: 700; color: #495057; }
.mp-flow-ic { font-size: 1.3rem; }
.mp-flow-row.mp-col-hajime { --flow-c: #339af0; background: #f3f9ff; }
.mp-flow-row.mp-col-naka { --flow-c: #f59f00; background: #fffcf0; }
.mp-flow-row.mp-col-owari { --flow-c: #e64980; background: #fff5f9; }
/* ふつうの 枠の 色・余白を リセット（表の 中では 行ごとに 色を つける） */
.mp-flow-row.mp-col-hajime, .mp-flow-row.mp-col-naka, .mp-flow-row.mp-col-owari { border-radius: 0; border-left: 0; border-right: 0; border-bottom: 0; padding: 0; }
.mp-flow-items { list-style: none; margin: 0; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; }
.mp-flow-cells { display: grid !important; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: 10px; align-items: start; }
.mp-flow-cells .mp-item { font-size: 1rem; font-weight: 700; border: 2px solid #dee2e6; border-radius: 10px; background: #fff; }
.mp-flow-cells .mp-item:focus { outline: none; border-color: #fab005; box-shadow: 0 0 0 3px rgba(250, 176, 5, 0.25); }
.mp-flow-cells.fixed .mp-item { border-color: #ff922b; background: #fff4e6; }
.mp-flow-cells .mp-item-x { margin: 0; }
@media (max-width: 760px) {
  .mp-flow-head { display: none; }
  .mp-flow-row { grid-template-columns: 1fr; }
  .mp-flow-cells { grid-template-columns: 1fr; }
}
/* 「目的」などの ラベル：漢字 2文字でも つぶれない 大きさに */
.pcard-purpose .pcard-badge { font-size: 1rem; line-height: 1.3; padding: 2px 12px 2px 8px; letter-spacing: 1px; }
.studio .tl-card .tl-card-purpose .pcard-badge { font-size: 0.78rem; padding: 1px 7px; }
.tablet-compact .pcard-purpose .pcard-badge { font-size: 0.88rem; }
/* カットパックの 演出の カードの うらめんも、スタジオの カードと おなじ（紺の しま＋白い まるに AI for School） */
.qpk-back { background: repeating-linear-gradient(45deg, #1d3557 0 10px, #243b6b 10px 20px); border: 4px solid #f1f3f5; box-shadow: inset 0 0 0 2px #c9a227, 0 8px 18px rgba(0, 0, 0, 0.5); }
.qpk-back .qpk-emblem { width: 58%; aspect-ratio: 1; border: 0; font-size: 0; background: #fff; }
/* 「分かったこと、伝えたいこと」：さいしょは 2行。ふえたら 自動で 広がる */
.mp-message-field textarea.mp-msg { min-height: 0; overflow: hidden; resize: none; }
/* ナレーションの 文字数（10秒で 40字まで）。こえたら 赤く「長すぎます」 */
.mp-narr-cell { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.narr-len { display: block; font-size: 0.78rem; font-weight: 800; color: #868e96; text-align: right; }
.narr-len.over { color: #e03131; text-align: left; }
.narr-over { margin: 6px 0 0; padding: 4px 8px; border-radius: 8px; background: #fff5f5; color: #e03131; font-size: 0.82rem; font-weight: 900; }
.mp-flow-cells .mp-narr-cell textarea.over, .mp-narr-cell:has(.narr-len.over) textarea { border-color: #fa5252; background: #fff5f5; }
.cam-kanpe-meta.over { color: #ff6b6b; font-weight: 900; }
.cam-kanpe-meta[hidden] { display: none !important; }
/* カード（ワイルドカットも）の「映すもの」「ナレーション」の 枠の 高さを そろえる */
.pcard-pick-why .pcard-shot-text { min-height: 3em; }
.pcard > .pcard-narr { flex: 1 1 auto; }
/* 【中級】きかく：「カットパックを開ける」の 上の すきまを つめる */
.mp { padding-bottom: 4px; }
#mp-go-wrap { margin-top: 10px; }
/* VTRの 流れの 表：映すものを 広く、ナレーションは 40字が はいる 幅（せまい 画面では 半分まで） */
.mp-flow { --narr-w: min(calc(40rem + 30px), 48%); }
.mp-flow-head { grid-template-columns: 190px minmax(0, 1fr) var(--narr-w); column-gap: 10px; padding-right: 10px; }
.mp-flow-cells { grid-template-columns: minmax(0, 1fr) var(--narr-w-cell, min(calc(40rem + 30px), 55%)) auto !important; }
@media (max-width: 760px) { .mp-flow-cells { grid-template-columns: 1fr !important; } }
/* 映すものを 優先して 広く（半分いじょう）。ナレーションは のこりで 最大 40字ぶん */
.mp-flow { --flow-cols: minmax(55%, 1fr) minmax(0, calc(40rem + 30px)) auto; }
.mp-flow-head { grid-template-columns: 180px minmax(0, 1fr) !important; padding-right: 0; column-gap: 0; }
.mp-flow-head-cols { display: grid; grid-template-columns: var(--flow-cols); column-gap: 10px; padding: 0 10px; }
.mp-flow-head-cols > span { padding: 8px 2px; }
.mp-flow-cells { grid-template-columns: var(--flow-cols) !important; }
@media (max-width: 760px) { .mp-flow-cells { grid-template-columns: 1fr !important; } }

/* ==== 企画の例（企画と 完成映像の セット） ==== */
.mp-titlebar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mp-titlebar .qx-h1 { margin: 0; }
.mp-examples-btn { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px; border-radius: 999px; background: #fff; border: 3px solid #845ef7; color: #5f3dc4; font-weight: 900; text-decoration: none; box-shadow: 0 3px 0 #b197fc; }
.mp-examples-btn:hover { background: #f3f0ff; }
.mp-examples-btn.back { border-color: #adb5bd; color: #495057; box-shadow: 0 3px 0 #dee2e6; }
.ex-list { display: flex; flex-direction: column; gap: 18px; margin-top: 14px; }
.ex-card { padding: 16px 18px; border-radius: 20px; background: #fff; box-shadow: 0 4px 16px rgba(120, 80, 0, 0.12); }
.ex-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ex-head h2 { margin: 0; font-size: 1.25rem; }
.ex-no { padding: 2px 12px; border-radius: 999px; background: #845ef7; color: #fff; font-weight: 900; }
.ex-body { display: grid; grid-template-columns: minmax(280px, 42%) minmax(0, 1fr); gap: 18px; align-items: start; }
.ex-video video, .ex-novideo { width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; background: #212529; display: block; }
.ex-novideo { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: #adb5bd; font-size: 2rem; }
.ex-novideo span { font-size: 0.95rem; font-weight: 800; }
.ex-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; margin: 0 0 10px; }
.ex-meta dt { font-size: 0.78rem; font-weight: 900; color: #495057; }
.ex-meta dd { margin: 0; font-weight: 800; }
.ex-message { margin-bottom: 10px; padding: 8px 12px; border-radius: 12px; background: #fff9db; border: 2px solid #fcc419; }
.ex-message p { margin: 2px 0 0; font-weight: 800; }
.ex-flow { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.ex-flow th, .ex-flow td { padding: 7px 10px; border-top: 1px solid #e9ecef; text-align: left; vertical-align: top; }
.ex-flow thead th { background: #f1f3f5; font-size: 0.8rem; color: #495057; }
.ex-flow tbody th { white-space: nowrap; width: 6.5em; }
.ex-flow tr.mp-col-hajime { background: #f3f9ff; } .ex-flow tr.mp-col-naka { background: #fffcf0; } .ex-flow tr.mp-col-owari { background: #fff5f9; }
.ex-flow td { font-weight: 700; }
.ex-empty { text-align: center; color: #868e96; font-weight: 800; }
@media (max-width: 860px) { .ex-body { grid-template-columns: 1fr; } }
/* 管理者の 画面 */
.exa-page { max-width: 1100px; margin: 0 auto; padding: 16px; }
.exa-list { display: flex; flex-direction: column; gap: 14px; }
.exa-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px; padding: 14px; border-radius: 14px; background: #fff; border: 1px solid #dee2e6; }
.exa-form label { display: flex; flex-direction: column; gap: 3px; font-size: 0.82rem; font-weight: 800; }
.exa-form input, .exa-form textarea { padding: 6px 8px; border: 1px solid #ced4da; border-radius: 8px; font: inherit; resize: none; }
.exa-form .exa-flow, .exa-video, .exa-btns { grid-column: 1 / -1; }
.exa-flow input { width: 100%; box-sizing: border-box; }
.exa-video { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.exa-video video { width: 280px; aspect-ratio: 16 / 9; border-radius: 8px; background: #000; }
.exa-file { flex-direction: row !important; padding: 8px 12px; border: 2px dashed #845ef7; border-radius: 10px; color: #5f3dc4; cursor: pointer; }
.exa-status { font-weight: 800; }
.exa-btns { display: flex; justify-content: flex-end; gap: 8px; }
.exa-btns button, .exa-import { padding: 8px 16px; border-radius: 10px; border: 0; font: inherit; font-weight: 900; cursor: pointer; }
.exa-save { background: #2f9e44; color: #fff; }
.exa-del { background: #fff; color: #e03131; border: 1px solid #ffc9c9 !important; }
.exa-import { background: #845ef7; color: #fff; margin-bottom: 12px; }
/* 編集室：カットを 2つに 分ける */
.inout-split { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 100%; margin-top: 8px; padding: 9px 12px; border-radius: 12px; border: 2px dashed #ffd43b; background: rgba(255, 212, 59, 0.12); color: #ffe066; font: inherit; font-weight: 900; cursor: pointer; }
.inout-split small { font-size: 0.72rem; font-weight: 700; opacity: 0.85; }
.inout-split:hover { background: rgba(255, 212, 59, 0.22); }
/* 編集室：分けた カードの 境目 */
.inout-slider.seam > span { color: #ffd43b; }
.inout-slider.seam input[type=range] { accent-color: #fab005; }
.studio-inspector .inout-slider.seam { display: flex !important; flex-direction: column; align-items: stretch; gap: 4px !important; margin-top: 8px; padding: 8px 12px !important; border-radius: 12px; background: rgba(255, 212, 59, 0.08); border: 1px solid rgba(255, 212, 59, 0.35); }
.studio-inspector .inout-slider.seam > span { white-space: normal; font-size: 0.85rem; }
/* サイドスーパー：文字の 縦の まんなかを「座布団の 上〜NEWSの 上」の まんなかに（NEWSと くっつかない） */
.tv-telop-box.kind-side::after { bottom: 0.04em; line-height: 1; }
.st-telops .tv-telop-box.kind-side { padding-top: 0.128em !important; padding-bottom: 0.252em !important; }
/* 編集室：シールの いちらんは さいしょは とじて おく（見出しを おすと ひらく） */
.studio-inspector .inout-fx-toggle { align-items: center !important; flex-wrap: wrap; gap: 6px 8px !important; max-width: 100%; border: 0; font: inherit; text-align: left; cursor: pointer; }
.studio-inspector .inout-fx-toggle .fx-toggle-tx { flex: none; padding: 2px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.92); color: #5f3dc4; font-size: 0.74rem; font-weight: 900; }
.studio-inspector .inout-fx-toggle .fx-on-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.studio-inspector .inout-fx-toggle .fx-on-chips i { font-style: normal; padding: 1px 8px; border-radius: 999px; background: #ffd43b; color: #3b2a00; font-size: 0.72rem; font-weight: 900; }
.studio-inspector .inout-fx-kinds[hidden] { display: none !important; }
.studio-inspector .inout-fx:not(.open)::after { display: none; }
/* 音楽：CDの みためで えらぶ（えらんだ CDは くるくる まわる） */
.inout-bgm-list { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)) !important; gap: 8px !important; }
.inout-bgm { flex-direction: column; gap: 5px !important; padding: 8px 4px 6px !important; min-height: 0 !important; border-radius: 14px !important; }
.inout-bgm .cd-disc {
  --cd-tint: #ffd8a8;
  position: relative; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%;
  background:
    radial-gradient(circle, transparent 0 7px, rgba(255, 255, 255, 0.9) 7px 8px, rgba(200, 205, 215, 0.95) 8px 15px, rgba(255, 255, 255, 0.6) 15px 16px, transparent 16px),
    repeating-radial-gradient(circle, rgba(255, 255, 255, 0) 0 2px, rgba(255, 255, 255, 0.12) 2px 3px),
    conic-gradient(from 30deg, #e9ecef, var(--cd-tint), #a5d8ff, #d0bfff, #fff, #b2f2bb, var(--cd-tint), #e9ecef);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.55), 0 3px 8px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s;
}
.inout-bgm .cd-disc::after { content: ''; position: absolute; width: 10px; height: 10px; border-radius: 50%; background: #1b2250; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.25); }
.inout-bgm .cd-disc b { position: absolute; top: 2px; left: 50%; transform: translateX(-50%); font-size: 0.95rem; line-height: 1; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.35)); }
.inout-bgm .cd-name { font-size: 0.8rem !important; line-height: 1.2 !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.inout-bgm.cd-c0 .cd-disc { --cd-tint: #ffe066; }
.inout-bgm.cd-c1 .cd-disc { --cd-tint: #8ce99a; }
.inout-bgm.cd-c2 .cd-disc { --cd-tint: #ffa8a8; }
.inout-bgm.cd-c3 .cd-disc { --cd-tint: #74c0fc; }
.inout-bgm.cd-c4 .cd-disc { --cd-tint: #e599f7; }
.inout-bgm.cd-none .cd-disc { background: radial-gradient(circle, transparent 0 7px, rgba(255, 255, 255, 0.35) 7px 8px, transparent 8px), repeating-radial-gradient(circle, rgba(255, 255, 255, 0) 0 2px, rgba(255, 255, 255, 0.08) 2px 3px), #495057; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3), 0 3px 8px rgba(0, 0, 0, 0.35); }
.inout-bgm:hover .cd-disc { transform: rotate(25deg); }
.inout-bgm.selected .cd-disc { box-shadow: 0 0 0 3px #fff, 0 0 14px rgba(255, 212, 59, 0.9), 0 3px 8px rgba(0, 0, 0, 0.35); }
.inout-bgm.selected:not(.cd-none) .cd-disc { animation: cd-spin 2.4s linear infinite; }
@keyframes cd-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .inout-bgm.selected .cd-disc { animation: none; } }
/* 説明スーパー：0.8倍に 小さく（5cqw → 4cqw。かどの まるみも あわせる） */
.st-telops .tv-telop-box.kind-setsumei { font-size: 4cqw !important; border-radius: 0.96cqw !important; }
/* 時計・天気の スイッチと テロップ（名前・テロップ・見出し）を 1ぎょうに */
.studio-inspector .inout-telop-kinds.tc-row { grid-template-columns: minmax(0, 1.35fr) repeat(3, minmax(0, 1fr)) !important; }
.studio-inspector .inout-telop-kinds.tc-row.no-telop { grid-template-columns: minmax(0, 1fr) minmax(0, 3fr) !important; align-items: center; }
.studio-inspector .inout-telop-kinds.tc-row.no-telop .inout-no-telop { margin: 0; }
.studio-inspector .inout-clock.in-row { height: 44px; min-height: 44px !important; margin: 0 !important; padding: 4px 6px 4px 8px !important; gap: 4px !important; border-radius: 12px !important; font-size: 0.86rem !important; white-space: nowrap; overflow: hidden; }
.studio-inspector .inout-clock.in-row .clk-ic { font-size: 1.15rem; }
.studio-inspector .inout-clock.in-row .clk-txt { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.studio-inspector .inout-clock.in-row .clk-sw { width: 52px; height: 24px; }
.studio-inspector .inout-clock.in-row .clk-sw i { width: 16px; height: 16px; top: 2px; left: 2px; }
.studio-inspector .inout-clock.in-row.on .clk-sw i { left: 30px; }
.studio-inspector .inout-clock.in-row .clk-sw b { font-size: 0.56rem; right: 4px; }
.studio-inspector .inout-clock.in-row.on .clk-sw b { left: 5px; right: auto; }
/* オープニングの さいごの 黒い 窓に、つぎの クリップを すかして 見せる 層（ビデオの すぐ 上、テロップより 下） */
.cut-preview-screen > canvas.opening-key { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.cut-preview-screen > canvas.opening-key[hidden] { display: none; }
/* 吹き出しの 三角：おした ボタンの まんなか（JSで --tel-arrow-x を いれる） */
.studio-bottom.edit-zone .inout-telop-edit.arrow-placed::before { left: calc(var(--tel-arrow-x) - 10px) !important; right: auto !important; }
/* 企画の例：とり方（2人1組／ひとりで）の しるし */
.ex-style { display: inline-block; vertical-align: middle; margin-left: 6px; padding: 2px 12px; border-radius: 999px; font-size: 0.85rem; font-weight: 900; color: #fff; }
.ex-style.is-pair { background: linear-gradient(135deg, #7048e8, #1c7ed6); }
.ex-style.is-solo { background: linear-gradient(135deg, #0ca678, #1c7ed6); }
.exa-group { margin: 18px 0 28px; padding: 14px 16px; border: 2px solid #dee2e6; border-radius: 14px; }
.exa-group > h2 small { font-size: 0.8rem; color: #868e96; margin-left: 6px; }
/* ===== 【中級（起承転結）】4ぶ こうせいの 色（起＝青・承＝黄・転＝むらさき・結＝ピンク） ===== */
.rsel-card.g-kishou { --g1: #e8590c; --g2: #7048e8; }
.ex-style.is-kishou { background: linear-gradient(135deg, #e8590c, #7048e8); }
.ex-style.is-solo { background: linear-gradient(135deg, #0ca678, #1c7ed6); }
.mp-flow-row.mp-col-ki { --flow-c: #339af0; background: #f3f9ff; }
.mp-flow-row.mp-col-sho { --flow-c: #f59f00; background: #fffcf0; }
.mp-flow-row.mp-col-ten { --flow-c: #7048e8; background: #f8f5ff; }
.mp-flow-row.mp-col-ketsu { --flow-c: #e64980; background: #fff5f9; }
.mp-flow-row.mp-col-ki, .mp-flow-row.mp-col-sho, .mp-flow-row.mp-col-ten, .mp-flow-row.mp-col-ketsu { border-radius: 0; border-left: 0; border-right: 0; border-bottom: 0; padding: 0; }
.mp-advice-sec.sec-ki { background: #339af0; }
.mp-advice-sec.sec-sho { background: #f59f00; }
.mp-advice-sec.sec-ten { background: #7048e8; }
.mp-advice-sec.sec-ketsu { background: #e64980; }
.ex-flow tr.mp-col-ki { background: #f3f9ff; } .ex-flow tr.mp-col-sho { background: #fffcf0; } .ex-flow tr.mp-col-ten { background: #f8f5ff; } .ex-flow tr.mp-col-ketsu { background: #fff5f9; }
.zone-起 { background: rgba(116, 192, 252, 0.18); border-color: rgba(116, 192, 252, 0.8); }
.zone-起 .deck-zone-label { background: #1c7ed6; }
.zone-承 { background: rgba(255, 212, 59, 0.15); border-color: rgba(255, 212, 59, 0.8); }
.zone-承 .deck-zone-label { background: #f59f00; }
.zone-転 { background: rgba(177, 151, 252, 0.18); border-color: rgba(177, 151, 252, 0.85); }
.zone-転 .deck-zone-label { background: #7048e8; }
.zone-結 { background: rgba(247, 131, 172, 0.18); border-color: rgba(247, 131, 172, 0.8); }
.zone-結 .deck-zone-label { background: #d6336c; }
/* 起承転結の きかく：上の 項目は 5つ */
@media (min-width: 1200px) { .mp-form.is-kishou { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
/* カードの いろ：起（あお）・承（きいろ）・転（むらさき）・結（ピンク） */
.deck-zone-group.zone-起 .pcard.pcard:not(.bcard) { --c1: #74c0fc; --c2: #1c7ed6; --c3: #e7f5ff; filter: none; }
.deck-zone-group.zone-承 .pcard.pcard:not(.bcard) { --c1: #ffd43b; --c2: #f59f00; --c3: #fff9db; filter: none; }
.deck-zone-group.zone-転 .pcard.pcard:not(.bcard) { --c1: #b197fc; --c2: #7048e8; --c3: #f3f0ff; filter: none; }
.deck-zone-group.zone-結 .pcard.pcard:not(.bcard) { --c1: #faa2c1; --c2: #d6336c; --c3: #fff0f6; filter: none; }
.deck-zone-group:is(.zone-起, .zone-承, .zone-転, .zone-結) .pcard.pcard:not(.bcard) > * { filter: none; }
.rsel-card.g-kishou-solo { --g1: #e8590c; --g2: #0ca678; }
.ex-style.is-kishouSolo { background: linear-gradient(135deg, #e8590c, #0ca678); }

/* ===== 番組イメージ：テロップの デザイン（色・角の まるさ・ふちどりだけ かえる。いちの きまりは どれも おなじ）=====
   値は app.js の PROGRAM_LOOKS（telopDesignVars）から。書き出し（export_overlay.py）も おなじ 表で かく。 */
.st-telops .telop-overlay[data-tdesign] .tv-telop-box { background: var(--td-bg); color: var(--td-ink); }
.st-telops .telop-overlay[data-tdesign] .tv-telop-box.kind-setsumei {
  border-bottom-color: var(--td-a1); border-radius: calc(var(--td-r) * 0.8);
  box-shadow: 0 0 0 var(--td-bw) var(--td-bc), 0 3px 14px rgba(0, 0, 0, 0.3);
}
.st-telops .telop-overlay[data-tdesign] .tv-telop-box.kind-side {
  border-top-color: var(--td-a1); border-bottom-color: var(--td-a2); border-radius: var(--td-r);
  box-shadow: 0 0 0 var(--td-bw) var(--td-bc), 0 3px 14px rgba(0, 0, 0, 0.3);
}
.st-telops .telop-overlay[data-tdesign] .tv-telop-box.kind-side::after {
  content: var(--td-label); color: var(--td-a1);
  right: calc(0.3em + max(0px, var(--td-r) - 1.2cqw) * 0.6); /* 角が まるい デザインは 内がわへ（きれない ように） */
}
.st-telops .telop-overlay[data-tdesign].kind-name .telop-box-wrap {
  background: var(--td-bg); border-radius: var(--td-r); border-left: none;
  box-shadow: 0 0 0 var(--td-bw) var(--td-bc), 0 4px 14px rgba(0, 0, 0, 0.25);
}
.st-telops .telop-overlay[data-tdesign] .tv-telop-box.kind-name { background: transparent; border-bottom-color: var(--td-a2); }
.st-telops .telop-overlay[data-tdesign] .telop-role-strip { background: var(--td-rbg); }
.st-telops .telop-overlay[data-tdesign] .telop-role-text { color: var(--td-rink); }

/* 時計・天気も 番組イメージの 色に */
.clock-weather-overlay[data-look] .cw-clock-box { background: var(--cw-bg); color: var(--cw-ink); }
.clock-weather-overlay[data-look] .cw-clock-date { background: var(--cw-date-bg); color: var(--cw-date-ink); }

/* 編集室：番組イメージの ボタン（再生バーの みぎ。おすと えらびなおせる） */
.look-pill {
  flex: none; display: inline-flex; align-items: center; gap: 6px; max-width: 46%; min-width: 0; padding: 3px 10px 3px 4px;
  border-radius: 999px; cursor: pointer; font: inherit; color: #fff; text-align: left;
  background: linear-gradient(180deg, #38d9a9, #12b886); border: 2px solid #fff; box-shadow: 0 2px 0 #087f5b;
}
.look-pill:hover { filter: brightness(1.06); }
.look-pill:active { transform: translateY(1px); box-shadow: none; }
.look-pill:focus-visible { outline: 3px solid #ffd43b; outline-offset: 2px; }
.look-pill .look-btn-chip { width: 34px; border-radius: 999px 4px 4px 999px; }
.look-pill .look-btn-tel { left: 14%; right: 10%; bottom: 18%; height: 34%; border-bottom-width: 2px; }
.look-pill-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.05; }
.look-pill-text small { font-size: 0.58rem; font-weight: 800; opacity: 0.9; white-space: nowrap; }
.look-pill-text b { font-size: 0.78rem; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.look-pill-ic { font-size: 0.8rem; }
.pv-seek:has(.look-pill) .pv-seek-time { width: auto; min-width: 0; }
.look-btn-chip { width: 54px; }
.look-cur b { font-size: 0.95rem; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.look-change {
  flex: none; padding: 6px 12px; border-radius: 999px; cursor: pointer; font: inherit; font-size: 0.82rem; font-weight: 900;
  color: #fff; background: linear-gradient(180deg, #38d9a9, #12b886); border: 2px solid #fff; box-shadow: 0 3px 0 #087f5b;
}
.look-change:hover { filter: brightness(1.05); transform: translateY(-1px); }
.look-change:active { transform: translateY(2px); box-shadow: 0 1px 0 #087f5b; }
.look-change:focus-visible { outline: 3px solid #ffd43b; outline-offset: 2px; }
.look-btn-chip {
  position: relative; display: block; flex: none; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden;
  background: linear-gradient(160deg, #74c0fc, #4dabf7 45%, #69db7c 46%, #40c057);
}
.look-btn-clock {
  position: absolute; left: 5%; top: 7%; padding: 1px 3px; border-radius: 3px; font-style: normal;
  font-size: 7px; font-weight: 900; line-height: 1.15; color: #fff; background: var(--lk-bg);
  box-shadow: 0 1px 0 var(--lk-ac); max-width: 80%; overflow: hidden; white-space: nowrap;
}
.look-btn-tel {
  position: absolute; left: 16%; right: 16%; bottom: 10%; height: 22%; border-radius: calc(var(--td-r) * 0.35);
  background: var(--td-bg); border-bottom: 3px solid var(--td-a1); box-sizing: border-box;
  box-shadow: 0 0 0 calc(var(--td-bw) * 0.35) var(--td-bc);
}

/* 番組イメージを えらぶ モーダル（はじめては 画面いっぱい） */
body.look-modal-open { overflow: hidden; }
.look-modal {
  position: fixed; inset: 0; z-index: 9000; display: grid; place-items: center; padding: 20px;
  background: rgba(8, 20, 40, 0.6);
}
.look-modal-box {
  width: min(980px, 100%); max-height: calc(100vh - 40px); overflow: auto; box-sizing: border-box;
  padding: 18px 20px 20px; border-radius: 20px; background: linear-gradient(180deg, #e6fcf5, #fff 40%);
  border: 4px solid #12b886; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}
.look-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.look-modal-head h2 { margin: 0 0 4px; font-size: 1.4rem; font-weight: 900; color: #063b2c; }
.look-modal-head p { margin: 0; font-size: 0.92rem; color: #495057; font-weight: 700; }
.look-modal-x {
  flex: none; width: 38px; height: 38px; border-radius: 50%; cursor: pointer; font-size: 1.1rem; font-weight: 900;
  border: 2px solid #ced4da; background: #fff; color: #495057;
}
.look-modal-x:hover { background: #f1f3f5; }
.look-modal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.look-card {
  display: flex; flex-direction: column; gap: 8px; padding: 10px; border-radius: 16px; cursor: pointer; text-align: left;
  font: inherit; color: #212529; background: #fff; border: 4px solid #dee2e6; box-shadow: 0 4px 0 #ced4da;
  transition: transform 0.12s, border-color 0.12s, box-shadow 0.12s;
}
.look-card:hover { transform: translateY(-3px); border-color: #38d9a9; box-shadow: 0 7px 0 #20c997; }
.look-card:focus-visible { outline: 4px solid #ffd43b; outline-offset: 2px; }
.look-card.on { border-color: #12b886; box-shadow: 0 4px 0 #0ca678; }
.look-pv {
  width: 100%; border-radius: 10px; pointer-events: none;
  background: linear-gradient(180deg, #a5d8ff 0%, #74c0fc 52%, #8ce99a 53%, #51cf66 100%);
}
.look-pv::after { /* 校舎の シルエット（映像の かわり） */
  content: ''; position: absolute; left: 30%; right: 22%; top: 30%; height: 24%;
  background: repeating-linear-gradient(90deg, #f8f9fa 0 9%, #dee2e6 9% 11%); border-radius: 4px 4px 0 0; opacity: 0.85;
}
.look-pv .st-telops, .look-pv .clock-weather-overlay { z-index: 2; }
.look-card-body { display: flex; flex-direction: column; gap: 3px; padding: 0 4px 2px; }
.look-card-title { display: flex; align-items: center; gap: 8px; }
.look-card-title b { font-size: 1.15rem; font-weight: 900; }
.look-card-title em { font-style: normal; font-size: 0.72rem; font-weight: 900; color: #fff; background: #12b886; padding: 2px 8px; border-radius: 999px; }
.look-card-body small { font-size: 0.82rem; color: #868e96; font-weight: 700; }
.look-card-sw { display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; font-weight: 800; color: #495057; margin-top: 2px; }
.look-modal.is-first { padding: 0; background: #0b2545; }
.look-modal.is-first .look-modal-box {
  width: 100vw; height: 100vh; max-height: none; border-radius: 0; border: none; padding: 24px clamp(16px, 4vw, 48px);
  display: flex; flex-direction: column;
}
.look-modal.is-first .look-modal-head { justify-content: center; text-align: center; }
.look-modal.is-first .look-modal-head h2 { font-size: clamp(1.4rem, 3vw, 2.2rem); }
.look-modal.is-first .look-modal-grid { flex: 1; align-content: center; width: min(1200px, 100%); margin: 0 auto; }
@media (min-width: 900px) {
  .look-modal-grid, .look-modal.is-first .look-modal-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .look-modal-box { width: min(1180px, 100%); }
}
@media (max-width: 640px) {
  .look-modal-grid { grid-template-columns: 1fr; }
}

/* テロップを つくる ときの デザインえらび */
.tel-design { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 2px 0 8px; }
.tel-design-label { font-size: 0.8rem; font-weight: 900; color: #495057; margin-right: 2px; }
.tel-design-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 6px; border-radius: 999px; cursor: pointer;
  border: 2px solid #dee2e6; background: #fff; font: inherit; font-size: 0.8rem; font-weight: 800; color: #212529;
}
.tel-design-btn:hover { border-color: #adb5bd; }
.tel-design-btn:focus-visible { outline: 3px solid #ffd43b; outline-offset: 2px; }
.tel-design-btn.on { border-color: #212529; box-shadow: 0 2px 0 #212529; }
.tdb-sw {
  display: inline-block; width: 30px; height: 16px; border-radius: calc(var(--td-r) * 0.35);
  background: var(--td-bg); border-bottom: 4px solid var(--td-a1); box-sizing: border-box;
  box-shadow: 0 0 0 calc(var(--td-bw) * 0.35) var(--td-bc), inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

/* ===== 5 ふりかえり ===== */
.rf { max-width: 1180px; margin: 0 auto; padding: 8px 16px 40px; display: flex; flex-direction: column; gap: 16px; }
.rf-head { text-align: center; }
.rf-head h1 { margin: 6px 0 4px; font-size: 1.7rem; font-weight: 900; color: #212529; }
.rf-head p { margin: 0; font-weight: 800; color: #495057; }
.rf-panel {
  background: #fff; border-radius: 18px; padding: 14px 16px 16px; border: 4px solid #fab005;
  box-shadow: 0 5px 0 #e67700, 0 8px 18px rgba(0, 0, 0, 0.18); min-width: 0;
}
.rf-panel h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 1.1rem; font-weight: 900; color: #212529; }
.rf-panel h2 > span {
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #fab005; color: #fff; font-size: 0.95rem;
}
.rf-panel h2 small { margin-left: auto; font-size: 0.8rem; color: #868e96; font-weight: 800; }
.rf-compare { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: stretch; }
.rf-vs { align-self: center; font-size: 2rem; font-weight: 900; color: #fab005; }
.rf-memo { margin: 0; }
.rf-vtr { display: flex; flex-direction: column; }
.rf-cuts { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 520px; overflow: auto; }
.rf-cut { display: flex; gap: 10px; align-items: center; padding: 6px; border-radius: 12px; background: #f8f9fa; border: 2px solid #e9ecef; }
.rf-cut.unshot { opacity: 0.75; }
.rf-cut-win { position: relative; flex: none; width: 128px; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #212529; }
.rf-cut-win video, .rf-cut-win img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rf-cut-no {
  position: absolute; left: 4px; top: 4px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: #fab005; color: #fff; font-size: 0.75rem; font-weight: 900; border: 2px solid #fff;
}
.rf-cut-flag { position: absolute; right: 4px; bottom: 4px; padding: 1px 6px; border-radius: 999px; background: #e03131; color: #fff; font-size: 0.66rem; font-weight: 900; }
.rf-cut-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rf-cut-body b { font-size: 0.95rem; font-weight: 900; }
.rf-cut-body small { font-size: 0.78rem; color: #868e96; font-weight: 700; }
.rf-cut-tel { font-size: 0.8rem; font-weight: 800; color: #1c7ed6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rf-cut-empty { padding: 20px; text-align: center; color: #868e96; font-weight: 800; }
.rf-watch { align-self: flex-start; margin-top: auto; }
.rf-q { display: block; margin-bottom: 14px; }
.rf-q-title { display: block; margin-bottom: 6px; font-size: 1rem; font-weight: 900; color: #212529; }
.rf-match { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.rf-match-btn {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border-radius: 14px; cursor: pointer;
  font: inherit; color: #212529; background: #f8f9fa; border: 3px solid #dee2e6; box-shadow: 0 3px 0 #ced4da;
  transition: transform 0.12s, border-color 0.12s;
}
.rf-match-btn:hover:not(:disabled) { transform: translateY(-2px); }
.rf-match-btn:focus-visible { outline: 3px solid #ffd43b; outline-offset: 2px; }
.rf-match-btn:disabled { cursor: default; }
.rf-match-ic { font-size: 2rem; line-height: 1.1; }
.rf-match-btn b { font-size: 1rem; font-weight: 900; }
.rf-match-btn small { font-size: 0.72rem; color: #868e96; font-weight: 700; text-align: center; }
.rf-match-btn.on.m-great { background: #fff9db; border-color: #fab005; box-shadow: 0 3px 0 #e67700; }
.rf-match-btn.on.m-mostly { background: #e7f5ff; border-color: #339af0; box-shadow: 0 3px 0 #1c7ed6; }
.rf-match-btn.on.m-little { background: #f1f3f5; border-color: #868e96; box-shadow: 0 3px 0 #495057; }
.rf-match-btn.on.m-no { background: #fff0f6; border-color: #f06595; box-shadow: 0 3px 0 #c2255c; }
.rf-field { position: relative; padding: 10px 12px 8px; border-radius: 14px; border-left: 6px solid var(--rc, #adb5bd); background: #f8f9fa; }
.rf-field.c-blue { --rc: #339af0; } .rf-field.c-green { --rc: #40c057; } .rf-field.c-orange { --rc: #fd7e14; } .rf-field.c-pink { --rc: #f06595; }
.rf-field textarea {
  width: 100%; box-sizing: border-box; resize: vertical; min-height: 70px; padding: 8px 10px; border-radius: 10px;
  border: 2px solid #dee2e6; font: inherit; font-size: 1rem; line-height: 1.5; background: #fff;
}
.rf-field textarea:focus { outline: none; border-color: var(--rc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--rc) 25%, transparent); }
.rf-count { display: block; text-align: right; font-size: 0.72rem; color: #868e96; margin-top: 2px; }
.rf-foot { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }
.rf-saved { font-size: 0.85rem; font-weight: 800; color: #495057; }
.rf-save { font-size: 1.05rem; padding: 10px 22px; }
.oa-to-reflect { background: linear-gradient(180deg, #ffd43b, #fab005) !important; color: #212529 !important; border-color: #fff !important; }
@media (max-width: 900px) {
  .rf-compare { grid-template-columns: 1fr; }
  .rf-vs { justify-self: center; transform: rotate(90deg); }
  .rf-match { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 先生の 画面：ふりかえりの まとめ */
.tdash-reflect { margin-top: 8px; padding: 6px 10px; border-radius: 10px; background: #fff9db; border: 1px solid #ffe066; font-size: 0.8rem; }
.tdash-reflect.none { background: #f8f9fa; border-color: #e9ecef; color: #868e96; font-weight: 700; }
.tdash-reflect-head { font-weight: 900; color: #5c3c00; }
.tdash-reflect-head b { margin-left: 4px; }
.tdash-reflect ul { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.tdash-reflect li { display: flex; gap: 4px; color: #343a40; line-height: 1.35; }

/* ===== 起承転結のきかく：時間・ヒント（ねらい・撮り方・音の主役）・3つのコツ ===== */
.mp-flow-time {
  display: inline-block; margin-top: 4px; padding: 1px 8px; border-radius: 999px;
  background: #fff; border: 2px solid var(--flow-c, #adb5bd); font-size: 0.74rem; font-weight: 900; color: #212529;
}
.mp-flow-extra { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; padding: 0 10px 10px calc(180px + 10px); }
.mp-hint-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px;
  font-size: 0.8rem; font-weight: 800; line-height: 1.4; color: #343a40; background: #fff; border: 1px solid #dee2e6;
}
.mp-hint-chip.aim { border-color: var(--flow-c, #adb5bd); color: #212529; }
.ks-guide { margin: 6px 0 10px; padding: 6px 12px; border-radius: 12px; background: #fff9db; border: 2px solid #ffe066; }
.ks-guide summary { cursor: pointer; font-weight: 900; color: #5c3c00; font-size: 0.88rem; }
.ks-tips { margin: 6px 0 2px; padding-left: 1.2em; font-size: 0.85rem; line-height: 1.6; color: #343a40; }
.ex-part { display: block; font-size: 0.7rem; color: #868e96; font-weight: 800; }
@media (max-width: 760px) {
  .mp-flow-extra { padding-left: 10px; }
}
/* 起承転結：場面の らんに ねらいも 入れる（らんを すこし ひろく） */
.mp-form.is-kishou .mp-flow-row { grid-template-columns: 250px minmax(0, 1fr); }
.mp-form.is-kishou .mp-flow-head { grid-template-columns: 250px minmax(0, 1fr) !important; }
.mp-form.is-kishou .mp-flow-label { align-items: flex-start; }
.mp-flow-aim {
  display: block; margin-top: 6px; padding: 4px 8px; border-radius: 8px; background: #fff; border: 1px solid var(--flow-c, #adb5bd);
  font-size: 0.76rem; font-weight: 800; line-height: 1.45; color: #343a40;
}
@media (max-width: 760px) {
  .mp-form.is-kishou .mp-flow-row { grid-template-columns: 1fr; }
}
/* きかく会議：「🎬 VTRの流れ」の 見出しを 大きく */
.mp-flow-title b { font-size: 1.35rem; font-weight: 900; }
/* きかく会議：上の 質問の ラベルが 1行・2行で ちがっても、入力らんの 上はしを そろえる（ラベルを 下に よせる） */
.mp-form > .mp-field:not(.mp-message-field):not(.mp-secs-field) > label { flex: 1; align-items: flex-end; }
/* きかく会議：「どんな動画にする？」と「VTRの流れ」を べつの 領域に わける */
.mp-form-outer { display: flex; flex-direction: column; gap: 22px; }
.mp-zone { position: relative; border-top: 8px solid var(--zone-c); }
.mp-zone-basic { --zone-c: #fab005; }
.mp-zone-flow { --zone-c: #339af0; }
.mp-zone-title { grid-column: 1 / -1; margin: 0; font-size: 1.35rem; font-weight: 900; color: #212529; }
.mp-zone-flow .mp-flow-title b { color: #212529; }
/* ねらい：入力らんに 見えない よう、枠や 白い 背景は つけない（色つきの 札＋ふつうの 文） */
.mp-flow-aim { margin-top: 6px; padding: 0; border: 0; background: none; border-radius: 0; font-size: 0.8rem; font-weight: 700; line-height: 1.5; color: #495057; }
.mp-flow-aim em {
  display: inline-block; margin-right: 6px; padding: 0 7px; border-radius: 999px; vertical-align: 1px;
  background: var(--flow-c, #868e96); color: #fff; font-style: normal; font-size: 0.7rem; font-weight: 900; letter-spacing: 0.05em;
}

/* ===== プロの アドバイス：該当の 場所に ふきだしで かさねる ===== */
/* 全体の アドバイス：VTRの流れの 見出しの みぎに 横長で かさねる（場面の ふきだしと かさならない） */
.mp-zone-flow > .mp-advice {
  position: absolute; z-index: 6; top: 10px; right: 16px; width: min(640px, calc(100% - 300px)); margin: 0; padding: 8px 38px 8px 12px;
  display: flex; align-items: center; gap: 12px;
  border-radius: 14px; background: #f3f0ff; border: 3px solid #b197fc; box-shadow: 0 8px 22px rgba(95, 61, 196, 0.25);
}
.mp-zone-flow > .mp-advice[hidden] { display: none; }
.mp-advice-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mp-zone-flow > .mp-advice .mp-advice-head { margin: 0; gap: 6px; }
.mp-zone-flow > .mp-advice .mp-advice-ic { font-size: 1.1rem; }
.mp-zone-flow > .mp-advice .mp-advice-head b { font-size: 0.92rem; }
.mp-zone-flow > .mp-advice .mp-advice-good,
.mp-advice-all { margin: 0; padding: 0; background: none; font-size: 0.84rem; font-weight: 800; line-height: 1.45; }
.mp-zone-flow > .mp-advice .mp-advice-stale-note { margin: 0; font-size: 0.74rem; }
.mp-zone-flow > .mp-advice .mp-fix { flex: none; width: auto; margin: 0; padding: 8px 14px; font-size: 0.9rem; white-space: nowrap; }
.mp-flow-row { position: relative; }
/* 場面ごとの アドバイス：その 場面の 行を 紫で かこみ、入力らんの すぐ 下に 出す（入力らんには かさねない） */
.mp-flow-row.has-adv { box-shadow: inset 0 0 0 3px #b197fc; }
.mp-adv-pop {
  --tail-x: 50%;
  position: relative; grid-column: 2; margin: 0 10px 10px; padding: 8px 36px 8px 12px;
  border-radius: 12px; background: #f3f0ff; border: 2px solid #b197fc; box-shadow: 0 4px 12px rgba(95, 61, 196, 0.18);
  font-size: 0.86rem; font-weight: 800; line-height: 1.5; color: #212529;
}
.mp-adv-pop.to-shot { --tail-x: 25%; }
.mp-adv-pop.to-narr { --tail-x: 72%; }
.mp-adv-pop::before, .mp-adv-pop::after { /* さして いる 欄の ほうへ 上むきの しっぽ */
  content: ''; position: absolute; left: var(--tail-x); bottom: 100%; transform: translateX(-50%); border: 9px solid transparent; border-bottom-color: #b197fc;
}
.mp-adv-pop::after { border-width: 7px; border-bottom-color: #f3f0ff; }
.mp-adv-pop-head { margin-bottom: 2px; font-size: 0.76rem; font-weight: 900; color: #5f3dc4; }
.mp-adv-pop ul { margin: 0; padding-left: 1.1em; display: flex; flex-direction: column; gap: 2px; }
.mp-adv-x {
  position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; padding: 0; cursor: pointer;
  border: 0; background: #e5dbff; color: #5f3dc4; font-size: 0.8rem; font-weight: 900; line-height: 24px;
}
.mp-adv-x:hover { background: #d0bfff; }
.mp-adv-pop .mp-advice-stale-note { margin: 4px 0 0; font-size: 0.74rem; }
/* 書きかえた あと：すけさせない（読めなく なるので）。灰色の 点線と 注意で しめす */
.adv-stale .mp-adv-pop, .adv-stale .mp-zone-flow > .mp-advice { opacity: 1; border-style: dashed; border-color: #adb5bd; background: #f8f9fa; }
.adv-stale .mp-adv-pop::before { border-bottom-color: #adb5bd; }
.adv-stale .mp-adv-pop::after { border-bottom-color: #f8f9fa; }
.adv-stale .mp-flow-row.has-adv { box-shadow: inset 0 0 0 3px #ced4da; }
.adv-stale .mp-advice-stale-note { display: block; }
@media (max-width: 900px) {
  .mp-zone-flow > .mp-advice { position: relative; top: auto; right: auto; width: auto; margin-bottom: 10px; flex-wrap: wrap; }
}
@media (max-width: 760px) {
  .mp-adv-pop { grid-column: auto; --tail-x: 50%; }
}
/* 「動画で伝えたいこと…」も ほかの 質問と おなじ 見た目に（黄色の 大きな わくを やめる。はばは 1行ぜんぶ） */
.mp-message-field { margin-top: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.mp-message-field label b { font-size: inherit; }
.mp-message-field textarea, .mp-message-field textarea.mp-msg { font-size: 1rem; line-height: 1.4; background: #fffdf0; border-color: #ffd43b; }
.mp-message-field textarea:focus { background: #fff; border-color: #fab005; }

/* ==== ねらい：見出し・思わせたいこと（太字）・すること（→）の 3つに わけて 見せる ==== */
.mp-flow-aim { display: flex !important; flex-direction: column; gap: 3px; margin-top: 8px !important; padding: 8px 10px !important; border-radius: 10px !important; border: 0 !important; background: rgba(255, 255, 255, 0.7) !important; box-shadow: inset 3px 0 0 var(--flow-c, #868e96); }
.mp-flow-aim .aim-tag { align-self: flex-start; padding: 1px 8px; border-radius: 999px; background: var(--flow-c, #868e96); color: #fff; font-size: 0.68rem; font-weight: 900; letter-spacing: 0.05em; }
.mp-flow-aim .aim-feel { display: block; font-size: 0.86rem !important; font-weight: 900; line-height: 1.4; color: #212529; }
.mp-flow-aim .aim-how { display: block; font-size: 0.76rem; font-weight: 700; line-height: 1.45; color: #495057; }
.mp-flow-aim .aim-how::before { content: '→ '; color: var(--flow-c, #868e96); font-weight: 900; }
/* 起承転結：見出しの 説明文と、場面名の 左の アイコンは 出さない */
.mp-form.is-kishou .mp-sub { display: none !important; }
.mp-form.is-kishou .mp-flow-ic { display: none !important; }
.tles-grade-note { display: block; font-size: 0.75rem; font-weight: 700; color: #868e96; margin: 2px 0 4px; }


/* ===== テロップの フォント（Google Fonts・SIL OFL。ファイルは /fonts/。使う ときだけ 読みこむ）===== */
@font-face { font-family: 'MFX Zen Maru Gothic'; src: url('/fonts/ZenMaruGothic-Bold.ttf') format('truetype'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'MFX Noto Sans JP'; src: url('/fonts/NotoSansJP%5Bwght%5D.ttf') format('truetype'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'MFX Yusei Magic'; src: url('/fonts/YuseiMagic-Regular.ttf') format('truetype'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'MFX M PLUS 1p'; src: url('/fonts/MPLUS1p-Bold.ttf') format('truetype'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'MFX M PLUS Rounded 1c'; src: url('/fonts/MPLUSRounded1c-Bold.ttf') format('truetype'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'MFX Noto Serif JP'; src: url('/fonts/NotoSerifJP%5Bwght%5D.ttf') format('truetype'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'MFX Shippori Mincho'; src: url('/fonts/ShipporiMincho-Bold.ttf') format('truetype'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'MFX Klee One'; src: url('/fonts/KleeOne-SemiBold.ttf') format('truetype'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'MFX Yuji Syuku'; src: url('/fonts/YujiSyuku-Regular.ttf') format('truetype'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'MFX Yuji Mai'; src: url('/fonts/YujiMai-Regular.ttf') format('truetype'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'MFX Dela Gothic One'; src: url('/fonts/DelaGothicOne-Regular.ttf') format('truetype'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'MFX Reggae One'; src: url('/fonts/ReggaeOne-Regular.ttf') format('truetype'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'MFX Rampart One'; src: url('/fonts/RampartOne-Regular.ttf') format('truetype'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'MFX Kaisei Opti'; src: url('/fonts/KaiseiOpti-Bold.ttf') format('truetype'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'MFX Hachi Maru Pop'; src: url('/fonts/HachiMaruPop-Regular.ttf') format('truetype'); font-weight: 100 900; font-display: swap; }
.st-telops .telop-overlay[data-tfont] .tv-telop-box,
.st-telops .telop-overlay[data-tfont] .telop-role-text { font-family: var(--tel-font), 'TBS Gothic', sans-serif; }
.st-telops .telop-overlay[data-tfont].kind-name .tv-telop-box,
.st-telops .telop-overlay[data-tfont] .telop-role-text { font-weight: var(--tel-weight, 900); }
.st-telops .telop-overlay[data-tfont].kind-setsumei .tv-telop-box,
.st-telops .telop-overlay[data-tfont].kind-side .tv-telop-box { font-weight: var(--tel-weight, 700); }
/* うごき（スライド・プルン）は 中の 座布団を うごかす */
.st-telops .telop-box-wrap { transform-origin: 50% 50%; }

/* テロップの 吹き出し：フォント・うごき */
.tel-row-label { display: block; font-size: 0.8rem; font-weight: 900; color: #495057; margin: 2px 0 4px; }
.tel-row-label small { font-size: 0.7rem; font-weight: 700; color: #868e96; margin-left: 4px; }
.tel-font, .tel-fx { margin: 2px 0 8px; }
.tel-font-cats { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.tel-font-cat {
  padding: 2px 10px; border-radius: 999px; cursor: pointer; font: inherit; font-size: 0.74rem; font-weight: 800;
  border: 1.5px solid #dee2e6; background: #f8f9fa; color: #495057;
}
.tel-font-cat.on { background: #212529; border-color: #212529; color: #fff; }
.tel-font-list { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.tel-font-btn {
  flex: none; display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 76px; padding: 6px 8px; cursor: pointer;
  border-radius: 12px; border: 2px solid #dee2e6; background: #fff; color: #212529;
}
.tel-font-btn .tfb-sample { font-size: 1.15rem; line-height: 1.2; }
.tel-font-btn small { font-family: 'TBS Gothic', sans-serif; font-size: 0.66rem; font-weight: 700; color: #868e96; white-space: nowrap; }
.tel-font-btn:hover { border-color: #adb5bd; }
.tel-font-btn.on { border-color: #212529; box-shadow: 0 2px 0 #212529; }
.tel-fx-row { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.tel-fx-phase { flex: none; width: 4.2em; font-size: 0.74rem; font-weight: 900; color: #495057; }
.tel-fx-btn {
  display: inline-flex; align-items: center; gap: 3px; padding: 3px 9px; border-radius: 999px; cursor: pointer; font: inherit;
  font-size: 0.74rem; font-weight: 800; border: 1.5px solid #dee2e6; background: #fff; color: #212529;
}
.tel-fx-btn:hover { border-color: #845ef7; }
.tel-fx-btn.on { background: #845ef7; border-color: #845ef7; color: #fff; }
.tel-fx-dur { display: flex; align-items: center; gap: 8px; font-size: 0.74rem; font-weight: 900; color: #495057; }
.tel-fx-dur input { flex: 1; accent-color: #845ef7; }
.tel-fx-dur b { min-width: 3.6em; text-align: right; }

/* ===== クリップ間の トランジション ===== */
.trans-layer { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
.trans-layer[hidden] { display: none; }
/* タイムラインの つなぎめの ボタン */
.tl-trans {
  flex: 0 0 auto; align-self: center; position: relative; z-index: 3; display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  width: 30px; min-height: 30px; margin: 0 -6px; padding: 2px 0; border-radius: 999px; cursor: pointer; touch-action: none;
  border: 2px dashed rgba(255, 255, 255, 0.75); background: rgba(33, 37, 41, 0.75); color: #fff; font: inherit; line-height: 1;
}
.tl-trans .tl-trans-ic { font-size: 0.85rem; }
.tl-trans small { font-size: 0.55rem; font-weight: 800; margin-top: 2px; }
.tl-trans:hover { background: #5f3dc4; border-style: solid; }
.tl-trans.on { border-style: solid; border-color: #ffd43b; background: #5f3dc4; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35); cursor: ew-resize; }
/* えらぶ ポップ */
.trans-pop {
  position: fixed; z-index: 9500; padding: 12px 14px 12px; border-radius: 16px; background: #fff;
  border: 3px solid #845ef7; box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35); max-height: calc(100vh - 16px); overflow: auto;
}
.trans-pop-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; padding-right: 30px; position: relative; }
.trans-pop-head b { font-size: 1rem; font-weight: 900; }
.trans-pop-head small { font-size: 0.72rem; color: #868e96; font-weight: 700; }
.trans-pop-x { position: absolute; right: -4px; top: -4px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: #f1f3f5; cursor: pointer; font-weight: 900; }
.trans-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.trans-tile {
  display: flex; flex-direction: column; gap: 4px; padding: 5px; border-radius: 12px; cursor: pointer; font: inherit;
  border: 2px solid #dee2e6; background: #f8f9fa; color: #212529; text-align: center;
}
.trans-tile canvas { width: 100%; aspect-ratio: 16 / 9; border-radius: 8px; display: block; background: #000; }
.trans-tile-none { display: grid; place-items: center; aspect-ratio: 16 / 9; border-radius: 8px; background: #e9ecef; font-size: 0.78rem; font-weight: 800; color: #495057; line-height: 1.4; }
.trans-tile-label { font-size: 0.74rem; font-weight: 900; }
.trans-tile:hover { border-color: #b197fc; }
.trans-tile.on { border-color: #845ef7; background: #f3f0ff; box-shadow: 0 2px 0 #845ef7; }
.trans-opts { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px; margin-top: 10px; }
.trans-dur { display: flex; align-items: center; gap: 8px; flex: 1 1 220px; font-size: 0.8rem; font-weight: 900; }
.trans-dur input { flex: 1; accent-color: #845ef7; }
.trans-dirs { display: flex; align-items: center; gap: 4px; font-size: 0.8rem; font-weight: 900; }
.trans-dirs button { width: 30px; height: 28px; border-radius: 8px; border: 1.5px solid #dee2e6; background: #fff; cursor: pointer; font-weight: 900; }
.trans-dirs button.on { background: #845ef7; border-color: #845ef7; color: #fff; }
.trans-note { margin: 8px 0 0; font-size: 0.72rem; color: #868e96; font-weight: 700; }

/* 編集室：並べかえモード */
.st-reorder-btn { background: linear-gradient(180deg, #74c0fc, #339af0); color: #fff; border: 2px solid #fff; font-weight: 900; }
.st-reorder-btn.on { background: linear-gradient(180deg, #69db7c, #2f9e44); }
.st-reorder-hint {
  margin: 6px 0; padding: 6px 12px; border-radius: 10px; background: #e7f5ff; border: 2px dashed #339af0;
  color: #1864ab; font-size: 0.85rem; font-weight: 800;
}
.st-reorder-hint[hidden] { display: none; }
#st-timeline.reorder-mode .tl-card { cursor: grab; outline: 2px dashed rgba(116, 192, 252, 0.9); outline-offset: 2px; }
#st-timeline.reorder-mode .tl-card:active { cursor: grabbing; }
/* 並べかえボタンは タイムラインの すぐ 上（編集室では 道具の 列が かくれて いるため） */
.st-reorder-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0 4px; }
.st-reorder-bar .st-reorder-hint { margin: 0; flex: 1 1 260px; }

/* テロップの 吹き出し：名前（オレンジ）・テロップ（青）・見出し（紫）の ボタンの 色に あわせる */
.studio-bottom.edit-zone .inout-telop-edit.kind-name { --tp-bg1: #fff4e6; --tp-bg2: #ffe8cc; --tp-c: #f76707; --tp-soft: #ffa94d; --tp-ink: #7a3300; }
.studio-bottom.edit-zone .inout-telop-edit.kind-setsumei { --tp-bg1: #e7f5ff; --tp-bg2: #d0ebff; --tp-c: #1971c2; --tp-soft: #74c0fc; --tp-ink: #0b3d73; }
.studio-bottom.edit-zone .inout-telop-edit.kind-side { --tp-bg1: #f3f0ff; --tp-bg2: #e5dbff; --tp-c: #7048e8; --tp-soft: #b197fc; --tp-ink: #3b1f8f; }
.studio-bottom.edit-zone .inout-telop-edit.kind-name,
.studio-bottom.edit-zone .inout-telop-edit.kind-setsumei,
.studio-bottom.edit-zone .inout-telop-edit.kind-side {
  background: linear-gradient(180deg, var(--tp-bg1), var(--tp-bg2)) !important;
  border-color: var(--tp-c) !important; border-left-color: var(--tp-c) !important;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45), 0 0 0 3px color-mix(in srgb, var(--tp-c) 25%, transparent) !important;
}
.studio-bottom.edit-zone .inout-telop-edit.kind-name::before,
.studio-bottom.edit-zone .inout-telop-edit.kind-setsumei::before,
.studio-bottom.edit-zone .inout-telop-edit.kind-side::before { border-bottom-color: var(--tp-c) !important; }
.tablet-compact .studio-bottom.edit-zone .inout-telop-edit.kind-name::before,
.tablet-compact .studio-bottom.edit-zone .inout-telop-edit.kind-setsumei::before,
.tablet-compact .studio-bottom.edit-zone .inout-telop-edit.kind-side::before { border-top-color: var(--tp-c) !important; border-bottom-color: transparent !important; }
.studio-bottom.edit-zone .inout-telop-edit[class*="kind-"] .inout-telop-edit-head { color: var(--tp-ink) !important; }
.studio-bottom.edit-zone .inout-telop-edit[class*="kind-"] .inout-telop-input { border-color: var(--tp-soft) !important; }
.studio-bottom.edit-zone .inout-telop-edit[class*="kind-"] .inout-telop-input:focus { border-color: var(--tp-c) !important; }
.studio-bottom.edit-zone .inout-telop-edit[class*="kind-"] .tel-nudge { background: color-mix(in srgb, var(--tp-c) 12%, transparent) !important; }
.studio-bottom.edit-zone .inout-telop-edit[class*="kind-"] .tel-nudge-label,
.studio-bottom.edit-zone .inout-telop-edit[class*="kind-"] .tel-row-label { color: var(--tp-ink) !important; }

/* タイムラインの つなぎめ：カードに かさならない 専用の はばを とり、まるい マーク＋長さの 札を まんなかに */
.tl-trans {
  position: relative; flex: 0 0 46px; width: 46px; min-height: 0; margin: 0 2px; padding: 0; align-self: center;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  border: 0; border-radius: 0; background: none; box-shadow: none; cursor: pointer; touch-action: none;
}
.tl-trans::before { /* 左右の カードを つなぐ 線 */
  content: ''; position: absolute; left: -2px; right: -2px; top: 16px; height: 2px; border-radius: 2px;
  background: rgba(255, 255, 255, 0.35); z-index: 0;
}
.tl-trans .tl-trans-ic {
  position: relative; z-index: 1; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  font-size: 0.95rem; line-height: 1; color: #fff; background: #2b2f6b; border: 2px dashed rgba(255, 255, 255, 0.7);
  transition: transform 0.12s, background 0.12s;
}
.tl-trans small {
  position: relative; z-index: 1; padding: 1px 6px; border-radius: 999px; white-space: nowrap;
  background: #ffd43b; color: #3b2a00; font-size: 0.62rem; font-weight: 900; line-height: 1.5; margin: 0;
}
.tl-trans:hover { background: none; }
.tl-trans:hover .tl-trans-ic { transform: scale(1.1); background: #5f3dc4; border-style: solid; }
.tl-trans.on { background: none; box-shadow: none; border: 0; cursor: ew-resize; }
.tl-trans.on::before { background: #ffd43b; }
.tl-trans.on .tl-trans-ic { background: linear-gradient(180deg, #9775fa, #6741d9); border: 2px solid #ffd43b; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35); }
.tl-trans:focus-visible { outline: none; }
.tl-trans:focus-visible .tl-trans-ic { outline: 3px solid #ffd43b; outline-offset: 2px; }
/* つなぎめの まるい マーク：絵文字が 円から はみ出ない よう 小さめに まんなかへ */
.tl-trans .tl-trans-ic { overflow: hidden; font-size: 15px; box-sizing: border-box; padding-top: 1px; }
.rsel-card.g-design-test { --g1: #495057; --g2: #7048e8; }

/* ===== 【テスト】デザイン：three.js で 立体の カード（card3d.js）===== */
.design-test .c3d-host { position: relative; }
.design-test .c3d-card { position: relative; z-index: 1; backface-visibility: hidden; -webkit-backface-visibility: hidden; will-change: rotate; }
.design-test .c3d-card:not(.qpk-card) { transition: box-shadow 0.2s; }
.design-test .c3d-canvas { position: absolute; z-index: 0; pointer-events: none; }
/* 親に 遠近（three.js の カメラと おなじ 1000px） */
.design-test .deck-zone-cards, .design-test #st-timeline, .design-test .qpk-cards, .design-test .c3d-host { perspective: 1000px; }
.c3d-flip-btn {
  position: absolute; z-index: 5; left: 6px; bottom: 6px; width: 30px; height: 30px; border-radius: 50%; padding: 0; cursor: pointer;
  display: grid; place-items: center; font-size: 15px; line-height: 1; overflow: hidden;
  border: 2px solid #fff; background: #1b2a6b; color: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}
.c3d-flip-btn:hover { background: #3b5bdb; transform: scale(1.08); }
/* 【テスト】デザイン：さわった カードは すこし うく */
.design-test .c3d-card { transition: scale 0.18s ease-out, box-shadow 0.18s; }
.design-test .c3d-card.c3d-touch { scale: 1.03; box-shadow: 0 14px 28px rgba(0, 0, 0, 0.35); }
/* 【テスト】デザイン：影を すこし 強めて 立体感を 出す（ふだん／さわって ういた とき） */
.design-test .c3d-card { box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.22) !important; }
.design-test .c3d-card.c3d-touch { box-shadow: 0 20px 36px rgba(0, 0, 0, 0.45), 0 6px 12px rgba(0, 0, 0, 0.28) !important; }
/* VTRの流れ：左の 色の 線は 行ぜんたいに（アドバイスで 行が 広がっても 切れない） */
.mp-flow-label { border-left: 0 !important; padding-left: 20px; }
.mp-flow-row { box-shadow: inset 8px 0 0 var(--flow-c, #adb5bd); }
.mp-flow-row.has-adv { box-shadow: inset 8px 0 0 var(--flow-c, #adb5bd), inset 0 0 0 3px #b197fc; }
.adv-stale .mp-flow-row.has-adv { box-shadow: inset 8px 0 0 var(--flow-c, #adb5bd), inset 0 0 0 3px #ced4da; }
/* 音楽の「大きさ」：音楽が なしの ときも 場所は のこす（えらんでも 位置が うごかない） */
.inout-bgm-vol.is-off { visibility: hidden; pointer-events: none; }
/* 音楽の 帯の 場所は いつも とって おく（音楽を えらんでも タイムラインの 高さが かわらず、下の わくが うごかない） */
.studio #st-timeline:not(:empty) { padding-bottom: 34px !important; }
/* カットパックの カード：さわれる ように（入れものは pointer-events:none）。影は おもて面に つける */
.design-test .qpk-card.c3d-card { pointer-events: auto; box-shadow: none !important; border-radius: 10px; }
.design-test .qpk-card.c3d-card .qpk-front { transition: box-shadow 0.18s; }
.design-test .qpk-card.c3d-touch .qpk-front { box-shadow: 0 20px 36px rgba(0, 0, 0, 0.6), 0 6px 12px rgba(0, 0, 0, 0.35); }

/* 「クリックで さつえい」の 光（かげ）が 下の「目的」に かからない ように、すこし はなす */
.pcard.pcard > .pcard-shoot:not(.brand) { margin-bottom: 14px; }

/* テロップの 吹き出し：入力らんを いちばん上に（右に「消す」「完成」） */
.studio-inspector .inout-telop-edit-head { align-items: flex-start !important; }
.tel-pop-inputs { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.studio-inspector .inout-telop-edit .tel-pop-inputs .inout-telop-input { width: 100%; box-sizing: border-box; margin: 0 !important; }
.tel-pop-acts { flex: 0 0 auto; }
/* 名前テロップ：どちらが「かたがき」「名前」か わかる ように 左に ラベル */
.tel-in-row { display: flex; align-items: center; gap: 8px; margin: 0; }
.tel-in-label { flex: 0 0 4.8em; font-size: 0.95rem; font-weight: 900; color: var(--tp-ink, #333); text-align: right; }
.studio-inspector .inout-telop-edit .tel-pop-inputs .tel-in-row .inout-telop-input { flex: 1 1 auto; width: auto; min-width: 0; }

/* テロップの 種類ボタン：セットして いない ときは 白っぽい（点線の わく）。セットすると その色が つく */
.studio-inspector .inout-telop-kind:not(.selected) {
  background: rgba(255, 255, 255, 0.92) !important; color: #868e96 !important;
  border: 2px dashed #adb5bd !important; box-shadow: none !important;
}
.studio-inspector .inout-telop-kind:not(.selected) > span:first-child { filter: grayscale(1) opacity(0.55) !important; }
.studio-inspector .inout-telop-kind.selected { color: #fff !important; border: 2px solid #fff !important; }
.studio-inspector .inout-telop-kind.selected::after { content: '✓ セット中' !important; }

/* 編集の わくの 見出しラベル：紺の 背景と まざらない よう、明るい 黄色に こい 文字 */
.studio-inspector .inout-telop-title, .studio-inspector .inout-fx-title, .studio-inspector .inout-clock-title, .studio-inspector .inout-trim-title {
  background: linear-gradient(180deg, #ffe066, #fcc419) !important; color: #2b1d00 !important;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.35) !important; text-shadow: none !important;
}
.studio-inspector .inout-telop-title small, .studio-inspector .inout-fx-title small, .studio-inspector .inout-clock-title small, .studio-inspector .inout-trim-title small { color: #5c4300 !important; }
.studio-inspector .inout-fx-toggle .fx-toggle-tx { background: #2b1d00 !important; color: #ffe066 !important; }
.studio-inspector .inout-fx-toggle .fx-on-chips i { background: #fff !important; color: #2b1d00 !important; }
.inout-bgm-body[hidden] { display: none !important; }
.studio-inspector .inout-fx-toggle .bgm-on-chip[hidden] { display: none !important; }

/* タイムラインの カード：絵の まどを たてに 長く（16:8.2 → 16:10.5） */
.studio .tl-card .tl-card-window { aspect-ratio: 16 / 10.5 !important; }

/* シールを はる 演出（three.js）の キャンバス */
.sticker3d-layer { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 9000; }
/* シールが はりついた しゅんかん、カードが すこし しずむ */
.sticker3d-hit { animation: sticker3d-hit 0.4s ease-out; }
@keyframes sticker3d-hit { 0% { transform: scale(1); } 30% { transform: scale(0.94); } 70% { transform: scale(1.03); } 100% { transform: scale(1); } }
/* テロップの 入力らん：右下の のばす つまみは 出さない（2行まで なので） */
.inout-telop-edit textarea.inout-telop-input { resize: none !important; }
/* 演出の あと、カードの シールが ぽんっと あらわれる */
.tl-card-sticker.sticker3d-pop { animation: sticker3d-pop 0.3s ease-out; }
@keyframes sticker3d-pop { 0% { opacity: 0.2; } 100% { opacity: 1; } }

/* カットリスト（起承転結）：きかくと おなじ ねらいの はこ */
.deck-zone-aim { max-width: 100%; }
.deck-zone-aim .mp-flow-aim { margin-top: 0 !important; background: rgba(255, 255, 255, 0.95) !important; }
.zone-起 { --flow-c: #1c7ed6; } .zone-承 { --flow-c: #f59f00; } .zone-転 { --flow-c: #7048e8; } .zone-結 { --flow-c: #d6336c; }

/* シールが 2まい いじょう：1まいの ときと おなじ 大きさの シールを、すこし かさねて たてに ならべる */
.tl-card .tl-card-stickers { position: absolute; right: 4px; bottom: 4px; display: flex; flex-direction: column; align-items: flex-end; z-index: 3; }
.tl-card .tl-card-flag ~ .tl-card-stickers { bottom: 26px; }
.tl-card .tl-card-stickers .tl-card-sticker.in-stack { position: relative !important; right: auto !important; bottom: auto !important; inset: auto !important; flex: none; }
.tl-card .tl-card-stickers .tl-card-sticker.in-stack + .tl-card-sticker.in-stack { margin-top: -8px; }
.tl-card .tl-card-stickers .st-n1 { transform: rotate(4deg) translateX(-6px) !important; }
.tl-card .tl-card-stickers .st-n2 { transform: rotate(-3deg) !important; }
/* さつえいスタジオの ねらい：カードの 下に。「🎯 ねらい」の ラベルは 出さない */
.deck-zone-aim .mp-flow-aim .aim-tag { display: none !important; }
.deck-zone-aim { align-self: stretch; }

/* 「クリックで さつえい」の カメラ：どの カードでも おなじ 大きさ。ホバーしても 大きさは かわらない */
.pcard-shoot .shoot-ic { display: inline-block; width: 1.3em; margin-right: 4px; font-size: 18px !important; line-height: 1; vertical-align: -2px; text-align: center; transform: none !important; }
.pcard.pcard > .pcard-shoot:not(.brand), .pcard.pcard > .pcard-shoot:not(.brand):hover, .pcard.pcard > .pcard-shoot:not(.brand):active { transform: none !important; scale: none !important; filter: none !important; }
.pcard.pcard > .pcard-shoot:not(.brand):hover { background: linear-gradient(180deg, #ffa94d 0%, #fa5252 100%); }
.pcard.shot.pcard > .pcard-shoot:not(.brand):hover { background: linear-gradient(180deg, #74c0fc 0%, #1c7ed6 100%); }

/* さわった ときの うごきを なくしたので、カード（カットパック いがい）は ふつうの 平らな 描き方に もどす。
   遠近（perspective）や will-change が あると、ブラウザに よって 絵文字（📷）の 大きさや にじみが カードごとに かわる */
.design-test .deck-zone-cards, .design-test #st-timeline, .design-test .c3d-host:not(.qpk-cards) { perspective: none !important; }
.design-test .c3d-card:not(.qpk-card) { will-change: auto !important; backface-visibility: visible !important; -webkit-backface-visibility: visible !important; rotate: none !important; scale: none !important; }
/* 「クリックで さつえい」：カメラと 文字を たての まんなかで そろえる */
.pcard.pcard > .pcard-shoot:not(.brand) { display: flex !important; align-items: center; justify-content: center; gap: 4px; line-height: 1.2; }
.pcard-shoot .shoot-ic { vertical-align: 0 !important; margin-right: 0 !important; display: inline-flex !important; align-items: center; justify-content: center; height: 1.2em; }

/* 「✕ 外す」は 映像に かからない よう、下の「目的・場所」の 列の 右はしに おく */
.studio .tl-card .tl-card-purpose { display: flex !important; align-items: center; gap: 4px; min-width: 0; }
.studio .tl-card .tl-card-purpose > b { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.studio #st-timeline.reorder-mode .tl-card .tl-card-purpose > .tl-card-del {
  display: inline-flex !important; position: static !important; margin-left: auto; flex: none; align-items: center; gap: 2px;
  width: auto !important; height: 20px !important; padding: 0 8px !important; border-radius: 999px !important; border-width: 2px !important;
  font-size: 0.66rem !important; white-space: nowrap; transform: none !important; align-self: center !important; margin-top: 0 !important; margin-bottom: 0 !important; height: 18px !important; top: auto !important; inset: auto !important;
}
.studio #st-timeline.reorder-mode .tl-card .tl-card-purpose > .tl-card-del::after { content: '外す'; }
/* まだ とって いない カードは 下の 列が 白黒に なるが、「外す」は 赤い まま */
.studio .tl-card.unshot > .tl-card-purpose { filter: none !important; }
.studio .tl-card.unshot > .tl-card-purpose > :not(.tl-card-del) { filter: grayscale(1); }
/* 「外す」は 並べかえモードの ときだけ（どの カードにも 出す） */

/* シールは 1まいめ と おなじ 場所・角度の まま。2まいめ・3まいめは その 上に ずらして はる */
.tl-card .tl-card-sticker.st-n1 { bottom: 30px !important; right: 12px !important; transform: rotate(4deg) !important; z-index: 4 !important; }
.tl-card .tl-card-sticker.st-n2 { bottom: 56px !important; right: 2px !important; transform: rotate(-2deg) !important; z-index: 5 !important; }
.tl-card .tl-card-flag ~ .tl-card-sticker.st-n1 { bottom: 52px !important; }
.tl-card .tl-card-flag ~ .tl-card-sticker.st-n2 { bottom: 78px !important; }

/* 「カットを並べかえる」ボタンと カードの あいだを つめる */
.studio.layout-edit #st-timeline { padding-top: 12px !important; }
/* 「はじめとおわり」ラベルの 上に すこし すきまを */
.studio-inspector .inout-trim-title { margin-top: 6px !important; }



/* テロップ・時計の ボタン：へんしゅうの わくが せまい とき（iPad など）は 2れつ×2だんに する（文字が おれない） */
.studio-inspector .inout-telop { container-type: inline-size; }
@container (max-width: 560px) {
  .studio-inspector .inout-telop-kinds.tc-row { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
.studio-inspector .inout-telop-kind, .studio-inspector .inout-clock .clk-txt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 上の 部屋ボタン：1・2… の 番号は 出さず、そのぶん 低く */
.tvst-room .tvst-room-text > small { display: none !important; }
.tvst-room { padding-top: 3px !important; padding-bottom: 3px !important; }

/* ===== カメラ：ズーム ===== */
.cam-zoom {
  position: absolute; z-index: 6; right: 12px; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 6px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.45); backdrop-filter: blur(4px); cursor: default; touch-action: none;
}
.cam-zoom-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.85); padding: 0;
  background: rgba(255, 255, 255, 0.15); color: #fff; font: inherit; font-size: 1.3rem; font-weight: 900; line-height: 1; cursor: pointer;
}
.cam-zoom-btn:active { background: rgba(255, 255, 255, 0.4); }
.cam-zoom-range { writing-mode: vertical-lr; direction: rtl; width: 28px; height: 120px; margin: 0; accent-color: #ffd43b; cursor: pointer; }
.cam-zoom-val { color: #ffd43b; font-size: 0.8rem; font-weight: 900; font-variant-numeric: tabular-nums; }
#cam-video { transition: scale 0.08s linear; }
.cutcard-camera-wrap.recording .cam-zoom { background: rgba(224, 49, 49, 0.35); }

/* ===== カメラ：右の「とり方」の 欄を くずれない ように ===== */
.studio-camera .cam-guide-head { flex-wrap: wrap !important; align-items: center; row-gap: 6px; }
.studio-camera .cam-guide-head .cam-guide-title { order: 2; flex: 1 0 100% !important; writing-mode: horizontal-tb; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.studio-camera .cam-guide-head .cam-flip-btn { order: 1; margin-left: auto; }
.studio-camera .cam-guide-head .cam-close-corner { order: 1; }
.studio-camera .cam-guide { overflow-y: auto !important; overscroll-behavior: contain; scrollbar-width: thin; min-width: 0; }
.studio-camera .cam-guide-step { min-width: 0; }
.studio-camera .cam-guide-step > div { min-width: 0; overflow-wrap: anywhere; }
/* さつえいボタンの カメラは 絵文字では なく 図（どの 端末でも 文字と おなじ 高さ・大きさ） */
.pcard-shoot svg.shoot-ic { display: block !important; flex: none; width: 20px !important; height: 20px !important; margin: 0 !important; font-size: inherit !important; }
.pcard.shot .pcard-shoot svg.shoot-ic circle[fill="#e03131"] { fill: #1971c2; }
/* ズームの つまみを たてに 長く（映像の たかさに あわせて 140〜260px） */
.cam-zoom-range { height: clamp(140px, 26vh, 220px) !important; }
.cam-zoom { top: calc(50% + 16px) !important; }

/* カメラ画面：とり方の 例を 左、カメラを 右に（列の じゅんばんだけ 入れかえる。せまい 画面の たて ならびは そのまま） */
.studio-camera-body { direction: rtl; }
.studio-camera-body > * { direction: ltr; }

/* カメラの「とり方」：①②③ の 番号は 出さない */
.cam-guide-step > .cam-guide-no { display: none !important; }

/* アプリ名を AI for School スタジオに：英字は 字間を つめる */
.brand-name { letter-spacing: 0.5px; }
.brand-sub { font-size: 0.9rem; letter-spacing: 1px; }
.qpk-body > b { letter-spacing: 0; white-space: nowrap; }
.tvst-name { white-space: nowrap; }

/* 並べかえモード：◀ 並べかえ ▶ を 映像に かさねず、カードの いちばん下に おく（カードが 縦に のびる） */
.studio #st-timeline.reorder-mode .tl-card > .tl-move {
  position: relative !important; inset: auto !important; order: 10; flex: none;
  margin: 6px 0 2px !important;
}

/* ◀ の 矢印が 白く なって 見えにくい（span の 白文字が うつって いた）→ ▶ と おなじ こい 色に */
.studio .tl-card > .tl-move button .ic-flip { color: #2b1d00 !important; text-shadow: none !important; }
.studio .tl-card > .tl-move button:disabled .ic-flip { color: rgba(255, 255, 255, 0.5) !important; }

/* アプリ名：「スタジオ」を 主役に、「AI for School」は 小さく 前に */
.brand { align-items: baseline; gap: 6px; }
.brand-pre { font-size: 0.82rem; font-weight: 800; letter-spacing: 0.5px; opacity: 0.9; }
.brand-name { font-size: 1.55rem; font-weight: 900; letter-spacing: 3px; color: #ffe066; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.25); }
@media (max-width: 600px) { .brand-pre { font-size: 0.7rem; } .brand-name { font-size: 1.3rem; } }
.tvst-name .tvst-pre { font-size: 0.68em; font-weight: 800; opacity: 0.85; margin-right: 4px; letter-spacing: 0; }
.rsel-hero h1 small.rsel-pre { margin: 0 6px 0 2px; font-size: 0.55em; font-weight: 800; color: var(--dark); opacity: 0.75; letter-spacing: 0.5px; }
.rsel-hero h1 b { font-size: 1.25em; letter-spacing: 4px; }
.qpk-body > small.qpk-pre { font-size: 0.62rem; font-weight: 800; opacity: 0.9; letter-spacing: 0.5px; }
.qpk-body > b { font-size: 1.5rem; letter-spacing: 3px; }

/* アプリ名：「AI for School」と「スタジオ」の 大きさの 差を ちぢめる */
.brand-pre { font-size: 1.05rem; opacity: 1; }
.brand-name { font-size: 1.4rem; letter-spacing: 2px; }
@media (max-width: 600px) { .brand-pre { font-size: 0.85rem; } .brand-name { font-size: 1.15rem; } }
.rsel-hero h1 small.rsel-pre { font-size: 0.8em; opacity: 0.85; margin: 0 6px 0 2px; }
.rsel-hero h1 b { font-size: 1.08em; letter-spacing: 2px; }
.tvst-name .tvst-pre { font-size: 0.85em; }
.qpk-body > small.qpk-pre { font-size: 0.78rem; }
.qpk-body > b { font-size: 1.35rem; letter-spacing: 2px; }

/* VTRの流れ：表らしく（罫線で 区切る） */
@media (min-width: 761px) {
  .mp-flow { --flow-cols: minmax(0, 55fr) minmax(0, 45fr) 44px; --rule: #ced4da; --rule-strong: #adb5bd; border: 2px solid var(--rule-strong); border-radius: 12px; }
  .mp-flow-head { border-bottom: 2px solid var(--rule-strong); }
  .mp-flow-head > span:first-child { border-right: 2px solid var(--rule-strong); }
  .mp-flow-head-cols { padding: 0 !important; column-gap: 0 !important; }
  .mp-flow-head-cols > span { padding: 8px 12px !important; }
  .mp-flow-head-cols > span + span { border-left: 1px solid var(--rule); }
  .mp-flow-row { border-top: 0; }
  .mp-flow-row + .mp-flow-row { border-top: 2px solid var(--rule-strong); }
  .mp-flow-label { border-right: 2px solid var(--rule-strong); }
  .mp-flow-items { padding: 0 !important; gap: 0 !important; background: #fff; }
  .mp-flow-cells { column-gap: 0 !important; align-items: stretch !important; }
  .mp-flow-cells + .mp-flow-cells { border-top: 1px dashed var(--rule); }
  .mp-flow-cells > textarea.mp-item, .mp-flow-cells > .mp-narr-cell { margin: 0; }
  .mp-flow-cells > textarea.mp-item { padding: 10px 12px; }
  .mp-flow-cells > .mp-narr-cell { border-left: 1px solid var(--rule); padding: 0 0 4px; display: flex; flex-direction: column; }
  .mp-flow-cells > .mp-narr-cell textarea { padding: 10px 12px; }
  .mp-flow-cells > .mp-narr-cell .narr-len { padding-right: 10px; }
  .mp-flow-cells .mp-item { border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; }
  .mp-flow-cells .mp-item:focus { box-shadow: inset 0 0 0 3px rgba(250, 176, 5, 0.6) !important; background: #fffdf3 !important; }
  .mp-flow-cells.fixed .mp-item { background: #fff4e6 !important; }
  .mp-flow-cells > .mp-item-x { align-self: center; justify-self: center; width: 32px; height: 32px; margin: 0 !important; }
}
@media (min-width: 761px) { .mp-flow-head-cols > span:nth-child(3) { border-left: 0; } }

/* 生徒の はじめの 画面：起承転結・ひとりで だけ 大きく、ほかは「さらに表示する」で */
.rsel-grid.sh-main { grid-template-columns: minmax(0, 420px); justify-content: center; }
.sh-more-wrap { display: flex; justify-content: center; margin: 18px 0 6px; }
.sh-more-btn { padding: 10px 26px; border-radius: 999px; border: 2px solid #ced4da; background: #fff; color: #495057; font-weight: 900; font-size: 0.95rem; cursor: pointer; }
.sh-more-btn:hover { border-color: #868e96; color: #212529; }
.sh-more[hidden] { display: none !important; }

/* 撮影スタジオ：どの テイクを 採用するか えらぶ */
.pcard-takes { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin: 6px 0 0; }
.pcard-takes-tag { padding: 2px 8px; border-radius: 999px; background: #212529; color: #fff; font-size: 0.68rem; font-weight: 900; }
.pcard-take-btn { padding: 3px 9px; border-radius: 8px; border: 2px solid #ced4da; background: #fff; color: #495057; font-size: 0.74rem; font-weight: 900; cursor: pointer; }
.pcard-take-btn:hover { border-color: #868e96; }
.pcard-take-btn.selected { border-color: #f59f00; background: #ffd43b; color: #2b1d00; box-shadow: 0 2px 0 #b07800; }
.pcard-take-btn.selected::before { content: '✓ '; }
/* 罫線を 行の 下まで のばす（起承転結の ねらいで 行が 高く なっても 切れない） */
@media (min-width: 761px) {
  .mp-flow-row > .mp-flow-items { align-self: stretch !important; height: auto !important; display: flex !important; flex-direction: column; }
  .mp-flow-items > .mp-flow-cells { flex: 1 1 auto; }
}

/* 起承転結（説明文なし）：「例を見る」が 下の わくに かぶらない ように すきまを あける */
.mp-titlebar + .mp-form-outer { margin-top: 18px; }

/* ねらいの 色は 場面に かかわらず 1色に そろえる（はばも そろえる） */
.mp-flow-aim { --flow-c: #4c6ef5 !important; border-color: #bac8ff !important; width: 100%; box-sizing: border-box; }

/* 「ねらい」の ことばは 出さない */
.mp-flow-aim .aim-tag { display: none !important; }

/* ねらいの 説明：わく・背景を なくして 文字だけに */
.mp-flow-row .mp-flow-aim { padding: 0 !important; background: none !important; box-shadow: none !important; border: 0 !important; border-radius: 0 !important; margin-top: 6px !important; }

/* プロの アドバイス：場面の 紫の わくは 出さない。ふきだしは 表の マスの 中に */
.mp-flow-row.has-adv, .adv-stale .mp-flow-row.has-adv { box-shadow: none !important; }
.mp-flow-items > .mp-adv-pop { flex: none; margin: 4px 10px 10px; }

/* プロの アドバイス：該当の マスの 中だけに（映すもの なら 左の マス、話すこと なら 右の マス） */
.mp-adv-pop.in-cell { --tail-x: 50% !important; grid-column: auto; margin: 2px 10px 10px !important; }
.mp-flow-cells.has-shot-adv > .mp-narr-cell { grid-row: 1 / span 2; grid-column: 2; }
.mp-flow-cells.has-shot-adv > .mp-item-x { grid-row: 1; grid-column: 3; }
.mp-flow-cells > .mp-adv-pop.in-shot { grid-column: 1; grid-row: 2; }
@media (max-width: 760px) { .mp-flow-cells.has-shot-adv > .mp-narr-cell, .mp-flow-cells > .mp-adv-pop.in-shot { grid-row: auto; grid-column: auto; } }

/* 番組素材：注意書きを なくしたので、時計ボタンは 文字が 見切れない はばで */
.studio-inspector .inout-telop-kinds.tc-row.no-telop { grid-template-columns: max-content !important; }
.studio-inspector .inout-telop-kinds.tc-row.no-telop .inout-clock { width: auto; }
.studio-inspector .inout-telop-kinds.tc-row.no-telop .clk-txt { overflow: visible; text-overflow: clip; white-space: nowrap; }

/* 企画の表：✕ が ない ときは 右の あまりの 列を なくす */
@media (min-width: 761px) {
  .mp-flow:not(:has(.mp-item-x)) { --flow-cols: minmax(0, 55fr) minmax(0, 45fr) 0px; }
}
/* アドバイスが あっても 場面の 左の 色は のこす */
.mp-flow-row.has-adv, .adv-stale .mp-flow-row.has-adv { box-shadow: inset 8px 0 0 var(--flow-c, #adb5bd) !important; }
/* 2つの わくの 上の 色の 線は なくす（ほかの 色と まざるので） */
.mp-zone { border-top: 0 !important; }

/* タイムラインの カード：左上の 番号は 出さない */
.tl-card .tl-card-top > .cut-tl-num { display: none !important; }

/* 音楽：音量（大きさ）の 列を CDの 下に すこし はなす */
.inout-bgm-vol { margin-top: 14px !important; }
.inout-bgm-list { padding-bottom: 4px; }
/* 編集欄の 見出し：シール・音楽（ボタン）も テロップ・時計と おなじ 文字の 太さに */
.studio-inspector .inout-fx-toggle, .studio-inspector .inout-fx-toggle small { font-weight: 900 !important; }

/* カメラ：画面の 四つ角の かぎかっこは 出さない */
.studio-camera .cam-vf { display: none !important; }

/* 秒は 数字の 右に */
.pcard-sec small { margin-right: 0; margin-left: 1px; }
/* 撮影スタジオ：「カットを確定して編集へ」は 赤 */
.shoot-confirm-btn, .shoot-confirm.at-top .shoot-confirm-btn { background: linear-gradient(180deg, #ff6b6b, #e03131) !important; box-shadow: 0 3px 0 #a51111, 0 4px 10px rgba(224, 49, 49, 0.3) !important; }
.shoot-confirm-btn:active { box-shadow: 0 1px 0 #a51111 !important; }

/* きかくの まとめ（きかくを見る・ふりかえり）：いまの きかく会議と おなじ 形 */
.psum { padding: 14px 16px; border-radius: 16px; background: #fff; border: 2px solid #dee2e6; color: #212529; text-align: left; }
.plan-pop .psum.plan-pop-memo { padding-right: 44px; }
.psum-sec + .psum-sec { margin-top: 14px; }
.psum-h { margin: 0 0 8px; font-size: 1rem; font-weight: 900; color: #212529; }
.psum-meta { margin: 0; display: grid; gap: 6px; }
.psum-meta > div { padding: 6px 10px; border-radius: 10px; background: #f8f9fa; }
.psum-meta dt { font-size: 0.74rem; font-weight: 800; color: #495057; }
.psum-meta dd { margin: 2px 0 0; font-size: 0.92rem; font-weight: 800; line-height: 1.5; }
.psum-empty { color: #adb5bd; font-weight: 700; }
.psum-flow { width: 100%; border-collapse: collapse; font-size: 0.86rem; line-height: 1.5; border: 2px solid #adb5bd; }
.psum-flow th, .psum-flow td { padding: 6px 8px; border: 1px solid #ced4da; vertical-align: top; text-align: left; font-weight: 700; }
.psum-flow thead th { background: #f1f3f5; font-size: 0.78rem; font-weight: 900; color: #495057; }
.psum-flow tbody th { width: 5.5em; font-weight: 900; box-shadow: inset 5px 0 0 var(--flow-c, #adb5bd); padding-left: 12px; }
.psum-flow .mp-col-hajime th, .psum-flow .mp-col-ki th { --flow-c: #339af0; background: #f3f9ff; }
.psum-flow .mp-col-naka th, .psum-flow .mp-col-sho th { --flow-c: #f59f00; background: #fffcf0; }
.psum-flow .mp-col-ten th { --flow-c: #7048e8; background: #f8f5ff; }
.psum-flow .mp-col-owari th, .psum-flow .mp-col-ketsu th { --flow-c: #e64980; background: #fff5f9; }

/* カメラ：「このカットのとり方」を スライドで かくす／出す */
.studio-camera-body { transition: grid-template-columns 0.35s ease, column-gap 0.35s ease; }
.studio-camera-body > .cam-guide { transition: transform 0.35s ease, opacity 0.25s ease; }
.studio-camera-body.guide-off { grid-template-columns: minmax(0, 1fr) 0px !important; column-gap: 0 !important; }
.studio-camera-body.guide-off > .cam-guide { transform: translateX(-110%); opacity: 0; pointer-events: none; overflow: hidden; }
.cam-guide-head .cam-guide-hide { color: #1c7ed6; }
.cam-guide-show { display: none; position: absolute; z-index: 6; left: 12px; top: 12px; gap: 8px; }
.studio-camera-body.guide-off .cam-guide-show { display: flex; animation: cam-guide-show-in 0.3s ease; }
.cam-guide-show .cam-close-btn { min-height: 40px; padding: 0 14px; font-size: 0.92rem; }
.cam-guide-show #cam-guide-show { color: #1c7ed6; }
.cam-guide-show [data-cam-proxy="cam-flip"] { color: #1c7ed6; }
@keyframes cam-guide-show-in { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: none; } }
.studio-camera-body.guide-off .cam-rec-badge { left: auto; }
@media (max-width: 900px) { .studio-camera-body.guide-off > .cam-guide { display: none; } }

/* きかくを見る：まとめと ボタンを ひとつの わくに。ボタン（直す・閉じる）は いつも 下に 見える */
.plan-pop .plan-pop-box:has(.psum) {
  display: flex; flex-direction: column; overflow: hidden !important;
  background: #fff; border: 2px solid #dee2e6; border-radius: 16px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}
.plan-pop .plan-pop-box:has(.psum) > .psum { flex: 1 1 auto; min-height: 0; overflow-y: auto; border: 0; border-radius: 0; box-shadow: none; }
.plan-pop .plan-pop-box:has(.psum) > .plan-pop-foot { flex: none; margin: 0; border-radius: 0; box-shadow: none; background: #f8f9fa; border-top: 1px solid #dee2e6; }

/* キューシート：番号なし（列を ひとつ へらす）・ナレーションは 2行でも ぜんぶ 見せる */
.oa-cue-row { grid-template-columns: 96px minmax(0, 1fr) auto auto; }
@media (max-width: 760px) { .oa-cue-row { grid-template-columns: 72px minmax(0, 1fr) auto; } }
.oa-cue-side .oa-cue-row { grid-template-columns: auto minmax(0, 1fr) auto !important; }
.oa-cue-side .oa-cue-list { grid-auto-rows: auto !important; }
.oa-cue-side .oa-cue-row { min-height: auto !important; }
.oa-cue-side .oa-cue-body { min-height: 48px; justify-content: center; }
.oa-cue-side .oa-cue-body { overflow: visible; }
.oa-cue-side .oa-cue-body .oa-cue-narr { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; line-height: 1.4; }
/* 行の 高さを なかみに あわせる（ナレーションが 何行でも 切れない） */
.oa-cue-side .oa-cue-list { align-content: start !important; }
.oa-cue-side .oa-cue-row { container-type: inline-size !important; height: auto !important; align-items: center; }
.oa-cue-side .oa-cue-thumb { height: auto !important; width: clamp(72px, 28cqw, 120px) !important; max-width: none !important; max-height: none !important; }
.oa-cue-side .oa-cue-body b { font-size: clamp(0.85rem, 4.5cqw, 1.05rem) !important; }
.oa-cue-side .oa-cue-body .oa-cue-tel, .oa-cue-side .oa-cue-body .oa-cue-narr { font-size: clamp(0.72rem, 3.6cqw, 0.85rem) !important; }
.oa-cue-side .oa-cue-sec { font-size: clamp(0.75rem, 3.8cqw, 0.95rem) !important; }
.oa-cue-side .oa-cue-body span { font-size: clamp(0.72rem, 3.6cqw, 0.9rem) !important; }

/* プロの アドバイス：行の 頭の ○ は 出さない */
.mp-adv-pop ul { list-style: none !important; padding-left: 0 !important; }

/* きかく書 → カットパックの 3D演出 */
.plan2pack3d-layer { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 1350; pointer-events: none; }
.qpk-overlay.p2p-wait .qpk-pack, .qpk-overlay.p2p-wait .qpk-text { opacity: 0; }
.qpk-overlay .qpk-pack, .qpk-overlay .qpk-text { transition: opacity 0.18s ease; }
.qpk-overlay { animation: qpk-ov-in 0.35s ease both; }
@keyframes qpk-ov-in { from { opacity: 0; } to { opacity: 1; } }
.qpk-overlay.p2p-wait .qpk-pack, .qpk-overlay.p2p-wait .qpk-text { visibility: hidden; }

/* きかくを見る：画面の 右はしから スライド。うしろの 画面も さわれる */
.plan-pop.is-drawer { background: transparent !important; pointer-events: none; backdrop-filter: none !important; }
.plan-pop.is-drawer .plan-pop-box {
  pointer-events: auto; position: fixed !important; top: 0 !important; right: 0 !important; bottom: 0 !important; left: auto !important;
  width: min(520px, 92vw) !important; max-height: none !important; height: 100svh;
  border-radius: 18px 0 0 18px !important; border-right: 0 !important; transform: none;
  animation: plan-drawer-in 0.28s cubic-bezier(.2, .9, .3, 1) both !important;
}
.plan-pop.is-drawer .plan-pop-box::before { display: none !important; }
.plan-pop.is-drawer.closing .plan-pop-box { animation: plan-drawer-out 0.22s ease-in both !important; }
@keyframes plan-drawer-in { from { transform: translateX(105%); } to { transform: none; } }
@keyframes plan-drawer-out { from { transform: none; } to { transform: translateX(105%); } }

/* 撮影スタジオ：「完了！」は カードの 上の まんなかに、すこし はみ出して */
.pcard { position: relative; overflow: visible !important; }
.pcard .pcard-top > .pcard-shot-badge.top {
  position: absolute !important; top: -13px; left: 50%; transform: translateX(-50%); z-index: 6;
  padding: 4px 14px; font-size: 0.85rem; border: 2px solid #fff; box-shadow: 0 3px 0 #1b5e20, 0 4px 10px rgba(0, 0, 0, 0.25); white-space: nowrap;
}
.pcard .pcard-top > .pcard-shot-badge.top.pending { background: #f08c00; box-shadow: 0 3px 0 #a35200, 0 4px 10px rgba(0, 0, 0, 0.25); }

/* PCの カメラ：左の とり方を せまく、カメラを 大きく（カンペの 文字を すこし 小さく して たかさを あける） */
@media (min-width: 901px) {
  html:not(.tablet-compact) .studio-camera-body { grid-template-columns: minmax(0, 1fr) clamp(250px, 21vw, 340px); }
  html:not(.tablet-compact) .studio-camera .studio-camera-main .cutcard-camera-wrap,
  html:not(.tablet-compact) .studio-camera-main .cam-kanpe { width: min(100cqw, calc((100cqh - 230px) * 16 / 9)); }
  html:not(.tablet-compact) .cam-kanpe-text { font-size: clamp(1.15rem, 1.7vw, 1.6rem); line-height: 1.4; }
  html:not(.tablet-compact) .cam-kanpe { padding: 10px 12px 6px; }
}
/* とり方を かくした ときの ボタン：カメラの 上に かさねず、左の あいた ところに たてに ならべる */
.cam-guide-show { position: absolute; left: 0; top: 0; z-index: 6; flex-direction: column; align-items: stretch; gap: 8px; width: 128px; }
.studio-camera-body.guide-off .cam-guide-show { display: flex; }
.studio-camera-body.guide-off .studio-camera-main { padding-left: 140px; box-sizing: border-box; }
.cam-guide-show .cam-close-btn { justify-content: center; }
@media (max-width: 900px) { .studio-camera-body.guide-off .studio-camera-main { padding-left: 0; } .cam-guide-show { position: static; flex-direction: row; width: auto; margin-bottom: 8px; } }
@media (min-width: 901px) { html:not(.tablet-compact) .cam-guide-head .cam-close-btn { min-height: 38px; padding: 0 12px; font-size: 0.85rem; gap: 4px; } }

/* カットパックを 大きく（きかく書の 3D演出も この 大きさに あわせる） */
.qpk-overlay .qpk-pack { zoom: 1.35; }
/* 「完了！」は カードの なまえに かからない ように もう すこし 上に */
.pcard .pcard-top > .pcard-shot-badge.top { top: -22px !important; }

/* ふりかえり：左右の よはくを へらして ひろく */
.rf { max-width: min(1760px, 100%) !important; padding-left: 24px; padding-right: 24px; }
/* 「完了！」：カードから もう すこし 上に はなす */
.pcard .pcard-top > .pcard-shot-badge.top { top: -30px !important; }

/* [CA-3] 生成 AI を出さない環境（body.no-ai）：AI のボタンと処理パネルを隠し、カード裏の AI のロゴを外す */
body.no-ai .btn.ai, body.no-ai .deck-tab.ai, body.no-ai [data-sb-ai-open], body.no-ai [data-ai-image], body.no-ai [data-cut-ai],
body.no-ai #sketch-modal-ai, body.no-ai #telop-add-ai, body.no-ai #telop-ai-generate, body.no-ai #ai-tasks-widget,
body.no-ai .flip-method-row label:has(input[value="ai"]) { display: none !important; }
body.no-ai .pcard-back-emblem img { display: none; }
body.no-ai .pcard-back-emblem::after { content: '📺'; font-size: 4.2rem; line-height: 1; }
body.no-ai .qpk-emblem::after { font-size: 2.2rem; }
/* [CA-3] 11/26 の版の アプリ名「AI for School スタジオ」：AI を出さない環境では「AI for School」を隠し、「スタジオ」だけ見せる */
body.no-ai .brand-pre, body.no-ai .tvst-pre, body.no-ai .rsel-pre, body.no-ai .qpk-pre { display: none !important; }
/* [CA-3] 環境が分かる（loadSession が終わる＝body.session-ready）まで「AI for School」の字は隠す（ログインの前に一瞬 見えないように） */
body:not(.session-ready) .brand-pre, body:not(.session-ready) .tvst-pre, body:not(.session-ready) .rsel-pre, body:not(.session-ready) .qpk-pre { visibility: hidden; }
/* [CA-8] 起承転結の 場面の 名前に 添える 字（起・承・転・結） */
/* [CA-8] 書いたあとの 助言で 案（1マスずつ）が あるときは、表に かさねず、表の 上に ふつうの わくで 出す（11/26 の 版の 重ねる わくでは 入りきらない） */
.mp-zone-flow > .mp-advice:has(.mp-sugs) { position: relative; top: auto; right: auto; width: auto; margin: 0 0 12px; flex-wrap: wrap; align-items: flex-start; grid-column: 1 / -1; align-self: stretch; box-sizing: border-box; }
.mp-zone-flow > .mp-advice .mp-sugs { flex: 1 1 100%; margin-top: 6px; }
/* [CA-8] 見比べ用の表示（PLAN_HELP_LEGEND=1）：手助けを出すところ・出さないところ */
.mp-legend { margin: 0 0 14px; padding: 12px 16px; border-radius: 14px; background: #f1f6ff; border: 2px dashed #74a7f5; color: #1c2d4a; font-size: 0.9rem; line-height: 1.7; display: grid; gap: 4px; }
.mp-legend p { margin: 0; }
.mp-legend-modes { color: #44546f; font-size: 0.84rem; }
.mp-legend-chip { display: inline-block; margin-left: 8px; padding: 0 8px; border-radius: 999px; font-size: 0.72rem; font-weight: 800; line-height: 1.7; vertical-align: 1px; }
.mp-legend p .mp-legend-chip { margin: 0 4px 0 0; }
.mp-legend-chip.is-self { background: #eceff3; color: #4a5568; border: 1px solid #cfd6df; }
.mp-legend-chip.is-help { background: #fff3bf; color: #7a4b00; border: 1px solid #f0c94d; }
/* [CA-8] 書いたあとの助言：全体の見立てと、案ごとの「なぜ」 */
.mp-advice-overall { margin: 4px 0 0; padding: 8px 12px; border-radius: 10px; background: #fff; border: 1px solid #d0bfff; font-size: 0.88rem; font-weight: 700; line-height: 1.6; color: #2b2550; }
.mp-advice-overall b, .mp-sug-why b { display: inline-block; margin-right: 8px; padding: 0 8px; border-radius: 999px; background: #7950f2; color: #fff; font-size: 0.72rem; }
.mp-sug-why { margin: 6px 0 0; font-size: 0.84rem; font-weight: 700; line-height: 1.6; color: #3b3366; }
.mp-kishou-ch { display: inline-block; margin-right: 6px; padding: 0 7px; border-radius: 6px; background: #fff3bf; color: #5c3d00; font-size: 0.85em; line-height: 1.6; vertical-align: 1px; }
/* [CA-3] 中級のプロのアドバイス、台本の画面の書き直し・ふりがな・下書きの印 */
body.no-ai:not(.advice-on) #mp-check, body.no-ai:not(.advice-on) .mp-advice, body.no-ai .script-cut-rewrite-row, body.no-ai #btn-furigana, body.no-ai .script-cut-ai-badge { display: none !important; }
body.no-ai .pcard.flip-in::after {
  background:
    radial-gradient(circle at center, #fff 0 29%, #ffd43b calc(29% + 1px) 31%, transparent calc(31% + 1px)),
    repeating-linear-gradient(45deg, #1d3557 0 10px, #243b6b 10px 20px);
  content: '📺'; display: grid; place-items: center; font-size: 3rem;
}

/* [CA-5] きかく会議の「しょうこの数字」（紫）と、先生の画面の作戦メモのボタン */
.qstone.purple { --c: #7048e8; }
.qmemo-gauge i.on.purple { background: #7048e8; }
.qmemo-row.purple { --c: #7048e8; }
.tdash-links .tdash-plan-btn, .tdash-table-links .tdash-plan-btn { padding: 5px 10px; border-radius: 8px; background: #fff9db; border: 1px solid #ffd43b; color: #5c3c00; font-size: 0.78rem; font-weight: 800; cursor: pointer; font-family: inherit; }
.tdash-links .tdash-plan-btn:hover, .tdash-table-links .tdash-plan-btn:hover { background: #fff3bf; }
/* [CA-5] マスが 6 つになったので、道を短くして、マスが重ならないようにする */
.qmap .qmap-road { flex: 0 1 14px !important; max-width: 14px; }


/* ==== [CA-6] ログイン（先生／じどう）・パスワードの発行・じどうの あいことば ==== */
.login-tabs { display: flex; gap: 8px; justify-content: center; margin: 12px 0 14px; }
.login-tab { flex: 1; max-width: 180px; padding: 10px 14px; border-radius: 999px; border: 1.5px solid #ced4da; background: #fff; font: inherit; font-weight: 900; color: #495057; cursor: pointer; }
.login-tab.on { background: #1c7ed6; border-color: #1c7ed6; color: #fff; }
.login-card[hidden] { display: none; }
.login-card .subtitle { margin-top: 0; }
.issued-pw { border: 2px solid #f59f00; background: #fff9db; }
.issued-pw-value { font-family: ui-monospace, Menlo, monospace; font-size: 1.6rem; font-weight: 900; letter-spacing: 0.08em; user-select: all; margin: 8px 0; }
.pp-dialog { width: min(640px, 100%); max-height: 90vh; overflow: auto; }
.pp-note { margin: 0; font-size: 0.85rem; color: #495057; font-weight: 600; }
.pp-count { display: flex; align-items: flex-end; gap: 10px; }
.pp-count label { flex-direction: row; align-items: center; gap: 8px; }
.pp-count input { width: 90px; }
.pp-code { display: flex; align-items: baseline; gap: 12px; padding: 10px 14px; border-radius: 12px; background: #e7f5ff; }
.pp-code span { font-weight: 800; color: #1864ab; }
.pp-code b { font-size: 2.2rem; letter-spacing: 0.18em; font-family: ui-monospace, Menlo, monospace; color: #0b3d6b; }
.pp-table { width: 100%; border-collapse: collapse; }
.pp-table th, .pp-table td { padding: 6px 10px; border-bottom: 1px solid #e9ecef; text-align: left; }
.pp-phrase { font-size: 1.3rem; font-weight: 900; letter-spacing: 0.15em; }
.pp-redo { padding: 4px 10px; border-radius: 8px; border: 1px solid #dee2e6; background: #fff; font: inherit; font-size: 0.8rem; font-weight: 800; cursor: pointer; }
.pp-cards { display: none; }
@media print {
  /* 「印刷」を おしたときだけ：あいことばの カード（1人1まい）だけを 出す */
  body.pp-printing > *:not(.pp-modal) { display: none !important; }
  body.pp-printing .pp-modal { position: static; display: block; background: none; padding: 0; }
  body.pp-printing .pp-dialog { width: auto; max-height: none; overflow: visible; box-shadow: none; padding: 0; }
  body.pp-printing .pp-noprint, body.pp-printing .pp-table, body.pp-printing .pp-code, body.pp-printing .pp-dialog h2 { display: none !important; }
  body.pp-printing .pp-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
  body.pp-printing .pp-card { box-sizing: border-box; border: 1.5px dashed #555; padding: 12px 16px; break-inside: avoid; font-size: 18pt; }
  body.pp-printing .pp-card-title { font-size: 12pt; margin-bottom: 6px; }
  body.pp-printing .pp-card-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
  body.pp-printing .pp-card-row span { font-size: 12pt; }
  body.pp-printing .pp-card-row b { font-size: 24pt; letter-spacing: 0.1em; }
  body.pp-printing .pp-card-phrase { font-size: 30pt !important; }
}


/* ==== [CA-7/CA-8/CA-11] 企画の手助け：場面ごとの ヒント（求めたときだけ）・書いたあとの 見直しの ヒント ==== */
.mp-hint-panel { margin: 6px 0 2px; padding: 10px 12px; border-radius: 12px; background: #fff9db; border: 2px solid #ffd43b; list-style: none; font-size: 0.92rem; font-weight: 700; color: #4a3500; }
.mp-hint-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.mp-hint-x { border: 0; background: transparent; font-size: 1rem; cursor: pointer; padding: 4px 8px; color: #6b5200; }
.mp-hint-q { margin: 0 0 6px; padding-left: 1.2em; }
.mp-hint-q li { margin: 2px 0; }
.mp-hint-wait { margin: 0; font-weight: 700; color: #6b5200; }
.mp-hint-btn { margin-top: 6px; padding: 5px 10px; border-radius: 999px; border: 1.5px solid #f59f00; background: #fff9db; color: #5c3c00; font: inherit; font-size: 0.78rem; font-weight: 900; cursor: pointer; }
.mp-hint-btn[aria-expanded="true"] { background: #f59f00; color: #fff; }
.mp-flow-row > .mp-scene-hint { grid-column: 1 / -1; margin: 0 10px 10px; }
.mp-hint-lead { margin: 0 0 6px; font-weight: 800; color: #6b5200; }
.mp-sugs { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.mp-sugs-h { color: #5f3dc4; }
.mp-sug { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: #fff; border: 2px solid #d0bfff; }
.mp-sug-where { grid-column: 1 / -1; font-weight: 900; }
.mp-sug-cmp { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mp-sug-cmp small { font-weight: 900; color: #495057; }
.mp-sug-cmp p { margin: 2px 0 0; padding: 6px 10px; border-radius: 8px; background: #f1f3f5; font-weight: 700; min-height: 1.6em; }
.mp-sug-new p { background: #fff4e6; border: 1px solid #ffc078; }
@media (max-width: 720px) { .mp-sug-cmp { grid-template-columns: 1fr; } .mp-sug { grid-template-columns: 1fr; } }
