@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src:
    local("Atkinson Hyperlegible Next"),
    local("Atkinson Hyperlegible Next Regular"),
    url("/assets/fonts/AtkinsonHyperlegibleNext-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src:
    local("Atkinson Hyperlegible Next Italic"),
    url("/assets/fonts/AtkinsonHyperlegibleNext-Italic-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src:
    local("Inter"),
    local("Inter Regular"),
    url("/assets/fonts/Inter-VariableFont_opsz,wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src:
    local("Inter Italic"),
    url("/assets/fonts/Inter-Italic-VariableFont_opsz,wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --ops-bg:
    radial-gradient(circle at 12% 0%, rgba(134, 176, 215, 0.18) 0%, rgba(134, 176, 215, 0) 34%),
    radial-gradient(circle at 88% 10%, rgba(86, 133, 183, 0.14) 0%, rgba(86, 133, 183, 0) 28%),
    linear-gradient(180deg, #d6dee8 0%, #c7d1dc 100%);
  --ops-panel: linear-gradient(180deg, rgba(243, 247, 251, 0.96) 0%, rgba(232, 238, 245, 0.94) 100%);
  --ops-border: rgba(108, 133, 160, 0.55);
  --ops-text: #102235;
  --ops-muted: #546b84;
  --ops-blue: #355270;
  --ops-shadow: 0 18px 38px rgba(18, 30, 44, 0.12);
  --ops-radius: 18px;
  --ops-font-sans: "Inter", "Source Sans Pro", "Segoe UI", "Tahoma", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--ops-font-sans);
  background: var(--ops-bg);
  color: var(--ops-text);
  overflow: auto;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
}

.ops-page,
.ops-page *,
.hover-popup,
.hover-popup * {
  font-family: var(--ops-font-sans) !important;
}

body.drawer-open {
  overflow: hidden;
}

body.mode-tv {
  overflow: hidden;
}

.ops-page {
  width: calc(100% - 1.4rem);
  max-width: 1600px;
  margin: 0.45rem auto;
  min-height: calc(100vh - 1rem);
  display: grid;
  grid-template-rows: auto auto auto;
  gap: 0.45rem;
}

body.mode-tv .ops-page {
  width: calc(100vw - 1rem);
  max-width: none;
  height: calc(100vh - 1rem);
  min-height: calc(100vh - 1rem);
  margin: 0.35rem auto;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0.28rem;
}

.card {
  background: var(--ops-panel);
  border: 1px solid var(--ops-border);
  border-radius: var(--ops-radius);
  box-shadow: var(--ops-shadow);
  backdrop-filter: blur(12px);
}

.ops-header {
  position: relative;
  overflow: hidden;
  padding: 0.82rem 0.92rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.55rem;
  align-items: stretch;
}

.ops-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 12%, rgba(117, 169, 224, 0.18) 0%, rgba(117, 169, 224, 0) 28%),
    radial-gradient(circle at 82% 18%, rgba(90, 137, 189, 0.16) 0%, rgba(90, 137, 189, 0) 24%);
  pointer-events: none;
}

.ops-header > * {
  position: relative;
  z-index: 1;
}

body.mode-tv .ops-header {
  padding: 0.52rem 0.65rem;
  gap: 0.3rem;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.7rem;
  color: var(--ops-blue);
  font-weight: 800;
  line-height: 1.05;
  opacity: 0.88;
}

.ops-logo {
  display: block;
  width: 232px;
  max-width: 100%;
  height: auto;
}

body.mode-tv .ops-logo {
  width: clamp(190px, 14vw, 250px);
}

.ops-brand {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  align-self: stretch;
}

.ops-titles {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.08rem;
  align-items: center;
  text-align: center;
  min-width: 0;
  height: 100%;
}

h1 {
  margin: 0;
  font-size: clamp(1.28rem, 2vw, 1.92rem);
  line-height: 0.98;
  text-transform: none;
  letter-spacing: -0.04em;
  font-weight: 800;
}

body.mode-tv h1 {
  font-size: clamp(1rem, 1.25vw, 1.28rem);
}

.lede {
  margin: 0.12rem 0 0;
  font-size: 0.98rem;
  color: var(--ops-muted);
}

.header-qr {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.38rem 0.52rem;
  border: 1px solid rgba(111, 143, 177, 0.52);
  border-radius: calc(var(--ops-radius) - 2px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.42) 0%, rgba(220, 230, 240, 0.16) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
  align-self: stretch;
}

.header-qr-image {
  display: block;
  height: 60px;
  width: auto;
  border: 1px solid rgba(92, 120, 149, 0.85);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 18px rgba(15, 28, 45, 0.16);
}

body.mode-tv .header-qr-image {
  height: 48px;
}

.header-qr-text {
  font-size: 0.76rem;
  line-height: 0.96;
  letter-spacing: 0.05em;
  color: #294866;
  font-weight: 800;
  text-transform: uppercase;
  max-width: 5.1rem;
}

.operator-label {
  font-size: 0.8rem;
  color: var(--ops-muted);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

#operatorInput {
  width: 170px;
  border: 1px solid #a7b2be;
  border-radius: 4px;
  padding: 0.3rem 0.65rem;
  font: inherit;
  color: var(--ops-text);
  background: #eef2f5;
}

#operatorInput:focus,
#drawerNotes:focus {
  outline: 2px solid #d8e9ff;
  border-color: #6f8fb8;
}

