.collapsible-title {
  cursor: pointer;
  user-select: none;
  position: relative;
  transition: color 0.2s;
}
.collapsible-title:after {
  content: '\25BC';
  font-size: 0.9em;
  position: absolute;
  right: 0.5em;
  top: 50%;
  transform: translateY(-50%) rotate(0deg);
  transition: transform 0.2s;
}
.collapsible-title[aria-expanded="false"]:after {
  transform: translateY(-50%) rotate(-90deg);
}
.collapsible-title:focus-visible {
  outline: 2px solid #6366f1;
}
.collapsible {
  max-height: 2000px;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4,0,0.2,1);
}
.collapsible.collapsed {
  max-height: 0;
  padding: 0 !important;
  margin: 0 !important;
  display: none;
  pointer-events: none;
}
/* General page styling */
body {
  margin: 0;
  padding: 0;
  font-family: 'Poppins', Arial, Helvetica, sans-serif;
  /* Subtle gradient background for a modern feel */
  background: linear-gradient(135deg, #eef2ff, #fafaff);
  color: #2d3748;
}

.skip-link {
  position: absolute;
  top: 0.75rem;
  left: 50%;
  transform: translate(-50%, -150%);
  background: #4f46e5;
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  z-index: 1000;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.35);
  transition: transform 0.2s ease;
}
.skip-link:focus {
  transform: translate(-50%, 0);
  outline: 2px solid #fff;
  outline-offset: 4px;
}

#app {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}


h1 {
  margin-top: 0;
  margin-bottom: 0.25rem;
  font-size: 2.5rem;
  font-weight: 600;
  text-align: center;
  color: #1f2937;
}

/* App title with icon */
.app-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}

.app-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  background: #fff;
  object-fit: cover;
}


.subtitle {
  text-align: center;
  margin-bottom: 2rem;
  color: #6b7280;
  font-size: 1rem;
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
}


.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  justify-content: center;
}


.control-group {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
}


.control-group-row {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
}


.control-buttons {
  display: inline-flex;
  gap: 0.5rem;
  flex-wrap: nowrap;
}


.controls label {
  font-weight: 600;
  font-size: 0.95rem;
  color: #374151;
}

.policy-card {
  background: #ffffff;
  border-radius: 22px;
  padding: 2rem 2.5rem;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
  line-height: 1.7;
}
.policy-card header p {
  margin: 0.75rem 0 1.5rem;
  color: #475569;
}
.policy-card section + section {
  margin-top: 1.75rem;
}
.policy-card h2 {
  margin: 1.5rem 0 0.75rem;
  font-size: 1.35rem;
  color: #1e293b;
}
.policy-card h3 {
  margin: 1rem 0 0.5rem;
  font-size: 1.05rem;
  color: #1f2937;
}
.policy-card p {
  margin: 0.5rem 0 0;
}
.policy-card ul {
  margin: 0.5rem 0 0.75rem 1.2rem;
  padding: 0;
}
.policy-card li {
  margin: 0.25rem 0;
}
.policy-card a {
  text-decoration: underline;
}


.controls input {
  width: 180px;
  padding: 0.6rem 0.75rem;
  border: 1px solid #cbd5e0;
  border-radius: 6px;
  font-size: 0.95rem;
  background: #fff;
  color: #374151;
  transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.controls select {
  min-width: 120px;
  padding: 0.6rem 0.75rem;
  border: 1px solid #cbd5e0;
  border-radius: 6px;
  font-size: 0.95rem;
  background: #fff;
  color: #374151;
  transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

/* Make the talkgroup input shorter (approx 7 characters) */
#talkgroup {
  width: 7ch;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

#mapZoom {
  width: auto;
  min-width: 3.25rem;
  padding-left: 0.4rem;
  padding-right: 1.25rem;
  text-align: center;
}

.controls input:focus {
  outline: 2px solid rgba(79, 70, 229, 0.6);
  outline-offset: 2px;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

.controls select:focus {
  outline: 2px solid rgba(79, 70, 229, 0.6);
  outline-offset: 2px;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}


@media (max-width: 560px) {
  .control-group {
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
  }
  .control-group-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
  }
  .control-buttons {
    width: 100%;
    justify-content: center;
  }
  .control-buttons button {
    width: 100%;
  }
}


.controls button {
  padding: 0.6rem 1.25rem;
  border: none;
  border-radius: 6px;
  background-color: #4f46e5;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out, transform 0.1s ease-in-out;
}


.controls button[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}


.controls button:not([disabled]):hover {
  background-color: #4338ca;
  transform: translateY(-1px);
}


#current,
#history {
  background: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 1.5rem;
  margin-top: 1.25rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Layout for current call with large flag to the right */
.current-body {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: nowrap;
}
.current-body #currentCallInfo {
  flex: 1 1 auto;
  order: 1;
}
.current-flag {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 220px; /* large flag width */
  height: 140px; /* large flag height */
  order: 2;
}
.current-flag .large-flag {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  border: 1px solid rgba(0,0,0,0.06);
}
.current-flag.flag-top {
  width: 100%;
  height: auto;
  margin: 0.75rem 0 1rem;
  justify-content: center;
}
.current-flag.flag-top .large-flag {
  width: 100%;
  height: auto;
  max-height: 220px;
  object-fit: contain;
}
.current-body.flag-stacked {
  flex-direction: column;
  align-items: stretch;
}
.current-body.flag-stacked .current-flag {
  width: 100%;
  height: auto;
  margin: 0.75rem 0 1rem;
  justify-content: center;
  order: 1;
}
.current-body.flag-stacked #currentCallInfo {
  order: 2;
}

/* Small flag used in the recent calls table */
.history-flag {
  width: 36px;
  height: 24px;
  display: inline-block;
}
.history-flag img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 3px;
  border: 1px solid rgba(0,0,0,0.06);
}


#current h2,
#history h2 {
  margin-top: 0;
  font-size: 1.35rem;
  font-weight: 600;
  border-bottom: 1px solid #f3f4f6;
  padding-bottom: 0.5rem;
  color: #1f2937;
}

#currentCallInfo {
  margin-top: 0.5rem;
  line-height: 1.4;
}
#currentCallInfo .fcc-info {
  margin-top: 0;
  font-size: 0.95rem;
  line-height: 1.5;
}
#currentCallInfo .fcc-info strong {
  display: inline-block;
  margin-right: 0.1rem;
}
#currentCallInfo .fcc-info .fcc-line {
  display: block;
  margin-left: 1.4rem;
}

/* Current call prominent styling: larger callsign and name, callsign blue */
.current-callsign {
  font-size: 1.6rem;
  font-weight: 700;
  color: #1e40af; /* same blue as global links */
  text-decoration: none;
}
.current-callsign:visited { color: #1e40af; }
.current-callsign:focus { outline: 2px solid rgba(79,70,229,0.6); outline-offset: 2px; }
.current-name {
  display: block;
  margin-top: 6px;
  font-size: 1.15rem;
  font-weight: 600;
  color: #111827;
}


.map-container {
  position: relative;
  width: 100%;
  height: 400px;
  min-height: 280px;
  max-height: 80vh;
  border-radius: 10px;
  margin-top: 1.25rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  background: #ffffff;
}

#map {
  height: 100%;
  width: 100%;
}

.map-resize-handle {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 16px;
  cursor: ns-resize;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 4px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(79, 70, 229, 0.12) 100%);
  touch-action: none;
}
.map-resize-handle:focus-visible {
  outline: 2px solid rgba(79,70,229,0.8);
  outline-offset: 2px;
}

.map-resize-handle::before {
  content: '';
  width: 48px;
  height: 4px;
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.35);
}

/* Table styling for recent calls */

#history {
  position: relative;
}

.history-table-wrapper {
  overflow: auto;
  max-width: 100%;
  width: 100%;
  max-height: clamp(320px, 55vh, 560px);
  padding-bottom: 0.5rem;
  margin-top: 0.75rem;
  -webkit-overflow-scrolling: touch;
  outline: none;
}
.history-table-wrapper:focus-visible {
  outline: 2px solid rgba(79,70,229,0.6);
  outline-offset: 3px;
}


#historyTable {
  width: 100%;
  border-collapse: collapse;
  min-width: 960px;
  font-size: 0.9rem;
}

#historyTable th,
#historyTable td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid #f3f4f6;
}

#historyTable th {
  background-color: #f9fafb;
  font-weight: 600;
  text-align: left;
  color: #4b5563;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

#historyTable thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  box-shadow: inset 0 -1px 0 rgba(148, 163, 184, 0.45);
}

#historyTable tr:nth-child(odd) td {
  background-color: #fafbfc;
}

#historyTable tr:last-child td {
  border-bottom: none;
}

/* Tooltip for map preview on hover over location cells */
.map-tooltip {
  position: absolute;
  display: none;
  z-index: 1000;
  border: 1px solid #d1d5da;
  background-color: #fff;
  padding: 4px;
  box-shadow: 0 2px 4px rgba(27, 31, 35, 0.15);
  border-radius: 4px;
}

.map-tooltip img {
  display: block;
  max-width: 250px;
  max-height: 150px;
}

/* Collapsible map row inside the history table */
.history-map-row td {
  padding: 0; /* remove default padding so map touches edges */
  border-bottom: none;
}
.history-map {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.28s ease;
}
.history-map.open {
  max-height: 320px; /* expanded height */
}
.history-map .map-inner {
  height: 300px;
  width: 100%;
}

/* Styling for the "On Air" indicator shown in the current call pane */
.on-air {
  color: #d73a49; /* red color similar to GitHub danger color */
  font-weight: bold;
}
.off-air {
  color: #6b7280; /* muted gray */
  font-weight: 600;
}

/* Footer styling */
.footer {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.85rem;
  color: #6b7280;
}

.footer strong {
  color: #4f46e5;
}

.footer-links {
  margin-top: 0.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.footer-link {
  color: #dc2626;
  text-decoration: none;
  font-size: 0.85rem;
}
.footer-link:visited {
  color: #dc2626;
}
.footer-link:hover {
  color: #b91c1c;
}
.footer-link:focus-visible {
  outline: 2px solid rgba(79,70,229,0.6);
  outline-offset: 2px;
}

button.footer-link {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
  color: #dc2626;
}
button.footer-link:hover {
  color: #b91c1c;
}

/* Keep help mailto link visually identical to surrounding footer text */
.footer .help-note a {
  color: inherit;
  text-decoration: none;
}
.footer .help-note a:hover {
  color: inherit;
  text-decoration: none;
}

/* Callsign links in the history table: no underline, keep color on visited, but retain focus outline for keyboard users */
#historyTable a {
  text-decoration: none;
  color: inherit;
}
#historyTable a:visited {
  color: inherit;
}
#historyTable a:focus {
  outline: 2px solid rgba(79,70,229,0.6);
  outline-offset: 2px;
}

/* Global link styling inside the app: blue and no underline, including visited state */
#app a {
  color: #1e40af; /* blue */
  text-decoration: none;
}
#app a:visited {
  color: #1e40af;
}
#app a:hover {
  color: #1e40af;
  text-decoration: none;
}
#app a:focus {
  outline: 2px solid rgba(79,70,229,0.6);
  outline-offset: 2px;
}

/* Current call card links should behave the same as history callsigns */
#currentCallInfo a {
  text-decoration: none;
  color: inherit;
}
#currentCallInfo a:visited {
  color: inherit;
}
#currentCallInfo a:focus {
  outline: 2px solid rgba(79,70,229,0.6);
  outline-offset: 2px;
}

