:root {
    --bg: #f0f2f5;
    --card: #ffffff;
    --ink: #1c2331;
    --blue: #2563eb;
   --blue-dark: #1d4ed8;
   --blue-light: #dbeafe;
    --mid: #6b7280;
  --border: #e5e7eb;
    --highlight: #f3f6ff;
    --rust: #dc6f3a;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);

    --feature-image-mam: url('/assets/images/weather/mam.jpeg');
  }

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

  body {
    font-family: 'Lato', sans-serif;
    background: var(--bg);
    color: var(--ink);
    min-height: 100vh;
  }

  .container {
    max-width: 680px;
    margin: 0 auto;
    padding: 20px 16px 80px;
  }

  /* ── Error / status ──────────────────────────────────── */
  .status-msg {
    padding: 14px 18px;
    font-size: 14px;
    font-style: italic;
    color: var(--mid);
    background: var(--card);
    border-radius: 14px;
    margin-bottom: 16px;
    display: none;
    box-shadow: var(--shadow);
  }

  .status-msg.visible { display: block; }
  .status-msg.error { color: var(--rust); }

  /* ── Loading ─────────────────────────────────────────── */
  .loading {
    text-align: center;
    padding: 48px;
    display: none;
  }

  .loading.visible { display: block; }

  .spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 14px;
  }

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

  .loading p {
    font-size: 13px;
    color: var(--mid);
    font-style: italic;
  }

  /* ── Results ─────────────────────────────────────────── */
  .results { display: none; }
  .results.visible { display: block; }

  @keyframes fadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
  }

  /* Location headline */
  .location-hed {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 2px;
    padding: 0 4px;
  }

  .location-name {
    font-family: 'Nunito', sans-serif;
    font-size: clamp(22px, 5vw, 30px);
    font-weight: 900;
    line-height: 1.1;
    color: var(--ink);
  }

  .obs-time {
    font-size: 11px;
    letter-spacing: 0.5px;
    color: var(--mid);
    background: var(--card);
    padding: 4px 10px;
    border-radius: 20px;
    box-shadow: var(--shadow);
  }

  .location-region {
    font-size: 13px;
    color: var(--mid);
    margin-bottom: 14px;
    padding: 0 4px;
  }

  /* Current card */
  .current-card {
    background: var(--card);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 14px;
    box-shadow: var(--shadow);
    animation: fadeUp 0.4s ease;
  }

  .current-main {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
  }

  .temp-block { flex: 1; min-width: 130px; }

  .temp-c {
    font-family: 'Nunito', sans-serif;
    font-size: 68px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -2px;
    color: var(--ink);
  }

  .temp-c sup {
    font-size: 26px;
    vertical-align: super;
    letter-spacing: 0;
  }

  .feels-like {
    font-size: 13px;
    color: var(--mid);
    margin-top: 4px;
  }

  .condition-block { flex: 2; min-width: 160px; }

  .condition-desc {
    font-family: 'Nunito', sans-serif;
    font-size: clamp(17px, 4vw, 22px);
    font-weight: 800;
    margin-bottom: 10px;
    line-height: 1.2;
    color: var(--ink);
  }

  .yorkshire-quip {
    font-size: 13px;
    color: var(--mid);
    font-style: italic;
    line-height: 1.5;
    background: var(--highlight);
    border-radius: 10px;
    padding: 10px 14px;
    border-left: 3px solid var(--blue);
  }

  /* Stats grid */
  .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 20px;
  }

  .stat-cell {
    background: var(--bg);
    padding: 13px 14px;
    border-radius: 14px;
  }

  .stat-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--mid);
    margin-bottom: 4px;
  }

  .stat-value {
    font-family: 'Nunito', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: var(--ink);
  }

  .stat-unit {
    font-family: 'Lato', sans-serif;
    font-size: 12px;
    font-weight: 400;
    color: var(--mid);
    margin-left: 2px;
  }

  /* Section head */
  .section-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0 10px;
    padding: 0 4px;
  }

  .section-head h2 {
    font-family: 'Nunito', sans-serif;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--mid);
    white-space: nowrap;
  }

  .section-rule {
    flex: 1;
    height: 1px;
    background: var(--border);
  }

  /* Hourly */
  .hourly-scroll {
    display: flex;
    gap: 0;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    background: var(--card);
    border-radius: 20px;
    box-shadow: var(--shadow);
    animation: fadeUp 0.4s ease 0.1s both;
  }

  .hourly-scroll::-webkit-scrollbar { display: none; }

  .hour-cell {
    flex: 0 0 70px;
    padding: 14px 6px;
    text-align: center;
    border-right: 1px solid var(--border);
    transition: background 0.15s;
    border-radius: 0;
  }

  .hour-cell:first-child { border-radius: 20px 0 0 20px; }
  .hour-cell:last-child { border-right: none; border-radius: 0 20px 20px 0; }
  .hour-cell:hover { background: var(--highlight); }
  .hour-cell.now { background: var(--blue-light); }

  .hour-time {
    font-size: 10px;
    font-weight: 700;
    color: var(--mid);
    text-transform: uppercase;
    margin-bottom: 8px;
  }

  .hour-cell.now .hour-time { color: var(--blue); }

  .hour-icon { font-size: 20px; margin-bottom: 6px; }

  .hour-temp {
    font-family: 'Nunito', sans-serif;
    font-size: 15px;
    font-weight: 800;
    color: var(--ink);
  }

  .hour-rain {
    font-size: 10px;
    color: var(--mid);
    margin-top: 3px;
  }



  /* ── Feature card system ──────────────────────────── */
  .feature-card {
    background: var(--card);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin: 20px 0;
    animation: fadeUp 0.4s ease 0.1s both;
  }

  .feature-hero {
    --feature-header-image: none;
    min-height: 96px;
    padding: 22px 24px;
    color: #ffffff;
    background-image:
      linear-gradient(135deg, rgba(18, 42, 87, 0.94) 0%, rgba(37, 99, 235, 0.80) 56%, rgba(96, 165, 250, 0.58) 100%),
      radial-gradient(circle at 82% 18%, rgba(255,255,255,0.26), transparent 38%),
      var(--feature-header-image);
    background-size: cover, auto, cover;
    background-position: center, center, center;
    background-repeat: no-repeat;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .feature-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(0,0,0,0.18));
    pointer-events: none;
  }

  .feature-hero > * {
    position: relative;
    z-index: 1;
  }

  .daily-feature-card .feature-hero {
    --feature-header-image: var(--feature-image-seven-day);
  }



  /* Seven-day header - video background. */
  .daily-feature-card .feature-hero {
    overflow: hidden;
  }
  .daily-feature-card .feature-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
      linear-gradient(135deg, rgba(18, 42, 87, 0.50) 0%, rgba(37, 99, 235, 0.34) 56%, rgba(96, 165, 250, 0.22) 100%),
      linear-gradient(180deg, rgba(0,0,0,0.18), rgba(0,0,0,0.34));
    z-index: 1;
    pointer-events: none;
  }
  .daily-feature-card .seven-day-bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
  }

  .daily-feature-card .feature-title,
  .daily-feature-card .feature-kicker,
  .daily-feature-card .feature-sub {
    text-shadow: 0 2px 8px rgba(0,0,0,0.35);
  }


  /* Sneeze Report header - video background. */
  .pollen-feature-card .feature-hero {
    overflow: hidden;
  }
  .pollen-feature-card .feature-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
      linear-gradient(135deg, rgba(18, 42, 87, 0.50) 0%, rgba(37, 99, 235, 0.34) 56%, rgba(96, 165, 250, 0.22) 100%),
      linear-gradient(180deg, rgba(0,0,0,0.18), rgba(0,0,0,0.34));
    z-index: 1;
    pointer-events: none;
  }
  .pollen-feature-card .sneeze-bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
  }

  .pollen-feature-card .feature-title,
  .pollen-feature-card .feature-kicker,
  .pollen-feature-card .feature-sub {
    text-shadow: 0 2px 8px rgba(0,0,0,0.35);
  }


  /* Not Shite / hourly header - video background. */
  .hourly-feature-card .feature-hero {
    overflow: hidden;
  }
  .hourly-feature-card .feature-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
      linear-gradient(135deg, rgba(18, 42, 87, 0.50) 0%, rgba(37, 99, 235, 0.34) 56%, rgba(96, 165, 250, 0.22) 100%),
      linear-gradient(180deg, rgba(0,0,0,0.18), rgba(0,0,0,0.34));
    z-index: 1;
    pointer-events: none;
  }
  .hourly-feature-card .notshite-bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
  }

  .hourly-feature-card .feature-title,
  .hourly-feature-card .feature-kicker,
  .hourly-feature-card .feature-sub {
    text-shadow: 0 2px 8px rgba(0,0,0,0.35);
  }

  /* Rain Watch - video background. Gradient ::before sits above video; fallback
     is the base .feature-hero gradient when the video fails to load. */
  .rain-feature-card .feature-hero {
    overflow: hidden;
  }
  .rain-feature-card .feature-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
      linear-gradient(135deg, rgba(18, 42, 87, 0.50) 0%, rgba(37, 99, 235, 0.34) 56%, rgba(96, 165, 250, 0.22) 100%),
      linear-gradient(180deg, rgba(0,0,0,0.18), rgba(0,0,0,0.34));
    z-index: 1;
    pointer-events: none;
  }
  .rain-feature-card .rain-bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
  }

  .rain-feature-card .feature-title,
  .rain-feature-card .feature-kicker,
  .rain-feature-card .feature-sub {
    text-shadow: 0 2px 8px rgba(0,0,0,0.35);
  }

  /* Daylight Watch header - video background. */
  .daylight-feature-card .feature-hero {
    overflow: hidden;
  }
  .daylight-feature-card .feature-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
      linear-gradient(135deg, rgba(18, 42, 87, 0.50) 0%, rgba(37, 99, 235, 0.34) 56%, rgba(96, 165, 250, 0.22) 100%),
      linear-gradient(180deg, rgba(0,0,0,0.18), rgba(0,0,0,0.34));
    z-index: 1;
    pointer-events: none;
  }
  .daylight-feature-card .daylight-bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
  }

  .daylight-feature-card .feature-title,
  .daylight-feature-card .feature-kicker,
  .daylight-feature-card .feature-sub {
    text-shadow: 0 2px 8px rgba(0,0,0,0.35);
  }

  .feature-kicker {
    font-family: 'Nunito', sans-serif;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.68);
    margin-bottom: 6px;
  }

  .feature-title {
    font-family: 'Nunito', sans-serif;
    font-size: clamp(24px, 5.2vw, 36px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.8px;
    color: #ffffff;
  }

  .feature-sub {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.4;
    color: rgba(255,255,255,0.74);
  }

  .feature-body {
    background: var(--card);
  }

  .feature-card .hourly-scroll {
    border-radius: 0;
    box-shadow: none;
    margin: 0;
  }

  .feature-card .hour-cell:first-child { border-radius: 0; }
  .feature-card .hour-cell:last-child { border-radius: 0; }

  .feature-card .daily-list {
    border-radius: 0;
    box-shadow: none;
    margin: 0;
  }


  .feature-trigger-card {
    width: 100%;
    border: none;
    text-align: left;
    font: inherit;
    color: inherit;
    cursor: pointer;
    display: block;
    padding: 0;
  }

  .feature-trigger-card .feature-hero {
    transition: transform 0.14s ease, filter 0.14s ease;
  }

  .feature-trigger-card:active .feature-hero {
    transform: scale(0.995);
    filter: brightness(0.96);
  }

  .feature-trigger-card:focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 3px;
  }


  .feature-card-stack {
    display: grid;
    gap: 14px;
    margin: 20px 0;
  }

  .feature-card-stack .feature-card {
    margin: 0;
  }

  .detail-modal.dragging {
    transition: none !important;
  }

  .modal-drag-handle,
  .modal-hero {
    touch-action: none;
  }

  .modal-body-padded {
    padding: 16px;
  }

  .detail-intro {
    position: sticky;
    top: 0;
    z-index: 4;
    font-size: 14px;
    line-height: 1.5;
    color: var(--mid);
    background: var(--highlight);
    border-left: 4px solid var(--blue);
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 14px;
    box-shadow: 0 6px 16px rgba(255,255,255,0.92);
  }

  .detail-helper {
    font-size: 12px;
    line-height: 1.4;
    color: var(--mid);
    margin: -4px 2px 14px;
  }

  .rain-chart {
    display: grid;
    gap: 10px;
  }

  .rain-chart-row {
    display: grid;
    grid-template-columns: 54px 1fr 52px 62px;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
  }

  .rain-chart-row:last-child { border-bottom: none; }

  .rain-chart-time {
    font-family: 'Nunito', sans-serif;
    font-weight: 900;
    font-size: 13px;
    color: var(--ink);
  }

  .rain-bar-track {
    height: 16px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
  }

  .rain-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, #93c5fd 0%, #2563eb 100%);
  }

  .rain-chart-pct,
  .rain-chart-mm {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 13px;
    color: var(--ink);
    text-align: right;
  }

  .rain-chart-mm {
    color: var(--mid);
  }

  .pollen-overall {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 16px;
    margin-bottom: 14px;
  }

  .pollen-overall-label {
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--mid);
    margin-bottom: 8px;
  }

  .pollen-overall-level {
    font-family: 'Nunito', sans-serif;
    font-size: clamp(30px, 8vw, 46px);
    font-weight: 900;
    line-height: 1;
    color: var(--ink);
    letter-spacing: -1px;
  }

  .pollen-meter {
    margin-top: 14px;
  }

  .pollen-meter-track {
    height: 14px;
    border-radius: 999px;
    background: linear-gradient(90deg, #d1fae5 0%, #fde68a 50%, #fecaca 100%);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.08);
  }

  .pollen-meter-pin {
    position: absolute;
    top: 50%;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: #ffffff;
    border: 4px solid var(--blue);
    box-shadow: 0 3px 10px rgba(0,0,0,0.18);
    transform: translate(-50%, -50%);
    left: 0%;
  }

  .pollen-meter-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 7px;
    font-size: 11px;
    font-weight: 800;
    color: var(--mid);
  }

  .pollen-section-title {
    font-family: 'Nunito', sans-serif;
    font-size: 13px;
    font-weight: 900;
    color: var(--ink);
    margin: 16px 2px 8px;
  }

  .pollen-culprit-list {
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    background: #ffffff;
  }

  .pollen-culprit-row {
    display: grid;
    grid-template-columns: 82px 1fr 72px;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
  }

  .pollen-culprit-row:last-child {
    border-bottom: none;
  }

  .pollen-name {
    font-family: 'Nunito', sans-serif;
    font-size: 13px;
    font-weight: 900;
    color: var(--ink);
  }

  .pollen-mini-track {
    height: 9px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
  }

  .pollen-mini-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #93c5fd 0%, #2563eb 100%);
    width: 0%;
  }

  .pollen-level {
    font-size: 12px;
    font-weight: 800;
    color: var(--mid);
    text-align: right;
  }

  .pollen-calm {
    font-size: 13px;
    line-height: 1.5;
    color: var(--mid);
    background: #f9fafb;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px;
  }

  .daylight-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 14px 0;
  }

  .daylight-tile {
    background: #f9fafb;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px;
  }

  .daylight-label {
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--mid);
    margin-bottom: 6px;
  }

  .daylight-value {
    font-family: 'Nunito', sans-serif;
    font-size: 20px;
    line-height: 1;
    font-weight: 900;
    color: var(--ink);
  }

  .daylight-progress-wrap {
    margin-top: 16px;
    background: #eef2ff;
    border-radius: 999px;
    height: 18px;
    overflow: hidden;
    border: 1px solid var(--border);
  }

  .daylight-progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, #bfdbfe 0%, #2563eb 100%);
  }

  .daylight-note {
    margin-top: 10px;
    font-size: 12px;
    color: var(--mid);
    line-height: 1.4;
  }

  @media (max-width: 420px) {
    .rain-chart-row {
      grid-template-columns: 48px 1fr 44px 52px;
      gap: 8px;
    }
    .rain-chart-pct,
    .rain-chart-mm { font-size: 12px; }
    .daylight-summary { grid-template-columns: 1fr; }
  }


  /* ── Daily detail modal / app-style bottom sheet ─────── */
  .modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.62);
    z-index: 1000;
    display: none;
    align-items: flex-end;
    justify-content: center;
    padding: 18px;
    backdrop-filter: blur(3px);
    animation: backdropFade 0.18s ease both;
  }

  .modal-backdrop.open { display: flex; }

  .detail-modal {
    width: min(680px, 100%);
    max-height: min(88vh, 780px);
    background: var(--card);
    border-radius: 28px 28px 24px 24px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0,0,0,0.32);
    animation: modalSheetUp 0.26s cubic-bezier(.2,.9,.2,1) both;
    will-change: transform;
  }

  @keyframes backdropFade {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  @keyframes modalSheetUp {
    from { opacity: 0; transform: translateY(42px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }

  .modal-hero {
    min-height: 120px;
    padding: 14px 24px 22px;
    color: #ffffff;
    background:
      linear-gradient(135deg, rgba(18, 42, 87, 0.96) 0%, rgba(37, 99, 235, 0.84) 56%, rgba(96, 165, 250, 0.64) 100%),
      radial-gradient(circle at 82% 18%, rgba(255,255,255,0.28), transparent 38%);
    position: sticky;
    top: 0;
    z-index: 2;
  }

  .modal-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(0,0,0,0.18));
    pointer-events: none;
  }

  .modal-hero > * {
    position: relative;
    z-index: 1;
  }


  /* Seven-day modal header - video background. */
  .modal-hero.seven-day-detail {
    overflow: hidden;
  }
  .modal-hero.seven-day-detail::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
      linear-gradient(135deg, rgba(18, 42, 87, 0.50) 0%, rgba(37, 99, 235, 0.34) 56%, rgba(96, 165, 250, 0.22) 100%),
      linear-gradient(180deg, rgba(0,0,0,0.18), rgba(0,0,0,0.34));
    z-index: 1;
    pointer-events: none;
  }
  .modal-hero .seven-day-bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    display: none;
  }
  .modal-hero.seven-day-detail .seven-day-bg-video {
    display: block;
  }

  .modal-hero.seven-day-detail .modal-kicker,
  .modal-hero.seven-day-detail .modal-title,
  .modal-hero.seven-day-detail .modal-sub {
    text-shadow: 0 2px 8px rgba(0,0,0,0.38);
  }


  /* Sneeze modal header - video background. */
  .modal-hero.sneeze-detail {
    overflow: hidden;
  }
  .modal-hero.sneeze-detail::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
      linear-gradient(135deg, rgba(18, 42, 87, 0.50) 0%, rgba(37, 99, 235, 0.34) 56%, rgba(96, 165, 250, 0.22) 100%),
      linear-gradient(180deg, rgba(0,0,0,0.18), rgba(0,0,0,0.34));
    z-index: 1;
    pointer-events: none;
  }
  .modal-hero .sneeze-bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    display: none;
  }
  .modal-hero.sneeze-detail .sneeze-bg-video {
    display: block;
  }

  .modal-hero.sneeze-detail .modal-kicker,
  .modal-hero.sneeze-detail .modal-title,
  .modal-hero.sneeze-detail .modal-sub {
    text-shadow: 0 2px 8px rgba(0,0,0,0.38);
  }


  /* Rain modal header - video background matching the Rain Watch card. */
  .modal-hero.rain-detail {
    overflow: hidden;
  }
  .modal-hero.rain-detail::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
      linear-gradient(135deg, rgba(18, 42, 87, 0.50) 0%, rgba(37, 99, 235, 0.34) 56%, rgba(96, 165, 250, 0.22) 100%),
      linear-gradient(180deg, rgba(0,0,0,0.18), rgba(0,0,0,0.34));
    z-index: 1;
    pointer-events: none;
  }
  .modal-hero .rain-bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    display: none;
  }
  .modal-hero.rain-detail .rain-bg-video {
    display: block;
  }

  .modal-hero.rain-detail .modal-kicker,
  .modal-hero.rain-detail .modal-title,
  .modal-hero.rain-detail .modal-sub {
    text-shadow: 0 2px 8px rgba(0,0,0,0.38);
  }

  /* Daylight modal header - video background. */
  .modal-hero.daylight-detail {
    overflow: hidden;
  }
  .modal-hero.daylight-detail::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
      linear-gradient(135deg, rgba(18, 42, 87, 0.50) 0%, rgba(37, 99, 235, 0.34) 56%, rgba(96, 165, 250, 0.22) 100%),
      linear-gradient(180deg, rgba(0,0,0,0.18), rgba(0,0,0,0.34));
    z-index: 1;
    pointer-events: none;
  }
  .modal-hero .daylight-bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    display: none;
  }
  .modal-hero.daylight-detail .daylight-bg-video {
    display: block;
  }

  .modal-hero.daylight-detail .modal-kicker,
  .modal-hero.daylight-detail .modal-title,
  .modal-hero.daylight-detail .modal-sub {
    text-shadow: 0 2px 8px rgba(0,0,0,0.38);
  }

  .modal-drag-handle {
    width: 46px;
    height: 5px;
    border-radius: 999px;
    background: rgba(255,255,255,0.54);
    margin: 0 auto 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
  }

  .modal-topline {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
  }

  .modal-kicker {
    font-family: 'Nunito', sans-serif;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.68);
    margin-bottom: 8px;
  }

  .modal-title {
    font-family: 'Nunito', sans-serif;
    font-size: clamp(25px, 6vw, 38px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.8px;
  }

  .modal-sub {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.4;
    color: rgba(255,255,255,0.74);
  }

  .modal-close {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255,255,255,0.28);
    background: rgba(255,255,255,0.18);
    color: #fff;
    border-radius: 999px;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.14s ease, background 0.14s ease;
  }

  .modal-close:hover { background: rgba(255,255,255,0.26); }
  .modal-close:active { transform: scale(0.94); }

  .modal-body {
    max-height: calc(88vh - 120px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #ffffff;
  }

  .modal-hour-row {
    display: grid;
    grid-template-columns: 72px 44px 1fr 82px;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
  }

  .modal-hour-row:last-child { border-bottom: none; }
  .modal-hour-row:hover { background: var(--highlight); }

  .modal-hour-time {
    font-family: 'Nunito', sans-serif;
    font-weight: 900;
    font-size: 14px;
    color: var(--ink);
  }

  .modal-hour-icon { font-size: 23px; text-align: center; }

  .modal-hour-condition { min-width: 0; }

  .modal-hour-label {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 14px;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .modal-hour-rain {
    font-size: 12px;
    color: var(--mid);
    margin-top: 2px;
  }

  .modal-hour-temp {
    font-family: 'Nunito', sans-serif;
    font-size: 22px;
    font-weight: 900;
    text-align: right;
    color: var(--ink);
  }

  .day-row {
    cursor: pointer;
    transition: transform 0.12s ease, background 0.12s ease;
  }

  .day-row:active { transform: scale(0.995); }

  .day-row:focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: -3px;
  }

  @media (min-width: 680px) {
    .modal-backdrop { align-items: center; }
    .detail-modal { border-radius: 28px; }
  }

  @media (max-width: 679px) {
    .modal-backdrop { padding: 0; }
    .detail-modal {
      width: 100%;
      max-height: 90vh;
      border-radius: 28px 28px 0 0;
    }
  }

  .daylight-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 14px 0;
  }

  .daylight-tile {
    background: #f9fafb;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px;
  }

  .daylight-label {
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--mid);
    margin-bottom: 6px;
  }

  .daylight-value {
    font-family: 'Nunito', sans-serif;
    font-size: 20px;
    line-height: 1;
    font-weight: 900;
    color: var(--ink);
  }

  .daylight-progress-wrap {
    margin-top: 16px;
    background: #eef2ff;
    border-radius: 999px;
    height: 18px;
    overflow: hidden;
    border: 1px solid var(--border);
  }

  .daylight-progress-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, #bfdbfe 0%, #2563eb 100%);
  }

  .daylight-note {
    margin-top: 10px;
    font-size: 12px;
    color: var(--mid);
    line-height: 1.4;
  }


  @media (max-width: 420px) {
    .pollen-culprit-row {
      grid-template-columns: 72px 1fr 64px;
      gap: 8px;
      padding: 11px 12px;
    }
    .pollen-level { font-size: 11px; }
  }

  @media (max-width: 420px) {
    .modal-hour-row {
      grid-template-columns: 58px 36px 1fr 62px;
      padding: 13px 14px;
      gap: 8px;
    }
    .modal-hour-label { font-size: 13px; }
    .modal-hour-temp { font-size: 19px; }
  }

  @media (prefers-reduced-motion: reduce) {
    .modal-backdrop,
    .detail-modal,
    .day-row,
    .modal-close {
      animation: none !important;
      transition: none !important;
    }
  }

  /* Daily */
  .daily-list {
    background: var(--card);
    border-radius: 20px;
    box-shadow: var(--shadow);
    overflow: hidden;
    animation: fadeUp 0.4s ease 0.2s both;
  }

  .day-row {
    width: 100%;
    border: 0;
    background: #ffffff;
    font: inherit;
    color: inherit;
    text-align: left;
    display: grid;
    grid-template-columns: 1.4fr 0.7fr 1fr 0.9fr;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    transition: background 0.1s;
  }

  .day-row:last-child { border-bottom: none; }
  .day-row:hover { background: var(--highlight); }

  .day-name {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 14px;
    color: var(--ink);
  }

  .day-name small {
    display: block;
    font-weight: 600;
    font-size: 11px;
    color: var(--mid);
    margin-top: 1px;
  }

  .day-icon { font-size: 22px; text-align: center; }

  .day-temps {
    text-align: center;
    font-family: 'Nunito', sans-serif;
  }

  .day-hi { font-size: 17px; font-weight: 800; color: var(--ink); }
  .day-lo { font-size: 13px; color: var(--mid); margin-left: 3px; }

  .day-rain {
    text-align: right;
    font-size: 12px;
    color: var(--mid);
  }

  .day-rain .rain-pct {
    font-family: 'Nunito', sans-serif;
    font-weight: 800;
    font-size: 14px;
    color: var(--blue);
  }



  /* ── Main hero weather card ─────────────────────────── */
  .hero-current-card {
    padding: 0;
    overflow: hidden;
  }

  .weather-hero {
    min-height: 340px;
    border-radius: 20px 20px 0 0;
    padding: 28px 30px 24px;
    color: #ffffff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 12px;
    position: relative;
  }

  .weather-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
      linear-gradient(90deg, rgba(12, 24, 48, 0.82) 0%, rgba(18, 42, 87, 0.58) 45%, rgba(18, 42, 87, 0.20) 100%),
      linear-gradient(180deg, rgba(0,0,0,0.22) 0%, rgba(0,0,0,0.12) 38%, rgba(0,0,0,0.62) 100%);
    z-index: 1;
    pointer-events: none;
  }

  .weather-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 76% 18%, rgba(255,255,255,0.12), transparent 42%);
    pointer-events: none;
    z-index: 1;
  }

  .weather-bg-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-image: var(--hero-weather-image, url('/assets/images/weather/Hero/PartlyCloudy.png'));
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    transform: scale(1.10);
    transform-origin: center center;
    z-index: 0;
  }

  .weather-hero > * {
    position: relative;
    z-index: 1;
  }

  .hero-location-block { margin-bottom: 0; }

  .hero-name {
    font-family: 'Nunito', sans-serif;
    font-size: clamp(38px, 8vw, 58px);
    font-weight: 900;
    line-height: 0.95;
    letter-spacing: -1.8px;
    color: #fff;
    text-shadow: 0 3px 12px rgba(0,0,0,0.38);
  }

  .hero-region {
    margin-top: 10px;
    font-size: 18px;
    font-weight: 700;
    color: rgba(255,255,255,0.82);
    text-shadow: 0 2px 8px rgba(0,0,0,0.34);
  }

  .hero-date {
    margin-top: 6px;
    font-size: 15px;
    color: rgba(255,255,255,0.68);
    text-shadow: 0 2px 8px rgba(0,0,0,0.34);
  }

  .hero-temp-block { margin-top: 6px; }

  .hero-temp {
    font-family: 'Nunito', sans-serif;
    font-size: clamp(64px, 15vw, 96px);
    font-weight: 900;
    line-height: 0.88;
    letter-spacing: -4px;
    color: #fff;
    text-shadow: 0 3px 14px rgba(0,0,0,0.38);
  }

  .hero-temp sup {
    font-size: 0.42em;
    font-weight: 400;
    vertical-align: super;
    letter-spacing: 0;
  }

  .hero-feels {
    margin-top: 10px;
    font-size: 17px;
    font-weight: 700;
    color: rgba(255,255,255,0.82);
    text-shadow: 0 2px 8px rgba(0,0,0,0.34);
  }

  .hero-condition-pill {
    align-self: flex-start;
    margin-top: 4px;
    font-family: 'Nunito', sans-serif;
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    background: rgba(255,255,255,0.20);
    border: 1px solid rgba(255,255,255,0.28);
    border-radius: 999px;
    padding: 9px 17px;
    backdrop-filter: blur(8px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.16);
  }

  .assessment-card {
    background: #ffffff;
    border-left: none;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    margin: 0;
    padding: 18px 22px 20px;
  }

  .assessment-title {
    display: inline-flex;
    align-items: center;
    font-family: 'Nunito', sans-serif;
    font-size: 10px;
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: 1.1px;
    text-transform: uppercase;
    color: var(--blue);
    background: var(--blue-light);
    border: 1px solid rgba(37,99,235,0.12);
    border-radius: 999px;
    padding: 6px 10px;
    margin-bottom: 10px;
  }

  .assessment-text {
    font-size: clamp(17px, 4.1vw, 21px);
    line-height: 1.45;
    color: var(--ink);
    font-style: italic;
    letter-spacing: 0.1px;
  }

  .hero-current-card .stats-grid {
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    border-top: none;
  }

  .hero-current-card .stat-cell {
    border-radius: 0;
    background: #ffffff;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 22px 24px;
  }

  .hero-current-card .stat-cell:nth-child(even) { border-right: none; }

  @media (max-width: 480px) {
    .weather-hero {
      min-height: 330px;
      padding: 24px 24px 22px;
    }
    .hero-region { font-size: 16px; }
    .hero-date { font-size: 14px; }
    .hero-feels { font-size: 16px; }
    .assessment-card { padding: 16px 20px 18px; }
  }


  /* ── Anonymous Yorkshire Mam advice card ───────────────── */
  .mam-feature-card .feature-hero {
    min-height: 130px;
    background-image:
      linear-gradient(135deg, rgba(18, 42, 87, 0.58) 0%, rgba(37, 99, 235, 0.38) 56%, rgba(96, 165, 250, 0.24) 100%),
      linear-gradient(180deg, rgba(0,0,0,0.18), rgba(0,0,0,0.38)),
      var(--feature-image-mam);
    background-size: cover, cover, cover;
    background-position: center, center, center;
    background-repeat: no-repeat;
  }

  .mam-feature-card .feature-title,
  .mam-feature-card .feature-kicker {
    text-shadow: 0 2px 8px rgba(0,0,0,0.38);
  }

  .mam-advice-body {
    padding: 18px 22px 22px;
    background: #ffffff;
  }

  .mam-advice-text {
    position: relative;
    font-size: clamp(18px, 4.5vw, 24px);
    line-height: 1.42;
    color: var(--ink);
    font-style: italic;
    letter-spacing: -0.1px;
  }





  /* ── Yorkshire headlines / gossip card - video background ───────────────── */
  .headline-feature-card .feature-hero {
    overflow: hidden;
  }
  .headline-feature-card .feature-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
      linear-gradient(135deg, rgba(18, 42, 87, 0.58) 0%, rgba(37, 99, 235, 0.38) 56%, rgba(96, 165, 250, 0.24) 100%),
      linear-gradient(180deg, rgba(0,0,0,0.18), rgba(0,0,0,0.38));
    z-index: 1;
    pointer-events: none;
  }
  .headline-feature-card .news-bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
  }

  .headline-feature-card .feature-title,
  .headline-feature-card .feature-kicker,
  .headline-feature-card .feature-sub {
    text-shadow: 0 2px 8px rgba(0,0,0,0.38);
  }

  .headline-body {
    padding: 18px;
  }

  .headline-card-inner {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 14px;
    align-items: stretch;
    min-height: 110px;
  }

  .headline-thumb {
    width: 88px;
    min-height: 110px;
    border-radius: 16px;
    background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
    background-size: cover;
    background-position: center;
    overflow: hidden;
    flex-shrink: 0;
  }

  .headline-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .headline-meta {
    font-family: 'Nunito', sans-serif;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--blue);
    margin-bottom: 7px;
  }

  .headline-title {
    font-family: 'Nunito', sans-serif;
    font-size: clamp(18px, 4.4vw, 24px);
    font-weight: 900;
    line-height: 1.12;
    letter-spacing: -0.3px;
    color: var(--ink);
  }

  .headline-trail {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.4;
    color: var(--mid);
  }

  .headline-link {
    margin-top: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Nunito', sans-serif;
    font-size: 12px;
    font-weight: 900;
    color: var(--blue);
    text-decoration: none;
  }

  .headline-dots {
    display: flex;
    gap: 6px;
    margin-top: 16px;
  }

  .headline-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #cbd5e1;
    transition: width 0.18s ease, background 0.18s ease;
  }

  .headline-dot.active {
    width: 22px;
    background: var(--blue);
  }

  .headline-fallback .headline-card-inner {
    grid-template-columns: 1fr;
    min-height: 86px;
  }

  .headline-fallback .headline-title {
    font-style: italic;
  }

  @media (max-width: 420px) {
    .headline-card-inner {
      grid-template-columns: 74px 1fr;
    }
    .headline-thumb {
      width: 74px;
      min-height: 96px;
    }
  }


  /* ── News / gossip article pop-up ───────────────────── */
  .news-modal-hero {
    background-image:
      linear-gradient(135deg, rgba(18, 42, 87, 0.72) 0%, rgba(37, 99, 235, 0.52) 56%, rgba(96, 165, 250, 0.30) 100%),
      radial-gradient(circle at 82% 18%, rgba(255,255,255,0.22), transparent 38%);
    background-size: cover, auto;
    background-position: center, center;
    background-repeat: no-repeat;
  }

  .news-modal-title {
    font-family: 'Nunito', sans-serif;
    font-size: clamp(22px, 5.4vw, 34px);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.7px;
  }

  .news-article-body {
    padding: 20px 22px 0;
    font-size: 16px;
    line-height: 1.68;
    color: var(--ink);
  }

  .news-article-body p {
    margin-bottom: 16px;
  }

  .news-source-note {
    margin: 22px;
    padding: 16px;
    border-radius: 16px;
    background: var(--highlight);
    border-left: 4px solid var(--blue);
    font-size: 14px;
    line-height: 1.5;
    color: var(--mid);
  }

  .news-source-note a {
    color: var(--blue);
    font-weight: 900;
    text-decoration: none;
    border-bottom: 1px solid rgba(37,99,235,0.35);
  }

  .headline-link {
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
  }


  #newsDetailBackdrop .detail-modal {
    display: flex;
    flex-direction: column;
    max-height: min(90dvh, 780px);
  }

  #newsDetailBackdrop .modal-hero {
    flex: 0 0 auto;
    position: relative;
  }

  #newsDetailBackdrop .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(28px + env(safe-area-inset-bottom));
  }

  #newsDetailBackdrop .modal-sub {
    font-size: 15px;
    line-height: 1.4;
    color: rgba(255,255,255,0.82);
  }
  #newsDetailBackdrop .modal-hero.news-detail {
    --news-detail-image: none;
    overflow: hidden;
  }
  #newsDetailBackdrop .modal-hero.news-detail::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
      linear-gradient(135deg, rgba(18, 42, 87, 0.46) 0%, rgba(37, 99, 235, 0.30) 56%, rgba(96, 165, 250, 0.18) 100%),
      linear-gradient(180deg, rgba(0,0,0,0.12), rgba(0,0,0,0.36)),
      var(--news-detail-image);
    background-size: cover;
    background-position: center;
    z-index: 1;
    pointer-events: none;
  }
  #newsDetailBackdrop .modal-hero .news-bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    display: none;
  }
  #newsDetailBackdrop .modal-hero.news-detail .news-bg-video {
    display: block;
  }

  #newsDetailBackdrop .modal-hero.news-detail .modal-kicker,
  #newsDetailBackdrop .modal-hero.news-detail .modal-title,
  #newsDetailBackdrop .modal-hero.news-detail .modal-sub {
    text-shadow: 0 2px 8px rgba(0,0,0,0.42);
  }



  /* ── Location fallback pop-up ───────────────────────── */
  .location-fallback-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.62);
    z-index: 1200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
  }

  .location-fallback-backdrop.open { display: flex; }

  .location-fallback-card {
    width: min(560px, 100%);
    border-radius: 28px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 24px 80px rgba(0,0,0,0.32);
    animation: modalSheetUp 0.26s cubic-bezier(.2,.9,.2,1) both;
  }

  .location-fallback-hero {
    min-height: 260px;
    padding: 26px 26px 28px;
    color: #ffffff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
  }

  .location-fallback-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
      linear-gradient(135deg, rgba(18, 42, 87, 0.56) 0%, rgba(37, 99, 235, 0.38) 56%, rgba(96, 165, 250, 0.24) 100%),
      linear-gradient(180deg, rgba(0,0,0,0.16), rgba(0,0,0,0.42));
    z-index: 1;
    pointer-events: none;
  }

  .location-fallback-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(0,0,0,0.15));
    pointer-events: none;
  }

  .location-bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center center;
    transform: scale(1.03);
    transform-origin: center center;
    z-index: 0;
  }

  .location-fallback-hero > *:not(.location-bg-video) {
    position: relative;
    z-index: 2;
  }

  .location-fallback-kicker {
    font-family: 'Nunito', sans-serif;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.70);
    margin-bottom: 8px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.36);
  }

  .location-fallback-title {
    font-family: 'Nunito', sans-serif;
    font-size: clamp(28px, 8vw, 44px);
    font-weight: 900;
    line-height: 0.96;
    letter-spacing: -1px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.38);
  }

  .location-fallback-body {
    padding: 22px 24px 24px;
  }

  .location-fallback-copy {
    font-size: 17px;
    line-height: 1.55;
    color: var(--ink);
    margin-bottom: 18px;
  }

  .location-fallback-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .location-fallback-btn {
    border: none;
    border-radius: 16px;
    padding: 14px 16px;
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    transition: transform 0.14s ease, filter 0.14s ease;
  }

  .location-fallback-btn:active { transform: scale(0.97); }

  .location-fallback-btn.primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(37,99,235,0.28);
  }

  .location-fallback-btn.secondary {
    background: #f3f4f6;
    color: var(--ink);
    border: 1px solid var(--border);
  }

  @media (max-width: 420px) {
    .location-fallback-actions { grid-template-columns: 1fr; }
    .location-fallback-hero { min-height: 230px; }
  }



  @media (max-width: 480px) {
    .day-row { grid-template-columns: 1.2fr 0.6fr 1fr 0.8fr; padding: 12px 14px; }
    .day-rain .rain-label { display: none; }
  }

  /* ── Feel / native-app polish ───────────────────────── */
  .weather-hero {
    animation: heroFade 0.6s ease both;
    transition: filter 0.25s ease, transform 0.25s ease;
    overflow: hidden;
  }

  @keyframes heroFade {
    from {
      opacity: 0;
      transform: scale(1.018);
    }
    to {
      opacity: 1;
      transform: scale(1);
    }
  }

  .feature-card {
    transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
  }

  .feature-trigger-card:active,
  .feature-card:active {
    transform: scale(0.985);
    filter: brightness(0.98);
    box-shadow: 0 6px 18px rgba(0,0,0,0.13);
  }

  .detail-modal {
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .modal-backdrop {
    transition: opacity 0.22s ease;
  }

  .detail-intro {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }

  .hour-cell,
  .day-row,
  .modal-hour-row,
  .rain-chart-row,
  .pollen-culprit-row {
    transition: background 0.14s ease, transform 0.14s ease;
  }

  .hour-cell:active,
  .day-row:active,
  .modal-hour-row:active {
    transform: scale(0.992);
  }

  @media (prefers-reduced-motion: reduce) {
    .weather-hero,
    .feature-card,
    .feature-trigger-card,
    .detail-modal,
    .modal-backdrop,
    .hour-cell,
    .day-row,
    .modal-hour-row,
    .rain-chart-row,
    .pollen-culprit-row {
      animation: none !important;
      transition: none !important;
      transform: none !important;
    }
  }


  /* ── Hero image fix: keep compact static image background card ── */
  .hero-current-card {
    border-radius: 20px;
  }

  .weather-hero {
    min-height: 0 !important;
    height: clamp(300px, 76vw, 390px) !important;
    padding: 26px 28px 22px !important;
    justify-content: flex-start !important;
    gap: 8px !important;
    background: linear-gradient(135deg, #142746 0%, #5e77a2 100%);
  }

  .weather-bg-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center center !important;
    transform: scale(1.34);
    transform-origin: center center;
  }

  .weather-hero::before {
    background-image:
      linear-gradient(90deg, rgba(12, 24, 48, 0.78) 0%, rgba(18, 42, 87, 0.46) 48%, rgba(18, 42, 87, 0.14) 100%),
      linear-gradient(180deg, rgba(0,0,0,0.18) 0%, rgba(0,0,0,0.18) 45%, rgba(0,0,0,0.58) 100%) !important;
  }

  .hero-location-block {
    margin-bottom: 0 !important;
    max-width: 68%;
  }

  .hero-name {
    font-size: clamp(34px, 8vw, 54px) !important;
  }

  .hero-region {
    margin-top: 8px !important;
    font-size: 16px !important;
  }

  .hero-date {
    margin-top: 5px !important;
    font-size: 14px !important;
  }

  .hero-temp-block {
    margin-top: 10px !important;
  }

  .hero-temp {
    font-size: clamp(62px, 15vw, 92px) !important;
  }

  .hero-feels {
    margin-top: 8px !important;
    font-size: 15px !important;
  }

  .hero-condition-pill {
    margin-top: 8px !important;
    font-size: 15px !important;
    padding: 9px 16px !important;
  }

  .assessment-card {
    background: #ffffff !important;
    border-left: none !important;
    border-top: 1px solid var(--border) !important;
    border-bottom: 1px solid var(--border) !important;
    border-radius: 0 !important;
    padding: 18px 22px 20px !important;
  }

  @media (max-width: 480px) {
    .weather-hero {
      height: 295px !important;
      padding: 24px 24px 20px !important;
    }

    .weather-bg-image {
      transform: scale(1.42);
      object-position: center center !important;
    }

    .hero-location-block {
      max-width: 70%;
    }

    .hero-name {
      font-size: 38px !important;
    }

    .hero-temp {
      font-size: 68px !important;
    }
  }


  /* ── Final compact static hero overlay tweak ─────────────────────────── */
  .weather-hero {
    height: 315px !important;
    min-height: 315px !important;
    padding: 0 !important;
    display: block !important;
    position: relative !important;
  }

  .weather-bg-image {
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center center !important;
    transform: scale(1.10) !important;
    transform-origin: center center !important;
  }

  .weather-hero::before {
    background-image:
      linear-gradient(135deg, rgba(18, 42, 87, 0.58) 0%, rgba(37, 99, 235, 0.38) 56%, rgba(96, 165, 250, 0.24) 100%),
      linear-gradient(180deg, rgba(0,0,0,0.18), rgba(0,0,0,0.38)) !important;
  }

  .weather-hero::after {
    background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(0,0,0,0.18)) !important;
  }

  .hero-location-block,
  .hero-temp-block,
  .hero-condition-pill {
    position: absolute !important;
    left: 26px !important;
    z-index: 2 !important;
  }

  .hero-location-block {
    bottom: 154px !important;
    max-width: 72% !important;
    margin: 0 !important;
  }

  .hero-temp-block {
    bottom: 72px !important;
    margin: 0 !important;
  }

  .hero-condition-pill {
    bottom: 26px !important;
    margin: 0 !important;
  }

  .hero-name {
    font-size: clamp(38px, 8.2vw, 56px) !important;
    line-height: 0.88 !important;
    letter-spacing: -1.6px !important;
  }

  .hero-region {
    margin-top: 8px !important;
    font-size: 16px !important;
    line-height: 1.1 !important;
  }

  .hero-date {
    margin-top: 5px !important;
    font-size: 14px !important;
    line-height: 1.1 !important;
  }

  .hero-temp {
    font-size: clamp(58px, 14vw, 86px) !important;
    line-height: 0.82 !important;
    letter-spacing: -3px !important;
  }

  .hero-feels {
    margin-top: 6px !important;
    font-size: 14px !important;
    line-height: 1.1 !important;
  }

  .hero-condition-pill {
    font-size: 14px !important;
    padding: 8px 15px !important;
    background: rgba(16, 30, 58, 0.34) !important;
    border-color: rgba(255,255,255,0.28) !important;
  }

  @media (max-width: 480px) {
    .weather-hero {
      height: 305px !important;
      min-height: 305px !important;
    }

    .weather-bg-image {
      transform: scale(1.12) !important;
      object-position: center center !important;
    }

    .hero-location-block,
    .hero-temp-block,
    .hero-condition-pill {
      left: 22px !important;
    }

    .hero-location-block {
      bottom: 154px !important;
      max-width: 74% !important;
    }

    .hero-temp-block {
      bottom: 72px !important;
    }

    .hero-condition-pill {
      bottom: 24px !important;
    }

    .hero-name {
      font-size: 38px !important;
    }

    .hero-region {
      font-size: 15px !important;
    }

    .hero-date {
      font-size: 13px !important;
    }

    .hero-temp {
      font-size: 58px !important;
    }

    .hero-feels {
      font-size: 13px !important;
    }

    .hero-condition-pill {
      font-size: 13px !important;
      padding: 7px 14px !important;
    }
  }
