/* Product-level visual layer for the independent 守望系统 pages.
   Keep the behaviour and control IDs in the existing sheets; this file only
   establishes hierarchy, readable type and responsive interaction targets. */
:root {
  --watch-ink: #eef7f1;
  --watch-muted: #a9c0b5;
  --watch-faint: #819990;
  --watch-panel: #172720;
  --watch-panel-strong: #1d3028;
  --watch-line: #355347;
  --watch-accent: #9be0b1;
  --watch-accent-strong: #c0f1cc;
  --watch-amber: #f0c07e;
  --watch-danger: #f09a8e;
}

/* Desktop dashboard */
.watch-desktop {
  background:
    radial-gradient(circle at 78% -12%, #27453838, transparent 32rem),
    #0d1619;
  color: var(--watch-ink);
}
.watch-desktop .app-shell > main { max-width: 1960px; }
.watch-desktop .page-heading {
  align-items: flex-end;
  margin-bottom: 10px;
}
.watch-desktop .page-heading h1 {
  font-size: clamp(22px, 1.8vw, 30px);
  font-weight: 700;
  letter-spacing: .01em;
}
.watch-desktop .page-heading p {
  display: block;
  color: var(--watch-muted);
  font-size: 15px;
  line-height: 1.45;
  margin-top: 2px;
}
.watch-desktop .desktop-browser-note {
  color: var(--watch-faint);
  font-size: 14px;
  line-height: 1.4;
  white-space: nowrap;
}
.watch-desktop .guard-card {
  border-color: #496c58;
  background: linear-gradient(115deg, #1f3a2c 0%, #1b3027 64%, #203b2d 100%);
  box-shadow: 0 14px 32px #07130d2a;
}
.watch-desktop .guard-kicker { color: #c4dfc9; font-weight: 650; }
.watch-desktop .guard-kicker .state-dot { width: 8px; height: 8px; }
.watch-desktop .guard-card h2 { font-weight: 650; }
.watch-desktop .guard-card p { color: #b5cbbd; }
.watch-desktop .guard-actions .button { min-height: 44px; }
.watch-desktop .guard-actions .button-primary { box-shadow: 0 5px 15px #0a1b1138; }
.watch-desktop .stat-card,
.watch-desktop .panel,
.watch-desktop .records-disclosure {
  border-color: var(--watch-line);
  background: linear-gradient(145deg, #172720, #15221f);
}
.watch-desktop .stat-card { box-shadow: 0 8px 22px #07130d20; }
.watch-desktop .stat-top { color: #b6cec1; font-weight: 600; }
.watch-desktop .stat-value { color: #f2faf3; font-weight: 700; }
.watch-desktop .stat-tag { color: #9fbdb0; }
.watch-desktop .panel-header h2 { color: #eaf6ed; font-weight: 700; }
.watch-desktop .panel-header .section-index { color: var(--watch-accent); font-weight: 700; }
.watch-desktop .subtle-badge,
.watch-desktop .connection-pill { border-color: #466657; }
.watch-desktop .region-button,
.watch-desktop .watch-switches label {
  border-color: #416254;
  background: #1b3028;
  color: #dcefe2;
  transition: border-color .16s, background .16s, box-shadow .16s;
}
.watch-desktop .region-button:hover,
.watch-desktop .watch-switches label:hover {
  border-color: #78b48b;
  background: #244033;
}
.watch-desktop .watch-switches label {
  display: flex;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid #416254;
  border-radius: 7px;
  cursor: pointer;
  font-size: 15px;
}
.watch-desktop .watch-switches label:has(input:checked) {
  border-color: #6fa980;
  background: #214333;
  box-shadow: inset 3px 0 0 var(--watch-accent);
}
.watch-desktop .watch-switches input {
  accent-color: var(--watch-accent);
}
.watch-desktop .manual-guard-entry {
  border-color: #4e745e;
  background: #1c3429;
}
.watch-desktop .manual-guard-entry h3 { color: #e9f8ed; }
.watch-desktop .manual-guard-entry p,
.watch-desktop .recognition-help,
.watch-desktop .capture-bottom p { color: #aec5b8; }
.watch-desktop .watch-save-row,
.watch-desktop .recognition-readings { color: #b8d0c2; }

@media (min-width: 1101px) and (max-height: 820px) {
  /* Keep the existing dense overview useful on short laptop screens while
     retaining the larger type and contrast above. */
  .watch-desktop .page-heading p,
  .watch-desktop .desktop-browser-note { display: none; }
}

/* Paired phone overview */
.phone-body {
  background:
    radial-gradient(circle at 92% -8%, #2c5b4330, transparent 22rem),
    #0b1515;
  color: var(--watch-ink);
}
.phone-body .phone-shell { width: min(100%, 560px); }
.phone-body .phone-topbar {
  padding: 4px 0 10px;
  border-bottom: 1px solid #29463b;
}
.phone-body .phone-brand { color: #f0faf3; font-weight: 750; }
.phone-body .phone-brand .brand-mark { background: #9be0b114; color: var(--watch-accent); }
.phone-body .phone-topbar .button { min-height: 44px; }
.phone-body .phone-network {
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid #345446;
  border-radius: 9px;
  background: #13231d;
  color: #c0d8ca;
}
.phone-body .phone-status-card {
  border: 1px solid #4e7c62;
  background: linear-gradient(145deg, #1d382a, #162a23);
  box-shadow: 0 9px 24px #06110b30;
}
.phone-body .phone-status-card.alerting {
  border-color: #b26b58;
  background: linear-gradient(145deg, #422b25, #2d2220);
}
.phone-body .phone-status-card h2 { font-weight: 750; color: #f3fbf5; }
.phone-body .phone-status-card p { color: #bdd4c5; }
.phone-body .phone-stats { gap: 8px; }
.phone-body .phone-stat {
  border-color: #355547;
  background: #14251f;
  box-shadow: 0 5px 14px #06110b20;
}
.phone-body .phone-stat span { color: #b6cfc0; font-weight: 650; }
.phone-body .phone-stat strong { color: #f0faf2; font-variant-numeric: tabular-nums; }
.phone-body .phone-stat small { color: #91ad9f; }
.phone-body .phone-game-panel,
.phone-body .phone-alert-kinds,
.phone-body .phone-settings,
.phone-body .phone-events {
  border-color: #355547;
  background: linear-gradient(145deg, #162820, #13221e);
  box-shadow: 0 7px 18px #06110b1c;
}
.phone-body .phone-game-panel .panel-header h2,
.phone-body .phone-alert-kinds .panel-header h2,
.phone-body .phone-settings .panel-header h2,
.phone-body .phone-events .panel-header h2 { font-weight: 750; color: #eaf8ee; }
.phone-body .phone-alert-kinds {
  padding: 13px;
}
.phone-body #phone-overview-status {
  color: #a7c6b3;
  font-size: 14px;
  white-space: nowrap;
}
.phone-body .phone-alert-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}
.phone-body .phone-alert-item,
.phone-body .phone-alert-manage {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 58px;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  padding: 8px 7px;
  border: 1px solid #4b765f;
  border-radius: 9px;
  background: #183427;
  color: #e5f7e9;
  text-align: left;
  line-height: 1.2;
  box-shadow: inset 0 2px 0 #a7edb31c;
}
.phone-body .phone-alert-item { cursor: pointer; }
.phone-body .phone-alert-item:hover,
.phone-body .phone-alert-item:focus-visible,
.phone-body .phone-alert-manage:hover,
.phone-body .phone-alert-manage:focus-visible {
  border-color: var(--watch-accent);
  background: #224633;
}
.phone-body .phone-alert-item:disabled { opacity: .6; cursor: not-allowed; }
.phone-body .phone-alert-item[aria-busy="true"] { border-color: var(--watch-amber); }
.phone-body .phone-alert-item strong,
.phone-body .phone-alert-manage strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 14px;
  font-weight: 750;
}
.phone-body .phone-alert-item span,
.phone-body .phone-alert-manage span {
  display: block;
  color: #a9e4b7;
  font-size: 14px;
}
.phone-body .phone-alert-item span::before {
  content: '';
  display: inline-block;
  width: 5px; height: 5px;
  margin-right: 4px;
  vertical-align: 2px;
  border-radius: 50%;
  background: currentColor;
}
.phone-body .phone-alert-item.is-off,
.phone-body .phone-alert-manage {
  border-color: #4d5f58;
  background: #1c2927;
  box-shadow: none;
}
.phone-body .phone-alert-item.is-off span,
.phone-body .phone-alert-manage span { color: #bdc9c5; }
.phone-body .phone-alert-manage { cursor: pointer; }
.phone-body .phone-notify-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.phone-body .phone-notify-actions .button { min-height: 46px; padding: 8px 9px; font-size: 14px; }
.phone-body .phone-notification-status {
  margin: 8px 0 0;
  padding: 8px 10px;
  border: 1px solid #4f745f;
  border-radius: 7px;
  color: #c3e7cc;
  font-size: 14px;
  line-height: 1.45;
}
.phone-body .phone-footer {
  color: #9eb8aa;
  font-size: 14px;
  border-top-color: #29463b;
}

@media (max-width: 390px) {
  .phone-body .phone-shell { padding-left: 10px; padding-right: 10px; }
  .phone-body .phone-topbar .button { padding-left: 10px; padding-right: 10px; }
  .phone-body .phone-alert-grid { gap: 5px; }
  .phone-body .phone-alert-item,
  .phone-body .phone-alert-manage { min-height: 55px; padding: 7px 5px; }
  .phone-body .phone-alert-item strong,
  .phone-body .phone-alert-manage strong,
  .phone-body .phone-alert-item span,
  .phone-body .phone-alert-manage span { font-size: 14px; }
}

@media (max-width: 390px) and (max-height: 700px) {
  /* A short phone viewport still keeps every state and action visible. */
  .phone-body .phone-shell { padding-top: 4px; }
  .phone-body .phone-topbar { padding-bottom: 4px; margin-bottom: 2px; }
  .phone-body .phone-network { min-height: 32px; padding: 5px 8px; margin-bottom: 4px; }
  .phone-body .phone-status-card { padding: 8px 10px; margin-bottom: 4px; }
  .phone-body .phone-status-card h2 { font-size: 18px; margin-bottom: 2px; }
  .phone-body .phone-status-card p { line-height: 1.35; }
  .phone-body .phone-stats { gap: 5px; margin-bottom: 4px; }
  .phone-body .phone-stat { padding: 7px 6px; }
  .phone-body .phone-stat strong { margin-top: 2px; }
  .phone-body .phone-game-panel { padding: 9px; margin-bottom: 4px; }
  .phone-body .phone-game-panel .potion-grid { gap: 4px; }
  .phone-body .phone-alert-kinds { padding: 9px; margin-bottom: 4px; }
  .phone-body .phone-alert-grid { gap: 4px; }
  .phone-body .phone-alert-item,
  .phone-body .phone-alert-manage { min-height: 48px; padding: 5px 4px; }
  .phone-body .phone-settings { padding: 8px 9px; }
  .phone-body .phone-notify-actions { margin-top: 5px; gap: 5px; }
  .phone-body .phone-notify-actions .button { min-height: 44px; }
  .phone-body .phone-readiness { margin-bottom: 2px; }
  .phone-body .phone-footer { margin-top: 4px; }
}

@media (max-width: 350px) {
  .phone-body .phone-alert-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .phone-body .phone-notify-actions { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .watch-desktop *, .phone-body * { transition-duration: .01ms !important; }
}