.consent-banner {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
  z-index: 1400;
}
.consent-banner--secondary {
  align-items: center;
  z-index: 1450;
}
.consent-banner--secondary .consent-inner {
  width: min(480px, 100%);
}
.consent-banner[hidden] {
  display: none !important;
}
.consent-inner {
  width: min(560px, 100%);
  border-radius: 16px;
  padding: 1.5rem;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.4);
}
.consent-inner:focus {
  outline: none;
}
.consent-copy {
  margin: 0.75rem 0 1.25rem;
  line-height: 1.5;
}
.consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.consent-actions--end {
  justify-content: flex-end;
}
.consent-note {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: #475569;
}
.consent-section + .consent-section {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e2e8f0;
}
.consent-subtitle {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
}
.consent-description {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  line-height: 1.4;
}
.consent-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}
.consent-toggle input[type='checkbox'] {
  width: 1.1rem;
  height: 1.1rem;
}
.consent-status {
  margin: 0;
  font-size: 0.85rem;
  color: #475569;
}
.consent-clear {
  margin-top: 0.75rem;
}
.consent-feedback {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  min-height: 1.1em;
  color: #0f172a;
}

body.theme-dark .consent-inner {
  background: #111827;
  color: #e2e8f0;
  box-shadow: 0 25px 50px -12px rgba(8, 47, 73, 0.75);
}
body.theme-dark .consent-banner--secondary .consent-inner {
  background: #0f172a;
}
body.theme-dark .consent-note {
  color: #cbd5f5;
}
body.theme-dark .consent-section + .consent-section {
  border-top-color: #1f2937;
}
body.theme-dark .consent-status,
body.theme-dark .consent-feedback {
  color: #cbd5f5;
}
body.theme-highcontrast .consent-inner {
  background: #000;
  color: #fff;
  border: 3px solid #fff;
}
body.theme-highcontrast .consent-note {
  color: #fff;
}
body.theme-highcontrast .consent-section + .consent-section {
  border-top-color: #fff;
}
body.theme-highcontrast .consent-status,
body.theme-highcontrast .consent-feedback {
  color: #fff;
}
body.theme-dark .policy-card {
  background: #0f172a;
  color: #e2e8f0;
  box-shadow: 0 25px 50px -12px rgba(8, 47, 73, 0.7);
}
body.theme-dark .policy-card header p {
  color: #cbd5f5;
}
body.theme-dark .policy-card h2,
body.theme-dark .policy-card h3 {
  color: #f8fafc;
}
body.theme-dark .policy-card a {
  color: #93c5fd;
}
body.theme-dark .policy-card a:visited {
  color: #bfdbfe;
}
body.theme-highcontrast .policy-card {
  background: #000;
  color: #fff;
  border: 3px solid #fff;
  box-shadow: none;
}
body.theme-highcontrast .policy-card header p,
body.theme-highcontrast .policy-card a {
  color: #fff;
}
body.theme-highcontrast .footer-links a {
  color: #fff;
}
body.theme-dark .footer-links a,
body.theme-brandmeister .footer-links a,
body.theme-droidstar .footer-links a,
body.theme-pistar .footer-links a,
body.theme-wpsd .footer-links a {
  color: inherit;
}
body.theme-highcontrast .footer-link {
  color: #fff;
}
body.theme-dark .footer-link,
body.theme-brandmeister .footer-link,
body.theme-droidstar .footer-link,
body.theme-pistar .footer-link,
body.theme-wpsd .footer-link {
  color: inherit;
}

/* Log viewer toggle heart */
.heart {
  cursor: pointer;
  display: inline-block;
  transition: transform 0.2s ease;
}
.heart:hover { transform: scale(1.15); }
.heart:focus-visible {
  outline: 2px solid rgba(79,70,229,0.6);
  outline-offset: 3px;
  transform: scale(1.05);
}

