:root {
  --bg: #070b14;
  --bg-2: #0d1524;
  --panel: rgba(16, 24, 40, 0.78);
  --line: rgba(120, 170, 255, 0.16);
  --text: #e8eef8;
  --muted: #8fa0b8;
  --accent: #3d8dff;
  --accent-2: #5eead4;
  --danger: #ff6b7a;
  --ok: #3ecf8e;
  --warn: #f0b429;
  --hover-fill: rgba(61, 141, 255, 0.14);
  --hover-border: rgba(142, 197, 255, 0.55);
  --hover-glow: 0 0 0 1px rgba(61, 141, 255, 0.28), 0 0 18px rgba(61, 141, 255, 0.22);
  --hover-glow-strong: 0 10px 26px rgba(61, 141, 255, 0.36), 0 0 22px rgba(61, 141, 255, 0.3);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  height: 100%;
  min-height: 100%;
  color-scheme: dark;
  color: var(--text);
  font-family: "Segoe UI", "SF Pro Display", system-ui, sans-serif;
  background:
    radial-gradient(900px 480px at 12% -10%, rgba(61, 141, 255, 0.18), transparent 55%),
    radial-gradient(700px 420px at 100% 0%, rgba(94, 234, 212, 0.08), transparent 50%),
    var(--bg);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(120, 170, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 170, 255, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.55), transparent 80%);
}

