:root {
  color-scheme: dark;
  --bg: #071018;
  --bg2: #0b1822;
  --panel: #10202c;
  --ink: #d7e6ef;
  --muted: #7e97a6;
  --line: #1d3544;
  --cyan: #3ee0c5;
  --cyan-d: #1ea88f;
  --amber: #f5c542;
  --mag: #ff5d8f;
  --ok: #3ecf8e;
  --ok-d: #1f8f5e;
  --bad: #e45b55;
  --warn: #f0a202;
  --r: 14px;
  --fd: "IBM Plex Mono", ui-monospace, monospace;
  --fb: "IBM Plex Sans", system-ui, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; overflow: hidden; }
body {
  background: var(--bg);
  background-image:
    radial-gradient(circle at 12% 0%, #123044 0, transparent 42%),
    radial-gradient(circle at 90% 100%, #152a22 0, transparent 46%);
  color: var(--ink);
  font-family: var(--fb);
  font-size: 14px;
  line-height: 1.4;
  user-select: none;
  touch-action: manipulation;
}
button {
  font-family: inherit;
  color: inherit;
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0;
}
button:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
[hidden] { display: none !important; }

#app {
  width: 100%;
  max-width: none;
  margin: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg2);
  box-shadow: none;
  position: relative;
  overflow: hidden;
}
#app::after {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(transparent 0 2px, rgba(0,0,0,.05) 2px 3px);
  opacity: .35;
  z-index: 40;
}

.screen { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; }

/* splash */
#splash {
  padding: 28px 22px 24px;
  text-align: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(#0b1c26, #071018);
}
.rack { width: min(280px, 82%); }
.mascot {
  animation: bob 2.6s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}
.kicker {
  letter-spacing: .14em;
  text-transform: uppercase;
  font-size: 11px;
  color: var(--cyan);
  font-weight: 700;
  margin: 8px 0 0;
}
h1 {
  font-family: var(--fd);
  font-size: clamp(40px, 12vw, 56px);
  margin: 4px 0 8px;
  letter-spacing: .04em;
  text-shadow: 0 0 24px rgba(62, 224, 197, .35);
}
.lede { margin: 0 auto; max-width: 34ch; color: var(--muted); }
.scale { display: flex; gap: 6px; justify-content: center; margin: 14px 0 18px; }
.scale span {
  min-width: 64px; height: 32px; padding: 0 10px; border-radius: 8px;
  display: grid; place-items: center;
  font-family: var(--fd); font-weight: 700; font-size: 12px; color: #071018;
  letter-spacing: .04em;
}
.s0 { background: #8fd4c4; }
.s1 { background: var(--amber); }
.s2 { background: #f07a3a; color: #fff; }
.session-meta {
  margin: 0 auto 12px;
  max-width: 36ch;
  font-family: var(--fd);
  font-size: 12px;
  font-weight: 600;
  color: var(--cyan);
}
.big {
  width: min(320px, 100%);
  margin: 0 auto;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--cyan);
  color: #062018;
  font-family: var(--fd);
  font-size: 18px;
  font-weight: 700;
  box-shadow: 0 5px 0 var(--cyan-d);
}
.big + .big { margin-top: 10px; }
.big:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--cyan-d); }
.ghost {
  margin-top: 10px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  opacity: .8;
}
.ghost[hidden],
.big[hidden],
.session-meta[hidden] { display: none !important; }

