/* NordicAstro Cloud Forecast — Styles */

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

:root {
  --bg-page: #060a10;
  --bg-section: #0a0f18;
  --bg-card: #111827;
  --accent: #00B4D8;
  --text-heading: #ffffff;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border: #1e293b;
  --radius: 8px;

  --cloud-clear: #10b981;
  --cloud-mostly-clear: #22d3ee;
  --cloud-partly: #fbbf24;
  --cloud-mostly-cloudy: #f97316;
  --cloud-overcast: #ef4444;

  --verdict-green: #10b981;
  --verdict-yellow: #fbbf24;
  --verdict-red: #ef4444;

  /* Multi-layer shadow for cards */
  --card-shadow:
    0 1px 2px rgba(0,0,0,0.3),
    0 4px 8px rgba(0,0,0,0.2),
    0 12px 24px rgba(0,0,0,0.15),
    inset 0 1px 0 rgba(255,255,255,0.03);
}

html {
  font-size: 16px;
}

/* ── Page background gradient + noise texture ──────────── */

body {
  background: linear-gradient(180deg, #0a1628 0%, #060a10 100%);
  color: var(--text-primary);
  font-family: system-ui, -apple-system, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.02;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}

/* ── Custom Scrollbar ──────────────────────────────────── */

::-webkit-scrollbar {
  width: 8px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-page);
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #2d3a4f;
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

/* ── Layout ─────────────────────────────────────────────── */

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

/* ── Header ─────────────────────────────────────────────── */

.cf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 32px 28px;
  margin: 0 -16px 24px;
  flex-wrap: wrap;
  gap: 12px;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #0a0f18 0%, #060a10 100%);
}

/* Starfield canvas sits behind header content */
.cf-header-starfield {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* Ambient glow behind title */
.cf-header::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 30%;
  width: 300px;
  height: 200px;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse, rgba(0,180,216,0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  animation: cf-ambient-glow 8s ease-in-out infinite;
}

@keyframes cf-ambient-glow {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.cf-header h1 {
  color: var(--text-heading);
  font-weight: 300;
  letter-spacing: 0.04em;
  line-height: 1.2;
  position: relative;
  z-index: 1;
}

.cf-header h1 .cf-wordmark {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.cf-header h1 .cf-title {
  display: block;
  font-size: 1.6rem;
  font-weight: 300;
  color: var(--text-heading);
  letter-spacing: 0.06em;
}

.cf-brand-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8rem;
  transition: color 0.2s;
  position: relative;
  z-index: 1;
}
.cf-brand-link:hover {
  color: var(--accent);
}

/* ── Location Selector ──────────────────────────────────── */

.cf-location {
  background: linear-gradient(180deg, rgba(255,255,255,0.02) 0%, transparent 40%);
  border: 1px solid var(--border);
  border-top-color: rgba(255,255,255,0.06);
  border-bottom-color: rgba(0,0,0,0.3);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  box-shadow: var(--card-shadow);
}

.cf-location label {
  color: var(--text-secondary);
  font-size: 0.85rem;
  white-space: nowrap;
}

.cf-location input[type="number"],
.cf-location input[type="text"] {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-primary);
  padding: 6px 10px;
  font-size: 0.85rem;
  width: 100px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.cf-location input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0, 180, 216, 0.15);
}

.cf-location-name {
  color: var(--text-heading);
  font-weight: 600;
  font-size: 0.95rem;
  margin-right: auto;
}

.cf-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-secondary);
  padding: 6px 14px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.cf-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.cf-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.cf-btn--accent {
  border-color: var(--accent);
  color: var(--accent);
}
.cf-btn--accent:hover {
  background: rgba(0, 180, 216, 0.1);
}

/* ── Staggered Entrance Animations ─────────────────────── */

.cf-entrance {
  opacity: 0;
  transform: translateY(12px);
  animation: cf-fade-in 0.6s ease forwards;
}

