/* 配信の舞台裏の黒板：紺の地に黄の大きな字。赤は宛先と「出す」だけ、緑は「届いた」だけ（今のカンペと同じ） */
:root{
  --bg:#0a1430; --panel:#12214a; --panel2:#0e1b3d; --line:#2b3c72; --fg:#f4f1e6; --mute:#9ba7c9;
  --yellow:#ffd400; --red:#e0281f; --ink:#05080f; --ok:#37c978;
  --disp:"Dela Gothic One","Zen Kaku Gothic New","Hiragino Sans","Yu Gothic UI",sans-serif;
  --ui:"Zen Kaku Gothic New","Hiragino Sans","Noto Sans JP","Yu Gothic UI",system-ui,sans-serif;
  color-scheme:dark;
}
*{box-sizing:border-box}
[hidden]{display:none!important}
html,body{height:100%;margin:0}
body{background:var(--bg);color:var(--fg);font-family:var(--ui);font-size:15px;line-height:1.6}
button{font:inherit;color:inherit;cursor:pointer}
button:focus-visible,textarea:focus-visible,input:focus-visible{outline:3px solid var(--yellow);outline-offset:2px}
.to-tag{display:inline-block;padding:1px 10px;border-radius:4px;background:var(--red);color:#fff;font-weight:900;font-size:13px}
.ghost{border:2px solid var(--line);background:transparent;border-radius:8px;padding:5px 12px;font-weight:900;font-size:13px;color:var(--fg)}
.ghost:disabled{opacity:.45;cursor:default}

/* ===== 運営の入力ページ ===== */
.wrap{display:flex;flex-direction:column;min-height:100%;padding:12px 16px 24px;gap:14px;max-width:1200px;margin:0 auto}
header{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.brand{display:flex;align-items:baseline;gap:10px;min-width:0;flex-wrap:wrap}
.brand b{font-family:var(--disp);font-weight:400;font-size:20px;color:var(--yellow);letter-spacing:.02em}
.brand span{font-size:12px;color:var(--mute);font-weight:700}
.conn{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:900;flex-wrap:wrap}
.pill{display:inline-flex;align-items:center;gap:6px;padding:3px 12px;border-radius:999px;border:2px solid var(--line);background:var(--panel2)}
.pill::before{content:"";width:9px;height:9px;border-radius:50%;background:var(--mute)}
.pill.ok::before{background:var(--ok)}
.pill.bad{border-color:var(--red)}
.pill.bad::before{background:var(--red)}
.notice{border:2px solid var(--red);background:var(--panel2);border-radius:10px;padding:10px 14px;font-weight:700;font-size:14px}

.login{max-width:420px;margin:8vh auto 0;width:100%}
.login input[type=password],.login input[type=text]{width:100%;border:2px solid var(--line);border-radius:10px;background:var(--ink);color:var(--fg);padding:10px 12px;font:700 18px/1.4 var(--ui)}
.login label{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:900;color:var(--mute)}
.login .check{flex-direction:row;align-items:center;gap:8px}

#write{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:16px;align-items:start}
@media (max-width:820px){#write{grid-template-columns:minmax(0,1fr)}}
.col{display:flex;flex-direction:column;gap:14px;min-width:0}
.card{background:var(--panel);border:2px solid var(--line);border-radius:12px;padding:14px;display:flex;flex-direction:column;gap:10px;min-width:0}
.label{font-size:12px;font-weight:900;color:var(--mute);letter-spacing:.08em}
.now-box{display:grid;place-items:center;min-height:120px;border-radius:10px;background:var(--ink);border:2px solid var(--line);padding:12px;text-align:center}
.now-box p{margin:0;font-family:var(--disp);font-size:clamp(20px,3.4vw,30px);line-height:1.3;color:var(--yellow);word-break:auto-phrase;overflow-wrap:anywhere}
.now-box.empty p{font-family:var(--ui);font-weight:700;font-size:14px;color:var(--mute)}
.now-meta{display:flex;flex-wrap:wrap;align-items:center;gap:8px;font-size:13px;color:var(--mute);font-weight:700}
.seen{color:var(--ok);font-weight:900}
.wait{color:var(--yellow);font-weight:900}
.row{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.chips{display:flex;gap:6px;flex-wrap:wrap}
.chips button{border:2px solid var(--line);background:var(--panel2);border-radius:999px;padding:4px 14px;font-weight:900;font-size:14px}
.chips button[aria-pressed="true"]{border-color:var(--red);background:var(--red);color:#fff}
textarea{width:100%;min-height:96px;resize:vertical;border:2px solid var(--line);border-radius:10px;background:var(--ink);color:var(--fg);padding:10px 12px;font:700 18px/1.5 var(--ui)}
textarea::placeholder{color:#5f6c92}
.send{border:0;border-radius:10px;background:var(--red);color:#fff;font-family:var(--disp);font-size:20px;padding:10px 26px;box-shadow:0 3px 0 #8d140f}
.send:disabled{opacity:.45;cursor:default}
.send.urgent{color:var(--yellow);outline:3px solid var(--yellow);outline-offset:-3px}
.urgent-tag{display:inline-block;padding:1px 10px;border-radius:4px;background:var(--yellow);color:var(--ink);font-weight:900;font-size:13px}
.now-box.urgent{border:4px solid var(--red)}
.presets{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:8px}
.presets button{border:2px solid var(--line);background:var(--panel2);border-radius:8px;padding:8px 10px;text-align:left;font-weight:900;font-size:14px;line-height:1.35;min-width:0}
.presets button:hover{border-color:var(--yellow)}
.hint{margin:0;font-size:12px;color:var(--mute);font-weight:700}
.log{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.log li{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:10px;align-items:start;padding:8px 10px;border-radius:8px;background:var(--panel2)}
.log time{font-size:12px;color:var(--mute);font-weight:900;font-variant-numeric:tabular-nums;padding-top:2px}
.log .t{font-weight:700;overflow-wrap:anywhere}
.log .t small{display:block;color:var(--mute);font-size:12px}
.log .empty{display:block;color:var(--mute);font-size:13px;background:transparent;padding:0}
.toast{position:fixed;left:50%;bottom:16px;transform:translateX(-50%);background:var(--fg);color:var(--ink);font-weight:900;padding:8px 16px;border-radius:999px;font-size:14px;max-width:calc(100% - 32px)}

/* ===== Zoomの中の表示（右の欄・別ウィンドウ・タブレット） ===== */
body.show{overflow:hidden}
.stage{position:fixed;inset:0;display:flex;flex-direction:column;border:6px solid var(--line);background:var(--ink);padding:10px 12px;gap:6px;overflow:hidden}
.stage.flash{animation:flash .5s steps(2,end) 6}
@keyframes flash{0%{border-color:var(--yellow);background:#2a2000}100%{border-color:var(--red);background:var(--ink)}}
@media (prefers-reduced-motion:reduce){.stage.flash{animation:none;border-color:var(--yellow)}}
/* 急ぎ：画面全体を赤と黄で1秒に1回点滅（WCAG 2.3.1 の「1秒に3回まで」より少なく）。字は黒で、赤でも黄でも読める。
   15秒たったら点滅は止め、赤い太枠と「急ぎ」の札だけ残す。動きを減らす設定の端末は点滅せず赤い背景のまま。音は出さない */
.stage.urgent{border:12px solid var(--red)}
.stage.urgent-flash{animation:urgent 1s steps(1,end) infinite}
@keyframes urgent{0%{background:var(--red);border-color:var(--yellow)}50%{background:var(--yellow);border-color:var(--red)}100%{background:var(--yellow);border-color:var(--red)}}
@media (prefers-reduced-motion:reduce){.stage.urgent-flash{animation:none;background:var(--red);border-color:var(--yellow)}}
.stage.urgent-flash .fit p,.stage.urgent-flash .meta{color:var(--ink)}
.urgent-mark{flex:none;padding:1px 10px;border-radius:4px;background:var(--ink);color:var(--yellow);border:2px solid var(--yellow);font-family:var(--disp);font-size:clamp(14px,4.4vw,24px);line-height:1.3}
.stage .top{display:flex;justify-content:space-between;align-items:center;gap:8px;min-height:24px}
.stage .to-tag{font-size:clamp(13px,4vw,22px);padding:1px 10px}
.stage .meta{font-size:clamp(12px,3.2vw,16px);color:var(--mute);font-weight:900;white-space:nowrap}
.stage .dot{width:10px;height:10px;border-radius:50%;background:var(--ok);flex:none}
.stage .dot.bad{background:var(--red)}
.fit{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;text-align:center}
.fit p{margin:0;font-family:var(--disp);color:var(--yellow);line-height:1.18;word-break:auto-phrase;overflow-wrap:anywhere;text-wrap:balance}
.stage.empty .fit p{font-family:var(--ui);font-weight:900;color:var(--mute);font-size:16px}
.stage.stale .fit p{opacity:.45}
.stage .warn{margin:0;background:var(--red);color:#fff;font-weight:900;font-size:13px;text-align:center;border-radius:6px;padding:2px 6px}
.stage .foot{display:flex;justify-content:flex-end;gap:8px}
.stage .foot .ghost{font-size:12px;padding:3px 10px;opacity:.7}
