/* First Light — Styles v2.0 */
  :root {
    --forest: #1a2e1a;
    --bark: #3d2b1f;
    --moss: #4a5e3a;
    --fern: #6b7f56;
    --sage: #9aab85;
    --mist: #d4dcc8;
    --cream: #f5f0e8;
    --gold: #c9a84c;
    --amber: #d4824a;
    --dawn: #e8d5b0;
    --blood: #8b2020;
    --card-bg: #ffffff;
    --shadow: 0 6px 24px rgba(0,0,0,0.22), 0 2px 8px rgba(0,0,0,0.12);
  }


  * { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

  body {
    font-family: 'DM Sans', sans-serif;
    background: var(--forest);
    min-height: 100vh;
    overflow-x: hidden;
  }

  /* Background */
  .bg-layer {
    position: fixed; inset: 0; z-index: 0;
    background: 
      radial-gradient(ellipse at 20% 0%, rgba(60,84,40,0.65) 0%, transparent 60%),
      radial-gradient(ellipse at 80% 100%, rgba(50,34,22,0.85) 0%, transparent 60%),
      linear-gradient(160deg, #080f08 0%, #111f11 40%, #0d1a0d 100%);
  }
  .bg-texture { display: none; }

  /* Status bar simulation */

  /* Header */
  .app-header {
    position: relative; z-index: 10;
    padding: 8px 24px 20px;
  }
  .app-title {
    font-family: 'Playfair Display', serif;
    font-size: 32px; font-weight: 700;
    color: var(--cream);
    line-height: 1.1;
    display: flex; align-items: center;
  }
  .app-subtitle {
    font-size: 13px; color: var(--sage);
    margin-top: 4px; letter-spacing: 0.5px;
  }
  .header-status-row {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }
  .pwa-status-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(200, 168, 75, 0.25);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(0, 0, 0, 0.2);
  }
  #pwa-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    background: #7adf7a;
  }
  /* Field guide — scroll target for “Install” header control (pulse on #install-instructions) */
  .header-install-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px 4px 8px;
    border-radius: 20px;
    border: 1px solid rgba(200, 168, 75, 0.2);
    background: rgba(200, 168, 75, 0.1);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2px;
    color: #f0c870;
    cursor: pointer;
    font-family: inherit;
    line-height: 1.2;
  }
  .header-install-btn:focus-visible {
    outline: 2px solid rgba(200, 168, 75, 0.55);
    outline-offset: 2px;
  }
  /* Installed PWA / home-screen: hide “Install” (see standalone-boot.js for iOS WebKit) */
  @media (display-mode: standalone), (display-mode: fullscreen) {
    #install-btn { display: none !important; }
  }
  html.fl-standalone #install-btn { display: none !important; }
  @keyframes install-pulse-anim {
    0%   { box-shadow: 0 6px 24px rgba(0,0,0,0.25), 0 0 0 0 rgba(200,168,75,0.55); }
    40%  { box-shadow: 0 6px 24px rgba(0,0,0,0.25), 0 0 0 12px rgba(200,168,75,0); }
    100% { box-shadow: 0 6px 24px rgba(0,0,0,0.25), 0 0 0 0 rgba(200,168,75,0); }
  }
  .install-pulse {
    animation: install-pulse-anim 1.4s ease-out;
  }
  .deer-icon { font-size: 28px; margin-right: 8px; }

  /* ── Legal Hours Banner (glass / F1) ── */
  .legal-banner {
    position: relative; z-index: 10;
    margin: 0 14px 8px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 36px rgba(0,0,0,0.45);
    transition: background 0.35s ease, border-color 0.35s ease;
  }
  .legal-banner--glass {
    overflow: visible;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }
  .banner-glass-wrap {
    border-radius: 28px;
    padding: 2px;
    box-shadow: 0 16px 44px rgba(0,0,0,0.5);
    transition: background 0.35s ease;
  }
  .legal.legal-banner--glass .banner-glass-wrap {
    background: linear-gradient(135deg, rgba(180, 200, 255, 0.35), rgba(100, 200, 160, 0.2), rgba(200, 160, 255, 0.15));
  }
  .twilight.legal-banner--glass .banner-glass-wrap {
    background: linear-gradient(135deg, rgba(255, 210, 120, 0.42), rgba(240, 192, 64, 0.28), rgba(160, 100, 40, 0.22));
  }
  .illegal.legal-banner--glass .banner-glass-wrap {
    background: linear-gradient(135deg, rgba(255, 130, 110, 0.4), rgba(120, 40, 40, 0.32), rgba(60, 15, 15, 0.28));
  }
  .banner-glass-inner {
    position: relative;
    border-radius: 26px;
    padding: 10px 12px 8px;
    background: rgba(12, 22, 18, 0.58);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 20px 40px rgba(0, 0, 0, 0.42);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.35s ease, border-color 0.35s ease;
  }
  .legal.legal-banner--glass .banner-glass-inner {
    --banner-moon-mask: #0a1606;
  }
  .twilight.legal-banner--glass .banner-glass-inner {
    --banner-moon-mask: #140e04;
    background: rgba(22, 18, 10, 0.6);
    border-color: rgba(240, 192, 64, 0.12);
  }
  .illegal.legal-banner--glass .banner-glass-inner {
    --banner-moon-mask: #0e0808;
    background: rgba(18, 10, 10, 0.68);
    border-color: rgba(255, 100, 100, 0.12);
  }

  /* Status pill + countdown — centred as a block under the date row */
  .banner-hero-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-bottom: 8px;
  }
  .banner-hero-stack .banner-status-pill {
    margin-bottom: 6px;
  }
  .banner-hero-stack .banner-clock-stack {
    margin-bottom: 0;
  }

  .banner-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(120, 220, 160, 0.14);
    border: 1px solid rgba(120, 220, 160, 0.32);
    border-radius: 999px;
    padding: 6px 14px;
    margin-bottom: 12px;
  }
  .legal-banner--glass .banner-status-pill {
    padding: 4px 12px;
    margin-bottom: 6px;
  }
  .twilight .banner-status-pill {
    background: rgba(240, 192, 64, 0.12);
    border-color: rgba(240, 192, 64, 0.35);
  }
  .illegal .banner-status-pill {
    background: rgba(255, 100, 100, 0.1);
    border-color: rgba(255, 120, 120, 0.28);
  }
  .legal-banner--glass .banner-status-pill .status-label {
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-align: center;
    line-height: 1.2;
  }

  .legal-banner.legal:not(.legal-banner--glass) {
    --banner-moon-mask: #0a1606;
    background: linear-gradient(180deg, #0c1e08, #0a1606);
    border: 1px solid rgba(200, 168, 75, 0.1);
  }
  .legal-banner.twilight:not(.legal-banner--glass) {
    --banner-moon-mask: #140e04;
    background: linear-gradient(180deg, #1a1808, #140e04);
    border: 1px solid rgba(240, 192, 64, 0.12);
  }
  .legal-banner.illegal:not(.legal-banner--glass) {
    --banner-moon-mask: #0e0808;
    background: linear-gradient(180deg, #0e0808, #0a0606);
    border: 1px solid rgba(255, 80, 80, 0.08);
  }

  .banner-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 8px;
    margin-bottom: 14px;
  }
  .legal-banner--glass .banner-top-row {
    margin-bottom: 6px;
  }
  .banner-date-wrap {
    display: flex;
    align-items: baseline;
    gap: 4px;
    flex-wrap: nowrap;
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 10px;
    line-height: 1.3;
  }
  .banner-date-day { font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: rgba(255,255,255,0.35); }
  .banner-date-num { font-weight: 700; color: rgba(255,255,255,0.85); font-variant-numeric: tabular-nums; }
  .banner-date-month { font-weight: 600; color: rgba(255,255,255,0.45); }
  .banner-date-year { font-weight: 600; color: rgba(255,255,255,0.25); }

  .banner-top-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
  }
  /* Do not flex-grow: a wide strip left-aligns the pin/name beside the date. Keep the cluster tight on the right. */
  .banner-location--top {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    flex: 0 1 auto;
    font-size: 9px;
    color: rgba(255,255,255,0.35);
    cursor: pointer;
    border-radius: 8px;
    padding: 2px 4px 2px 2px;
    margin: -2px;
  }
  .banner-location--top:focus-visible {
    outline: 2px solid rgba(200, 168, 75, 0.65);
    outline-offset: 2px;
  }
  #banner-location-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    flex: 0 1 auto;
    max-width: min(46vw, 200px);
  }
  .banner-edit-loc {
    background: none; border: none; cursor: pointer; padding: 0 0 0 4px;
    opacity: 0.55; font-size: 13px; color: #fff; line-height: 1;
    flex-shrink: 0;
  }
  .banner-edit-loc:hover { opacity: 1; }
  .banner-info-btn {
    flex-shrink: 0;
    width: 22px; height: 22px; border-radius: 50%;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.22);
    display: flex; align-items: center; justify-content: center;
    padding: 0; cursor: pointer;
    transition: background 0.2s;
  }
  .banner-info-btn:hover { background: rgba(255,255,255,0.22); }
  .banner-info-btn:focus-visible {
    outline: 2px solid rgba(200, 168, 75, 0.65);
    outline-offset: 2px;
  }

  .banner-clock-stack {
    text-align: center; margin-bottom: 16px;
  }
  .banner-clock-stack--glass {
    text-align: center;
    width: 100%;
    margin-bottom: 8px;
  }
  .banner-hero-stack .banner-clock-stack--glass {
    margin-bottom: 0;
  }
  .banner-clock-stack--glass .banner-countdown-display {
    font-family: 'Outfit', 'DM Sans', system-ui, sans-serif;
    font-size: clamp(24px, 8vw, 34px);
    letter-spacing: 0.04em;
  }
  .banner-status-row {
    display: inline-flex; align-items: center; gap: 6px; margin-bottom: 6px;
  }
  .banner-status-dot {
    width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
  }
  .legal .banner-status-dot {
    background: #7adf7a;
    box-shadow: 0 0 8px rgba(122, 223, 122, 0.5);
  }
  /* Legal shooting window (including twilight): same green cue as full daylight legal */
  .twilight .banner-status-dot {
    background: #7adf7a;
    box-shadow: 0 0 8px rgba(122, 223, 122, 0.5);
  }
  .illegal .banner-status-dot {
    background: rgba(255, 80, 80, 0.4);
    box-shadow: none;
  }

  .status-label {
    font-family: 'Playfair Display', serif;
    font-size: 14px; font-weight: 700; letter-spacing: 0.02em;
    text-align: center; line-height: 1.2;
  }
  .legal .status-label { color: #7adf7a; }
  .illegal .status-label { color: rgba(255, 255, 255, 0.35); }
  .twilight .status-label { color: #f0c040; }

  .banner-countdown-display {
    font-family: 'DM Mono', ui-monospace, monospace;
    font-size: clamp(28px, 9vw, 36px);
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
  }
  .banner-countdown-hint {
    font-size: 10px;
    font-weight: 600;
    font-family: 'DM Mono', ui-monospace, monospace;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 8px;
    line-height: 1.3;
  }
  .legal-banner--glass .banner-countdown-hint {
    margin-top: 3px;
  }
  .legal .banner-countdown-hint { color: rgba(122, 223, 122, 0.72); }
  .twilight .banner-countdown-hint { color: rgba(240, 192, 64, 0.65); }
  .illegal .banner-countdown-hint { color: rgba(255, 255, 255, 0.38); }

  .countdown-green { color: #7adf7a; }
  .countdown-amber { color: #f0c040; }
  .countdown-red   { color: #ff6060; }
  .countdown-dim   { color: rgba(255, 255, 255, 0.18); }

  .banner-timeline {
    display: flex; align-items: flex-end; gap: 0; margin-bottom: 2px;
  }
  .banner-timeline--glass {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-bottom: 0;
  }
  .banner-glass-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
    margin-top: 8px;
    /* Row 1: legal window; row 2: sun — each cell centred in its half so the mid-card gap isn’t empty */
  }
  .banner-glass-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 0;
  }
  .banner-glass-cell .banner-tl-kicker {
    display: block;
    margin-bottom: 2px;
  }
  .banner-glass-cell .banner-tl-time {
    margin-top: 0;
    font-size: 14px;
    line-height: 1.15;
  }
  .twilight .banner-glass-cell--start .banner-tl-time {
    color: rgba(122, 223, 122, 0.35);
  }
  .twilight .banner-glass-cell--end .banner-tl-kicker {
    color: rgba(240, 192, 64, 0.6);
  }
  .twilight .banner-glass-cell--end .banner-tl-time {
    color: rgba(240, 192, 64, 0.85);
  }
  .legal-banner--no-solar .banner-timeline { opacity: 0.35; pointer-events: none; }

  .banner-tl-col {
    width: 60px; flex-shrink: 0; text-align: center;
  }
  .banner-tl-kicker {
    font-size: 7px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.5px; font-family: 'DM Mono', ui-monospace, monospace;
  }
  .banner-tl-time {
    display: block; font-size: 18px; font-weight: 700; line-height: 1.1;
    margin-top: 2px; font-variant-numeric: tabular-nums;
  }
  .banner-tl-hint {
    display: block; font-size: 8px; margin-top: 3px; line-height: 1.2;
  }

  .legal .banner-tl-kicker { color: rgba(122, 223, 122, 0.45); }
  .legal .banner-tl-time { color: rgba(122, 223, 122, 0.7); }
  .legal .banner-tl-hint { color: rgba(232, 160, 32, 0.4); }
  /* In legal daytime, keep legal window times green; sunrise/sunset use solar amber/orange. */
  .legal .banner-glass-cell--legal .banner-tl-kicker { color: rgba(122, 223, 122, 0.45); }
  .legal .banner-glass-cell--legal .banner-tl-time { color: rgba(122, 223, 122, 0.7); }
  .legal .banner-glass-cell--sun .banner-tl-kicker { color: rgba(240, 192, 64, 0.62); }
  .legal .banner-glass-cell--sun .banner-tl-time { color: rgba(240, 192, 64, 0.86); }
  .legal #sunrise-time { color: rgba(232, 160, 32, 0.9); }
  .legal #sunset-time { color: rgba(232, 120, 32, 0.9); }

  .twilight .banner-tl-kicker { color: rgba(122, 223, 122, 0.3); }
  .twilight .banner-tl-col--left .banner-tl-time { color: rgba(122, 223, 122, 0.35); }
  .twilight .banner-tl-col--right .banner-tl-kicker { color: rgba(240, 192, 64, 0.6); }
  .twilight .banner-tl-col--right .banner-tl-time { color: rgba(240, 192, 64, 0.85); }
  .twilight .banner-tl-hint { color: rgba(232, 120, 32, 0.5); }

  .illegal .banner-tl-kicker,
  .illegal .banner-tl-time { color: rgba(122, 223, 122, 0.15); }
  .illegal .banner-tl-hint { color: rgba(232, 160, 32, 0.12); }

  .banner-tl-track-outer {
    flex: 1; min-width: 0; position: relative; height: 32px; margin: 0 4px;
  }
  .banner-timeline--glass .banner-tl-track-outer {
    flex: none;
    width: 100%;
    margin: 0;
    height: 26px;
  }
  .banner-tl-track {
    position: absolute; left: 0; right: 0; top: 12px; height: 8px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
    overflow: visible;
  }
  .legal-banner--glass .banner-tl-track {
    top: 50%;
    transform: translateY(-50%);
    height: 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.28);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.35);
  }
  .legal-banner--glass .banner-tl-zones {
    border-radius: 999px;
  }
  .legal-banner.legal.legal-banner--glass .banner-tl-elapsed {
    border-radius: 999px 0 0 999px;
  }
  .legal-banner.twilight.legal-banner--glass .banner-tl-elapsed {
    border-radius: 999px 0 0 999px;
  }
  .legal-banner.illegal.legal-banner--glass .banner-tl-elapsed {
    border-radius: 999px;
  }
  .legal-banner--glass .banner-tl-tick {
    top: 50%;
    transform: translate(-50%, -50%);
    height: 12px;
  }
  .legal-banner--glass .banner-tl-marker--sun {
    width: 18px;
    height: 18px;
  }
  .legal-banner--glass .banner-tl-marker--sun::after {
    width: 8px;
    height: 8px;
    margin: -4px 0 0 -4px;
  }
  .illegal .banner-tl-track {
    background: rgba(255, 60, 60, 0.1);
  }

  .banner-tl-zones {
    position: absolute; inset: 0;
    display: flex;
    width: 100%;
    border-radius: 4px;
    overflow: hidden;
    pointer-events: none;
  }
  /* Widths set in JS from actual legal window vs sunrise/sunset (fixed % was misleading) */
  .banner-tl-zone--dawn,
  .banner-tl-zone--core,
  .banner-tl-zone--dusk {
    flex-shrink: 0;
    min-width: 0;
    box-sizing: border-box;
  }

  .legal .banner-tl-zone--dawn { background: rgba(240, 192, 64, 0.2); }
  .legal .banner-tl-zone--core { background: rgba(122, 223, 122, 0.25); }
  .legal .banner-tl-zone--dusk { background: rgba(240, 192, 64, 0.2); }

  .twilight .banner-tl-zone--dawn { background: rgba(240, 192, 64, 0.12); }
  .twilight .banner-tl-zone--core { background: rgba(122, 223, 122, 0.15); }
  .twilight .banner-tl-zone--dusk { background: rgba(240, 192, 64, 0.35); }

  .illegal .banner-tl-zone--dawn,
  .illegal .banner-tl-zone--core,
  .illegal .banner-tl-zone--dusk {
    background: transparent;
  }

  .banner-tl-elapsed {
    position: absolute; top: 0; left: 0; height: 100%; border-radius: 4px 0 0 4px;
    pointer-events: none;
  }
  .legal .banner-tl-elapsed { background: rgba(122, 223, 122, 0.08); }
  .twilight .banner-tl-elapsed { background: rgba(240, 192, 64, 0.05); }
  .illegal .banner-tl-elapsed { background: linear-gradient(90deg, rgba(255, 60, 60, 0.12), rgba(255, 60, 60, 0.06)); width: 100% !important; border-radius: 4px; }

  .banner-tl-tick {
    position: absolute; top: -4px; width: 2px; height: 16px; border-radius: 1px;
    transform: translateX(-50%); pointer-events: none;
  }
  .banner-tl-tick--edge { z-index: 1; }
  .legal .banner-tl-tick--edge { background: rgba(122, 223, 122, 0.35); }
  .twilight .banner-tl-tick--edge { background: rgba(240, 192, 64, 0.5); }
  .illegal .banner-tl-tick--edge { background: rgba(255, 60, 60, 0.15); }
  .banner-tl-tick--sr { background: rgba(232, 160, 32, 0.85); z-index: 2; }
  .banner-tl-tick--ss { background: rgba(232, 120, 32, 0.75); z-index: 2; }

  /* Center on 8px track: left % + translate(-50%,-50%) so disc matches tick/elapsed position */
  .banner-tl-marker {
    position: absolute; top: 50%; transform: translate(-50%, -50%);
    z-index: 3; pointer-events: none;
  }
  .banner-tl-marker--sun {
    width: 22px; height: 22px;
  }
  .banner-tl-marker--sun::before {
    content: ''; position: absolute; inset: 0; border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 200, 66, 0.95) 30%, rgba(245, 200, 66, 0) 70%);
  }
  .banner-tl-marker--sun::after {
    content: ''; position: absolute; top: 50%; left: 50%;
    width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%;
    background: #f5c842;
    box-shadow: 0 0 10px rgba(245, 200, 66, 0.6);
  }
  /* Twilight: sun marker stays amber/orange (time-of-day); green cue is only the status pill dot */
  .twilight .banner-tl-marker--sun::before {
    background: radial-gradient(circle, rgba(232, 120, 32, 0.95) 30%, rgba(232, 120, 32, 0) 70%);
  }
  .twilight .banner-tl-marker--sun::after {
    background: #e87820;
    box-shadow: 0 0 8px rgba(232, 120, 32, 0.6);
  }

  .banner-tl-marker--moon {
    width: 18px; height: 18px;
  }
  .banner-tl-marker--moon::before {
    content: ''; position: absolute; inset: 0; border-radius: 50%;
    background: rgba(180, 200, 220, 0.15);
  }
  .banner-tl-marker--moon::after {
    content: ''; position: absolute; top: 0; left: 5px;
    width: 15px; height: 18px; border-radius: 50%;
    background: var(--banner-moon-mask);
  }

  .banner-moon-row {
    margin-top: 12px;
    padding: 12px 0 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    border-radius: 0 0 8px 8px;
  }
  .legal-banner--glass .banner-moon-row {
    margin-top: 6px;
    padding: 8px 0 10px;
  }
  .banner-moon-row:focus-visible {
    outline: 2px solid rgba(200, 168, 75, 0.5);
    outline-offset: 2px;
  }
  .banner-moon-row-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
  /* Keep phase name + illumination beside the moon */
  .banner-moon-phase {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1 1 auto;
  }
  .banner-moon-text {
    line-height: 1.25;
    text-align: left;
  }
  /* Badge + forecast link share one right column (aligned to each other, centred vs moon block) */
  .banner-moon-row-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 6px;
    flex-shrink: 0;
  }
  .banner-moon-text #moon-phase-name {
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 10px;
    font-weight: 600;
    color: rgba(255, 255, 220, 0.78);
    white-space: nowrap;
  }
  .banner-moon-text #moon-illumination {
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 9px;
    color: rgba(255, 255, 255, 0.5);
  }
  .banner-activity-badge {
    background: rgba(90, 220, 90, 0.12);
    border: 1px solid rgba(90, 220, 90, 0.25);
    border-radius: 8px; padding: 3px 8px;
    font-size: 11px; font-weight: 700; color: #7adf7a;
    white-space: nowrap; flex-shrink: 0; display: none;
  }
  .twilight .banner-activity-badge {
    background: rgba(240, 192, 64, 0.1);
    border-color: rgba(240, 192, 64, 0.2);
    color: #f0c040;
  }
  .illegal .banner-activity-badge {
    background: rgba(90, 220, 90, 0.04);
    border-color: rgba(90, 220, 90, 0.08);
    color: rgba(122, 223, 122, 0.2);
  }
  /* Score colour is shown on the badge; hide extra pip to avoid a third green dot */
  .banner-moon-row .banner-activity-pip {
    display: none !important;
  }
  .banner-forecast-link {
    text-align: right;
    margin-top: 0;
    padding-bottom: 2px;
    font-size: 10px;
    font-weight: 600;
    color: rgba(200, 168, 75, 0.62);
    letter-spacing: 0.02em;
    line-height: 1.3;
  }
  .illegal .banner-forecast-link { color: rgba(200, 168, 75, 0.25); }
  .twilight .banner-moon-row { border-top-color: rgba(240, 192, 64, 0.08); }
  .illegal .banner-moon-row { border-top-color: rgba(255, 255, 255, 0.03); }

  .banner-location {
    font-size: 10px; color: rgba(255,255,255,0.35);
    display: flex; align-items: center; justify-content: flex-start; gap: 4px;
    min-width: 0;
  }

  /* Location “live” dot — quieter than the legal status dot (avoids three competing greens) */
  .live-dot {
    width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0;
    display: inline-block;
  }
  .legal .live-dot { background: #5adf5a; box-shadow: 0 0 4px #5adf5a; animation: pulse 1.8s infinite; }
  .illegal .live-dot { background: #df5a5a; box-shadow: 0 0 4px #df5a5a; animation: pulse 1.8s infinite; }
  .twilight .live-dot { background: #f0c040; box-shadow: 0 0 4px rgba(240, 192, 64, 0.4); animation: pulse 1.8s infinite; }
  .legal .banner-location--top .live-dot,
  .illegal .banner-location--top .live-dot,
  .twilight .banner-location--top .live-dot {
    width: 4px;
    height: 4px;
    animation: none;
    opacity: 0.9;
  }
  .legal .banner-location--top .live-dot { box-shadow: 0 0 3px rgba(90, 223, 90, 0.45); }
  .twilight .banner-location--top .live-dot { box-shadow: 0 0 3px rgba(240, 192, 64, 0.35); }
  .illegal .banner-location--top .live-dot { box-shadow: 0 0 3px rgba(223, 90, 90, 0.4); }


  /* Navigation tabs */
  .nav-tabs {
    position: relative; z-index: 10;
    display: flex; gap: 8px;
    padding: 0 16px 16px;
    overflow-x: auto; scrollbar-width: none;
  }
  .nav-tabs::-webkit-scrollbar { display: none; }
  .nav-tab {
    flex-shrink: 0;
    padding: 8px 18px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.08);
    color: var(--mist);
    font-size: 13px; font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
  }
  .nav-tab.active {
    background: linear-gradient(135deg, #c9a84c, #d4b45a);
    border-color: transparent;
    color: var(--forest);
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(201, 168, 76, 0.22);
  }

  /* Main scroll area */
  .scroll-area {
    position: relative; z-index: 10;
    padding: 0 16px 100px;
    overflow-y: auto;
  }

  /* Section header */
  .section-header {
    display: flex; align-items: center; gap: 10px;
    margin: 8px 0 12px;
  }
  .section-title {
    font-family: 'Playfair Display', serif;
    font-size: 18px; color: var(--dawn);
    font-weight: 600;
  }
  .section-line { flex: 1; height: 1px; background: linear-gradient(90deg, rgba(201,168,76,0.25), transparent); }

  /* Species tab — Cull Diary card (same horizontal grid as .section-header / .deer-card) */
  .species-diary-card-link {
    display: block;
    text-decoration: none;
    margin: 8px 0 8px;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
  }
  .species-diary-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(140deg, rgba(26,60,14,0.97), #0e2a08);
    border-radius: 22px;
    padding: 14px 16px 14px;
    border: 1px solid rgba(200,168,75,0.18);
    box-shadow: 0 8px 30px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.06);
  }
  .species-diary-card::before {
    content: '';
    position: absolute;
    right: -16px; top: -16px;
    width: 90px; height: 90px;
    border-radius: 50%;
    background: rgba(200,168,75,0.05);
    pointer-events: none;
  }
  .species-diary-card::after {
    content: '';
    position: absolute;
    right: 20px; bottom: -24px;
    width: 60px; height: 60px;
    border-radius: 50%;
    background: rgba(200,168,75,0.04);
    pointer-events: none;
  }
  .species-diary-card-top {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
  }
  .species-diary-card-lead {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
    min-height: 38px;
  }
  .species-diary-card-title {
    flex: 1;
    min-width: 0;
    min-height: 38px; /* match .species-diary-card-icon */
    display: flex;
    align-items: center;
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    line-height: 1.2;
  }
  .species-diary-card-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(200,168,75,0.12);
    border: 1px solid rgba(200,168,75,0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  .species-diary-card-icon svg {
    display: block;
  }
  .species-diary-card-cta {
    flex-shrink: 0;
    align-self: center;
    background: rgba(200,168,75,0.12);
    border: 1px solid rgba(200,168,75,0.2);
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 700;
    color: #f0c870;
  }
  .species-diary-card-sub {
    position: relative;
    z-index: 1;
    font-size: 9px;
    color: rgba(200,168,75,0.6);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
    margin-bottom: 10px;
    padding-left: 50px; /* 38px icon + 12px gap — lines up with title text */
  }
  .species-diary-stats {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1px;
    background: rgba(255,255,255,0.06);
    border-radius: 10px;
    overflow: hidden;
  }
  .species-diary-stat {
    background: rgba(0,0,0,0.15);
    padding: 9px;
    text-align: center;
  }
  .species-diary-stat + .species-diary-stat { border-left: 1px solid rgba(255,255,255,0.06); }
  .species-diary-stat-val {
    font-size: 18px;
    font-weight: 700;
    color: #f0c870;
    line-height: 1;
    font-variant-numeric: tabular-nums;
  }
  .species-diary-stat-lbl {
    font-size: 7px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.3);
    margin-top: 3px;
    font-weight: 700;
  }

  /* Deer cards */
  .deer-card {
    background: var(--card-bg);
    border-radius: 22px;
    margin-bottom: 12px;
    overflow: hidden;
    box-shadow: 0 5px 22px rgba(0,0,0,0.25), 0 1px 0 rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.08);
    transition: transform 0.2s ease;
  }
  @keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  .card-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 18px 12px;
    cursor: pointer;
  }
  .card-left { display: flex; align-items: center; gap: 12px; }
  .species-emoji { font-size: 30px; }
  .species-photo {
    width: 58px; height: 58px;
    border-radius: 14px;
    object-fit: cover;
    object-position: center top;
    flex-shrink: 0;
    background: #e8e0d0;
    display: block;
  }
  .species-photo-wrap {
    width: 62px; height: 62px;
    border-radius: 16px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
  }
  .species-photo-wrap img {
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center 15%;
    display: block;
    transition: transform 0.3s ease;
  }
  .species-photo-wrap::after {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at 50% 35%, transparent 40%, rgba(0,0,0,0.18) 100%);
    pointer-events: none;
    border-radius: 14px;
  }
  .deer-card:hover .species-photo-wrap img {
    transform: scale(1.07);
  }
  .species-name {
    font-family: 'Playfair Display', serif;
    font-size: 17px; font-weight: 600;
    color: var(--bark);
  }
  .species-latin { font-size: 11px; color: #888; font-style: italic; margin-top: 1px; }

  .season-badge {
    padding: 5px 12px;
    border-radius: 12px;
    font-size: 11px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.5px;
  }
  .badge-open { background: linear-gradient(135deg,#e8f5e0,#f0fae8); color: #2d7a1a; border: 1px solid rgba(45,122,26,0.15); }
  .badge-closed { background: #fde8e8; color: #8b2020; }
  .badge-partial { background: #fff3e0; color: #b35c00; border: 1px solid rgba(179,92,0,0.2); }

  .card-body { padding: 0 18px 16px; display: none; }
  .card-body.expanded { display: block; }
  .gallery-cell { display:flex; flex-direction:column; gap:6px; flex-shrink:0; width:110px; align-items:stretch; }
  .gallery-thumb { width:110px; height:0; min-height:0; border-radius:14px; overflow:hidden; flex-shrink:0; cursor:pointer; position:relative; box-shadow:0 2px 10px rgba(0,0,0,0.14); transition:height 0.1s; }
  .card-body.expanded .gallery-thumb { height:78px; }
  .gallery-thumb img { width:100%; height:100%; object-fit:cover; display:block; }

  /* Field Guide — shot angle plates (tap to open species lightbox) */
  .fg-shot-lb {
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    line-height: 0;
    display: block;
    margin: 0 0 10px;
  }
  .fg-shot-lb img {
    width: 100%;
    height: auto;
    display: block;
    background: #faf8f5;
    border-radius: 8px;
  }
  .fg-shot-lb:focus-visible {
    outline: 2px solid rgba(42, 90, 16, 0.45);
    outline-offset: 2px;
  }
  .gallery-caption { font-size:9px; line-height:1.4; color:#555; }
  .gallery-caption-title { display:block; font-weight:700; color:#5a2e08; font-size:9px; text-transform:uppercase; letter-spacing:0.35px; margin-bottom:3px; }

  .divider { height: 1px; background: #eee; margin-bottom: 14px; }

  /* Season rows */
  .season-row {
    display: flex; align-items: center;
    padding: 9px 0;
    border-bottom: 1px solid #f0f0f0;
  }
  .season-row:last-child { border-bottom: none; }
  .gender-label {
    display: flex; align-items: center; gap: 6px;
    width: 90px; flex-shrink: 0;
  }
  .gender-icon { font-size: 14px; }
  .gender-text { font-size: 13px; font-weight: 600; color: var(--bark); }
  .season-dates { flex: 1; font-size: 13px; color: #444; }
  .season-status {
    width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 700; line-height: 1;
  }
  .status-open  { background: #4caf50; color: white; }
  .status-open::after  { content: '✓'; }
  .status-closed { background: #f44336; color: white; }
  .status-closed::after { content: '✕'; }

  /* Legal times section */
  .legal-times-section {
    background: linear-gradient(135deg, #f9f6f0, #f2ede3);
    border-radius: 14px;
    padding: 14px;
    margin-top: 10px;
  }
  .legal-times-title {
    font-size: 12px; font-weight: 700;
    color: var(--bark); text-transform: uppercase;
    letter-spacing: 0.8px; margin-bottom: 10px;
    display: flex; align-items: center; gap: 6px;
  }
  .time-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .time-item {
    background: white;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
  }
  .time-label { font-size: 10px; color: #888; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 3px; }
  .time-value { font-size: 14px; font-weight: 700; color: var(--bark); }
  .time-rule { font-size: 10px; color: #666; margin-top: 2px; }

  /* Notes */
  .card-note {
    background: #fff8e8;
    border-left: 3px solid var(--gold);
    border-radius: 0 8px 8px 0;
    padding: 10px 12px;
    margin-top: 10px;
    font-size: 12px; color: #555; line-height: 1.5;
  }

  /* Legend page */
  .info-section { display: none; }
  .info-section.active { display: block; }
  .species-section { display: none; }
  .species-section.active { display: block; }

  .info-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
  }
  .info-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 16px; color: var(--bark);
    margin-bottom: 12px;
    display: flex; align-items: center; gap: 8px;
  }
  .info-card p, .info-card li {
    font-size: 13px; color: #444; line-height: 1.6;
  }
  .info-card ul { padding-left: 16px; }
  .info-card li { margin-bottom: 6px; }

  /* Legal Times tab — future date picker (matches forecast hero / app gold–forest) */
  .legal-picker-card {
    border-radius: 22px;
    overflow: visible;
    margin-bottom: 16px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.28), 0 2px 10px rgba(0,0,0,0.12);
    border: 1px solid rgba(200, 168, 75, 0.2);
    background: var(--card-bg);
  }
  .legal-picker-head {
    position: relative;
    padding: 20px 20px 22px;
    border-radius: 22px 22px 0 0;
    background: linear-gradient(150deg, #1a3a0e 0%, #0e2a08 45%, #122a12 100%);
  }
  .legal-picker-head::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(90, 140, 60, 0.4), rgba(201, 168, 76, 0.65), rgba(90, 140, 60, 0.4), transparent);
    opacity: 0.9;
  }
  .legal-picker-head::after {
    content: '';
    position: absolute;
    bottom: 0; left: 16px; right: 16px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(201, 168, 76, 0.35), transparent);
  }
  .legal-picker-kicker {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(240, 208, 120, 0.8);
    margin-bottom: 8px;
    font-family: 'DM Sans', sans-serif;
  }
  .legal-picker-title {
    font-family: 'Playfair Display', serif;
    font-size: 21px;
    font-weight: 700;
    color: #faf8f4;
    line-height: 1.2;
    margin: 0 0 12px;
    letter-spacing: 0.02em;
  }
  .legal-picker-lede {
    font-size: 12px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.74);
    margin: 0;
  }
  .legal-picker-lede strong {
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
  }
  .legal-picker-body {
    padding: 20px 20px 22px;
    border-radius: 0 0 22px 22px;
    background: linear-gradient(180deg, #f7f5f0 0%, #ffffff 35%, #ffffff 100%);
  }
  .legal-picker-field {
    margin-bottom: 4px;
  }
  .legal-picker-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--moss);
    margin-bottom: 8px;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
  }
  .legal-picker-input-row {
    display: flex;
    align-items: stretch;
    gap: 12px;
    width: 100%;
    max-width: 100%;
    padding: 4px 4px 4px 14px;
    background: #fff;
    border-radius: 14px;
    border: 1px solid rgba(90, 122, 48, 0.14);
    box-shadow: 0 2px 12px rgba(14, 42, 8, 0.06);
    transition: border-color 0.2s, box-shadow 0.2s;
  }
  .legal-picker-input-row:focus-within {
    border-color: rgba(201, 168, 76, 0.55);
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.15), 0 4px 16px rgba(14, 42, 8, 0.08);
  }
  .legal-picker-open-cal {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
    padding: 0 10px 0 6px;
    margin: 4px 0;
    border: none;
    background: transparent;
    color: var(--gold);
    cursor: pointer;
    border-radius: 10px;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s, color 0.15s;
  }
  .legal-picker-open-cal:hover {
    background: rgba(201, 168, 76, 0.12);
    color: #a08030;
  }
  .legal-picker-open-cal:focus {
    outline: none;
  }
  .legal-picker-open-cal:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
  }
  .legal-picker-input {
    flex: 1 1 auto;
    min-width: 10.5rem;
    width: 100%;
    max-width: 100%;
    font-size: 16px;
    line-height: 1.25;
    padding: 12px 14px 12px 0;
    margin: 0;
    border: none;
    border-radius: 0;
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    color: var(--bark);
    background: transparent;
    font-variant-numeric: tabular-nums;
    position: relative;
    z-index: 2;
    box-sizing: border-box;
  }
  .legal-picker-input:focus {
    outline: none;
  }
  .legal-picker-hint {
    font-size: 11px;
    color: #8a8478;
    margin: 10px 0 0;
    line-height: 1.45;
  }
  .legal-picker-msg {
    font-size: 13px;
    line-height: 1.5;
    padding: 12px 14px;
    border-radius: 12px;
    margin-top: 14px;
  }
  .legal-picker-msg-warn {
    color: #6b3224;
    background: linear-gradient(135deg, #fff8f5, #ffefe8);
    border: 1px solid rgba(200, 100, 70, 0.22);
    box-shadow: 0 2px 8px rgba(139, 32, 32, 0.06);
  }
  .legal-picker-results {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid rgba(90, 122, 48, 0.1);
  }
  .legal-picker-results-label {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #7a8a68;
    margin-bottom: 12px;
    font-family: 'DM Sans', sans-serif;
  }
  .legal-picker-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .legal-picker-cell {
    position: relative;
    text-align: center;
    padding: 14px 10px 16px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid rgba(90, 122, 48, 0.1);
    box-shadow: 0 2px 14px rgba(14, 42, 8, 0.05);
    overflow: hidden;
  }
  .legal-picker-cell::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    border-radius: 16px 16px 0 0;
  }
  .legal-picker-cell--sunrise::before {
    background: linear-gradient(90deg, #e8a838, #f5c842);
  }
  .legal-picker-cell--sunset::before {
    background: linear-gradient(90deg, #d07030, #e89850);
  }
  .legal-picker-cell--legal-start::before {
    background: linear-gradient(90deg, #9a8a30, #c9a84c);
  }
  .legal-picker-cell--legal-end::before {
    background: linear-gradient(90deg, #b86828, #d4824a);
  }
  .legal-picker-cell-icon {
    display: block;
    font-size: 22px;
    line-height: 1;
    margin-bottom: 6px;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.08));
  }
  .legal-picker-cell-icon--svg {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    filter: none;
    font-size: 0;
    line-height: 0;
  }
  .legal-picker-cell-icon--svg svg {
    display: block;
  }
  .legal-picker-cell-lbl {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #7a756c;
    margin-bottom: 8px;
    font-family: 'DM Sans', sans-serif;
  }
  .legal-picker-cell-val {
    font-size: 24px;
    font-weight: 700;
    color: var(--bark);
    font-variant-numeric: tabular-nums;
    line-height: 1;
    font-family: 'DM Sans', sans-serif;
    letter-spacing: -0.02em;
  }
  .legal-picker-cell-val-legal { color: #9a7a18; }
  .legal-picker-cell-val-legal-end { color: #b55a20; }
  .legal-picker-cell-val-dusk { color: #a85a20; }
  .legal-picker-window-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(90, 122, 48, 0.1), rgba(201, 168, 76, 0.12));
    border: 1px solid rgba(90, 122, 48, 0.18);
    border-radius: 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--bark);
    text-align: center;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
  }
  .legal-picker-window-icon {
    font-size: 18px;
    line-height: 1;
    opacity: 0.85;
  }
  .legal-picker-window-sep {
    color: #a09888;
    font-weight: 500;
    margin: 0 2px;
  }
  .legal-picker-window-bar strong {
    font-weight: 700;
    color: #2d4a1a;
    font-variant-numeric: tabular-nums;
  }

  .law-badge {
    display: inline-block;
    background: var(--forest);
    color: var(--sage);
    font-size: 10px; font-weight: 600;
    padding: 3px 8px; border-radius: 6px;
    margin-bottom: 8px;
  }

  .month-grid {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 4px; margin-top: 10px;
  }
  .month-cell {
    border-radius: 6px; padding: 6px 4px;
    text-align: center; font-size: 10px; font-weight: 600;
  }
  .month-open   { background: #e8f5e0; color: #2d7a1a; }
  .month-closed { background: #f5f5f5; color: #aaa; }
  .month-today  { outline: 2px solid #c8a84b; outline-offset: -2px; }
  .month-today.month-open   { background: #d4edbe; }
  .month-today.month-closed { background: #f0ead8; color: #9a7830; }

  /* Chevron */
  .chevron {
    color: #aaa; font-size: 12px;
    transition: transform 0.25s ease;
  }
  .chevron.rotated { transform: rotate(90deg); }

  /* Bottom tab bar */
  .tab-bar {
    position: fixed; bottom: 0; left: 0; right: 0;
    z-index: 100;
    background: rgba(5, 10, 5, 0.97);
    backdrop-filter: blur(24px);
    border-top: 1px solid rgba(255,255,255,0.07);
    display: flex;
    padding: 10px 0 20px;
  }
  .tab-item {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; gap: 4px;
    cursor: pointer; padding: 6px 0;
    transition: opacity 0.2s;
  }
  .tab-icon { font-size: 22px; display:flex; align-items:center; justify-content:center; color:rgba(255,255,255,0.28); }
  .tab-label { font-size: 10px; font-weight: 600; color: rgba(255,255,255,0.28); }
  .tab-item.active .tab-label { color: var(--gold); }
  .tab-item.active .tab-icon { color: var(--gold); }
  .tab-item { position: relative; }
  .tab-item.active::after {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 28px; height: 2px;
    border-radius: 0 0 2px 2px;
    background: var(--gold);
    box-shadow: 0 0 6px rgba(201,168,76,0.6);
  }

  /* Regions indicator */
  .region-chips {
    display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px;
  }
  .region-chip {
    font-size: 10px; padding: 3px 8px;
    border-radius: 8px; font-weight: 500;
  }
  .chip-england { background: #f0ece6; color: #5a4a3a; }
  .chip-scotland { background: #f0ece6; color: #5a4a3a; }
  .chip-wales { background: #f0ece6; color: #5a4a3a; }
  .chip-ni { background: #fff3e0; color: #e65100; }

  /* Current season indicator bar */
  .season-bar-wrap { margin: 10px 0; }
  .season-bar-label { font-size: 11px; color: #888; margin-bottom: 4px; font-weight: 500; }
  .season-bar {
    height: 6px; border-radius: 3px;
    background: #eee;
    position: relative; overflow: hidden;
  }
  .season-fill {
    position: absolute; top: 0; height: 100%;
    border-radius: 3px;
  }
  .fill-open { background: linear-gradient(90deg, #4caf50, #81c784); }
  .fill-closed { background: #e0e0e0; }
  .fill-partial { background: linear-gradient(90deg, #ff9800, #ffb74d); }

  .expand-chevron { transition: transform 0.25s; color: #999; font-size: 13px; }

  /* Shot placement diagram containers */
  .shot-diag { width:100%; border-radius:12px; overflow:hidden; margin-bottom:2px; }
  /* Old API-based container - keep for compatibility */
  .shot-diag-wrap {
    width: 100%;
    border-radius: 14px;
    overflow: hidden;
    background: #f5f0e8;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
  }
  .shot-diag-wrap svg {
    width: 100%;
    height: auto;
    display: block;
  }
  .diag-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #888;
    font-size: 13px;
    font-family: 'DM Sans', sans-serif;
  }
  .diag-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid #e0d8c8;
    border-top-color: #9e6018;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
  }
  @keyframes spin { to { transform: rotate(360deg); } }

  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
    }
    .deer-card, .info-card {
      opacity: 1 !important;
      transform: none !important;
    }
  }

  @media (prefers-contrast: high) {
    .info-card p, .info-card li { color: #222 !important; }
    .species-latin { color: #555 !important; }
    .fg-cat-subtitle { color: #555 !important; }
    .card-note { border-left-width: 4px !important; color: #333 !important; }
    .season-dates { color: #222 !important; }
    .time-rule { color: #444 !important; }
    .time-label { color: #555 !important; }
    .sun-time-legal { color: #ffffff !important; }
    .sun-time-label { color: rgba(255,255,255,0.65) !important; }
    .banner-tl-time { color: #ffffff !important; }
    .banner-tl-kicker { color: rgba(255,255,255,0.75) !important; }
    .region-chip { color: #3a2a1a !important; border: 1px solid #999 !important; }
    .nav-tab { border-color: rgba(255,255,255,0.3) !important; }
    .season-status { width: 22px !important; height: 22px !important; font-size: 12px !important; }
    .status-sublabel { color: rgba(255,255,255,0.75) !important; }
    .banner-location { color: rgba(255,255,255,0.55) !important; }
  }

  .expanded-card .expand-chevron { transform: rotate(180deg); }

  /* Field guide collapsible categories */
  .fg-category {
    background: var(--card-bg);
    border-radius: 20px;
    margin-bottom: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease;
  }
  .fg-cat-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 18px 12px;
    cursor: pointer;
    user-select: none;
  }
  .fg-cat-header:active { opacity: 0.8; }
  .fg-cat-left { display: flex; align-items: center; gap: 12px; }
  .fg-cat-icon-wrap {
    width: 80px; height: 80px;
    border-radius: 16px;
    overflow: hidden;
    flex-shrink: 0;
    background: none;
  }
  .fg-cat-icon-wrap svg { width: 100%; height: 100%; display: block; }
  .fg-cat-title {
    font-family: 'Playfair Display', serif;
    font-size: 17px; font-weight: 600;
    color: var(--bark);
  }
  .fg-cat-subtitle {
    font-size: 11px; color: #888; margin-top: 1px;
  }
  .fg-cat-chevron {
    font-size: 13px; color: #999;
    transition: transform 0.25s ease;
  }
  .fg-cat-header.open .fg-cat-chevron { transform: rotate(180deg); }
  .fg-cat-body {
    display: none;
    padding: 0 14px 14px;
  }
  .fg-cat-body.open { display: block; }
  .fg-cat-body .info-card { box-shadow: 0 2px 8px rgba(26,46,26,0.1); }

  /* Field Guide — search: dark green + gold (Field Guide intro family) */
  .fg-search-wrap {
    background: linear-gradient(155deg, #15281a 0%, #1a3220 42%, #121f14 100%);
    border-radius: 18px;
    margin-bottom: 16px;
    padding: 14px 16px 12px;
    border: 1px solid rgba(200, 168, 75, 0.22);
    box-shadow:
      0 10px 32px rgba(0, 0, 0, 0.35),
      inset 0 1px 0 rgba(255, 255, 255, 0.06);
  }
  .fg-search-eyebrow {
    font-family: 'Playfair Display', serif;
    font-size: 17px;
    font-weight: 700;
    color: #f5dfa0;
    margin: 0 0 12px;
    line-height: 1.2;
    letter-spacing: 0.02em;
  }
  .fg-search-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 14px;
    padding: 6px 6px 6px 12px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  }
  .fg-search-inner:focus-within {
    border-color: rgba(200, 168, 75, 0.45);
    background: rgba(0, 0, 0, 0.32);
    box-shadow: 0 0 0 1px rgba(200, 168, 75, 0.15), 0 0 0 4px rgba(200, 168, 75, 0.1);
  }
  .fg-search-ic {
    display: flex;
    color: rgba(200, 168, 75, 0.75);
    flex-shrink: 0;
  }
  .fg-search-input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.94);
    padding: 10px 4px 10px 0;
    -webkit-appearance: none;
    appearance: none;
  }
  .fg-search-input::placeholder { color: rgba(210, 205, 190, 0.48); }
  .fg-search-input:focus { outline: none; }
  .fg-search-input::-webkit-search-decoration,
  .fg-search-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
  }
  .fg-search-clear {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 250, 235, 0.92);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s ease, color 0.15s ease;
  }
  .fg-search-clear span { display: block; margin-top: -2px; }
  .fg-search-clear:hover { background: rgba(200, 168, 75, 0.22); color: #fff; }
  .fg-search-clear[hidden] { display: none !important; }
  .fg-search-clear:not([hidden]) { display: flex; }
  .fg-search-meta {
    font-size: 11px;
    color: rgba(200, 195, 175, 0.65);
    margin-top: 10px;
    min-height: 1.2em;
    font-family: 'DM Mono', monospace;
    letter-spacing: 0.02em;
  }
  .fg-search-empty {
    font-size: 12px;
    color: rgba(255, 220, 200, 0.92);
    margin-top: 10px;
    padding: 9px 12px;
    border-radius: 11px;
    background: rgba(180, 60, 30, 0.18);
    border: 1px solid rgba(255, 160, 120, 0.22);
    line-height: 1.45;
  }
  .fg-search-empty[hidden] { display: none !important; }

  /* CIC trophy tables — same language as holdover & legal data tables; fixes contrast on
     light “paper” cells inside both normal and field-mode (dark) cards. */
  #fg-cic-trophy .fg-cat-body {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  #fg-cic-trophy .info-card table {
    width: 100%;
    min-width: 320px;
    border-collapse: collapse;
    font-size: 11px;
  }
  #fg-cic-trophy .info-card thead tr {
    background: #3d2b1f !important;
    color: #c8a84b !important;
  }
  #fg-cic-trophy .info-card thead th {
    color: #c8a84b !important;
    border: 1px solid rgba(201, 168, 75, 0.28) !important;
    font-weight: 700;
    font-size: inherit;
    padding: 7px 8px;
  }
  #fg-cic-trophy .info-card tbody td {
    color: #2a2118 !important;
    background: #faf7f2 !important;
    border: 1px solid #e2d9ce !important;
    padding: 6px 8px;
    font-size: inherit;
  }
  #fg-cic-trophy .info-card tbody tr:nth-child(even) td {
    background: #f2ece4 !important;
  }
  #fg-cic-trophy .info-card tbody strong {
    color: #1a120c;
  }
  #fg-cic-trophy .info-card h2 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #3d2b1f;
    margin: 0 0 10px 0;
    line-height: 1.25;
  }
  #fg-cic-trophy .info-card h3 {
    font-size: 13px;
    font-weight: 700;
    color: #3d2b1f;
    margin: 12px 0 6px 0;
  }
  /* Formula blocks: marked outputs <pre><code> — force dark text on cream (code can
     otherwise inherit light colours from the dark page chrome). */
  #fg-cic-trophy .info-card pre,
  #fg-cic-trophy .info-card pre code {
    color: #1a120c;
    background: #f8f5f0;
  }
  #fg-cic-trophy .info-card pre code {
    background: transparent;
    padding: 0;
    font-size: inherit;
    font-family: ui-monospace, 'Cascadia Code', 'Segoe UI Mono', monospace;
  }
  #fg-cic-trophy .info-card pre {
    background: #f8f5f0;
    border-radius: 8px;
    padding: 10px 12px;
    overflow-x: auto;
    font-size: 11px;
    line-height: 1.45;
    margin: 8px 0 12px 0;
    border: 1px solid #e8e0d4;
    -webkit-overflow-scrolling: touch;
  }
  #fg-cic-trophy .info-card ul {
    font-size: 12px;
    color: #444;
    line-height: 1.65;
    margin: 0 0 12px 16px;
    padding: 0;
  }
  #fg-cic-trophy .info-card blockquote p {
    font-size: 13px;
    color: #444;
    line-height: 1.75;
  }

  /* CIC: species accordions — flat, sans-first (modern iOS / Material-adjacent) */
  #fg-cic-trophy .info-card.cic-species-wrap {
    margin-bottom: 8px;
    padding: 0;
    overflow: hidden;
    border-radius: 12px;
    background: #fff;
    box-shadow: none;
    border: 1px solid rgba(20, 24, 16, 0.09);
    border-left: 2px solid var(--gold);
  }
  #fg-cic-trophy .cic-species-details {
    border: none;
  }
  #fg-cic-trophy .cic-species-summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px 12px;
    margin: 0;
    padding: 14px 12px 14px 15px;
    font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #1a1612;
    line-height: 1.3;
    letter-spacing: -0.02em;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
    background: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: background 0.15s ease, border-color 0.15s ease;
  }
  #fg-cic-trophy .cic-species-details:not([open]) .cic-species-summary {
    border-bottom: none;
  }
  #fg-cic-trophy .cic-species-details[open] .cic-species-summary {
    border-bottom-color: rgba(0, 0, 0, 0.07);
    background: #f0eeea;
  }
  #fg-cic-trophy .cic-species-summary:hover {
    background: #f5f4f0;
  }
  #fg-cic-trophy .cic-species-summary:focus-visible {
    outline: 2px solid rgba(74, 94, 58, 0.4);
    outline-offset: 2px;
  }
  #fg-cic-trophy .cic-species-summary::-webkit-details-marker,
  #fg-cic-trophy .cic-species-summary::marker {
    display: none;
  }
  #fg-cic-trophy .cic-species-summary-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    text-wrap: pretty;
  }
  #fg-cic-trophy .cic-species-name {
    font-weight: 600;
    line-height: 1.25;
  }
  #fg-cic-trophy .cic-species-latin {
    display: block;
    font-size: 12px;
    font-weight: 500;
    font-style: normal;
    line-height: 1.35;
    color: #6b6358;
    letter-spacing: 0.01em;
  }
  #fg-cic-trophy .cic-species-chevron {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.05);
    font-size: 9px;
    line-height: 1;
    margin-top: 0.15em;
    color: #4a443c;
    transition: transform 0.2s ease, background 0.15s ease, color 0.15s ease;
  }
  #fg-cic-trophy .cic-species-details[open] .cic-species-chevron {
    transform: rotate(180deg);
    background: rgba(201, 168, 75, 0.14);
    color: #2e2820;
  }
  #fg-cic-trophy .cic-species-inner {
    padding: 16px 16px 20px;
    background: #f2f0eb;
  }

  /* Location not-set placeholder style */
  .time-unknown { opacity: 0.45; font-style: italic; letter-spacing: 0.5px; }



  /* ── Species Photo Gallery ── */
  .species-gallery { display:flex; gap:8px; margin-top:8px; overflow-x:auto; scrollbar-width:none; -webkit-overflow-scrolling:touch; padding-bottom:10px; align-items:flex-start; }
  .species-gallery::-webkit-scrollbar { display:none; }

  /* ── Lightbox ── */
  #gallery-lightbox { display:none; position:fixed; inset:0; z-index:9999; background:rgba(0,0,0,0.94); flex-direction:column; align-items:center; justify-content:center; }
  #gallery-lightbox.open { display:flex; }
  #lightbox-img { max-width:100%; max-height:78vh; border-radius:12px; object-fit:contain; }
  #lightbox-caption { color:rgba(255,255,255,0.6); font-size:12px; margin-top:10px; max-width:90vw; text-align:center; padding:0 14px; box-sizing:border-box; }
  .lightbox-caption-species { font-weight:600; color:rgba(255,255,255,0.92); font-size:13px; margin-bottom:6px; }
  .lightbox-caption-detail { font-size:11px; line-height:1.45; color:rgba(255,255,255,0.62); }
  #lightbox-counter { color:rgba(255,255,255,0.4); font-size:11px; margin-top:4px; }
  .lightbox-nav { display:flex; gap:24px; margin-top:20px; }
  .lightbox-btn { background:rgba(255,255,255,0.12); border:none; color:white; font-size:22px; width:48px; height:48px; border-radius:50%; cursor:pointer; display:flex; align-items:center; justify-content:center; }
  .lightbox-close { position:absolute; top:16px; right:16px; background:rgba(255,255,255,0.12); border:none; color:white; font-size:20px; width:40px; height:40px; border-radius:50%; cursor:pointer; display:flex; align-items:center; justify-content:center; }