/* Floating log viewer panel */
.log-viewer {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 340px;
  max-height: 60vh;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  border-radius: 10px;
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 1200;
  font-size: 12px;
}
.log-viewer {
  resize: both;
  min-width: 280px;
  min-height: 160px;
  max-width: 90vw;
  max-height: 90vh;
}
.log-viewer.open { display: flex; }
.log-header {
  background: #f3f4f6;
  padding: 0.5rem 0.75rem;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #1f2937;
  border-bottom: 1px solid #e5e7eb;
}
.log-grip {
  width: 14px;
  height: 14px;
  background: linear-gradient(135deg,#e5e7eb,#cbd5e1);
  border-radius: 3px;
  margin-right: 8px;
  opacity: 0.95;
  cursor: nwse-resize;
}
.log-tabs { display: flex; gap: 4px; }
.log-tab {
  background: #e5e7eb;
  border: none;
  padding: 4px 8px;
  font-size: 11px;
  cursor: pointer;
  border-radius: 4px;
  color: #374151;
}
.log-tab.active { background: #4f46e5; color: #fff; }
.log-tab:hover { background: #d1d5db; }
.hidden { display: none !important; }
.log-close {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #6b7280;
  line-height: 1;
  padding: 0 4px;
}
.log-close:hover { color: #111827; }
.log-content {
  padding: 0.5rem;
  flex: 1 1 auto;
  overflow-y: auto;
  background: #fff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  line-height: 1.25;
}
.log-entry {
  padding: 6px 8px;
  margin-bottom: 6px;
  border-bottom: 1px solid #f3f4f6;
  white-space: pre-wrap;
  word-break: break-word;
  border-radius: 6px;
}
.log-entry:last-child { border-bottom: none; margin-bottom: 0; }

.log-entry pre {
  margin: 6px 0 0 0;
  background: #f8fafc;
  padding: 8px;
  border-radius: 6px;
  overflow: auto;
  font-size: 12px;
}
.log-entry.debug { opacity: 0.65; }
.log-entry.warn { background: #fffbe6; }
.log-entry.error { background: #fde2e2; }
.log-footer {
  padding: 0.4rem 0.5rem;
  background: #f9fafb;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.log-footer-left { display: flex; gap: 6px; }
.log-clear {
  background: #ef4444;
  border: none;
  color: #fff;
  padding: 4px 8px;
  font-size: 11px;
  border-radius: 4px;
  cursor: pointer;
}
.log-clear.alt { background: #6366f1; }
.log-clear.alt:hover { background: #4f46e5; }
.log-clear:hover { background: #dc2626; }
.log-auto-refresh {
  font-size: 11px;
  color: #374151;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Share, Talkgroups, Nets, Help, and Listen section styling */
.share-section,
.talkgroups-section,
.nets-section,
.help-section,
.listen-section {
  background: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 1.5rem;
  margin-top: 1.25rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.draggable-card {
  position: relative;
}
.draggable-card .collapsible-title {
  padding-left: 2.85rem;
  padding-right: 1rem;
}
.card-handle {
  position: absolute;
  top: 1.25rem;
  left: 1.05rem;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  color: #6b7280;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  font-size: 1.05rem;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  z-index: 2;
  user-select: none;
}
.card-handle:hover {
  background: #e5e7eb;
  color: #374151;
}
.card-handle:active {
  cursor: grabbing;
  background: #e0e7ff;
  border-color: #6366f1;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
  color: #1e3a8a;
}
.card-handle:focus-visible {
  outline: 2px solid #6366f1;
  outline-offset: 2px;
}
.draggable-card.is-dragging {
  opacity: 0.85;
  box-shadow: 0 12px 25px rgba(15, 23, 42, 0.18);
}
.settings-section {
  background: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 1.5rem;
  margin-top: 1.25rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.settings-section h2 {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
  font-weight: 600;
  border-bottom: 1px solid #f3f4f6;
  padding-bottom: 0.5rem;
  color: #1f2937;
}

.listen-body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.listen-copy {
  margin: 0;
  color: #4b5563;
  line-height: 1.6;
}

.listen-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  width: 100%;
}

.listen-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 1.15rem 2.1rem;
  border: none;
  border-radius: 35px;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #ffffff;
  font-weight: 600;
  font-size: 1.05rem;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  text-align: center;
  width: min(100%, 240px);
  min-height: 92px;
  margin: 0 auto;
}

.listen-button:hover,
.listen-button:focus {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.16);
}

.listen-button:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.45);
  outline-offset: 3px;
}

.listen-icon {
  display: block;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.listen-label {
  display: block;
}

@media (max-width: 520px) {
  .listen-button {
    width: min(100%, 280px);
    padding: 1.05rem 1.9rem;
    min-height: 90px;
  }
  .listen-icon {
    width: 48px;
    height: 48px;
  }
}

.listen-label {
  letter-spacing: 0.01em;
}

/* Dark theme overrides */
body.theme-dark {
  background: linear-gradient(135deg, #0f172a, #1f2937);
  color: #e2e8f0;
}

body.theme-dark h1 {
  color: #f8fafc;
}

body.theme-dark .subtitle {
  color: #94a3b8;
}

body.theme-dark .controls label {
  color: #e2e8f0;
}

body.theme-dark .controls input,
body.theme-dark .controls select {
  background: #0f172a;
  border: 1px solid #475569;
  color: #e2e8f0;
}

body.theme-dark .controls input:focus,
body.theme-dark .controls select:focus {
  border-color: #818cf8;
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.35);
}

body.theme-dark #current,
body.theme-dark #history,
body.theme-dark .share-section,
body.theme-dark .talkgroups-section,
body.theme-dark .nets-section,
body.theme-dark .help-section,
body.theme-dark .listen-section,
body.theme-dark .settings-section,
  body.theme-dark .map-container {
  background: #1f2937;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

body.theme-dark .card-handle {
  background: #111827;
  border-color: #334155;
  color: #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}
body.theme-dark .card-handle:hover {
  background: #1f2937;
  color: #f8fafc;
}
body.theme-dark .card-handle:active {
  background: #312e81;
  border-color: #6366f1;
  color: #e0e7ff;
  box-shadow: 0 8px 18px rgba(129, 140, 248, 0.35);
}

body.theme-dark #current h2,
body.theme-dark #history h2,
body.theme-dark .settings-section h2,
body.theme-dark .share-section h2,
body.theme-dark .talkgroups-section h2,
body.theme-dark .nets-section h2,
body.theme-dark .help-section h2,
body.theme-dark .listen-section h2 {
  border-bottom-color: #334155;
  color: #e2e8f0;
}

body.theme-dark .share-note {
  color: #cbd5f5;
}
body.theme-dark .listen-copy {
  color: #cbd5f5;
}
body.theme-dark .listen-button {
  background: linear-gradient(135deg, #4338ca, #6366f1);
  box-shadow: 0 12px 22px rgba(99, 102, 241, 0.35);
}
body.theme-dark .listen-button:hover,
body.theme-dark .listen-button:focus {
  background: linear-gradient(135deg, #3730a3, #4f46e5);
  box-shadow: 0 16px 26px rgba(99, 102, 241, 0.45);
}
body.theme-dark .nets-filter-label {
  color: #e2e8f0;
}
body.theme-dark .nets-filter-select {
  background: #0f172a;
  border-color: #475569;
  color: #e2e8f0;
}
body.theme-dark .nets-filter-select:focus {
  border-color: #818cf8;
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.35);
}
body.theme-dark .net-item {
  background: rgba(17, 24, 39, 0.8);
  border-color: #273149;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.55);
}
body.theme-dark .net-name,
body.theme-dark .net-detail-label {
  color: #f8fafc;
}
body.theme-dark .net-schedule-row,
body.theme-dark .nets-empty {
  color: #94a3b8;
}
body.theme-dark .net-schedule-primary {
  color: #f8fafc;
}
body.theme-dark .net-details {
  color: #e2e8f0;
}
body.theme-dark .net-notes {
  color: #cbd5f5;
}
body.theme-dark .net-time-row {
  color: #e2e8f0;
}
body.theme-dark .net-time-label {
  color: #f8fafc;
}
body.theme-dark .net-link {
  background: rgba(79, 70, 229, 0.25);
  color: #c7d2fe;
}
body.theme-dark .net-actions-label {
  color: #cbd5f5;
}
body.theme-dark .net-action-button {
  background: rgba(79, 70, 229, 0.2);
  border-color: rgba(99, 102, 241, 0.45);
  color: #c7d2fe;
}
body.theme-dark .net-action-button:hover,
body.theme-dark .net-action-button:focus {
  background: rgba(99, 102, 241, 0.35);
  border-color: rgba(129, 140, 248, 0.7);
  color: #e0e7ff;
  box-shadow: 0 8px 18px rgba(99, 102, 241, 0.35);
}
body.theme-dark .net-link:hover,
body.theme-dark .net-link:focus {
  background: rgba(99, 102, 241, 0.35);
  color: #e0e7ff;
  box-shadow: 0 8px 18px rgba(99, 102, 241, 0.35);
}
body.theme-dark .net-time-value-utc {
  color: #c7d2fe;
}
body.theme-dark .net-time-value-local {
  color: #f8fafc;
}
body.theme-dark .nets-error {
  color: #f87171;
}
body.theme-dark .help-item {
  background: rgba(17, 24, 39, 0.85);
  border-color: #273149;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.55);
}
body.theme-dark .help-question {
  color: #f8fafc;
}
body.theme-dark .help-answer {
  color: #cbd5f5;
}
body.theme-dark .help-empty {
  color: #94a3b8;
}
body.theme-dark .help-error {
  color: #f87171;
}

body.theme-dark .current-name {
  color: #e2e8f0;
}

body.theme-dark .current-callsign {
  color: #a5b4fc;
}
body.theme-dark .current-callsign:visited {
  color: #a5b4fc;
}

body.theme-dark #historyTable th,
body.theme-dark #historyTable td {
  border-bottom: 1px solid #273149;
}

body.theme-dark #historyTable th {
  background-color: #1e293b;
  color: #e2e8f0;
}

body.theme-dark #historyTable thead th {
  box-shadow: inset 0 -1px 0 rgba(15, 23, 42, 0.85);
}

body.theme-dark #historyTable tr:nth-child(odd) td {
  background-color: #1b2537;
}

body.theme-dark .history-table-wrapper:focus-visible {
  outline: 2px solid rgba(129,140,248,0.85);
}

body.theme-dark .map-resize-handle {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0) 0%, rgba(99, 102, 241, 0.2) 100%);
}

body.theme-dark .map-resize-handle::before {
  background: rgba(129, 140, 248, 0.5);
}

body.theme-dark .footer {
  color: #94a3b8;
}

body.theme-dark .footer strong {
  color: #a5b4fc;
}

body.theme-dark #app a,
body.theme-dark #app a:visited,
body.theme-dark #app a:hover {
  color: #93c5fd;
}

body.theme-dark .log-viewer {
  background: #111827;
  border: 1px solid #1f2937;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  color: #e2e8f0;
}

body.theme-dark .log-header,
body.theme-dark .log-footer {
  background: #1e293b;
  border-color: #273149;
  color: #e2e8f0;
}

body.theme-dark .log-tab {
  background: #273149;
  color: #e2e8f0;
}

body.theme-dark .log-tab:hover {
  background: #334155;
}

body.theme-dark .log-tab.active {
  background: #4f46e5;
  color: #f8fafc;
}

body.theme-dark .log-content {
  background: #0f172a;
}

body.theme-dark .log-entry {
  border-bottom-color: #273149;
}

body.theme-dark .log-entry pre {
  background: #111c32;
}

body.theme-dark .log-clear.alt {
  background: #4f46e5;
}

body.theme-dark .log-clear.alt:hover {
  background: #4338ca;
}

body.theme-dark .log-auto-refresh {
  color: #cbd5f5;
}

body.theme-dark .share-status {
  color: #e2e8f0;
}

body.theme-dark .controls button {
  background-color: #4c51bf;
}

body.theme-dark .controls button:not([disabled]):hover {
  background-color: #4338ca;
}

body.theme-dark .controls button[disabled] {
  background-color: #4c51bf;
  opacity: 0.45;
}

/* Dark Matter theme overrides */
body.theme-darkmatter {
  background-color: rgb(38, 38, 38);
  background-image: none;
  color: rgb(38, 38, 38); /* default text color per spec */
}

body.theme-darkmatter h1 {
  color: #f4f4f5;
}

body.theme-darkmatter .subtitle {
  color: #e0e0e0;
}

body.theme-darkmatter .controls label {
  color: #f5f5f5;
}

body.theme-darkmatter .controls input,
body.theme-darkmatter .controls select {
  background: rgb(9, 9, 9);
  border: 1px solid #3f3f3f;
  color: #f5f5f5;
}

body.theme-darkmatter .controls input:focus,
body.theme-darkmatter .controls select:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.35);
}

body.theme-darkmatter #current,
body.theme-darkmatter #history,
body.theme-darkmatter .share-section,
body.theme-darkmatter .talkgroups-section,
body.theme-darkmatter .nets-section,
body.theme-darkmatter .help-section,
body.theme-darkmatter .listen-section,
body.theme-darkmatter .settings-section,
body.theme-darkmatter .map-container {
  background: rgb(9, 9, 9);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
  color: #f5f5f5;
  border: 1px solid #3f3f3f;
}

body.theme-darkmatter .card-handle {
  background: #111;
  border-color: #3f3f3f;
  color: #f5f5f5;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55);
}
body.theme-darkmatter .card-handle:hover {
  background: #171717;
  color: #fafafa;
}
body.theme-darkmatter .card-handle:active {
  background: #1f2937;
  border-color: #38bdf8;
  color: #f8fafc;
  box-shadow: 0 10px 24px rgba(56, 189, 248, 0.45);
}

body.theme-darkmatter #current h2,
body.theme-darkmatter #history h2,
body.theme-darkmatter .settings-section h2,
body.theme-darkmatter .share-section h2,
body.theme-darkmatter .talkgroups-section h2,
body.theme-darkmatter .nets-section h2,
body.theme-darkmatter .help-section h2,
body.theme-darkmatter .listen-section h2 {
  border-bottom-color: #2f2f2f;
  color: #f5f5f5;
}

body.theme-darkmatter .share-note,
body.theme-darkmatter .share-status {
  color: #cbd5f5;
}
body.theme-darkmatter .listen-copy {
  color: #cbd5f5;
}
body.theme-darkmatter .listen-button {
  background: rgb(38, 38, 38);
  color: #f5f5f5;
  box-shadow: 0 8px 22px rgba(38, 38, 38, 0.45);
  border: 1px solid rgb(56, 56, 56);
}
body.theme-darkmatter .listen-button:hover,
body.theme-darkmatter .listen-button:focus {
  background: rgb(48, 48, 48);
  box-shadow: 0 12px 26px rgba(38, 38, 38, 0.55);
  color: #f5f5f5;
  border: 1px solid rgb(76, 76, 76);
}

body.theme-darkmatter .nets-filter-label {
  color: #f4f4f5;
}
body.theme-darkmatter .nets-filter-select {
  background: #0f0f0f;
  border-color: #3f3f3f;
  color: #f5f5f5;
}
body.theme-darkmatter .nets-filter-select:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.35);
}
body.theme-darkmatter .net-item {
  background: rgba(15, 15, 15, 0.9);
  border-color: #2f2f2f;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
}
body.theme-darkmatter .net-name,
body.theme-darkmatter .net-detail-label,
body.theme-darkmatter .net-schedule-primary,
body.theme-darkmatter .net-time-label {
  color: #f4f4f5;
}
body.theme-darkmatter .net-schedule-row,
body.theme-darkmatter .net-details,
body.theme-darkmatter .net-notes,
body.theme-darkmatter .net-time-row,
body.theme-darkmatter .nets-empty {
  color: #d4d4d8;
}
body.theme-darkmatter .net-link {
  background: rgb(38, 38, 38);
  color: #d4d4d8 !important;
}
body.theme-darkmatter .net-link:hover,
body.theme-darkmatter .net-link:focus {
  background: rgb(48, 48, 48);
  color: #f4f4f5 !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}
body.theme-darkmatter .net-actions-label {
  color: #d4d4d8;
}
body.theme-darkmatter .net-action-button {
  background: rgb(38, 38, 38);
  border-color: #3f3f3f;
  color: #f5f5f5;
}
body.theme-darkmatter .net-action-button:hover,
body.theme-darkmatter .net-action-button:focus {
  background: rgb(48, 48, 48);
  border-color: #525252;
  color: #f5f5f5;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.45);
}
body.theme-darkmatter .net-time-value-utc {
  color: #bae6fd;
}
body.theme-darkmatter .net-time-value-local {
  color: #e0f2fe;
}
body.theme-darkmatter .nets-error {
  color: #fca5a5;
}

body.theme-darkmatter .help-item {
  background: rgba(15, 15, 15, 0.9);
  border-color: #2f2f2f;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
}
body.theme-darkmatter .help-question {
  color: #f4f4f5;
}
body.theme-darkmatter .help-answer {
  color: #d4d4d8;
}
body.theme-darkmatter .help-empty {
  color: #9ca3af;
}
body.theme-darkmatter .help-error {
  color: #fca5a5;
}

body.theme-darkmatter .current-name {
  color: #f4f4f5;
}
body.theme-darkmatter .current-callsign,
body.theme-darkmatter #app a:not(.net-link),
body.theme-darkmatter #app a:not(.net-link):visited,
body.theme-darkmatter #app a:not(.net-link):hover {
  color: #38bdf8;
}

body.theme-darkmatter #historyTable th,
body.theme-darkmatter #historyTable td {
  border-bottom: 1px solid #2f2f2f;
}
body.theme-darkmatter #historyTable th {
  background: #111;
  color: #f4f4f5;
}
body.theme-darkmatter #historyTable thead th {
  box-shadow: inset 0 -1px 0 rgba(56, 189, 248, 0.35);
}
body.theme-darkmatter #historyTable tr:nth-child(odd) td {
  background: rgba(24, 24, 27, 0.75);
}

body.theme-darkmatter .history-table-wrapper:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 4px;
}

body.theme-darkmatter .map-resize-handle {
  background: linear-gradient(180deg, rgba(56, 189, 248, 0) 0%, rgba(56, 189, 248, 0.32) 100%);
}
body.theme-darkmatter .map-resize-handle::before {
  background: rgba(56, 189, 248, 0.55);
}

body.theme-darkmatter .footer {
  color: #d4d4d8;
}
body.theme-darkmatter .footer strong {
  color: #f4f4f5;
}

body.theme-darkmatter .log-viewer {
  background: #0f0f0f;
  border-color: #2f2f2f;
  color: #f5f5f5;
}
body.theme-darkmatter .log-header,
body.theme-darkmatter .log-footer {
  border-color: #2f2f2f;
}
body.theme-darkmatter .log-tab {
  background: #111;
  color: #d4d4d8;
  border-color: #3f3f3f;
}
body.theme-darkmatter .log-tab:hover {
  background: #171717;
  color: #f4f4f5;
}
body.theme-darkmatter .log-tab.active {
  background: #1d4ed8;
  color: #f4f4f5;
  border-color: #38bdf8;
}
body.theme-darkmatter .log-content {
  background: #0b0b0c;
}
body.theme-darkmatter .log-entry {
  border-bottom-color: #2f2f2f;
}
body.theme-darkmatter .log-entry pre {
  background: #111;
  color: #e5e5e5;
}
body.theme-darkmatter .log-clear.alt {
  background: rgba(248, 113, 113, 0.2);
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.25);
}
body.theme-darkmatter .log-clear.alt:hover,
body.theme-darkmatter .log-clear.alt:focus {
  background: rgba(248, 113, 113, 0.35);
  color: #fee2e2;
}
body.theme-darkmatter .log-auto-refresh {
  color: #d4d4d8;
}

body.theme-darkmatter .controls button {
  background: rgb(38, 38, 38);
  color: #f5f5f5;
  border: 1px solid #3f3f3f;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45);
}
body.theme-darkmatter .controls button:not([disabled]):hover {
  background: rgb(48, 48, 48);
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.55);
}
body.theme-darkmatter .controls button[disabled] {
  opacity: 0.45;
  background: rgb(38, 38, 38);
  color: rgba(245, 245, 245, 0.6);
}