.cf-entrance-delay-1 { animation-delay: 0.1s; }
.cf-entrance-delay-2 { animation-delay: 0.25s; }
.cf-entrance-delay-3 { animation-delay: 0.4s; }
.cf-entrance-delay-4 { animation-delay: 0.55s; }
.cf-entrance-delay-5 { animation-delay: 0.7s; }

@keyframes cf-fade-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Verdict Banner ─────────────────────────────────────── */

.cf-verdict {
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 20px;
  text-align: center;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.4s ease;
  background: linear-gradient(180deg, rgba(255,255,255,0.02) 0%, transparent 40%);
  border-top-color: rgba(255,255,255,0.06);
  border-bottom-color: rgba(0,0,0,0.3);
}

.cf-verdict::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.06;
  pointer-events: none;
}

.cf-verdict--good {
  border-color: var(--verdict-green);
  box-shadow:
    0 0 40px rgba(16, 185, 129, 0.15),
    0 0 80px rgba(16, 185, 129, 0.08),
    0 1px 2px rgba(0,0,0,0.3),
    0 4px 8px rgba(0,0,0,0.2),
    0 12px 24px rgba(0,0,0,0.15),
    inset 0 1px 0 rgba(255,255,255,0.03);
}
.cf-verdict--good::before {
  background: var(--verdict-green);
  opacity: 0.08;
}
.cf-verdict--good .cf-verdict__title {
  color: var(--verdict-green);
  text-shadow: 0 0 30px rgba(16, 185, 129, 0.3);
}

.cf-verdict--fair {
  border-color: var(--verdict-yellow);
  box-shadow:
    0 0 40px rgba(251, 191, 36, 0.15),
    0 0 80px rgba(251, 191, 36, 0.08),
    0 1px 2px rgba(0,0,0,0.3),
    0 4px 8px rgba(0,0,0,0.2),
    0 12px 24px rgba(0,0,0,0.15),
    inset 0 1px 0 rgba(255,255,255,0.03);
}
.cf-verdict--fair::before {
  background: var(--verdict-yellow);
  opacity: 0.06;
}
.cf-verdict--fair .cf-verdict__title {
  color: var(--verdict-yellow);
  text-shadow: 0 0 30px rgba(251, 191, 36, 0.3);
}

.cf-verdict--poor {
  border-color: var(--verdict-red);
  box-shadow:
    0 0 40px rgba(239, 68, 68, 0.15),
    0 0 80px rgba(239, 68, 68, 0.08),
    0 1px 2px rgba(0,0,0,0.3),
    0 4px 8px rgba(0,0,0,0.2),
    0 12px 24px rgba(0,0,0,0.15),
    inset 0 1px 0 rgba(255,255,255,0.03);
}
.cf-verdict--poor::before {
  background: var(--verdict-red);
  opacity: 0.06;
}
.cf-verdict--poor .cf-verdict__title {
  color: var(--verdict-red);
  text-shadow: 0 0 30px rgba(239, 68, 68, 0.3);
}

.cf-verdict__title {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 6px;
}

.cf-verdict__subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.cf-verdict__stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.cf-verdict__stat {
  text-align: center;
}

.cf-verdict__stat--score .cf-verdict__stat-value {
  font-size: 1.8rem;
}

.cf-verdict__stat-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-heading);
}

.cf-verdict__stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ── Score Gauge ────────────────────────────────────────── */

.cf-score-section {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  margin-bottom: 20px;
  align-items: start;
}

.cf-score-gauge {
  width: 120px;
  height: 120px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cf-score-gauge svg {
  position: absolute;
  inset: 0;
  transform: rotate(-90deg);
}

.cf-score-gauge__track {
  fill: none;
  stroke: var(--border);
  stroke-width: 6;
}

.cf-score-gauge__fill {
  fill: none;
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s ease, stroke 0.5s ease;
}

.cf-score-gauge__tick {
  fill: none;
  stroke: var(--text-muted);
  stroke-width: 1.5;
  opacity: 0.4;
}

.cf-score-gauge__value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-heading);
  z-index: 1;
  animation: cf-score-pulse 3s ease-in-out infinite;
}

@keyframes cf-score-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.02); opacity: 0.85; }
}

