/* =====================================================
   Nürburgring Track Status — Style Sheet
   Philosophy: mobile-first, minimal GPU, no CDN deps
   ===================================================== */

/* ===== RESET ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ===== WEBCAMS ===== */
.webcam-warning {
  display: inline-block;
  background: rgba(245, 158, 11, 0.15);
  color: var(--amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
}

.webcam-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.webcam-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.webcam-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.webcam-header {
  padding: 10px 14px;
  font-size: 0.9rem;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.15);
}

.webcam-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  background: #111;
}

:root {
  --bg: #0a0a0c;
  --bg2: #111116;
  --bg3: #19191f;
  --border: rgba(255, 255, 255, 0.08);
  --text: #e8e8ef;
  --muted: #6b6b80;
  --accent: #e30613;
  --accent2: #ff4d4d;
  --green: #22c55e;
  --amber: #f59e0b;
  --radius: 12px;
  --radius-sm: 8px;
  /* System font stack — zero network requests, renders instantly, looks native on every device */
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-serif: Georgia, 'Times New Roman', serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  /* Improve font rendering on mobile */
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  line-height: 1;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--muted);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-notify {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 14px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 30px;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 1;
}

.btn-notify:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--muted);
  color: var(--text);
  transform: scale(1.02);
}

.btn-notify.active {
  color: var(--amber);
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.1);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.15);
}

.btn-notify .icon {
  font-size: 0.95rem;
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--muted);
}

.btn-icon.active {
  color: var(--amber);
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.1);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
}

.btn-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  transition: all 0.2s;
  outline: none;
  line-height: 1;
}

.btn-text:hover {
  filter: brightness(1.2);
}

.btn-text:hover .btn-text-label {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn-text-label {
  white-space: nowrap;
}

/* Larger tap targets on touch devices */
button,
a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

nav a {
  min-height: 36px;
}

/* ===== HERO BANNER (replaces full-screen hero) ===== */
.hero-banner {
  background: linear-gradient(180deg, #0e0e14 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
  /* Safe area for notched phones */
  padding-top: env(safe-area-inset-top, 0);
}

.hero-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0;
  cursor: pointer;
  text-decoration: none;
}

.logo-text {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

.logo:hover .logo-text {
  color: var(--accent);
}

.logo-ring {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 900;
  margin: 0 4px;
  flex-shrink: 0;
}

.nav {
  display: flex;
  gap: 2px;
  margin-left: auto;
}

.nav-link {
  padding: 6px 10px;
  border-radius: 6px;
  min-height: 32px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.15s, background 0.15s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: var(--bg3);
}

.last-updated {
  font-size: 0.72rem;
  color: var(--muted);
  flex-shrink: 0;
  white-space: nowrap;
  /* Hide on very small screens */
}

.hero-sub {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4px 16px 0;
}

.hero-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero-subtitle {
  font-size: 0.8rem;
  color: var(--muted);
}

/* ===== SECTION BASE ===== */
.section {
  padding: 48px 0;
}

.section-alt {
  background: var(--bg2);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 5vw, 2rem);
  font-weight: 700;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-subtitle {
  color: var(--muted);
  margin-bottom: 28px;
  font-size: 0.9rem;
}

/* ===== LIVE DOT ===== */
.live-dot-wrap {
  display: inline-flex;
  align-items: center;
}

.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--muted);
}

/* Animation only when motion is OK */
@media (prefers-reduced-motion: no-preference) {
  .live-dot.active {
    background: var(--green);
    animation: pulse-green 2s ease infinite;
  }

  @keyframes pulse-green {
    0% {
      box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6);
    }

    70% {
      box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
    }

    100% {
      box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
  }
}

/* Fallback for reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .live-dot.active {
    background: var(--green);
  }
}

/* ===== STATUS CARDS ===== */
.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.status-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.status-card.is-open {
  border-color: rgba(34, 197, 94, 0.3);
}

.status-card.is-closed {
  border-color: rgba(227, 6, 19, 0.2);
}

.status-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.track-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.track-name {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 1px;
}

.track-meta {
  font-size: 0.75rem;
  color: var(--muted);
}

.status-badge {
  margin-left: auto;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 100px;
  min-height: 32px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.8rem;
  font-weight: 600;
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  flex-shrink: 0;
}

.status-badge.open {
  background: rgba(34, 197, 94, 0.12);
  color: var(--green);
}

