:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --primary: #2563eb;
  --secondary: #64748b;
  --danger: #dc2626;
  --border: #dbe3f0;
  --accent: #eff6ff;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}
.page {
  max-width: 980px;
  margin: 0 auto;
  padding: 32px 16px 56px;
}
.hero {
  margin-bottom: 20px;
}
h1, h2, h3, p { margin-top: 0; }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 18px;
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.05);
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.advanced-grid {
  margin-top: 12px;
}
label span {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
  color: var(--muted);
}
label.full { grid-column: 1 / -1; }
.checkbox-field {
  display: flex;
  align-items: center;
  gap: 10px;
}
.checkbox-field input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  flex: 0 0 auto;
}
.checkbox-field span {
  margin-bottom: 0;
}
input, select, textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: 11px 12px;
  font-size: 14px;
  font-family: inherit;
  box-sizing: border-box;
}
button {
  width: auto;
  max-width: 100%;
  border-radius: 10px;
  border: 1px solid transparent;
  padding: 11px 12px;
  font-size: 14px;
  font-family: inherit;
  box-sizing: border-box;
}
textarea {
  resize: vertical;
  min-height: 120px;
}
button {
  background: var(--primary);
  color: white;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  min-width: 0;
  flex: 0 1 auto;
}
button.secondary { background: var(--secondary); }
button.danger { background: var(--danger); }
button.action-primary {
  background: var(--primary);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.22);
}
button.action-secondary {
  background: #eef2f7;
  color: #334155;
  border: 1px solid #d6deea;
}
button.action-secondary:hover {
  background: #e5ebf4;
}
button.small {
  width: auto;
  min-width: 110px;
}
.actions { margin-top: 14px; }
.list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
}
.list { display: grid; gap: 10px; }
.watcher {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 46px;
  display: block;
  background: #fff;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.watcher:hover {
  border-color: #c6d4e7;
}
.watcher.is-expanded {
  border-color: #b9cceb;
  box-shadow: 0 8px 24px rgba(30, 64, 175, 0.08);
}
.watcher.is-dragging {
  opacity: 0.48;
  border-color: #3b82f6;
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.2);
}
.watcher.is-drag-over {
  border-color: #2563eb;
}
.watcher.is-drag-over::before {
  content: '';
  position: absolute;
  z-index: 2;
  left: 7px;
  right: 7px;
  top: -6px;
  height: 3px;
  border-radius: 999px;
  background: #2563eb;
}
.watcher-drag-handle {
  position: absolute;
  left: 9px;
  top: 50%;
  display: grid;
  place-items: center;
  width: 28px;
  height: 34px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: #64748b;
  cursor: grab;
  transform: translateY(-50%);
  touch-action: none;
  user-select: none;
}
.watcher.is-expanded .watcher-drag-handle {
  top: 10px;
  transform: none;
}
.watcher-drag-handle:active {
  cursor: grabbing;
}
body.is-reordering-watchers,
body.is-reordering-watchers * {
  cursor: grabbing !important;
  user-select: none !important;
}
.watcher-drag-handle:hover,
.watcher-drag-handle:focus-visible {
  border-color: #93b4e6;
  outline: none;
  background: #eff6ff;
  color: #2563eb;
}
.watcher-drag-handle span,
.watcher-drag-handle span::before,
.watcher-drag-handle span::after {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 7px 0 0 currentColor;
}
.watcher-drag-handle span {
  position: relative;
}
.watcher-drag-handle span::before,
.watcher-drag-handle span::after {
  content: '';
  position: absolute;
  left: 0;
}
.watcher-drag-handle span::before {
  top: -7px;
}
.watcher-drag-handle span::after {
  top: 7px;
}
.watcher-summary {
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr) minmax(0, 2.3fr);
  gap: 10px;
  align-items: stretch;
  min-width: 0;
}
.watcher-summary-identity {
  min-width: 0;
  padding: 3px 10px 3px 0;
  border-right: 1px solid #e2e8f0;
}
.watcher-summary-identity > span,
.watcher-summary-identity p > span,
.watcher-summary-room-name span,
.watcher-summary-price span,
.watcher-summary-low span {
  display: block;
  color: #718096;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.25;
}
.watcher-summary-identity h3 {
  margin: 2px 0 5px;
  color: #172033;
  font-size: 19px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.watcher-summary-identity p {
  margin: 0;
  min-width: 0;
}
.watcher-summary-identity p strong {
  display: block;
  margin-top: 1px;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.watcher-summary-rooms {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}
.watcher-summary-room {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid #dbe7f6;
  border-radius: 9px;
  background: #f8fbff;
}
.watcher-summary-room.is-unconfigured {
  border-style: dashed;
  background: #f8fafc;
}
.watcher-summary-room-name {
  min-width: 0;
}
.watcher-summary-room-name strong {
  display: block;
  margin-top: 3px;
  color: #273449;
  font-size: 13px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.watcher-summary-price,
.watcher-summary-low {
  min-width: 64px;
  text-align: right;
}
.watcher-summary-price strong,
.watcher-summary-low strong {
  display: block;
  margin-top: 3px;
  white-space: nowrap;
}
.watcher-summary-price strong {
  color: #1d4ed8;
  font-size: 17px;
  line-height: 1.15;
}
.watcher-summary-price strong.is-unavailable {
  color: #b45309;
  font-size: 13px;
}
.watcher-summary-low strong {
  color: #334155;
  font-size: 13px;
  line-height: 1.2;
}
.watcher-expanded-content {
  display: none;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid #e2e8f0;
}
.watcher.is-expanded .watcher-expanded-content {
  display: block;
}
.watcher-expanded-source {
  margin-bottom: 5px;
  color: #64748b;
  font-size: 12px;
}
.watcher-fold-toggle {
  position: absolute;
  right: 9px;
  bottom: 8px;
  width: 28px;
  height: 28px;
  min-width: 28px;
  padding: 0;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
  box-shadow: none;
}
.watcher-fold-toggle:hover {
  border-color: #93b4e6;
  background: #eff6ff;
}
.list-control-button {
  padding: 8px 11px;
  font-size: 13px;
}
.watcher-fold-chevron {
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 160ms ease, margin 160ms ease;
}
.watcher.is-expanded .watcher-fold-chevron {
  margin-top: 4px;
  transform: rotate(225deg);
}
.watcher-actions {
  min-width: 160px;
  display: grid;
  gap: 10px;
}
.watcher-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 9px;
  min-width: 0;
  align-items: center;
}
.watcher-toolbar button {
  min-width: 88px;
  padding: 8px 10px;
  font-size: 13px;
}
.watcher-toolbar button[data-action="delete"] {
  margin-left: auto;
}
.inline-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}
.inline-actions > * {
  min-width: 0;
}
.advanced {
  margin-top: 16px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 12px;
  background: #fafcff;
}
.advanced summary {
  cursor: pointer;
  color: var(--secondary);
  font-size: 14px;
}
.hint, .empty {
  color: var(--muted);
}
.field-hint {
  display: block;
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}
.field-hint.success {
  color: #15803d;
}
.field-hint.error {
  color: #dc2626;
}
.notify-extra-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}
@media (max-width: 720px) {
  .hero { flex-direction: column; align-items: flex-start; }
  .grid { grid-template-columns: 1fr; }
  .watcher { flex-direction: column; }
  .watcher-actions { min-width: auto; }
  .inline-actions { flex-direction: column; }
  .notify-extra-grid { grid-template-columns: 1fr; }
  button.small { width: 100%; }
  .watcher-toolbar button[data-action="delete"] { margin-left: 0; }
  .watcher-summary {
    grid-template-columns: 1fr;
  }
  .watcher-summary-identity {
    padding-right: 0;
    padding-bottom: 7px;
    border-right: 0;
    border-bottom: 1px solid #e2e8f0;
  }
  .watcher-summary-rooms {
    grid-template-columns: 1fr;
  }
  .watcher-top { flex-direction: column; }
  .watcher-price-hero {
    width: 100%;
    min-width: 0;
    text-align: left;
  }
  .watcher-stats { grid-template-columns: 1fr 1fr; }
  .room-monitor-grid { grid-template-columns: 1fr; }
  .room-monitor-head { flex-direction: column; }
  .room-price-box {
    width: 100%;
    min-width: 0;
    text-align: left;
  }
}