/* High-contrast theme overrides (low vision) */
html.theme-highcontrast {
  font-size: 125%; /* bump rem-based typography */
}

body.theme-highcontrast {
  background: #000;
  color: #fff;
  font-size: 1.2rem;
  line-height: 1.8;
}

body.theme-highcontrast h1 {
  color: #fff;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.6);
  font-size: 3.4rem;
}

body.theme-highcontrast .subtitle {
  color: #ffe066;
  font-size: 1.35rem;
}

body.theme-highcontrast h2 {
  font-size: 1.9rem;
}

body.theme-highcontrast .controls label {
  color: #fff;
  font-size: 1.15rem;
}

body.theme-highcontrast .controls input,
body.theme-highcontrast .controls select {
  background: #000;
  border: 2px solid #fff;
  color: #fff;
  box-shadow: none;
  font-size: 1.15rem;
}

body.theme-highcontrast .controls input::placeholder,
body.theme-highcontrast .controls select::placeholder {
  color: #f5f5f5;
}

body.theme-highcontrast .controls input,
body.theme-highcontrast .controls select,
body.theme-highcontrast .controls button {
  min-height: 2.75rem;
  padding: 0.55rem 0.9rem;
}

body.theme-highcontrast .controls input:focus,
body.theme-highcontrast .controls select:focus {
  outline: 3px solid #ffdd00;
  outline-offset: 2px;
  border-color: #ffdd00;
  box-shadow: 0 0 0 3px rgba(255, 221, 0, 0.35);
}

body.theme-highcontrast #current,
body.theme-highcontrast #history,
body.theme-highcontrast .share-section,
body.theme-highcontrast .talkgroups-section,
body.theme-highcontrast .nets-section,
body.theme-highcontrast .help-section,
body.theme-highcontrast .listen-section,
body.theme-highcontrast .settings-section,
body.theme-highcontrast .map-container {
  background: #000;
  border: 2px solid #fff;
  box-shadow: none;
}

body.theme-highcontrast .card-handle {
  background: #000;
  border: 2px solid #fff;
  color: #fff;
  box-shadow: none;
  left: 1.2rem;
  top: 1.35rem;
  width: 40px;
  height: 40px;
}
body.theme-highcontrast .card-handle:hover,
body.theme-highcontrast .card-handle:active {
  background: #ffdd00;
  color: #000;
}

body.theme-highcontrast #current h2,
body.theme-highcontrast #history h2,
body.theme-highcontrast .settings-section h2,
body.theme-highcontrast .share-section h2,
body.theme-highcontrast .talkgroups-section h2,
body.theme-highcontrast .nets-section h2,
body.theme-highcontrast .help-section h2,
body.theme-highcontrast .listen-section h2 {
  border-bottom-color: #fff;
  color: #fff;
  font-size: 1.9rem;
}

body.theme-highcontrast .share-note,
body.theme-highcontrast .share-status {
  color: #ffe066;
  font-size: 1.2rem;
}
body.theme-highcontrast .listen-copy {
  color: #ffe066;
  font-size: 1.2rem;
}
body.theme-highcontrast .listen-button {
  background: #ffdd00;
  color: #000;
  box-shadow: none;
}
body.theme-highcontrast .listen-button:hover,
body.theme-highcontrast .listen-button:focus {
  background: #ffe95f;
  box-shadow: none;
  transform: translateY(-1px);
}
body.theme-highcontrast .listen-button:focus-visible {
  outline-color: #fff;
}
body.theme-highcontrast .nets-filter-label {
  color: #fff;
  font-size: 1.15rem;
}
body.theme-highcontrast .nets-filter-select {
  background: #000;
  border: 2px solid #fff;
  color: #fff;
  font-size: 1.15rem;
  min-height: 2.75rem;
  padding: 0.55rem 0.9rem;
}
body.theme-highcontrast .nets-filter-select:focus {
  outline: 3px solid #ffdd00;
  outline-offset: 2px;
  border-color: #ffdd00;
  box-shadow: none;
}
body.theme-highcontrast .net-item {
  background: #000;
  border: 2px solid #fff;
  box-shadow: none;
}
body.theme-highcontrast .help-item {
  background: #000;
  border: 2px solid #fff;
  box-shadow: none;
}
body.theme-highcontrast .net-name,
body.theme-highcontrast .net-detail-label {
  color: #fff;
  font-size: 1.9rem;
}
body.theme-highcontrast .net-schedule-row,
body.theme-highcontrast .net-details,
body.theme-highcontrast .net-notes,
body.theme-highcontrast .nets-empty {
  color: #ffe066;
  font-size: 1.2rem;
}
body.theme-highcontrast .net-schedule-primary {
  color: #fff;
}
body.theme-highcontrast .help-question,
body.theme-highcontrast .help-answer {
  color: #fff;
  font-size: 1.2rem;
}
body.theme-highcontrast .help-empty {
  color: #ffe066;
  font-size: 1.2rem;
}
body.theme-highcontrast .help-error {
  color: #ff4d4f;
  font-size: 1.2rem;
}
body.theme-highcontrast .net-time-row {
  color: #ffe066;
  font-size: 1.2rem;
}
body.theme-highcontrast .net-time-label {
  color: #fff;
  font-size: 1.25rem;
}
body.theme-highcontrast .net-link {
  background: #ffdd00;
  color: #000;
  font-size: 1.15rem;
  padding: 0.6rem 0.95rem;
  border-radius: 0;
}
body.theme-highcontrast .net-actions-label {
  color: #fff;
  font-size: 1.15rem;
}
body.theme-highcontrast .net-action-button {
  background: #ffe066;
  border: 2px solid #000;
  color: #000;
  font-size: 1.1rem;
  border-radius: 0;
  padding: 0.45rem 0.9rem;
}
body.theme-highcontrast .net-action-button:hover,
body.theme-highcontrast .net-action-button:focus {
  background: #fff;
  color: #000;
  border-color: #000;
  box-shadow: none;
}
body.theme-highcontrast .net-link:hover,
body.theme-highcontrast .net-link:focus {
  background: #fff;
  color: #000;
  box-shadow: none;
}
body.theme-highcontrast .net-time-value-utc {
  color: #ffdd00;
}
body.theme-highcontrast .net-time-value-local {
  color: #fff;
}
body.theme-highcontrast .nets-error {
  color: #ff6b6b;
  font-size: 1.2rem;
}

body.theme-highcontrast .current-name {
  color: #fff;
  font-size: 2.75rem;
  font-weight: 700;
}

body.theme-highcontrast .current-callsign,
body.theme-highcontrast .current-callsign:visited {
  color: #ffdd00;
  font-size: 3.1rem;
  line-height: 1.05;
  letter-spacing: 0.05em;
}

body.theme-highcontrast #historyTable th,
body.theme-highcontrast #historyTable td {
  border-bottom: 2px solid #fff;
  color: #fff;
  font-size: 1.85rem;
  padding: 0.85rem 1rem;
}

body.theme-highcontrast #historyTable th {
  background: #000;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

body.theme-highcontrast #historyTable thead th {
  box-shadow: inset 0 -2px 0 #fff;
}

body.theme-highcontrast #historyTable td:nth-child(2) a {
  font-size: 2.25rem;
  font-weight: 800;
  color: #ffdd00;
}

body.theme-highcontrast #historyTable td:nth-child(2) a:visited {
  color: #ffdd00;
}

body.theme-highcontrast .history-flag {
  width: 88px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}
body.theme-highcontrast .history-flag img {
  border-width: 2px;
  width: 100%;
  height: 100%;
}

body.theme-highcontrast .current-flag {
  width: 300px;
  height: 190px;
}
body.theme-highcontrast .current-flag .large-flag {
  border-width: 2px;
}

body.theme-highcontrast #historyTable tr:nth-child(odd) td {
  background-color: #111;
}

body.theme-highcontrast p,
body.theme-highcontrast li,
body.theme-highcontrast span,
body.theme-highcontrast label,
body.theme-highcontrast button,
body.theme-highcontrast input,
body.theme-highcontrast select {
  font-size: 1.15rem;
}

body.theme-highcontrast .map-resize-handle {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 221, 0, 0.35) 100%);
}

body.theme-highcontrast .map-resize-handle:focus-visible {
  outline: 3px solid #ffdd00;
  outline-offset: 2px;
}

body.theme-highcontrast .map-resize-handle::before {
  background: #ffdd00;
}

body.theme-highcontrast .footer {
  color: #fff;
}

body.theme-highcontrast .footer strong {
  color: #ffdd00;
}

body.theme-highcontrast #app a,
body.theme-highcontrast #app a:visited,
body.theme-highcontrast #app a:hover {
  color: #ffdd00;
  text-decoration: underline;
}

body.theme-highcontrast #app a:focus,
body.theme-highcontrast #historyTable a:focus,
body.theme-highcontrast #currentCallInfo a:focus {
  outline: 3px solid #ffdd00;
  outline-offset: 2px;
}

body.theme-highcontrast .share-btn {
  border: 2px solid #fff;
  box-shadow: none;
}

body.theme-highcontrast .share-btn:focus {
  outline: 3px solid #ffdd00;
  outline-offset: 3px;
}

body.theme-highcontrast .log-viewer {
  background: #000;
  border: 2px solid #fff;
  box-shadow: none;
  color: #fff;
  font-size: 1.05rem;
}

body.theme-highcontrast .log-header,
body.theme-highcontrast .log-footer {
  background: #000;
  border-color: #fff;
}

body.theme-highcontrast .log-tab {
  background: #111;
  color: #fff;
  border: 2px solid #fff;
}

body.theme-highcontrast .log-tab.active {
  background: #ffdd00;
  color: #000;
}

body.theme-highcontrast .log-content {
  background: #000;
}

body.theme-highcontrast .log-entry {
  border-bottom-color: #fff;
  font-size: 1.05rem;
}

body.theme-highcontrast .log-entry pre {
  background: #111;
  color: #fff;
  border: 1px solid #fff;
  font-size: 1.05rem;
}

body.theme-highcontrast .log-clear,
body.theme-highcontrast .log-clear.alt {
  background: #ffdd00;
  color: #000;
  border: 2px solid #000;
}

body.theme-highcontrast .log-clear:hover,
body.theme-highcontrast .log-clear.alt:hover {
  background: #ffd000;
}

body.theme-highcontrast .log-auto-refresh {
  color: #ffdd00;
}

body.theme-highcontrast .controls button {
  background-color: #ffdd00;
  color: #000;
  border: 2px solid #000;
  font-weight: 700;
  font-size: 1.2rem;
  padding: 0.65rem 1.1rem;
}

body.theme-highcontrast .controls button:not([disabled]):hover {
  background-color: #ffd000;
}

body.theme-highcontrast .controls button[disabled] {
  background: #333;
  color: #999;
  border-color: #999;
}

body.theme-highcontrast .history-table-wrapper:focus-visible {
  outline: 3px solid #ffdd00;
  outline-offset: 3px;
}

body.theme-highcontrast .history-map {
  border: 2px solid #fff;
}

body.theme-highcontrast .share-disclaimer {
  color: #fff;
  font-size: 1rem;
}

body.theme-highcontrast .heart:focus-visible {
  outline: 3px solid #ffdd00;
  outline-offset: 3px;
  transform: scale(1.05);
}

body.theme-wpsd .controls button[disabled] {
  background-color: #3b82f6;
  opacity: 0.45;
}

/* WPSD dashboard-inspired theme */
body.theme-wpsd {
  background: #222529;
  color: #f1f5f9;
}

body.theme-wpsd h1 {
  color: #f8fafc;
}

body.theme-wpsd .subtitle {
  color: #cbd5f5;
}

body.theme-wpsd .controls label {
  color: #e2e8f0;
}