.loc-preset {
  padding:9px 6px;
  border:1px solid #e8e8e8;
  background:#f8f8f8;
  border-radius:10px;
  font-size:12px;
  cursor:pointer;
  text-align:center;
  color:#3d3d3d;
  font-weight:500;
  transition:all 0.15s;
}
.loc-preset:hover { background:#e8f5e0; border-color:#8ab060; color:#2a5010; }
.loc-preset.selected { background:#5a7a30; color:white; border-color:#5a7a30; }
#location-modal.open { display:flex; }
.loc-result-item {
  padding:10px 12px;
  cursor:pointer;
  border-bottom:1px solid #f0f0f0;
  transition:background 0.12s;
}
.loc-result-item:last-child { border-bottom:none; }
.loc-result-item:hover { background:#f0f8e8; }

  /* ── Field mode (dim UI for low light) ─────────────────────── */
  .banner-field-mode-btn {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.75);
    transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
  }
  .banner-field-mode-btn:hover {
    background: rgba(255, 255, 255, 0.22);
  }
  .banner-field-mode-btn:focus-visible {
    outline: 2px solid rgba(200, 168, 75, 0.65);
    outline-offset: 2px;
  }
  html[data-field-mode="on"] .banner-field-mode-btn {
    background: rgba(200, 168, 75, 0.18);
    border-color: rgba(200, 168, 75, 0.45);
    color: #d4b45a;
    box-shadow: 0 0 0 1px rgba(200, 168, 75, 0.15);
  }

  html[data-field-mode="on"] {
    --forest: #0a0d0a;
    --cream: rgba(236, 232, 222, 0.88);
    --sage: rgba(140, 155, 125, 0.75);
    --mist: rgba(190, 198, 175, 0.55);
    --gold: #a68f42;
    --dawn: rgba(210, 195, 160, 0.82);
  }
  html[data-field-mode="on"] body {
    background: var(--forest);
  }
  html[data-field-mode="on"] .bg-layer {
    background:
      radial-gradient(ellipse at 20% 0%, rgba(35, 48, 28, 0.35) 0%, transparent 58%),
      radial-gradient(ellipse at 80% 100%, rgba(28, 22, 16, 0.55) 0%, transparent 58%),
      linear-gradient(160deg, #050705 0%, #0a100a 42%, #080b08 100%);
  }
  html[data-field-mode="on"] .app-subtitle {
    color: var(--sage);
  }
  html[data-field-mode="on"] .legal.legal-banner--glass .banner-glass-wrap {
    background: linear-gradient(135deg, rgba(100, 120, 160, 0.22), rgba(60, 120, 95, 0.14), rgba(100, 80, 120, 0.1));
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55);
  }
  html[data-field-mode="on"] .twilight.legal-banner--glass .banner-glass-wrap {
    background: linear-gradient(135deg, rgba(200, 160, 70, 0.28), rgba(160, 120, 40, 0.18), rgba(80, 50, 25, 0.14));
  }
  html[data-field-mode="on"] .illegal.legal-banner--glass .banner-glass-wrap {
    background: linear-gradient(135deg, rgba(180, 70, 55, 0.28), rgba(70, 28, 28, 0.22), rgba(35, 10, 10, 0.2));
  }
  html[data-field-mode="on"] .banner-glass-inner {
    background: rgba(6, 10, 8, 0.72);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 16px 32px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.06);
  }
  html[data-field-mode="on"] .twilight.legal-banner--glass .banner-glass-inner {
    background: rgba(16, 12, 6, 0.72);
  }
  html[data-field-mode="on"] .illegal.legal-banner--glass .banner-glass-inner {
    background: rgba(12, 6, 6, 0.78);
  }
  html[data-field-mode="on"] .nav-tab {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(200, 205, 190, 0.55);
  }
  html[data-field-mode="on"] .nav-tab.active {
    background: linear-gradient(135deg, #8f7a38, #9a8540);
    color: #0a0c0a;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  }
  html[data-field-mode="on"] .tab-bar {
    background: rgba(2, 4, 2, 0.98);
    border-top-color: rgba(255, 255, 255, 0.05);
  }
  html[data-field-mode="on"] .tab-icon,
  html[data-field-mode="on"] .tab-label {
    color: rgba(255, 255, 255, 0.22);
  }
  html[data-field-mode="on"] .tab-item.active .tab-icon,
  html[data-field-mode="on"] .tab-item.active .tab-label {
    color: var(--gold);
  }
  html[data-field-mode="on"] #forecast-card {
    background: rgba(6, 14, 8, 0.92) !important;
    border-color: rgba(160, 130, 60, 0.12) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45) !important;
  }

  /* Core surfaces */
  html[data-field-mode="on"] .deer-card,
  html[data-field-mode="on"] .info-card,
  html[data-field-mode="on"] .fg-category,
  html[data-field-mode="on"] .legal-picker-card {
    background: #101610;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  }
  html[data-field-mode="on"] .fg-cat-body .info-card {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
  }
  html[data-field-mode="on"] .fg-search-wrap {
    background: linear-gradient(155deg, #0e160e 0%, #121a12 45%, #0a100a 100%);
    border: 1px solid rgba(200, 168, 75, 0.2);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }
  html[data-field-mode="on"] .fg-search-eyebrow { color: rgba(245, 230, 190, 0.98); }
  html[data-field-mode="on"] .fg-search-inner {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
  }
  html[data-field-mode="on"] .fg-search-inner:focus-within {
    border-color: rgba(200, 168, 75, 0.42);
    box-shadow: 0 0 0 1px rgba(200, 168, 75, 0.15), 0 0 0 4px rgba(200, 168, 75, 0.08);
  }
  html[data-field-mode="on"] .fg-search-ic { color: rgba(200, 168, 75, 0.85); }
  html[data-field-mode="on"] .fg-search-input { color: rgba(248, 245, 235, 0.98); }
  html[data-field-mode="on"] .fg-search-input::placeholder { color: rgba(200, 200, 185, 0.62); }
  html[data-field-mode="on"] .fg-search-clear {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 250, 240, 0.92);
  }
  html[data-field-mode="on"] .fg-search-clear:hover { background: rgba(200, 168, 75, 0.22); }
  html[data-field-mode="on"] .fg-search-meta { color: rgba(195, 200, 185, 0.72); }
  html[data-field-mode="on"] .fg-search-empty {
    color: rgba(255, 210, 195, 0.95);
    background: rgba(200, 80, 40, 0.16);
    border-color: rgba(255, 150, 100, 0.25);
  }
  html[data-field-mode="on"] .card-header,
  html[data-field-mode="on"] .fg-cat-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  }
  html[data-field-mode="on"] .divider {
    background: rgba(255, 255, 255, 0.09);
  }
  html[data-field-mode="on"] .season-row {
    border-bottom-color: rgba(255, 255, 255, 0.08);
  }

  /* Primary text */
  html[data-field-mode="on"] .species-name,
  html[data-field-mode="on"] .fg-cat-title,
  html[data-field-mode="on"] .info-card h3,
  html[data-field-mode="on"] .legal-picker-title {
    color: rgba(244, 239, 226, 0.95);
  }
  html[data-field-mode="on"] .species-latin,
  html[data-field-mode="on"] .fg-cat-subtitle,
  html[data-field-mode="on"] .gallery-caption,
  html[data-field-mode="on"] .season-dates,
  html[data-field-mode="on"] .gender-text,
  html[data-field-mode="on"] .info-card > p,
  html[data-field-mode="on"] .info-card > ul > li,
  html[data-field-mode="on"] .legal-picker-lede,
  html[data-field-mode="on"] .legal-picker-hint {
    color: rgba(214, 220, 205, 0.82);
  }
  html[data-field-mode="on"] .gallery-caption-title {
    color: rgba(214, 186, 106, 0.95);
  }

  /* Notes */
  html[data-field-mode="on"] .card-note {
    background: rgba(200, 168, 75, 0.1);
    border-left-color: rgba(200, 168, 75, 0.82);
    color: rgba(228, 223, 208, 0.88);
  }

  /* Modal surfaces */
  html[data-field-mode="on"] #location-modal > div,
  html[data-field-mode="on"] #hours-disclaimer-modal > div,
  html[data-field-mode="on"] #changelog-modal > div,
  html[data-field-mode="on"] #first-launch-modal > div {
    background: #111711;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(232, 227, 214, 0.9);
  }
  html[data-field-mode="on"] #location-modal [id="location-modal-title"],
  html[data-field-mode="on"] #hours-disclaimer-modal [id="hours-modal-title"],
  html[data-field-mode="on"] #changelog-modal [id="changelog-title"],
  html[data-field-mode="on"] #first-launch-modal [id="first-launch-title"] {
    color: rgba(244, 239, 226, 0.95) !important;
  }
  html[data-field-mode="on"] #location-modal input[type="text"] {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15) !important;
    color: rgba(240, 236, 226, 0.95);
  }
  html[data-field-mode="on"] #location-modal input[type="text"]::placeholder {
    color: rgba(215, 220, 205, 0.5);
  }
  html[data-field-mode="on"] .loc-preset {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.14);
    color: rgba(224, 229, 214, 0.9);
  }
  html[data-field-mode="on"] .loc-preset:hover {
    background: rgba(200, 168, 75, 0.16);
    border-color: rgba(200, 168, 75, 0.45);
    color: rgba(245, 226, 184, 0.96);
  }
  html[data-field-mode="on"] .loc-result-item {
    border-bottom-color: rgba(255, 255, 255, 0.08);
  }
  html[data-field-mode="on"] .loc-result-item:hover {
    background: rgba(200, 168, 75, 0.1);
  }

  /* CIC section: subsection titles used bark brown (#3d2b1f) — switch to light text on field cards */
  html[data-field-mode="on"] #fg-cic-trophy h2,
  html[data-field-mode="on"] #fg-cic-trophy h3,
  html[data-field-mode="on"] #fg-cic-trophy h4 {
    color: rgba(232, 224, 205, 0.94) !important;
  }
  html[data-field-mode="on"] #fg-cic-trophy .info-card pre,
  html[data-field-mode="on"] #fg-cic-trophy .info-card pre code {
    color: rgba(230, 222, 200, 0.96);
  }
  html[data-field-mode="on"] #fg-cic-trophy .info-card pre {
    background: rgba(0, 0, 0, 0.35);
    border-color: rgba(201, 168, 75, 0.28);
  }
  html[data-field-mode="on"] #fg-cic-trophy .info-card pre code {
    background: transparent;
  }
  html[data-field-mode="on"] #fg-cic-trophy .info-card ul {
    color: rgba(210, 202, 182, 0.92);
  }
  html[data-field-mode="on"] #fg-cic-trophy .info-card blockquote p {
    color: rgba(220, 212, 190, 0.95);
  }
  html[data-field-mode="on"] #fg-cic-trophy .info-card.cic-species-wrap {
    background: #121812;
    border-color: rgba(255, 255, 255, 0.09);
    border-left-color: #c4a64a;
    box-shadow: none;
  }
  html[data-field-mode="on"] #fg-cic-trophy .cic-species-summary,
  html[data-field-mode="on"] #fg-cic-trophy .cic-species-summary-text {
    color: rgba(235, 228, 210, 0.96) !important;
    background: #121812 !important;
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
  }
  html[data-field-mode="on"] #fg-cic-trophy .cic-species-details:not([open]) .cic-species-summary {
    border-bottom: none !important;
  }
  html[data-field-mode="on"] #fg-cic-trophy .cic-species-details[open] .cic-species-summary {
    background: #181f16 !important;
    border-bottom-color: rgba(255, 255, 255, 0.1) !important;
  }
  html[data-field-mode="on"] #fg-cic-trophy .cic-species-summary:hover {
    background: #1a2218 !important;
  }
  html[data-field-mode="on"] #fg-cic-trophy .cic-species-inner {
    background: #0c100c;
  }
  html[data-field-mode="on"] #fg-cic-trophy .cic-species-latin {
    color: rgba(168, 162, 145, 0.92) !important;
  }
  html[data-field-mode="on"] #fg-cic-trophy .cic-species-chevron {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(210, 200, 175, 0.65);
  }
  html[data-field-mode="on"] #fg-cic-trophy .cic-species-details[open] .cic-species-chevron {
    background: rgba(200, 168, 75, 0.2);
    color: rgba(230, 210, 160, 0.9);
  }
  html[data-field-mode="on"] #fg-cic-trophy h3 > span {
    color: rgba(180, 172, 155, 0.85) !important;
  }
  html[data-field-mode="on"] #fg-cic-trophy .info-card p[style*="color:#3d2b1f"] {
    color: rgba(220, 212, 190, 0.95) !important;
  }
  html[data-field-mode="on"] #fg-cic-trophy a[style*="color:#2a5a10"] {
    color: #8fbc6a !important;
  }
}

