/* === CSS Custom Properties (matching Funk-Lernapp) === */
:root {
  --bg-primary: #0f0f1a;
  --bg-secondary: #1a1a2e;
  --bg-card: #16213e;
  --bg-card-hover: #1a2745;
  --bg-input: #0f0f1a;
  --text-primary: #e0e0e0;
  --text-secondary: #a0a0b8;
  --text-muted: #6a6a80;
  --accent: #3498db;
  --accent-hover: #5dade2;
  --accent-dim: rgba(52, 152, 219, 0.15);
  --success: #2ecc71;
  --success-dim: rgba(46, 204, 113, 0.15);
  --warning: #f1c40f;
  --warning-dim: rgba(241, 196, 15, 0.15);
  --danger: #e74c3c;
  --danger-dim: rgba(231, 76, 60, 0.15);
  --info: #3498db;
  --info-dim: rgba(52, 152, 219, 0.15);
  --border: #2a2a4a;
  --border-light: #3a3a5a;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.4);
  --nav-height: 60px;
  --max-width: 900px;
  --font-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

/* === Navigation === */
#main-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  z-index: 100;
  padding: 4px 0 env(safe-area-inset-bottom, 4px);
}

.nav-brand { display: none; }

.nav-links {
  display: flex;
  justify-content: space-around;
  max-width: 600px;
  margin: 0 auto;
}

.nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 6px 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.7rem;
  transition: color 0.2s;
  gap: 2px;
  min-width: 48px;
}

.nav-link-icon { font-size: 1.3rem; }
.nav-link:hover, .nav-link.active { color: var(--accent); }

/* === Main Content === */
#app-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 16px calc(var(--nav-height) + 16px);
  min-height: 100vh;
}

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* === Page Header === */
.page-header {
  margin-bottom: 24px;
}

.page-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.breadcrumb {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { color: var(--text-muted); }

/* === Cards === */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s;
}

.card-clickable {
  cursor: pointer;
}

.card-clickable:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  background: var(--bg-card-hover);
}

.card-grid {
  display: grid;
  gap: 16px;
}

/* === Device Cards (Home) === */
.device-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.device-card-image {
  width: 80px;
  height: 80px;
  border-radius: var(--radius);
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  flex-shrink: 0;
}

.device-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
}

.device-card-info { flex: 1; min-width: 0; }
.device-card-info h2 { font-size: 1.1rem; margin-bottom: 2px; }
.device-card-info .device-category {
  color: var(--text-secondary);
  font-size: 0.8rem;
  margin-bottom: 6px;
}
.device-card-info .device-desc {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.4;
}

.device-badges {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-vhf { background: var(--info-dim); color: var(--info); }
.badge-uhf { background: var(--success-dim); color: var(--success); }
.badge-fm { background: var(--warning-dim); color: var(--warning); }
.badge-c4fm { background: var(--accent-dim); color: var(--accent); }
.badge-pmr { background: rgba(155, 89, 182, 0.15); color: #9b59b6; }

/* === Device Overview === */
.device-header {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.device-header-image {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-lg);
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  flex-shrink: 0;
}

.device-header-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
}

.device-header-info h1 { font-size: 1.4rem; }

.device-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  text-decoration: none;
}

.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-hover); color: white; }
.btn-secondary { background: var(--bg-secondary); color: var(--text-primary); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--bg-card); color: var(--text-primary); }
.btn-small { padding: 5px 10px; font-size: 0.8rem; }

/* === Chapter List === */
.chapter-list {
  display: grid;
  gap: 10px;
}

.chapter-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-card);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.chapter-item:hover {
  background: var(--bg-card-hover);
  transform: translateX(4px);
}

.chapter-icon {
  font-size: 1.4rem;
  width: 36px;
  text-align: center;
  flex-shrink: 0;
}

.chapter-title {
  font-size: 0.95rem;
  font-weight: 500;
}