body.theme-wpsd .controls input,
body.theme-wpsd .controls select {
  background: #30363e;
  border: 1px solid #3f4852;
  color: #f8fafc;
}

body.theme-wpsd .controls input:focus,
body.theme-wpsd .controls select:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.35);
}

body.theme-wpsd .controls button {
  background-color: #3b82f6;
}

body.theme-wpsd .controls button:not([disabled]):hover {
  background-color: #2563eb;
}

body.theme-wpsd .listen-copy {
  color: #cbd5f5;
}

body.theme-wpsd .listen-button {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  box-shadow: 0 12px 22px rgba(37, 99, 235, 0.35);
}

body.theme-wpsd .listen-button:hover,
body.theme-wpsd .listen-button:focus {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  box-shadow: 0 16px 26px rgba(37, 99, 235, 0.45);
}

body.theme-wpsd #current,
body.theme-wpsd #history,
body.theme-wpsd .share-section,
body.theme-wpsd .talkgroups-section,
body.theme-wpsd .nets-section,
body.theme-wpsd .help-section,
body.theme-wpsd .listen-section,
body.theme-wpsd .settings-section,
body.theme-wpsd .map-container {
  background: #30363e;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

body.theme-wpsd #current h2,
body.theme-wpsd #history h2,
body.theme-wpsd .settings-section h2,
body.theme-wpsd .share-section h2,
body.theme-wpsd .talkgroups-section h2,
body.theme-wpsd .nets-section h2,
body.theme-wpsd .help-section h2,
body.theme-wpsd .listen-section h2 {
  border-bottom-color: #3f4852;
  color: #f8fafc;
}

body.theme-wpsd .current-name {
  color: #e2e8f0;
}

body.theme-wpsd .current-callsign,
body.theme-wpsd #app a,
body.theme-wpsd #app a:visited,
body.theme-wpsd #app a:hover {
  color: #60a5fa;
}

body.theme-wpsd #historyTable th,
body.theme-wpsd #historyTable td {
  border-bottom: 1px solid #3a414c;
}

body.theme-wpsd #historyTable th {
  background-color: #2b3139;
  color: #e2e8f0;
}

body.theme-wpsd #historyTable thead th {
  box-shadow: inset 0 -1px 0 rgba(26, 31, 39, 0.75);
}

body.theme-wpsd #historyTable tr:nth-child(odd) td {
  background-color: #2c323b;
}

body.theme-wpsd .map-resize-handle {
  background: linear-gradient(180deg, rgba(48, 54, 62, 0) 0%, rgba(96, 165, 250, 0.18) 100%);
}

body.theme-wpsd .map-resize-handle::before {
  background: rgba(96, 165, 250, 0.45);
}

body.theme-wpsd .footer {
  color: #cbd5f5;
}

body.theme-wpsd .footer strong {
  color: #60a5fa;
}

body.theme-wpsd .log-viewer {
  background: #1f2329;
  border: 1px solid #30363e;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
  color: #f1f5f9;
}

body.theme-wpsd .log-header,
body.theme-wpsd .log-footer {
  background: #262b33;
  border-color: #30363e;
  color: #f1f5f9;
}

body.theme-wpsd .log-tab {
  background: #30363e;
  color: #e2e8f0;
}

body.theme-wpsd .log-tab:hover {
  background: #3a414c;
}

body.theme-wpsd .log-tab.active {
  background: #3b82f6;
  color: #f8fafc;
}

body.theme-wpsd .log-content {
  background: #1f2329;
}

body.theme-wpsd .log-entry {
  border-bottom-color: #30363e;
}

body.theme-wpsd .log-entry pre {
  background: #262b33;
}

body.theme-wpsd .log-clear.alt {
  background: #3b82f6;
}

body.theme-wpsd .log-clear.alt:hover {
  background: #2563eb;
}

body.theme-wpsd .log-auto-refresh {
  color: #cbd5f5;
}

body.theme-wpsd .share-note {
  color: #cbd5f5;
}
body.theme-wpsd .nets-filter-label {
  color: #e2e8f0;
}
body.theme-wpsd .nets-filter-select {
  background: #2c323b;
  border-color: #3f4852;
  color: #f8fafc;
}
body.theme-wpsd .nets-filter-select:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.35);
}

body.theme-wpsd .share-status {
  color: #e2e8f0;
}
body.theme-wpsd .net-item {
  background: rgba(38, 43, 51, 0.85);
  border-color: #3f4852;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
}
body.theme-wpsd .help-item {
  background: rgba(38, 43, 51, 0.85);
  border-color: #3f4852;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
}
body.theme-wpsd .net-name,
body.theme-wpsd .net-detail-label {
  color: #f8fafc;
}
body.theme-wpsd .net-schedule-row,
body.theme-wpsd .nets-empty {
  color: #94a3b8;
}
body.theme-wpsd .net-schedule-primary {
  color: #f8fafc;
}
body.theme-wpsd .net-details {
  color: #d1d5db;
}
body.theme-wpsd .net-notes {
  color: #cbd5f5;
}
body.theme-wpsd .net-time-row {
  color: #d1d5db;
}
body.theme-wpsd .net-time-label {
  color: #f8fafc;
}
body.theme-wpsd .net-link {
  background: rgba(96, 165, 250, 0.2);
  color: #93c5fd;
}
body.theme-wpsd .net-actions-label {
  color: #e2e8f0;
}
body.theme-wpsd .net-action-button {
  background: rgba(96, 165, 250, 0.18);
  border-color: rgba(96, 165, 250, 0.45);
  color: #bfdbfe;
}
body.theme-wpsd .net-action-button:hover,
body.theme-wpsd .net-action-button:focus {
  background: rgba(59, 130, 246, 0.35);
  border-color: rgba(59, 130, 246, 0.65);
  color: #e0f2fe;
  box-shadow: 0 8px 18px rgba(59, 130, 246, 0.35);
}
body.theme-wpsd .net-link:hover,
body.theme-wpsd .net-link:focus {
  background: rgba(59, 130, 246, 0.35);
  color: #e0f2fe;
  box-shadow: 0 8px 18px rgba(59, 130, 246, 0.35);
}
body.theme-wpsd .net-time-value-utc {
  color: #93c5fd;
}
body.theme-wpsd .net-time-value-local {
  color: #f8fafc;
}
body.theme-wpsd .nets-error {
  color: #fca5a5;
}
body.theme-wpsd .help-question {
  color: #f8fafc;
}
body.theme-wpsd .help-answer {
  color: #d1d5db;
}
body.theme-wpsd .help-empty {
  color: #94a3b8;
}
body.theme-wpsd .help-error {
  color: #fca5a5;
}

/* Droidstar mobile app-inspired theme */
body.theme-droidstar {
  background: linear-gradient(135deg, #252324, #1b191a);
  color: #f5f5f5;
}

body.theme-droidstar h1 {
  color: #fdfdfd;
}

body.theme-droidstar .subtitle {
  color: #d4d4d4;
}

body.theme-droidstar .controls label {
  color: #f5f5f5;
}

body.theme-droidstar .controls input,
body.theme-droidstar .controls select {
  background: #353535;
  border: 1px solid #4a4a4a;
  color: #f5f5f5;
}

body.theme-droidstar .controls input:focus,
body.theme-droidstar .controls select:focus {
  border-color: #5f9ee6;
  box-shadow: 0 0 0 3px rgba(95, 158, 230, 0.35);
}

body.theme-droidstar .controls button {
  background-color: #5f9ee6;
  color: #0f1418;
}

body.theme-droidstar .controls button:not([disabled]):hover {
  background-color: #4c89cf;
}

body.theme-droidstar .controls button[disabled] {
  background-color: #5f9ee6;
  opacity: 0.45;
}

body.theme-droidstar #current,
body.theme-droidstar #history,
body.theme-droidstar .share-section,
body.theme-droidstar .talkgroups-section,
body.theme-droidstar .nets-section,
body.theme-droidstar .help-section,
body.theme-droidstar .listen-section,
body.theme-droidstar .settings-section,
body.theme-droidstar .map-container {
  background: #353535;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

body.theme-droidstar #current h2,
body.theme-droidstar #history h2,
body.theme-droidstar .settings-section h2,
body.theme-droidstar .share-section h2,
body.theme-droidstar .talkgroups-section h2,
body.theme-droidstar .nets-section h2,
body.theme-droidstar .help-section h2,
body.theme-droidstar .listen-section h2 {
  border-bottom-color: #4a4a4a;
  color: #f5f5f5;
}

body.theme-droidstar .current-name {
  color: #fafafa;
}

body.theme-droidstar .current-callsign,
body.theme-droidstar #app a,
body.theme-droidstar #app a:visited,
body.theme-droidstar #app a:hover {
  color: #8dc7ff;
}

body.theme-droidstar #historyTable th,
body.theme-droidstar #historyTable td {
  border-bottom: 1px solid #434343;
}

body.theme-droidstar #historyTable th {
  background-color: #3f3d3e;
  color: #f5f5f5;
}

body.theme-droidstar #historyTable thead th {
  box-shadow: inset 0 -1px 0 rgba(20, 20, 20, 0.65);
}

body.theme-droidstar #historyTable tr:nth-child(odd) td {
  background-color: #2c2a2b;
}

body.theme-droidstar .map-resize-handle {
  background: linear-gradient(180deg, rgba(37, 35, 36, 0) 0%, rgba(95, 158, 230, 0.25) 100%);
}

body.theme-droidstar .map-resize-handle::before {
  background: rgba(141, 199, 255, 0.55);
}

body.theme-droidstar .share-note {
  color: #e0e0e0;
}
body.theme-droidstar .listen-copy {
  color: #e0e0e0;
}
body.theme-droidstar .nets-filter-label {
  color: #f5f5f5;
}
body.theme-droidstar .nets-filter-select {
  background: #353535;
  border-color: #4a4a4a;
  color: #f5f5f5;
}
body.theme-droidstar .nets-filter-select:focus {
  border-color: #5f9ee6;
  box-shadow: 0 0 0 3px rgba(95, 158, 230, 0.35);
}

