:root {
  --canvas: #101514;
  --surface: #18201e;
  --surface-raised: #202a27;
  --muted: #c0cec7;
  --text: #ffffff;
  --line: rgba(218, 231, 224, .18);
  --line-strong: rgba(218, 231, 224, .28);
}

body { min-width: 0; min-height: 0; letter-spacing: 0; }
.ops-screen { grid-template-rows: 80px minmax(0, 1fr) 54px; gap: 12px; padding: 0 20px 14px; background: var(--canvas); }
.ops-header { grid-template-columns: minmax(180px, .7fr) minmax(320px, 1.4fr) auto; gap: 20px; }
.brand { min-width: 0; }
.brand strong { font-size: 24px; }
.brand em { font-size: 13px; }
.screen-title p { display: none; }
.screen-title h1 { font-size: 30px; line-height: 1.25; overflow-wrap: anywhere; }
.header-meta { gap: 14px; }
.sound-toggle { height: 38px; font-size: 14px; }
.system-status { font-size: 14px; }
.date { font-size: 14px; padding-left: 12px; }
.header-meta > strong { font-size: 30px; }
.weather { display: none; }
.dashboard-grid { grid-template-rows: minmax(0, 1fr) clamp(196px, 22vh, 240px); gap: 12px; }
.panel { background: var(--surface); box-shadow: none; border-radius: 4px; }
.panel-head { height: 58px; padding: 0 20px; background: var(--surface-raised); }
.panel-head p, .alarm-title small { display: none; }
.panel-head h2 { font-size: 25px; }
.panel-head > span { font-size: 15px; }
.events-panel { grid-template-rows: 58px minmax(0, 1fr); }
.event-summary { font-size: 17px; gap: 16px; }
.event-summary b { font-size: 21px; }
.event-table { padding: 0 12px 10px; }
.event-row { min-height: 64px; grid-template-columns: 1.65fr .7fr .8fr .9fr .8fr; padding: 8px 10px; gap: 10px; font-size: 18px; }
.event-row b { font-size: 19px; white-space: normal; overflow-wrap: anywhere; }
.event-row > span, .event-row time { min-width: 0; overflow-wrap: anywhere; }
.event-row small { display: none; }
.event-row em { font-size: 16px; padding: 6px 8px; }
.event-head { min-height: 46px; font-size: 16px; }
.event-scroll { height: calc(100% - 46px); overflow: hidden; }
.event-scroll-track { animation: none; }
.event-scroll-track.has-overflow { animation: senior-event-scroll var(--event-duration, 30s) linear infinite alternate; }
@keyframes senior-event-scroll {
  0%, 15% { transform: translateY(0); }
  85%, 100% { transform: translateY(var(--event-distance, 0px)); }
}
.screen-empty { min-height: 200px; height: 100%; font-size: 24px; color: #d4e4db; }
.event-scroll-track:has(.screen-empty) { height: 100%; }
.activity-caption { left: 30px; right: 30px; bottom: 38px; max-width: 90%; }
.activity-caption h2 { font-size: 40px; line-height: 1.25; }
.activity-caption p { font-size: 22px; line-height: 1.5; }
.activity-meta span, .activity-meta em { font-size: 16px; }
.slide-dots { bottom: 16px; }
.slide-dots i { height: 4px; }
.activity-slide.timebank-intro::after { display: none; }
.activity-slide.timebank-intro .activity-photo { transform: none; background-size: contain; background-repeat: no-repeat; background-color: #103b29; }

.monitor-panel, .service-panel { grid-template-rows: 42px minmax(0, 1fr); }
.monitor-panel .panel-head, .service-panel .panel-head { height: 42px; }
.monitor-panel .panel-head h2, .service-panel .panel-head h2 { font-size: 21px; }
.monitor-panel .panel-head > span { display: none; }
.metric { padding: 7px 18px; }
.metric p { margin-bottom: 4px; font-size: 17px; }
.metric strong { font-size: 32px; line-height: 1.1; }
.metric strong em { font-size: 14px; }
.metric > span, .metric::before { display: none; }
.service-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); }
.service-stats { grid-template-columns: minmax(0, 1fr); grid-template-rows: repeat(2, minmax(0, 1fr)); }
.service-stats article { padding: 7px 18px; gap: 4px; grid-template-columns: minmax(0, 1fr); }
.service-stats article:last-child { border-bottom: 0; }
.service-stats span { font-size: 17px; }
.service-stats strong { font-size: 30px; line-height: 1.1; }
.service-stats strong em { font-size: 14px; }
.service-stats small { display: none; }
.org-overview { padding: 8px 16px; background: #202a27; }
.org-overview > p { font-size: 15px; margin-bottom: 4px; }
.org-overview dl { height: calc(100% - 24px); }
.org-overview dt { font-size: 14px; }
.org-overview dd { margin-top: 3px; font-size: 18px; }
.alarm-bar { grid-template-columns: 180px minmax(0, 1fr) 110px; border-radius: 4px; }
.alarm-title { padding: 0 20px; }
.alarm-title strong { font-size: 22px; }
.ticker span { font-size: 18px; padding: 0 18px; }
.refresh { font-size: 13px; }
.screen-pairing input[name="code"] { letter-spacing: 0; }

@media (max-height: 820px) and (min-width: 901px) {
  .ops-screen { grid-template-rows: 68px minmax(0, 1fr) 48px; gap: 10px; padding-bottom: 10px; }
  .dashboard-grid { gap: 10px; }
}

@media (max-width: 1550px) {
  .ops-header { grid-template-columns: minmax(160px, .7fr) minmax(280px, 1.4fr) auto; gap: 14px; }
  .system-status, .date { display: none; }
  .brand strong { font-size: 21px; }
  .screen-title h1 { font-size: 26px; }
  .event-summary { font-size: 15px; gap: 10px; }
  .panel-head { padding: 0 14px; }
  .panel-head h2 { font-size: 22px; }
  .event-row { font-size: 16px; gap: 7px; padding-inline: 5px; }
  .event-row b { font-size: 17px; }
  .event-row em { font-size: 14px; padding-inline: 5px; }
  .event-head { font-size: 15px; }
  .activity-caption h2 { font-size: 32px; }
  .activity-caption p { font-size: 20px; }
  .metric { padding-inline: 14px; }
  .metric strong { font-size: 29px; }
  .service-stats article { padding-inline: 14px; }
  .service-stats strong { font-size: 27px; }
  .org-overview { padding-inline: 12px; }
  .org-overview dd { font-size: 16px; }
  .org-overview dl div:nth-child(2n) { padding-left: 10px; }
  .ticker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ticker span:last-child { display: none; }
  .ticker span { font-size: 17px; }
}

@media (max-width: 900px) {
  body { overflow: auto; }
  .ops-screen { height: auto; min-height: 100vh; grid-template-rows: auto auto auto; padding: 12px; }
  .ops-header { grid-template-columns: minmax(0, 1fr) auto; padding-bottom: 12px; }
  .brand strong { font-size: 19px; }
  .brand img { width: 40px; height: 40px; }
  .screen-title { grid-column: 1 / -1; grid-row: 2; }
  .screen-title h1 { font-size: 24px; }
  .header-meta > strong { display: none; }
  .sound-toggle { font-size: 12px; padding-inline: 8px; }
  .dashboard-grid { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; }
  .activity-panel { aspect-ratio: 16 / 10; }
  .events-panel { min-height: 340px; }
  .monitor-panel { min-height: 230px; }
  .service-panel { min-height: 250px; }
  .activity-caption { left: 16px; right: 16px; bottom: 30px; }
  .activity-caption h2 { font-size: 26px; }
  .activity-caption p { font-size: 17px; }
  .activity-meta { margin-bottom: 8px; }
  .activity-meta span, .activity-meta em { font-size: 13px; }
  .event-summary { font-size: 13px; }
  .panel-head h2 { font-size: 20px; }
  .event-row { font-size: 14px; gap: 4px; }
  .event-row b { font-size: 15px; }
  .event-row em { font-size: 12px; }
  .event-dot { margin-right: 5px; }
  .metric p, .service-stats span { font-size: 15px; }
  .metric strong { font-size: 25px; }
  .org-overview dl { grid-template-columns: minmax(0, 1fr); }
  .org-overview dl div { border-right: 0; padding: 2px 0; }
  .org-overview dl div:nth-child(2n) { padding-left: 0; }
  .org-overview dt { font-size: 12px; }
  .org-overview dd { font-size: 15px; white-space: normal; overflow-wrap: anywhere; }
  .alarm-bar { min-height: 58px; grid-template-columns: 110px minmax(0, 1fr); }
  .alarm-title { padding: 0 12px; gap: 8px; }
  .alarm-title strong { font-size: 16px; }
  .ticker { grid-template-columns: minmax(0, 1fr); }
  .ticker span { font-size: 14px; padding-inline: 12px; }
  .ticker span:nth-child(n+2), .refresh { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .event-scroll-track.has-overflow { animation: none; }
  .event-scroll { overflow-y: auto; }
}
#live-activities { font: inherit; color: inherit; }
