/* MarchinZ Vlog — 本体のトンマナ(白基調・ネイビー/ブルー/アンバー)に統一。
   設計は 375px の縦持ち片手操作が第一の完成形(CLAUDE.md 必須ルール8)。
   広い画面では余白と2カラムが増えるだけで、情報の優先順位は変えない。 */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #f4f6f8; --panel: #ffffff; --panel2: #f0f2f6; --line: rgba(15, 33, 56, 0.12);
  --tx: #0c0f14; --tx2: rgba(12, 15, 20, 0.65);
  --navy: #0f2138; --acc: #1e4fd6; --acc-deep: #163b9e; --acc2: #d97706;
  /* 小さい文字に載せる用の濃いアンバー(--acc2 は白地で3.19しか出ない) */
  --acc2-text: #b45309;
  --ok: #1e7a43; --warn: #9a6a00; --err: #c0392b;
  --cream: #fefcef;
  --shadow-card: 0 1px 2px rgba(15, 33, 56, 0.05), 0 4px 16px rgba(15, 33, 56, 0.06);
}

/* display 指定のあるクラスは [hidden] に詳細度で勝つため、hidden を常に優先させる。
   過去に本人限定タブが他人に見えた事故(v1.38.4)と同じ罠。CSS先頭に置くこと。 */
[hidden] { display: none !important; }

html { background: #eef1f5; }
* { -webkit-tap-highlight-color: transparent; }
body {
  background: transparent; color: var(--tx);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Sans",
    "Hiragino Kaku Gothic ProN", "Noto Sans JP", Meiryo, sans-serif;
  font-size: 14px;
}
/* 3ツール共通の背景(iOS配慮で fixed) */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.88)),
    url("/images/lp/hero-show.png");
  background-size: cover; background-position: center top; background-repeat: no-repeat;
}
button, select, input, label, .btn { touch-action: manipulation; }

/* ---------- ヘッダー ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 10px 18px;
  background: var(--cream); border-bottom: 1px solid var(--line); }
.head-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tool-name { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700;
  color: var(--navy); white-space: nowrap; }
.beta-badge { font-size: 10px; font-weight: 700; color: #866a19; background: #fdf3d7;
  border: 1px solid #ecd9a0; border-radius: 999px; padding: 2px 8px;
  white-space: nowrap; vertical-align: 2px; }
.head-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.caps-badge { font-size: 12px; color: var(--tx2); background: #fff; border: 1px solid var(--line);
  padding: 4px 10px; border-radius: 20px; }
.back-link { font-size: 12px; color: var(--acc); text-decoration: none; white-space: nowrap;
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; }
@media (max-width: 700px) { .head-right .caps-badge { display: none; } }

.beta-disclaimer { font-size: 12.5px; color: var(--tx2); line-height: 1.7;
  padding: 10px 18px; background: #fff; border-bottom: 1px solid var(--line); }
.beta-disclaimer strong { color: var(--tx); }
.disc-more summary { cursor: pointer; color: var(--acc); }

/* ---------- 雰囲気(作業領域内の1セクション。2026-07-20: 着地ページから変更) ---------- */
.mode-cards { margin-top: 12px; display: grid; gap: 10px; }
.mode-card {
  display: grid; grid-template-columns: 46px 1fr; grid-template-rows: auto auto auto;
  gap: 2px 14px; align-items: center; text-align: left;
  padding: 16px; min-height: 92px;               /* 親指で押しやすい大きさ */
  background: var(--panel); border: 1.5px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-card); cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}
.mode-card:active { transform: scale(.985); }
.mode-card-icon { grid-row: 1 / 4; display: grid; place-items: center;
  width: 46px; height: 46px; border-radius: 14px;
  background: var(--panel2); color: var(--acc); font-size: 19px; }
.mode-card-name { font-size: 16px; font-weight: 800; color: var(--navy); }
.mode-card-desc { font-size: 13px; color: var(--tx2); line-height: 1.6; }
.mode-card-meta { font-size: 11.5px; color: var(--acc2-text); font-weight: 700; }
/* 選択中(常設セクションになったため、選ばれている状態を明示する) */
.mode-card.on { border-color: var(--acc); background: #eaf0ff; box-shadow: 0 4px 16px rgba(30, 79, 214, .16); }
.mode-card.on .mode-card-icon { background: var(--acc); color: #fff; }
@media (hover: hover) {
  .mode-card:hover { border-color: var(--acc); box-shadow: 0 6px 22px rgba(30, 79, 214, .14); }
}
/* コンパクト版(セクション内表示。着地ページ版より一回り小さく) */
.mode-cards--compact .mode-card { padding: 12px; min-height: 72px; border-radius: 14px; }
.mode-cards--compact .mode-card-icon { width: 38px; height: 38px; border-radius: 11px; font-size: 16px; }
.mode-cards--compact .mode-card-name { font-size: 14.5px; }
.mode-cards--compact .mode-card-desc { font-size: 12px; }

/* ---------- 作業領域 ---------- */
/* 既定は1カラム。2カラム化は 980px 以上でのみ */
.wrap { display: flex; flex-direction: column; gap: 14px; padding: 14px;
  padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px)); }