body.theme-droidstar .share-status {
  color: #f5f5f5;
}
body.theme-droidstar .listen-button {
  background: linear-gradient(135deg, #4c89cf, #60a5fa);
  box-shadow: 0 12px 22px rgba(80, 140, 220, 0.35);
}
body.theme-droidstar .listen-button:hover,
body.theme-droidstar .listen-button:focus {
  background: linear-gradient(135deg, #3b82f6, #5f9ee6);
  box-shadow: 0 16px 26px rgba(80, 140, 220, 0.45);
}
body.theme-droidstar .net-item {
  background: rgba(53, 53, 53, 0.85);
  border-color: #4a4a4a;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.5);
}
body.theme-droidstar .help-item {
  background: rgba(53, 53, 53, 0.85);
  border-color: #4a4a4a;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.5);
}
body.theme-droidstar .net-name,
body.theme-droidstar .net-detail-label {
  color: #fdfdfd;
}
body.theme-droidstar .net-schedule-row,
body.theme-droidstar .nets-empty {
  color: #cfcfcf;
}
body.theme-droidstar .net-schedule-primary {
  color: #fdfdfd;
}
body.theme-droidstar .net-details {
  color: #e5e5e5;
}
body.theme-droidstar .net-notes {
  color: #d4d4d4;
}
body.theme-droidstar .net-time-row {
  color: #e5e5e5;
}
body.theme-droidstar .net-time-label {
  color: #fdfdfd;
}
body.theme-droidstar .net-link {
  background: rgba(95, 158, 230, 0.2);
  color: #9cc9ff;
}
body.theme-droidstar .net-actions-label {
  color: #e5e5e5;
}
body.theme-droidstar .net-action-button {
  background: rgba(95, 158, 230, 0.22);
  border-color: rgba(95, 158, 230, 0.5);
  color: #9cc9ff;
}
body.theme-droidstar .net-action-button:hover,
body.theme-droidstar .net-action-button:focus {
  background: rgba(95, 158, 230, 0.35);
  border-color: rgba(95, 158, 230, 0.7);
  color: #0f1418;
  box-shadow: 0 8px 18px rgba(95, 158, 230, 0.45);
}
body.theme-droidstar .net-link:hover,
body.theme-droidstar .net-link:focus {
  background: rgba(95, 158, 230, 0.35);
  color: #0f1418;
  box-shadow: 0 8px 18px rgba(95, 158, 230, 0.45);
}
body.theme-droidstar .net-time-value-utc {
  color: #9cc9ff;
}
body.theme-droidstar .net-time-value-local {
  color: #fdfdfd;
}
body.theme-droidstar .help-question {
  color: #fdfdfd;
}
body.theme-droidstar .help-answer {
  color: #e5e5e5;
}
body.theme-droidstar .help-empty {
  color: #cfcfcf;
}
body.theme-droidstar .help-error {
  color: #fca5a5;
}
body.theme-droidstar .nets-error {
  color: #fca5a5;
}

body.theme-droidstar .footer {
  color: #d4d4d4;
}

body.theme-droidstar .footer strong {
  color: #8dc7ff;
}

body.theme-droidstar .log-viewer {
  background: #2a2829;
  border: 1px solid #3b3a3b;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  color: #f5f5f5;
}

body.theme-droidstar .log-header,
body.theme-droidstar .log-footer {
  background: #353435;
  border-color: #434343;
  color: #f5f5f5;
}

body.theme-droidstar .log-tab {
  background: #434343;
  color: #f5f5f5;
}

body.theme-droidstar .log-tab:hover {
  background: #4e4e4e;
}

body.theme-droidstar .log-tab.active {
  background: #5f9ee6;
  color: #0f1418;
}

body.theme-droidstar .log-content {
  background: #1f1d1e;
}

body.theme-droidstar .log-entry {
  border-bottom-color: #3b3a3b;
}

body.theme-droidstar .log-entry pre {
  background: #2f2d2e;
}

body.theme-droidstar .log-clear.alt {
  background: #5f9ee6;
  color: #0f1418;
}

body.theme-droidstar .log-clear.alt:hover {
  background: #4c89cf;
}

body.theme-droidstar .log-auto-refresh {
  color: #e0e0e0;
}

/* BrandMeister network-inspired theme */
body.theme-brandmeister {
  background: #edf0f5;
  color: #27313c;
}

body.theme-brandmeister h1 {
  color: #c34531;
}

body.theme-brandmeister .subtitle {
  color: #445061;
}

body.theme-brandmeister .controls label {
  color: #27313c;
}

body.theme-brandmeister .controls input,
body.theme-brandmeister .controls select {
  background: #ffffff;
  border: 1px solid #c6ceda;
  color: #27313c;
}

body.theme-brandmeister .controls input:focus,
body.theme-brandmeister .controls select:focus {
  border-color: #c34531;
  box-shadow: 0 0 0 3px rgba(195, 69, 49, 0.2);
}

body.theme-brandmeister .controls button {
  background-color: #c34531;
  color: #ffffff;
}

body.theme-brandmeister .controls button:not([disabled]):hover {
  background-color: #a73727;
}

body.theme-brandmeister .controls button[disabled] {
  background-color: #c34531;
  color: #ffffff;
  opacity: 0.45;
}

body.theme-brandmeister #current,
body.theme-brandmeister #history,
body.theme-brandmeister .share-section,
body.theme-brandmeister .talkgroups-section,
body.theme-brandmeister .nets-section,
body.theme-brandmeister .help-section,
body.theme-brandmeister .listen-section,
body.theme-brandmeister .settings-section,
body.theme-brandmeister .map-container {
  background: #ffffff;
  border: 1px solid #c6ceda;
  box-shadow: 0 8px 24px rgba(23, 28, 36, 0.15);
  color: #27313c;
}

body.theme-brandmeister #current h2,
body.theme-brandmeister #history h2,
body.theme-brandmeister .settings-section h2,
body.theme-brandmeister .share-section h2,
body.theme-brandmeister .talkgroups-section h2,
body.theme-brandmeister .nets-section h2,
body.theme-brandmeister .help-section h2,
body.theme-brandmeister .listen-section h2 {
  border-bottom-color: #d8dee8;
  color: #c34531;
}

body.theme-brandmeister .current-name {
  color: #27313c;
}

body.theme-brandmeister .current-callsign,
body.theme-brandmeister #app a,
body.theme-brandmeister #app a:visited,
body.theme-brandmeister #app a:hover {
  color: #c34531;
}

body.theme-brandmeister #historyTable th,
body.theme-brandmeister #historyTable td {
  border-bottom: 1px solid #d8dee8;
}

body.theme-brandmeister #historyTable th {
  background-color: #f3f6fb;
  color: #27313c;
}

body.theme-brandmeister #historyTable thead th {
  box-shadow: inset 0 -1px 0 rgba(195, 69, 49, 0.25);
}

body.theme-brandmeister #historyTable tr:nth-child(odd) td {
  background-color: #f8fafe;
}

body.theme-brandmeister .map-resize-handle {
  background: linear-gradient(180deg, rgba(237, 240, 245, 0) 0%, rgba(195, 69, 49, 0.18) 100%);
}

body.theme-brandmeister .map-resize-handle::before {
  background: rgba(195, 69, 49, 0.55);
}

body.theme-brandmeister .share-note {
  color: #445061;
}
body.theme-brandmeister .listen-copy {
  color: #445061;
}
body.theme-brandmeister .nets-filter-label {
  color: #27313c;
}
body.theme-brandmeister .nets-filter-select {
  background: #f8fafe;
  border-color: #d8dee8;
  color: #27313c;
}
body.theme-brandmeister .nets-filter-select:focus {
  border-color: #c34531;
  box-shadow: 0 0 0 3px rgba(195, 69, 49, 0.25);
}

body.theme-brandmeister .share-status {
  color: #27313c;
}
body.theme-brandmeister .listen-button {
  background: linear-gradient(135deg, #c34531, #e4604d);
  box-shadow: 0 12px 22px rgba(195, 69, 49, 0.35);
}
body.theme-brandmeister .listen-button:hover,
body.theme-brandmeister .listen-button:focus {
  background: linear-gradient(135deg, #a33222, #c34531);
  box-shadow: 0 16px 26px rgba(195, 69, 49, 0.45);
}
body.theme-brandmeister .net-item {
  background: rgba(248, 250, 254, 0.85);
  border-color: #d8dee8;
  box-shadow: 0 10px 26px rgba(23, 28, 36, 0.18);
}
body.theme-brandmeister .help-item {
  background: rgba(248, 250, 254, 0.85);
  border-color: #d8dee8;
  box-shadow: 0 10px 26px rgba(23, 28, 36, 0.18);
}
body.theme-brandmeister .net-name,
body.theme-brandmeister .net-detail-label {
  color: #27313c;
}
body.theme-brandmeister .net-schedule-row,
body.theme-brandmeister .nets-empty {
  color: #546072;
}
body.theme-brandmeister .net-schedule-primary {
  color: #27313c;
}
body.theme-brandmeister .net-details {
  color: #374151;
}
body.theme-brandmeister .net-notes {
  color: #445061;
}
body.theme-brandmeister .net-time-row {
  color: #374151;
}
body.theme-brandmeister .net-time-label {
  color: #27313c;
}
body.theme-brandmeister .net-link {
  background: rgba(195, 69, 49, 0.12);
  color: #c34531;
}
body.theme-brandmeister .net-actions-label {
  color: #27313c;
}
body.theme-brandmeister .net-action-button {
  background: rgba(195, 69, 49, 0.12);
  border-color: rgba(195, 69, 49, 0.35);
  color: #c34531;
}
body.theme-brandmeister .net-action-button:hover,
body.theme-brandmeister .net-action-button:focus {
  background: rgba(195, 69, 49, 0.18);
  border-color: rgba(195, 69, 49, 0.5);
  color: #8f2c1f;
  box-shadow: 0 8px 18px rgba(195, 69, 49, 0.25);
}
body.theme-brandmeister .net-link:hover,
body.theme-brandmeister .net-link:focus {
  background: rgba(195, 69, 49, 0.18);
  color: #8f2c1f;
  box-shadow: 0 8px 18px rgba(195, 69, 49, 0.25);
}
body.theme-brandmeister .net-time-value-utc {
  color: #c34531;
}
body.theme-brandmeister .net-time-value-local {
  color: #27313c;
}
body.theme-brandmeister .nets-error {
  color: #b91c1c;
}
body.theme-brandmeister .help-question {
  color: #27313c;
}
body.theme-brandmeister .help-answer {
  color: #374151;
}
body.theme-brandmeister .help-empty {
  color: #546072;
}
body.theme-brandmeister .help-error {
  color: #b91c1c;
}

body.theme-brandmeister .footer {
  color: #445061;
}

body.theme-brandmeister .footer strong {
  color: #c34531;
}

body.theme-brandmeister .log-viewer {
  background: #ffffff;
  border: 1px solid #c6ceda;
  box-shadow: 0 12px 36px rgba(23, 28, 36, 0.12);
  color: #27313c;
}

body.theme-brandmeister .log-header,
body.theme-brandmeister .log-footer {
  background: #f3f6fb;
  border-color: #d8dee8;
  color: #27313c;
}

body.theme-brandmeister .log-tab {
  background: #dfe6f1;
  color: #27313c;
}

body.theme-brandmeister .log-tab:hover {
  background: #ced8e7;
}

body.theme-brandmeister .log-tab.active {
  background: #c34531;
  color: #ffffff;
}

body.theme-brandmeister .log-content {
  background: #f8fafe;
}

body.theme-brandmeister .log-entry {
  border-bottom-color: #d8dee8;
}

body.theme-brandmeister .log-entry pre {
  background: #edf2fa;
}

body.theme-brandmeister .log-clear.alt {
  background: #c34531;
  color: #ffffff;
}

body.theme-brandmeister .log-clear.alt:hover {
  background: #a73727;
}

body.theme-brandmeister .log-auto-refresh {
  color: #445061;
}

/* Pi-Star inspired theme */
body.theme-pistar {
  background: #cc5641;
  color: #fff5f2;
}

body.theme-pistar h1 {
  color: #ffffff;
}

body.theme-pistar .subtitle {
  color: #ffe4dc;
}

body.theme-pistar .controls label {
  color: #7a4337;
}

body.theme-pistar .controls input,
body.theme-pistar .controls select {
  background: #ffffff;
  border: 1px solid #f6c1b8;
  color: #7a4337;
}

body.theme-pistar .controls input:focus,
body.theme-pistar .controls select:focus {
  border-color: #cc5641;
  box-shadow: 0 0 0 3px rgba(204, 86, 65, 0.2);
}

body.theme-pistar .controls button {
  background-color: #cc5641;
  color: #ffffff;
}

body.theme-pistar .controls button:not([disabled]):hover {
  background-color: #b04733;
}

body.theme-pistar .controls button[disabled] {
  background-color: #cc5641;
  color: #ffffff;
  opacity: 0.45;
}

body.theme-pistar #current,
body.theme-pistar #history,
body.theme-pistar .share-section,
body.theme-pistar .talkgroups-section,
body.theme-pistar .nets-section,
body.theme-pistar .help-section,
body.theme-pistar .listen-section,
body.theme-pistar .settings-section,
body.theme-pistar .map-container {
  background: #ffffff;
  border: 1px solid #f6c1b8;
  box-shadow: 0 10px 32px rgba(255, 228, 220, 0.65);
  color: #4b2a23;
}

body.theme-pistar #current h2,
body.theme-pistar #history h2,
body.theme-pistar .settings-section h2,
body.theme-pistar .share-section h2,
body.theme-pistar .talkgroups-section h2,
body.theme-pistar .nets-section h2,
body.theme-pistar .help-section h2,
body.theme-pistar .listen-section h2 {
  border-bottom-color: #f6c1b8;
  color: #cc5641;
}

body.theme-pistar #current,
body.theme-pistar #history,
body.theme-pistar .share-section,
body.theme-pistar .talkgroups-section,
body.theme-pistar .nets-section,
body.theme-pistar .listen-section,
body.theme-pistar .settings-section,
body.theme-pistar .help-section {
  color: #4b2a23;
}

body.theme-pistar .current-name {
  color: #7a4337;
}

body.theme-pistar .current-callsign,
body.theme-pistar #app a,
body.theme-pistar #app a:visited,
body.theme-pistar #app a:hover {
  color: #cc5641;
}

body.theme-pistar #historyTable th,
body.theme-pistar #historyTable td {
  border-bottom: 1px solid #f6c1b8;
  color: #4b2a23;
}