#app { min-height: 100vh; position: relative; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 10px 18px;
  background: rgba(7, 11, 20, 0.72);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.topbar-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(61, 141, 255, 0.35);
  box-shadow: 0 0 18px rgba(61, 141, 255, 0.25);
}
.topbar-brand { min-width: 0; }
.topbar-name {
  font-size: 14px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.topbar-sub {
  font-size: 12px;
  color: var(--accent-2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
button.topbar-identity {
  appearance: none;
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: none;
  text-align: left;
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}
button.topbar-identity:hover,
button.topbar-identity:focus-visible {
  color: #8ec5ff;
  text-decoration: underline;
  outline: none;
}
.id-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 8, 16, 0.62);
}
.id-modal-card {
  width: min(420px, 100%);
  padding: 20px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}
.id-modal-card h2 { margin: 0 0 14px; font-size: 18px; }
.id-modal-card .ic-field { margin-bottom: 12px; }
.topbar-action {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 650;
  font-size: 13px;
  cursor: pointer;
}
.topbar-action:hover { border-color: var(--accent); color: #fff; }
.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.topbar-user {
  font-size: 13px;
  color: var(--muted);
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page {
  max-width: 460px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

.logo-wrap {
  margin: 28px 0 32px;
  display: flex;
  justify-content: center;
}
.logo {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(61, 141, 255, 0.25);
  box-shadow:
    0 0 0 8px rgba(61, 141, 255, 0.06),
    0 18px 50px rgba(0, 0, 0, 0.45);
}

.field {
  position: relative;
  margin: 0 0 12px;
}
.field.stack label {
  position: static;
  display: block;
  margin: 0 0 6px;
  font-size: 12px;
  left: auto;
}
.field.stack input {
  height: 48px;
  padding: 12px 14px;
}
.field input {
  width: 100%;
  height: 56px;
  padding: 18px 48px 8px 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 16px;
  background: var(--panel);
  color: var(--text);
}
.field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(61, 141, 255, 0.2);
}
.field label {
  position: absolute;
  left: 48px;
  top: 7px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.field .lead-icon,
.field .trail-icon {
  position: absolute;
  top: 16px;
  width: 24px;
  height: 24px;
  color: var(--muted);
  display: grid;
  place-items: center;
  background: none;
  border: 0;
  padding: 0;
}
.field .lead-icon { left: 12px; }
.field .trail-icon { right: 10px; cursor: pointer; }

.remember {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 20px;
  font-size: 14px;
  color: var(--muted);
}
.remember input { width: 16px; height: 16px; accent-color: var(--accent); }

.login-btn-wrap {
  display: flex;
  justify-content: center;
  margin: 8px 0 20px;
}
.login-btn {
  width: 220px;
  height: 48px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, #4c9dff, var(--accent));
  color: #fff;
  font-weight: 750;
  font-size: 15px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(61, 141, 255, 0.28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.login-btn:disabled { opacity: 0.55; cursor: default; }

.links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 10px 0 20px;
}
.links button, .text-btn {
  background: none;
  border: 0;
  color: #9ec4ff;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  padding: 8px;
}

.ms-wrap {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}
.ms-btn {
  width: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-weight: 550;
  font-size: 14px;
  cursor: pointer;
}
.ms-btn:hover { border-color: var(--accent); }
.ms-btn:disabled { opacity: 0.55; }

.banner {
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.4;
}
.banner.err { background: rgba(255, 107, 122, 0.12); color: #ffb0b8; border: 1px solid rgba(255, 107, 122, 0.3); }
.banner.info { background: rgba(61, 141, 255, 0.12); color: #c5d8ff; border: 1px solid rgba(61, 141, 255, 0.3); }
.banner.ok { background: rgba(62, 207, 142, 0.12); color: #9be7c4; border: 1px solid rgba(62, 207, 142, 0.3); }

.support {
  margin-top: 16px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

.code-input {
  width: 100%;
  height: 56px;
  text-align: center;
  font-size: 22px;
  letter-spacing: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  background: var(--panel);
  color: var(--text);
}
.code-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(61, 141, 255, 0.2);
}

.row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 16px;
}
.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 650;
  cursor: pointer;
}

.wide { max-width: 960px; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 16px;
}
.tile {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  min-height: 120px;
}
.tile h3 { margin: 0 0 6px; font-size: 15px; }
.tile p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.4; }
.badge {
  display: inline-block;
  margin-top: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ok);
}
.badge.off { color: var(--muted); }
.badge.soon { color: var(--warn); }

.lead { color: var(--muted); margin: 0 0 16px; line-height: 1.45; }
h1 { font-size: 22px; margin: 16px 0 8px; letter-spacing: 0.03em; }

.hidden { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.spinner {
  width: 22px;
  height: 22px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  display: inline-block;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

body.in-app {
  height: 100%;
  overflow: hidden;
}
body.in-app #app,
body.in-app .app-shell {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.shell-body {
  flex: 1;
  min-height: 0;
  display: flex;
}
.rail {
  width: 92px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 8px;
  border-right: 1px solid var(--line);
  background: rgba(7, 11, 20, 0.55);
}
.rail-main {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rail-settings { margin-top: auto; }
.rail-item {
  appearance: none;
  position: relative;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  border-radius: 12px;
  padding: 12px 6px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}
.unread-badge {
  position: absolute;
  top: 4px;
  right: 8px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ff5252;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
  display: grid;
  place-items: center;
  border: 2px solid #0b1220;
  box-shadow: 0 2px 8px rgba(255, 82, 82, 0.35);
  line-height: 1;
  pointer-events: none;
}
.unread-badge.dot {
  min-width: 10px;
  width: 10px;
  height: 10px;
  padding: 0;
  right: 14px;
  top: 8px;
}
.unread-badge.hidden { display: none; }
.launch-icon { position: relative; }
.launch-icon .unread-badge {
  top: -6px;
  right: -6px;
}
body.theme-light .unread-badge { border-color: #eef2f8; }
.rail-item:hover { color: #fff; }
.rail-item.active {
  color: var(--text);
  background: rgba(61, 141, 255, 0.14);
  border-color: var(--line);
}
.rail-item.restricted,
.rail-item.disabled {
  opacity: 0.42;
}
.rail-item.restricted:hover,
.rail-item.disabled:hover {
  color: var(--muted);
  background: transparent;
  border-color: transparent;
}
body.theme-light .rail-item { color: #3d5270; }
body.theme-light .rail-item:hover,
body.theme-light .rail-item.active {
  color: #1d6fe8;
  background: rgba(29, 111, 232, 0.12);
  border-color: rgba(29, 111, 232, 0.28);
}
body.theme-light .rail-item.restricted:hover,
body.theme-light .rail-item.disabled:hover {
  color: #3d5270;
  background: transparent;
  border-color: transparent;
}
.workspace {
  flex: 1;
  min-width: 0;
  overflow: auto;
  padding: 24px 28px 48px;
}
.workspace-head h1 { margin-top: 0; }
.desk-pane {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
}
.desk-pane.desk-lib { max-width: 980px; }
.launch-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 8px;
}
.launch-card {
  appearance: none;
  text-align: left;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 20px;
  border-radius: 16px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  background: var(--panel);
  color: inherit;
  cursor: pointer;
  flex: 0 1 320px;
  width: min(320px, 100%);
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.launch-card:hover,
.launch-card:focus-visible {
  background: rgba(16, 24, 40, 0.95);
}
body.theme-light .launch-card:hover,
body.theme-light .launch-card:focus-visible {
  background: #e8f1ff;
}
.launch-card.resources { border-left: 4px solid #5b8def; }
.launch-card.resources:hover,
.launch-card.resources:focus-visible {
  border-color: rgba(91, 141, 239, 0.85);
  box-shadow:
    0 0 0 1px rgba(91, 141, 239, 0.45),
    0 0 22px rgba(91, 141, 239, 0.38);
}
.launch-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: rgba(91, 141, 239, 0.18);
  color: #9bb8ff;
}
.launch-copy { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.launch-title { font-size: 16px; font-weight: 750; }
.launch-blurb { font-size: 13px; color: var(--muted); line-height: 1.4; }

.res-toolbar { margin: 4px auto 16px; max-width: 560px; }
.res-search input {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
  padding: 0 14px;
  font-size: 15px;
}
.res-search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(61, 141, 255, 0.2);
}
.res-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}
.res-card {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--panel);
  color: inherit;
  border-radius: 16px;
  padding: 20px 14px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  min-height: 160px;
  flex: 0 0 180px;
  width: 180px;
}
.res-card:hover { border-color: rgba(61, 141, 255, 0.45); }
.res-thumb {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: contain;
  padding: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 3px solid rgba(61, 141, 255, 0.35);
}
.res-thumb.fallback {
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 22px;
  color: #9bb8ff;
}
.res-card-title {
  font-weight: 750;
  font-size: 15px;
  text-align: center;
  line-height: 1.25;
}
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--muted);
}
.crumb {
  appearance: none;
  border: 0;
  background: none;
  color: #9ec4ff;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}
.crumb-sep { opacity: 0.45; }
.split {
  display: grid;
  grid-template-columns: minmax(200px, 280px) 1fr;
  gap: 16px;
  min-height: calc(100vh - 240px);
}
.article-list {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(7, 11, 20, 0.45);
  overflow: auto;
  max-height: calc(100vh - 240px);
  padding: 8px;
}
.article-nav {
  appearance: none;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.article-nav:hover { background: rgba(61, 141, 255, 0.1); }
.article-nav.active {
  background: rgba(61, 141, 255, 0.18);
  color: #fff;
}
.article-pane {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  padding: 22px 24px 32px;
  overflow: auto;
  max-height: calc(100vh - 240px);
}
.article h1 { margin: 0 0 14px; font-size: 22px; }
.md { font-size: 15px; line-height: 1.6; color: var(--text); }
.md h1, .md h2, .md h3 { margin: 1.2em 0 0.4em; }
.md ul { padding-left: 1.2em; }
.md a, .article-link a { color: #9ec4ff; }
.md pre {
  overflow: auto;
  padding: 12px;
  background: rgba(0, 0, 0, 0.28);
  border-radius: 10px;
}
.article-link { margin-top: 24px; }
.search-panel { display: flex; flex-direction: column; gap: 6px; max-width: 720px; margin-inline: auto; }
.search-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.search-hit {
  appearance: none;
  text-align: left;
  display: flex;
  gap: 12px;
  align-items: baseline;
  border: 1px solid var(--line);
  background: var(--panel);
  color: inherit;
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
}
.search-hit:hover { border-color: var(--accent); }
.search-kind {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-2);
}
.res-loading, .muted-inline { color: var(--muted); }

.launch-card.incident { border-left: 4px solid #e53935; }
.launch-card.incident:hover,
.launch-card.incident:focus-visible {
  border-color: rgba(229, 57, 53, 0.85);
  box-shadow:
    0 0 0 1px rgba(229, 57, 53, 0.45),
    0 0 22px rgba(229, 57, 53, 0.38);
}
.launch-card.incident .launch-icon {
  background: rgba(229, 57, 53, 0.18);
  color: #ff8a80;
}

.ic-page {
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
}
.ic-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
}
.ic-actions { display: flex; gap: 8px; flex-shrink: 0; }
.desk-ico {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex: 0 0 auto;
}
.sc-action,
.sc-quiet,
.ic-btn,
.cb-head .secondary,
.sc-thread-actions .secondary,
.map-chat-pdf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.ic-btn {
  appearance: none;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(180deg, #4c9dff, var(--accent));
  color: #fff;
  font-weight: 750;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 10px 14px;
  cursor: pointer;
}
.ic-btn.danger {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
}
.ic-tabs {
  position: sticky;
  top: 0;
  z-index: 4;
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 0 14px;
  background: linear-gradient(180deg, var(--bg) 70%, transparent);
}
.ic-tab {
  appearance: none;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 10px;
  padding: 12px 14px;
  font-weight: 750;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
}
.ic-tab.active {
  background: rgba(61, 141, 255, 0.22);
  border-color: var(--accent);
  color: #fff;
}
.ic-form { width: 100%; display: flex; flex-direction: column; gap: 12px; }
.ic-stack {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ic-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.ic-card-head {
  appearance: none;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  border: 0;
  color: var(--text);
  font-weight: 750;
  font-size: 15px;
  text-align: left;
  padding: 14px 16px;
  cursor: pointer;
}
.ic-letter {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #c62828;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
}
.ic-card-body { display: none; padding: 0 16px 16px; }
.ic-card.open .ic-card-body { display: flex; flex-direction: column; gap: 12px; }
.ic-field { display: flex; flex-direction: column; gap: 6px; }
.ic-field span {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.ic-field textarea,
.ic-field select,
.ic-field input,
.ic-modal-card input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(7, 11, 20, 0.55);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  padding: 10px 12px;
}
.ic-field textarea:focus,
.ic-field select:focus,
.ic-field input:focus,
.ic-modal-card input:focus {
  outline: none;
  border-color: #ef5350;
  box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.2);
}
.ic-field textarea[readonly] {
  color: var(--muted);
  background: rgba(7, 11, 20, 0.35);
}
.ic-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: grid;
  place-items: center;
  z-index: 20;
  padding: 16px;
}
.ic-modal.hidden { display: none; }
.ic-modal-card {
  width: min(420px, 100%);
  background: #101828;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
}
.ic-modal-card h2 { margin: 0 0 8px; font-size: 18px; }
.ic-modal-actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.ic-hint { color: #ffb0b8; font-size: 13px; margin: 10px 0 0; }

@media (max-width: 760px) {
  .shell-body { flex-direction: column; }
  .rail {
    width: auto;
    flex-direction: row;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 8px;
  }
  .rail-main {
    flex-direction: row;
    flex: 1;
  }
  .rail-settings { margin-top: 0; }
  .rail-item { flex: 1; }
  .workspace { padding: 16px 14px 40px; }
  .split { grid-template-columns: 1fr; min-height: 0; }
  .article-list, .article-pane { max-height: none; }
}

.launch-card.map { border-left: 4px solid #2e7d32; }
.launch-card.map:hover,
.launch-card.map:focus-visible {
  border-color: rgba(46, 125, 50, 0.85);
  box-shadow:
    0 0 0 1px rgba(46, 125, 50, 0.45),
    0 0 22px rgba(46, 125, 50, 0.38);
}
.launch-card.map .launch-icon {
  background: rgba(46, 125, 50, 0.18);
  color: #81c784;
}
.workspace.map-mode {
  padding: 0;
  overflow: hidden;
  display: flex;
}
.map-page {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}
.map-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 11, 20, 0.88);
  z-index: 2;
}
.map-group, .map-callsign {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.map-group select, .map-callsign input {
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  padding: 0 10px;
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 600;
}
.map-status { font-size: 13px; color: var(--muted); }
.map-status.ok { color: var(--ok); }
.map-status.warn { color: var(--warn); }
.map-status.err { color: var(--danger); }
.map-spacer { flex: 1; }
#map-canvas { flex: 1; min-height: 280px; }
.map-status-chip {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: min(420px, calc(100% - 76px));
  font-size: 13px;
  font-weight: 650;
  color: var(--muted);
  background: rgba(7, 11, 20, 0.78);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 12px;
  white-space: nowrap;
}
.map-status-chip::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 22%, transparent);
  flex: 0 0 auto;
}
.map-status-chip.ok { color: var(--ok); }
.map-status-chip.warn { color: var(--warn); }
.map-status-chip.err { color: var(--danger); }
.map-dock {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 12px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  gap: 6px;
  padding: 6px 4px;
  background: rgba(8, 14, 24, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  backdrop-filter: blur(2px);
}
.map-fab {
  appearance: none;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: rgba(70, 82, 98, 0.42);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: 0 0 auto;
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
}
.map-fab svg { width: 22px; height: 22px; fill: currentColor; }
.map-fab:hover { background: rgba(61, 141, 255, 0.85); }
.map-fab.active { background: rgba(61, 141, 255, 0.92); }
.map-fab-add { background: rgba(240, 180, 41, 0.92); color: #111; }
.map-fab-add:hover, .map-fab-add.active { background: #f0b429; }
.map-fab .map-unread {
  position: absolute;
  width: 9px;
  height: 9px;
  background: #ff5252;
  border: 1.2px solid #fff;
  border-radius: 50%;
  top: 6px;
  right: 6px;
}
.map-fab { position: relative; }
@media (max-width: 820px) {
  .map-fab { width: 40px; height: 40px; }
  .map-fab svg { width: 20px; height: 20px; }
  .map-dock { gap: 4px; padding: 6px 4px; }
}
.map-banner {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 78px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(7, 11, 20, 0.88);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
}
.map-banner p { margin: 0; flex: 1; font-size: 13px; font-weight: 650; }
.map-chat {
  position: absolute;
  left: 12px;
  right: auto;
  width: min(380px, calc(100% - 24px));
  bottom: 78px;
  z-index: 4;
  height: min(46vh, 380px);
  display: flex;
  flex-direction: column;
  background: rgba(10, 16, 28, 0.94);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.map-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}
.map-chat-head strong { font-size: 14px; }
.map-chat-pdf {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.map-chat-pdf svg { fill: currentColor; }
.map-chat-log {
  flex: 1;
  overflow: auto;
  padding: 10px 12px;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.map-chat-line { display: flex; }
.map-chat-line.mine { justify-content: flex-end; }
.map-chat-bubble {
  max-width: 78%;
  padding: 8px 10px;
  border-radius: 14px;
  background: #e9e9eb;
  color: #111;
}
.map-chat-line.mine .map-chat-bubble {
  background: #007aff;
  color: #fff;
}
.map-chat-meta {
  display: flex;
  gap: 8px;
  align-items: baseline;
  font-size: 11px;
  opacity: 0.82;
  margin-bottom: 3px;
}
.map-chat-meta b { font-weight: 700; }
.map-chat-text { font-size: 14px; line-height: 1.3; }
.map-chat-form {
  display: flex;
  gap: 8px;
  padding: 8px;
  border-top: 1px solid var(--line);
}
.map-chat-form input {
  flex: 1;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text);
  padding: 0 10px;
}
.map-chat-photo-btn {
  appearance: none;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}
.map-chat-photo-btn svg { fill: currentColor; }
.map-chat-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px 8px;
}
.map-chat-preview img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
}
.map-chat-preview button {
  appearance: none;
  border: 0;
  background: transparent;
  color: #9ec4ff;
  font-weight: 700;
  cursor: pointer;
}
.map-chat-img {
  display: block;
  max-width: 220px;
  max-height: 180px;
  border-radius: 8px;
  margin-top: 6px;
  cursor: zoom-in;
}
.map-sheet {
  position: absolute;
  left: 12px;
  right: auto;
  width: min(300px, calc(100% - 24px));
  bottom: 78px;
  z-index: 5;
  max-height: min(78vh, 620px);
  overflow: auto;
  background: #101828;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
}
.map-sheet.map-sheet-mid {
  width: min(360px, calc(100% - 24px));
}
.map-sheet h2 { margin: 0 0 10px; font-size: 16px; }
.map-sheet h3 { margin: 14px 0 8px; font-size: 13px; color: var(--muted); }
.map-sheet-list { display: flex; flex-direction: column; gap: 4px; }
.map-sheet-item {
  appearance: none;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  color: var(--text);
  padding: 10px 8px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font: inherit;
}
.map-sheet-item:hover, .map-sheet-item.active { background: rgba(61, 141, 255, 0.16); }
.map-sheet-item strong { display: block; font-size: 14px; }
.map-sheet-item span { display: block; color: var(--muted); font-size: 12px; }
.map-layer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.map-layer-row > span:first-child { min-width: 0; }
.map-layer-row > span:last-child {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  font-size: 12px;
}
.map-layer-row:last-child { border-bottom: 0; }
.map-wp-pin {
  position: relative;
  width: 24px;
  height: 24px;
  pointer-events: auto;
}
.map-wp-pin.map-wp-tip {
  width: 26px;
  height: 32px;
}
.map-wp-pin:has(.map-wp-badge) {
  width: 22px;
  height: 22px;
}
.map-wp-ico {
  display: block;
  width: 24px;
  height: 24px;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.45));
}
.map-wp-pin.map-wp-tip .map-wp-ico {
  width: 26px;
  height: 32px;
}
.map-wp-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 2px #fff, 0 1px 3px rgba(0,0,0,0.35);
}
.map-wp-badge svg {
  width: 13px;
  height: 13px;
  display: block;
}
.map-add-ico {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.map-add-ico .map-wp-ico {
  width: 22px;
  height: 22px;
  filter: none;
}
.map-wp-end {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #E65100;
  border: 1.5px solid #111;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.35);
}
.map-wp-label {
  position: absolute;
  left: 12px;
  top: 12px;
  background: rgba(16, 24, 40, 0.86);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 16px;
  padding: 0 6px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: auto;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.42);
  will-change: transform;
}
.map-pop-photo {
  display: block;
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 8px;
  margin: 8px 0;
}
.map-photo-preview img {
  display: block;
  width: 100%;
  max-height: 160px;
  object-fit: cover;
  border-radius: 8px;
  margin-top: 8px;
}
.map-drawer {
  position: absolute;
  top: 56px;
  right: 12px;
  width: min(320px, calc(100% - 24px));
  background: #101828;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  z-index: 5;
}
.map-drawer h2 { margin: 0 0 6px; font-size: 16px; }
.map-hint { color: var(--muted); font-size: 12px; margin: 12px 0 0; line-height: 1.4; }
.map-unit,
.map-wp-pin {
  overflow: visible;
}
.map-unit {
  position: relative;
  width: 14px;
  height: 14px;
}
.map-unit-dot {
  position: absolute;
  inset: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #3d8dff;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px rgba(61, 141, 255, 0.45);
}
.map-unit-label {
  position: absolute;
  left: 7px;
  top: 7px;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  padding: 0 6px;
  line-height: 16px;
  border-radius: 6px;
  white-space: nowrap;
  border: 1px solid rgba(255,255,255,0.42);
  pointer-events: auto;
  cursor: pointer;
  will-change: transform;
}
.map-unit.selected .map-unit-label {
  border-color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.28);
}
.map-unit.offline .map-unit-dot { background: #9e9e9e; box-shadow: none; }
.map-unit.offline .map-unit-label { background: #9e9e9e; color: #fff; }
.map-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 0;
  font-size: 14px;
  color: var(--text);
}
.map-eq-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
  padding: 8px;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  font-size: 12px;
  color: var(--muted);
}
.map-eq-bar b { color: var(--text); margin-right: 2px; }
.map-side-chip {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.45);
  white-space: nowrap;
}
.map-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}
.map-tab {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
}
.map-tab.active { background: rgba(61, 141, 255, 0.22); color: #fff; border-color: var(--accent); }
.map-eq {
  display: inline-flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.map-eq span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: rgba(61, 141, 255, 0.16);
  border-radius: 7px;
  padding: 0;
}
.map-eq svg { fill: var(--accent); }
.map-group-actions { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.map-group-actions button { font-size: 12px; padding: 6px 8px; }
.map-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  color: var(--text);
  background: transparent;
}
.map-btn svg { fill: currentColor; }
.map-btn-primary {
  background: var(--accent);
  color: #fff;
}
.map-btn-ghost {
  border-color: var(--line);
  background: rgba(255,255,255,0.04);
}
.map-btn-danger {
  color: #ff8a80;
  border-color: rgba(255,138,128,0.45);
}
.map-btn-back { min-width: 64px; padding: 0 10px; }
.map-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.map-groups-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.map-groups-head h2 { margin: 0; flex: 1; }
.map-glist {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.map-gcard {
  appearance: none;
  width: 100%;
  text-align: left;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 12px 12px 14px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  font: inherit;
}
.map-gcard:hover, .map-gcard.active {
  background: rgba(61, 141, 255, 0.16);
  border-color: rgba(61, 141, 255, 0.45);
}
.map-gcard-body { flex: 1; min-width: 0; }
.map-gcard-body strong { display: block; font-size: 15px; font-weight: 750; }
.map-gcard-body span { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.map-gcard-chevron {
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  font-weight: 400;
}
.map-gcard-join {
  font-size: 12px;
  font-weight: 800;
  color: #9ec4ff;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.map-member {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 4px;
  border-bottom: 1px solid var(--line);
}
.map-member:last-child { border-bottom: 0; }
.map-member-ico {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.08);
  color: #b0bec5;
  font-size: 13px;
  flex-shrink: 0;
}
.map-member.creator .map-member-ico { background: rgba(255,152,0,0.22); color: #ffb74d; }
.map-member.admin .map-member-ico { background: rgba(61,141,255,0.22); color: #90caf9; }
.map-member-body { min-width: 0; }
.map-member-body strong { display: block; font-size: 14px; }
.map-member-body span { display: block; color: var(--muted); font-size: 12px; margin-top: 1px; }
.map-unit-label.hidden-label,
.map-wp-label.hidden-label { display: none; }
.mapboxgl-ctrl-top-right { top: 10px; }
.map-pop-wrap .mapboxgl-popup-content {
  background: #fff;
  color: #1a1f2b;
  border-radius: 14px;
  padding: 14px 16px 12px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.22);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-width: 220px;
  max-width: 300px;
}
.map-pop-wrap .mapboxgl-popup-tip { border-top-color: #fff; }
.map-pop-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #111;
  margin: 0 0 10px;
}
.map-pop-line {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.35;
  color: #1a1f2b;
}
.map-pop-user { font-weight: 700; }
.map-pop-role-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 13px;
  color: #1a1f2b;
}
.map-pop-role-row span:first-child { font-weight: 700; }
.map-pop-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.18);
  flex-shrink: 0;
}
.map-pop-offline {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 0 0 8px;
  color: #e65100;
  font-size: 12px;
  font-style: italic;
}
.map-pop-eq-title {
  font-weight: 700;
  font-size: 13px;
  margin: 10px 0 4px;
}
.map-pop-eq-line {
  margin: 0 0 2px;
  font-size: 13px;
  color: #1a1f2b;
}
.map-pop-close {
  appearance: none;
  display: block;
  margin: 12px 0 0 auto;
  border: 0;
  background: transparent;
  color: #1565c0;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  padding: 4px 0 0;
}
.map-del {
  margin-top: 8px;
  appearance: none;
  border: 0;
  background: transparent;
  color: #c62828;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  font-size: 12px;
}
.map-sheet.map-find {
  left: 16px;
  right: 16px;
  width: auto;
  bottom: 78px;
  top: 56px;
  max-height: none;
  height: auto;
  display: flex;
  flex-direction: column;
  padding: 12px;
  background: #101828;
}
.map-find-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}
.map-find-head h2 { margin: 0; flex: 1; }
.map-find-head svg { fill: var(--accent); }
.map-find-close {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
}
.map-find-close svg { fill: currentColor; }
.map-find-group {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--muted);
}
.map-find-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  min-height: 0;
  flex: 1;
}
.map-find-cols section {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: rgba(255,255,255,0.03);
  border-radius: 12px;
}
.map-find-cols h3 {
  margin: 0;
  padding: 8px 10px 4px;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.map-find-scroll {
  overflow: auto;
  padding: 4px 8px 10px;
  min-height: 120px;
  max-height: 42vh;
}
.map-find-card {
  appearance: none;
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.05);
  border: 0;
  color: var(--text);
  border-radius: 10px;
  padding: 8px;
  margin-bottom: 6px;
  cursor: pointer;
  font: inherit;
}
.map-find-card:hover { background: rgba(61, 141, 255, 0.16); }
.map-find-card svg { fill: var(--accent); flex: 0 0 auto; }
.map-find-body { flex: 1; min-width: 0; }
.map-find-body strong { display: block; font-size: 14px; }
.map-find-muted, .map-find-empty { color: var(--muted); font-size: 12px; }
.map-eq-bar {
  display: block;
  margin-top: 10px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
}
.map-eq-title { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.map-eq-counts { display: flex; flex-wrap: wrap; gap: 8px; }
.map-eq-counts span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(7, 11, 20, 0.45);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 13px;
}
.map-eq-counts svg { fill: var(--accent); }
.map-eq-counts b { color: var(--text); }
.map-eq-other { margin-top: 8px; font-size: 12px; color: var(--muted); }
.map-eq-other b { color: var(--text); }
.map-share-qr {
  display: flex;
  justify-content: center;
  padding: 8px 0 12px;
}
.map-share-qr canvas,
.map-share-qr img {
  width: 220px;
  height: 220px;
  background: #fff;
  border-radius: 12px;
  padding: 8px;
}
.map-ico { fill: currentColor; }
@media (max-width: 720px) {
  .map-find-cols { grid-template-columns: 1fr; }
}
.settings-page { max-width: 560px; }
.settings-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 4px 0;
  margin: 0 0 16px;
}
.settings-card h2 {
  margin: 0;
  padding: 14px 16px 10px;
  font-size: 16px;
}
.settings-row,
.settings-switch {
  appearance: none;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--line);
  color: var(--text);
  padding: 12px 16px;
  font: inherit;
  cursor: pointer;
}
.settings-row span,
.settings-switch span { min-width: 0; }
.settings-row strong,
.settings-switch strong { display: block; font-size: 14px; }
.settings-row small,
.settings-switch small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.settings-chevron { color: var(--muted); font-size: 22px; line-height: 1; }
.settings-switch input { width: 18px; height: 18px; accent-color: var(--accent); flex-shrink: 0; }
.toggle {
  appearance: none;
  position: relative;
  width: 48px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #8b97a8;
  cursor: pointer;
  flex-shrink: 0;
}
.toggle.on { background: #1d6fe8; }
.toggle-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
  transition: transform 0.18s ease;
}
.toggle.on .toggle-knob { transform: translateX(20px); }
body.theme-light .toggle { background: #b0bac8; }
body.theme-light .toggle.on { background: #1d6fe8; }
.settings-modal { max-width: 420px; }
body.theme-light {
  color-scheme: light;
  --bg: #eef2f8;
  --bg-2: #ffffff;
  --panel: rgba(255, 255, 255, 0.92);
  --line: rgba(20, 40, 70, 0.12);
  --text: #122033;
  --muted: #5b6b80;
  --accent: #1d6fe8;
  --accent-2: #0f766e;
  --danger: #c62828;
  --ok: #1b7f4e;
  --warn: #b45309;
  --hover-fill: rgba(29, 111, 232, 0.1);
  --hover-border: rgba(29, 111, 232, 0.48);
  --hover-glow: 0 0 0 1px rgba(29, 111, 232, 0.22), 0 0 16px rgba(29, 111, 232, 0.16);
  --hover-glow-strong: 0 8px 22px rgba(29, 111, 232, 0.28), 0 0 18px rgba(29, 111, 232, 0.2);
}
body.theme-light {
  background:
    radial-gradient(900px 480px at 12% -10%, rgba(29, 111, 232, 0.12), transparent 55%),
    radial-gradient(700px 420px at 100% 0%, rgba(56, 189, 248, 0.14), transparent 50%),
    var(--bg);
}
body.theme-light::before {
  background-image:
    linear-gradient(rgba(29, 111, 232, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 111, 232, 0.09) 1px, transparent 1px);
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.42), transparent 78%);
}
body.theme-light button.topbar-identity:hover,
body.theme-light button.topbar-identity:focus-visible {
  color: #1557c0;
}
body.theme-light .topbar,
body.theme-light .rail,
body.theme-light .map-sheet,
body.theme-light .map-drawer,
body.theme-light .map-chat {
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
}

