/* Security Brief Wall — จอ videowall โดยเฉพาะ: auto-rotate ไม่ต้องเลื่อน
   ค่าฐาน = ขนาดบน FHD 1920×1080 (--display-scale = 1.0) */

:root {
  color-scheme: dark;
  --bg: #07090c;
  --panel: rgba(10, 16, 21, 0.9);
  --cyan: #2de1c2;
  --cyan-soft: rgba(45, 225, 194, 0.16);
  --red: #ff3b30;
  --amber: #ffb544;
  --text: #f3f8f7;
  --muted: #8da19e;
  --edge: clamp(24px, 3vw, 58px);
  --s: var(--display-scale, 1);
}

* { box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
}

body {
  color: var(--text);
  font-family: "Noto Sans Thai", "Leelawadee UI", Tahoma, system-ui, sans-serif;
}

.bw-app {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: calc(132px * var(--s)) minmax(0, 1fr) calc(5px * var(--s)) calc(58px * var(--s));
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
  background:
    radial-gradient(circle at 22% 32%, rgba(45, 225, 194, 0.08), transparent 36%),
    radial-gradient(circle at 82% 74%, rgba(255, 59, 48, 0.05), transparent 32%),
    linear-gradient(145deg, #080c10 0%, var(--bg) 62%);
}

.bw-app::before {
  position: absolute;
  z-index: 0;
  inset: 0;
  content: "";
  opacity: 0.4;
  background-image:
    linear-gradient(rgba(45, 225, 194, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 225, 194, 0.025) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at 46% 45%, #000 10%, transparent 86%);
  pointer-events: none;
}

.bw-ambient {
  position: absolute;
  z-index: 0;
  inset: -35%;
  overflow: hidden;
  pointer-events: none;
}

.bw-ambient span {
  position: absolute;
  width: 58vw;
  height: 58vw;
  border: 1px solid rgba(45, 225, 194, 0.04);
  border-radius: 46%;
  background: radial-gradient(circle, rgba(45, 225, 194, 0.026), transparent 64%);
  will-change: transform;
}

.bw-ambient span:nth-child(1) { top: 4%; left: 6%; animation: bw-amb-1 60s linear infinite alternate; }
.bw-ambient span:nth-child(2) { top: 38%; right: 2%; animation: bw-amb-2 74s linear infinite alternate; }
.bw-ambient span:nth-child(3) { bottom: 2%; left: 30%; animation: bw-amb-3 66s linear infinite alternate; }

@keyframes bw-amb-1 { to { transform: translate3d(30vw, 13vh, 0) rotate(90deg) scale(1.14); } }
@keyframes bw-amb-2 { to { transform: translate3d(-26vw, -17vh, 0) rotate(-115deg) scale(0.86); } }
@keyframes bw-amb-3 { to { transform: translate3d(16vw, -33vh, 0) rotate(150deg) scale(1.22); } }

/* ---------- header ---------- */

.bw-header {
  position: relative;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 var(--edge);
  border-bottom: 1px solid rgba(45, 225, 194, 0.12);
  background: rgba(5, 9, 12, 0.76);
  backdrop-filter: blur(14px);
}

.bw-brand {
  display: flex;
  align-items: center;
  gap: 15px;
  color: inherit;
  text-decoration: none;
}

.bw-brand__mark {
  display: grid;
  place-items: center;
  width: var(--header-brand-mark, 52px);
  height: var(--header-brand-mark, 52px);
  overflow: visible;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.bw-brand__mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.bw-brand__name {
  font-size: var(--header-brand-name, 28px);
  font-weight: 720;
  line-height: 1.1;
  letter-spacing: 0.06em;
}

.bw-brand__tagline {
  margin-top: 4px;
  font-size: var(--header-brand-sub, 14px);
  line-height: 1.4;
  overflow-wrap: break-word;
}

.bw-scene-tabs {
  display: flex;
  flex: 1;
  gap: calc(10px * var(--s));
  justify-content: center;
  min-width: 0;
}

.bw-scene-tab {
  padding: calc(7px * var(--s)) calc(16px * var(--s));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: var(--muted);
  font-size: calc(14px * var(--s));
  font-weight: 650;
  letter-spacing: 0.1em;
  white-space: nowrap;
  transition: color 300ms ease, border-color 300ms ease, background 300ms ease;
}

.bw-scene-tab--active {
  border-color: rgba(45, 225, 194, 0.6);
  color: var(--cyan);
  background: var(--cyan-soft);
  box-shadow: 0 0 24px rgba(45, 225, 194, 0.14);
}

.bw-set-badge {
  flex: 0 0 auto;
  padding: calc(7px * var(--s)) calc(14px * var(--s));
  border: 1px solid rgba(255, 181, 68, 0.45);
  border-radius: 999px;
  color: #ffd18b;
  background: rgba(47, 31, 8, 0.55);
  font-size: calc(13px * var(--s));
  font-weight: 720;
  letter-spacing: 0.14em;
  white-space: nowrap;
}

.bw-clock {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.bw-clock time {
  font: 650 calc(34px * var(--s))/1 ui-monospace, "Cascadia Mono", monospace;
  letter-spacing: 0.06em;
}

.bw-clock span {
  margin-top: 4px;
  color: var(--muted);
  font-size: calc(14px * var(--s));
}

/* ---------- stage + scene transitions ---------- */

.bw-stage {
  position: relative;
  z-index: 4;
  min-height: 0;
  padding: calc(30px * var(--s)) var(--edge) calc(20px * var(--s));
  overflow: hidden;
}

.bw-scene {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  animation: bw-scene-in 900ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.bw-scene--leaving {
  animation: bw-scene-out 420ms ease both;
}

@keyframes bw-scene-in {
  from { opacity: 0; transform: translate3d(0, 34px, 0) scale(0.992); filter: blur(6px); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); filter: blur(0); }
}

@keyframes bw-scene-out {
  from { opacity: 1; transform: translate3d(0, 0, 0); }
  to { opacity: 0; transform: translate3d(0, -26px, 0); filter: blur(4px); }
}

.bw-scene__head {
  display: flex;
  align-items: baseline;
  gap: calc(18px * var(--s));
  margin-bottom: calc(24px * var(--s));
}

.bw-kicker {
  color: var(--cyan);
  font-size: calc(15px * var(--s));
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.bw-scene__title {
  margin: 0;
  font-size: calc(54px * var(--s));
  font-weight: 760;
  letter-spacing: -0.01em;
  line-height: 1.05;
}

.bw-scene__hint {
  margin-left: auto;
  color: var(--muted);
  font-size: calc(17px * var(--s));
}

/* ---------- scene 1: overview ---------- */

.bw-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: calc(20px * var(--s));
  margin-bottom: calc(26px * var(--s));
}

.bw-kpi {
  position: relative;
  overflow: hidden;
  padding: calc(24px * var(--s)) calc(26px * var(--s));
  border: 1px solid rgba(45, 225, 194, 0.16);
  border-radius: calc(18px * var(--s));
  background: var(--panel);
}

.bw-kpi::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(120deg, transparent 30%, rgba(45, 225, 194, 0.07) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: bw-sheen 5.5s ease-in-out infinite;
}

.bw-kpi--risk { border-color: rgba(255, 59, 48, 0.32); }
.bw-kpi--risk strong { color: var(--red); text-shadow: 0 0 28px rgba(255, 59, 48, 0.3); }

@keyframes bw-sheen {
  0%, 55% { transform: translateX(-100%); }
  85%, 100% { transform: translateX(100%); }
}

.bw-kpi strong {
  display: block;
  color: var(--cyan);
  font: 740 calc(84px * var(--s))/1 ui-monospace, "Cascadia Mono", monospace;
  letter-spacing: -0.04em;
  text-shadow: 0 0 30px rgba(45, 225, 194, 0.25);
}

.bw-kpi span {
  display: block;
  margin-top: calc(10px * var(--s));
  color: var(--muted);
  font-size: calc(20px * var(--s));
}

.bw-activity {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  padding: calc(22px * var(--s)) calc(26px * var(--s));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: calc(18px * var(--s));
  background: var(--panel);
}

.bw-activity__label {
  margin-bottom: calc(14px * var(--s));
  color: var(--muted);
  font-size: calc(15px * var(--s));
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.bw-activity__bars {
  display: flex;
  flex: 1;
  align-items: flex-end;
  gap: calc(18px * var(--s));
  min-height: 0;
}

.bw-bar {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  height: 100%;
  min-width: 0;
}

.bw-bar__track {
  display: flex;
  flex: 1;
  align-items: flex-end;
  width: 100%;
  min-height: 0;
}

.bw-bar__fill {
  position: relative;
  width: 100%;
  border-radius: calc(8px * var(--s)) calc(8px * var(--s)) 0 0;
  background: linear-gradient(180deg, rgba(45, 225, 194, 0.9), rgba(45, 225, 194, 0.25));
  box-shadow: 0 0 24px rgba(45, 225, 194, 0.18);
  transform-origin: bottom;
  animation: bw-bar-grow 900ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes bw-bar-grow {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}

.bw-bar__kev {
  position: absolute;
  top: calc(-14px * var(--s));
  left: 50%;
  width: calc(13px * var(--s));
  height: calc(13px * var(--s));
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 16px rgba(255, 59, 48, 0.7);
  transform: translateX(-50%);
}

.bw-bar__count {
  margin-top: calc(8px * var(--s));
  color: var(--text);
  font: 650 calc(20px * var(--s))/1 ui-monospace, monospace;
}

.bw-bar__date {
  margin-top: calc(4px * var(--s));
  color: var(--muted);
  font-size: calc(13px * var(--s));
}

.bw-bar--pulse .bw-bar__fill {
  box-shadow: 0 0 36px rgba(45, 225, 194, 0.55);
  filter: brightness(1.25);
}

.bw-bar--pulse .bw-bar__count {
  color: var(--cyan);
}

/* ---------- scene 2: top threats ---------- */

.bw-threat {
  position: relative;
  display: flex;
  flex: 1;
  gap: calc(38px * var(--s));
  align-items: center;
  min-height: 0;
  overflow: hidden;
  padding: calc(18px * var(--s)) calc(22px * var(--s));
  border-radius: calc(18px * var(--s));
  isolation: isolate;
}

.bw-threat__bg {
  position: absolute;
  z-index: 0;
  inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 380ms ease, transform 800ms ease;
  pointer-events: none;
}

.bw-threat.has-bg .bw-threat__bg.bw-threat__bg--in {
  opacity: 0.62;
  transform: scale(1);
}

.bw-threat.has-bg::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  content: "";
  background:
    linear-gradient(105deg, rgba(7, 9, 12, 0.88) 12%, rgba(7, 9, 12, 0.55) 42%, rgba(7, 9, 12, 0.28) 100%),
    linear-gradient(180deg, rgba(7, 9, 12, 0.22) 0%, rgba(7, 9, 12, 0.62) 100%);
  pointer-events: none;
}

.bw-threat__rank,
.bw-threat__body {
  position: relative;
  z-index: 2;
}

.bw-threat__rank {
  flex: 0 0 auto;
  color: transparent;
  font: 800 calc(220px * var(--s))/0.9 ui-monospace, monospace;
  -webkit-text-stroke: 2px rgba(45, 225, 194, 0.55);
  text-shadow: 0 0 60px rgba(45, 225, 194, 0.15);
}

.bw-threat__body {
  min-width: 0;
}

.bw-threat__title {
  margin: 0 0 calc(18px * var(--s));
  font-size: calc(52px * var(--s));
  font-weight: 740;
  line-height: 1.22;
  overflow-wrap: break-word;
}

.bw-threat__summary {
  max-width: 72ch;
  margin: 0 0 calc(22px * var(--s));
  color: #b9cbc8;
  font-size: calc(24px * var(--s));
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bw-chips {
  display: flex;
  flex-wrap: wrap;
  gap: calc(10px * var(--s));
}

.bw-chip {
  padding: calc(7px * var(--s)) calc(15px * var(--s));
  border: 1px solid rgba(45, 225, 194, 0.34);
  border-radius: 999px;
  color: var(--cyan);
  font-size: calc(15px * var(--s));
  font-weight: 650;
}

.bw-chip--red {
  border-color: rgba(255, 59, 48, 0.44);
  color: #ff9b95;
}

.bw-chip--dim {
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--muted);
}

.bw-threat-dots {
  display: flex;
  gap: calc(9px * var(--s));
  margin-top: calc(22px * var(--s));
}

.bw-threat-dots i {
  width: calc(34px * var(--s));
  height: calc(5px * var(--s));
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  transition: background 300ms ease;
}

.bw-threat-dots i.on { background: var(--cyan); box-shadow: 0 0 14px rgba(45, 225, 194, 0.5); }

/* ---------- NEWS / KEV / actor spotlight ---------- */

.bw-news__mark {
  font-size: calc(72px * var(--s)) !important;
  letter-spacing: 0.04em;
  -webkit-text-stroke: 1.5px rgba(255, 181, 68, 0.65);
  text-shadow: 0 0 40px rgba(255, 181, 68, 0.2);
}

.bw-news-progress {
  width: min(42ch, 100%);
  height: calc(4px * var(--s));
  margin-top: calc(18px * var(--s));
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.bw-news-progress__fill {
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 181, 68, 0.55), var(--amber));
}

.bw-news-progress__fill.run {
  animation: bw-progress linear both;
}

.bw-actor-spot__count {
  color: var(--cyan);
  -webkit-text-stroke: 0;
  text-shadow: 0 0 48px rgba(45, 225, 194, 0.35);
}

.bw-vendor-spot__rank {
  color: var(--amber);
  -webkit-text-stroke: 0;
  text-shadow: 0 0 48px rgba(255, 181, 68, 0.3);
}

.bw-kev .bw-threat__rank {
  -webkit-text-stroke: 2px rgba(255, 59, 48, 0.55);
  text-shadow: 0 0 48px rgba(255, 59, 48, 0.2);
}

/* ---------- scene 3: patch now ---------- */

.bw-patch-grid {
  display: grid;
  flex: 1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(min-content, 1fr);
  gap: calc(18px * var(--s));
  min-height: 0;
  align-content: stretch;
}

.bw-patch {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: calc(8px * var(--s));
  min-width: 0;
  min-height: 0;
  padding: calc(20px * var(--s)) calc(26px * var(--s));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: calc(5px * var(--s)) solid var(--amber);
  border-radius: calc(14px * var(--s));
  background: var(--panel);
  overflow: hidden;
}

.bw-patch--kev {
  border-left-color: var(--red);
}

.bw-patch--kev::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  content: "";
  pointer-events: none;
  animation: bw-kev-glow 2.8s ease-in-out infinite;
}

.bw-patch--focus {
  border-color: rgba(45, 225, 194, 0.55);
  box-shadow: 0 0 28px rgba(45, 225, 194, 0.18);
  transform: scale(1.015);
  transition: border-color 350ms ease, box-shadow 350ms ease, transform 350ms ease;
  z-index: 1;
}

@keyframes bw-kev-glow {
  0%, 100% { box-shadow: inset 0 0 0 rgba(255, 59, 48, 0); }
  50% { box-shadow: inset 0 0 28px rgba(255, 59, 48, 0.14), 0 0 18px rgba(255, 59, 48, 0.22); }
}

.bw-patch__id {
  flex-shrink: 0;
  color: var(--cyan);
  font: 700 calc(24px * var(--s))/1.25 ui-monospace, monospace;
  overflow-wrap: anywhere;
}

.bw-patch__product {
  flex: 1 1 auto;
  margin-top: 0;
  font-size: calc(19px * var(--s));
  line-height: 1.45;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  /* Reserve room so clamped lines are not cropped mid-glyph */
  min-height: calc(19px * var(--s) * 1.45 * 2);
}

.bw-patch__meters {
  display: flex;
  flex-shrink: 0;
  gap: calc(22px * var(--s));
  margin-top: auto;
  padding-top: calc(10px * var(--s));
}

.bw-meter {
  flex: 1;
  min-width: 0;
}

.bw-meter__label {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: calc(13px * var(--s));
  letter-spacing: 0.1em;
}

.bw-meter__label b { color: var(--text); font-weight: 700; }

.bw-meter__track {
  height: calc(7px * var(--s));
  margin-top: calc(6px * var(--s));
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  overflow: hidden;
}

.bw-meter__fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--amber), var(--red));
  transform-origin: left;
  animation: bw-meter-grow 1100ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.bw-meter__fill--epss { background: linear-gradient(90deg, rgba(45, 225, 194, 0.85), var(--cyan)); }

@keyframes bw-meter-grow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* ---------- scene 4: actors ---------- */

.bw-actors-grid {
  display: grid;
  flex: 1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: minmax(0, 1fr);
  gap: calc(18px * var(--s));
  min-height: 0;
}

.bw-actor {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: calc(20px * var(--s)) calc(26px * var(--s));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: calc(14px * var(--s));
  background: var(--panel);
}

.bw-actor__top {
  display: flex;
  align-items: baseline;
  gap: calc(12px * var(--s));
}

.bw-actor__name {
  font-size: calc(27px * var(--s));
  font-weight: 740;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bw-actor__count {
  margin-left: auto;
  color: var(--cyan);
  font: 720 calc(30px * var(--s))/1 ui-monospace, monospace;
}

.bw-actor__meta {
  margin-top: calc(8px * var(--s));
  color: var(--muted);
  font-size: calc(15px * var(--s));
}

.bw-actor__meta b { color: #d2e3e0; font-weight: 650; }

.bw-actor--apt { border-left: calc(5px * var(--s)) solid var(--red); }
.bw-actor--cybercrime { border-left: calc(5px * var(--s)) solid var(--amber); }

/* ---------- scene 5: ransomware / regional ---------- */

.bw-split {
  display: grid;
  flex: 1;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: calc(26px * var(--s));
  min-height: 0;
}

.bw-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: calc(22px * var(--s)) calc(26px * var(--s));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: calc(18px * var(--s));
  background: var(--panel);
}

.bw-panel__label {
  margin-bottom: calc(16px * var(--s));
  color: var(--muted);
  font-size: calc(15px * var(--s));
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.bw-rows {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: calc(12px * var(--s));
  justify-content: flex-start;
  min-height: 0;
  overflow: hidden;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bw-row {
  display: flex;
  align-items: baseline;
  gap: calc(14px * var(--s));
  padding: calc(10px * var(--s)) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: calc(19px * var(--s));
}

.bw-row b {
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bw-row .bw-row__meta {
  margin-left: auto;
  color: var(--muted);
  font-size: calc(15px * var(--s));
  white-space: nowrap;
}

.bw-row--th b { color: #ff9b95; }

.bw-bignum {
  color: var(--cyan);
  font: 740 calc(88px * var(--s))/1 ui-monospace, monospace;
  text-shadow: 0 0 30px rgba(45, 225, 194, 0.25);
}

.bw-bignum--red { color: var(--red); text-shadow: 0 0 30px rgba(255, 59, 48, 0.3); }

.bw-empty {
  margin: auto;
  color: var(--muted);
  font-size: calc(19px * var(--s));
  text-align: center;
}

/* ---------- progress + footer ---------- */

.bw-progress {
  position: relative;
  z-index: 8;
  background: rgba(255, 255, 255, 0.06);
}

.bw-progress__fill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, rgba(45, 225, 194, 0.5), var(--cyan));
  box-shadow: 0 0 18px rgba(45, 225, 194, 0.5);
}

.bw-progress__fill.run {
  animation: bw-progress linear both;
}

@keyframes bw-progress {
  from { width: 0; }
  to { width: 100%; }
}

.bw-footer {
  position: relative;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: calc(28px * var(--s));
  padding: 0 var(--edge);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(5, 9, 12, 0.8);
}

.bw-ticker {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}

.bw-ticker__track {
  display: inline-flex;
  gap: calc(64px * var(--s));
  white-space: nowrap;
  animation: bw-marquee 45s linear infinite;
  will-change: transform;
}

@keyframes bw-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.bw-ticker__item {
  display: inline-flex;
  align-items: baseline;
  gap: calc(10px * var(--s));
  color: #c4d5d2;
  font-size: calc(20px * var(--s));
}

.bw-ticker__item::before {
  content: "▸";
  color: var(--cyan);
}

.bw-help {
  display: none;
}

/* ---------- loading / freeze ---------- */

.bw-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--muted);
}

.bw-loading strong {
  color: var(--text);
  font-size: calc(26px * var(--s));
  font-weight: 650;
}

.bw-loading__pulse {
  width: calc(72px * var(--s));
  height: calc(72px * var(--s));
  margin-bottom: calc(22px * var(--s));
  border: 1px solid rgba(45, 225, 194, 0.36);
  border-radius: 50%;
  box-shadow: inset 0 0 28px rgba(45, 225, 194, 0.08), 0 0 34px rgba(45, 225, 194, 0.08);
  animation: bw-pulse 1.8s ease-in-out infinite;
}

@keyframes bw-pulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.12); opacity: 1; }
}