.watcher-main {
  flex: 1;
}
.watcher-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.watcher-title-block {
  min-width: 0;
}
.watcher-title-block h3 {
  margin-bottom: 5px;
  font-size: 24px;
  line-height: 1.2;
}
.watcher-price-hero {
  min-width: 220px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid #bfdbfe;
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  text-align: right;
}
.watcher-price-label {
  display: block;
  font-size: 12px;
  color: #1d4ed8;
  margin-bottom: 6px;
}
.watcher-price-value {
  display: block;
  font-size: 28px;
  line-height: 1.1;
  color: #1e3a8a;
}
.watcher-price-value.is-unavailable {
  color: #b45309;
  font-size: 24px;
}
.watcher-price-subtitle {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: #1d4ed8;
}
.room-monitor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 10px;
}
.room-monitor-card {
  min-width: 0;
  padding: 10px;
  border: 1px solid #cbdcf5;
  border-radius: 11px;
  background: #fbfdff;
}
.room-monitor-card.is-unconfigured {
  border-style: dashed;
  background: #f8fafc;
}
.room-monitor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}
.room-monitor-title {
  min-width: 0;
}
.room-slot-label {
  display: block;
  margin-bottom: 5px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}
.room-monitor-title h4,
.room-monitor-card h4 {
  margin: 0;
  color: #1e293b;
  font-size: 15px;
  line-height: 1.4;
}
.room-price-box {
  min-width: 132px;
  padding: 7px 9px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: #eff6ff;
  text-align: right;
}
.room-price-box span,
.room-price-box small {
  display: block;
  color: #475569;
  font-size: 11px;
  line-height: 1.4;
}
.room-price-box strong {
  display: block;
  margin: 4px 0;
  color: #1d4ed8;
  font-size: 20px;
  line-height: 1.15;
}
.room-price-box strong.is-unavailable {
  color: #b45309;
  font-size: 18px;
}
.room-error {
  margin-bottom: 10px;
  color: #b91c1c;
  font-size: 13px;
  line-height: 1.5;
}
.room-monitor-card .chart-wrap {
  padding: 7px 7px 5px;
}
.room-monitor-card .sparkline {
  min-height: 120px;
}
.trend-toolbar-label {
  align-self: center;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}