body.theme-pistar #historyTable th {
  background-color: #fdecea;
  color: #7a4337;
}

body.theme-pistar #historyTable thead th {
  box-shadow: inset 0 -1px 0 rgba(204, 86, 65, 0.35);
}

body.theme-pistar #historyTable tr:nth-child(odd) td {
  background-color: #fff6f4;
}

body.theme-pistar .map-resize-handle {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.4) 100%);
}

body.theme-pistar .map-resize-handle::before {
  background: rgba(204, 86, 65, 0.65);
}

body.theme-pistar .footer {
  color: #ffe4dc;
}

body.theme-pistar .footer strong {
  color: #ffffff;
}

body.theme-pistar #app .footer a,
body.theme-pistar #app .footer a:visited,
body.theme-pistar #app .footer a:hover {
  color: #fff8f4;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

body.theme-pistar .log-viewer {
  background: #ffffff;
  border: 1px solid #f6c1b8;
  box-shadow: 0 12px 36px rgba(255, 228, 220, 0.55);
  color: #4b2a23;
}

body.theme-pistar .log-header,
body.theme-pistar .log-footer {
  background: #fdecea;
  border-color: #f6c1b8;
  color: #7a4337;
}

body.theme-pistar .log-tab {
  background: #f9d6ce;
  color: #7a4337;
}

body.theme-pistar .log-tab:hover {
  background: #f4c4b8;
}

body.theme-pistar .log-tab.active {
  background: #cc5641;
  color: #ffffff;
}

body.theme-pistar .log-content {
  background: #fff6f4;
}

body.theme-pistar .log-entry {
  border-bottom-color: #f6c1b8;
}

body.theme-pistar .log-entry pre {
  background: #fde2dc;
  color: #4b2a23;
}

body.theme-pistar .log-clear.alt {
  background: #cc5641;
  color: #ffffff;
}

body.theme-pistar .log-clear.alt:hover {
  background: #b04733;
}

body.theme-pistar .log-auto-refresh {
  color: #7a4337;
}

body.theme-pistar .share-note {
  color: #7a4337;
}
body.theme-pistar .listen-copy {
  color: #7a4337;
}
body.theme-pistar .nets-filter-label {
  color: #7a4337;
}
body.theme-pistar .nets-filter-select {
  background: #fff6f4;
  border-color: #f6c1b8;
  color: #7a4337;
}
body.theme-pistar .nets-filter-select:focus {
  border-color: #cc5641;
  box-shadow: 0 0 0 3px rgba(204, 86, 65, 0.25);
}

body.theme-pistar .share-status {
  color: #cc5641;
}
body.theme-pistar .listen-button {
  background: linear-gradient(135deg, #cc5641, #e77764);
  box-shadow: 0 12px 22px rgba(204, 86, 65, 0.35);
}
body.theme-pistar .listen-button:hover,
body.theme-pistar .listen-button:focus {
  background: linear-gradient(135deg, #b84a36, #cc5641);
  box-shadow: 0 16px 26px rgba(204, 86, 65, 0.45);
}
body.theme-pistar .net-item {
  background: rgba(255, 246, 244, 0.95);
  border-color: #f6c1b8;
  box-shadow: 0 12px 28px rgba(204, 86, 65, 0.18);
}
body.theme-pistar .net-name,
body.theme-pistar .net-detail-label {
  color: #7a4337;
}
body.theme-pistar .net-schedule-row,
body.theme-pistar .nets-empty {
  color: #a86b57;
}
body.theme-pistar .net-schedule-primary {
  color: #7a4337;
}
body.theme-pistar .net-details {
  color: #4b2a23;
}
body.theme-pistar .net-notes {
  color: #7a4337;
}
body.theme-pistar .net-time-row {
  color: #4b2a23;
body.theme-pistar .help-item {
  background: rgba(255, 240, 235, 0.9);
  border-color: #f6c1b8;
  box-shadow: 0 12px 28px rgba(204, 86, 65, 0.18);
}
}
body.theme-pistar .net-time-label {
  color: #7a4337;
}
body.theme-pistar .net-link {
  background: rgba(204, 86, 65, 0.18);
  color: #cc5641;
}
body.theme-pistar .net-actions-label {
  color: #7a4337;
}
body.theme-pistar .net-action-button {
  background: rgba(204, 86, 65, 0.18);
  border-color: rgba(204, 86, 65, 0.4);
  color: #cc5641;
}
body.theme-pistar .net-action-button:hover,
body.theme-pistar .net-action-button:focus {
  background: rgba(204, 86, 65, 0.3);
  border-color: rgba(204, 86, 65, 0.55);
  color: #7a4337;
  box-shadow: 0 8px 18px rgba(204, 86, 65, 0.25);
}
body.theme-pistar .net-link:hover,
body.theme-pistar .net-link:focus {
  background: rgba(204, 86, 65, 0.3);
  color: #7a4337;
  box-shadow: 0 8px 18px rgba(204, 86, 65, 0.25);
}
body.theme-pistar .net-time-value-utc {
  color: #cc5641;
}
body.theme-pistar .net-time-value-local {
  color: #7a4337;
}
body.theme-pistar .nets-error {
  color: #b91c1c;
}
body.theme-pistar .help-question {
  color: #4b2a23;
}
body.theme-pistar .help-answer {
  color: #7a4337;
}
body.theme-pistar .help-empty {
  color: #7a4337;
}
body.theme-pistar .help-error {
  color: #b91c1c;
}
.share-section h2,
.talkgroups-section h2,
.nets-section h2,
.help-section h2,
.listen-section h2 {
  margin: 0 0 0.75rem;
  font-size: 1.35rem;
  font-weight: 600;
  border-bottom: 1px solid #f3f4f6;
  padding-bottom: 0.5rem;
  color: #1f2937;
}
.share-note {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: #6b7280;
}
.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.help-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-right: 0.2rem;
  max-height: clamp(220px, 45vh, 360px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.help-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.help-item {
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  background: rgba(248, 250, 252, 0.85);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  color: inherit;
}
.help-question {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.35;
  color: inherit;
}
.help-answer {
  margin: 0.6rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  line-height: 1.6;
  color: inherit;
}
.help-answer p {
  margin: 0;
}
.help-empty,
.help-error {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
}
.help-empty {
  opacity: 0.75;
}
.help-error {
  color: #b91c1c;
}
.talkgroups-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-right: 0.2rem;
}
.talkgroups-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: flex-end;
}
.talkgroups-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1 1 220px;
  min-width: 200px;
}
.talkgroups-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: inherit;
}
.talkgroups-input,
.talkgroups-select {
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 0.45rem 0.65rem;
  font-size: 0.95rem;
  line-height: 1.4;
  color: #111827;
  background-color: #ffffff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.talkgroups-input:focus,
.talkgroups-select:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}
.talkgroups-summary {
  margin: 0;
  font-size: 0.9rem;
  color: inherit;
  opacity: 0.85;
}
.talkgroups-results-wrapper {
  max-height: clamp(280px, 55vh, 520px);
  overflow-y: auto;
  padding-right: 0.5rem;
  margin-right: -0.25rem;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.talkgroups-results-wrapper::-webkit-scrollbar {
  width: 10px;
}
.talkgroups-results-wrapper::-webkit-scrollbar-track {
  background: transparent;
}
.talkgroups-results-wrapper::-webkit-scrollbar-thumb {
  background-color: rgba(148, 163, 184, 0.45);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
}
.talkgroups-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.talkgroups-item {
  display: grid;
  grid-template-columns: minmax(80px, 130px) 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: rgba(249, 250, 251, 0.75);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}
.talkgroups-meta {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: flex-start;
}
.talkgroups-number {
  font-weight: 600;
  font-size: 1rem;
  color: inherit;
}
.talkgroups-network {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1f2937;
  background: rgba(99, 102, 241, 0.16);
}
.talkgroups-network-brandmeister {
  background: rgba(195, 69, 49, 0.14);
  color: #a73727;
}
.talkgroups-network-tgif {
  background: rgba(251, 191, 36, 0.22);
  color: #92400e;
}
.talkgroups-name {
  margin: 0;
  font-weight: 500;
  color: inherit;
  line-height: 1.4;
}
.talkgroups-tune {
  border: 1px solid #6366f1;
  border-radius: 999px;
  background: transparent;
  color: #4338ca;
  padding: 0.45rem 0.95rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.talkgroups-tune:hover,
.talkgroups-tune:focus {
  background: #eef2ff;
  border-color: #4338ca;
  color: #312e81;
  box-shadow: 0 6px 14px rgba(99, 102, 241, 0.2);
}
.talkgroups-tune:focus-visible {
  outline: 3px solid rgba(99, 102, 241, 0.4);
  outline-offset: 2px;
}
.talkgroups-empty,
.talkgroups-error {
  margin: 0;
  font-size: 0.95rem;
  color: inherit;
  opacity: 0.75;
}
.talkgroups-error {
  color: #b91c1c;
  opacity: 1;
}
@media (max-width: 640px) {
  .talkgroups-item {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }
  .talkgroups-tune {
    justify-self: flex-start;
  }
}
body.theme-dark .talkgroups-input,
body.theme-wpsd .talkgroups-input,
body.theme-droidstar .talkgroups-input,
body.theme-dark .talkgroups-select,
body.theme-wpsd .talkgroups-select,
body.theme-droidstar .talkgroups-select {
  background: #0f172a;
  border-color: #475569;
  color: #e2e8f0;
}
body.theme-darkmatter .talkgroups-input,
body.theme-darkmatter .talkgroups-select {
  background: #030712;
  border-color: #3f3f3f;
  color: #f5f5f5;
}
body.theme-highcontrast .talkgroups-input,
body.theme-highcontrast .talkgroups-select {
  background: #000;
  border: 2px solid #fff;
  color: #fff;
  min-height: 2.5rem;
}
body.theme-dark .talkgroups-item,
body.theme-wpsd .talkgroups-item,
body.theme-droidstar .talkgroups-item {
  background: rgba(17, 24, 39, 0.85);
  border-color: rgba(71, 85, 105, 0.65);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.35);
}
body.theme-darkmatter .talkgroups-item {
  background: rgba(17, 17, 17, 0.9);
  border-color: #2f2f2f;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}
body.theme-highcontrast .talkgroups-item {
  background: #000;
  border: 2px solid #fff;
  box-shadow: none;
}
body.theme-dark .talkgroups-summary,
body.theme-wpsd .talkgroups-summary,
body.theme-droidstar .talkgroups-summary {
  color: #cbd5f5;
  opacity: 1;
}
body.theme-darkmatter .talkgroups-summary {
  color: #d1d5db;
  opacity: 1;
}
body.theme-highcontrast .talkgroups-summary {
  color: #ffe066;
  opacity: 1;
  font-size: 1.1rem;
}
body.theme-dark .talkgroups-empty,
body.theme-wpsd .talkgroups-empty,
body.theme-droidstar .talkgroups-empty {
  color: #cbd5f5;
  opacity: 0.7;
}
body.theme-darkmatter .talkgroups-empty {
  color: #d1d5db;
  opacity: 0.7;
}
body.theme-highcontrast .talkgroups-empty {
  color: #ffe066;
  opacity: 1;
  font-size: 1.1rem;
}
body.theme-dark .talkgroups-network,
body.theme-wpsd .talkgroups-network,
body.theme-droidstar .talkgroups-network {
  background: rgba(99, 102, 241, 0.28);
  color: #c7d2fe;
}
body.theme-darkmatter .talkgroups-network {
  background: rgba(125, 210, 255, 0.25);
  color: #7dd3fc;
}
body.theme-dark .talkgroups-network-brandmeister,
body.theme-wpsd .talkgroups-network-brandmeister,
body.theme-droidstar .talkgroups-network-brandmeister {
  background: rgba(195, 69, 49, 0.35);
  color: #fecaca;
}
body.theme-dark .talkgroups-network-tgif,
body.theme-wpsd .talkgroups-network-tgif,
body.theme-droidstar .talkgroups-network-tgif {
  background: rgba(251, 191, 36, 0.35);
  color: #fde68a;
}
body.theme-darkmatter .talkgroups-network-brandmeister {
  background: rgba(252, 165, 165, 0.35);
  color: #fecaca;
}
body.theme-darkmatter .talkgroups-network-tgif {
  background: rgba(253, 224, 71, 0.35);
  color: #fef3c7;
}
body.theme-highcontrast .talkgroups-network {
  background: #000;
  border: 2px solid #fff;
  color: #fff;
}
body.theme-dark .talkgroups-tune,
body.theme-wpsd .talkgroups-tune,
body.theme-droidstar .talkgroups-tune {
  border-color: #818cf8;
  color: #c7d2fe;
}
body.theme-dark .talkgroups-tune:hover,
body.theme-dark .talkgroups-tune:focus,
body.theme-wpsd .talkgroups-tune:hover,
body.theme-wpsd .talkgroups-tune:focus,
body.theme-droidstar .talkgroups-tune:hover,
body.theme-droidstar .talkgroups-tune:focus {
  background: rgba(99, 102, 241, 0.18);
  border-color: #c7d2fe;
  color: #eef2ff;
}
body.theme-darkmatter .talkgroups-tune {
  border-color: #7dd3fc;
  color: #7dd3fc;
}
body.theme-darkmatter .talkgroups-tune:hover,
body.theme-darkmatter .talkgroups-tune:focus {
  background: rgba(125, 210, 255, 0.22);
  border-color: #bae6fd;
  color: #bae6fd;
}
body.theme-highcontrast .talkgroups-tune {
  border: 2px solid #ffdd00;
  color: #ffdd00;
  font-size: 1rem;
}
body.theme-highcontrast .talkgroups-tune:hover,
body.theme-highcontrast .talkgroups-tune:focus {
  background: #ffdd00;
  color: #000;
}
.nets-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: clamp(360px, 65vh, 640px);
  overflow-y: auto;
  padding-right: 0.65rem;
  margin-right: -0.35rem;
  padding-left: 0.15rem;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.nets-body::-webkit-scrollbar {
  width: 10px;
}
.nets-body::-webkit-scrollbar-track {
  background: transparent;
}
.nets-body::-webkit-scrollbar-thumb {
  background-color: rgba(148, 163, 184, 0.45);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
}

.nets-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 0.75rem 0;
  background-color: rgba(249, 250, 251, 0.96);
  background-image: linear-gradient(
    to bottom,
    rgba(249, 250, 251, 0.97),
    rgba(249, 250, 251, 0.92)
  );
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(209, 213, 219, 0.7);
}
.nets-filter-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #374151;
}
.nets-filter-title {
  display: inline-flex;
  align-items: center;
}
.nets-filter-select {
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 0.35rem 0.65rem;
  font-size: 0.9rem;
  line-height: 1.35;
  color: #1f2937;
  background-color: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}