.bw-freeze {
  position: absolute;
  z-index: 20;
  top: calc(120px * var(--s));
  left: 50%;
  padding: calc(9px * var(--s)) calc(18px * var(--s));
  border: 1px solid rgba(255, 181, 68, 0.52);
  border-radius: 999px;
  color: #ffd18b;
  background: rgba(47, 31, 8, 0.9);
  font-size: calc(16px * var(--s));
  font-weight: 650;
  transform: translateX(-50%);
}

/* ---------- จอเล็ก: ใช้ได้แต่เรียบ (หน้านี้ออกแบบเพื่อ videowall) ---------- */

@media (max-width: 1100px) {
  .bw-scene-tabs { display: none; }
  .bw-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); overflow-y: auto; }
  .bw-app { grid-template-rows: 84px minmax(0, 1fr) 4px 52px; }
  .bw-stage { overflow-y: auto; }
  .bw-threat { flex-direction: column; align-items: flex-start; gap: 12px; }
  .bw-threat__rank { font-size: 80px; }
  .bw-threat__title { font-size: 26px; }
  .bw-threat__summary { font-size: 16px; }
  .bw-patch-grid, .bw-actors-grid { grid-template-columns: 1fr; grid-auto-rows: auto; overflow-y: auto; }
  .bw-split { grid-template-columns: 1fr; overflow-y: auto; }
  .bw-scene__title { font-size: 28px; }
  .bw-kpi strong { font-size: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .bw-ambient span,
  .bw-kpi::after,
  .bw-ticker__track,
  .bw-loading__pulse,
  .bw-patch--kev::after,
  .bw-news-progress__fill.run {
    animation: none;
  }

  .bw-scene,
  .bw-bar__fill,
  .bw-meter__fill {
    animation-duration: 1ms;
  }

  .bw-threat__bg {
    transition: none;
    transform: none;
  }

  .bw-patch--focus {
    transform: none;
  }
}