.cf-score-gauge__label {
  position: absolute;
  bottom: 6px;
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 1;
}

/* ── Conditions Panel ──────────────────────────────────── */

.cf-conditions {
  background: linear-gradient(180deg, rgba(255,255,255,0.02) 0%, transparent 40%);
  border: 1px solid var(--border);
  border-top-color: rgba(255,255,255,0.06);
  border-bottom-color: rgba(0,0,0,0.3);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--card-shadow);
  position: relative;
  overflow: hidden;
}

/* Spotlight overlay for mouse-follow effect (JS sets --spot-x, --spot-y) */
.cf-conditions::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    400px circle at var(--spot-x, -200px) var(--spot-y, -200px),
    rgba(0,180,216,0.06) 0%,
    transparent 70%
  );
  z-index: 0;
  transition: background 0.15s ease;
}

.cf-conditions > * {
  position: relative;
  z-index: 1;
}

.cf-conditions h3 {
  color: var(--text-heading);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cf-conditions-group {
  margin-bottom: 14px;
}

.cf-conditions-group:last-child {
  margin-bottom: 0;
}

.cf-conditions-group__title {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(30, 41, 59, 0.4);
}

.cf-conditions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.cf-cond-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid rgba(30, 41, 59, 0.5);
}

.cf-cond-item:last-child {
  border-bottom: none;
}

