:root {
  color-scheme: light;
  --canvas: #f5f6f8;
  --surface: #fff;
  --raised: #eef1f5;
  --text: #182230;
  --secondary: #526071;
  --line: #d7dce2;
  --border: #7b8794;
  --action: #1d4ed8;
  --action-text: #fff;
  --alert: #b42318;
  --warning: #8a4b08;
  --ok: #146c43;
  --shadow: 0 16px 60px #14203422;
}
:root[data-theme="black"] {
  color-scheme: dark;
  --canvas: #000;
  --surface: #141414;
  --raised: #202020;
  --text: #f2f4f7;
  --secondary: #bbc3ce;
  --line: #383838;
  --border: #858585;
  --action: #8ab4ff;
  --action-text: #000;
  --alert: #ff8a80;
  --warning: #ffc46b;
  --ok: #71d6a0;
  --shadow: 0 16px 60px #0008;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", Arial, sans-serif;
  font-size: 14px;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 5px;
  min-height: 38px;
  padding: 8px 12px;
  white-space: nowrap;
}
button:hover {
  background: var(--raised);
  border-color: var(--action);
}
button:disabled {
  opacity: 0.55;
  cursor: default;
}
button.primary,
.segmented button.active {
  background: var(--action);
  color: var(--action-text);
  border-color: var(--action);
}
button.quiet {
  border-color: var(--line);
}
input,
select,
textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 8px 10px;
  min-height: 38px;
}
input[type="checkbox"] {
  accent-color: var(--action);
  min-height: 0;
  width: 19px;
  height: 19px;
  margin: 0;
}
textarea {
  resize: vertical;
  min-height: 60px;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.camera-card:focus-visible {
  outline: 3px solid var(--action);
  outline-offset: 2px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h2 {
  font-size: 18px;
  font-weight: 700;
}
h3 {
  font-size: 15px;
}
label {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
small,
.secondary {
  color: var(--secondary);
  font-size: 12px;
  line-height: 1.5;
}
[hidden] {
  display: none !important;
}
.app-shell {
  height: 100dvh;
  min-height: 640px;
  padding: 12px 20px 10px;
  display: flex;
  flex-direction: column;
}
.header {
  display: flex;
  align-items: center;
  gap: 34px;
  min-height: 40px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.brand {
  font-size: 24px;
  font-weight: 700;
  white-space: nowrap;
}
.brand span {
  margin: 0 12px;
}
.header nav,
.header-actions {
  display: flex;
  gap: 8px;
}
.header-actions {
  margin-left: auto;
}
.shortcut {
  font-size: 11px;
  margin-left: 4px;
}
.notice {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  background: var(--raised);
  color: var(--secondary);
  border-radius: 4px;
  padding: 7px 11px;
  min-height: 33px;
  font-size: 12px;
}
.notice-detail {
  margin-left: 6px;
}
.notice time {
  margin-left: auto;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.live-mark {
  width: 6px;
  height: 6px;
  background: var(--ok);
  border-radius: 50%;
  flex-shrink: 0;
}
.connection-banner {
  background: var(--surface);
  border: 1px solid var(--alert);
  color: var(--alert);
  padding: 8px 12px;
  margin-top: 6px;
  border-radius: 4px;
}
.status-strip {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 38px;
  font-size: 13px;
  flex-wrap: wrap;
  padding: 5px 0;
}
.status-strip i {
  height: 13px;
  width: 1px;
  background: var(--border);
}
.status-performance {
  margin-left: auto;
  color: var(--secondary);
  font-size: 12px;
}
.live-view {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}
.toolbar {
  display: flex;
  gap: 7px;
  align-items: center;
  margin-bottom: 6px;
}
.toolbar input {
  width: 220px;
}
.toolbar-spacer {
  flex: 1;
}
.workspace {
  display: flex;
  gap: 10px;
  min-height: 0;
  flex: 1;
}
.monitor-area {
  display: flex;
  flex: 1;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
}
.section-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  min-height: 44px;
  margin-bottom: 3px;
}
.pagination {
  display: flex;
  gap: 6px;
  margin-left: auto;
}
.pagination button {
  font-size: 12px;
}
.camera-grid {
  display: grid;
  gap: 10px;
  min-height: 0;
  flex: 1;
  grid-template-rows: repeat(4, minmax(0, 1fr));
}
.grid-16 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.grid-24 {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.camera-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  overflow: hidden;
  min-width: 0;
  min-height: 0;
  padding: 0;
  text-align: left;
  position: relative;
  white-space: normal;
}
.camera-card:hover {
  border-color: var(--action);
  background: var(--surface);
}
.camera-card.has-alert {
  border: 2px solid var(--alert);
}
.camera-media {
  background: #10171e;
  position: relative;
  overflow: hidden;
  min-height: 0;
  flex: 1;
  color: #f3f4f7;
}
.camera-media img,
.camera-media > svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.camera-media img:not([src]) {
  visibility: hidden;
}
.camera-media > svg {
  pointer-events: none;
}
.video-tag {
  position: absolute;
  top: 6px;
  left: 7px;
  z-index: 2;
  background: #071019c9;
  color: #f4f7fc;
  padding: 4px 7px;
  font-size: 10px;
  line-height: 1.2;
  border-radius: 1px;
}
.video-tag.live:before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #69d19a;
  margin-right: 5px;
  vertical-align: 1px;
}
.video-shade {
  position: absolute;
  inset: 0;
  background: #05090dc2;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  text-align: center;
  padding: 10px;
  z-index: 1;
}
.video-shade strong {
  font-size: 15px;
}
.video-shade span {
  font-size: 10px;
  color: #d3dbe6;
}
.camera-info {
  padding: 7px 9px 8px;
  min-height: 53px;
  flex-shrink: 0;
}
.camera-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.camera-title {
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.camera-event-count {
  margin-left: auto;
  font-size: 11px;
  color: var(--alert);
  white-space: nowrap;
}
.camera-sub-row {
  margin-top: 4px;
  display: flex;
  gap: 6px;
  font-size: 11px;
  color: var(--secondary);
  white-space: nowrap;
  overflow: hidden;
}
.camera-sub-row .mapping-note {
  margin-left: auto;
  font-size: 10px;
  opacity: 0.85;
}
.tone-alert {
  color: var(--alert) !important;
}
.tone-warning {
  color: var(--warning) !important;
}
.tone-ok {
  color: var(--ok) !important;
}
.monitor-hint {
  font-size: 12px;
  line-height: 20px;
  padding-top: 8px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}
.monitor-hint span {
  color: var(--secondary);
  font-size: 11px;
  white-space: nowrap;
}
.alert-panel {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  width: 320px;
  flex-shrink: 0;
  padding: 10px;
  gap: 7px;
  min-height: 0;
}
.alert-panel h2 {
  line-height: 1.45;
}
.alert-panel > .secondary {
  font-size: 11px;
}
.sound-control {
  flex-direction: row;
  align-items: center;
  padding: 6px;
  background: var(--canvas);
  font-size: 13px;
}
.segmented {
  display: flex;
  gap: 0;
}
.segmented button {
  flex: 1;
  padding: 6px 8px;
  font-size: 12px;
  min-height: 32px;
  border-radius: 0;
  border-color: var(--line);
}
.segmented button:first-child {
  border-radius: 4px 0 0 4px;
}
.segmented button:last-child {
  border-radius: 0 4px 4px 0;
}
.alert-list {
  border: 1px solid var(--line);
  flex: 1;
  min-height: 100px;
  overflow-y: auto;
}
.alert-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 12px 10px;
  white-space: normal;
  line-height: 1.65;
  min-height: 70px;
}
.alert-item.selected {
  background: var(--raised);
  box-shadow: inset 3px 0 var(--action);
}
.alert-item-title {
  font-size: 13px;
  display: flex;
  gap: 6px;
  align-items: center;
}
.alert-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--alert);
  display: inline-block;
  flex-shrink: 0;
}
.alert-item-meta {
  font-size: 11px;
  color: var(--secondary);
  margin-top: 2px;
}
.alert-item-status {
  font-size: 11px;
  color: var(--warning);
}
.alert-empty {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: center;
  padding: 38px 15px;
  color: var(--secondary);
  font-size: 12px;
}
.alert-empty strong {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
}
.selected-event {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 10px 0 3px;
  border-top: 1px solid var(--line);
}
.selected-event button {
  width: 100%;
}
.alert-footnote {
  font-size: 11px;
  color: var(--secondary);
  line-height: 1.55;
}
.empty-state {
  flex: 1;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--secondary);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 5px;
}
.empty-state strong {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}
#focus-back {
  margin-left: auto;
}
.focus-view {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
}
.focus-media {
  min-height: 220px;
}
.focus-summary {
  padding: 13px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.focus-summary h3 {
  font-size: 19px;
  margin-bottom: 5px;
}
.focus-summary p {
  line-height: 1.55;
}
.position-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 12px;
  max-height: 150px;
  overflow: auto;
}
.position-chip {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 8px 10px;
  min-width: 180px;
  flex: 1;
}
.position-chip strong {
  font-size: 13px;
}
.position-chip p {
  font-size: 11px;
  color: var(--secondary);
  margin-top: 4px;
}
.history-view {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
  padding-top: 8px;
}
.history-view .section-bar {
  margin-bottom: 10px;
  justify-content: space-between;
}
.history-filters {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  background: var(--surface);
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 5px;
  margin-bottom: 14px;
}
.history-filters label {
  font-size: 12px;
  min-width: 160px;
}
.history-filters > span {
  align-self: center;
  margin-left: auto;
}
.history-table-wrap {
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 5px;
  flex: 1;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}