.status-badge.closed {
  background: rgba(227, 6, 19, 0.1);
  color: var(--accent2);
}

.status-badge.open .badge-dot {
  background: var(--green);
}

.status-badge.closed .badge-dot {
  background: var(--accent);
}

/* Pulse only if motion is OK */
@media (prefers-reduced-motion: no-preference) {
  .status-badge.open .badge-dot {
    animation: pulse-green 2s ease infinite;
  }
}

.status-card-body {
  padding: 16px;
  min-height: 70px;
}

.hours-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #fff;
}

.hours-sep {
  color: var(--muted);
}

.hours-label {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 2px;
}

/* Skeleton shimmer — animation gated on motion */
.hours-skeleton {
  height: 36px;
  border-radius: 6px;
  background: var(--bg2);
}

@media (prefers-reduced-motion: no-preference) {
  .hours-skeleton {
    background: linear-gradient(90deg, var(--bg3) 25%, var(--bg2) 50%, var(--bg3) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
  }

  @keyframes shimmer {
    0% {
      background-position: 200% 0;
    }

    100% {
      background-position: -200% 0;
    }
  }
}

.event-tag {
  display: inline-block;
  margin-top: 8px;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 0.73rem;
  font-weight: 600;
  background: rgba(245, 158, 11, 0.15);
  color: var(--amber);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.event-tag:empty {
  display: none;
}

.status-card-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.15);
}

.next-open {
  font-size: 0.8rem;
  color: var(--muted);
}

.next-open strong {
  color: var(--text);
}