.chapter-arrow {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* === Specs Table === */
.specs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.specs-table th,
.specs-table td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.specs-table th {
  color: var(--text-secondary);
  font-weight: 500;
  width: 40%;
}

.specs-table td {
  color: var(--text-primary);
}

/* === Chapter Content === */
.chapter-content { margin-top: 16px; }

.section {
  margin-bottom: 28px;
}

.section h2 {
  font-size: 1.15rem;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.section h3 {
  font-size: 1rem;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.section p {
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.7;
}

/* === Steps === */
.step-list {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.step-item {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-secondary);
  border-radius: var(--radius);
  border-left: 3px solid var(--accent);
}

.step-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}

.step-body { flex: 1; min-width: 0; }
.step-action { font-size: 0.9rem; margin-bottom: 4px; }
.step-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.step-note {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-style: italic;
}

/* === Key Badge === */
.key-badge {
  display: inline-block;
  padding: 1px 7px;
  background: var(--info-dim);
  color: var(--info);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid rgba(52, 152, 219, 0.3);
}

/* === Tip & Warning Boxes === */
.tip-box, .warning-box {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin: 12px 0;
  font-size: 0.85rem;
  line-height: 1.5;
}

.tip-box {
  background: var(--success-dim);
  border-left: 3px solid var(--success);
  color: var(--text-primary);
}

.tip-box::before { content: "\1F4A1 "; }

.warning-box {
  background: var(--danger-dim);
  border-left: 3px solid var(--danger);
  color: var(--text-primary);
}

.warning-box::before { content: "\26A0\FE0F "; }

/* === Quick Reference === */
.quickref-category {
  margin-bottom: 24px;
}

.quickref-category h3 {
  font-size: 0.95rem;
  margin-bottom: 10px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.quickref-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.quickref-table th {
  text-align: left;
  padding: 8px 10px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.quickref-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}

.quickref-table tr:hover td {
  background: var(--bg-card-hover);
}

/* === Troubleshooting === */
.trouble-item {
  background: var(--bg-card);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}

.trouble-header {
  padding: 14px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  transition: background 0.15s;
}

.trouble-header:hover {
  background: var(--bg-card-hover);
}

.trouble-icon {
  color: var(--warning);
  font-size: 1.1rem;
}

.trouble-toggle {
  margin-left: auto;
  color: var(--text-muted);
  transition: transform 0.2s;
  font-size: 0.9rem;
}

.trouble-item.open .trouble-toggle {
  transform: rotate(180deg);
}

.trouble-body {
  display: none;
  padding: 0 16px 14px;
}

.trouble-item.open .trouble-body {
  display: block;
}

.trouble-causes {
  list-style: none;
  margin: 8px 0;
}

.trouble-causes li {
  padding: 4px 0;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.trouble-causes li::before {
  content: "\2022 ";
  color: var(--warning);
  margin-right: 6px;
}

.trouble-solution {
  margin-top: 8px;
  padding: 10px 14px;
  background: var(--success-dim);
  border-radius: var(--radius);
  font-size: 0.85rem;
  border-left: 3px solid var(--success);
}

.trouble-solution-label {
  font-weight: 600;
  color: var(--success);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

/* === Comparison Table === */
.compare-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -16px;
  padding: 0 16px;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  min-width: 500px;
}

.compare-table th,
.compare-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.compare-table thead th {
  background: var(--bg-secondary);
  color: var(--accent);
  font-weight: 600;
  position: sticky;
  top: 0;
}

.compare-table .compare-label {
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
}

.compare-table .compare-category-row td {
  background: var(--bg-card);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding-top: 14px;
}

/* === Glossary === */
.glossary-filter {
  margin-bottom: 16px;
}

.glossary-filter input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s;
}

.glossary-filter input:focus {
  border-color: var(--accent);
}

.glossary-letter {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  margin-top: 20px;
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}

.glossary-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.glossary-devices {
  display: flex;
  gap: 4px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.badge-device {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 600;
  background: var(--accent-dim);
  color: var(--accent);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
}

.badge-device:hover {
  background: var(--accent);
  color: white;
}

.glossary-term {
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.glossary-def {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-top: 2px;
}

/* === Glossary Tooltip === */
.glossary-link {
  color: var(--info);
  border-bottom: 1px dotted var(--info);
  cursor: help;
  position: relative;
}

.glossary-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  white-space: normal;
  width: max-content;
  max-width: 280px;
  box-shadow: var(--shadow-lg);
  z-index: 50;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
}

.glossary-link:hover .glossary-tooltip {
  opacity: 1;
}

/* === Search === */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--bg-primary);
  z-index: 200;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

.search-overlay.hidden { display: none; }

.search-overlay-inner {
  display: flex;
  gap: 10px;
  max-width: var(--max-width);
  margin: 0 auto;
  align-items: center;
}

.search-input {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 1rem;
  outline: none;
}

.search-input:focus { border-color: var(--accent); }

.search-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px 8px;
}

.search-close:hover { color: var(--text-primary); }

.search-results-live {
  max-width: var(--max-width);
  margin: 8px auto 0;
  max-height: 60vh;
  overflow-y: auto;
}

.search-result-item {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 14px;
  cursor: pointer;
  border-radius: var(--radius);
  transition: background 0.1s;
}

.search-result-item:hover { background: var(--bg-card); }

.search-result-device {
  font-size: 0.7rem;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  white-space: nowrap;
  min-width: 60px;
}

.search-result-heading {
  font-size: 0.9rem;
  color: var(--text-primary);
}

.search-result-type {
  margin-left: auto;
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.search-empty {
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* === PDF Download Link === */
.pdf-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 0.8rem;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
}

.pdf-link:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

/* === Empty State === */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.empty-state p {
  font-size: 0.9rem;
}

/* === Section Divider === */
.section-title {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  margin: 24px 0 12px;
}

/* === Utility === */
.hidden { display: none !important; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }

/* === Desktop === */
@media (min-width: 768px) {
  #main-nav {
    position: fixed;
    top: 0;
    bottom: auto;
    border-top: none;
    border-bottom: 1px solid var(--border);
    padding: 0 20px;
    display: flex;
    align-items: center;
    height: var(--nav-height);
  }

  .nav-brand {
    display: block;
    color: var(--accent);
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    margin-right: 32px;
    white-space: nowrap;
  }

  .nav-links {
    justify-content: flex-start;
    gap: 4px;
    max-width: none;
  }

  .nav-link {
    flex-direction: row;
    gap: 6px;
    font-size: 0.85rem;
    padding: 8px 14px;
    border-radius: var(--radius);
  }

  .nav-link-icon { font-size: 1rem; }

  .nav-link:hover { background: var(--bg-card); }
  .nav-link.active { background: var(--accent-dim); color: var(--accent); }

  #app-container {
    padding: calc(var(--nav-height) + 24px) 24px 40px;
  }

  .card-grid {
    grid-template-columns: 1fr 1fr;
  }

  .device-card-image {
    width: 100px;
    height: 100px;
  }
}

/* === Print === */
@media print {
  #main-nav,
  .search-overlay,
  .btn,
  .device-actions,
  .nav-search-toggle { display: none !important; }

  body {
    background: white;
    color: #111;
    font-size: 11pt;
  }

  #app-container {
    padding: 0;
    max-width: 100%;
  }

  .card {
    background: white;
    box-shadow: none;
    border: 1px solid #ddd;
  }

  .quickref-table th {
    background: #f5f5f5;
    color: #333;
  }

  .quickref-table td {
    border-color: #ddd;
  }

  .key-badge {
    background: #eef;
    color: #336;
    border-color: #ccd;
  }

  .step-item {
    background: #f9f9f9;
    border-left-color: #666;
  }

  .step-number {
    background: #666;
  }

  .page-header h1::after {
    content: " — Funk Manuals";
    font-weight: 400;
    color: #666;
  }

  .print-header {
    display: block !important;
    text-align: center;
    margin-bottom: 16px;
    font-size: 0.8rem;
    color: #999;
  }
}