.cf-cond-label {
  color: var(--text-muted);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cf-cond-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cf-cond-value {
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 600;
  transition: color 0.3s;
}

.cf-cond-value--good {
  color: #6ee7b7;
}

.cf-cond-value--fair {
  color: #fcd34d;
}

.cf-cond-value--poor {
  color: #fca5a5;
}

/* ── Dew Warning ────────────────────────────────────────── */

.cf-dew-warning {
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 20px;
  display: none;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  transition: opacity 0.3s;
  box-shadow: var(--card-shadow);
}

.cf-dew-warning.visible {
  display: flex;
}

.cf-dew-warning--yellow {
  background: rgba(251, 191, 36, 0.04);
  border: 1px solid rgba(251, 191, 36, 0.15);
  border-left: 3px solid #fbbf24;
  color: #fbbf24;
}

.cf-dew-warning--red {
  background: rgba(239, 68, 68, 0.04);
  border: 1px solid rgba(239, 68, 68, 0.15);
  border-left: 3px solid #ef4444;
  color: #ef4444;
}

.cf-dew-warning__icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.cf-dew-warning a {
  color: var(--accent);
  text-decoration: none;
  margin-left: 6px;
  transition: color 0.2s;
}
.cf-dew-warning a:hover {
  text-decoration: underline;
}

/* ── Twilight Info ──────────────────────────────────────── */

.cf-twilight-info {
  background: linear-gradient(180deg, rgba(255,255,255,0.02) 0%, transparent 40%);
  border: 1px solid var(--border);
  border-top-color: rgba(255,255,255,0.06);
  border-bottom-color: rgba(0,0,0,0.3);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: var(--card-shadow);
}

.cf-twilight-info h3 {
  color: var(--text-heading);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cf-twilight-strip {
  display: flex;
  height: 44px;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 12px;
}

.cf-tw-phase {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  min-width: 0;
}

.cf-tw-label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  padding: 0 2px;
}

.cf-tw-time {
  font-size: 0.6rem;
  opacity: 0.7;
  white-space: nowrap;
}

.cf-tw-day { background: #3b82f6; color: #fff; flex: 0.5; }
.cf-tw-civil { background: #1e40af; color: #94a3b8; }
.cf-tw-nautical { background: #1e3a5f; color: #64748b; }
.cf-tw-astro { background: #0f172a; color: #475569; }
.cf-tw-dark { background: #020617; color: #00d2ff; flex: 2; border: 1px solid rgba(0,210,255,0.15); border-top: none; border-bottom: none; }

.cf-twilight-summary {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.cf-twilight-summary span:nth-child(2) {
  color: var(--accent);
  font-weight: 600;
}

/* ── Darkness cells in timeline ────────────────────────── */

.cf-darkness-row td {
  padding: 2px 0 !important;
}

.cf-darkness-cell {
  width: 34px;
  height: 14px;
  border-radius: 2px;
  margin: 0 auto;
}

.cf-darkness-row th {
  font-size: 0.7rem !important;
}

/* ── Timeline ───────────────────────────────────────────── */

.cf-timeline-section {
  background: linear-gradient(180deg, rgba(255,255,255,0.02) 0%, transparent 40%);
  border: 1px solid var(--border);
  border-top-color: rgba(255,255,255,0.06);
  border-bottom-color: rgba(0,0,0,0.3);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: var(--card-shadow);
}

.cf-timeline-section h3 {
  color: var(--text-heading);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.cf-timeline-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  position: relative;
}

.cf-timeline-wrap::-webkit-scrollbar {
  height: 6px;
}
.cf-timeline-wrap::-webkit-scrollbar-track {
  background: transparent;
}
.cf-timeline-wrap::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.cf-timeline-table {
  border-collapse: collapse;
  min-width: max-content;
}

.cf-timeline-table th,
.cf-timeline-table td {
  padding: 4px 0;
  text-align: center;
  min-width: 44px;
  font-size: 0.75rem;
}

.cf-timeline-table th {
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
  position: sticky;
  left: 0;
  background: var(--bg-section);
  z-index: 2;
  text-align: left;
  padding-right: 10px;
  min-width: 56px;
}

.cf-timeline-table thead th {
  color: var(--text-secondary);
  font-weight: 600;
  position: static;
  padding-bottom: 8px;
}

.cf-timeline-cell {
  width: 34px;
  height: 20px;
  border-radius: 4px;
  margin: 0 auto;
  transition: transform 0.15s, box-shadow 0.15s;
  cursor: default;
  position: relative;
}

.cf-timeline-cell:hover {
  transform: scaleY(1.3);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.1);
  z-index: 1;
}

.cf-timeline-night-bg {
  background: rgba(0, 0, 0, 0.2);
}

.cf-timeline-now-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent);
  z-index: 3;
  pointer-events: none;
}

.cf-timeline-now-marker::before {
  content: 'NOW';
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.55rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.05em;
}

.cf-timeline-text {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.7rem;
}

.cf-timeline-date-marker {
  border-left: 1px solid var(--border);
}

/* Timeline tooltip */
.cf-timeline-tooltip {
  position: fixed;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 0.75rem;
  color: var(--text-primary);
  pointer-events: none;
  z-index: 100;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 0.15s;
  line-height: 1.6;
}

.cf-timeline-tooltip.visible {
  opacity: 1;
}

/* ── Product Integration ────────────────────────────────── */

.cf-promo {
  background: linear-gradient(180deg, rgba(255,255,255,0.02) 0%, transparent 40%);
  border: 1px solid var(--border);
  border-top-color: rgba(255,255,255,0.06);
  border-bottom-color: rgba(0,0,0,0.3);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 20px;
  display: none;
  transition: border-color 0.3s;
  box-shadow: var(--card-shadow);
}

.cf-promo.visible {
  display: block;
}

.cf-promo:hover {
  border-color: rgba(0, 180, 216, 0.3);
}

.cf-promo__text {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.cf-promo__link {
  display: inline-block;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.cf-promo__link:hover {
  border-bottom-color: var(--accent);
}

/* ── Data Source Notice ──────────────────────────────────── */

.cf-sources {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.cf-source-badge {
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: 3px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  cursor: default;
}

.cf-source-badge:hover {
  background: rgba(255, 255, 255, 0.03);
}

.cf-source-badge--ok {
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--cloud-clear);
}

.cf-source-badge--ok:hover {
  border-color: rgba(16, 185, 129, 0.5);
  background: rgba(16, 185, 129, 0.05);
}

.cf-source-badge--fail {
  border-color: rgba(239, 68, 68, 0.3);
  color: var(--cloud-overcast);
}

.cf-source-badge--fail:hover {
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(239, 68, 68, 0.05);
}

/* ── Loading Skeleton ──────────────────────────────────── */

.cf-loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.cf-loading__spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: cf-spin 0.8s linear infinite;
  margin: 0 auto 12px;
}

.cf-skeleton {
  padding: 20px 0;
}

.cf-skeleton-bar {
  height: 14px;
  background: linear-gradient(90deg, var(--bg-card) 25%, #1a2332 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  border-radius: 4px;
  animation: cf-shimmer 1.5s ease-in-out infinite;
  margin-bottom: 10px;
}

.cf-skeleton-bar--wide { width: 100%; height: 60px; }
.cf-skeleton-bar--med { width: 80%; }
.cf-skeleton-bar--short { width: 50%; }
.cf-skeleton-bar--row {
  display: flex;
  gap: 8px;
}
.cf-skeleton-bar--cell {
  width: 34px;
  height: 20px;
  flex-shrink: 0;
  background: linear-gradient(90deg, var(--bg-card) 25%, #1a2332 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  border-radius: 4px;
  animation: cf-shimmer 1.5s ease-in-out infinite;
}

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

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

.cf-error {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  color: var(--cloud-overcast);
  margin-bottom: 20px;
  display: none;
  box-shadow: var(--card-shadow);
}

.cf-error.visible {
  display: block;
}

.cf-error p {
  margin-bottom: 10px;
}

/* ── Footer ────────────────────────────────────────────── */

.cf-footer {
  text-align: center;
  padding: 24px 0 0;
  margin-top: 8px;
  border-top: 1px solid var(--border);
}

.cf-footer a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  transition: color 0.2s;
}

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

/* ── Legend ──────────────────────────────────────────────── */

.cf-legend {
  display: flex;
  gap: 14px;
  margin-top: 12px;
  flex-wrap: wrap;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.cf-legend:hover {
  opacity: 1;
}

.cf-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.65rem;
  color: var(--text-muted);
}

.cf-legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

/* ── Reduced Motion ────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .cf-header::after,
  .cf-score-gauge__value,
  .cf-entrance {
    animation: none !important;
  }
  .cf-entrance {
    opacity: 1 !important;
    transform: none !important;
  }
  .cf-header-starfield {
    display: none;
  }
}

/* ── Responsive ─────────────────────────────────────────── */

@media (max-width: 768px) {
  .cf-header {
    padding: 24px 20px;
  }

  .cf-header h1 .cf-title {
    font-size: 1.3rem;
  }

  .cf-location {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .cf-location-name {
    margin-right: 0;
  }

  .cf-location .cf-loc-inputs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
  }

  .cf-location input[type="number"] {
    flex: 1;
    min-width: 80px;
  }

  .cf-location .cf-loc-buttons {
    display: flex;
    gap: 8px;
  }

  .cf-score-section {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .cf-conditions {
    width: 100%;
  }

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

  .cf-verdict__stats {
    gap: 16px;
  }

  /* Mobile vertical timeline */
  .cf-timeline-mobile {
    display: block;
    max-height: 500px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .cf-timeline-desktop {
    display: none;
  }

  .cf-mobile-hour {
    display: grid;
    grid-template-columns: 50px 1fr;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(30, 41, 59, 0.5);
    align-items: center;
  }

  .cf-mobile-hour:last-child {
    border-bottom: none;
  }

  .cf-mobile-hour__time {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
  }

  .cf-mobile-hour__bars {
    display: flex;
    flex-direction: column;
    gap: 3px;
  }

  .cf-mobile-bar {
    height: 8px;
    border-radius: 2px;
    position: relative;
  }

  .cf-mobile-bar__label {
    position: absolute;
    right: 4px;
    top: -1px;
    font-size: 0.55rem;
    color: rgba(0, 0, 0, 0.6);
    font-weight: 700;
  }

  .cf-mobile-hour__meta {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 2px;
  }
}

@media (min-width: 769px) {
  .cf-timeline-mobile {
    display: none;
  }

  .cf-timeline-desktop {
    display: block;
  }
}