/* 5chFlowProtocol 台本エディタ / 前段 ── 紫は使わない(青緑系の落ち着いた配色) */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", "Yu Gothic UI", system-ui, sans-serif;
  color: #1b2733;
  background: #eef2f5;
}
.top {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  padding: 10px 16px;
  background: #10566b; color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.top .title strong { font-size: 18px; }
.top .title .sub { margin-left: 8px; font-size: 12px; opacity: .8; }
.controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
select, button, input, textarea { font: inherit; }
select { padding: 6px 8px; border-radius: 6px; border: 1px solid #cbd5db; max-width: 46vw; }
button {
  padding: 7px 12px; border-radius: 6px; border: 1px solid transparent;
  cursor: pointer;
}
button.primary { background: #1f8f4e; color: #fff; }
button.primary:hover { background: #197a42; }
button.ghost { background: #fff; color: #10566b; border-color: #cbd5db; }
button.ghost:hover { background: #f2f6f8; }

.workbar {
  padding: 8px 16px; background: #dbe7ec; color: #26414d;
  font-size: 13px; border-bottom: 1px solid #c4d3da;
}
.status { padding: 6px 16px; font-size: 13px; min-height: 20px; }
.status.ok { color: #1f8f4e; }
.status.err { color: #c0392b; }

.cuts { padding: 12px 16px 40px; display: flex; flex-direction: column; gap: 12px; max-width: 1000px; margin: 0 auto; }

.cut {
  background: #fff; border: 1px solid #d3dde3; border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.cut.dragging { opacity: .45; }
.cut.dragover { border-color: #10566b; box-shadow: 0 0 0 2px #10566b33; }

.cut-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 12px; border-bottom: 1px solid #eef2f5;
}
.handle { cursor: grab; color: #90a4ae; font-size: 18px; user-select: none; }
.cut-id { font-weight: 700; color: #10566b; }
.phase {
  font-size: 12px; padding: 2px 8px; border-radius: 999px;
  background: #e6eef1; color: #47616d;
}
.capvis { margin-left: auto; font-size: 13px; display: flex; align-items: center; gap: 5px; }
.order-btns { display: flex; gap: 4px; }
.order-btns button { padding: 2px 8px; }

.cut-body { display: flex; gap: 14px; padding: 12px; flex-wrap: wrap; }
.col.img { width: 180px; flex: 0 0 auto; }
.col.fields { flex: 1 1 320px; display: flex; flex-direction: column; gap: 4px; }
.col.fields label, .col.img label { font-size: 12px; color: #5a6b76; margin-top: 4px; }
textarea, .col.img input {
  width: 100%; padding: 6px 8px; border: 1px solid #cbd5db; border-radius: 6px;
  resize: vertical; background: #fbfdfe;
}
.thumb {
  width: 100%; height: 120px; border: 1px dashed #c4d3da; border-radius: 6px;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  background: #f4f8fa;
}
.thumb-img { max-width: 100%; max-height: 100%; display: none; }
.thumb-img.show { display: block; }
.thumb .noimg { color: #9aabb4; font-size: 12px; }
.thumb-img.show + .noimg { display: none; }

.foot {
  padding: 10px 16px; font-size: 12px; color: #6b7d87;
  display: flex; gap: 16px; flex-wrap: wrap; border-top: 1px solid #d3dde3;
  background: #e7eef1;
}

/* スマホ */
@media (max-width: 560px) {
  .col.img { width: 100%; }
  select { max-width: 100%; }
}