.watcher-stat-value.compact-value {
  font-size: 15px;
}
.inline-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0 5px;
}
.trend-block {
  margin-top: 7px;
}
.trend-block-top {
  margin-top: 0;
  margin-bottom: 16px;
}
.trend-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 5px;
}
.trend-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 5px;
}
.trend-chip {
  padding: 6px 10px;
  font-size: 12px;
  background: #e2e8f0;
  color: #334155;
}
.trend-chip.is-active {
  background: #2563eb;
  color: #fff;
}
.trend-title {
  margin-bottom: 0;
}
.trend-low {
  font-size: 13px;
  color: #92400e;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  padding: 4px 10px;
}
.trend-low strong {
  color: #c2410c;
}
.trend-low span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: #9a3412;
}
.chart-wrap {
  position: relative;
  width: 100%;
  max-width: 100%;
  padding: 8px 10px 6px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fcfdff;
  overflow: visible;
}
.chart-caption {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}
.chart-note {
  margin-bottom: 8px;
  font-size: 12px;
  color: #475569;
}
.chart-legend {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 3px;
  font-size: 12px;
  color: #64748b;
}
.legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  margin-right: 4px;
}
.trend-line-dot { background: #2563eb; }
.trend-drop-dot { background: #16a34a; }
.trend-low-dot { background: #dc2626; }
.trend-notify-dot { background: #f59e0b; }
.chart-tooltip {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 3;
  min-height: 18px;
  max-width: min(280px, calc(100% - 16px));
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.94);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
  font-size: 12px;
  color: #f8fafc;
  font-weight: 600;
  pointer-events: none;
  white-space: nowrap;
}
.chart-tooltip[hidden] {
  visibility: hidden;
  display: block;
}
.spark-low-ring {
  fill: rgba(220, 38, 38, 0.12);
  stroke: #dc2626;
  stroke-width: 1.8;
}
.spark-hotspot {
  cursor: pointer;
}
.sparkline {
  width: 100%;
  height: auto;
  aspect-ratio: 640 / 240;
  min-height: 120px;
  display: block;
}
.spark-empty {
  color: var(--muted);
  font-size: 12px;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.countdown-text {
  color: var(--primary);
  font-weight: 600;
}
.watcher-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 9px;
}
.watcher-stat {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fbff;
}
.watcher-stat-label {
  display: block;
  margin-bottom: 3px;
  font-size: 12px;
  color: var(--muted);
}
.watcher-stat-value {
  display: block;
  font-size: 15px;
  line-height: 1.35;
  color: var(--text);
}
.watcher-stat-value.is-success {
  color: #15803d;
}
.watcher-stat-value.is-danger {
  color: #dc2626;
}
.watcher-meta-lines {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}


button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}
button.is-loading {
  position: relative;
}
button.is-loading::after {
  content: '';
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255,255,255,0.45);
  border-top-color: white;
  border-radius: 50%;
  display: inline-block;
  margin-left: 8px;
  vertical-align: -2px;
  animation: spin 0.8s linear infinite;
}
.actions-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
}
.actions-row > button {
  flex: 0 1 auto;
}
.inline-actions.compact {
  align-items: center;
}
.status-text {
  min-height: 20px;
  font-size: 13px;
  color: var(--muted);
  white-space: pre-wrap;
  line-height: 1.45;
}
.status-text.success {
  color: #15803d;
}
.status-text.error {
  color: var(--danger);
}
@keyframes spin {
  to { transform: rotate(360deg); }
}