th,
td {
  padding: 12px 15px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}
th {
  background: var(--raised);
  color: var(--secondary);
  font-weight: 500;
  position: sticky;
  top: 0;
}
td:nth-child(5) {
  max-width: 260px;
  overflow-wrap: anywhere;
}
td button {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 12px;
}
.history-table-wrap .empty-state {
  border: 0;
}
.login-shell {
  display: grid;
  min-height: 100dvh;
  place-items: center;
  padding: 24px;
}
.login-card {
  width: 410px;
  max-width: 100%;
  padding: 38px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.login-card h1 {
  font-size: 27px;
  margin-top: 4px;
}
.login-card > .secondary {
  margin-bottom: 12px;
}
.login-card label {
  font-size: 13px;
}
.login-card input {
  height: 43px;
}
.login-card small {
  text-align: center;
  margin-top: 7px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  font-weight: 700;
  color: var(--secondary);
}
.error-text {
  font-size: 12px;
  color: var(--alert);
  line-height: 1.5;
  min-height: 0;
}
.error-text:empty {
  display: none;
}
.boot {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 18px;
  min-height: 100dvh;
  color: var(--secondary);
}
.spinner {
  display: block;
  width: 26px;
  height: 26px;
  border: 2px solid var(--line);
  border-top-color: var(--action);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
dialog {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  width: 920px;
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 32px);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}
dialog::backdrop {
  background: #0a142a80;
}
.settings-form {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dialog-heading h2 {
  font-size: 22px;
  margin-top: 5px;
}
.dialog-heading button {
  border-color: var(--line);
}
.settings-intro {
  max-width: 740px;
}
.threshold-settings {
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 12px 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 25px;
  margin: 0;
}
.threshold-settings legend {
  padding: 0 5px;
  font-size: 13px;
  font-weight: 600;
}
.threshold-settings label {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.threshold-settings input {
  width: 90px;
}
.threshold-settings p {
  width: 100%;
  font-size: 11px;
}
.channel-settings {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 12px;
}
.channel-settings label {
  font-size: 12px;
}
.roi-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 3px;
}
.roi-heading button {
  min-height: 32px;
  font-size: 12px;
  padding: 6px 10px;
}
.roi-editor {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 12px;
  align-items: start;
}
.roi-preview {
  position: relative;
  aspect-ratio: 16/9;
  background: #10171e;
  overflow: hidden;
  border-radius: 4px;
  touch-action: none;
  user-select: none;
}
.roi-preview img,
.roi-preview svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.roi-preview img:not([src]) {
  visibility: hidden;
}
.roi-preview svg {
  cursor: crosshair;
}
.roi-controls {
  max-height: 260px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.roi-row {
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 9px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.roi-row.active {
  border-color: var(--action);
  box-shadow: inset 0 0 0 1px var(--action);
}
.roi-row-head {
  display: flex;
  gap: 6px;
}
.roi-row-head input {
  min-width: 0;
  width: 100%;
  font-size: 12px;
  padding: 6px;
  min-height: 32px;
}
.roi-row-head button {
  min-height: 32px;
  padding: 5px 8px;
  font-size: 12px;
}
.roi-coordinate-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}
.roi-coordinate-row label {
  font-size: 10px;
  color: var(--secondary);
  gap: 3px;
}
.roi-coordinate-row input {
  width: 100%;
  min-width: 0;
  font-size: 11px;
  padding: 5px;
  min-height: 29px;
}
.roi-empty {
  border: 1px dashed var(--line);
  padding: 24px 14px;
  color: var(--secondary);
  font-size: 12px;
  line-height: 1.7;
  border-radius: 5px;
}
.dialog-footer {
  border-top: 1px solid var(--line);
  padding-top: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dialog-footer > span {
  margin-right: auto;
  font-size: 11px;
  max-width: 340px;
}
.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  max-width: calc(100vw - 32px);
  display: flex;
  align-items: center;
  gap: 14px;
  border-radius: 6px;
  padding: 12px 14px;
  background: var(--text);
  color: var(--surface);
  box-shadow: var(--shadow);
  font-size: 13px;
}
.toast button {
  border-color: currentColor;
  background: transparent;
  color: inherit;
  min-height: 30px;
  padding: 5px 8px;
  font-size: 12px;
}
.toast.error {
  background: var(--alert);
  color: var(--surface);
}
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.panel-collapsed .alert-panel {
  display: none;
}
@media (min-width: 1700px) {
  .alert-panel {
    width: 320px;
  }
  .camera-title {
    font-size: 16px;
  }
  .camera-info {
    padding: 8px 9px;
    min-height: 57px;
  }
  .camera-sub-row {
    font-size: 12px;
  }
  .grid-24 .camera-title {
    font-size: 14px;
  }
  .grid-24 .camera-sub-row {
    font-size: 11px;
  }
}
@media (max-width: 1450px) {
  .app-shell {
    padding: 10px 12px 8px;
  }
  .header {
    gap: 20px;
  }
  .brand {
    font-size: 21px;
  }
  .brand span {
    margin: 0 8px;
  }
  .header button {
    font-size: 12px;
    min-height: 36px;
    padding: 7px 10px;
  }
  .alert-panel {
    width: 280px;
  }
  .notice-detail {
    display: none;
  }
  .status-strip {
    gap: 16px;
  }
  .camera-grid {
    gap: 8px;
  }
  .camera-info {
    padding: 6px 7px;
    min-height: 50px;
  }
  .camera-title {
    font-size: 13px;
  }
  .camera-sub-row {
    font-size: 10px;
  }
  .camera-sub-row .mapping-note {
    display: none;
  }
  .grid-24 .camera-title {
    font-size: 12px;
  }
  .grid-24 .video-tag {
    font-size: 9px;
    padding: 3px 4px;
  }
  .section-bar h2 {
    font-size: 16px;
  }
  .monitor-hint {
    font-size: 11px;
  }
  .monitor-hint span {
    font-size: 10px;
  }
  .alert-panel h2 {
    font-size: 17px;
  }
  .notice time {
    font-size: 11px;
  }
}
@media (max-width: 1000px) {
  .app-shell {
    height: auto;
    min-height: 100dvh;
  }
  .header {
    gap: 10px;
    row-gap: 10px;
  }
  .header-actions {
    gap: 5px;
  }
  .header-actions .shortcut {
    display: none;
  }
  .brand {
    font-size: 19px;
  }
  .toolbar {
    flex-wrap: wrap;
  }
  .status-performance {
    display: none;
  }
  .workspace {
    align-items: stretch;
  }
  .camera-grid {
    grid-template-rows: repeat(4, minmax(125px, 1fr));
    min-height: 600px;
  }
  .grid-24 {
    grid-template-rows: repeat(6, minmax(125px, 1fr));
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .alert-panel {
    width: 240px;
    max-height: 850px;
  }
  .camera-sub-row {
    display: block;
  }
  .camera-event-count {
    font-size: 9px;
  }
  .pagination button {
    padding: 6px;
    font-size: 11px;
  }
  .notice {
    flex-wrap: wrap;
  }
  .monitor-hint span {
    display: none;
  }
  .focus-media {
    height: 55vh;
    flex: auto;
  }
  .focus-view {
    flex: auto;
  }
  .history-table-wrap {
    max-height: 75vh;
  }
}
@media (max-width: 720px) {
  .header {
    gap: 12px;
  }
  .header-actions {
    margin-left: 0;
  }
  .header nav {
    margin-left: auto;
  }
  .brand {
    font-size: 17px;
  }
  .brand span {
    margin: 0 3px;
  }
  .header-actions button {
    min-height: 30px;
    padding: 5px 9px;
  }
  .notice {
    font-size: 11px;
  }
  .notice time {
    display: none;
  }
  .status-strip {
    gap: 10px;
    font-size: 11px;
  }
  .status-strip i {
    height: 10px;
  }
  .toolbar input {
    width: 165px;
    flex: 1;
  }
  .toolbar-spacer {
    display: none;
  }
  .toolbar button,
  .toolbar select {
    font-size: 11px;
  }
  .workspace {
    flex-direction: column;
  }
  .camera-grid,
  .grid-24 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    grid-auto-rows: 160px;
    min-height: 0;
    flex: auto;
  }
  .camera-card {
    min-height: 160px;
  }
  .alert-panel {
    width: 100%;
    height: 420px;
    max-height: none;
  }
  .section-bar {
    flex-wrap: wrap;
    padding: 5px 0;
  }
  .section-bar h2 {
    font-size: 14px;
  }
  .pagination {
    margin-left: auto;
  }
  .monitor-hint {
    margin-bottom: 6px;
  }
  .camera-title {
    font-size: 14px;
  }
  .camera-sub-row {
    font-size: 11px;
  }
  .camera-sub-row .mapping-note {
    display: block;
  }
  .camera-sub-row {
    display: flex;
  }
  .history-filters {
    flex-wrap: wrap;
    padding: 12px;
    gap: 10px;
  }
  .history-filters label {
    min-width: 120px;
    flex: 1;
  }
  .history-filters > span {
    margin-left: 0;
  }
  .history-view .section-bar {
    align-items: start;
    gap: 5px;
    flex-direction: column;
  }
  .history-table-wrap table {
    min-width: 760px;
  }
  .settings-form {
    padding: 17px;
    gap: 12px;
  }
  .roi-editor {
    grid-template-columns: 1fr;
  }
  .roi-controls {
    max-height: 220px;
  }
  .dialog-footer {
    flex-wrap: wrap;
  }
  .dialog-footer > span {
    width: 100%;
    max-width: none;
  }
  .dialog-footer button:first-of-type {
    margin-left: auto;
  }
  .channel-settings {
    grid-template-columns: 1fr 1.4fr;
  }
  .toast {
    bottom: 12px;
    width: calc(100vw - 24px);
    gap: 8px;
  }
  .focus-summary {
    padding: 10px;
  }
  .position-list {
    padding: 0 10px 10px;
  }
  .focus-summary h3 {
    font-size: 17px;
  }
}