.sync-row {
  display: flex;
  gap: 0.3rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.sync-row--title {
  position: static;
  justify-content: center;
  margin-top: 0.12rem;
  opacity: 0.96;
  padding: 0.22rem 0.52rem;
  border: 1px solid rgba(98, 128, 158, 0.2);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18) 0%, rgba(223, 231, 239, 0.08) 100%);
  transform: none;
  width: fit-content;
}

.sync-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.2);
  display: inline-block;
}

.sync-dot--online {
  background: #2fb365;
  box-shadow: 0 0 0 2px rgba(47, 179, 101, 0.2);
}

.sync-dot--offline {
  background: #d04747;
  box-shadow: 0 0 0 2px rgba(208, 71, 71, 0.2);
}

.last-updated {
  color: var(--ops-muted);
  font-size: 0.72rem;
}

body.mode-tv .last-updated {
  font-size: 0.66rem;
}

.equipment-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.38rem;
  overflow: visible;
  align-content: start;
}

body.mode-tv .equipment-layout {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.28rem;
  align-content: start;
}

.comments-board {
  padding: 0.72rem 0.82rem 0.78rem;
  display: grid;
  gap: 0.65rem;
}

body.mode-tv .comments-board {
  padding: 0.48rem 0.62rem 0.58rem;
  gap: 0.4rem;
  min-height: 0;
}

.comments-board-header {
  display: flex;
  justify-content: space-between;
  gap: 0.55rem;
  align-items: end;
  border-bottom: 1px solid rgba(54, 79, 106, 0.28);
  padding-bottom: 0.42rem;
}

body.mode-tv .comments-board-header {
  padding-bottom: 0.3rem;
  gap: 0.35rem;
}

.comments-board-title {
  margin: 0.15rem 0 0;
  font-size: 1rem;
  color: #1a3652;
}

body.mode-tv .comments-board-title {
  font-size: 0.88rem;
  margin-top: 0.04rem;
}

.comments-board-subtitle {
  margin: 0;
  max-width: 32rem;
  font-size: 0.76rem;
  line-height: 1.32;
  color: #4d647b;
  text-align: right;
}

body.mode-tv .comments-board-subtitle {
  font-size: 0.68rem;
  max-width: 22rem;
}

.comments-form-input {
  width: 100%;
  min-height: 104px;
  resize: vertical;
  border: 1px solid #a8b2bf;
  border-radius: var(--ops-radius);
  padding: 0.7rem 0.8rem;
  font: inherit;
  color: var(--ops-text);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(241, 246, 251, 0.96) 100%);
}

.comments-form-input:focus {
  outline: 2px solid #d8e9ff;
  border-color: #6f8fb8;
}

.comments-list {
  display: grid;
  gap: 0.45rem;
}

body.mode-tv .comments-list {
  gap: 0.32rem;
  max-height: min(16vh, 150px);
  overflow: auto;
  padding-right: 0.2rem;
}

.comments-board-actions {
  display: flex;
  justify-content: center;
  padding-top: 0.05rem;
}

.add-comment-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 156px;
  border: 1px solid #7f96ad;
  background: #dce8f3;
  color: #243d57;
  border-radius: var(--ops-radius);
  padding: 0.42rem 0.72rem;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

body.mode-tv .add-comment-button {
  min-width: 156px;
  padding: 0.32rem 0.64rem;
  font-size: 0.68rem;
}

.add-comment-button:hover {
  background: #cfe0ee;
}

.comments-empty {
  margin: 0;
  border: 1px dashed #9eb0c4;
  border-radius: calc(var(--ops-radius) + 2px);
  padding: 1rem;
  text-align: center;
  color: #5f7690;
  background: rgba(255, 255, 255, 0.45);
}

.comment-card {
  display: grid;
  grid-template-columns: 8px 1fr;
  border: 1px solid #9caec2;
  border-radius: calc(var(--ops-radius) + 4px);
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(235, 241, 247, 0.95) 100%);
  box-shadow: 0 10px 20px rgba(17, 31, 48, 0.08);
}

body.mode-tv .comment-card {
  border-radius: calc(var(--ops-radius) + 2px);
}

.comment-card-accent {
  background: linear-gradient(180deg, #567a9d 0%, #2d4f70 45%, #193650 100%);
}

.comment-card-body {
  padding: 0.68rem 0.78rem 0.72rem;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

body.mode-tv .comment-card-body {
  padding: 0.48rem 0.62rem 0.54rem;
  gap: 0.22rem;
}

.comment-card-header {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  align-items: center;
  order: 2;
  margin-top: 0.1rem;
}

.comment-card-meta {
  display: grid;
  gap: 0.08rem;
  opacity: 0.72;
}

.comment-card-author,
.comment-card-date,
.comment-card-message {
  margin: 0;
}

.comment-card-author {
  font-size: 0.68rem;
  font-weight: 600;
  color: #7d91a5;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.comment-card-date {
  font-size: 0.58rem;
  color: #97a8ba;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.comment-card-message {
  order: 1;
  font-size: 0.92rem;
  line-height: 1.42;
  color: #183149;
  font-weight: 600;
  white-space: pre-wrap;
  word-break: break-word;
}

body.mode-tv .comment-card-message {
  font-size: 0.78rem;
  line-height: 1.28;
}

.comment-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  opacity: 0.78;
}

.comment-icon-button {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(123, 149, 176, 0.55);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: #6d87a1;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}

body.mode-tv .comment-icon-button {
  width: 22px;
  height: 22px;
}

.comment-icon-button:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.12);
  border-color: #7f97b0;
  color: #2d4e6d;
}

.comment-icon-button svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  pointer-events: none;
}

.comment-icon-button svg * {
  pointer-events: none;
}

.comment-icon-button--danger {
  color: #8a2f39;
}