/* top */
#top {
  flex: none;
  display: grid;
  grid-template-columns: 1fr auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: #08141c;
  border-bottom: 1px solid var(--line);
  z-index: 20;
}
#top .l { display: flex; align-items: center; gap: 8px; min-width: 0; }
.day { font-family: var(--fd); font-size: 16px; }
.sub { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.money {
  font-family: var(--fd);
  font-size: 22px;
  color: var(--amber);
  text-align: center;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.money small {
  display: block;
  font-family: var(--fb);
  font-size: 10px;
  color: var(--muted);
  letter-spacing: .08em;
  text-transform: uppercase;
}
#top .r { text-align: right; min-width: 0; }
.stars { color: var(--amber); letter-spacing: 1px; font-size: 13px; }
.ibtn {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.08);
  font-family: var(--fd); font-size: 12px;
}

.tabs {
  display: flex;
  gap: 0;
  padding: 0 10px;
  border-bottom: 1px solid var(--line);
  background: #0a1620;
  flex: none;
}
.tab {
  flex: 1;
  padding: 10px 8px 9px;
  font-family: var(--fd);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  position: relative;
}
.tab-badge {
  display: inline-block;
  min-width: 16px;
  padding: 0 5px;
  margin-left: 4px;
  border-radius: 99px;
  background: var(--mag);
  color: #071018;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  vertical-align: top;
}
.tab.on {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}
.panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#stage {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* playbook picker on console */
.pb-picker {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: auto;
  flex: 1 1 50%;
  min-height: 200px;
  max-height: none;
  padding: 4px 6px 8px;
  box-sizing: border-box;
}
/* When no ticket is claimed, grow the playbook picker. */
.ops:has(.work .ph) .ops-ticket {
  min-height: 132px;
  max-height: 132px;
}
.ops:has(.work .ph) .ops-close,
.ops:has(.work .ph) .pb-picker {
  flex: 1 1 auto;
  min-height: 240px;
}
.pb-apply {
  text-align: left;
  padding: 14px 16px 18px;
  border-radius: 12px;
  background: #0c1c26;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 72px;
  cursor: pointer;
}
.pb-apply .nm {
  font-family: var(--fd);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
}
.pb-apply .meta {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.45;
  margin: 0;
  padding-bottom: 2px;
}
.pb-apply.on {
  border-color: var(--cyan);
  background: rgba(62, 224, 197, .12);
}
.pb-apply:hover {
  border-color: #3a5a6c;
  background: #102430;
}
.pb-apply.on:hover {
  border-color: var(--cyan);
  background: rgba(62, 224, 197, .16);
}
.pb-apply:active { transform: translateY(1px); }
.pb-hint {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  padding: 8px;
}

/* playbooks authoring tab */
.pb-panel { overflow: auto; }
.pb-layout {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 10px 12px 18px;
  min-height: 0;
}
.pb-lib .lbl, .pb-compose .lbl { margin-top: 4px; }
#pb-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: min(42vh, 320px);
  overflow: auto;
  padding: 2px 4px 8px;
}
.pb-empty {
  margin: 0;
  padding: 12px;
  font-size: 12px;
  color: var(--muted);
  background: #0c1c26;
  border-radius: 10px;
  border: 1px dashed var(--line);
}
.pb-card {
  padding: 12px 14px 16px;
  border-radius: 12px;
  background: #0c1c26;
  border: 1px solid var(--line);
}
.pb-card.editing { border-color: var(--cyan); }
.pb-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.pb-card h3 {
  margin: 0;
  font-family: var(--fd);
  font-size: 13px;
  font-weight: 700;
}
.pb-card-actions { display: flex; gap: 4px; flex: none; }
.ghost-sm {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255,255,255,.05);
}
.ghost-sm.danger { color: var(--mag); }
.pb-chain {
  margin: 6px 0 2px;
  font-size: 12px;
  color: var(--cyan);
  line-height: 1.35;
}
.pb-meta {
  margin: 0 0 2px;
  font-size: 11px;
  color: var(--muted);
}
.pb-compose {
  padding: 12px;
  border-radius: 14px;
  background: linear-gradient(#122636, #0c1c26);
  border: 1px solid var(--line);
}
.pb-editor-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.pb-editor-hd h3 {
  margin: 0;
  font-family: var(--fd);
  font-size: 14px;
}
.pb-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}
.pb-field input {
  font-family: var(--fb);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  background: #071018;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}
.pb-field input:focus {
  outline: none;
  border-color: var(--cyan);
}
.pb-grid {
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.pb-pick {
  position: relative;
  min-width: 72px;
  flex: 1 1 auto;
}
.pb-pick .ord {
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: 10px;
  font-weight: 700;
  color: var(--amber);
}
.pb-preview {
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0,0,0,.25);
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
}
.pb-preview em {
  font-style: normal;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
}
.pb-preview b { font-family: var(--fd); font-size: 13px; }
.pb-preview span { color: var(--muted); }
.pb-save-row { margin-top: 4px; }
.pb-save-row .serve { width: 100%; }

/* Comms — chat session */
.comms-layout {
  min-height: 0;
  height: 100%;
}
.chat-sidebar #comms-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: auto;
  max-height: none;
  flex: 1;
}
.chat-list-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  text-align: left;
  width: 100%;
  padding: 10px;
  border-radius: 12px;
  background: transparent;
  border: 1px solid transparent;
}
.chat-list-item:hover { background: rgba(255,255,255,.04); }
.chat-list-item.on {
  background: rgba(62, 224, 197, .1);
  border-color: rgba(62, 224, 197, .35);
}
.chat-list-item.done { opacity: .55; }
.chat-list-item.unread .nm { color: var(--cyan); }
.chat-list-meta {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.chat-list-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
}
.chat-list-top .nm {
  font-family: var(--fd);
  font-size: 12px;
  font-weight: 700;
}
.chat-list-top .tm {
  font-size: 10px;
  color: var(--muted);
  flex: none;
}
.chat-list-meta .topic {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-list-meta .preview {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.comm-from {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--fd);
  font-size: 10px;
  font-weight: 800;
  background: hsl(var(--h, 200) 35% 22%);
  color: #e8fff8;
}

.chat-pane {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  background: linear-gradient(#0d1c26, #0a151c);
  border: 1px solid var(--line);
  overflow: hidden;
  padding: 0;
}
.chat-pane.empty {
  align-items: center;
  justify-content: center;
}
.chat-empty {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  padding: 24px;
}
.chat-empty span { font-size: 12px; opacity: .8; }

.chat-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(0,0,0,.22);
  flex: none;
}
.chat-top-meta { min-width: 0; flex: 1; }
.chat-top-name {
  font-family: var(--fd);
  font-size: 13px;
  font-weight: 700;
}
.chat-top-topic {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-live {
  flex: none;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ok);
  background: rgba(62, 207, 142, .15);
  padding: 3px 8px;
  border-radius: 99px;
}

.chat-thread {
  flex: 1;
  min-height: 160px;
  overflow: auto;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chat-sys {
  align-self: center;
  font-size: 10px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(255,255,255,.04);
  padding: 4px 10px;
  border-radius: 99px;
}
.chat-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  max-width: 92%;
}
.chat-row.them { align-self: flex-start; }
.chat-row.you { align-self: flex-end; flex-direction: row-reverse; }
.chat-av { width: 28px; height: 28px; font-size: 9px; }
.chat-bubble {
  padding: 8px 11px;
  border-radius: 14px;
  line-height: 1.4;
  font-size: 13px;
}
.chat-bubble.them {
  background: #152836;
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
}
.chat-bubble.you {
  background: rgba(62, 224, 197, .18);
  border: 1px solid rgba(62, 224, 197, .35);
  border-bottom-right-radius: 4px;
}
.chat-name {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 3px;
}
.chat-bubble.you .chat-name { color: var(--cyan); }
.chat-text { color: var(--ink); }

.chat-composer {
  flex: none;
  border-top: 1px solid var(--line);
  padding: 10px 12px 12px;
  background: rgba(0,0,0,.28);
}
.chat-composer.done {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}
.chat-composer-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.chat-suggestions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.chat-suggest {
  text-align: left;
  padding: 9px 12px;
  border-radius: 12px;
  background: #071018;
  border: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.4;
  cursor: pointer;
  pointer-events: auto;
  position: relative;
  z-index: 1;
}
.chat-suggest:hover, .chat-suggest:focus-visible {
  border-color: var(--cyan);
  background: rgba(62, 224, 197, .08);
}

/* handoff queue */
.ho-pane {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: auto;
  padding: 12px 14px 16px;
  background: #0a141c;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px #243848;
}
.ho-pane.empty {
  align-items: center;
  justify-content: center;
}
.ho-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}
.ho-top-meta { min-width: 0; flex: 1; }
.ho-top-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--cyan);
}
.ho-top-title {
  font-family: var(--fd);
  font-size: 16px;
  font-weight: 700;
  color: #e8f4f8;
  line-height: 1.25;
  margin-top: 2px;
}
.ho-live {
  flex: none;
  font-family: var(--fd);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 6px;
  background: #3a3014;
  color: var(--amber);
}
.ho-body {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.45;
  color: #d7e6ef;
}
.ho-check-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.ho-check-label span {
  letter-spacing: 0;
  text-transform: none;
  font-weight: 500;
  color: #5d7a80;
  margin-left: 6px;
}
.ho-checklist {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.ho-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #0e1a24;
  box-shadow: inset 0 0 0 1px #2a4454;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.35;
  color: #d7e6ef;
}
.ho-check.on {
  box-shadow: inset 0 0 0 1px #2a5348;
  background: rgba(62, 224, 197, .08);
}
.ho-check.locked { cursor: default; opacity: .75; }
.ho-check input {
  margin-top: 2px;
  flex: none;
  accent-color: var(--cyan);
}
.ho-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ho-actions.done {
  padding: 10px 12px;
  border-radius: 10px;
  background: #0e1a24;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.ho-act {
  flex: 1 1 140px;
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  font-family: var(--fd);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  padding: 0 12px;
}
.ho-act.accept {
  background: var(--ok);
  color: #062016;
  box-shadow: 0 3px 0 var(--ok-d);
}
.ho-act.accept:active { transform: translateY(1px); box-shadow: 0 1px 0 var(--ok-d); }
.ho-act.escalate {
  background: #3a2a48;
  color: #f0d4ff;
  box-shadow: inset 0 0 0 1px #6a4a78;
}
.ho-act.escalate:hover { background: #4a3458; }

.rem-cat-block {
  margin-bottom: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(0,0,0,.2);
  border: 1px solid var(--line);
}
.rem-cat-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 6px;
}
#pb-rem-actions .pb-hint { margin: 0 0 8px; }

