/* 1枚分のスライド（大型モニター・編集画面のプレビュー共通）。1296×872px の枠に描く前提で px 指定 */
.sl {
  --ink: #111827;
  --ink-2: #374151;
  --muted: #6b7280;
  --line: #e5e7eb;
  --cat: #475569;
  position: relative;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  padding: 38px 52px 32px 64px;
  background: #ffffff;
  color: var(--ink);
  border-radius: 22px;
  overflow: hidden;
  font-family: 'BIZ UDPGothic', 'Yu Gothic', 'Meiryo', sans-serif;
  text-align: left;
}
.sl *, .sl *::before, .sl *::after { box-sizing: border-box; }
/* 区分の色の帯（左端） */
.sl::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 14px;
  background: var(--cat);
}

.sl-head { flex: 0 0 auto; display: flex; align-items: center; gap: 14px; min-width: 0; }
.sl-cat {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 12px;
  height: 54px; padding: 0 28px;
  border-radius: 999px;
  background: var(--cat); color: #fff;
  font-size: 28px; font-weight: 700; letter-spacing: .04em;
  white-space: nowrap;
}
.sl-prio {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 10px;
  height: 54px; padding: 0 26px;
  border-radius: 999px;
  background: #dc2626; color: #fff;
  font-size: 28px; font-weight: 700;
  white-space: nowrap;
}
/* 新着（掲示開始から48時間） */
.sl-new {
  flex: 0 0 auto;
  display: inline-flex; align-items: center;
  height: 54px; padding: 0 24px;
  border-radius: 999px;
  background: #fde68a; color: #78350f;
  border: 3px solid #f59e0b;
  font-size: 28px; font-weight: 700;
  white-space: nowrap;
}
.sl-month { margin-left: auto; font-size: 34px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.sl-pager + .sl-month { margin-left: 18px; }

.sl-title {
  flex: 0 0 auto;
  margin-top: 22px;
  font-size: 66px; font-weight: 700; line-height: 1.3;
  color: var(--ink);
  word-break: auto-phrase;
  overflow-wrap: anywhere;
}

.sl-title-cont { margin-top: 18px; font-size: 44px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.sl-cont { margin-left: .3em; font-size: .8em; color: var(--muted); }
.sl-main { flex: 1 1 auto; min-height: 0; display: flex; gap: 40px; margin-top: 24px; }
.sl-text {
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  font-size: 44px; line-height: 1.62;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}
.sl-text, .em-body { word-break: auto-phrase; }
.sl-main.title-only { align-items: center; justify-content: center; margin-top: 0; }
.sl-big {
  max-width: 100%;
  font-size: 110px; font-weight: 700; line-height: 1.3;
  text-align: center; color: var(--ink);
  word-break: auto-phrase; overflow-wrap: anywhere;
}
.sl-main.with-img .sl-text { flex: 1 1 54%; }
.sl-main.with-img .sl-imgs { flex: 0 0 44%; }
.sl-main.img-only .sl-imgs { flex: 1 1 auto; }

.sl-imgs { display: grid; gap: 14px; min-height: 0; min-width: 0; }
.sl-imgs.n1 { grid-template: 1fr / 1fr; }
.sl-imgs.n2 { grid-template: 1fr 1fr / 1fr; }
.sl-main.img-only .sl-imgs.n2 { grid-template: 1fr / 1fr 1fr; }
.sl-imgs.n3, .sl-imgs.n4 { grid-template: 1fr 1fr / 1fr 1fr; }
.sl-imgs.n3 .sl-img:first-child { grid-row: 1 / 3; }
.sl-img { position: relative; min-height: 0; border-radius: 14px; overflow: hidden; background: #e5e7eb; }
.sl-img-bg { position: absolute; inset: -40px; background: center / cover no-repeat; filter: blur(26px); opacity: .6; }
.sl-img img { position: relative; display: block; width: 100%; height: 100%; object-fit: contain; }

.sl-foot { flex: 0 0 auto; display: flex; align-items: flex-end; gap: 24px; margin-top: 20px; }
.sl-meta { margin-left: auto; display: flex; gap: 30px; font-size: 24px; color: var(--muted); white-space: nowrap; }
.sl-meta i { margin-right: 10px; }
.sl-qr { display: flex; align-items: center; gap: 14px; font-size: 22px; font-weight: 700; line-height: 1.35; color: var(--ink-2); white-space: nowrap; }
.sl-qr svg { display: block; width: 160px; height: 160px; padding: 8px; background: #fff; border: 2px solid var(--line); border-radius: 10px; }
.sl-qr svg path, .sl-qr svg rect { shape-rendering: crispEdges; }

/* 重要：枠の内側に赤い線 */
.sl.is-important { box-shadow: inset 0 0 0 8px #dc2626; }

/* 画像を大きく（ポスター・PDF） */
.sl-poster { padding: 26px 34px 26px 46px; }
.sl-poster .sl-head { gap: 16px; }
.sl-poster-title { flex: 1 1 auto; min-width: 0; font-size: 40px; font-weight: 700; white-space: nowrap; overflow: hidden; }
.sl-pager { flex: 0 0 auto; margin-left: auto; padding: 4px 18px; border-radius: 999px; background: #f1f5f9; font-size: 28px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.sl-poster .sl-pager { margin-left: 0; }
.sl-poster-img { flex: 1 1 auto; min-height: 0; margin-top: 18px; border-radius: 14px; overflow: hidden; background: #f3f4f6; }
.sl-poster-img img { display: block; width: 100%; height: 100%; object-fit: contain; }
.sl-qr-head { flex: 0 0 auto; gap: 10px; font-size: 18px; }
.sl-qr-head svg { width: 104px; height: 104px; padding: 6px; }

/* 清掃当番（AYG出勤管理の清掃場所タブと同じ内容） */
.sl-head-title { min-width: 0; margin-left: 6px; font-size: 44px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-wrap { flex: 1 1 auto; min-height: 0; margin-top: 18px; overflow: hidden; }
.cl-inner { width: 100%; }
.cl-map { position: relative; width: 100%; border-radius: 12px; overflow: hidden; border: 2px solid var(--line, #e5e7eb); background: #fff; }
.cl-map img { display: block; width: 100%; height: auto; }
.cl-box {
  position: absolute;
  border: 4px solid var(--c);
  background: color-mix(in srgb, var(--c) 24%, transparent);
  border-radius: 4px;
}
.cl-box.blink { animation: cl-blink 1.6s ease-in-out infinite; }
@keyframes cl-blink { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
.cl-here { position: absolute; width: 0; height: 0; }
.cl-here-dot {
  position: absolute; left: -11px; top: -11px;
  width: 22px; height: 22px; border-radius: 50%;
  background: #dc2626; border: 3px solid #fff;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, .35);
}
.cl-here-label {
  position: absolute; left: 0; bottom: 16px; transform: translateX(-50%);
  padding: 2px 10px; border-radius: 6px;
  background: #dc2626; color: #fff;
  font-size: 16px; font-weight: 700; white-space: nowrap;
}
/* 1ページ目：マップの下に「場所 → 担当グループ」 */
.cl-legend { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; margin-top: 18px; }
.cl-leg {
  display: flex; flex-direction: column; gap: 6px;
  min-width: 0; padding: 10px 14px 12px 16px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-left: 16px solid var(--c);
  white-space: nowrap;
}
.cl-leg-place { overflow: hidden; font-size: 30px; font-weight: 700; color: #111827; }
.cl-leg-to { display: flex; align-items: center; gap: 12px; }
.cl-leg-arrow { flex: 0 0 auto; font-size: 22px; color: #94a3b8; }
.cl-group { flex: 0 0 auto; padding: 3px 14px; border-radius: 8px; background: #0e7490; color: #fff; font-size: 30px; font-weight: 700; white-space: nowrap; }
.cl-group.none { background: #9ca3af; }

/* 2ページ目：場所ごとの担当メンバー（名前を大きく） */
.cl-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 18px; align-items: start; }
.cl-card {
  min-width: 0;
  padding: 12px 16px 16px;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-top: 14px solid var(--c);
}
.cl-card-hd { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.cl-place { max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-size: 30px; font-weight: 700; color: #111827; white-space: nowrap; }
.cl-card .cl-group { font-size: 26px; }
.cl-members { display: flex; flex-wrap: wrap; gap: 6px 8px; margin-top: 12px; }
.cl-member { padding: 2px 10px; border-radius: 8px; background: #e2e8f0; font-size: 28px; line-height: 1.4; color: #111827; white-space: nowrap; }
.cl-none { font-size: 24px; color: #9ca3af; }

/* 掲示が無い時 */
.sl-idle { align-items: center; justify-content: center; text-align: center; background: linear-gradient(160deg, #ffffff 0%, #f3f4f6 100%); }
.sl-idle .idle-date { font-size: 64px; font-weight: 700; color: #374151; }
.sl-idle .idle-title { margin-top: 36px; max-width: 100%; font-size: 96px; font-weight: 700; line-height: 1.3; color: #111827; word-break: auto-phrase; overflow-wrap: anywhere; }
.sl-idle .idle-sub { margin-top: 30px; font-size: 28px; color: #9ca3af; }

/* 緊急（画面全体で割り込み）。1920×1080px の枠に描く前提 */
.emg {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  background: #b91c1c; color: #fff;
  font-family: 'BIZ UDPGothic', 'Yu Gothic', 'Meiryo', sans-serif;
  animation: em-pulse 2.4s ease-in-out infinite;
  text-align: left;
}
.emg *, .emg *::before, .emg *::after { box-sizing: border-box; }
@keyframes em-pulse { 0%, 100% { background-color: #b91c1c; } 50% { background-color: #8f1313; } }
.em-stripe { flex: 0 0 36px; background: repeating-linear-gradient(-45deg, #facc15 0 36px, #111827 36px 72px); }
.em-head { flex: 0 0 auto; display: flex; align-items: center; gap: 24px; padding: 28px 64px 0; white-space: nowrap; }
.em-label {
  display: inline-flex; align-items: center; gap: 18px;
  padding: 10px 36px; border-radius: 999px;
  background: #fff; color: #b91c1c;
  font-size: 54px; font-weight: 700;
  animation: em-label 1.2s steps(1) infinite;
}
@keyframes em-label { 50% { background: #fde047; } }
.em-count { padding: 6px 20px; border-radius: 999px; background: rgba(0, 0, 0, .25); font-size: 34px; font-weight: 700; }
.em-time { margin-left: auto; font-size: 32px; opacity: .92; }
.em-clock { font-size: 60px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; }
.em-main { flex: 1 1 auto; min-height: 0; display: flex; gap: 48px; padding: 30px 64px 40px; }
/* 本文が短い時は上下の中央に寄せる（下半分が空かないように） */
.em-texts { flex: 1 1 auto; min-width: 0; min-height: 0; display: flex; flex-direction: column; justify-content: center; }
.em-title {
  flex: 0 0 auto;
  font-size: 150px; font-weight: 700; line-height: 1.2;
  word-break: auto-phrase; overflow-wrap: anywhere;
  text-shadow: 0 4px 0 rgba(0, 0, 0, .2);
}
.em-t1 { display: block; color: #fde047; }
.em-t2 { display: block; }
.em-body { flex: 0 1 auto; min-height: 0; overflow: hidden; margin-top: 34px; font-size: 56px; line-height: 1.55; overflow-wrap: anywhere; }
.em-main.with-img .em-texts { flex: 1 1 58%; }
.em-img { flex: 0 0 40%; min-height: 0; border-radius: 18px; overflow: hidden; background: rgba(255, 255, 255, .14); }
.em-img img { display: block; width: 100%; height: 100%; object-fit: contain; }
/* 訓練：赤の点滅をやめ、帯を青系にして本物と見分けられるようにする */
.emg.drill { animation: none; background: #9a3412; }
.emg.drill .em-stripe { background: repeating-linear-gradient(-45deg, #fde047 0 36px, #1e3a8a 36px 72px); }
.emg.drill .em-label { color: #9a3412; animation: none; }

/* 緊急表示の解除（数十秒だけ出す） */
.emg-clear {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 40px;
  background: #15803d; color: #fff;
  font-family: 'BIZ UDPGothic', 'Yu Gothic', 'Meiryo', sans-serif;
  text-align: center;
}
.emg-clear i { font-size: 150px; }
.emg-clear .t { font-size: 110px; font-weight: 700; }
.emg-clear .s { font-size: 44px; opacity: .92; }