.comment-drawer-form {
  overflow: auto;
}

.comment-drawer-mode {
  color: #5f7791;
}

.group {
  padding: 0.44rem 0.5rem 0.52rem;
  grid-column: 1 / -1;
  border-width: 1px;
  position: relative;
  overflow: hidden;
}

body.mode-tv .group {
  padding: 0.24rem 0.3rem 0.32rem;
}

.paired-groups-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 0.38rem;
}

.paired-groups-row > .group {
  grid-column: auto;
}

.paired-groups-row .card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.mode-tv .paired-groups-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.28rem;
}

body.mode-tv .paired-groups-row .card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.group-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.55rem;
  margin-bottom: 0.34rem;
  padding: 0 0.04rem 0.24rem;
  border-bottom: 1px solid rgba(92, 121, 149, 0.26);
}

body.mode-tv .group-header {
  margin-bottom: 0.16rem;
  padding-bottom: 0.12rem;
}

.group-title {
  margin: 0;
  font-size: 0.96rem;
  color: #17314c;
  text-transform: none;
  letter-spacing: -0.02em;
  font-weight: 800;
}

body.mode-tv .group-title {
  font-size: 0.8rem;
}

.group-stats {
  margin: 0;
  color: #5e7894;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

body.mode-tv .group-stats {
  font-size: 0.66rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 0.26rem;
}

body.mode-tv .card-grid {
  gap: 0.2rem;
}

.low-zone-layout {
  display: grid;
  grid-template-columns: 4fr 3fr;
  gap: 0.4rem;
  align-items: start;
}

body.mode-tv .low-zone-layout {
  gap: 0.28rem;
}

.low-zone-section {
  display: grid;
  gap: 0.2rem;
}

.low-zone-section[data-partition="B"] {
  padding-right: 0.22rem;
}

.low-zone-section[data-partition="A"] {
  padding-left: 0.12rem;
}

.low-zone-title {
  margin: 0;
  font-size: 0.74rem;
  text-transform: none;
  letter-spacing: 0.03em;
  color: #4f6888;
  font-weight: 800;
}

body.mode-tv .low-zone-title {
  font-size: 0.64rem;
}

.equipment-card {
  position: relative;
  border: 1px solid rgba(116, 150, 185, 0.16);
  border-radius: var(--ops-radius);
  background: linear-gradient(180deg, rgba(24, 38, 54, 0.96) 0%, rgba(15, 26, 38, 0.98) 100%);
  padding: 0.34rem 0.52rem;
  display: grid;
  gap: 0.26rem;
  cursor: pointer;
  min-height: clamp(60px, 8vh, 92px);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
  align-content: start;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 14px 24px rgba(5, 10, 18, 0.2);
}

body.mode-tv .equipment-card {
  min-height: 48px;
  padding: 0.22rem 0.28rem;
  gap: 0.1rem;
}

.equipment-card:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 18px 32px rgba(4, 10, 18, 0.32);
}

.equipment-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.3rem;
}

.equipment-name-row {
  display: block;
  min-width: 0;
}

.equipment-name {
  margin: 0;
  font-size: 1.16rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #edf4fb;
  line-height: 0.98;
  text-transform: none;
  text-wrap: balance;
}

body.mode-tv .equipment-name {
  font-size: clamp(0.9rem, 1.05vw, 1.04rem);
}

.equipment-note-preview {
  margin: 0;
  padding-top: 0.04rem;
  color: rgba(205, 219, 233, 0.82);
  font-size: 0.76rem;
  line-height: 1.28;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
  word-break: break-word;
  max-width: min(100%, 32ch);
}

body.mode-tv .equipment-note-preview {
  font-size: 0.46rem;
  line-height: 1.18;
  -webkit-line-clamp: 2;
}

.card-chevron {
  display: none;
}