.nets-filter-select:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}
body.theme-dark .nets-controls,
body.theme-droidstar .nets-controls,
body.theme-pistar .nets-controls {
  background: linear-gradient(to bottom, #0f172a, #0b1220);
  border-bottom: 1px solid rgba(71, 85, 105, 0.65);
}
body.theme-darkmatter .nets-controls {
  background: #080808;
  border-bottom: 1px solid rgba(125, 210, 255, 0.45);
  color: #f5f5f5;
}
body.theme-darkmatter .nets-controls .nets-filter-label,
body.theme-darkmatter .nets-controls .nets-filter-title {
  color: inherit;
}
body.theme-darkmatter .nets-filter-select {
  background-color: #030712;
  border-color: rgba(125, 210, 255, 0.6);
  color: #f5f5f5;
  box-shadow: 0 8px 18px rgba(3, 7, 18, 0.45);
}
body.theme-darkmatter .nets-filter-select:focus {
  border-color: #7dd2ff;
  box-shadow: 0 0 0 3px rgba(125, 210, 255, 0.35);
}
body.theme-brandmeister .nets-controls {
  background-color: rgba(248, 250, 254, 0.96);
  background-image: linear-gradient(
    to bottom,
    rgba(248, 250, 254, 0.97),
    rgba(233, 238, 247, 0.92)
  );
  border-bottom: 1px solid rgba(195, 69, 49, 0.25);
}
body.theme-wpsd .nets-controls {
  background-color: rgba(18, 23, 35, 0.94);
  background-image: linear-gradient(
    to bottom,
    rgba(22, 29, 45, 0.96),
    rgba(18, 23, 35, 0.9)
  );
  border-bottom: 1px solid rgba(56, 189, 248, 0.4);
}
body.theme-highcontrast .nets-controls {
  background: #0b1120;
  border-bottom: 2px solid #38bdf8;
}

.nets-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.net-item {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  background: rgba(249, 250, 251, 0.75);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
}
.net-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.65rem;
}
.net-name {
  font-weight: 600;
  font-size: 1.05rem;
  color: #1f2937;
}
.net-schedule {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  gap: 0.35rem;
  min-width: 180px;
}
.net-schedule-row {
  font-size: 0.95rem;
  color: #4b5563;
}
.net-schedule-primary {
  display: none;
}
.net-schedule-primary {
  font-weight: 600;
  color: #1f2937;
}
.net-schedule-local {
  width: 100%;
}
.net-schedule .net-time {
  align-items: flex-end;
  text-align: right;
  width: 100%;
}
.net-schedule .net-time-row {
  justify-content: flex-end;
}
.net-details {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
  font-size: 0.95rem;
  color: #374151;
}
.net-detail {
  display: inline-flex;
  align-items: baseline;
}
.net-detail-label {
  font-weight: 600;
  color: #1f2937;
  margin-right: 0.25rem;
}
.net-talkgroup-button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
}
.net-talkgroup-button:hover,
.net-talkgroup-button:focus {
  text-decoration-thickness: 2px;
}
.net-talkgroup-button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
  border-radius: 2px;
}
.net-time {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-top: 0.45rem;
}
.net-time-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: #374151;
}
.net-time-label {
  font-weight: 600;
  color: #1f2937;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.85rem;
}
.net-time-value {
  flex: 1 1 240px;
  min-width: 180px;
}
.net-time-value-utc {
  color: #4338ca;
  font-weight: 600;
}
.net-time-value-local {
  color: #1f2937;
  font-weight: 600;
}
.net-notes {
  margin: 0.65rem 0 0;
  color: #4b5563;
  line-height: 1.6;
}
.net-links {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.net-actions {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.net-actions-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #1f2937;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.net-action-button {
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: 6px;
  background: rgba(99, 102, 241, 0.08);
  color: #3730a3;
  font-size: 0.85rem;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.net-action-button:hover,
.net-action-button:focus {
  background: rgba(99, 102, 241, 0.16);
  border-color: rgba(79, 70, 229, 0.7);
  color: #312e81;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.18);
}
.net-action-button:focus-visible {
  outline: 2px solid rgba(79, 70, 229, 0.8);
  outline-offset: 2px;
}
.net-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.7rem;
  border-radius: 6px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 0.85rem;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.net-link:hover,
.net-link:focus {
  background: #e0e7ff;
  color: #312e81;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}
body.theme-darkmatter .net-link {
  background: rgb(38, 38, 38);
  color: #d4d4d8;
}
body.theme-darkmatter .net-link:hover,
body.theme-darkmatter .net-link:focus {
  background: rgb(48, 48, 48);
  color: #f4f4f5;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}
.nets-empty {
  padding: 0.75rem 0;
  color: #6b7280;
  font-size: 0.95rem;
}
.nets-error {
  padding: 0.75rem 0;
  color: #b91c1c;
  font-weight: 600;
}
.share-btn {
  border: none;
  border-radius: 6px;
  padding: 0.55rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
  cursor: pointer;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background-color .15s ease, transform .15s ease;
  min-width: 108px;
}
.share-btn svg { display: block; width: 18px; height: 18px; }
.share-btn .share-label { display: inline-block; }

/* White/transparent badge behind colored glyphs */
.share-btn .share-icon {
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(16,24,40,0.06);
  border: 1px solid rgba(15,23,42,0.04);
  width: 24px;
  height: 24px;
  margin-right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.share-btn img.share-icon {
  width: 18px;
  height: 18px;
  display: block;
}
.share-btn:focus {
  outline: 2px solid rgba(79,70,229,0.6);
  outline-offset: 2px;
}
.share-btn:hover { transform: translateY(-2px); }
.share-btn:active { transform: translateY(0); }
.share-btn.fb { background:#1877F2; }
.share-btn.fb:hover { background:#0f6add; }
.share-btn.x { background:#000; }
.share-btn.x:hover { background:#111; }
.share-btn.linkedin { background:#0A66C2; }
.share-btn.linkedin:hover { background:#085599; }
.share-btn.reddit { background:#FF4500; }
.share-btn.reddit:hover { background:#e13d00; }
.share-btn.mastodon { background:#6364FF; }
.share-btn.mastodon:hover { background:#5051e6; }
.share-btn.bluesky { background:#1185FE; }
.share-btn.bluesky:hover { background:#056bd6; }
.share-btn.telegram { background:#229ED9; }
.share-btn.telegram:hover { background:#1b82b2; }
.share-btn.whatsapp { background:#25D366; }
.share-btn.whatsapp:hover { background:#1fb357; }
.share-btn.email { background:#6b7280; }
.share-btn.email:hover { background:#565c62; }
.share-btn.copy { background:#4f46e5; }
.share-btn.copy:hover { background:#4338ca; }
.share-btn.system { background:linear-gradient(135deg,#4f46e5,#6366f1); }
.share-btn.system:hover { background:linear-gradient(135deg,#4338ca,#4f46e5); }
.share-btn.copy.copied { background:#059669; }
.share-status {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: #374151;
  min-height: 1em;
}
.share-disclaimer {
  margin-top: 0.75rem;
  font-size: 0.65rem;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: #9ca3af;
}
.share-btn.hidden { display:none; }

/* Accessible inline dialog for Mastodon instance input */
.dialog-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.35);
  z-index: 9999;
}
.dialog {
  background: #fff;
  padding: 18px;
  border-radius: 8px;
  max-width: 420px;
  width: 94%;
  box-shadow: 0 10px 30px rgba(2,6,23,0.2);
}
.dialog h3 {
  margin: 0 0 8px 0;
  font-size: 16px;
}
.dialog .dialog-desc {
  margin: 0 0 12px 0;
  color: #334155;
  font-size: 13px;
}
.dialog input[type="text"] {
  width: 100%;
  padding: 8px 10px;
  font-size: 14px;
  border: 1px solid #e6edf3;
  border-radius: 6px;
  box-sizing: border-box;
}
.dialog .dialog-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.btn {
  padding: 8px 12px;
  background: #0ea5e9;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}
.btn-secondary {
  background: #f1f5f9;
  color: #0f172a;
}
.visually-hidden { position: absolute !important; height: 1px; width: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