.col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  padding: 14px; box-shadow: var(--shadow-card); }
.panel h2 { font-size: 14.5px; font-weight: 800; color: var(--navy);
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.panel h2 .hint { font-weight: 500; }
.hint { font-size: 11.5px; color: var(--tx2); }
.sec-lead { margin-top: 6px; font-size: 12.5px; color: var(--tx2); line-height: 1.7; }

/* ---------- スロット(枠) ----------
   枠そのものが大きなタップ&ドロップ標的。縦積みが既定 */
.slots { margin-top: 12px; display: grid; gap: 10px; }
.slots-grid { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 560px) { .slots-grid { grid-template-columns: repeat(3, 1fr); } }

.slot {
  position: relative; display: flex; flex-direction: column; justify-content: center;
  gap: 6px; padding: 14px 12px; min-height: 76px;
  background: var(--panel2); border: 1.5px dashed var(--line); border-radius: 14px;
  text-align: left; cursor: pointer; color: var(--tx2); font-size: 12.5px;
  transition: border-color .16s ease, background .16s ease;
}
.slot.drag { border-color: var(--acc); background: #eaf0ff; }
.slot .slot-idx { font-size: 11px; font-weight: 800; color: var(--acc); }
.slot .slot-what { font-size: 13px; font-weight: 700; color: var(--navy); }
.slot .slot-how { font-size: 11.5px; line-height: 1.6; }
.slot.filled { border-style: solid; background: #fff; }
.slot-thumb { width: 100%; aspect-ratio: 16 / 9; border-radius: 10px; object-fit: cover;
  background: #dfe4ec; display: block; }
.slot-name { font-size: 12px; font-weight: 700; color: var(--tx);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot-meta { font-size: 11px; color: var(--tx2); }
.slot-del { position: absolute; top: 2px; right: 2px; width: 44px; height: 44px;
  display: grid; place-items: center; border-radius: 50%; border: 0;
  background: transparent; color: #fff; font-size: 13px; cursor: pointer; }
/* 見た目の丸は小さく、当たり判定は44px(親指で押せる大きさ) */
.slot-del::before { content: ""; position: absolute; width: 30px; height: 30px;
  border-radius: 50%; background: rgba(12, 15, 20, .55); }
.slot-del i { position: relative; }
.slot-badge { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start;
  font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 999px;
  background: #fdf3d7; color: #866a19; border: 1px solid #ecd9a0; }
.slot-showtoggle { display: flex; align-items: center; gap: 8px; font-size: 11.5px;
  color: var(--tx2); padding: 4px 0; min-height: 44px; }
.slot-showtoggle input { width: 22px; height: 22px; accent-color: var(--acc); }

/* ---------- 撮ってほしいもののチェックリスト ----------
   「どんなインサート映像がいいの？」の中身。折りたたみ(details)なので
   summary は details.panel と別クラスで軽めに(パネルの中の入れ子のため) */
.checklist-details { margin-top: 10px; }
.checklist-details > summary { font-size: 12.5px; font-weight: 700; color: var(--acc);
  display: flex; align-items: center; gap: 6px; min-height: 40px; cursor: pointer;
  list-style: none; }
.checklist-details > summary::-webkit-details-marker { display: none; }
.checklist-details > summary::before { content: "\f059"; font-family: "Font Awesome 6 Free";
  font-weight: 900; font-size: 12px; }
.checklist { margin-top: 8px; }
.cl-lead { font-size: 12px; font-weight: 700; color: var(--navy); }
.cl-list { list-style: none; margin-top: 8px; display: grid; gap: 10px; }
.cl-list li { display: flex; align-items: flex-start; gap: 10px;
  font-size: 12px; color: var(--tx2); }
/* 内容アイコン(トンマナは mode-card-icon と揃える: 丸バッジ+ネイビー系の色) */
.cl-icon { flex: none; display: grid; place-items: center; width: 30px; height: 30px;
  border-radius: 10px; background: var(--panel2); color: var(--acc); font-size: 13px; }
.cl-list li.on .cl-icon { background: var(--acc); color: #fff; }
.cl-body { min-width: 0; }
.cl-what { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--tx); }
.cl-status { color: #c3cad8; font-size: 12px; }
.cl-list li.on .cl-status { color: var(--ok); }
.cl-list li.on .cl-what { color: var(--tx2); text-decoration: line-through;
  text-decoration-color: rgba(12, 15, 20, .25); }
.cl-how { margin-top: 2px; font-size: 11.5px; line-height: 1.65; }

/* ---------- 追加ボタン(枠を先出ししない代わりの入口) ---------- */
.add-btn { margin-top: 10px; width: 100%; min-height: 52px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 14px; font-weight: 700; color: var(--acc);
  background: var(--panel2); border: 1.5px dashed var(--line); border-radius: 14px;
  cursor: pointer; }
.add-btn:disabled { color: var(--tx2); border-style: solid; cursor: not-allowed; }

/* ---------- 選択肢(音・出し先) ---------- */
.choice { margin-top: 10px; display: grid; gap: 8px; }
.choice-row { grid-template-columns: 1fr 1fr; }
.choice-item { display: flex; flex-direction: column; gap: 3px; align-items: flex-start;
  text-align: left; padding: 13px 14px; min-height: 52px;
  background: var(--panel2); border: 1.5px solid transparent; border-radius: 13px;
  cursor: pointer; }
.choice-item.on { background: #eaf0ff; border-color: var(--acc); }
.choice-name { font-size: 13.5px; font-weight: 700; color: var(--navy); }
.choice-item.on .choice-name { color: var(--acc-deep); }
.choice-desc { font-size: 11.5px; color: var(--tx2); line-height: 1.55; }

/* ---------- 折りたたみ(任意項目) ---------- */
details.panel > summary { font-size: 14.5px; font-weight: 800; color: var(--navy);
  display: flex; align-items: center; gap: 7px; min-height: 44px; cursor: pointer;
  list-style: none; }
details.panel > summary::-webkit-details-marker { display: none; }
details.panel > summary::after { content: "\f078"; font-family: "Font Awesome 6 Free";
  font-weight: 900; margin-left: auto; font-size: 11px; color: var(--tx2);
  transition: transform .18s ease; }
details.panel[open] > summary::after { transform: rotate(180deg); }
.logo-thumb { object-fit: contain; background: var(--panel2); }
#logoTune { margin-top: 12px; }
#logoThreshold { width: 100%; height: 44px; }

/* ---------- 責任についての一言(2026-07-20: 折りたたみの注意事項一覧から変更) ---------- */
.notice-line { display: flex; align-items: flex-start; gap: 8px;
  font-size: 11.5px; line-height: 1.7; color: var(--tx2);
  background: #fffdf5; border-color: #ecd9a0; }
.notice-line i { flex: none; margin-top: 2px; color: var(--acc2-text); }

/* ボトムバーの促し先を光らせる(1タップ目=ここです、2タップ目=実行) */
.ab-target { animation: abpulse .9s ease 1; }
@keyframes abpulse {
  0%   { box-shadow: 0 0 0 0 rgba(30, 79, 214, .35), var(--shadow-card); }
  100% { box-shadow: 0 0 0 12px rgba(30, 79, 214, 0), var(--shadow-card); }
}
/* ジャーニーバーに見出しが隠れないように */
.panel, details.panel { scroll-margin-top: 96px; }

/* 入力欄 */
.field { margin-top: 12px; display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 12px; font-weight: 700; color: var(--navy); }
.field input[type="text"] { padding: 12px; min-height: 44px; font-size: 16px;   /* 16px未満はiOSが自動ズームして戻らない */
  border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--tx); }
.field input[type="text"]:focus { outline: 2px solid var(--acc); outline-offset: -1px; }
.field select { padding: 12px; min-height: 44px; font-size: 16px;   /* 16px未満はiOSが自動ズームして戻らない */
  border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--tx);
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23768096'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z' clip-rule='evenodd'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; }
.field select:focus { outline: 2px solid var(--acc); outline-offset: -1px; }
.field input[type="text"]#forWhomOtherInput { margin-top: 6px; }

/* ロックされた枠(無料登録が必要) */
.slot-locked { cursor: pointer; opacity: .82; }
.slot-locked .slot-what { color: var(--tx2); }
.slot-locked .slot-what i { color: var(--acc2-text); }

/* Vlog自動編集の未実装案内(開発中である旨を正直に出す) */
.build-wip-note { margin-top: 10px; padding: 10px 12px; font-size: 12px; line-height: 1.7;
  color: var(--acc2-text); background: #fdf3d7; border: 1px solid #ecd9a0; border-radius: 11px;
  display: flex; align-items: center; gap: 8px; }

/* ボタン */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 16px; min-height: 44px; font-size: 14px; font-weight: 700;
  color: var(--navy); background: #fff; border: 1px solid var(--line); border-radius: 12px;
  cursor: pointer; }
.btn.primary { color: #fff; background: var(--acc); border-color: var(--acc); }
.btn.primary:disabled { background: #b9c3d6; border-color: #b9c3d6; cursor: not-allowed; }
.btn.big { width: 100%; padding: 15px; font-size: 16px; margin-top: 12px; }

/* Artlist おすすめ */
.artlist-box { margin-top: 12px; display: grid; gap: 10px; }
.artlist-card { padding: 12px; background: var(--panel2); border: 1px solid var(--line);
  border-radius: 12px; display: grid; gap: 7px; }
.artlist-card .al-slot { font-size: 11px; font-weight: 800; color: var(--acc2-text); }
.artlist-card .al-text { font-size: 12.5px; line-height: 1.7; color: var(--tx); }
.artlist-card .al-terms { font-size: 12px; font-family: ui-monospace, monospace;
  background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px;
  overflow-x: auto; white-space: nowrap; }
.artlist-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.artlist-actions .btn { flex: 1; min-width: 130px; font-size: 13px; }

/* プラン要約 */
.plan-summary { margin-top: 14px; font-size: 12.5px; color: var(--tx2); line-height: 1.8; }
.plan-summary .ps-mat { font-size: 12px; }
.plan-summary .ps-len { font-size: 15px; color: var(--tx2); }
.plan-summary .ps-len b { font-size: 19px; font-weight: 800; color: var(--navy); }
.plan-summary .ps-warn { color: var(--warn); }
.plan-summary .ps-note { margin-top: 4px; font-size: 11.5px; color: var(--tx2); line-height: 1.7; }
.field-label { font-size: 12px; font-weight: 700; color: var(--navy); }
.field-inline { font-size: 12px; font-weight: 700; color: var(--navy); }

/* ボトムバーの補足(あと何をすればいいか) */
.ab-note { font-size: 11.5px; color: var(--tx2); text-align: center; margin-bottom: 6px; }

/* ---------- プレビュー ---------- */
.stage { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.stage-inner { position: relative; background: #000; border-radius: 14px; overflow: hidden; }
#previewCanvas { width: 100%; height: auto; display: block; }
.preview-overlay { position: absolute; inset: 0; pointer-events: none; }
.transport { display: flex; align-items: center; gap: 10px; }
.transport .btn { flex-shrink: 0; width: 48px; padding: 12px 0; }
#scrub { flex: 1; min-width: 0; height: 34px; }
.time-label { font-size: 12px; color: var(--tx2); font-variant-numeric: tabular-nums;
  flex-shrink: 0; }
.block-strip { display: flex; gap: 2px; height: 26px; border-radius: 7px; overflow: hidden; }
.block-strip span { flex-grow: 1; display: grid; place-items: center; font-size: 9px;
  color: #fff; background: var(--acc); opacity: .55; overflow: hidden; white-space: nowrap; }
.block-strip span.on { opacity: 1; }

/* ---------- ボトムアクションバー(親指ゾーン) ---------- */
.mz-actionbar {
  display: none; position: fixed; left: 0; right: 0; bottom: 0;
  z-index: 80;                  /* MZPドック(90)の下: 進捗表示中はドックに譲る */
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, .86);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  backdrop-filter: saturate(1.6) blur(14px);
  border-top: 1px solid var(--line);
}
.mz-actionbar button { width: 100%; min-height: 48px; }
.mz-actionbar.on { display: block; }
/* 広い画面ではバーを出さず、パネル内のボタンで完結させる */
@media (min-width: 901px) { .mz-actionbar.on { display: none; } }

/* ---------- 広い画面: 余白と2カラムが増えるだけ ---------- */
@media (min-width: 980px) {
  .wrap { flex-direction: row; align-items: flex-start; gap: 16px;
    max-width: 1240px; margin: 0 auto; padding-bottom: 24px; }
  .col { width: 420px; flex-shrink: 0; }
  .stage { flex: 1; position: sticky; top: 14px; }
}

/* ---------- トースト ---------- */
.toast { position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(78px + env(safe-area-inset-bottom, 0px));
  max-width: min(92vw, 460px); padding: 12px 16px; border-radius: 12px;
  background: rgba(12, 15, 20, .92); color: #fff; font-size: 13px; line-height: 1.6;
  opacity: 0; pointer-events: none; transition: opacity .2s ease; z-index: 95; }
.toast.on { opacity: 1; }

/* ---------- フッター ---------- */
footer { padding: 22px 16px 30px; text-align: center; font-size: 11.5px;
  color: var(--tx2); line-height: 1.9; }
footer a { color: var(--acc); }

/* ---------- 書き出し完了カード ---------- */
.done-card {
  margin-top: 10px;
  padding: 14px;
  border-radius: 12px;
  background: #eefaf1;
  border: 1px solid #bfe8cc;
}
.done-card .ok { font-weight: 700; color: #157347; }
.done-card p { margin: 0 0 6px; }
.done-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }


/* 必須バッジ(インタビュー構成ツール 2026-07-21) */
.req-badge {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.04em;
  color: #fff; background: var(--acc, #1e4fd6); vertical-align: 2px;
}