.status-pill {
  margin: 0;
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 0.24rem;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.1rem 0.4rem;
  font-size: 0.58rem;
  letter-spacing: 0.04em;
  font-weight: 800;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body.mode-tv .status-pill {
  padding: 0.06rem 0.3rem;
  font-size: 0.49rem;
}

.sw-status {
  margin: 0;
  width: fit-content;
  border: 1px solid rgba(167, 190, 212, 0.24);
  border-radius: 999px;
  padding: 0.12rem 0.48rem;
  font-size: 0.58rem;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: #bfd1e6;
  background: rgba(225, 234, 243, 0.08);
  opacity: 1;
  text-transform: uppercase;
}

body.mode-tv .sw-status {
  padding: 0.05rem 0.26rem;
  font-size: 0.44rem;
}

.sw-status.sw-status--complete {
  color: #1f5b35;
  border-color: #78a98c;
  background: #dbeadf;
}

.sw-status.sw-status--incomplete {
  color: #8a5b10;
  border-color: #bc9b63;
  background: #eadfbf;
}

.hover-popup {
  position: fixed;
  width: min(640px, calc(100vw - 1rem));
  background: linear-gradient(180deg, #ffffff 0%, #eef4fb 100%);
  border: 2px solid #5f87b1;
  border-radius: calc(var(--ops-radius) + 2px);
  box-shadow:
    0 0 0 2px rgba(214, 232, 250, 0.82),
    0 22px 40px rgba(10, 22, 36, 0.28),
    0 8px 16px rgba(10, 22, 36, 0.18);
  padding: 0.95rem 1rem;
  z-index: 18;
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity 0.1s ease, transform 0.1s ease;
}

.hover-popup.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.hover-popup-title,
.hover-popup-sw,
.hover-popup-note,
.hover-popup-meta {
  margin: 0;
  line-height: 1.3;
}

.hover-popup-title {
  font-size: 1.08rem;
  font-weight: 700;
  color: #2e4668;
}

.hover-popup-note {
  margin-top: 0.45rem;
  font-size: 0.98rem;
  line-height: 1.55;
  color: #314d72;
}

.hover-popup-sw {
  margin-top: 0.35rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: #3e5a7b;
}

.hover-popup-meta {
  margin-top: 0.4rem;
  font-size: 0.82rem;
  color: #7388a5;
}

.status-operational {
  background: linear-gradient(135deg, #0b4e34 0%, #0f6a46 100%);
  border-color: transparent;
}

.status-operational .status-pill {
  border-color: rgba(138, 255, 195, 0.45);
  color: #e6ffef;
  background: rgba(7, 34, 22, 0.32);
}

.status-warning {
  background: linear-gradient(135deg, #6b4a16 0%, #8d611c 100%);
  border-color: transparent;
}

.status-warning .status-pill {
  border-color: rgba(255, 218, 150, 0.42);
  color: #fff4dc;
  background: rgba(53, 35, 8, 0.34);
}

.status-offline {
  background: linear-gradient(135deg, #465360 0%, #5c6874 100%);
  border-color: transparent;
}

.status-offline .status-pill {
  border-color: rgba(229, 238, 247, 0.42);
  color: #f2f7fc;
  background: rgba(26, 33, 41, 0.35);
}

.status-out-of-service {
  background: linear-gradient(135deg, #6d1f2c 0%, #8f2a3a 100%);
  border-color: transparent;
}

.status-out-of-service .status-pill {
  border-color: rgba(255, 176, 188, 0.45);
  color: #ffe7eb;
  background: rgba(57, 10, 18, 0.34);
}

.status-maintenance {
  background: linear-gradient(135deg, #15406c 0%, #1f5e96 100%);
  border-color: transparent;
}

.status-maintenance .status-pill {
  border-color: rgba(163, 211, 255, 0.46);
  color: #e9f6ff;
  background: rgba(8, 25, 44, 0.34);
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(9, 20, 38, 0.4);
  z-index: 20;
}

.equipment-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(420px, 100%);
  height: 100vh;
  height: 100dvh;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, rgba(237, 243, 249, 0.98) 100%);
  box-shadow: -18px 0 42px rgba(12, 22, 37, 0.22);
  transform: translateX(100%);
  transition: transform 0.2s ease;
  z-index: 25;
  padding: 1.15rem 1.05rem calc(1rem + env(safe-area-inset-bottom, 0px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0.65rem;
  overflow: hidden;
}

.equipment-drawer.is-open {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  align-items: start;
  padding-bottom: 0.2rem;
}

.drawer-content {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 0.9rem;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 0.25rem;
  padding-bottom: 0.3rem;
}

.drawer-group {
  margin: 0;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #6f83a0;
  font-weight: 700;
}

.drawer-title {
  margin: 0.15rem 0 0;
  font-size: clamp(1.25rem, 2.8vh, 1.7rem);
  text-transform: none;
}

.drawer-close {
  border: 1px solid #a8b3be;
  background: #e7ecef;
  border-radius: var(--ops-radius);
  width: 34px;
  height: 34px;
  cursor: pointer;
  color: #6e809a;
}

.drawer-section {
  display: grid;
  gap: 0.45rem;
  align-content: start;
  justify-items: start;
}

.drawer-content > .drawer-section + .drawer-section {
  margin-top: 0.15rem;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(114, 136, 162, 0.32);
}

.drawer-section[hidden] {
  display: none !important;
}

.drawer-label {
  margin: 0;
  font-size: 0.82rem;
  color: #6e8098;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.drawer-sublabel {
  margin: 0;
  font-size: 0.76rem;
  color: #7d8ea5;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 700;
}

.drawer-inline-row {
  display: grid;
  gap: 0.3rem;
}

.drawer-inline-row[hidden] {
  display: none !important;
}

.asset-log-details {
  width: 100%;
}

.asset-log-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  cursor: pointer;
}

.asset-log-summary::-webkit-details-marker {
  display: none;
}

.asset-log-summary::after {
  content: "+";
  font-size: 1rem;
  line-height: 1;
  color: #59728c;
}

.asset-log-details[open] .asset-log-summary::after {
  content: "-";
}

.asset-log-list {
  display: grid;
  gap: 0.55rem;
  width: 100%;
  max-height: 190px;
  overflow: auto;
  margin-top: 0.55rem;
  padding-right: 0.1rem;
}

.asset-log-empty {
  margin: 0;
  padding: 0.72rem 0.8rem;
  border: 1px dashed rgba(114, 136, 162, 0.45);
  border-radius: var(--ops-radius);
  color: #6f83a0;
  background: rgba(232, 238, 245, 0.55);
  font-size: 0.85rem;
}

.asset-log-item {
  display: grid;
  gap: 0.45rem;
  width: 100%;
  padding: 0.72rem 0.8rem;
  border: 1px solid rgba(114, 136, 162, 0.35);
  border-radius: var(--ops-radius);
  background: linear-gradient(180deg, rgba(245, 248, 252, 0.98) 0%, rgba(234, 240, 247, 0.96) 100%);
}

.asset-log-item-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}

.asset-log-item-author,
.asset-log-item-time {
  margin: 0;
}

.asset-log-item-author {
  color: #314b66;
  font-size: 0.85rem;
  font-weight: 700;
}

.asset-log-item-time {
  color: #6f83a0;
  font-size: 0.78rem;
}

.asset-log-item-changes {
  margin: 0;
  padding-left: 1rem;
  color: #21384f;
  display: grid;
  gap: 0.3rem;
  font-size: 0.84rem;
}

#swYearSelect {
  width: 100%;
  max-width: 180px;
  border: 1px solid #a8b2bf;
  border-radius: var(--ops-radius);
  padding: 0.28rem 0.45rem;
  font: inherit;
  color: var(--ops-text);
  background: #fdfefe;
}

.status-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}

.status-option {
  border-radius: var(--ops-radius);
  border: 1px solid #566c88;
  background: linear-gradient(135deg, #1a2a3b 0%, #142232 100%);
  color: #d3e0ef;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  padding: 0.42rem 0.52rem;
  font-size: 0.84rem;
  opacity: 0.62;
  filter: saturate(0.78);
  transform: translateY(0);
  transition:
    opacity 0.14s ease,
    filter 0.14s ease,
    transform 0.14s ease,
    box-shadow 0.14s ease,
    border-color 0.14s ease;
}

.status-option:hover,
.status-option:focus-visible {
  opacity: 0.9;
  filter: saturate(1);
  transform: translateY(-1px);
}

.status-option.is-active {
  box-shadow: inset 0 0 0 2px currentColor;
  opacity: 1;
  filter: saturate(1.08);
  transform: translateY(-1px);
}

.status-option--operational.is-active {
  box-shadow: inset 0 0 0 2px #08784f, 0 0 0 1px rgba(8, 120, 79, 0.28);
}

.status-option--warning.is-active {
  box-shadow: inset 0 0 0 2px #b66a00, 0 0 0 1px rgba(182, 106, 0, 0.3);
}

.status-option--offline.is-active {
  box-shadow: inset 0 0 0 2px #4e5966, 0 0 0 1px rgba(78, 89, 102, 0.3);
}

.status-option--out-of-service.is-active {
  box-shadow: inset 0 0 0 2px #8f2a2a, 0 0 0 1px rgba(143, 42, 42, 0.3);
}

.status-option--maintenance.is-active {
  box-shadow: inset 0 0 0 2px #315fbe, 0 0 0 1px rgba(49, 95, 190, 0.3);
}

.status-option--operational {
  color: #dfffee;
  border-color: #3ac782;
  background: linear-gradient(135deg, #0f3e2b 0%, #145337 100%);
}

.status-option--warning {
  color: #fff1d2;
  border-color: #f0b84f;
  background: linear-gradient(135deg, #5d4316 0%, #7b581d 100%);
}

.status-option--offline {
  color: #ecf2f9;
  border-color: #a7b6c6;
  background: linear-gradient(135deg, #3b4754 0%, #4f5b68 100%);
}

.status-option--out-of-service {
  color: #ffe3e8;
  border-color: #ff7a88;
  background: linear-gradient(135deg, #651d2a 0%, #822639 100%);
}

.status-option--maintenance {
  color: #e6f4ff;
  border-color: #69b8ff;
  background: linear-gradient(135deg, #153a62 0%, #1d4f80 100%);
}

#drawerNotes {
  width: 100%;
  min-height: clamp(52px, 8vh, 84px);
  max-height: none;
  resize: none;
  border: 1px solid #a8b2bf;
  border-radius: var(--ops-radius);
  padding: 0.52rem;
  font: inherit;
  color: var(--ops-text);
  background: #fdfefe;
}

.clear-notes-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 0;
  line-height: 1.1;
  border: 1px solid #d6c0c0;
  background: #fff4f4;
  color: #8f2d2d;
  border-radius: var(--ops-radius);
  padding: 0.3rem 0.6rem;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.clear-notes-button:hover {
  background: #ffeaea;
}

.drawer-footer {
  display: grid;
  gap: 0.38rem;
  align-content: start;
  justify-items: stretch;
  padding-top: 0.55rem;
  padding-bottom: calc(0.25rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid #ccd6e2;
  background: inherit;
}

.drawer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
}

.save-sidebar-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #7f96ad;
  background: #dce8f3;
  color: #243d57;
  border-radius: var(--ops-radius);
  padding: 0.32rem 0.72rem;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
}

.save-sidebar-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.save-sidebar-button:hover:not(:disabled) {
  background: #cfe0ee;
}

.drawer-meta {
  margin: 0;
  color: #6d8098;
  font-size: 0.88rem;
}

body {
  --ops-bg:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 18% 0%, rgba(31, 138, 112, 0.16) 0%, rgba(31, 138, 112, 0) 26%),
    radial-gradient(circle at 82% 12%, rgba(224, 169, 59, 0.1) 0%, rgba(224, 169, 59, 0) 22%),
    linear-gradient(180deg, #121b20 0%, #0e161a 100%);
  --ops-panel: linear-gradient(180deg, rgba(28, 38, 44, 0.98) 0%, rgba(17, 25, 29, 0.99) 100%);
  --ops-border: rgba(201, 214, 220, 0.18);
  --ops-text: #e8eeea;
  --ops-muted: #9fb0b6;
  --ops-blue: #f0c96a;
  --ops-shadow: 0 26px 52px rgba(4, 8, 10, 0.5);
  background-size: 32px 32px, 32px 32px, auto, auto, auto;
}

.equipment-card--pump {
  min-height: clamp(60px, 8vh, 92px);
  padding-top: 0.34rem;
  padding-bottom: 0.34rem;
}

body.mode-tv .equipment-card--pump {
  min-height: 44px;
  padding-top: 0.22rem;
  padding-bottom: 0.22rem;
}

.card,
.group,
.equipment-drawer {
  background: linear-gradient(180deg, rgba(28, 38, 44, 0.98) 0%, rgba(17, 25, 29, 0.99) 100%);
  border-color: rgba(201, 214, 220, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 24px 42px rgba(4, 8, 10, 0.42);
}

.ops-header {
  background:
    linear-gradient(135deg, rgba(32, 43, 49, 0.98) 0%, rgba(23, 32, 36, 0.99) 54%, rgba(17, 25, 29, 0.99) 100%);
  border-color: rgba(201, 214, 220, 0.2);
}

.header-qr {
  background: linear-gradient(180deg, rgba(45, 58, 64, 0.82) 0%, rgba(27, 39, 44, 0.72) 100%);
  border-color: rgba(224, 169, 59, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.header-qr-image {
  border-color: rgba(118, 151, 185, 0.82);
}

.header-qr-text {
  color: #edf5fd;
}

.group {
  background:
    linear-gradient(180deg, rgba(28, 38, 44, 0.98) 0%, rgba(17, 25, 29, 0.99) 100%);
  border-color: rgba(201, 214, 220, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 22px 38px rgba(0, 0, 0, 0.34);
}

.comments-board {
  background:
    linear-gradient(180deg, rgba(28, 38, 44, 0.98) 0%, rgba(17, 25, 29, 0.99) 100%);
  border-color: rgba(201, 214, 220, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 22px 38px rgba(0, 0, 0, 0.34);
}

.group-header {
  border-bottom-color: rgba(224, 169, 59, 0.2);
  background: transparent;
  padding: 0 0.05rem 0.55rem;
  margin: 0 0 0.7rem;
}

#operatorInput,
#drawerNotes,
#swYearSelect {
  background: #0c141e;
  color: #e6eef8;
  border-color: #49607a;
}

.drawer-sublabel {
  color: #afbfce;
}

.asset-log-summary::after {
  color: #9eb4cb;
}

.asset-log-empty {
  border-color: rgba(73, 96, 122, 0.8);
  background: rgba(12, 20, 30, 0.75);
  color: #9cb0c5;
}

.asset-log-item {
  border-color: rgba(73, 96, 122, 0.72);
  background: linear-gradient(180deg, rgba(14, 22, 33, 0.98) 0%, rgba(11, 18, 28, 0.98) 100%);
}

.asset-log-item-author {
  color: #dce9f7;
}

.asset-log-item-time {
  color: #8ea5be;
}

.asset-log-item-changes {
  color: #d0dfef;
}

.equipment-card {
  border-color: rgba(201, 214, 220, 0.14);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 16px 28px rgba(0, 0, 0, 0.28);
}

.equipment-card:hover {
  border-color: rgba(224, 169, 59, 0.3);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 22px 34px rgba(0, 0, 0, 0.34);
}

.equipment-name {
  color: #f6fbff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.22);
}

.card-chevron {
  color: #9eaec1;
}

.group-title {
  color: #f1f7ff;
}

.group-stats {
  color: #9fb5cb;
}

.comments-board-header {
  border-bottom-color: rgba(224, 169, 59, 0.22);
}

.comments-board-title {
  color: #eef5fd;
}

.comments-board-subtitle,
.comments-empty,
.comment-drawer-mode {
  color: #9cb0c5;
}

.comment-card-date {
  color: #aabed3;
}

.comments-form-input {
  background: linear-gradient(180deg, rgba(20, 30, 35, 0.98) 0%, rgba(14, 22, 27, 0.98) 100%);
  color: #edf4fb;
  border-color: rgba(201, 214, 220, 0.24);
}

.comments-empty {
  border-color: #45607b;
  background: rgba(10, 18, 27, 0.5);
}

.comment-card {
  border-color: rgba(201, 214, 220, 0.2);
  background: linear-gradient(180deg, rgba(24, 35, 40, 0.98) 0%, rgba(16, 24, 28, 0.98) 100%);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.38);
}

.comment-card-accent {
  background: linear-gradient(180deg, #e0a93b 0%, #b78327 48%, #74541a 100%);
}

.comment-card-author {
  color: #87a0b8;
}

.comment-card-message {
  color: #edf4fb;
}

.comment-card-date {
  color: #70869b;
}

.comment-card-meta {
  opacity: 0.66;
}

.comment-card-actions {
  opacity: 0.72;
}

.comment-icon-button {
  background: rgba(27, 39, 44, 0.4);
  border-color: rgba(201, 214, 220, 0.26);
  color: #b7c5cb;
}

.comment-icon-button:hover {
  background: rgba(56, 70, 76, 0.92);
  border-color: rgba(224, 169, 59, 0.38);
  color: #f3f0e5;
}

.comment-icon-button--danger {
  color: #ffb9c1;
}

.add-comment-button {
  background: linear-gradient(180deg, #c9972f 0%, #9f7420 100%);
  border-color: rgba(255, 226, 165, 0.34);
  color: #17130b;
}

.add-comment-button:hover {
  background: linear-gradient(180deg, #d3a33c 0%, #a97a23 100%);
}

.low-zone-title {
  color: #d1e2f4;
}

.hover-popup {
  background: linear-gradient(180deg, rgba(21, 31, 36, 0.98) 0%, rgba(15, 24, 28, 0.98) 100%);
  border-color: rgba(224, 169, 59, 0.56);
  box-shadow:
    0 0 0 1px rgba(117, 84, 26, 0.35),
    0 26px 44px rgba(0, 0, 0, 0.72),
    0 10px 20px rgba(0, 0, 0, 0.45);
}

.hover-popup-title {
  color: #dde6f0;
}

.hover-popup-note {
  color: #cad7e6;
}

.hover-popup-sw {
  color: #c9d8e8;
}

.sw-status {
  color: #d7e0e5;
  border-color: rgba(201, 214, 220, 0.26);
  background: #33424a;
  opacity: 0.92;
}

.sw-status.sw-status--complete {
  color: #d5efd9;
  border-color: #6f9e82;
  background: #36523f;
}

.sw-status.sw-status--incomplete {
  color: #ffe2b3;
  border-color: #9f8351;
  background: #5a4a31;
}

.hover-popup-meta,
.drawer-meta,
.last-updated {
  color: #8fa3b8;
}

.status-operational {
  background:
    linear-gradient(135deg, rgba(10, 66, 44, 0.98) 0%, rgba(16, 96, 66, 0.98) 100%);
  border-color: rgba(82, 223, 157, 0.14);
}

.status-operational .status-pill {
  background: rgba(6, 39, 24, 0.28);
  border-color: rgba(92, 255, 177, 0.68);
  color: #e7fff2;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.status-warning {
  background:
    linear-gradient(135deg, rgba(88, 63, 16, 0.98) 0%, rgba(122, 86, 22, 0.98) 100%);
  border-color: rgba(255, 206, 98, 0.14);
}

.status-warning .status-pill {
  background: rgba(52, 35, 7, 0.28);
  border-color: rgba(255, 213, 116, 0.7);
  color: #fff2d8;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.status-offline {
  background:
    linear-gradient(135deg, rgba(67, 80, 95, 0.98) 0%, rgba(86, 100, 116, 0.98) 100%);
  border-color: rgba(213, 225, 236, 0.08);
}

.status-offline .status-pill {
  background: rgba(28, 36, 45, 0.26);
  border-color: rgba(206, 218, 229, 0.72);
  color: #f1f6fc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.status-out-of-service {
  background:
    linear-gradient(135deg, rgba(91, 26, 39, 0.98) 0%, rgba(130, 38, 57, 0.98) 100%);
  border-color: rgba(255, 122, 146, 0.14);
}

.status-out-of-service .status-pill {
  background: rgba(57, 10, 18, 0.28);
  border-color: rgba(255, 143, 157, 0.72);
  color: #ffe4e8;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.status-maintenance {
  background:
    linear-gradient(135deg, rgba(17, 53, 90, 0.98) 0%, rgba(28, 84, 135, 0.98) 100%);
  border-color: rgba(115, 196, 255, 0.14);
}

.status-maintenance .status-pill {
  background: rgba(8, 25, 44, 0.26);
  border-color: rgba(124, 197, 255, 0.72);
  color: #e7f4ff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.status-option {
  background: linear-gradient(180deg, rgba(23, 33, 38, 0.98) 0%, rgba(16, 24, 28, 0.98) 100%);
  border-color: rgba(201, 214, 220, 0.32);
  color: #d9e4ef;
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.status-option--operational {
  color: #e6ffef;
  border-color: #49da93;
  background: linear-gradient(135deg, #0d3f2b 0%, #126042 100%);
}

.status-option--warning {
  color: #fff2d6;
  border-color: #ffcb52;
  background: linear-gradient(135deg, #5a3f11 0%, #7f5716 100%);
}

.status-option--offline {
  color: #f2f7fc;
  border-color: #b8c5d2;
  background: linear-gradient(135deg, #3a4652 0%, #53606d 100%);
}

.status-option--out-of-service {
  color: #ffe4e8;
  border-color: #ff8a97;
  background: linear-gradient(135deg, #611b28 0%, #822638 100%);
}

.status-option--maintenance {
  color: #e9f6ff;
  border-color: #7bc4ff;
  background: linear-gradient(135deg, #13355a 0%, #1b4f80 100%);
}

.status-option--operational.is-active {
  box-shadow: inset 0 0 0 2px #7ac4a0, 0 0 0 1px rgba(122, 196, 160, 0.32);
}

.status-option--warning.is-active {
  box-shadow: inset 0 0 0 2px #d6a95b, 0 0 0 1px rgba(214, 169, 91, 0.34);
}

.status-option--offline.is-active {
  box-shadow: inset 0 0 0 2px #b3c0ce, 0 0 0 1px rgba(179, 192, 206, 0.32);
}

.status-option--out-of-service.is-active {
  box-shadow: inset 0 0 0 2px #e58e99, 0 0 0 1px rgba(229, 142, 153, 0.34);
}

.status-option--maintenance.is-active {
  box-shadow: inset 0 0 0 2px #90b4de, 0 0 0 1px rgba(144, 180, 222, 0.34);
}


.drawer-close {
  background: linear-gradient(180deg, rgba(39, 52, 58, 0.96) 0%, rgba(26, 37, 42, 0.96) 100%);
  border-color: rgba(201, 214, 220, 0.3);
  color: #dfe7e3;
  border-radius: 12px;
}

.drawer-footer {
  border-top-color: rgba(90, 116, 141, 0.38);
}

.drawer-content > .drawer-section + .drawer-section {
  border-top-color: rgba(98, 124, 151, 0.5);
}

.clear-notes-button {
  background: #52363a;
  border-color: #8d666b;
  color: #ffd9dc;
}

.clear-notes-button:hover {
  background: #5a3b40;
}

.save-sidebar-button {
  background: linear-gradient(180deg, #c9972f 0%, #9f7420 100%);
  border-color: rgba(255, 226, 165, 0.34);
  color: #17130b;
}

.save-sidebar-button:hover:not(:disabled) {
  background: linear-gradient(180deg, #d3a33c 0%, #a97a23 100%);
}

.sync-dot {
  border-color: rgba(255, 255, 255, 0.28);
}

.equipment-card:focus-visible,
.status-option:focus-visible,
.drawer-close:focus-visible,
.save-sidebar-button:focus-visible,
.clear-notes-button:focus-visible,
.comment-icon-button:focus-visible,
.comments-form-input:focus-visible,
.add-comment-button:focus-visible {
  outline: 2px solid #e0a93b;
  outline-offset: 1px;
}

.equipment-card:focus-visible,
.status-option:focus-visible,
.drawer-close:focus-visible,
.save-sidebar-button:focus-visible,
.clear-notes-button:focus-visible,
.comment-icon-button:focus-visible,
.comments-form-input:focus-visible,
.add-comment-button:focus-visible {
  outline-color: #f0c96a;
}

@media (max-width: 900px) {
  body.mode-tv {
    overflow: auto;
  }

  body {
    overflow: auto;
  }

  .ops-page {
    width: min(1600px, 100% - 1rem);
    margin-top: 0.9rem;
    height: auto;
    grid-template-rows: auto;
  }

  body.mode-tv .ops-page {
    width: min(1600px, 100% - 1rem);
    height: auto;
    min-height: auto;
    grid-template-rows: auto;
    gap: 0.5rem;
  }

  .ops-header {
    grid-template-columns: 1fr;
    align-items: center;
    justify-items: center;
    text-align: center;
  }

  .header-qr {
    display: none;
  }

  .ops-brand {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 0.28rem;
    width: 100%;
  }

  .ops-titles {
    align-items: center;
    text-align: center;
  }

  .sync-row {
    justify-content: center;
  }

  .sync-row--title {
    justify-content: center;
    margin-top: 0.1rem;
  }

  .ops-logo {
    width: min(250px, 72vw);
    margin-inline: auto;
  }

  #operatorInput {
    width: 100%;
    max-width: 290px;
  }

  .equipment-layout {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .paired-groups-row {
    grid-template-columns: 1fr;
  }

  .paired-groups-row .card-grid {
    grid-template-columns: 1fr;
  }

  body.mode-tv .equipment-layout,
  body.mode-tv .comments-list {
    max-height: none;
    overflow: visible;
  }

  .comments-board {
    padding: 0.85rem;
  }

  body.mode-tv .comments-board {
    padding: 0.85rem;
    gap: 0.9rem;
  }

  .comments-board-header {
    display: grid;
    align-items: start;
  }

  .comments-board-subtitle {
    text-align: left;
  }

  .comments-board-actions {
    justify-content: stretch;
  }

  .add-comment-button {
    width: 100%;
  }

  .low-zone-layout {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

  .low-zone-section[data-partition="B"] {
    padding-right: 0;
    border-right: 0;
  }

  .low-zone-section[data-partition="A"] {
    padding-left: 0;
    margin-top: 0.15rem;
    padding-top: 0.45rem;
  }

  .status-options {
    grid-template-columns: 1fr;
  }

  .equipment-drawer {
    padding: 0.85rem 0.85rem calc(3.25rem + env(safe-area-inset-bottom, 0px));
    gap: 0.6rem;
  }

  .drawer-footer {
    padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
  }

  #drawerNotes {
    min-height: clamp(76px, 14vh, 120px);
  }

  .comment-card {
    grid-template-columns: 6px 1fr;
  }

  body.mode-tv .paired-groups-row {
    grid-template-columns: 1fr;
  }

  body.mode-tv .paired-groups-row .card-grid {
    grid-template-columns: 1fr;
  }

  body.mode-tv .comment-card-body {
    padding: 0.9rem 1rem 0.95rem;
    gap: 0.45rem;
  }

  body.mode-tv .equipment-card {
    min-height: 72px;
    padding: 0.42rem;
    gap: 0.24rem;
  }

  body.mode-tv .equipment-card--pump {
    min-height: 64px;
    padding-top: 0.34rem;
    padding-bottom: 0.34rem;
  }
}

@media (max-height: 860px) {
  .equipment-drawer {
    padding: 0.75rem 0.75rem calc(3rem + env(safe-area-inset-bottom, 0px));
    gap: 0.55rem;
  }

  .drawer-content {
    gap: 0.55rem;
  }

  .drawer-group {
    font-size: 0.72rem;
  }

  .drawer-label,
  .drawer-sublabel {
    font-size: 0.72rem;
  }

  .status-option {
    padding: 0.36rem 0.45rem;
    font-size: 0.78rem;
  }

  #drawerNotes {
    min-height: clamp(68px, 12vh, 100px);
    padding: 0.46rem;
  }

  .clear-notes-button,
  .save-sidebar-button {
    font-size: 0.74rem;
    padding-top: 0.28rem;
    padding-bottom: 0.28rem;
  }

  .drawer-meta {
    font-size: 0.8rem;
  }
}

@media (max-height: 700px) {
  .drawer-title {
    font-size: 1.1rem;
  }

  .status-options {
    gap: 0.3rem;
  }

  .drawer-content {
    gap: 0.45rem;
  }

  #drawerNotes {
    min-height: 56px;
  }

}

@media (min-width: 1600px) {
  .ops-page {
    width: calc(100% - 1.2rem);
    max-width: none;
    margin: 0.38rem auto;
  }

  .equipment-layout {
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 0.42rem;
  }

  .card-grid {
    grid-template-columns: repeat(auto-fit, minmax(126px, 1fr));
    gap: 0.24rem;
  }

  .equipment-card {
    min-height: clamp(64px, 7.4vh, 96px);
  }
}