.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9999;
  max-width: 360px;
  padding: 12px 14px;
  border-radius: 12px;
  color: white;
  background: #0f172a;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.25);
  white-space: pre-wrap;
  line-height: 1.45;
}
.toast.success {
  background: #15803d;
}
.toast.error {
  background: #b91c1c;
}

.debug-panel {
  border: 1px solid #fecaca;
  background: #fff7f7;
}

.debug-output {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  overflow: auto;
  max-height: 360px;
  font-size: 12px;
  line-height: 1.5;
}

.session-panel {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fafcff;
}
.session-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}
.wrap-actions {
  flex-wrap: wrap;
}

.hero, .card, .watcher, .list, .grid {
  min-width: 0;
}

.env-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 2px solid #f59e0b;
  border-radius: 14px;
  background: linear-gradient(90deg, #fff7ed 0%, #fef3c7 100%);
  color: #9a3412;
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.12);
}

.env-banner strong {
  font-size: 15px;
}

.env-banner span {
  font-size: 13px;
  font-weight: 600;
}


.watcher-skeleton {
  pointer-events: none;
}
.skeleton-line,
.skeleton-pill,
.skeleton-btn,
.skeleton-chart {
  background: linear-gradient(90deg, #e5e7eb 25%, #f8fafc 37%, #e5e7eb 63%);
  background-size: 400% 100%;
  animation: skeleton-shimmer 1.4s ease infinite;
}
.skeleton-line {
  height: 14px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.skeleton-title {
  height: 20px;
  width: min(320px, 72%);
}
.skeleton-text {
  width: 92%;
}
.skeleton-text.short {
  width: 58%;
}
.skeleton-tags,
.skeleton-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.skeleton-pill {
  width: 86px;
  height: 28px;
  border-radius: 999px;
}
.skeleton-pill.short {
  width: 62px;
}
.skeleton-chart {
  margin-top: 14px;
  height: 132px;
  width: 100%;
  border-radius: 12px;
}
.skeleton-btn {
  width: 108px;
  max-width: 100%;
  height: 42px;
  border-radius: 10px;
}
#watcher-list {
  min-height: 280px;
}
#meta,
#build-info {
  min-height: 20px;
}
@keyframes skeleton-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}


