:root {
  --ad: #2f6fb5;
  --promo: #2f9e6f;
  --eyecatch: #8a7fb5;
  --line: #e2e7ee;
  --line-strong: #b6c0cc;
  --bg: #f5f7fa;
  --text: #26313d;
  --muted: #7b8794;
  --cell-w: 13px;
  --label-w: 150px;
}
* { box-sizing: border-box; }
/* hidden 属性は display の指定（アイコン付きボタンの inline-flex など）より優先して隠す */
[hidden] { display: none !important; }
body {
  margin: 0; padding: 0;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  background: var(--bg); color: var(--text); font-size: 13px;
}
header {
  background: #fff; border-bottom: 2px solid #1f3864;
  padding: 14px 20px 12px;
}
header h1 { margin: 0; font-size: 18px; color: #1f3864; }
header .sub { color: var(--muted); font-size: 12px; margin-top: 3px; }
.proto {
  display: inline-block; background: #b5442f; color: #fff;
  font-size: 11px; padding: 1px 8px; border-radius: 10px; margin-left: 8px;
  vertical-align: 2px;
}

.toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 20px; background: #fff; border-bottom: 1px solid var(--line);
}
.toolbar.user {
  background: #eef2f7; border-bottom: 1px solid var(--line-strong);
  padding: 8px 20px;
}
button {
  font-family: inherit; font-size: 13px; padding: 6px 14px;
  border: 1px solid var(--line-strong); background: #fff; color: var(--text);
  border-radius: 5px; cursor: pointer;
}
button:hover { background: #eef2f7; }
button.primary { background: #1f3864; border-color: #1f3864; color: #fff; }
button.primary:hover { background: #2b4a80; }
button.danger { border-color: #b5442f; color: #b5442f; }
button.danger:hover { background: #fbecea; }
button:disabled { opacity: .45; cursor: not-allowed; }
input, select, textarea {
  font-family: inherit; font-size: 13px; padding: 6px 8px;
  border: 1px solid var(--line-strong); border-radius: 5px; background: #fff;
  color: var(--text);
}
input.ng, textarea.ng { border-color: #b5442f; background: #fdf5f4; }
.spacer { flex: 1; }
.legend { display: flex; gap: 14px; align-items: center; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -2px; }
.saved-note { font-size: 11px; color: var(--muted); }

/* ===== ビュー切替（セグメント） ===== */
.seg {
  display: inline-flex; border: 1px solid var(--line-strong);
  border-radius: 5px; overflow: hidden;
}
.seg .tab {
  border: none; border-radius: 0; padding: 6px 16px;
  background: #fff; color: var(--muted); font-size: 13px;
}
.seg .tab + .tab { border-left: 1px solid var(--line-strong); }
.seg .tab:hover { background: #eef2f7; }
.seg .tab.on { background: #1f3864; color: #fff; font-weight: bold; }
.view-note {
  padding: 10px 20px 0; font-size: 12px; color: var(--muted); line-height: 1.7;
}

/* ===== 共通ボード ===== */
.board-wrap { padding: 12px 20px 40px; }
.board {
  background: #fff; border: 1px solid var(--line-strong); border-radius: 6px;
  overflow-x: auto;
}
.grid { display: inline-block; min-width: 100%; }

.hrow { display: flex; }
.hrow .hlabel {
  width: var(--label-w); min-width: var(--label-w);
  position: sticky; left: 0; z-index: 4; background: #eef2f7;
  border-right: 2px solid var(--line-strong);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: var(--muted);
}
.hrow .cells { display: flex; }
.hrow.month { height: 22px; background: #e3e9f1; border-bottom: 1px solid var(--line); }
.hrow.month .hlabel { background: #e3e9f1; }
.hrow.month .m {
  border-right: 1px solid var(--line-strong);
  font-size: 11px; font-weight: bold; color: #40536b;
  display: flex; align-items: center; padding-left: 5px;
  white-space: nowrap; overflow: hidden;
}
.hrow.days { height: 36px; background: #eef2f7; border-bottom: 1px solid var(--line-strong); }
.hrow.days .c {
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  line-height: 1.2; color: var(--muted); overflow: hidden;
}
.hrow.days .c .dd { font-size: 12px; font-weight: bold; color: var(--text); }
.hrow.days .c .dd.sm { font-size: 9px; font-weight: normal; }
.hrow.days .c .wd { font-size: 9px; }
.hrow.days .c.sat .dd, .hrow.days .c.sun .dd { color: inherit; }
.c.sat { background: #eaf2fa; color: #2f6fb5; }
.c.sun { background: #fbeced; color: #b5442f; }
.c.mstart { border-left: 1px solid var(--line-strong); }

/* --- 枠グループ（マトリクス／空き状況 共通） --- */
.grp { display: flex; border-bottom: 2px solid var(--line-strong); }
.grp:last-child { border-bottom: none; }
.grp .glabel {
  width: var(--label-w); min-width: var(--label-w);
  position: sticky; left: 0; z-index: 3;
  border-right: 2px solid var(--line-strong);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; text-align: center;
}
.grp .glabel .name { font-size: 15px; font-weight: bold; letter-spacing: .02em; }
.grp .glabel .meta { font-size: 11px; color: var(--muted); }
.grp.ad .glabel { background: #eaf1f9; color: #1c4f85; }
.grp.promo .glabel { background: #e9f4ee; color: #1e6b4b; }
.grp.eyecatch .glabel { background: #f0edf7; color: #5c518a; }

.lanes { position: relative; }
.bgcols { position: absolute; inset: 0; display: flex; }
.bgcols .c { border-right: 1px solid var(--line); }
.bgcols .c.sat { background: #f4f8fc; }
.bgcols .c.sun { background: #fdf4f4; }
.lanelines { position: absolute; inset: 0; }
.lanelines div { position: absolute; left: 0; right: 0; border-top: 1px dashed #e8ecf2; }

.bar {
  position: absolute; border-radius: 4px; color: #fff;
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 7px; cursor: pointer; overflow: hidden; z-index: 2;
  box-shadow: 0 1px 2px rgba(0,0,0,.12);
}
.bar:hover { filter: brightness(1.1); }
.bar .bt { font-size: 12px; font-weight: bold; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar .bs { font-size: 10px; opacity: .9; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar.ad { background: var(--ad); }
.bar.promo { background: var(--promo); }
.bar.eyecatch { background: var(--eyecatch); }
.bar.open-left { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.bar.open-right { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.bar.thin { flex-direction: row; align-items: center; justify-content: flex-start; gap: 6px; }
.bar.thin .bt { flex: 0 1 auto; }

/* --- ②空き状況 --- */
.avail-wrap { position: relative; }
.chart { display: block; background: #fcfdfe; border-bottom: 1px solid var(--line); }
.avail-row { height: 22px; display: flex; }
.avail-row .c {
  border-right: 1px solid rgba(255,255,255,.5);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: bold; overflow: hidden;
}
/* 空き枠数は灰色の濃淡（残りが少ないほど濃い）。緑・青・橙は枠の種類の色なので、ここでは使わない。満枠だけ赤（10/19） */
.f-full { background: #d94f45; color: #fff; }
.f-1    { background: #8994a1; color: #fff; }
.f-2    { background: #d3d9e0; color: #2f3a46; }
.f-3    { background: #e8ecf0; color: #44505c; }
.f-many { background: #f6f7f9; color: #8a96a3; }
.avail-legend { display: flex; gap: 12px; align-items: center; font-size: 11px; color: var(--muted); margin-top: 8px; }
.avail-legend i { display: inline-block; width: 22px; height: 12px; border-radius: 2px; margin-right: 4px; vertical-align: -2px; }

/* ===== ポップアップ ===== */
#tip {
  position: fixed; z-index: 50; display: none; max-width: 340px;
  background: #26313d; color: #fff; border-radius: 6px; padding: 10px 12px;
  font-size: 12px; line-height: 1.6; box-shadow: 0 4px 16px rgba(0,0,0,.25);
  pointer-events: none;
}
#tip .t { font-weight: bold; font-size: 13px; margin-bottom: 4px; }
#tip dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 0; }
#tip dt { color: #a8b6c4; white-space: nowrap; }
#tip dd { margin: 0; word-break: break-all; }

/* ===== モーダル ===== */
.modal-bg {
  position: fixed; inset: 0; background: rgba(20,28,38,.45);
  display: none; align-items: center; justify-content: center; z-index: 100;
}
.modal-bg.on { display: flex; }
.modal {
  background: #fff; border-radius: 8px; width: 460px; max-width: 94vw;
  max-height: 92vh; overflow-y: auto; box-shadow: 0 10px 40px rgba(0,0,0,.3);
}
.modal h2 {
  margin: 0; padding: 14px 18px; font-size: 15px; color: #1f3864;
  border-bottom: 1px solid var(--line);
}
.modal .body { padding: 16px 18px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.field label .req { color: #b5442f; }
.field .hint { font-size: 11px; color: var(--muted); margin-top: 4px; line-height: 1.6; }
.field input, .field select, .field textarea { width: 100%; }
.two { display: flex; gap: 10px; }
.two > * { flex: 1; }
.modal .foot {
  padding: 12px 18px; border-top: 1px solid var(--line);
  display: flex; gap: 8px; align-items: center;
}
.alert {
  background: #fbecea; border: 1px solid #e0a99f; color: #8f3627;
  border-radius: 5px; padding: 9px 11px; font-size: 12px;
  margin-bottom: 12px; display: none; line-height: 1.6;
}
.alert.on { display: block; }
.assigned {
  background: #eaf3ec; border: 1px solid #a9cbb5; color: #24603c;
  border-radius: 5px; padding: 9px 11px; font-size: 12px; margin-bottom: 12px;
  display: none;
}
.assigned.on { display: block; }
.who {
  font-size: 12px; color: var(--muted); margin-bottom: 12px;
  padding-bottom: 10px; border-bottom: 1px dashed var(--line-strong);
}
.who b { color: var(--text); font-size: 13px; }

/* ===== パスワード画面（デザイン確認用の仮実装） ===== */
.gate {
  position: fixed; inset: 0; z-index: 300;
  background: linear-gradient(160deg, #1f3864 0%, #2b4a80 60%, #16294a 100%);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.gate.off { display: none; }
.gate-card {
  background: #fff; border-radius: 10px; padding: 32px 34px 26px;
  width: 380px; max-width: 100%; box-shadow: 0 12px 40px rgba(0,0,0,.35);
  text-align: center;
}
.gate-card .glogo { font-size: 19px; font-weight: bold; color: #1f3864; }
.gate-card .glead { font-size: 12px; color: var(--muted); line-height: 1.8; margin: 12px 0 18px; }
.gate-card input {
  width: 100%; text-align: center; font-size: 15px; padding: 9px 10px; letter-spacing: .1em;
}
.gate-card input.ng { border-color: #b5442f; background: #fdf5f4; }
.gate-card button { width: 100%; margin-top: 12px; padding: 9px; font-size: 14px; }
.gate-err {
  display: none; font-size: 12px; color: #b5442f; margin-top: 8px;
}
.gate-err.on { display: block; }
.gate-note {
  font-size: 11px; color: var(--muted); line-height: 1.8;
  margin-top: 20px; padding-top: 14px; border-top: 1px dashed var(--line-strong);
}
.gate-note b { color: #b5442f; }

/* ===== 面（サイネージ種別）の切替 ===== */
.surf-seg {
  display: inline-flex; border: 1px solid var(--line-strong);
  border-radius: 5px; overflow: hidden; margin-right: 4px;
}
.surf-seg:empty { display: none; }   /* モールを選ぶ前は面が無く、枠線だけが点のように出ていた */
.surf-seg .stab {
  border: none; border-radius: 0; background: #fff; color: var(--muted);
  font-size: 13px; padding: 6px 15px;
}
.surf-seg .stab + .stab { border-left: 1px solid var(--line-strong); }
.surf-seg .stab:hover { background: #e3e9f1; }
.surf-seg .stab.on { background: #1f3864; color: #fff; font-weight: bold; }
.surf-seg .stab .sm { font-size: 10px; margin-left: 5px; opacity: .75; }
/* 層間を端末ごとの番組表に分けた館（11/17〜）: 層間を選んでいるときだけ、層間の下の端末（01・02）を切り替える */
.screen-seg { display: inline-flex; align-items: center; gap: 4px; margin: 0 6px 0 -2px; }
.screen-seg:empty { display: none; }
.screen-seg .lbl { font-size: 11.5px; color: var(--muted); margin-right: 2px; white-space: nowrap; }
.screen-seg .sctab {
  border: 1px solid var(--line-strong); border-radius: 12px; background: #fff; color: var(--muted);
  font-size: 12px; padding: 3px 11px; line-height: 1.4;
}
.screen-seg .sctab:hover { background: #e3e9f1; }
.screen-seg .sctab.on { border-color: var(--brand); color: var(--brand-dark); background: #fbeef7; font-weight: bold; }

/* ===== 準備中パネル ===== */
.notready {
  background: #fff; border: 1px solid var(--line-strong); border-radius: 6px;
  padding: 26px 24px; text-align: center; color: var(--muted); line-height: 1.9;
}
.notready .big { font-size: 15px; font-weight: bold; color: var(--text); margin-bottom: 6px; }
.notready .box {
  display: inline-block; text-align: left; margin-top: 14px; padding: 12px 16px;
  background: #f5f7fa; border: 1px solid var(--line); border-radius: 5px; font-size: 12px;
}

/* ===== 入稿規定 ===== */
/* 予約モーダル（z-index:100）から開くため、それより前面に出す */
#specBg { z-index: 200; }
.spec-figs { display: flex; gap: 14px; flex-wrap: wrap; justify-content: space-evenly; align-items: flex-start; margin-bottom: 4px; }
.spec-fig { text-align: center; font-size: 11px; color: var(--muted); }
/* 図の領域は全面で同じ正方形（薄い背景）にし、その中で枠を上下左右の中央に置く。
   こうすると枠の大きさが違ってもラベル（面の名前・比率）の位置が揃う。 */
.spec-fig .figbox {
  display: flex; align-items: center; justify-content: center;
  background: #f7f9fb; border: 1px solid var(--line); border-radius: 6px;
}
/* 寸法は枠の内側に置く（横幅は上辺の中央・タテ幅は左辺の中央に寄せる） */
.spec-fig .frame {
  position: relative;
  border: 2px solid #1f3864; background: #eef2f7; border-radius: 3px;
}
.spec-fig .cap { margin-top: 6px; }
.spec-fig .dw { position: absolute; top: 3px; left: 0; right: 0; text-align: center; }
.spec-fig .dh { position: absolute; left: 4px; top: 50%; transform: translateY(-50%); }
.spec-fig .dw, .spec-fig .dh { font-size: 11px; font-weight: bold; color: #1f3864; white-space: nowrap; }
.spec-fig .cap { font-size: 12px; font-weight: bold; color: var(--text); }
/* 層間: 下地の中央半分が安全マージン（運用ルール P.22 の図と同じ色: 枠 #E8A33D・中 #C9DCFA） */
.spec-fig .frame .safe { position: absolute; top: 0; bottom: 0; left: 25%; width: 50%; background: #c9dcfa; border-left: 2px solid #e8a33d; border-right: 2px solid #e8a33d; }
.spec-fig .frame .dw, .spec-fig .frame .dh { z-index: 1; }
.spec-img { display: block; width: 100%; max-width: 480px; height: auto; margin: 8px auto 4px; border-radius: 3px; }
.spec-imgbox { text-align: center; }
.spec-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-top: 14px; }
.spec-table th, .spec-table td { border: 1px solid var(--line); padding: 6px 9px; text-align: left; }
.spec-table th { background: #eef2f7; color: var(--muted); font-weight: normal; white-space: nowrap; width: 108px; }
.spec-table th.row { color: var(--text); font-weight: bold; }
.spec-sec {
  font-size: 12px; font-weight: bold; color: #1f3864; margin: 16px 0 6px;
  padding-bottom: 3px; border-bottom: 2px solid #1f3864;
}
.spec-src { font-size: 11px; color: var(--muted); margin-top: 14px; line-height: 1.8; }
.spec-src ul { margin: 4px 0 0; padding-left: 1.2em; }

/* ===== 入稿規定の印刷（PDF出力） =====
   A4縦1ページに収めるため、印刷時は余白・文字を詰めて静止画／動画を2列に並べる。
   @media print の外に置いているのは、画面上でも同じ見た目を検証できるようにするため
   （print-spec クラスは印刷の前後だけ付く）。 */
body.print-spec { background: #fff; }
body.print-spec > *:not(#specBg) { display: none !important; }
body.print-spec #specBg {
  display: block !important; position: static; inset: auto;
  background: none; overflow: visible; z-index: auto;
}
body.print-spec #specBg .modal {
  width: auto !important; max-width: none; max-height: none;
  box-shadow: none; border-radius: 0; overflow: visible;
}
body.print-spec #specBg .modal h2 {
  border-bottom: 2px solid #1f3864; padding: 0 0 8px; font-size: 14px;
}
body.print-spec #specBg .body { padding: 18px 0 0; }
body.print-spec #specBg .foot { display: none !important; }

/* 印刷時の詰め（A4縦1ページに収める範囲で、余白は詰めすぎない） */
/* 形状図は印刷でも小さくならないよう、むしろ少し拡大する */
body.print-spec .spec-figs { zoom: 1.2; gap: 14px; margin-bottom: 10px; }
body.print-spec .spec-sec { margin: 15px 0 5px; font-size: 11px; border-bottom-width: 1px; }
body.print-spec .spec-table { margin-top: 0; font-size: 11px; }
body.print-spec .spec-table th,
body.print-spec .spec-table td { padding: 4px 7px; }
body.print-spec .spec-two { display: flex; gap: 14px; align-items: flex-start; }
body.print-spec .spec-two > * { flex: 1; min-width: 0; }
body.print-spec .spec-note { font-size: 11px !important; line-height: 1.6 !important; }
body.print-spec .spec-src ul { margin-top: 2px; }
body.print-spec .spec-src li { line-height: 1.55; }

/* 途中で切れないようにブロック単位で改ページを禁止 */
.spec-figs, .spec-table, .spec-sec, .spec-two, .spec-src { page-break-inside: avoid; break-inside: avoid; }
.spec-sec { page-break-after: avoid; break-after: avoid; }

@media print {
  @page { size: A4 portrait; margin: 12mm; }
}
.spec-inline {
  background: #f5f7fa; border: 1px solid var(--line); border-radius: 5px;
  padding: 9px 11px; font-size: 12px; margin-bottom: 12px; line-height: 1.7;
}
.spec-inline b { color: var(--text); }
.spec-inline .mini {
  display: inline-block; width: 15px; height: 26px; border: 2px solid #1f3864;
  background: #fff; border-radius: 2px; vertical-align: -8px; margin-right: 8px;
}
.note-pi { font-size: 11px; color: #8f3627; margin-top: 4px; }

/* ===== 権限（配信者は閲覧のみ） ===== */
header { position: relative; }
.role-badge {
  display: none; position: absolute; right: 20px; top: 14px;
  font-size: 11px; padding: 3px 10px; border-radius: 11px;
  background: #eef2f7; border: 1px solid var(--line-strong); color: #40536b;
}
.role-badge.on { display: inline-block; }
.role-badge.view { background: #f0edf7; border-color: #b6ace0; color: #5c518a; }

/* グループに紐づく部署メールアドレス（入力ではなく表示） */
.mail-view {
  font-size: 12px; color: #40536b; background: #fff;
  border: 1px solid var(--line); border-radius: 5px; padding: 6px 10px;
  min-width: 210px; display: inline-block;
}
.mail-view.empty { color: var(--muted); }

/* ===== 変更通知エリア ===== */
.chg-count {
  display: none; margin-left: 6px; font-size: 11px; font-weight: bold;
  background: #b5442f; color: #fff; border-radius: 9px; padding: 1px 7px;
}
.chg-count.on { display: inline-block; }
.chg-arrow { display: inline-block; margin-left: 7px; vertical-align: -1px; color: inherit; transition: transform .15s; }
#btnChanges.open { background: #1f4f8a; border-color: #1f4f8a; }
#btnChanges .chg-count { box-shadow: 0 0 0 1.5px #fff; }
#btnChanges.open .chg-arrow { transform: rotate(180deg); }
.chg-panel {
  display: none; margin: 10px 20px 0; background: #fff;
  border: 1px solid var(--line-strong); border-radius: 6px;
  max-height: 260px; overflow-y: auto;
}
.chg-panel.on { display: block; }
.chg-head {
  padding: 9px 14px; font-size: 12px; font-weight: bold; color: #1f3864;
  border-bottom: 1px solid var(--line); background: #eef2f7;
  position: sticky; top: 0; z-index: 2;   /* 一覧をスクロールしても、行のタグが見出しの上に出ないように */
}
.chg-row { padding: 8px 14px; border-bottom: 1px dashed var(--line); font-size: 12px; line-height: 1.7; border-left: 4px solid transparent; }
/* 未読（一覧を開いたときにまだ見ていなかったもの）は青い帯と背景、既読は少し薄く */
.chg-row.unread { background: #eaf3fe; border-left-color: #3576c0; }
.chg-row.read { color: #6b7785; }
/* 既読のタグは薄い色で（透明度を使うとスクロール時に見出しの上へはみ出すため、色で薄くする） */
.chg-row.read .chg-kind.k-new { background: #8fcbb0; }
.chg-row.read .chg-kind.k-mod { background: #93b4da; }
.chg-row.read .chg-kind.k-del { background: #b3bbc4; }
.chg-new { display: inline-block; font-size: 10px; font-weight: bold; color: #fff; background: #3576c0; border-radius: 9px; padding: 0 7px; margin-right: 6px; vertical-align: 1px; }
.chg-seen { display: inline-block; font-size: 10px; color: #8a96a3; border: 1px solid #c9d1db; border-radius: 9px; padding: 0 6px; margin-right: 6px; vertical-align: 1px; }
.chg-head-new { margin-left: 10px; font-size: 11px; color: #fff; background: #3576c0; border-radius: 9px; padding: 1px 8px; }
.chg-head-none { margin-left: 10px; font-size: 11px; font-weight: normal; color: var(--muted); }
.chg-row:last-child { border-bottom: none; }
.chg-row .meta { color: var(--muted); font-size: 11px; }
.chg-kind {
  display: inline-block; font-size: 10px; font-weight: bold; color: #fff;
  border-radius: 3px; padding: 1px 6px; margin-right: 6px; vertical-align: 1px;
}
.chg-kind.k-new { background: #2f9e6f; }
.chg-kind.k-mod { background: #2f6fb5; }
.chg-kind.k-del { background: #7b8794; }
.chg-urgent {
  display: inline-block; font-size: 10px; font-weight: bold; color: #8f3627;
  background: #fbecea; border: 1px solid #e0a99f; border-radius: 3px;
  padding: 0 6px; margin-left: 6px;
}
.chg-empty { padding: 14px; font-size: 12px; color: var(--muted); text-align: center; }

/* 放映直前の警告（予約モーダル内） */
.urgent-note {
  display: none; background: #fbecea; border: 1px solid #e0a99f; color: #8f3627;
  border-radius: 5px; padding: 9px 11px; font-size: 12px; margin-bottom: 12px; line-height: 1.7;
}
.urgent-note.on { display: block; }

/* ===== 通信中・エラー（GAS接続時） ===== */
.busy {
  position: fixed; right: 18px; bottom: 18px; z-index: 400; display: none;
  background: #26313d; color: #fff; font-size: 12px; padding: 9px 14px;
  border-radius: 6px; box-shadow: 0 4px 16px rgba(0,0,0,.25);
}
.busy.on { display: block; }
.conn-err {
  display: none; margin: 0 20px 10px; padding: 9px 12px; font-size: 12px;
  background: #fbecea; border: 1px solid #e0a99f; color: #8f3627; border-radius: 5px;
}
.conn-err.on { display: block; }

/* ===== サーバー版（2026/10）で追加 ===== */
:root { --common: #2f9e6f; --mallk: #c7782a; --game: #8d96a3; }
/* 枠種別の色（全社共通＝旧本社販促の緑／広告＝青／モール個別＝橙／ゲーム＝灰） */
.grp.common .glabel { background: #e9f4ee; color: #1e6b4b; }
.grp.mall .glabel { background: #fbf1e6; color: #8a5016; }
.grp.game .glabel { background: #f0f2f5; color: #55606d; }
.bar.common { background: var(--common); }
.bar.mall { background: var(--mallk); }
/* 閲覧のみの枠（権限で編集できない枠）はグレーで出す */
.grp.ro .glabel { background: #f0f2f5 !important; color: #6b7480 !important; }
.grp.ro .glabel .ro-tag, .ro-tag {
  display: inline-block; font-size: 10px; color: #6b7480; background: #fff;
  border: 1px solid #c9d0d8; border-radius: 3px; padding: 0 5px; margin-top: 3px; width: fit-content;
}
.bar.ro { background: #a3acb7 !important; }
/* 確定／仮のタグと、仮押さえ（薄い色＋点線の枠） */
.bar .st { display: inline-block; font-size: 10px; font-weight: bold; line-height: 1; padding: 2px 5px; border-radius: 3px; margin-right: 5px; vertical-align: 1px; }
.bar .st-c { background: rgba(255,255,255,.92); color: #26313d; }
.bar .st-t { background: #fff; color: #8a5a00; border: 1px solid #d9a441; }
.bar .st-a { background: #fff4e5; color: #9a4a00; border: 1px solid #e3a35a; }   /* 広告枠に入れたモールの販促・催事PR（開放分が分かるように） */
.bar.tentative { box-shadow: none; border: 1px dashed currentColor; }
.bar.tentative.common { background: #d3ecdf; color: #1e6b4b; }
.bar.tentative.ad { background: #d6e5f5; color: #1c4f85; }
.bar.tentative.mall { background: #f6e3cd; color: #8a5016; }
.bar.tentative.ro { background: #e6e9ed !important; color: #55606d; }
.legend i.lg-tent { background: #d6e5f5; border: 1px dashed #1c4f85; box-sizing: border-box; }
/* 番組表（空き状況と枠の詳細を1つに）: 左の見出しは上段＝名前、下段＝15秒の目盛り */
.grp.board-grp .glabel { justify-content: flex-start; gap: 0; }
.grp.board-grp .gtop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; width: 100%; border-bottom: 1px solid rgba(0,0,0,.08); }
.gruler { position: relative; width: 100%; }
.gruler .tick { position: absolute; right: 0; width: 60px; display: flex; align-items: flex-end; justify-content: flex-end; padding: 0 6px 1px 0; font-size: 10px; font-variant-numeric: tabular-nums; border-bottom: 1px solid rgba(0,0,0,.12); }
.gbody { position: relative; }
.st-tag { font-size: 10px; background: #fff3cd; color: #7a5a00; border-radius: 3px; padding: 0 5px; margin-left: 4px; }
/* ゲーム枠（固定・編集不可）: 1行に圧縮して全期間を塗る */
.game-fill {
  position: absolute; left: 0; top: 3px; bottom: 3px; right: 0; border-radius: 3px;
  background: repeating-linear-gradient(90deg, #c3c9d1 0 2px, #d5dae0 2px 14px);
  color: #3f4954; font-size: 12px; font-weight: bold; display: flex; align-items: center; padding-left: 10px;
}

/* ログイン後のモール選択・ヘッダーのモール切替 */
.mall-switch { display: none; align-items: center; gap: 6px; }
.mall-switch.on { display: inline-flex; }
.mall-combo { position: relative; display: inline-block; }
.mall-combo input { width: 260px; padding-right: 28px; }
.mall-clear {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%); display: none;
  width: 22px; height: 22px; padding: 0; border: none; border-radius: 50%; background: transparent;
  color: var(--muted); font-size: 16px; line-height: 22px;
}
.mall-clear:hover { background: #eef2f7; color: var(--text); }
.mall-clear.on { display: block; }
.mall-list {
  display: none; position: absolute; left: 0; top: calc(100% + 2px); z-index: 50; min-width: 100%; max-height: 360px; overflow-y: auto;
  background: #fff; border: 1px solid var(--line-strong); border-radius: 5px; box-shadow: 0 4px 14px rgba(0, 0, 0, .12); padding: 3px 0;
}
.mall-list.on { display: block; }
.mall-list .mi { padding: 6px 10px; cursor: pointer; white-space: nowrap; }
.mall-list .mi.act { background: #e3ebf7; }
.mall-list .mi.cur { font-weight: bold; color: #1f3864; }
.mall-list .none { padding: 6px 10px; color: var(--muted); }
.mall-name { font-weight: bold; color: #1f3864; }

/* 予約モーダル: 対象モールの選択 */
.target-box { border: 1px solid var(--line); border-radius: 5px; padding: 8px 10px; max-height: 170px; overflow-y: auto; }

/* 管理画面: タブ＋検索＋一覧（窓の中でスクロール）＋編集の小窓 */
.admin { display: none; padding: 12px 20px 10px; }
.admin.on { display: block; }
.adm-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.adm-bar .tab .n { display: inline-block; margin-left: 6px; font-size: 11px; font-weight: normal; opacity: .75; }
.adm-note { font-size: 12px; color: var(--muted); margin: 0 0 8px; line-height: 1.6; }
.adm-list { background: #fff; border: 1px solid var(--line); border-radius: 6px; overflow: auto; max-height: calc(100vh - 215px); }
.adm-list table { border-collapse: collapse; width: 100%; font-size: 12px; }
.adm-list th { position: sticky; top: 0; background: #eef2f7; text-align: left; font-weight: bold; padding: 7px 10px; border-bottom: 1px solid var(--line-strong); white-space: nowrap; z-index: 1; }
.adm-list td { padding: 6px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.adm-list tbody tr { cursor: pointer; }
.adm-list tbody tr:hover td { background: #f3f7fc; }
.adm-list tr.off td { color: var(--muted); }
.adm-list th.c, .adm-list td.c { text-align: center; width: 64px; }
.adm-list td.c { color: #1f3864; font-weight: bold; }
.adm-list .empty td { text-align: center; color: var(--muted); padding: 24px; cursor: default; }
.adm-list .tag, .grp-table .tag { display: inline-block; padding: 0 7px; border-radius: 9px; font-size: 11px; background: #eef2f7; }
.adm-list .tag.off, .grp-table .tag.off { background: #f4e9e7; color: #8f3627; }
.adm-foot { display: flex; gap: 10px; font-size: 12px; color: var(--muted); margin-top: 6px; }
.adm-chk { display: flex; gap: 14px; flex-wrap: wrap; }
.adm-chk label { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--text); margin: 0; }
.adm-chk input { width: auto !important; margin: 0; }
.lane-ov { display: flex; flex-direction: column; gap: 6px; }
.lane-ov-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lane-ov-label { min-width: 64px; font-size: 13px; color: var(--text); }
.lane-ov-row input { width: 110px !important; }
.lane-ov-loop { margin: 0 !important; }
.adm-ro { padding: 6px 0; font-size: 13px; }
.adm-info { font-size: 12px; color: var(--muted); background: #f5f7fa; border-radius: 5px; padding: 7px 10px; margin-bottom: 12px; line-height: 1.7; }
.pw-show { display: none; margin: 0 0 14px; padding: 10px 12px; background: #fff8e1; border: 1px solid #e8cf7a; border-radius: 5px; font-size: 13px; }
.pw-show.on { display: block; }
.pw-show code { font-size: 16px; font-weight: bold; letter-spacing: .05em; }
.grp.game .glabel { padding: 4px 0; gap: 1px; }
.grp.game .glabel .name { font-size: 13px; }


/* 対象モールの欄（全社共通・モール個別は文字だけ。広告は下のモールの選び方） */
.target-box { max-height: none; overflow: visible; }
/* モールの選び方（まとめて選ぶ＋名前で追加＋選択中の札）。対象モールの欄とモールのグループの編集で共通 */
.target-box.mp { padding: 0; border: none; }
.mp-quick { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin-bottom: 8px; }
.mp-lbl { font-size: 11px; color: var(--muted); margin-right: 2px; }
/* ほかのグループ: ボタンの下に画面へ固定して重ねる一覧（欄の高さは増えない・小窓の端で切れない） */
.mp-other { position: relative; display: inline-block; }
.mp-other-btn { display: inline-flex; align-items: center; gap: 4px; border-style: dashed; color: var(--ad); }
.mp-other-btn svg { transition: transform .15s; }
.mp-other-btn.open { border-style: solid; background: #eef4fb; }
.mp-other-btn.open svg { transform: rotate(180deg); }
.mp-pop { display: none; position: fixed; z-index: 300; width: 320px; background: #fff; border: 1px solid var(--line-strong); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.16); padding: 8px; }
.mp-pop.on { display: block; }
.mp-pop input { width: 100%; margin-bottom: 6px; }
.mp-pop-list { max-height: 240px; overflow-y: auto; }
.mp-pop-dept { font-size: 11px; color: var(--muted); padding: 6px 4px 2px; border-top: 1px solid var(--line); }
.mp-pop-dept:first-child { border-top: none; padding-top: 0; }
.mp-gopt { display: flex; align-items: center; gap: 6px; padding: 5px 6px; border-radius: 5px; font-size: 13px; cursor: pointer; }
.mp-gopt:hover { background: #f1f5fa; }
.mp-gopt .mk { width: 14px; height: 14px; flex: none; border: 1.5px solid var(--line-strong); border-radius: 3px; }
.mp-gopt.some .mk { border-color: #2f6fb5; background: linear-gradient(#2f6fb5, #2f6fb5) center / 8px 2px no-repeat; }
.mp-gopt.all .mk { border-color: #1f3864; background: #1f3864 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2 5 8.5l4.5-5' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 11px no-repeat; }
.mp-gopt .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-gopt .n { font-size: 11px; color: var(--muted); }
.mp-add { position: relative; margin-bottom: 8px; }
.mp-add input { width: 100%; }
.mp-sugg { display: none; position: absolute; left: 0; right: 0; top: 100%; z-index: 30; margin-top: 2px; background: #fff; border: 1px solid var(--line-strong); border-radius: 6px; box-shadow: 0 6px 18px rgba(0,0,0,.12); max-height: 240px; overflow-y: auto; }
.mp-sugg.on { display: block; }
.mp-opt { padding: 6px 10px; font-size: 13px; cursor: pointer; }
.mp-opt.hi, .mp-opt:hover { background: #eef4fb; }
.mp-none { padding: 8px 10px; font-size: 12px; color: var(--muted); }
.mp-sel { border: 1px solid var(--line); border-radius: 6px; background: #fafbfd; padding: 7px 9px; }
.mp-sel-head { display: flex; align-items: center; justify-content: space-between; font-size: 12px; margin-bottom: 6px; }
.mp-clear { font-size: 11px; padding: 0; border: none; background: none; color: #b5442f; text-decoration: underline; }
.mp-clear:hover { background: none; }
.mp-chips { display: flex; flex-wrap: wrap; gap: 5px; max-height: 132px; overflow-y: auto; }
.mp-tag { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; background: #fff; border: 1px solid var(--line-strong); border-radius: 4px; padding: 2px 4px 2px 8px; white-space: nowrap; }
.mp-tag .x { border: none; background: none; padding: 0 4px; font-size: 13px; line-height: 1; color: var(--muted); cursor: pointer; }
.mp-tag .x:hover { color: #b5442f; background: none; }
.mp-empty { font-size: 12px; color: var(--muted); }
/* モールのグループの定義: 全モールをチェックボックスで（4列） */
.mp-checks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px 10px; max-height: 260px; overflow-y: auto; }
.mp-checks label { display: flex !important; align-items: center; gap: 5px; font-size: 12px; color: var(--text) !important; margin: 0 !important; padding: 2px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.mp-checks label:has(input:checked) { color: #1f3864 !important; font-weight: 600; }
.mp-checks input { width: auto !important; margin: 0; flex: none; }
.chip { font-size: 12px; padding: 3px 9px; border-radius: 14px; border: 1px solid var(--line-strong); background: #fff; }
.chip .n { font-size: 10px; color: var(--muted); margin-left: 4px; }
.chip.some { border-color: #2f6fb5; background: #eef4fb; }
.chip.all { border-color: #1f3864; background: #1f3864; color: #fff; }
.chip.all .n { color: #cfd8e6; }
/* モールのグループの編集 */
.grp-table { border-collapse: collapse; width: 100%; font-size: 12px; }
.grp-table th { text-align: left; background: #eef2f7; padding: 6px 8px; border-bottom: 1px solid var(--line-strong); }
.grp-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); cursor: pointer; }
.grp-table tr.ro td { cursor: default; color: var(--muted); }
.grp-table tbody tr:hover td { background: #f3f7fc; }
/* 予約の小窓: 書き出しのボタンが並び、対象モールの札も多く並ぶので広めにする（画面が狭いときは .modal の max-width: 94vw で縮む） */
#modalBg .modal { width: 720px; }
.modal .foot button { white-space: nowrap; }

/* モールのグループのボタン（グループ選択の右・歯車の右下に「＋」の丸印） */
.icon-btn { position: relative; flex: none; width: 34px; height: 29px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.icon-btn .gear { width: 17px; height: 17px; display: block; }
.icon-btn .badge { position: absolute; right: 5px; bottom: 3px; width: 12px; height: 12px; display: block; }
.icon-btn .badge circle { fill: #fff; stroke: #6b4fb0; stroke-width: 1.4; }
.icon-btn .badge path { stroke: #6b4fb0; stroke-width: 1.6; stroke-linecap: round; fill: none; }
.icon-btn:hover .badge circle { stroke: #573f93; }
.icon-btn:hover .badge path { stroke: #573f93; }

/* 予約の小窓: 横幅を使って縦を抑える */
#modalBg .modal .body { padding: 12px 18px 4px; }
#modalBg .field { margin-bottom: 10px; }
.mhead { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px dashed var(--line-strong); }
.mhead .who { flex: 1; min-width: 0; margin: 0; padding: 0; border: none; line-height: 1.6; }
.mhead .who .kv { margin-right: 14px; white-space: nowrap; }
.mhead .who .note-pi { margin-top: 2px; }
.mhead .assigned { margin: 0; padding: 3px 10px; border-radius: 12px; white-space: nowrap; flex: none; }
.mhead .assigned.on { display: inline-block; }
#modalBg .spec-inline { padding: 5px 10px; margin-bottom: 10px; line-height: 1.5; font-size: 11.5px; }
#modalBg .spec-inline .mini { vertical-align: -5px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 10px; }
.grid4 .s2 { grid-column: span 2; }
.grid4 .s3 { grid-column: span 3; }
#modalBg .field .hint { margin-top: 3px; line-height: 1.4; }

/* ===== アイコンと、機能ごとのボタンの色（10/15） =====
   決定＝紺の塗り primary／書き出し＝緑の枠 export／参照・お知らせ＝青の枠 info／設定・管理＝紫の枠 setting／
   削除・無効化＝赤の枠 danger／移動・閉じる＝灰色の枠 */
svg.ic { width: 14px; height: 14px; flex: none; }
button:has(> svg.ic) { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
button:has(> svg.ic):not(.primary):not(.export):not(.info):not(.setting):not(.danger):not(.tab) { background: #f1f4f8; color: #3d4f66; }
button:has(> svg.ic):not(.primary):not(.export):not(.info):not(.setting):not(.danger):not(.tab):hover { background: #e3e9f1; }
/* 機能ごとの色は白抜き（有色の塗り＋白い文字）。移動・閉じるだけは淡い灰色の塗り（10/15 本人指定）→ 10/19に末尾の「見やすさの改善」で白地に色の枠／文字だけへ変更 */
button.export { background: #2f8a5c; border-color: #2f8a5c; color: #fff; font-weight: 600; }
button.export:hover { background: #24704a; border-color: #24704a; }
button.info { background: #3576c0; border-color: #3576c0; color: #fff; font-weight: 600; }
button.info:hover { background: #2a61a1; border-color: #2a61a1; }
button.setting { background: #6b4fb0; border-color: #6b4fb0; color: #fff; font-weight: 600; }
button.setting:hover { background: #573f93; border-color: #573f93; }
button.danger { background: #c0472f; border-color: #c0472f; color: #fff; font-weight: 600; }
button.danger:hover { background: #a23a25; border-color: #a23a25; }
button.primary { font-weight: 600; }
/* 項目名: アイコン＋少し濃い文字（同じような入力欄を見分けやすく） */
.field > label { display: flex; align-items: center; gap: 5px; color: #3d4f66; font-weight: 600; }
.field > label svg.ic { width: 13px; height: 13px; color: var(--ad); }
/* 入力欄の左のアイコン（見出しの無い欄・検索欄） */
.has-ic { padding-left: 28px !important; background-repeat: no-repeat; background-position: 9px center; background-size: 14px 14px; }
.mail-view.has-ic { background-color: #fff; }
.mp-lbl { display: inline-flex; align-items: center; gap: 4px; }
.mp-lbl svg.ic { width: 12px; height: 12px; }
.seg .tab:has(> svg.ic) { gap: 5px; }

/* 小窓の見出しのアイコン（見出しの文字は後から書き換わるので、CSS の ::before で描く） */
.modal h2 { display: flex; align-items: center; gap: 8px; }
#modalBg h2::before, #grpBg h2::before, #specBg h2::before, #admBg h2::before {
  content: ''; width: 17px; height: 17px; flex: none; background: var(--ad);
  -webkit-mask: var(--h2ic) center / contain no-repeat; mask: var(--h2ic) center / contain no-repeat;
}
#modalBg h2 { --h2ic: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%223%22%20y%3D%224%22%20width%3D%2218%22%20height%3D%2218%22%20rx%3D%222%22/%3E%3Cpath%20d%3D%22M16%202v4M8%202v4M3%2010h18%22/%3E%3C/svg%3E"); }
#grpBg h2 { --h2ic: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Crect%20x%3D%223%22%20y%3D%223%22%20width%3D%227%22%20height%3D%227%22%20rx%3D%221%22/%3E%3Crect%20x%3D%2214%22%20y%3D%223%22%20width%3D%227%22%20height%3D%227%22%20rx%3D%221%22/%3E%3Crect%20x%3D%2214%22%20y%3D%2214%22%20width%3D%227%22%20height%3D%227%22%20rx%3D%221%22/%3E%3Crect%20x%3D%223%22%20y%3D%2214%22%20width%3D%227%22%20height%3D%227%22%20rx%3D%221%22/%3E%3C/svg%3E"); }
#specBg h2 { --h2ic: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M4%2019.5A2.5%202.5%200%200%201%206.5%2017H20M6.5%202H20v20H6.5A2.5%202.5%200%200%201%204%2019.5v-15A2.5%202.5%200%200%201%206.5%202z%22/%3E%3C/svg%3E"); }
#admBg h2 { --h2ic: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M12%2022s8-4%208-10V5l-8-3-8%203v7c0%206%208%2010%208%2010z%22/%3E%3C/svg%3E"); }
.grp-table th svg.ic { width: 12px; height: 12px; vertical-align: -1px; margin-right: 4px; color: var(--ad); }

/* ===== 見やすさの改善（10/19 本人指示 A〜E・G） =====
   ブランド色＝テーマカラー #b60081（本人指定・10/19。ロゴの元ファイルの #a90e78 から置き換え）。
   使うのは画面上部・主な操作のボタン・選択中のタブだけ。番組表の中（枠の色・空き枠数）には入れない */
:root { --brand: #b60081; --brand-dark: #93006a; --brand-tint: #fcedf6; }

/* G: 画面上部（ロゴ＋マーク＋システム名） */
header { border-bottom: 3px solid var(--brand); padding: 12px 20px 10px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { height: 17px; display: block; }
.brand-sep { width: 1px; height: 24px; background: #d5dae0; }
header h1 { color: var(--text); font-size: 18px; }
header .mall-name { margin-left: 14px; color: var(--brand-dark); }
header .sub { margin-top: 5px; }
.role-badge { top: 16px; }

/* G: ログイン画面 */
.gate { background: linear-gradient(160deg, #fbf5f8 0%, #f1e6ed 100%); }
.gate-card { border-top: 4px solid var(--brand); padding-top: 28px; }
.gate-brand { height: 20px; display: block; margin: 0 auto 18px; }
.gate-card .glogo { color: var(--text); display: flex; align-items: center; justify-content: center; gap: 9px; }

/* D: ボタンの強さを3段に。①決定（primary）だけブランド色の塗り
   ②参照・書き出し・設定・削除は白地に色の枠 ③移動・閉じる・キャンセルは文字だけ */
button.primary { background: var(--brand); border-color: var(--brand); }
button.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
button.export { background: #fff; color: #2f8a5c; border-color: #2f8a5c; }
button.export:hover { background: #eaf5ef; border-color: #2f8a5c; }
button.info { background: #fff; color: #2f6fb5; border-color: #2f6fb5; }
button.info:hover { background: #ebf2fa; border-color: #2f6fb5; }
button.setting { background: #fff; color: #6b4fb0; border-color: #6b4fb0; }
button.setting:hover { background: #f1edf9; border-color: #6b4fb0; }
button.danger { background: #fff; color: #c0472f; border-color: #c0472f; }
button.danger:hover { background: #fbecea; border-color: #c0472f; }
button:has(> svg.ic):not(.primary):not(.export):not(.info):not(.setting):not(.danger):not(.tab) { background: transparent; border-color: transparent; color: #3d4f66; }
button:has(> svg.ic):not(.primary):not(.export):not(.info):not(.setting):not(.danger):not(.tab):hover { background: #eef2f7; }
#btnChanges.open { background: #2f6fb5; border-color: #2f6fb5; color: #fff; }

/* 選択中のタブ（面・管理画面）と、選んだモールのまとまり */
.seg .tab.on, .surf-seg .stab.on { background: var(--brand); color: #fff; }
.chip.all, .mp-gopt.all .mk { background-color: var(--brand); border-color: var(--brand); }
.mp-checks label:has(input:checked) { color: var(--brand-dark) !important; }
.adm-list td.c { color: var(--brand-dark); }

/* 入力中の欄はブランド色の枠で分かるように */
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(182, 0, 129, .15); }

/* G: 項目名・小窓の見出しのアイコンはブランド色。見出しの文字は濃い灰色 */
.field > label svg.ic { color: var(--brand); }
#modalBg h2::before, #grpBg h2::before, #specBg h2::before, #admBg h2::before { background: var(--brand); }
.modal h2 { color: var(--text); }
/* ツールバーの文字だけの見出し（表示開始・モール）にもアイコン */
.lbl-ic { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); }
.lbl-ic svg.ic { width: 13px; height: 13px; }

/* B: 予約の小窓を3つのまとまりに分ける */
.fsec {
  display: flex; align-items: center; gap: 7px; margin: 14px 0 9px; padding-bottom: 5px;
  font-size: 12.5px; font-weight: bold; color: var(--text); border-bottom: 1px solid var(--line);
}
.spec-inline + .fsec { margin-top: 4px; }
.fsec .no {
  width: 18px; height: 18px; border-radius: 50%; background: var(--brand); color: #fff;
  font-size: 11px; display: inline-flex; align-items: center; justify-content: center;
}
/* C: 必須の＊をやめ、任意の項目にだけ印 */
.opt {
  font-size: 10px; font-weight: normal; color: var(--muted); background: #f1f4f8;
  border: 1px solid var(--line); border-radius: 3px; padding: 0 5px; margin-left: 2px;
}

/* E: 枠ごとに左端の色帯と、予約の行にごく薄い地の色 */
.grp.common .glabel { box-shadow: inset 5px 0 0 var(--common); }
.grp.ad .glabel     { box-shadow: inset 5px 0 0 var(--ad); }
.grp.mall .glabel   { box-shadow: inset 5px 0 0 var(--mallk); }
.grp.game .glabel   { box-shadow: inset 5px 0 0 var(--game); }
.grp.ro .glabel     { box-shadow: inset 5px 0 0 #a3acb7; }
.grp.common .lanes  { background: rgba(47, 158, 111, .05); }
.grp.ad .lanes      { background: rgba(47, 111, 181, .05); }
.grp.mall .lanes    { background: rgba(199, 120, 42, .06); }
.grp.ro .lanes      { background: rgba(120, 130, 142, .05); }
/* 画面上部の「この端末に保存」は補助の操作なので、ブランド色の枠だけ（塗りは「新規予約」「登録する」に絞る） */
#btnUser { background: #fff; color: var(--brand); border-color: var(--brand); }
#btnUser:hover { background: var(--brand-tint); }
.chip.some, .mp-gopt.some .mk { border-color: var(--brand); }
.chip.some { background: var(--brand-tint); }
.mp-gopt.some .mk { background: linear-gradient(var(--brand), var(--brand)) center / 8px 2px no-repeat; }
.grp-table th svg.ic { color: var(--brand); }

/* ===== テーマカラーのバー（10/19 本人指示「最上部や見出しはテーマカラーの背景のバー＆白字」） ===== */
header { background: var(--brand); border-bottom: none; color: #fff; }
header h1 { color: #fff; }
header .mall-name { color: #fff; font-weight: normal; opacity: 1; }
header .mall-name::before { content: '｜'; margin-right: 10px; color: rgba(255, 255, 255, .55); }
header .sub { color: rgba(255, 255, 255, .85); }
.brand-sep { background: rgba(255, 255, 255, .45); }
.role-badge { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .55); color: #fff; }
.role-badge.view { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .55); color: #fff; }
/* 小窓の見出し（アイコンも白） */
.modal h2 { background: var(--brand); color: #fff; border-bottom: none; }
#modalBg h2::before, #grpBg h2::before, #specBg h2::before, #admBg h2::before { background: #fff; }
/* 変更通知の一覧の見出し */
.chg-head { background: var(--brand); color: #fff; border-bottom: none; }
.chg-head-new { background: #fff; color: var(--brand); }
.chg-head-none { color: rgba(255, 255, 255, .85); }
/* 入稿規定の印刷（PDF）は見出しのバーを付けない（白地に下線のまま） */
body.print-spec #specBg .modal h2 { background: none; color: var(--text); }
body.print-spec #specBg .modal h2::before { background: var(--brand); }
/* ログイン画面: カードの上部をテーマカラーのバーに（白のロゴ＋白字のシステム名） */
.gate-card { border-top: none; padding-top: 0; overflow: hidden; }
.gate-head { background: var(--brand); margin: 0 -34px 4px; padding: 24px 20px 20px; }
.gate-head .gate-brand { margin: 0 auto 12px; }
.gate-card .gate-head .glogo { color: #fff; }
/* システムのマーク（案A 重なる画面・10/19 本人選定）。バーの上は白のマーク */
.brand .mark { width: 28px; height: 28px; display: block; margin-right: -4px; }
.gate-card .gate-head .glogo { display: flex; align-items: center; justify-content: center; gap: 8px; }
.gate-head .glogo .mark { width: 30px; height: 30px; display: block; }

/* 予約の小窓: まとまりごとに灰色の台に載せ、まとまりの見出しはテーマカラーのバー＋白字（10/19 本人指示） */
.fgrp { background: #f1f3f6; border-radius: 8px; padding: 0 12px 2px; margin-bottom: 10px; overflow: hidden; }
.fgrp .fsec {
  margin: 0 -12px 10px; padding: 6px 12px; border-bottom: none;
  background: var(--brand); color: #fff; font-size: 12.5px;
}
.fgrp .fsec .no { background: #fff; color: var(--brand); }
.spec-inline + .fgrp .fsec { margin-top: 0; }
/* 台の上でも入力欄・選択中のモール・文字だけの対象モールは白で浮かせる */
.fgrp .mp-sel, .fgrp .target-box:not(.mp) { background: #fff; }
.fgrp .opt { background: #fff; }
header .mall-name:empty::before { content: none; }   /* モール名が無い画面（管理・モール選択前）では区切りを出さない */

/* 予約の小窓（10/19 本人指定）: 最上部にコンテンツ名と放映期間、確定／仮押さえは登録のボタンで選ぶ */
.ftop { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 0 10px; margin-bottom: 4px; }
.ftop .field > label { font-size: 13px; }
.ftop input { font-size: 15px; padding: 8px 10px; }
#fTitle { font-weight: 600; }
#kindRow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fgrp #targetField > label { display: none; }   /* まとまりの見出しが「対象モール」なので、欄の項目名は出さない */
#modalBg button.tent { background: #fff; color: var(--brand); border-color: var(--brand); font-weight: 600; }
#modalBg button.tent:hover { background: var(--brand-tint); }
#modalBg button.primary:disabled { opacity: .35; }
/* 素材リンク: 項目名とチェックを同じ行に（11/16 本人） */
.src-field { display: flex; flex-wrap: wrap; align-items: center; align-content: flex-start; }
.src-field > label { margin-right: calc(16px + 1em); }   /* 見出しとチェックの間: 最初の形（16px）に全角1文字分を足す（11/16 本人） */
.src-field > input, .src-field > .hint { flex-basis: 100%; }
.src-chk { display: flex; gap: 18px; margin-bottom: 4px; }
.field .src-chk label { display: inline-flex; align-items: center; gap: 5px; margin: 0; font-size: 12.5px; color: var(--text); white-space: nowrap; cursor: pointer; }
.field .src-chk input { width: auto; margin: 0; }
#fUrl:disabled { background: #f3f5f8; color: var(--text); }
.save-hint { display: none; font-size: 11.5px; color: var(--muted); }
.save-hint.on { display: inline; }
#modalBg .modal { width: 800px; }   /* 確定／仮押さえの2つのボタンが増え、編集のときに「削除」が右端で切れたため広げる（画面が狭いときは 94vw で縮む） */
#modalBg .foot { flex-wrap: wrap; row-gap: 8px; }
#modalBg .modal { width: 840px; }
#modalBg .foot { gap: 6px; }
#modalBg .foot button { padding: 6px 11px; }

/* ===== 10/19 夕方 本人指摘への対応 ===== */
/* 素材リンクの案内は、ボタンの列の上に1行で出す（ボタンと同じ列に入れると2段に崩れた） */
#modalBg .save-hint.on { display: block; order: -1; flex-basis: 100%; }
/* 小窓の右上の× */
.modal { position: relative; }
.modal button.modal-x {
  position: absolute; top: 9px; right: 10px; z-index: 5; width: 32px; height: 32px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: none; border-radius: 6px; color: #fff;
}
.modal button.modal-x svg.ic { width: 18px; height: 18px; }
.modal button.modal-x:hover { background: rgba(255, 255, 255, .18); }
.modal h2 { padding-right: 52px; }
body.print-spec .modal-x { display: none !important; }
/* 入稿規定（参照の小窓）と変更通知の一覧の見出しは、テーマカラーにせず落ち着いた灰色に */
#specBg .modal h2 { background: #eef2f7; color: var(--text); border-bottom: 1px solid var(--line); }
#specBg h2::before { background: #40536b; }
#specBg .modal button.modal-x { color: #40536b; }
#specBg .modal button.modal-x:hover { background: #dfe5ed; }
.chg-head { background: #eef2f7; color: var(--text); border-bottom: 1px solid var(--line); }
.chg-head-new { background: #3576c0; color: #fff; }
.chg-head-none { color: var(--muted); }
/* アイコン付きボタンの灰色の決まり（:has＋:not の連なりで詳細度が高い）より優先する */
.modal button.modal-x { color: #fff !important; background: transparent !important; }
.modal button.modal-x:hover { background: rgba(255, 255, 255, .18) !important; }
#specBg .modal button.modal-x { color: #40536b !important; }
#specBg .modal button.modal-x:hover { background: #dfe5ed !important; }

/* ===== 番組表の確定／仮押さえ（10/19 本人指定: 案A＋小窓のボタンと同じアイコン） =====
   確定＝塗りつぶしの帯に✓だけ（札なし）／仮押さえ＝白地に枠の色の点線、黄色の「仮押さえ」の札に旗のアイコン */
.bar .st-ok { display: inline-flex; vertical-align: -2px; margin-right: 4px; }
.bar .st-ok svg.ic { width: 12px; height: 12px; stroke-width: 3; }
.bar.tentative { box-shadow: none; border: 2px dashed currentColor; background: #fff !important; }
.bar.tentative.common { color: #1e6b4b; border-color: var(--common); }
.bar.tentative.ad { color: #1c4f85; border-color: var(--ad); }
.bar.tentative.mall { color: #8a5016; border-color: var(--mallk); }
.bar.tentative.ro { color: #55606d; border-color: #a3acb7; }
.bar .st-t { display: inline-flex; align-items: center; gap: 3px; background: #f5a623; color: #fff; border: none; padding: 2px 6px 2px 5px; }
.bar .st-t svg.ic { width: 10px; height: 10px; stroke-width: 2.6; }
.bar .st-t.st-mini { padding: 2px 3px; margin-right: 0; }
.legend .lg-st { display: inline-flex; align-items: center; gap: 4px; }
.legend .lg-st svg.ic { width: 12px; height: 12px; }
.legend i.lg-tent { background: #fff; border: 2px dashed #1c4f85; }

/* ===== 変更通知の小窓（10/19 本人指示）・空き枠数の帯を低く ===== */
#chgBg .modal h2 { background: #eef2f7; color: var(--text); border-bottom: 1px solid var(--line); }
#chgBg h2::before { content: ''; width: 17px; height: 17px; flex: none; background: #40536b;
  -webkit-mask: var(--h2ic) center / contain no-repeat; mask: var(--h2ic) center / contain no-repeat;
  --h2ic: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22black%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpath%20d%3D%22M6%208a6%206%200%200%201%2012%200c0%207%203%209%203%209H3s3-2%203-9M10.3%2021a1.94%201.94%200%200%200%203.4%200%22/%3E%3C/svg%3E"); }
#chgBg .modal button.modal-x { color: #40536b !important; }
#chgBg .modal button.modal-x:hover { background: #dfe5ed !important; }
#chgBg .chg-body { padding: 0; }
#chgBg .chg-panel { margin: 0; border: none; border-radius: 0; max-height: 62vh; }
#chgBg h2 .chg-head-new, #chgBg h2 .chg-head-none { font-size: 11px; }
.avail-row { height: 15px; }
.avail-row .c { font-size: 9.5px; line-height: 1; }

/* ===== 番組表の見方を左の列に（10/19 本人指示で説明文をやめた） ===== */
.view-note:empty { display: none; }
.grp.board-grp .gtop { position: relative; }
.gtop .avail-lbl {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: flex-end;
  padding-right: 6px; font-size: 10px; font-weight: 600; color: #55606d; background: rgba(255, 255, 255, .55);
  border-top: 1px solid rgba(0, 0, 0, .06);
}
.gruler .lane-lbl { position: absolute; left: 10px; top: 5px; font-size: 10px; line-height: 1.35; font-weight: 600; color: #55606d; text-align: left; }
#tip .tip-hint { margin-top: 6px; padding-top: 5px; border-top: 1px solid rgba(255, 255, 255, .18); font-size: 11px; color: #c9d3de; }
.grp .glabel .meta .ro-tag.ro-inline { margin: 0 0 0 6px; vertical-align: 1px; }
/* 凡例: 「枠」「状態」の見出しと区切り、仮押さえの旗だけオレンジの地（10/19 本人指定） */
.legend .lg-head { color: var(--text); font-weight: 600; margin-right: -6px; }
.legend .lg-sep { width: 1px; height: 14px; background: var(--line-strong); }
.legend .lg-flag { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 3px; background: #f5a623; color: #fff; }
.legend .lg-flag svg.ic { width: 11px; height: 11px; stroke-width: 2.6; }

/* ===== 10/19 夕方: 依頼元のメールのコピー・個人情報の検出 ===== */
/* コピーのボタン（11/16 本人: 依頼元・連絡先・コンテンツ名・素材リンク）。押すと緑の✓と「〇〇をコピーしました」の吹き出し */
.copy-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 20px; padding: 0; margin-left: 6px; vertical-align: middle;
  background: #fff !important; border: 1px solid var(--line-strong) !important; border-radius: 4px; color: #40536b !important; flex: none; }
.copy-btn svg.ic { width: 12px; height: 12px; margin: 0 !important; color: inherit !important; }
.copy-btn:hover { background: #eef2f7 !important; }
.copy-btn.done { background: #2f8a5c !important; border-color: #2f8a5c !important; color: #fff !important; }
.copy-tip { position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%); z-index: 60; white-space: nowrap; pointer-events: none;
  background: #2f8a5c; color: #fff; font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 4px; box-shadow: 0 2px 6px rgba(0,0,0,.18); }
.copy-tip::after { content: ''; position: absolute; left: 50%; top: 100%; transform: translateX(-50%); border: 5px solid transparent; border-top-color: #2f8a5c; }
.copy-tip.ng { background: #7b8794; }
.copy-tip.ng::after { border-top-color: #7b8794; }
.pii-warn { display: none; margin-top: 3px; font-size: 11.5px; font-weight: 600; color: #b5442f; }
.pii-warn.on { display: block; }
/* 変更通知・入稿規定の小窓を広げる（10/19 本人指示。画面が狭いときは .modal の max-width: 94vw で縮む。入稿規定の印刷は body.print-spec の指定が優先） */
#chgBg .modal { width: 980px !important; }
#specBg .modal { width: 900px !important; }
/* 番組表の空欄から新規予約（10/19 本人指示）: マウスを合わせた空きマスに「＋」 */
.lanes .add-cell { position: absolute; z-index: 1; display: none; align-items: center; justify-content: center;
  background: rgba(182, 0, 129, .12); border: 1.5px solid var(--brand); border-radius: 3px; color: var(--brand); cursor: pointer; pointer-events: none; }
.lanes .add-cell svg.ic { width: 12px; height: 12px; stroke-width: 3; }
.grp.board-grp:not(.ro) .lanes { cursor: default; }
/* ＋のマス: 左辺だけ線、上下の線と薄い地は右へ（2マス目へ）向けて消えていく（10/19 本人指定） */
.lanes .add-cell {
  border: none; border-left: 1.5px solid var(--brand); border-radius: 3px 0 0 3px; justify-content: flex-start;
  background:
    linear-gradient(to right, var(--brand), rgba(182, 0, 129, 0)) top / 100% 1.5px no-repeat,
    linear-gradient(to right, var(--brand), rgba(182, 0, 129, 0)) bottom / 100% 1.5px no-repeat,
    linear-gradient(to right, rgba(182, 0, 129, .14), rgba(182, 0, 129, 0));
}
.lanes .add-cell .add-plus { display: inline-flex; align-items: center; justify-content: center; height: 100%; margin-left: -1.5px; }

/* ===== 自分の予約（10/19 本人指定）: 名前の前に「自分」の札（濃い地）、最新の1つは「自分・最新」（白地）。チェックでほかの予約を薄く ===== */
.bar .st-me, .bar .st-me-new { border-radius: 999px; padding: 2px 7px; }   /* 角丸は最大（10/19 本人指定） */
.bar .st-me { background: #26313d; color: #fff; }
.bar .st-me-new { background: #fff; color: #26313d; }   /* 枠線なし（見本どおり） */
.emph-mine .bar:not(.mine) { opacity: .28; }
.emph-mine .bar:not(.mine):hover { opacity: .6; }
#tip .tip-mine { display: inline-block; font-size: 10.5px; font-weight: 700; background: #fff; color: #26313d; border-radius: 3px; padding: 0 6px; margin-bottom: 4px; }
/* 「自分」の札の色は帯の色に合わせた濃い色（10/19 本人指定。共通の紺を使い回さない）。「自分・最新」は白地にその濃い色の字 */
.bar.common .st-me { background: #17573c; }  .bar.common .st-me-new { color: #17573c; }
.bar.ad .st-me     { background: #173f6b; }  .bar.ad .st-me-new     { color: #173f6b; }
.bar.mall .st-me   { background: #74430f; }  .bar.mall .st-me-new   { color: #74430f; }
.bar.ro .st-me     { background: #4b5562; }  .bar.ro .st-me-new     { color: #4b5562; }
/* 仮押さえの帯は白地なので、「自分・最新」の札は帯の色の薄い地にする（白地のままだと見えない） */
.bar.tentative.common .st-me-new { background: #d3ecdf; }
.bar.tentative.ad .st-me-new     { background: #d6e5f5; }
.bar.tentative.mall .st-me-new   { background: #f6e3cd; }
.bar.tentative.ro .st-me-new     { background: #e6e9ed; }
/* 仮押さえの帯（白地）では色使いを逆に（10/19 本人指定）: 「自分」＝帯の色の薄い地に濃い字、「自分・最新」＝濃い地に白字 */
.bar.tentative.common .st-me { background: #d3ecdf; color: #17573c; }  .bar.tentative.common .st-me-new { background: #17573c; color: #fff; }
.bar.tentative.ad .st-me     { background: #d6e5f5; color: #173f6b; }  .bar.tentative.ad .st-me-new     { background: #173f6b; color: #fff; }
.bar.tentative.mall .st-me   { background: #f6e3cd; color: #74430f; }  .bar.tentative.mall .st-me-new   { background: #74430f; color: #fff; }
.bar.tentative.ro .st-me     { background: #e6e9ed; color: #4b5562; }  .bar.tentative.ro .st-me-new     { background: #4b5562; color: #fff; }

/* ===== 「枠／日付」より上を固定（10/19 本人指示）: 番組表の中だけ縦横にスクロールし、見出し行を上端に貼り付ける ===== */
#boardArea .board { overflow: auto; }
.board .hrow.month { position: sticky; top: 0; z-index: 6; }
.board .hrow.days { position: sticky; top: 22px; z-index: 6; }
.board .hrow .hlabel { z-index: 7; }
.board-wrap { padding-bottom: 8px; }
#extraLegend .avail-legend { margin-top: 6px; }

/* 文字の大きさの切り替え */
.fs-seg { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 5px; overflow: hidden; background: #fff; }
.fs-seg .fs-lbl { font-size: 11px; color: var(--muted); padding: 0 8px; }
.fs-seg button { border: none; border-left: 1px solid var(--line-strong); border-radius: 0; padding: 5px 10px; font-size: 12px; background: #fff; color: var(--muted); }
.fs-seg button.on { background: var(--brand); color: #fff; font-weight: 600; }
/* 小窓を閉じる動きの間だけ表示を残す */
.modal-bg.closing { display: flex; pointer-events: none; }
/* 小窓が押した所から伸びて開くときの箱（作り直し） */
.modal-fly { position: fixed; z-index: 450; pointer-events: none; box-shadow: 0 10px 40px rgba(0, 0, 0, .25); box-sizing: border-box; }
.modal-fly { background: #fff; overflow: hidden; }
.modal-fly > i { position: absolute; inset: 0; }

/* デフォルトコンテンツ（10/23）: 空き枠に当てはめた表示だけの帯。予約（塗り）・仮押さえ（白地に点線）と見分けられるよう、
   枠の色をごく薄くした地に細い字。押すと下の空き枠の「＋」と同じく新規予約になる */
.lanes .dbar { position: absolute; border-radius: 3px; font-size: 10.5px; line-height: 1; padding: 0 5px;
  display: flex; align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: repeating-linear-gradient(135deg, rgba(120,130,142,.10) 0 4px, rgba(120,130,142,.04) 4px 8px); color: #5b6673; }
.grp.common .lanes .dbar { background: repeating-linear-gradient(135deg, rgba(47,158,111,.16) 0 4px, rgba(47,158,111,.07) 4px 8px); color: #2b6a50; }
.grp.ad .lanes .dbar     { background: repeating-linear-gradient(135deg, rgba(47,111,181,.16) 0 4px, rgba(47,111,181,.07) 4px 8px); color: #2a5486; }
.grp.mall .lanes .dbar   { background: repeating-linear-gradient(135deg, rgba(199,120,42,.18) 0 4px, rgba(199,120,42,.08) 4px 8px); color: #7f4f1d; }
.grp.ro .lanes .dbar     { background: repeating-linear-gradient(135deg, rgba(120,130,142,.14) 0 4px, rgba(120,130,142,.05) 4px 8px); color: #5b6673; }
.lg-dflt { display: inline-block; width: 14px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: -1px;
  background: repeating-linear-gradient(135deg, rgba(120,130,142,.35) 0 3px, rgba(120,130,142,.12) 3px 6px); }
.df-seg { display: inline-flex; margin: 4px 0 8px; }
.exp-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.exp-head { font-weight: bold; font-size: 13px; }
.exp-body { max-height: 56vh; overflow: auto; border: 1px solid #e3e8ef; border-radius: 4px; }
.exp-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.exp-table th { position: sticky; top: 0; background: #f4f6f9; text-align: left; padding: 5px 8px; border-bottom: 1px solid #dfe5ec; font-weight: 600; }
.exp-table td { padding: 4px 8px; border-bottom: 1px solid #eef1f5; }
.exp-table td.c { text-align: center; white-space: nowrap; }
.exp-table td.u { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.exp-table .pt { color: var(--muted); font-size: 11px; }
.exp-table tr.t-df td { color: #5b6673; background: #fafbfc; }
.exp-table tr.t-em td { color: #b5442f; }
.exp-table tr.t-tt td:nth-child(3) { color: #8a5a00; font-weight: 600; }
.grp-table tr.off td { color: var(--muted); }
.grp-table .nw { white-space: nowrap; }

/* 入稿規定: 解像度の下の補足（層間の安全マージン・標準サイズの注釈・11/5） */
.spec-sub { font-size: 11px; color: var(--muted); line-height: 1.5; margin-top: 2px; }
.spec-sub.note { color: #8f3627; }

/* マニュアルの小窓（11/13〜） */
#manBody { max-height: 72vh; overflow: auto; }
.man-h { font-size: 14px; margin: 4px 0 10px; padding-bottom: 4px; border-bottom: 1px solid var(--line, #e3e6eb); }
.man-h:not(:first-child) { margin-top: 20px; }
.man-item { border: 1px solid var(--line, #e3e6eb); border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; }
.man-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.man-label { font-weight: 700; }
.man-ver { font-size: 12px; color: var(--muted); }
.man-video { display: block; width: 100%; margin-top: 8px; border-radius: 6px; background: #000; }
.man-btns { display: flex; gap: 8px; margin-top: 8px; }
.man-empty { color: var(--muted); font-size: 13px; }
.man-hist { width: 100%; border-collapse: collapse; font-size: 13px; }
.man-hist td { padding: 6px 8px; border-bottom: 1px solid var(--line, #e3e6eb); vertical-align: top; }
.man-hist td.d { white-space: nowrap; color: var(--muted); }
.man-hist td.k { white-space: nowrap; font-weight: 600; }
.man-btn { line-height: 1.05; padding-top: 6px; padding-bottom: 6px; margin-left: auto; }   /* 狭い画面で2段目に回ったときも右端に置く */
.man-btn .tx { display: inline-flex; flex-direction: column; align-items: center; text-align: center; }
.man-btn small { font-size: 10px; font-weight: 500; opacity: .85; letter-spacing: 0; margin-top: 0; }
.man-modal { width: 760px; }
#manBg.viewing .man-modal { width: min(1100px, 96vw); }
.man-viewer { display: none; padding: 0 18px 12px; }
#manBg.viewing #manBody { display: none; }
#manBg.viewing .man-viewer { display: block; }
.man-viewer-bar { display: flex; align-items: center; gap: 10px; padding: 10px 0; font-weight: 700; }
.man-viewer-bar a { font-size: 13px; font-weight: 500; }
#manFrame { display: block; width: 100%; height: 72vh; border: 1px solid var(--line); border-radius: 6px; background: #f4f5f7; }
.legend-row { flex-basis: 100%; }

/* 右上：取り消し／やり直し（11/13〜）とモール名の札。ボタンの共通の見た目（button:has(> svg.ic)…）より強くするため id で指定 */
.hd-right { position: absolute; right: 20px; top: 12px; display: flex; align-items: center; gap: 10px; }
.hd-right .role-badge { position: static; }
.hd-undo { display: inline-flex; gap: 6px; }
#undoBox .hd-btn { font-size: 12px; padding: 3px 10px; border-radius: 6px; background: rgba(255, 255, 255, .16); color: #fff;
  border: 1px solid rgba(255, 255, 255, .55); cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
#undoBox .hd-btn:hover:not(:disabled) { background: rgba(255, 255, 255, .28); }
#undoBox .hd-btn:disabled { opacity: .4; cursor: default; }
#undoBox .hd-btn svg.ic { width: 14px; height: 14px; }
/* 右上のログイン中の表示はボタンに見えないよう、枠なしの文字だけに（11/13 本人「モール名もボタンに見えちゃう」） */
.hd-right .role-badge, .hd-right .role-badge.view { background: none; border: none; padding: 0 2px; color: rgba(255,255,255,.85); font-size: 11px; }

/* 端末ごとの素材（11/17〜）: 素材リンクの欄を端末ごとに並べる */
.src-field > .vary-box { flex-basis: 100%; display: grid; gap: 4px; }
.vary-box input { margin-bottom: 4px; }
.field .vary-box label { font-size: 11.5px; color: var(--muted); margin: 0; }

/* 終了日の「無期限」（11/18 渡辺さん要望） */
.field label .forever { margin-left: 12px; display: inline-flex; align-items: center; gap: 4px; font-weight: normal; white-space: nowrap; flex-shrink: 0; }
.field label .forever input { margin: 0; }
.field label .forever label { display: inline; margin: 0; font-weight: normal; cursor: pointer; white-space: nowrap; color: var(--text, #223); }
.forever-box { display: none; align-items: center; height: 38px; padding: 0 10px; border: 1px solid #d5dbe3; border-radius: 6px;
  background: #f4f6f9; color: #334; font-size: 14px; }

/* 予約を上下にドラッグして行を入れ替える（11/18 渡辺さん要望） */
.bar.draggable { cursor: grab; }
.bar.dragging { z-index: 6; box-shadow: 0 4px 12px rgba(0, 0, 0, .35); outline: 2px solid #1f3a68; }
.bar.swap-preview { z-index: 5; outline: 2px dashed #1f3a68; box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
.bar.swap-ng { outline: 2px solid #c0392b !important; }
.swap-tag { position: fixed; z-index: 1000; margin-left: 4px; padding: 2px 8px; border-radius: 4px; background: #1f3a68; color: #fff;
  font-size: 12px; line-height: 18px; white-space: nowrap; pointer-events: none; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }
.swap-tag.ng { background: #c0392b; }
.swap-tag span { margin-left: 8px; opacity: .9; font-size: 11px; }
body.lane-dragging, body.lane-dragging * { cursor: grabbing !important; user-select: none; }

/* 繰り返し・区切り（11/19〜ベータ・開発者だけ） */
.rule-box { margin: 4px 0 10px; padding: 10px 12px; border: 1px dashed #c6b4d8; border-radius: 8px; background: #faf7fd; }
.beta-tag { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 8px; background: #6b4d8a; color: #fff; font-size: 10px; line-height: 16px; vertical-align: 1px; }
.rule-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.rule-row select { width: auto; }
.rule-vals { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-size: 13px; }
.rule-vals label { display: inline-flex; align-items: center; gap: 3px; font-weight: normal; margin: 0; }
.rule-vals .sep { color: var(--muted); margin: 0 2px; }
.seg-table { width: 100%; border-collapse: collapse; font-size: 12px; margin-bottom: 6px; }
.seg-table th { text-align: left; font-weight: normal; color: var(--muted); padding: 2px 4px; }
.seg-table td { padding: 2px 4px; }
.seg-table input, .seg-table select { height: 30px; font-size: 12px; padding: 0 6px; }
.seg-table .del { border: none; background: none; color: var(--muted); cursor: pointer; font-size: 16px; }
.seg-add { font-size: 12px; padding: 4px 10px; }
.bar .bar-off { position: absolute; top: 0; bottom: 0; pointer-events: none;
  background: repeating-linear-gradient(45deg, rgba(255,255,255,.92) 0 3px, rgba(255,255,255,.6) 3px 6px); }
.bar .bar-vline { position: absolute; top: 0; bottom: 0; border-left: 2px solid rgba(255,255,255,.95); pointer-events: none; }
.bar .bar-ver { position: absolute; bottom: 1px; padding: 0 3px; border-radius: 2px; background: rgba(0,0,0,.55); color: #fff;
  font-size: 9px; line-height: 12px; white-space: nowrap; pointer-events: none; }


/* 端末台帳とジャック（開発者専用・ベータ・11/20） */
.jk-day { margin-top: 8px; }
.jk-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.jk-sub { color: var(--muted); font-size: 12px; }
.jk-grid { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; max-height: 240px; overflow: auto; }
.jk-row { display: flex; align-items: center; gap: 8px; height: 22px; }
.jk-name { width: 260px; flex: none; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jk-bar { position: relative; flex: 1; height: 14px; background: repeating-linear-gradient(90deg, #f3f5f8 0 calc(100% / 8 - 1px), #dfe4ea calc(100% / 8 - 1px) calc(100% / 8)); border-radius: 3px; }
.jk-bar i { position: absolute; top: 0; bottom: 0; border-radius: 2px; background: #2f6fb5; }
.jk-bar i.zero { background: #c0582b; }
.jk-scale .jk-bar { background: none; height: 14px; }
.jk-scale .jk-bar span { position: absolute; transform: translateX(-50%); font-size: 10px; color: var(--muted); }
.jk-scr { max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; }
.field .jk-scr label { display: flex; align-items: center; gap: 6px; padding: 4px 0; margin: 0; font-size: 12.5px; color: var(--text); font-weight: normal; border-bottom: 1px dashed var(--line); cursor: pointer; }
.field .jk-scr input { width: auto; margin: 0; flex: none; }
.jk-per { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.field .jk-per input[type=date], .field .jk-per input[type=time] { width: 160px; }
.field .jk-scr label.ng { color: var(--muted); cursor: default; }
.jk-tags { margin-left: auto; color: var(--muted); font-size: 11px; white-space: nowrap; padding-left: 8px; }
.jk-hours { display: grid; grid-template-columns: repeat(8, auto); gap: 2px 8px; }
/* 開発者アカウントはタブが12個になるので、文字を折らずに詰める（ほかのアカウントの見た目は変えない） */
#admTabs.many { flex-wrap: wrap; }
#admTabs.many .tab { white-space: nowrap; padding: 6px 10px; }
.field .jk-per select { width: auto; }
.jk-legend { margin-left: auto; display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.jk-legend i { display: inline-block; width: 14px; height: 8px; border-radius: 2px; background: #2f6fb5; margin-left: 8px; }
.jk-legend i.zero { width: 3px; background: #c0582b; }
/* 予約の小窓の「複製」（11/25）: 紫の見出しのタイトルの右に置く（×から離す・本人指定） */
#modalBg .modal h2 button#btnDup {
  margin-left: 8px; height: 28px; padding: 0 10px;
  display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: normal; border-radius: 6px;
  background: rgba(255, 255, 255, .16) !important; border: 1px solid rgba(255, 255, 255, .7) !important; color: #fff !important;
}
#modalBg .modal h2 button#btnDup:hover { background: rgba(255, 255, 255, .28) !important; }
#modalBg .modal h2 button#btnDup svg.ic { width: 15px; height: 15px; }

/* 予約番号で探す（11/29〜）。見つけた予約の帯は濃い枠で囲み、最初に3回点滅させる */
.find-box { position: relative; display: inline-flex; align-items: center; gap: 4px; }
.find-box input { width: 190px; }
.find-note { display: none; position: absolute; top: calc(100% + 4px); left: 0; z-index: 40; width: max-content; max-width: 320px;
  padding: 6px 10px; font-size: 12px; line-height: 1.5; color: #b03a2e; background: #fff; border: 1px solid #f0b8b0; border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .12); }
.find-note.on { display: block; }
.bar.found { outline: 3px solid #e8590c; outline-offset: -3px; z-index: 2; animation: found-blink .5s ease-in-out 3 alternate; }
@keyframes found-blink { from { outline-color: #e8590c; } to { outline-color: transparent; } }

/* 素材アップロード（12/1〜） */
.up-box { margin: 8px 0 14px; padding: 12px 14px; border: 2px solid #6b3fa0; border-radius: 10px; background: #f7f2fb; }
.up-head { font-weight: 700; font-size: 14px; color: #4a2a75; margin-bottom: 8px; }
.up-head span { font-weight: 400; font-size: 12px; color: var(--muted); }
.up-or { font-size: 12px; color: var(--muted); margin: 2px 0 6px; }
.up-drop { border: 2px dashed #6b3fa0; border-radius: 8px; padding: 22px 10px; width: 100%; box-sizing: border-box; text-align: center; cursor: pointer; font-size: 13px; background: #fafafa; }
.up-drop b { font-size: 14px; color: #4a2a75; }
.up-drop span { font-size: 12px; color: var(--muted); }
.up-drop.on { background: #eef5ff; border-color: #2a6fd6; }
.up-drop.off { display: none; }
.up-list { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-top: 8px; }
.up-list td { border-bottom: 1px solid #e5e5e5; padding: 5px 4px; vertical-align: middle; }
.up-list .bar { height: 6px; background: #e5e5e5; border-radius: 3px; overflow: hidden; min-width: 80px; }
.up-list .bar i { display: block; height: 100%; width: 0; background: #6b3fa0; }
.up-list button { margin-left: 4px; }
.up-player { width: 100%; max-height: 300px; background: #000; margin-top: 8px; }
.up-msg-ng { color: #c00; }

.up-pop { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 9999; display: flex; align-items: center; justify-content: center; }
.up-pop[hidden] { display: none; }
.up-pop-in { position: relative; background: #fff; border-radius: 10px; padding: 16px; max-width: min(92vw, 960px); width: 100%; }
.up-pop-x { position: absolute; top: 4px; right: 8px; border: 0; background: none; font-size: 24px; cursor: pointer; }
.up-pop-t { font-size: 13px; margin: 0 24px 8px 0; word-break: break-all; }
.up-pop-m { width: 100%; max-height: 72vh; background: #000; object-fit: contain; }
.src-chk { flex-wrap: wrap; gap: 4px 14px !important; }

/* 共通素材の選択（12/2〜） */
.cm-box { margin: 10px 0 4px; padding: 12px 14px; border: 2px solid var(--m, #b5006e); border-radius: 10px; background: #fff8fc; }
.cm-box h3 { margin: 0 0 2px; font-size: 15px; color: #a0005f; }
.cm-box .cm-s { font-size: 12.5px; color: var(--muted, #666); margin-bottom: 6px; }
.cm-sub { font-size: 12.5px; font-weight: 700; margin: 10px 0 4px; }
.cm-folder { font-size: 12.5px; color: var(--muted, #666); margin: 2px 0 4px; }
.cm-row { display: grid; grid-template-columns: 54px 1fr auto auto auto; gap: 10px; align-items: center; border: 1px solid #d9d9de; border-radius: 8px; padding: 8px 10px; margin-bottom: 6px; background: #fff; }
.cm-row.sel { border: 2px solid #6b3fa0; background: #f7f2fb; }
.cm-th { width: 54px; height: 54px; border-radius: 6px; background: linear-gradient(135deg, #f4c2dc, #c9a3e0); display: flex; align-items: center; justify-content: center; font-size: 11px; color: #fff; font-weight: 700; }
.cm-th.tate { width: 34px; margin: 0 10px; }
.cm-th.kan { width: 54px; height: 20px; margin: 17px 0; }
.cm-nm { font-size: 13px; word-break: break-all; }
.cm-nm small { display: block; color: var(--muted, #666); font-size: 11.5px; }
.cm-tag { display: inline-block; font-size: 11px; padding: 0 7px; border-radius: 9px; background: #eef; color: #336; margin-right: 4px; }
.cm-tag.w { background: #fff1d6; color: #8a5a00; }
.cm-use { border: 2px solid #6b3fa0; color: #6b3fa0; background: #fff; border-radius: 6px; padding: 6px 12px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.cm-row.sel .cm-use { background: #6b3fa0; color: #fff; }
.cm-sz { font-size: 12px; color: var(--muted, #666); white-space: nowrap; }
.cm-search input { width: 100%; padding: 8px; border: 1px solid #d9d9de; border-radius: 6px; font-size: 14px; }
.cm-res, .cm-tree { border: 1px solid #d9d9de; border-radius: 8px; margin-top: 6px; max-height: 260px; overflow: auto; background: #fff; }
.cm-res div { display: flex; justify-content: space-between; gap: 8px; padding: 6px 10px; border-bottom: 1px solid #eee; cursor: pointer; font-size: 13px; }
.cm-res div:hover, .cm-leaf:hover { background: #faf5fc; }
.cm-res small, .cm-leaf small { color: var(--muted, #666); white-space: nowrap; }
.cm-tree { padding: 6px 8px; }
.cm-tree details { margin-left: 14px; }
.cm-tree summary { cursor: pointer; padding: 3px 0; font-size: 13px; }
.cm-leaf { margin-left: 28px; padding: 3px 6px; cursor: pointer; font-size: 13px; border-radius: 5px; display: flex; justify-content: space-between; gap: 8px; }
.cm-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.cm-chip { border: 1px solid #d9d9de; background: #fff; border-radius: 14px; padding: 3px 10px; font-size: 12.5px; cursor: pointer; }
.cm-chip.on { background: #6b3fa0; color: #fff; border-color: #6b3fa0; }
.cm-chip small { opacity: .7; }
.cm-dep { display: inline-block; font-size: 11px; padding: 0 7px; border-radius: 9px; background: #e8f1ff; color: #24508a; margin-left: 6px; white-space: nowrap; }
.cm-dep.none { background: #f1f1f4; color: #777; }
.cm-empty { background: #fff4e5; border: 1px solid #f1cf9a; border-radius: 8px; padding: 10px; font-size: 13px; margin-bottom: 8px; }
.cm-saved { margin-top: 10px; font-size: 12px; color: var(--muted, #666); border-top: 1px dashed #d9d9de; padding-top: 6px; }
.cm-saved code { background: #f1f1f4; padding: 1px 5px; border-radius: 4px; word-break: break-all; }

/* 素材リンクの欄は全幅、備考は下に全幅（12/2） */
.grid4 .s4 { grid-column: 1 / -1; }
.note-row { margin-top: 10px; }
.note-row textarea { width: 100%; }
.src-field > .up-box { flex-basis: 100%; }

.cm-play { border: 1px solid #b8b8c4; background: #fff; color: #444; border-radius: 6px; padding: 6px 10px; cursor: pointer; white-space: nowrap; }

.cm-eg { display: inline; margin-left: 10px; font-size: 11.5px; color: var(--muted, #666); }