/* ===== TABS ===== */
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.tab-btn {
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.tab-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ===== UPCOMING LIST ===== */
.upcoming-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.upcoming-item {
  display: grid;
  grid-template-columns: 60px 1fr;
  align-items: start;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

/* Entry animation only if motion OK */
@media (prefers-reduced-motion: no-preference) {
  .upcoming-item {
    animation: fadeUp 0.25s ease both;
  }

  @keyframes fadeUp {
    from {
      opacity: 0;
      transform: translateY(8px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

.upcoming-day {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
  color: #fff;
}

.upcoming-month {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.upcoming-weekday {
  font-size: 0.68rem;
  color: var(--muted);
}

/* Container for multiple track rows on one date */
.upcoming-tracks {
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
  min-height: 44px;
}

.upcoming-track-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.upcoming-track-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid;
  flex-shrink: 0;
  text-transform: uppercase;
}

.upcoming-hours {
  font-size: 0.9rem;
  font-weight: 600;
}

.upcoming-event-tag {
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(245, 158, 11, 0.15);
  color: var(--amber);
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.upcoming-dur-inline {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
}


.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 48px;
  color: var(--muted);
}

.spinner {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid var(--bg3);
  border-top-color: var(--accent);
}

@media (prefers-reduced-motion: no-preference) {
  .spinner {
    animation: spin 0.8s linear infinite;
  }

  @keyframes spin {
    to {
      transform: rotate(360deg);
    }
  }
}

/* ===== CALENDAR ===== */
.calendar-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.cal-nav-btn {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text);
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
}

.cal-month-label {
  font-size: 1.05rem;
  font-weight: 700;
  min-width: 160px;
  text-align: center;
}

.calendar-legend {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  font-size: 0.78rem;
  color: var(--muted);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 3px;
}

.legend-dot.open {
  background: rgba(34, 197, 94, 0.5);
  border: 1px solid var(--green);
}

.legend-dot.event {
  background: rgba(245, 158, 11, 0.4);
  border: 1px solid var(--amber);
}

.legend-dot.closed {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.cal-header {
  text-align: center;
  padding: 6px 0;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.cal-day {
  aspect-ratio: 1;
  border-radius: 7px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: clamp(0.68rem, 1.6vw, 0.88rem);
  font-weight: 500;
  border: 1px solid transparent;
  position: relative;
}

.cal-day.empty {
  background: transparent;
  border-color: transparent;
}

.cal-day.closed {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--border);
}

.cal-day.open {
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.3);
  color: var(--green);
}

.cal-day.event {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.3);
  color: var(--amber);
}

.cal-day.today {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  font-weight: 800;
}

.cal-day-num {
  font-size: 0.95em;
}

.cal-day-time {
  font-size: 0.6em;
  margin-top: 1px;
  opacity: 0.8;
}

/* Tooltip — desktop only (hover not available on touch) */
@media (hover: hover) {
  .cal-day[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 5px);
    left: 50%;
    transform: translateX(-50%);
    background: #1e1e28;
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 0.7rem;
    padding: 4px 9px;
    border-radius: 6px;
    white-space: nowrap;
    z-index: 10;
  }
}

/* Cal track dots — one per open circuit */
.cal-dots {
  display: flex;
  gap: 3px;
  justify-content: center;
  margin-top: 2px;
}

.cal-track-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ===== ABOUT ===== */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.about-footer {
  text-align: center;
  margin-top: 32px;
}

.about-stat {
  text-align: center;
  padding: 20px 12px;
  background: var(--bg3);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.stat-value {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  font-weight: 900;
  color: var(--accent);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 500;
}

.about-text p {
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 14px;
}

.about-text em {
  color: var(--text);
  font-style: italic;
}

.disclaimer {
  color: var(--amber) !important;
  background: rgba(245, 158, 11, 0.07);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 8px;
  padding: 10px 14px;
}

/* ===== CACHE BADGE ===== */
.cache-badge {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 4px;
  margin-right: 3px;
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.cache-badge.live {
  background: rgba(34, 197, 94, 0.15);
  color: var(--green);
  border-color: rgba(34, 197, 94, 0.2);
}

.cache-badge.stale {
  background: rgba(245, 158, 11, 0.15);
  color: var(--amber);
  border-color: rgba(245, 158, 11, 0.2);
}

/* ===== CACHE INFO POPUP ===== */
.cache-info-container {
  display: inline-flex;
  align-items: center;
  position: relative;
  margin-left: 6px;
}

.info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid var(--muted);
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
  min-height: auto;
  /* override global button min-height */
}

.info-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(59, 130, 246, 0.1);
}

.cache-info-popup {
  position: absolute;
  top: 24px;
  right: 0;
  width: 240px;
  background: rgba(23, 23, 33, 0.95);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: none;
  white-space: normal;
}

.cache-info-popup.active {
  display: block;
  animation: fadeInDown 0.2s ease-out;
}

.cache-info-popup h4 {
  font-size: 0.75rem;
  margin-bottom: 8px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}

.cache-info-popup p {
  font-size: 0.7rem;
  line-height: 1.5;
  color: var(--muted);
  margin-bottom: 8px;
}

.cache-info-popup ul {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.68rem;
}

.cache-info-popup li {
  margin-bottom: 4px;
  display: flex;
  justify-content: space-between;
}

.cache-info-popup li span:last-child {
  color: var(--text);
  font-weight: 600;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== FOOTER ===== */
.footer {
  padding: 24px 0;
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0));
  border-top: 1px solid var(--border);
}

.footer .container {
  text-align: center;
}

.footer p {
  font-size: 0.78rem;
  color: var(--muted);
}

.footer a {
  color: var(--accent);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
  .nav {
    display: none;
  }

  /* tiny phones: collapsed nav */
  .hero-banner-inner {
    gap: 8px;
    padding: 0 10px;
  }

  .last-updated {
    margin-left: auto;
    font-size: 0.62rem;
    white-space: nowrap;
    text-align: right;
  }

  .logo-text {
    font-size: 0.95rem;
  }

  .logo-ring {
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
    margin: 0 2px;
  }

  /* show in hero-sub instead */
  .upcoming-item {
    grid-template-columns: 52px 1fr;
  }

  .upcoming-duration {
    display: none;
  }

  .about-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-banner-inner {
    height: 48px;
  }
}

@media (max-width: 360px) {
  .status-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== COUNTDOWN ===== */
.countdown {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--green);
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.countdown:empty {
  display: none;
}

/* ===== WEBCAM SECTION ===== */
.webcam-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.webcam-warning {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--amber);
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
  padding: 1px 6px;
  border-radius: 4px;
}

.webcam-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.webcam-card {
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg3);
  border: 1px solid var(--border);
}

.webcam-img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--bg2);
}

.webcam-label {
  padding: 6px 10px;
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 500;
}

/* Error state when image fails to load */
.webcam-card.cam-error .webcam-img {
  display: none;
}

.webcam-card.cam-error::before {
  content: '⚠ Camera unavailable';
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16/9;
  font-size: 0.8rem;
  color: var(--muted);
  background: var(--bg2);
}