.boot-card {
  position: relative;
  overflow: clip;
}
#settings-card {
  min-height: 220px;
}
#watchers-card {
  min-height: 420px;
}
#settings-card.is-booting::after,
#watchers-card.is-booting::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(229,231,235,0) 0%, rgba(248,250,252,0.55) 50%, rgba(229,231,235,0) 100%);
  background-size: 200% 100%;
  animation: boot-shimmer 1.5s ease-in-out infinite;
}
#settings-card.is-booting .session-panel,
#settings-card.is-booting .page-actions,
#watchers-card.is-booting .list-head,
#watchers-card.is-booting #meta,
#watchers-card.is-booting #build-info {
  opacity: 0.96;
}
#settings-card.is-booting .status-text,
#watchers-card.is-booting .status-text {
  min-width: 120px;
}
#settings-card.is-booting button,
#watchers-card.is-booting button {
  opacity: 0.72;
}
@keyframes boot-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@media (max-width: 720px) {
  #settings-card {
    min-height: 260px;
  }
  #watchers-card {
    min-height: 520px;
  }
}

.page-actions {
  align-items: flex-start;
  gap: 16px;
}

.page-actions-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.primary-cta {
  min-width: 132px;
  min-height: 52px;
  font-size: 18px;
  font-weight: 700;
  padding: 14px 20px;
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.22);
}

.session-panel-compact {
  margin-top: 18px;
}

.session-summary-card {
  width: 100%;
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #fbfdff 0%, #f8fbff 100%);
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  box-shadow: none;
}

.session-summary-card:hover {
  border-color: #bfd3f6;
  background: #f7fbff;
}

.session-summary-card[data-tone="success"] .session-summary-state {
  color: #15803d;
}

.session-summary-card[data-tone="warning"] .session-summary-state {
  color: #b45309;
}

.session-summary-card[data-tone="danger"] .session-summary-state {
  color: #dc2626;
}

.session-summary-label {
  font-size: 13px;
  color: var(--muted);
}

.session-summary-state {
  font-size: 20px;
  line-height: 1.2;
}

.session-summary-text {
  font-size: 14px;
  color: var(--muted);
  text-align: left;
}

body.modal-open {
  overflow: hidden;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(15, 23, 42, 0.52);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-shell {
  width: min(100%, 920px);
  max-height: calc(100vh - 48px);
}

.modal-shell-narrow {
  width: min(100%, 680px);
}

.modal-card {
  max-height: calc(100vh - 48px);
  overflow: auto;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
}

.modal-head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
  padding-bottom: 12px;
  margin-bottom: 8px;
}

.modal-close {
  flex-shrink: 0;
}

.session-status-block {
  display: block;
  margin-top: 14px;
  min-height: 24px;
}

@media (max-width: 720px) {
  .page-actions-right {
    width: 100%;
    align-items: stretch;
  }

  .primary-cta {
    width: 100%;
  }

  .modal-backdrop {
    padding: 12px;
    align-items: flex-end;
  }

  .modal-shell,
  .modal-card {
    max-height: calc(100vh - 24px);
  }

  .modal-head {
    align-items: flex-start;
  }
}