/* floor / queue */
.floor {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 10px 6px;
  background: linear-gradient(#163042, #0c1c26);
}
.sign {
  position: relative;
  border-radius: 14px;
  background: #114d45;
  color: #e8fff8;
  padding: 8px 12px 9px;
  overflow: hidden;
  box-shadow: 0 4px 0 #0b332e;
}
.sign::before {
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.06) 0 16px, transparent 16px 32px);
}
.sign h2 {
  position: relative;
  margin: 0;
  font-family: var(--fd);
  font-size: 16px;
  font-weight: 700;
}
.sign p { position: relative; margin: 2px 0 0; font-size: 12px; opacity: .85; }
.sign .ren {
  position: relative;
  display: inline-block;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(0,0,0,.28);
  padding: 3px 8px;
  border-radius: 99px;
}
.lanterns { position: absolute; right: 12px; top: 8px; display: flex; gap: 8px; }
.lanterns i {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 8px var(--amber);
  animation: twinkle 1.5s steps(2) infinite;
}
.lanterns i:nth-child(2) { animation-delay: .4s; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.lanterns i:nth-child(3) { animation-delay: .8s; background: var(--mag); box-shadow: 0 0 8px var(--mag); }

.queue {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  min-height: 84px;
}
.evt {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px 2px 6px;
  border-radius: 12px;
  cursor: pointer;
}
.evt.on { background: rgba(62, 224, 197, .14); }
.evt.return { box-shadow: inset 0 0 0 1px rgba(255, 93, 143, .55); }
.evt.return .tag { color: var(--mag); }
.return-banner {
  margin: 0 0 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 93, 143, .12);
  border: 1px solid rgba(255, 93, 143, .35);
  font-size: 12px;
  color: var(--ink);
  line-height: 1.35;
}
.return-banner b { color: var(--mag); }
.evt.angry { animation: shake .35s; }
.evt .ring { position: relative; width: 54px; height: 54px; }
.evt .ring svg.pr { position: absolute; inset: 0; transform: rotate(-90deg); }
.evt .nm {
  font-size: 10px; font-weight: 700;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: #e8f4f8;
  text-align: center;
  padding: 0 2px;
}
.evt .src {
  font-family: var(--fd);
  font-size: 9px;
  color: #8fb0bc;
}
.evt .tag {
  position: absolute; top: -2px; right: 2px;
  font-size: 9px; font-weight: 800;
  background: var(--amber); color: #071018;
  padding: 1px 5px; border-radius: 6px;
}
.evt.sev-1 .tag { background: #3ee0c5; }
.evt.sev-2 .tag { background: #f5c542; }
.evt.sev-3 .tag { background: #ff5d8f; }
.empty {
  display: grid; place-items: center;
  color: rgba(232, 244, 248, .28);
  font-size: 11px;
  border: 1.5px dashed rgba(232, 244, 248, .16);
  border-radius: 12px;
  min-height: 92px;
}

.brief {
  background: #0c1a22;
  color: #d7e6ef;
  border-radius: 14px;
  padding: 8px 10px;
  min-height: 0;
  max-height: 320px;
  overflow: auto;
  position: relative;
  box-shadow: inset 0 0 0 1px #2a4454;
  font-size: 13px;
}
.brief .hd {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--fd);
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 4px;
}
.brief .eid { color: var(--cyan); font-weight: 700; }
.brief .lv {
  margin-left: auto;
  background: var(--amber);
  color: #071018;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 10px;
}
.brief h3 {
  margin: 0 0 2px;
  font-family: var(--fd);
  font-size: 15px;
  font-weight: 700;
}
.brief .rule {
  margin: 0 0 8px;
  font-family: var(--fd);
  font-size: 10px;
  color: var(--muted);
}
.brief .sealed {
  margin: 0;
  font-family: var(--fd);
  font-size: 11px;
  color: var(--amber);
  opacity: .85;
}
.siem-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 8px;
}
.siem {
  display: grid;
  grid-template-columns: 54px 58px 36px minmax(0, 1fr);
  gap: 2px 6px;
  font-family: var(--fd);
  font-size: 10.5px;
  line-height: 1.3;
  padding: 5px 6px;
  border-radius: 8px;
  background: #0a161c;
  box-shadow: inset 0 0 0 1px #1d3544;
  width: 100%;
  text-align: left;
  color: inherit;
}
.siem .tm { color: var(--muted); }
.siem .ss { color: var(--cyan); font-weight: 700; }
.siem .sv { text-transform: uppercase; font-weight: 700; font-size: 9px; }
.siem .sv.info { color: #7e97a6; }
.siem .sv.low { color: #8fd4c4; }
.siem .sv.med { color: var(--amber); }
.siem .sv.high { color: #f07a3a; }
.siem .sv.crit { color: var(--mag); }
.siem .rl { grid-column: 4; color: #e8f4f8; font-weight: 700; }
.siem .mg { grid-column: 1 / -1; color: #8fb0bc; word-break: break-word; }
.siem-pivot {
  grid-column: 1 / -1;
  margin: 2px 0 0;
}
.siem-pivot summary {
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: #7eb6ff;
  user-select: none;
}
.siem-pivot summary::-webkit-details-marker { display: none; }
.siem-pivot summary::before {
  content: "▸";
  font-size: 9px;
  color: #5a8ab0;
}
.siem-pivot[open] summary::before { content: "▾"; }
.siem-pivot summary:hover { color: #a8d0ff; }
.siem-pivot p {
  margin: 4px 0 0;
  padding: 5px 7px;
  border-radius: 6px;
  background: #101c2e;
  box-shadow: inset 0 0 0 1px #2a3f5e;
  font-size: 11.5px;
  line-height: 1.4;
  color: #d7e6ef;
}
.brief .desk {
  margin-top: 8px;
  padding: 8px 9px 7px;
  border-radius: 10px;
  background: #12262e;
  box-shadow: inset 0 0 0 1px #2a5348;
}
.brief .desk-h {
  font-family: var(--fd);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 6px;
}
.brief .desk p {
  margin: 0 0 6px;
  font-size: 12.5px;
  line-height: 1.4;
  color: #d7e6ef;
}
.brief .desk p:last-child { margin-bottom: 0; }
.brief .desk b {
  color: var(--amber);
  font-family: var(--fd);
  font-size: 11px;
  margin-right: 4px;
}
.brief .idle { text-align: center; color: var(--muted); padding: 28px 0 12px; }

/* ops / kitchen analog */
.ops {
  flex: 1 1 46%;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 10px 10px;
  background: linear-gradient(#15222c, #101820);
  overflow: auto;
}
.lbl {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.lbl .hint-inline {
  letter-spacing: 0;
  text-transform: none;
  font-weight: 500;
  color: #5d7a80;
  margin-left: 6px;
}
.row { display: flex; gap: 6px; align-items: stretch; }
.r1 { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); flex: none; }
.r2 {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  flex: 0 1 auto;
  min-height: 72px;
  max-height: 120px;
}
.ops-ticket {
  display: flex;
  gap: 8px;
  align-items: stretch;
  flex: 0 1 auto;
  min-height: 180px;
  max-height: min(360px, 52%);
}
.ops-ticket .work {
  flex: 1;
  min-width: 0;
  overflow: auto;
  justify-content: flex-start;
  align-items: stretch;
}
.ops-ticket .work:has(.ph) {
  justify-content: center;
  align-items: center;
  overflow: hidden;
}
.case-actions {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 96px;
}
.case-actions .st {
  flex: 1 1 0;
  min-height: 0;
  padding: 6px 4px;
}
.case-actions .st .t { font-size: 10px; }
.case-actions .st .ico { font-size: 14px; }
.case-actions .trash,
.case-actions .serve {
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  font-size: 11px;
  padding: 0 6px;
  border-radius: 10px;
  box-shadow: none;
}
.case-actions .serve {
  background: var(--ok);
  color: #062016;
  font-family: var(--fd);
  font-weight: 700;
  box-shadow: 0 2px 0 var(--ok-d);
}
.case-actions .serve:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 var(--ok-d);
}
.case-actions .serve.need {
  box-shadow: 0 2px 0 var(--ok-d), 0 0 0 2px rgba(245, 197, 66, .55);
}
.ops-close {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
}
.lbl-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex: none;
}
.lbl-row .lbl { margin: 0; }
.ops-tools {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border-radius: 10px;
  background: #0a161c;
  box-shadow: inset 0 0 0 1px #243848;
}
.ops-tool {
  border: 0;
  border-radius: 8px;
  padding: 6px 12px;
  background: transparent;
  color: var(--muted);
  font-family: var(--fd);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
}
.ops-tool:hover { color: #d7e6ef; }
.ops-tool.on {
  background: #1a2c38;
  color: var(--cyan);
  box-shadow: inset 0 0 0 1px #2a5348;
}
.ops-tool-panes {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.ops-pane {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.ops-pane .edr-panel,
.ops-pane .osint-panel,
.ops-pane .pb-picker {
  flex: 1 1 auto;
  min-height: 140px;
}
.ops-close .pb-picker {
  flex: 1 1 auto;
  min-height: 120px;
}
.r3 {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: stretch;
  flex: none;
}
.r3 .st { flex: 0 0 auto; min-width: 88px; width: auto; padding: 8px 10px; }
.r3 .serve {
  flex: 0 0 auto;
  width: auto;
  min-width: 128px;
  max-width: 168px;
  padding: 0 16px;
  font-size: 13px;
  min-height: 40px;
}
.r3 .trash {
  flex: 0 0 auto;
  min-width: 72px;
  min-height: 40px;
  padding: 0 12px;
}
.trays { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); flex: none; }
.elems { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); flex: none; }

.st {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 12px;
  padding: 8px 4px;
  background: #1a2c38;
  box-shadow: inset 0 0 0 1px #2a4454;
  transition: transform .08s, box-shadow .12s, background .12s;
  min-height: 44px;
}
.st:active { transform: scale(.96); }
.st .t { font-size: 11px; font-weight: 700; text-align: center; line-height: 1.15; }
.st .sub {
  font-family: var(--fd);
  font-size: 8px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .02em;
}
.st .ico { font-family: var(--fd); font-size: 18px; color: var(--cyan); }
.st.need { box-shadow: inset 0 0 0 2px var(--amber), 0 0 0 3px rgba(245, 197, 66, .25); animation: pulse 1.1s ease-in-out infinite; }
.st.on { box-shadow: inset 0 0 0 2px var(--ok); background: #16362e; }
.st.wrong { animation: shake .3s; }
.st .ord {
  position: absolute;
  top: 3px; right: 4px;
  min-width: 14px; height: 14px;
  padding: 0 3px;
  border-radius: 99px;
  background: var(--amber);
  color: #071018;
  font-family: var(--fd);
  font-size: 9px;
  font-weight: 800;
  display: grid;
  place-items: center;
  line-height: 1;
}

.work {
  border-radius: 14px;
  background: radial-gradient(ellipse at 50% 80%, #1c333f, #121c24);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  min-width: 0;
  box-shadow: inset 0 0 0 2px #2a4454;
  position: relative;
  overflow: hidden;
}
.work.flash { box-shadow: inset 0 0 0 2px var(--mag); }
.work .ph { margin: 0; text-align: center; color: var(--muted); font-weight: 600; }

.edr-panel {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: auto;
  border-radius: 12px;
  padding: 10px 12px 12px;
  background: #0a141c;
  box-shadow: inset 0 0 0 1px #243848;
}
.edr-panel.idle { display: flex; align-items: center; justify-content: center; }
.edr-empty {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.edr-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.edr-kicker {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #7eb6ff;
}
.edr-host {
  font-family: var(--fd);
  font-size: 14px;
  font-weight: 700;
  color: #e8f4f8;
  line-height: 1.2;
}
.edr-meta {
  font-size: 11px;
  color: var(--muted);
  margin-top: 1px;
}
.edr-badge {
  flex: none;
  font-family: var(--fd);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 6px;
}
.edr-badge.on { background: #16362e; color: #8fd4c4; }
.edr-badge.iso { background: #4a1830; color: #ff8fb0; }
.edr-badge.off { background: #1a2430; color: #7e97a6; }
.edr-note {
  margin: 0 0 6px;
  font-size: 12px;
  line-height: 1.4;
  color: #8fb0bc;
}
.edr-timeline {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 6px;
}
.edr-row {
  display: grid;
  grid-template-columns: 48px 36px minmax(0, 1fr);
  gap: 1px 6px;
  padding: 4px 6px;
  border-radius: 7px;
  background: #0e1a24;
  font-family: var(--fd);
  font-size: 10.5px;
  line-height: 1.3;
}
.edr-row .tm { color: var(--muted); }
.edr-row .sv { text-transform: uppercase; font-weight: 700; font-size: 9px; }
.edr-row .sv.info { color: #7e97a6; }
.edr-row .sv.low { color: #8fd4c4; }
.edr-row .sv.med { color: var(--amber); }
.edr-row .sv.high { color: #f07a3a; }
.edr-row .sv.crit { color: var(--mag); }
.edr-row .ttl { grid-column: 3; color: #e8f4f8; font-weight: 700; }
.edr-row .det { grid-column: 1 / -1; color: #8fb0bc; word-break: break-word; }
.edr-proc {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  margin: 0 0 6px;
  padding: 5px 7px;
  border-radius: 7px;
  background: #101c2e;
  box-shadow: inset 0 0 0 1px #2a3f5e;
  font-size: 11px;
}
.edr-proc em {
  font-style: normal;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #7eb6ff;
  width: 100%;
}
.edr-proc b { color: #e8f4f8; font-family: var(--fd); }
.edr-proc span { color: var(--muted); font-family: var(--fd); font-size: 10px; }
.edr-proc code {
  width: 100%;
  font-family: var(--fd);
  font-size: 10px;
  color: #8fb0bc;
  word-break: break-all;
}
.edr-ioc {
  margin: 0 0 6px;
  padding: 5px 7px 6px;
  border-radius: 7px;
  background: #0e1a24;
  box-shadow: inset 0 0 0 1px #243848;
}
.edr-ioc > em {
  display: block;
  font-style: normal;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #7eb6ff;
  margin-bottom: 5px;
}
.edr-ioc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.edr-chip {
  border: 0;
  border-radius: 6px;
  padding: 4px 7px;
  background: #1a2c38;
  box-shadow: inset 0 0 0 1px #2a4454;
  color: #d7e6ef;
  font-family: var(--fd);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}
.edr-chip .k {
  color: #7eb6ff;
  text-transform: uppercase;
  font-size: 8px;
  letter-spacing: .04em;
  margin-right: 2px;
}
.edr-chip:hover:not(:disabled) {
  box-shadow: inset 0 0 0 1px var(--cyan);
  background: #213848;
}
.edr-chip.on,
.edr-chip:disabled {
  opacity: .7;
  cursor: default;
  box-shadow: inset 0 0 0 1px #2a5348;
}
.edr-ioc-hit {
  margin: 5px 0 0;
  font-size: 11.5px;
  line-height: 1.35;
  color: #d7e6ef;
}
.edr-ioc-hit b {
  color: #7eb6ff;
  font-family: var(--fd);
  font-size: 10px;
  font-weight: 700;
}
.edr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.edr-act {
  flex: 1 1 30%;
  min-width: 88px;
  border: 0;
  border-radius: 8px;
  padding: 7px 8px;
  background: #1a2c38;
  box-shadow: inset 0 0 0 1px #2a4454;
  color: #e8f4f8;
  font-family: var(--fd);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.edr-act:hover:not(:disabled) {
  background: #213848;
  box-shadow: inset 0 0 0 1px var(--cyan);
}
.edr-act:disabled {
  opacity: .55;
  cursor: default;
}

.osint-panel {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: auto;
  border-radius: 12px;
  padding: 10px 12px 12px;
  background: #0a141c;
  box-shadow: inset 0 0 0 1px #243848;
}
.osint-panel.idle { display: flex; align-items: center; justify-content: center; }
.osint-empty {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.osint-head { margin-bottom: 8px; }
.osint-kicker {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #9ec4ff;
}
.osint-title {
  font-family: var(--fd);
  font-size: 14px;
  font-weight: 700;
  color: #e8f4f8;
  line-height: 1.2;
}
.osint-meta {
  font-size: 11px;
  color: var(--muted);
  margin-top: 1px;
}
.osint-note {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: #8fb0bc;
}
.osint-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.osint-chip {
  border: 0;
  border-radius: 8px;
  padding: 7px 10px;
  background: #1a2c38;
  box-shadow: inset 0 0 0 1px #2a4454;
  color: #d7e6ef;
  font-family: var(--fd);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  max-width: 100%;
}
.osint-chip .k {
  display: block;
  color: #9ec4ff;
  text-transform: uppercase;
  font-size: 8px;
  letter-spacing: .06em;
  margin-bottom: 2px;
}
.osint-chip .v {
  display: block;
  word-break: break-all;
  line-height: 1.3;
}
.osint-chip:hover:not(:disabled) {
  box-shadow: inset 0 0 0 1px #6ec0f0;
  background: #213848;
}
.osint-chip.on,
.osint-chip:disabled {
  opacity: .72;
  cursor: default;
  box-shadow: inset 0 0 0 1px #2a5348;
}
.osint-idle {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.osint-hits {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.osint-hit {
  padding: 10px 12px;
  border-radius: 10px;
  background: #0e1a24;
  box-shadow: inset 0 0 0 1px #2a4454;
}
.osint-hit header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.osint-hit .badge {
  font-family: var(--fd);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 5px;
  background: #1a2430;
  color: #8fb0bc;
}
.osint-hit.verdict-malicious .badge { background: #4a1830; color: #ff8fb0; }
.osint-hit.verdict-suspicious .badge { background: #3a3014; color: var(--amber); }
.osint-hit.verdict-benign .badge { background: #16362e; color: #8fd4c4; }
.osint-hit .src {
  font-size: 10px;
  color: var(--muted);
  font-weight: 600;
}
.osint-hit .what {
  font-size: 12px;
  color: #e8f4f8;
  margin-bottom: 4px;
  word-break: break-all;
}
.osint-hit .what b {
  color: #9ec4ff;
  text-transform: uppercase;
  font-size: 10px;
  margin-right: 4px;
}
.osint-hit .res {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: #c5d8e2;
}
.osint-hit .lean {
  margin: 6px 0 0;
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--cyan);
  font-weight: 600;
}

.case { width: 100%; text-align: left; }
.case .id {
  font-family: var(--fd);
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 8px;
  text-align: center;
}
.case .fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 10px;
}
.case .fields .wide { grid-column: 1 / -1; }
.case .fields div {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.case .fields em {
  font-style: normal;
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.case .fields b {
  font-family: var(--fd);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.case .fields b.ok { color: var(--ok); }
.case .fields b.warn { color: var(--amber); }
.case .meta { margin: 8px 0 0; font-size: 12px; font-weight: 700; color: var(--muted); text-align: center; }
.case .strikes {
  margin: 4px 0 0;
  text-align: center;
  font-family: var(--fd);
  font-size: 10px;
  color: var(--muted);
}
.chip {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 99px;
  background: #1a3a34;
  color: var(--cyan);
  font-size: 10.5px;
  font-weight: 700;
  margin-right: 4px;
}
.chip.ok { background: #1a3d2c; color: var(--ok); }
.chip.bad { background: #3a1a1e; color: var(--mag); }
.chip.warn { background: #3a3014; color: var(--amber); }

.serve {
  border-radius: 12px;
  background: var(--ok);
  color: #062016;
  font-family: var(--fd);
  font-size: 17px;
  font-weight: 700;
  min-height: 46px;
  box-shadow: 0 4px 0 var(--ok-d);
}
.serve:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--ok-d); }
.serve.need {
  box-shadow: 0 4px 0 var(--ok-d), 0 0 0 3px rgba(245, 197, 66, .55);
  animation: pulse 1.1s ease-in-out infinite;
}
.trash {
  border-radius: 12px;
  background: #3a4750;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  min-height: 46px;
}

.hint {
  flex: none;
  position: static;
  transform: none;
  left: auto;
  top: auto;
  z-index: 15;
  max-width: none;
  margin: 6px 12px 0;
  background: #2b6ea8;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 9px;
  box-shadow: 0 2px 0 rgba(0,0,0,.2);
  pointer-events: none;
  text-align: center;
}

.fly {
  position: absolute;
  z-index: 30;
  pointer-events: none;
  font-family: var(--fd);
  font-size: 16px;
  color: #062016;
  background: var(--ok);
  padding: 2px 10px;
  border-radius: 99px;
  animation: fly 1.15s ease-out forwards;
  white-space: nowrap;
}
.fly.b { background: var(--bad); color: #fff; }

#modal {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(4, 10, 14, .72);
  display: flex; align-items: center; justify-content: center;
  padding: 18px;
}
#modal.interrupt-open {
  background: rgba(18, 4, 10, .78);
}
#card {
  width: 100%;
  max-width: 400px;
  max-height: 100%;
  overflow: auto;
  background: #122028;
  border: 1px solid #2a4454;
  border-radius: 18px;
  padding: 20px 18px 16px;
  text-align: center;
  animation: pop .2s ease-out;
}
#card.interrupt-card {
  max-width: 440px;
  text-align: left;
  border-color: #6a3a28;
  box-shadow: 0 0 0 1px rgba(240, 122, 58, .25), 0 18px 40px rgba(0,0,0,.45);
  animation: int-pop .22s ease-out;
}
#card.interrupt-card.critical {
  border-color: #7a2848;
  box-shadow: 0 0 0 1px rgba(255, 93, 143, .35), 0 18px 40px rgba(0,0,0,.5);
}
#card.interrupt-card.exception {
  border-color: #2a4a6a;
  box-shadow: 0 0 0 1px rgba(62, 160, 224, .28), 0 18px 40px rgba(0,0,0,.45);
}
#card.interrupt-card.exception .int-banner span:first-child { color: #6ec0f0; }
#card.interrupt-card.exception.critical .int-banner span:first-child { color: var(--mag); }
.int-banner {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-family: var(--fd);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.int-banner span:first-child { color: #f07a3a; }
#card.critical .int-banner span:first-child { color: var(--mag); }
.int-banner span:last-child { color: var(--muted); }
.int-from {
  margin: 0 0 2px;
  font-size: 12px;
  font-weight: 700;
  color: var(--cyan);
}
#card.interrupt-card h2 {
  text-align: left;
  margin: 0 0 8px;
  font-size: 20px;
}
#card.interrupt-card > p {
  margin: 0 0 8px;
  color: #d7e6ef;
  line-height: 1.45;
}
.int-hint {
  font-size: 11px !important;
  color: var(--muted) !important;
  font-weight: 600;
}
.int-choices button {
  text-align: left;
  line-height: 1.35;
  font-size: 13px;
}
@keyframes int-pop {
  from { transform: translateY(10px) scale(.97); opacity: 0; }
  to { transform: none; opacity: 1; }
}
#card h2 { font-family: var(--fd); font-size: 22px; margin: 4px 0 8px; }
#card p.brief-lead {
  color: var(--cyan);
  font-family: var(--fd);
  font-size: 13px;
  font-weight: 600;
}
#card .btns { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
#card .btns button {
  padding: 12px;
  border-radius: 12px;
  font-weight: 700;
  background: #1a2c38;
}
#card .btns button.pri {
  background: var(--cyan);
  color: #062018;
  font-family: var(--fd);
  font-size: 16px;
}
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 12px 0; }
@media (min-width: 400px) {
  .kpis { grid-template-columns: repeat(4, 1fr); }
}
.kpis div { background: #0e1a22; border-radius: 12px; padding: 8px 4px; }
.kpis b { display: block; font-family: var(--fd); font-size: 22px; }
.kpis small { font-size: 11px; color: var(--muted); }
.how { text-align: left; display: flex; flex-direction: column; gap: 10px; margin: 10px 0; width: 100%; }
.how > div { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; align-items: start; width: 100%; }
.how i {
  font-style: normal; width: 30px; height: 30px; border-radius: 50%;
  background: var(--cyan); color: #062018;
  font-family: var(--fd); display: grid; place-items: center; font-weight: 700;
}
.how b { display: block; }
.how span { display: block; font-size: 13px; color: var(--muted); }

#toast {
  position: fixed;
  left: 50%;
  top: 10px;
  transform: translateX(-50%);
  z-index: 60;
  background: #1a0e12;
  color: #fff;
  padding: 9px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  max-width: min(420px, calc(100% - 24px));
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
#toast.on { opacity: 1; }
#toast.good { background: #123228; }
#toast.bad { background: #3a1518; }

@keyframes bob { 50% { transform: translateY(-5px); } }
@keyframes twinkle { 50% { opacity: .35; } }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@keyframes pulse { 50% { filter: brightness(1.18); } }
@keyframes pop { from { transform: scale(.92); opacity: 0; } }
@keyframes fly {
  0% { opacity: 0; transform: translate(-50%, 8px); }
  15% { opacity: 1; transform: translate(-50%, 0); }
  100% { opacity: 0; transform: translate(-50%, -40px); }
}
@media (max-height: 700px) {
  .sign p { display: none; }
  .brief { max-height: 188px; }
  .st { min-height: 50px; padding: 5px 3px; }
  .st .sub { display: none; }
}

@media (min-width: 760px) {
  #app {
    max-width: none;
    width: 100%;
  }
  #splash {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 36px;
    text-align: left;
    padding: 40px;
  }
  #splash .splash-copy { max-width: 420px; }
  #splash .big, #splash .ghost { margin-left: 0; display: inline-block; }
  #splash .ghost { margin-left: 14px; }
  #splash .scale { justify-content: flex-start; }
  #shift { min-height: 0; position: relative; }
  #stage {
    flex-direction: row;
    align-items: stretch;
  }
  .floor {
    flex: 0 0 clamp(300px, 30%, 400px);
    max-width: none;
    min-height: 0;
  }
  .ops {
    flex: 1;
    min-height: 0;
    min-width: 0;
    padding: 10px 14px 12px;
  }
  .ops-ticket {
    min-height: 220px;
    max-height: min(400px, 52%);
  }
  .ops-close {
    flex: 1 1 auto;
    min-height: 220px;
  }
  .brief { flex: 1; max-height: none; min-height: 0; }
  .pb-layout {
    flex-direction: row;
    align-items: stretch;
    height: 100%;
    padding: 12px 16px 18px;
    gap: 14px;
  }
  .pb-lib {
    flex: 0 0 clamp(280px, 34%, 440px);
    max-width: none;
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  #pb-list { max-height: none; flex: 1; }
  .pb-compose { flex: 1; overflow: auto; }
  .ops-close .pb-picker {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 6px 8px 10px;
    min-height: 140px;
    max-height: none;
    align-content: start;
  }
  .ops:has(.work .ph) .ops-close {
    min-height: 280px;
  }
  .pb-apply {
    padding: 16px 18px 20px;
    min-height: 80px;
  }
  .pb-apply .nm { font-size: 16px; }
  .pb-apply .meta { font-size: 13px; }
  .pb-card {
    padding: 14px 16px 18px;
  }
  .pb-card h3 { font-size: 16px; }
}

@media (min-width: 1200px) {
  .floor {
    flex: 0 0 clamp(340px, 28%, 440px);
  }
  .ops-close .pb-picker {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .ops { padding: 12px 18px 14px; }
  .pb-lib {
    flex: 0 0 clamp(320px, 32%, 480px);
  }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