.launch-card.assistant { border-left: 4px solid #e6d37a; }
.launch-card.assistant .launch-icon {
  background: rgba(230, 211, 122, 0.12);
  color: #e6d37a;
}
.launch-card.assistant:hover,
.launch-card.assistant:focus-visible {
  border-color: rgba(230, 211, 122, 0.55);
  box-shadow:
    0 0 0 1px rgba(230, 211, 122, 0.22),
    0 0 14px rgba(230, 211, 122, 0.14);
}

.workspace.chat-mode {
  padding: 18px 24px 24px;
  overflow: hidden;
  display: flex;
  min-height: 0;
  justify-content: center;
}
.cb-page {
  flex: 1 1 auto;
  width: min(1120px, 100%);
  max-width: 1120px;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 20px 24px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(7, 11, 20, 0.55);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  position: relative;
}
.cb-head {
  position: relative;
  display: block;
  text-align: center;
}
.cb-head > div:first-child {
  padding: 0 200px;
}
.cb-head h1 { margin-bottom: 6px; }
.cb-head .lead { margin-bottom: 12px; }
.cb-head .ic-actions {
  position: absolute;
  top: 0;
  right: 0;
}
@media (max-width: 760px) {
  .cb-head > div:first-child { padding: 0; }
  .cb-head .ic-actions {
    position: static;
    justify-content: center;
    margin: 0 0 10px;
  }
}
.cb-disclaimer {
  max-width: 600px;
  margin: 0 auto 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(230, 211, 122, 0.08);
  border: 1px solid rgba(230, 211, 122, 0.2);
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
  text-align: center;
  white-space: pre-wrap;
}
.cb-log {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 8px 0 16px;
  width: min(760px, 100%);
  margin: 0 auto;
}
.cb-msg { max-width: 760px; }
.cb-msg-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  margin-bottom: 4px;
}
.cb-msg-head img, .cb-you-ico {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: cover;
}
.cb-you-ico { background: var(--muted); }
.cb-md { padding-left: 24px; font-size: 15px; line-height: 1.5; }
.cb-md p { margin: 0 0 10px; }
.cb-md a { color: #7eb6ff; }
.cb-more {
  appearance: none;
  border: 0;
  background: none;
  color: #7eb6ff;
  font-weight: 700;
  padding: 6px 0 0 24px;
  cursor: pointer;
}
.cb-more-body { padding-left: 24px; }
.cb-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  padding: 12px;
}
.cb-dots {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: cb-pulse 0.9s infinite alternate;
}
@keyframes cb-pulse { from { opacity: 0.3; } to { opacity: 1; } }
.cb-composer {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  width: min(760px, 100%);
  margin: 0 auto;
}
.cb-input-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}
.cb-input-wrap textarea {
  width: 100%;
  min-height: 52px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
}
.cb-composer .login-btn { min-width: 88px; }
.cb-composer .login-btn.danger {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
}
body.theme-light .cb-disclaimer { background: rgba(250, 243, 210, 0.7); border-color: rgba(230, 211, 122, 0.45); color: #122033; }
body.theme-light .cb-md a, body.theme-light .cb-more { color: #1d6fe8; }
body.theme-light .cb-page {
  background: rgba(255, 255, 255, 0.86);
}

.launch-card.statements { border-left: 4px solid #3f51b5; }
.launch-card.statements .launch-icon {
  background: rgba(63, 81, 181, 0.18);
  color: #9fa8da;
}
.launch-card.statements:hover,
.launch-card.statements:focus-visible {
  border-color: rgba(63, 81, 181, 0.85);
  box-shadow:
    0 0 0 1px rgba(63, 81, 181, 0.45),
    0 0 18px rgba(63, 81, 181, 0.28);
}
.launch-card.restricted,
.launch-card.disabled {
  opacity: 0.55;
}
.launch-card.restricted:hover,
.launch-card.restricted:focus-visible,
.launch-card.disabled:hover,
.launch-card.disabled:focus-visible {
  background: var(--panel);
}
body.theme-light .launch-card.restricted:hover,
body.theme-light .launch-card.restricted:focus-visible,
body.theme-light .launch-card.disabled:hover,
body.theme-light .launch-card.disabled:focus-visible {
  background: var(--panel);
}

.launch-card.chat { border-left: 4px solid #7e57c2; }
.launch-card.chat .launch-icon {
  background: rgba(126, 87, 194, 0.18);
  color: #b39ddb;
}
.launch-card.chat:hover,
.launch-card.chat:focus-visible {
  border-color: rgba(126, 87, 194, 0.85);
  box-shadow:
    0 0 0 1px rgba(126, 87, 194, 0.45),
    0 0 22px rgba(126, 87, 194, 0.38);
}

.workspace.sc-mode {
  padding: 18px 24px 24px;
  overflow: hidden;
  display: flex;
  min-height: 0;
  justify-content: center;
}
.sc-page {
  flex: 1 1 auto;
  width: min(1120px, 100%);
  max-width: 1120px;
  min-height: 0;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(7, 11, 20, 0.55);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}
.sc-list {
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: rgba(7, 11, 20, 0.35);
}
.sc-list-head { padding: 20px 18px 12px; }
.sc-list-head h1 { margin: 0 0 4px; font-size: 22px; }
.sc-list-actions { display: flex; gap: 6px; margin-top: 12px; align-items: center; }
.sc-quiet {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 10px;
  padding: 6px 10px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.sc-quiet:hover { color: var(--text); border-color: rgba(255,255,255,0.28); }
.sc-action {
  appearance: none;
  border: 0;
  background: rgba(61, 141, 255, 0.24);
  color: #d6e8ff;
  border-radius: 10px;
  padding: 7px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.sc-action:hover { background: rgba(61, 141, 255, 0.36); }
.sc-action-join {
  background: rgba(126, 87, 194, 0.3);
  color: #eadbff;
}
.sc-action-join:hover { background: rgba(126, 87, 194, 0.42); }
body.theme-light .sc-action { background: #d7e6ff; color: #1a4d8f; }
body.theme-light .sc-action-join { background: #e8ddff; color: #4a2d8a; }
.sc-choice {
  appearance: none;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--panel);
  color: inherit;
  border-radius: 14px;
  padding: 14px 16px;
  margin: 0 0 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sc-choice:hover { border-color: rgba(61, 141, 255, 0.45); background: rgba(61, 141, 255, 0.08); }
.sc-choice strong { font-size: 16px; }
.sc-choice span { color: var(--muted); font-size: 13px; }
.sc-qr {
  display: grid;
  place-items: center;
  margin: 12px 0;
  padding: 16px;
  background: #fff;
  border-radius: 14px;
}
.sc-qr img { width: 220px; height: 220px; }
.sc-invite-url {
  word-break: break-all;
  text-align: center;
  font-size: 12px;
  margin: 0 0 6px;
}
.sc-clip {
  appearance: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 12px;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
}
.sc-clip svg { width: 20px; height: 20px; }
.sc-clip:hover { border-color: rgba(61, 141, 255, 0.45); color: #fff; }
.sc-gear {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: auto;
  padding: 7px 12px;
  font-weight: 700;
}
.sc-rows { flex: 1; overflow: auto; padding: 0 10px 16px; display: flex; flex-direction: column; gap: 6px; }
.sc-swipe {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  touch-action: pan-y;
}
.sc-swipe-back {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: flex-end;
  padding-right: 16px;
  background: #8b3a3a;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}
.sc-swipe.swiping .sc-swipe-back { display: flex; }
.sc-swipe .sc-row {
  position: relative;
  width: 100%;
  background: #101826;
}
body.theme-light .sc-swipe .sc-row { background: #f4f7fb; }
.sc-row {
  appearance: none;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  border-radius: 14px;
  padding: 10px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
}
.sc-row-copy { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.sc-row-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-row span { color: var(--muted); font-size: 12px; }
.sc-unread {
  margin-left: auto;
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ff5252;
  color: #fff !important;
  font-size: 11px;
  font-weight: 800;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(255, 82, 82, 0.32);
}
.sc-unread.dot {
  min-width: 10px;
  width: 10px;
  height: 10px;
  padding: 0;
}
.sc-notice {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}
.sc-notice small {
  font-weight: 500;
  font-size: 11px;
  opacity: 0.85;
}
.sc-row:hover, .sc-row.active { background: #18263a; border-color: var(--line); }
body.theme-light .sc-row:hover,
body.theme-light .sc-row.active { background: #e8eef8; }
.sc-avatar {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-weight: 700;
  background: rgba(126, 87, 194, 0.22);
  color: #d1c4e9;
}
.sc-invite {
  margin: 0 10px 10px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(240, 180, 41, 0.35);
  background: rgba(240, 180, 41, 0.1);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sc-invite-actions { display: flex; gap: 8px; }
.sc-thread { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.sc-empty, .sc-empty-thread { margin: auto; text-align: center; color: var(--muted); padding: 32px; max-width: 360px; }
.sc-thread-main { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.sc-thread-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.sc-thread-head > div:first-of-type { min-width: 0; }
.sc-thread-head h2 { margin: 0; font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-thread-head .lead { margin: 2px 0 0; }
.sc-thread-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.sc-leave, .sc-danger, .sc-danger-btn { color: #ff8a80; border-color: rgba(229, 57, 53, 0.45); }
.sc-leave:hover, .sc-danger:hover, .sc-danger-btn:hover { color: #ffcdd2; border-color: rgba(229, 57, 53, 0.7); }
.sc-back { display: none; }
.sc-pin {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 14px 0;
  padding: 8px 10px;
  border-radius: 16px;
  border: 1px solid rgba(126, 87, 194, 0.3);
  background: linear-gradient(135deg, rgba(126, 87, 194, 0.2), rgba(255,255,255,0.04));
}
.sc-pin-jump {
  appearance: none;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.sc-pin-mark { font-size: 16px; }
.sc-pin-copy { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sc-pin-copy strong { font-size: 12px; color: #c5b3ef; }
.sc-pin-copy span {
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sc-pin-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  margin-left: auto;
}
.sc-pin-btn.on { color: #c5b3ef; }
.sc-inline-switch {
  padding: 10px 0;
  margin: 4px 0 12px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.sc-archived-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}
.sc-archived-row span { color: var(--muted); font-size: 12px; display: block; }
.sc-archived-actions { display: flex; gap: 6px; flex-shrink: 0; }
.sc-log { flex: 1; overflow: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.sc-msg { max-width: min(640px, 86%); display: flex; flex-direction: column; gap: 4px; }
.sc-msg.mine { margin-left: auto; align-items: flex-end; }
.sc-msg-meta { display: flex; gap: 8px; align-items: baseline; font-size: 12px; color: var(--muted); }
.sc-bubble {
  padding: 10px 12px;
  border-radius: 16px;
  background: #243044;
  border: 1px solid rgba(170, 198, 235, 0.28);
}
.sc-msg.mine .sc-bubble {
  background: #2f5588;
  border-color: rgba(130, 178, 255, 0.55);
}
.sc-msg-text { line-height: 1.45; white-space: pre-wrap; word-break: break-word; font-size: var(--sc-text-size, 16px); }
.sc-setting-row {
  appearance: none;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--panel);
  color: inherit;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sc-setting-row span, .sc-settings-h + .sc-dir + .lead { color: var(--muted); font-size: 12px; }
.sc-settings-h { margin: 16px 0 8px; font-size: 13px; }
.sc-size-preview {
  margin: -4px 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
}
.sc-msg-text a { color: #8ec5ff; }
.sc-msg.failed .sc-msg-text { color: var(--muted); font-style: italic; }
.sc-img { display: block; max-width: min(360px, 100%); border-radius: 12px; margin-top: 8px; cursor: zoom-in; }
.sc-composer {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--line);
}
.sc-composer textarea {
  flex: 1;
  min-height: 42px;
  max-height: 140px;
  resize: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
}
.sc-composer textarea:disabled,
.sc-composer button:disabled { opacity: 0.5; cursor: not-allowed; }
.sc-preview { padding: 0 16px 10px; display: flex; align-items: center; gap: 10px; }
.sc-preview img { height: 64px; border-radius: 8px; }
.sc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.sc-chip {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(61, 141, 255, 0.12);
  color: inherit;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}
.sc-dir { max-height: 220px; overflow: auto; display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.sc-dir-item, .sc-member {
  appearance: none;
  text-align: left;
  border: 1px solid var(--line);
  background: var(--panel);
  color: inherit;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  cursor: pointer;
}
.sc-dir-item span, .sc-member span { color: var(--muted); font-size: 12px; }
.sc-dir-item.active { border-color: var(--accent); background: rgba(61, 141, 255, 0.12); }
.sc-members { display: flex; flex-direction: column; gap: 6px; margin: 0 0 14px; }
.sc-modal { max-width: 480px; max-height: min(86vh, 740px); overflow: auto; }
.sc-outside {
  margin: 6px 0 4px;
  padding: 14px 14px 12px;
  border-radius: 14px;
  border: 1px dashed rgba(94, 234, 212, 0.45);
  background: rgba(94, 234, 212, 0.06);
}
.sc-outside-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 10px;
}
.sc-outside-head strong {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-2);
}
.sc-outside-head span { font-size: 12px; color: var(--muted); line-height: 1.35; }
.sc-outside-row { display: flex; gap: 8px; align-items: stretch; }
.sc-outside-row input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(7, 11, 20, 0.55);
  color: var(--text);
  padding: 10px 12px;
  font: inherit;
}
.sc-outside-row .login-btn { min-width: 88px; flex-shrink: 0; }
.sc-invite-selected { margin: 0 0 12px; padding: 0; }
body.theme-light .sc-page {
  background: rgba(255, 255, 255, 0.86);
}
body.theme-light .sc-outside {
  border-color: rgba(15, 118, 110, 0.4);
  background: rgba(15, 118, 110, 0.06);
}
body.theme-light .sc-outside-row input {
  background: #fff;
  color: #122033;
  border-color: rgba(20, 40, 70, 0.22);
}
.sc-lightbox {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.82);
  display: grid;
  place-items: center;
  padding: 24px;
  cursor: zoom-out;
}
.sc-lightbox img { max-width: 100%; max-height: 100%; border-radius: 12px; }
body.theme-light .sc-list { background: #f4f7fb; }
body.theme-light .sc-bubble { background: #fff; }
body.theme-light .sc-msg.mine .sc-bubble { background: #dbeafe; border-color: #bfdbfe; }
body.theme-light .sc-msg-text a { color: #1d6fe8; }
body.theme-light .sc-avatar { background: #ede7f6; color: #5e35b1; }
body.theme-light .sc-pin {
  background: linear-gradient(135deg, #efe8ff, #fff);
  border-color: #d4c4f5;
}
body.theme-light .sc-pin-copy strong { color: #5e35b1; }
body.theme-light .sc-leave,
body.theme-light .sc-danger,
body.theme-light .sc-danger-btn { color: #c62828; border-color: #ef9a9a; }
body.theme-light .ic-field textarea,
body.theme-light .ic-field select,
body.theme-light .ic-field input,
body.theme-light .ic-modal-card input,
body.theme-light .ic-field textarea[readonly],
body.theme-light .res-search input,
body.theme-light .field input,
body.theme-light .code-input,
body.theme-light .map-group select,
body.theme-light .map-callsign input,
body.theme-light .map-chat-form input,
body.theme-light .cb-input-wrap textarea,
body.theme-light .sc-composer textarea {
  background: #fff;
  color: #122033;
  border-color: rgba(20, 40, 70, 0.22);
}
body.theme-light .ic-field textarea::placeholder,
body.theme-light .ic-field input::placeholder,
body.theme-light .sc-composer textarea::placeholder,
body.theme-light .res-search input::placeholder,
body.theme-light .map-chat-form input::placeholder,
body.theme-light .cb-input-wrap textarea::placeholder {
  color: #6b7c90;
}
@media (max-width: 860px) {
  .workspace.sc-mode,
  .workspace.chat-mode { padding: 0; }
  .sc-page,
  .cb-page {
    width: 100%;
    max-width: none;
    border-radius: 0;
    border: 0;
    box-shadow: none;
  }
  .sc-page {
    grid-template-columns: 1fr;
  }
  .sc-page.thread-open .sc-list { display: none; }
  .sc-page:not(.thread-open) .sc-thread { display: none; }
  .sc-back { display: inline-flex; appearance: none; border: 0; background: transparent; color: var(--text); font-size: 28px; line-height: 1; cursor: pointer; padding: 0 4px; }
}

button,
.rail-item,
.launch-card,
.res-card,
.sc-row,
.sc-dir-item,
.sc-choice,
.sc-chip,
.sc-clip,
.sc-setting-row,
.settings-row,
.settings-switch,
.ic-tab,
.ic-card-head,
.ic-btn,
.map-fab,
.map-btn,
.map-tab,
.map-gcard,
.map-sheet-item,
.map-find-card,
.article-nav,
.search-hit,
.toggle,
.sc-pin-btn,
.cb-more,
.sc-back,
.map-chat-photo-btn,
.crumb,
.text-btn,
.links button,
.ms-btn,
.sc-quiet,
.sc-action,
.topbar-action,
.secondary {
  transition:
    background-color 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease,
    box-shadow 0.16s ease,
    filter 0.16s ease,
    transform 0.16s ease,
    opacity 0.16s ease;
}

@media (hover: hover) and (pointer: fine) {
  .login-btn:not(:disabled):hover,
  .rail-item:not(.restricted):not(.disabled):hover,
  .res-card:hover,
  .sc-row:hover,
  .sc-dir-item:hover,
  .sc-choice:hover,
  .sc-chip:hover,
  .sc-clip:hover,
  .sc-setting-row:hover,
  .settings-row:hover,
  .settings-switch:hover,
  .ic-tab:hover,
  .ic-card-head:hover,
  .map-fab:hover,
  .map-btn:hover,
  .map-tab:hover,
  .map-gcard:hover,
  .map-sheet-item:hover,
  .map-find-card:hover,
  .article-nav:hover,
  .search-hit:hover,
  .toggle:hover,
  .map-chat-photo-btn:hover,
  .ms-btn:not(:disabled):hover,
  .sc-quiet:hover,
  .sc-action:hover,
  .topbar-action:hover,
  .secondary:not(:disabled):hover,
  .ic-btn:hover,
  .mapboxgl-ctrl-group button:hover {
    filter: brightness(1.08);
    box-shadow: var(--hover-glow);
  }

  .secondary:not(:disabled):hover,
  .topbar-action:hover,
  .ms-btn:not(:disabled):hover,
  .sc-quiet:hover,
  .sc-clip:hover,
  .ic-tab:hover,
  .map-tab:hover,
  .map-btn-ghost:hover,
  .map-chat-photo-btn:hover,
  .sc-chip:hover,
  .sc-setting-row:hover,
  .settings-row:hover,
  .settings-switch:hover,
  .ic-card-head:hover,
  .sc-dir-item:hover,
  .sc-choice:hover,
  .res-card:hover,
  .article-nav:hover,
  .search-hit:hover {
    border-color: var(--hover-border);
    background: var(--hover-fill);
    color: var(--text);
  }

  .login-btn:not(:disabled):hover,
  .ic-btn:not(.danger):hover,
  .map-btn-primary:hover,
  .sc-action:hover {
    filter: brightness(1.07);
    box-shadow: var(--hover-glow-strong);
    transform: translateY(-1px);
  }

  .rail-item:not(.restricted):not(.disabled):hover {
    color: #fff;
    background: var(--hover-fill);
    border-color: var(--hover-border);
  }

  .launch-card:not(.restricted):not(.disabled):hover,
  .launch-card:not(.restricted):not(.disabled):focus-visible {
    filter: brightness(1.05);
  }

  .links button:hover,
  .text-btn:hover,
  .crumb:hover,
  .cb-more:hover,
  .sc-pin-btn:hover,
  .sc-back:hover,
  button.topbar-identity:hover {
    filter: none;
    box-shadow: none;
    transform: none;
    color: #d6e8ff;
    text-shadow: 0 0 12px rgba(61, 141, 255, 0.45);
  }

  .sc-leave:hover,
  .sc-danger:hover,
  .sc-danger-btn:hover,
  .ic-btn.danger:hover {
    filter: none;
    transform: none;
    color: #ffcdd2;
    border-color: rgba(255, 107, 122, 0.7);
    background: rgba(255, 107, 122, 0.12);
    box-shadow: 0 0 0 1px rgba(255, 107, 122, 0.28), 0 0 16px rgba(255, 107, 122, 0.22);
  }

  .map-fab:hover {
    box-shadow: var(--hover-glow);
  }
  .map-fab-add:hover,
  .map-fab-add.active {
    box-shadow: 0 0 0 1px rgba(240, 180, 41, 0.5), 0 0 18px rgba(240, 180, 41, 0.35);
  }
  .sc-action-join:hover {
    box-shadow: 0 0 0 1px rgba(126, 87, 194, 0.45), 0 0 18px rgba(126, 87, 194, 0.28);
  }

  .sc-img:hover,
  .map-chat-img:hover {
    filter: brightness(1.08);
    box-shadow: var(--hover-glow);
  }

  .md a:hover,
  .article-link a:hover,
  .cb-md a:hover,
  .sc-msg-text a:hover {
    text-shadow: 0 0 10px rgba(61, 141, 255, 0.4);
  }
}

button:not(:disabled):not([aria-disabled="true"]):not(.restricted):not(.disabled):not(.launch-card):focus-visible,
.rail-item:not(.restricted):not(.disabled):focus-visible,
.res-card:focus-visible,
.sc-row:focus-visible,
.sc-dir-item:focus-visible,
.sc-choice:focus-visible,
.launch-card:not(.restricted):not(.disabled):focus-visible,
.map-fab:focus-visible,
.map-btn:focus-visible,
.ic-tab:focus-visible,
.secondary:focus-visible,
.login-btn:focus-visible,
.topbar-action:focus-visible {
  outline: none;
  box-shadow: var(--hover-glow);
}

.rail-item.restricted:hover,
.rail-item.disabled:hover,
.launch-card.restricted:hover,
.launch-card.disabled:hover,
button:disabled:hover,
button[aria-disabled="true"]:hover {
  filter: none;
  transform: none;
  box-shadow: none;
  text-shadow: none;
}

body.theme-light .links button:hover,
body.theme-light .text-btn:hover,
body.theme-light .crumb:hover,
body.theme-light .cb-more:hover,
body.theme-light .sc-pin-btn:hover,
body.theme-light .sc-back:hover,
body.theme-light button.topbar-identity:hover {
  color: #1d6fe8;
  text-shadow: 0 0 12px rgba(29, 111, 232, 0.28);
}
body.theme-light .sc-leave:hover,
body.theme-light .sc-danger:hover,
body.theme-light .sc-danger-btn:hover,
body.theme-light .ic-btn.danger:hover {
  color: #c62828;
}