.print-header { display: none; }

/* === Setup View === */
.setup-device-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.setup-device-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.setup-device-card img,
.setup-device-card svg {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  flex-shrink: 0;
}

.setup-device-info { min-width: 0; }
.setup-device-info h3 { font-size: 0.95rem; margin-bottom: 2px; }
.setup-device-role { color: var(--text-secondary); font-size: 0.75rem; }
.setup-device-count { color: var(--accent); font-size: 0.75rem; font-weight: 600; margin-top: 2px; }

.setup-filter {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.setup-filter-btn {
  padding: 5px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s;
}

.setup-filter-btn:hover { border-color: var(--accent); color: var(--text-primary); }
.setup-filter-btn.active { background: var(--accent-dim); color: var(--accent); border-color: var(--accent); }

.setup-group {
  margin-bottom: 20px;
}

.setup-group-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg-card);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s;
  margin-bottom: 2px;
}

.setup-group-header:hover { background: var(--bg-card-hover); }

.setup-group-header h3 {
  font-size: 0.9rem;
  font-weight: 600;
  flex: 1;
}

.setup-group-desc {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.setup-group-count {
  color: var(--text-muted);
  font-size: 0.75rem;
  white-space: nowrap;
}

.setup-group-toggle {
  color: var(--text-muted);
  transition: transform 0.2s;
}

.setup-group.open .setup-group-toggle { transform: rotate(180deg); }

.setup-group-body {
  display: none;
  padding: 4px 0;
}

.setup-group.open .setup-group-body { display: block; }

.setup-channel {
  display: grid;
  grid-template-columns: 36px 60px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 0.83rem;
}

.setup-channel:last-child { border-bottom: none; }

.setup-ch-num {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.setup-ch-name {
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--accent);
}

.setup-ch-detail {
  min-width: 0;
}

.setup-ch-freq {
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.setup-ch-meta {
  color: var(--text-muted);
  font-size: 0.72rem;
  margin-top: 1px;
}

.setup-ch-devices {
  display: flex;
  gap: 3px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.setup-compat {
  width: 18px;
  height: 18px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 700;
}

.setup-compat.yes { background: var(--success-dim); color: var(--success); }
.setup-compat.no { background: var(--bg-secondary); color: var(--text-muted); opacity: 0.4; }

@media (max-width: 600px) {
  .setup-channel {
    grid-template-columns: 32px 1fr;
    gap: 4px;
  }
  .setup-ch-name { grid-column: 2; }
  .setup-ch-detail { grid-column: 2; }
  .setup-ch-devices { grid-column: 2; justify-content: flex-start; }
}

/* === SVG Icon System (Lucide/Feather style) === */
.icon {
  width: 1em; height: 1em;
  vertical-align: -0.125em;
  fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  display: inline-block; flex-shrink: 0;
}
.icon-sm { width: 0.85em; height: 0.85em; }
.icon-lg { width: 1.3em; height: 1.3em; }
.icon-xl { width: 1.8em; height: 1.8em; }
.icon-2x { width: 2.5em; height: 2.5em; }
.icon-3x { width: 3em; height: 3em; }
