/* The canvas behind the page: what iOS shows beyond the document (overscroll,
   the zone behind Safari's collapsed bar). Static default so it works even
   before/without JS; applyTheme retints it per site's header colour. */
html {
  background-color: #18236e;
}

body {
      font-family: var(--font-body, 'Inter', sans-serif);
      background-color: #D83B01;
      color: #ffffff;
      margin: 0;
      padding: 0;
      display: flex;
      flex-direction: column;
      /* 100dvh tracks mobile URL-bar resizing; the old -webkit-fill-available
         hack computed too short on desktop Chrome, leaving the footer
         floating mid-page with background showing beneath it */
      min-height: 100vh;
      min-height: 100dvh;
    }
    
    header {
      background-color: #d35c18;
      color: #ffffff;
      padding: 15px;
      text-align: center;
      position: sticky;
      top: 0;
      z-index: 100; /* Above fade indicators */
    }

    header {
      display: flex;
      align-items: center; /* Vertically align items */
      justify-content: flex-start; /* Align items to the left */
    }

    /* Reduce header padding on kiosk displays.
       Kiosk mode is opt-in via ?mode=kiosk (plan item 2D) — a body.kiosk
       class set by v2-fetch.js — so visitor tablets keep the normal app. */
    body.kiosk header {
      padding: 5px 15px; /* Reduce vertical padding from 15px to 5px */
    }
    
    #site-logo {
      width: 80px;
      height: auto;
      margin-right: 15px;
    }

    header img {
      width: 40px;
      height: auto;
      margin-right: 10px;
      vertical-align: middle;
    }
    header h1 {
      display: inline;
      font-size: 1.5rem;
    }
    main {
      padding: 20px;
      padding-bottom: 20px; /* Normal padding - footer not fixed */
      flex: 1;
    }

    /* Kiosk mode: center content vertically within available space */
    body.kiosk {
      overflow: hidden; /* Prevent page from scrolling */
      height: 100vh; /* Lock to viewport height */
    }

    body.kiosk main {
      display: flex;
      flex-direction: column;
      justify-content: flex-start; /* Start from top, not center */
      align-items: center; /* Horizontal centering */
      padding: 20px;
      padding-bottom: 20px; /* Reset footer padding on kiosk */
      padding-top: 50px; /* Fixed top position below header and buttons for fact files */
      overflow-y: auto; /* Allow scrolling within main if needed */
      max-height: calc(100vh - 60px); /* Account for header (smaller) and footer */
    }

    /* Restore vertical centering for explore pages with grid */
    body.kiosk main:has(#content .card) {
      justify-content: center;
      padding-top: 20px;
    }

    /* Kiosk mode: keep normal flow, don't use flexbox centering on main */
    /* We'll center the grid specifically instead */

    /* Responsive grid for exhibit cards - mobile-first approach */
    /* Only apply grid when #content contains .card elements (exhibit view) */
    /* NOT when it contains .species-info-container (detail view) */
    #content {
      display: block; /* Default: normal flow for species detail pages */
    }

    /* Mobile default: single column, no grid */
    #content:has(.card) {
      display: block; /* Keep original stacked layout on mobile */
      padding: 10px;
    }

    /* Enable 2-column grid on larger phones in landscape */
    @media (min-width: 480px) {
      #content:has(.card) {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 20px;
      }
    }

    /* Kiosk mode: 2-row grid with horizontal scroll */
    @media (min-width: 768px) {
      body.kiosk #content:has(.card) {
        display: grid;
        grid-template-rows: repeat(2, 380px); /* Exactly 2 rows, fixed height */
        grid-auto-columns: 300px; /* Each column is 300px wide */
        grid-auto-flow: column; /* Add new columns, not rows */
        gap: 40px;
        column-gap: 40px;
        row-gap: 60px;
        width: fit-content; /* Only as wide as needed */
        margin: 0 auto; /* Center the grid */
        padding: 0;
      }

      /* Only enable scrolling when there are more than 8 cards */
      body.kiosk #content:has(.card):where([data-card-count="9"], [data-card-count="10"], [data-card-count="11"], [data-card-count="12"], [data-card-count="13"], [data-card-count="14"], [data-card-count="15"], [data-card-count="16"], [data-card-count="17"], [data-card-count="18"], [data-card-count="19"], [data-card-count="20"]) {
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        position: relative;
      }

      /* For 1-4 cards: use flexbox and center in a single row */
      body.kiosk #content[data-card-count="1"],
      body.kiosk #content[data-card-count="2"],
      body.kiosk #content[data-card-count="3"],
      body.kiosk #content[data-card-count="4"] {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        align-content: center !important;
        gap: 40px !important;
        row-gap: 60px !important;
      }

      /* For 5-6 cards: use flexbox - wraps at 3 cards per row */
      body.kiosk #content[data-card-count="5"],
      body.kiosk #content[data-card-count="6"] {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        align-content: center !important;
        gap: 40px !important;
        row-gap: 60px !important;
        max-width: 1100px !important; /* Allows 3 cards: (300*3) + (40*2) = 980px */
      }

      /* For 7 cards: use flexbox - wraps at 4 cards per row */
      body.kiosk #content[data-card-count="7"] {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        align-content: center !important;
        gap: 40px !important;
        row-gap: 60px !important;
        max-width: 1400px !important; /* Allows 4 cards: (300*4) + (40*3) = 1320px */
      }

      /* For exactly 8 cards: use grid to ensure 4×2 layout */
      body.kiosk #content[data-card-count="8"] {
        display: grid !important;
        grid-template-columns: repeat(4, 300px) !important;
        grid-template-rows: repeat(2, 380px) !important;
        gap: 40px !important;
        row-gap: 60px !important;
        justify-content: center !important;
        align-content: center !important;
      }

      /* Larger cards for 1-2 card displays */
      body.kiosk #content[data-card-count="1"] .card,
      body.kiosk #content[data-card-count="2"] .card {
        flex: 0 0 400px !important;
        width: 400px !important;
        height: 480px !important;
        margin: 0 !important;
      }

      /* Larger images for 1-2 card displays */
      body.kiosk #content[data-card-count="1"] .card img,
      body.kiosk #content[data-card-count="2"] .card img {
        height: 400px !important;
        width: 100% !important;
      }

      /* Standard size for 3-8 cards */
      body.kiosk #content[data-card-count="3"] .card,
      body.kiosk #content[data-card-count="4"] .card,
      body.kiosk #content[data-card-count="5"] .card,
      body.kiosk #content[data-card-count="6"] .card,
      body.kiosk #content[data-card-count="7"] .card,
      body.kiosk #content[data-card-count="8"] .card {
        flex: 0 0 300px !important;
        width: 300px !important;
        height: 380px !important;
        margin: 0 !important;
      }

      /* All cards in grid: fixed width and height for consistency */
      body.kiosk #content:has(.card) .card {
        width: 300px;
        height: 380px;
        margin: 0;
        scroll-snap-align: start;
        display: flex;
        flex-direction: column;
        flex-shrink: 0;
      }

      /* Hide scrollbar completely */
      body.kiosk #content:has(.card)::-webkit-scrollbar {
        display: none;
      }

      body.kiosk #content:has(.card) {
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
      }

      /* Pulse animation for arrow - more dramatic */
      @keyframes pulse {
        0%, 100% {
          opacity: 0.5;
          transform: translateY(-50%) scale(0.9);
        }
        50% {
          opacity: 1;
          transform: translateY(-50%) scale(1.2);
        }
      }
    }

    /* Large kiosk displays - optimize spacing and width */
    @media (min-width: 1200px) {
      body.kiosk #content:has(.card) {
        gap: 40px;
        max-width: 1600px;
      }
    }

    /* Make exhibit messages span full width of grid */
    .exhibit-message {
      grid-column: 1 / -1; /* Span all columns */
      text-align: center;
      font-size: 1.2rem;
      margin: 20px 0;
    }

    .card {
      background: #ffffff;
      padding: 10px;
      border-radius: 8px;
      margin-bottom: 15px; /* Default spacing for mobile */
      box-shadow: 0 2px 4px rgba(0,0,0,0.1);
      position: relative; /* For positioning the arrow */
    }

    /* Mobile default: full-width images that fill the card */
    .card img {
      width: 100%;
      height: auto;
      aspect-ratio: 1;
      object-fit: cover;
      border-radius: 6px;
      margin: 0 0 8px 0;
      float: none;
    }

    /* Special multimedia cards - mobile and kiosk */
    .card-quiz,
    .card-video,
    .card-audio,
    .card-blog {
      color: white !important;
    }

    .card-quiz h3::before {
      content: "📝 ";
      font-weight: 600;
    }

    .card-video h3::before {
      content: "🎥 ";
      font-weight: 600;
    }

    .card-audio h3::before {
      content: "🎧 ";
      font-weight: 600;
    }

    .card-blog h3::before {
      content: "👤 ";
      font-weight: 600;
    }

    .card-quiz h3,
    .card-video h3,
    .card-audio h3,
    .card-blog h3 {
      color: white !important;
    }

    .card-quiz p,
    .card-video p,
    .card-audio p,
    .card-blog p {
      color: rgba(255, 255, 255, 0.9) !important;
    }

    /* Click indicator arrow in top-right corner - MOBILE ONLY */
    .card::after {
      content: "→";
      position: absolute;
      top: 10px;
      right: 10px;
      font-size: 1.5rem;
      color: rgba(0,0,0,0.25);
      transition: color 0.2s, transform 0.2s;
      pointer-events: none; /* Don't interfere with clicking */
    }

    /* White arrow for special cards */
    .card-quiz::after,
    .card-video::after,
    .card-audio::after,
    .card-blog::after {
      color: rgba(255, 255, 255, 0.4);
    }

    .card:hover::after {
      color: rgba(0,0,0,0.6);
      transform: translateX(3px); /* Slide right slightly on hover */
    }

    .card-quiz:hover::after,
    .card-video:hover::after,
    .card-audio:hover::after,
    .card-blog:hover::after {
      color: rgba(255, 255, 255, 0.8);
    }

    /* Square card layout only on grid (480px+) */
    @media (min-width: 480px) {
      /* Hide arrow on larger screens */
      .card::after {
        display: none;
      }

      .card {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 8px;
        margin: 0; /* Remove all margins - grid gap handles spacing */
        transition: transform 0.2s, box-shadow 0.2s;
      }

      .card:hover {
        transform: translateY(-4px);
        box-shadow: 0 4px 8px rgba(0,0,0,0.15);
      }

      /* Make card images square thumbnails in grid */
      .card img {
        width: 100%;
        height: 300px; /* Square: 300x300 */
        object-fit: cover; /* Scale and crop to fill space */
        object-position: center; /* Center the image within the crop */
        border-radius: 6px;
        margin: 0 0 8px 0;
        float: none;
      }

      /* Card titles in grid */
      .card h3 {
        font-size: 0.95rem;
        margin: 6px 0 4px 0;
        color: #333;
        line-height: 1.3;
      }

      /* Card descriptions in grid */
      .card p {
        font-size: 0.85rem;
        color: #666;
        margin: 0;
        line-height: 1.4;
      }
    }

    /* Larger text for kiosk displays */
    @media (min-width: 768px) {
      body.kiosk .card h3 {
        font-size: 1.3rem; /* Increased from 1.1rem */
        font-weight: 600;
        margin: 10px 0 6px 0;
      }

      /* Special styling for quiz, video, and audio cards in kiosk mode */
      body.kiosk .card-quiz,
      body.kiosk .card-video,
      body.kiosk .card-audio,
      body.kiosk .card-blog {
        color: white !important;
        width: 300px !important;
        height: 380px !important;
      }

      body.kiosk .card-quiz a,
      body.kiosk .card-video a,
      body.kiosk .card-audio a,
      body.kiosk .card-blog a {
        color: white !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        height: 100% !important;
        width: 100% !important;
        text-align: center !important;
      }

      body.kiosk .card-quiz h3,
      body.kiosk .card-video h3,
      body.kiosk .card-audio h3,
      body.kiosk .card-blog h3 {
        color: white !important;
        font-size: 1.8rem !important;
        font-weight: 700 !important;
        margin: 0 !important;
        line-height: 1.2 !important;
      }

      /* Kiosk mode: labels display as block above title */
      body.kiosk .card-quiz h3::before {
        content: "📝" !important;
        display: block !important;
        font-size: 3rem !important;
        font-weight: 400 !important;
        margin-bottom: 15px !important;
      }

      body.kiosk .card-video h3::before {
        content: "🎥" !important;
        display: block !important;
        font-size: 3rem !important;
        font-weight: 400 !important;
        margin-bottom: 15px !important;
      }

      body.kiosk .card-audio h3::before {
        content: "🎧" !important;
        display: block !important;
        font-size: 3rem !important;
        font-weight: 400 !important;
        margin-bottom: 15px !important;
      }

      body.kiosk .card-blog h3::before {
        content: "👤" !important;
        display: block !important;
        font-size: 3rem !important;
        font-weight: 400 !important;
        margin-bottom: 15px !important;
      }

      body.kiosk .card-quiz p,
      body.kiosk .card-video p,
      body.kiosk .card-audio p,
      body.kiosk .card-blog p {
        color: rgba(255, 255, 255, 0.9) !important;
        font-size: 0.95rem !important;
      }

      /* Hide descriptions on kiosk - focus on images and titles */
      body.kiosk .card p {
        display: none;
      }

      /* Ripple effect on tap - add to existing card styles */
      body.kiosk .card {
        position: relative !important;
        overflow: hidden !important;
      }

      body.kiosk .ripple-effect {
        position: absolute;
        top: 50%;
        left: 50%;
        width: 600px;
        height: 600px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.8);
        transform: translate(-50%, -50%) scale(0);
        animation: ripple 0.5s ease-out;
        pointer-events: none;
        z-index: 10;
      }

      /* Hide the top message on kiosk - cards are self-explanatory */
      body.kiosk .exhibit-message:first-of-type {
        display: none;
      }
    }

    @keyframes ripple {
      0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
      }
      100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
      }
    }
    img {
      width: 140px;
      height: auto;
      border-radius: 0px;
      /* float: left; */
      float: center;
      margin-right: 0px;
    }
    footer {
      background-color: #d35c18;
      color: #ffffff;
      text-align: center;
      padding: 5px; /* Reduced from 10px */
      /* with viewport-fit=cover the band extends under the iPhone home
         indicator instead of floating above a bare strip */
      padding-bottom: calc(5px + env(safe-area-inset-bottom, 0px));
      position: relative; /* Not fixed - scrolls with content */
      margin: 0; /* Remove all margins */
      margin-top: auto; /* Push footer to the bottom */
      /* width: 100vw;  Ensures it spans the entire viewport */
      display: block;  /* Ensures it behaves as a block element */
      flex-shrink: 0; /* Prevent footer from shrinking */
      z-index: 100; /* Above fade indicators */
    }

    /* "Powered by curıous." — the Curious wordmark as live text (Inter,
       already on every guide page) with its ember full stop */
    /* "Powered by" starts in line with the c and sits tight above it */
    footer .powered-by { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 0; padding: 4px 0; text-decoration: none !important; }
    footer .powered-by small { color: #ffffff; font-size: 10px; font-weight: 600; letter-spacing: 0.06em; line-height: 1; margin: 0 0 1px 1px; opacity: 0.8; }
    footer .powered-mark { color: #ffffff; font-family: "Inter", system-ui, sans-serif; font-weight: 750; font-size: 22px; letter-spacing: -0.02em; line-height: 1; }
    footer .powered-mark i { font-style: normal; color: #F7701E; }

    /* Smaller footer image on mobile */
    footer img {
      max-height: 30px; /* Reduced from 40px */
      width: auto;
    }

    /* Reduce footer height on kiosk */
    @media (min-width: 768px) {
      body.kiosk footer {
        padding: 4px; /* Much smaller padding */
        position: relative; /* Not fixed on kiosk */
      }

      /* Make footer logo 50% smaller on kiosk */
      body.kiosk footer img {
        max-height: 30px; /* Reduce from default size */
        width: auto;
      }
    }

    /* Styling for portal.html table format for site info.
       Scoped to the site-info table only — a global `table { width:35% }`
       rule used to squash every table on every screen size. */
    table {
      margin: 10px 0;
      border-collapse: collapse;
      font-size: 1rem;
      text-align: left;
      max-width: 100%;
    }

    table th, table td {
      padding: 10px;
      border: 1px solid #ddd;
    }

    #site-info-content table {
      width: min(35rem, 100%);
    }

    #site-info-content table td:first-child {
      font-weight: bold;
      width: 25%;
      text-align: right;
    }

    #site-info-content table td:last-child {
      width: 70%;
    }
    
    #site-info-content {
      margin-bottom: 20px; /* Add space below the table */
    }
    
    #payment-info {
      clear: both; /* Ensure payment info appears below floated content */
    }

    body.loading {
      visibility: hidden; /* Hide everything while loading */
    }
    
    body.loaded {
      visibility: visible; /* Show content after loading */
    }


/* Stying for buttons */
button {
  border-radius: 8px; /* Rounded corners */
  padding: 10px 20px; /* Add some padding */
  color: #FFFFFF; /* Disabled text color */
  font-size: 1rem; /* Standard font size */
  font-family: var(--font-body, 'Inter', sans-serif); /* Match theme font */
  cursor: pointer; /* Pointer cursor on hover */
  transition: background-color 0.3s ease, transform 0.2s ease; /* Smooth hover effect */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Add subtle shadow */
}

button:hover {
  filter: brightness(1.1); /* Slightly brighter on hover */
  transform: scale(1.05); /* Slightly larger on hover */
}

button:disabled {
  background-color: #E0E0E0; /* Disabled state color */
  color: #A0A0A0; /* Disabled text color */
  cursor: not-allowed; /* Disable pointer cursor */
  box-shadow: none; /* Remove shadow */
}

button:active {
  transform: scale(0.98); /* Pressed button effect */
}

/* Styling for the drop down */
select {
  color: var(--text-color, #000000); /* Match text color */
  border-radius: 8px; /* Rounded corners */
  padding: 10px 20px; /* Match button padding */
  font-size: 1rem; /* Match button font size */
  cursor: pointer; /* Pointer cursor for interactivity */
  appearance: none; /* Remove default dropdown styling */
  transition: background-color 0.3s ease, transform 0.2s ease; /* Smooth hover effect */
}

select:hover {
  filter: brightness(1.1); /* Slightly brighter on hover */
  transform: scale(1.02); /* Slightly larger on hover */
}

select:focus {
  outline: none; /* Remove default focus outline */
  box-shadow: 0 0 5px var(--header-color, #d35c18); /* Add focus glow */
}

select option {
  background-color: var(--background-color, #D83B01); /* Dropdown menu background */
  color: var(--text-color, #FFFFFF); /* Dropdown menu text color */
}

/* Styling for Portal Login form */
body.hidden {
  background-color: #D83B01; /* This should be your theme's background color */
  visibility: hidden; /* Hide until authenticated */
}
header {
  background-color: #d35c18; /* Theme header color */
  color: #FFFFFF; /* Theme text color */
}
a {
  color: #FFD7B5; /* Theme link color */
}
#login-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
}
#login-container input {
  margin: 10px 0;
  padding: 10px;
  font-size: 1rem;
}
#login-container button {
  padding: 10px 20px;
  background-color: #18236e;
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}
#login-container button:hover {
  background-color: #142054;
}

/* Styling for the audio guide */
#audio-container {
  text-align: left;
}

/* Center container styling */
.center-container {
  text-align: center;
  margin-top: 50px;
}

/* Large play button */
.play-button {
  font-size: 24px;
  padding: 20px 60px;
  width: 350px;
  height: 150px;
  display: block;
  margin: 20px auto;
  cursor: pointer;
  background-color: #d83b01;
  color: white;
  border: none;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s ease;
}

.play-button:hover {
  background-color: #d35c18;
}

/* Button group for Pause and Restart */
.pause-restart-group {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

/* Medium buttons for Pause and Restart */
.pause-restart-button {
  font-size: 18px;
  padding: 15px 40px;
  width: 175px;
  height: 150px;
  cursor: pointer;
  background-color: #d35c18;
  color: white;
  border: none;
  border-radius: 6px;
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s ease;
}

.pause-restart-button:hover {
  background-color: #a12a00;
}

/* Audio status text */
.status-text {
  text-align: center; /* Centers the text horizontally */
  margin-top: 10px;
  color: gray;
  font-size: 14px;
}

/* Styling for the all-species grid on the Portal */
.species-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  padding: 20px;
  justify-items: center;
}

.species-card {
  text-align: center;
  width: 150px;
}

.species-card img {
  width: 150px; /* Set a fixed width for thumbnails */
  height: 150px; /* Set a fixed height for thumbnails */
  object-fit: cover; /* Ensures the image maintains its aspect ratio within the thumbnail */
  border-radius: 8px; /* Optional: Slight rounding for a cleaner look */
}

.species-card h3 {
  font-size: 1em;
  margin-top: 10px;
  margin-bottom: 10px;
  color: #333;
}

/* Styling for the species card */
.species-info-container {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  padding: 30px;
  gap: 40px; /* Adjust gap between image and text */
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

/* Styling for the species image */
.species-image {
  flex-shrink: 0;
  width: 400px;
  max-width: 100%; /* Make the image responsive */
  height: auto;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Add shadow for better appearance */
}

/* Styling for the species details */
.species-details {
  max-width: 600px;
  width: 100%; /* Full width on smaller screens */
}

.species-details h2 {
  font-size: 28px;
  margin-bottom: 15px;
}

.species-details p {
  margin-bottom: 20px; /* Add space between paragraphs */
  line-height: 1.8;
  font-size: 16px;
}

/* Styling for action buttons */
.action-button {
  display: inline-block;
  margin: 15px 10px 0 0; /* Add margin between buttons */
  padding: 12px 20px;
  font-size: 16px;
  background-color: #285eb8;
  color: #ffffff !important; /* Ensure white text color */
  text-decoration: none; /* Remove underlines */
  border-radius: 8px;
  text-align: center;
  transition: background-color 0.3s ease;
  width: auto; /* Allow dynamic sizing on desktop */
}

/* Override link-specific styles */
.action-button:link,
.action-button:visited,
.action-button:hover,
.action-button:active {
  color: #ffffff !important; /* Force white text for all link states */
  text-decoration: none; /* Ensure no underline appears */
}

/* Active click effect */
.action-button:active {
  background-color: #163a70; /* Even darker blue */
  transform: scale(0.98); /* Slightly shrink button on click */
}

.action-button:hover {
  background-color: #285eb8;
}

/* Styling for the species info pop up image */
#image-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

#image-modal img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
  object-fit: contain; /* Ensures the image maintains its aspect ratio */
  display: block;
  margin: auto; /* Center the image inside the modal */
}

#image-modal span {
  position: absolute;
  top: 20px;
  right: 20px;
  color: white;
  font-size: 30px;
  cursor: pointer;
}

/* Responsive styling for mobile devices */
@media (max-width: 768px) {
  .species-info-container {
    flex-direction: column; /* Stack items vertically on smaller screens */
    align-items: center;
    /* 1C: body copy stays left-aligned for readability — only the
       title block below re-centres itself */
    text-align: left;
  }

  .species-details h2,
  .species-details h3 {
    text-align: center;
  }

  .species-image {
    width: 90%; /* Adjust image width for smaller screens */
  }

  .species-details {
    max-width: 90%; /* Reduce width on smaller screens */
  }

  .species-details h2 {
    font-size: 24px; /* Adjust title size for mobile */
    margin-bottom: 8px; /* Reduce space below the common name */
  }

  .species-details h3 {
    font-size: 20px; /* Adjust title size for mobile */
    margin-top: 0; /* Remove space above the scientific name */
    margin-bottom: 10px; /* Reduce space below the common name */
  }

  .species-details p {
    font-size: 14px; /* Reduce font size slightly for smaller screens */
    line-height: 1.6; /* Adjust line spacing */
  }
}

/* Styling for advert cards eg talk times and experiences */
.advert-card {
  border-radius: 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  padding: 10px;
  margin: 10px auto;
  max-width: 400px; /* Reduced width for the card */
}

/* Table styling */
.advert-card table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.advert-card th,
.advert-card td {
  border: 1px solid transparent; /* Invisible border */
  text-align: left;
  padding: 8px;
}

/* Adjust column widths */
.advert-card th:first-child,
.advert-card td:first-child {
  width: 40%; /* Left column wider */
}

.advert-card th:last-child,
.advert-card td:last-child {
  width: 35%; /* Right column less wide */
}

.advert-card th {
  font-weight: bold;
  /* background-color: #f4f4f4; Optional: Light background for headers */
}

.advert-card tr:nth-child(even) {
  /* background-color: #f9f9f9; Subtle stripe for even rows */
}

.advert-card tr:hover {
  /* background-color: #f1f1f1; Slightly darker background on hover */
}

/* Styling for superuser dashboard */
.su-site-info-content {
  margin: 20px auto;
  /* max-width: 1500px; Adjust width as needed */
  overflow-x: auto; /* Add horizontal scrolling for smaller screens */
}

/* Styling for the table */
.su-site-info-content table {
  width: 50%; /* Full table width */
  border-collapse: collapse;
  font-family: Arial, sans-serif;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Subtle shadow */
  border-radius: 8px; /* Rounded corners */
  table-layout: fixed; /* Respect column widths */
}

.su-site-info-content colgroup col:nth-child(1) {
  width: 5%; /* ID */
}

.su-site-info-content colgroup col:nth-child(2) {
  width: 25%; /* Site Name / Company */
}

.su-site-info-content colgroup col:nth-child(3) {
  width: 15%; /* Contact */
}

.su-site-info-content colgroup col:nth-child(4) {
  /* width: 15%; Email */
}

.su-site-info-content colgroup col:nth-child(5) {
  width: 20%; /* Address */
}

.su-site-info-content colgroup col:nth-child(6) {
  width: 5%; /* Phone */
}

.su-site-info-content colgroup col:nth-child(7) {
  width: 5%; /* Tier */
}

.su-site-info-content colgroup col:nth-child(8) {
  width: 5%; /* Status */
}

.su-site-info-content colgroup col:nth-child(9) {
  width: 5%; /* DB Link */
}

/* Optional: Adjust table for small screens */
@media (max-width: 768px) {
  .su-site-info-content table {
    font-size: 12px; /* Reduce font size for smaller screens */
  }
}

/* Table header styling */
.su-site-info-content th {
  /* background-color: #357edd; */
  color: #ffffff;
  font-weight: bold;
  text-align: left;
  padding: 12px;
  text-transform: uppercase; /* Optional: Make header text uppercase */
  font-size: 14px;
}

/* Table row styling */
.su-site-info-content td {
  /* border: 1px solid #ddd; Subtle border between cells */
  text-align: left;
  padding: 10px;
  font-size: 14px;
}

/* Alternating row colors */
.su-site-info-content tr:nth-child(even) {
  /* background-color: #f9f9f9; Light gray for even rows */
}

.su-site-info-content tr:nth-child(odd) {
  /* background-color: #ffffff; White for odd rows */
}

/* Row hover effect */
.su-site-info-content tr:hover {
  /* background-color: #f1f1f1; Slightly darker gray on hover */
  cursor: pointer; /* Pointer cursor to indicate interactivity */
}

/* Links in the table */
.su-site-info-content a {
  color: #ffffff; /* Link color */
  text-decoration: none;
}

.su-site-info-content a:hover {
  text-decoration: underline; /* Underline on hover */
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
  .su-site-info-content table {
    font-size: 12px; /* Reduce font size on smaller screens */
  }

  .su-site-info-content th,
  .su-site-info-content td {
    padding: 8px; /* Adjust padding for smaller screens */
  }
}

.thumbnail {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
}


#camera-popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

#camera-feed {
  max-width: 100%;
  max-height: 100%;
}

#close-popup {
  position: absolute;
  top: 10px;
  right: 10px;
  background: white;
  border: none;
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  z-index: 1001;
}

.center {
text-align: center; /* Centre align text inside */   
}


/* Labelled Scan button (plan item 1F): the product's most important repeat
   action becomes an obvious pill docked bottom-right, clear of headings and
   the footer, respecting notched-phone safe areas. */
#qr-icon {
  position: fixed;
  right: max(16px, env(safe-area-inset-right, 16px));
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 1100;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--c-navy, #18236e);
  color: #fff;
  border: 2px solid #fff;
  border-radius: 999px;
  padding: 12px 20px;
  font-family: var(--font-body, 'Inter', sans-serif);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(16, 19, 31, 0.35);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

#qr-icon:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(16, 19, 31, 0.4);
}

#qr-icon:active {
  transform: scale(0.97);
}

#qr-icon img {
  width: 20px;
  height: 20px;
  filter: invert(100%) brightness(200%); /* white glyph on the navy pill */
}

#qr-icon .scan-label {
  line-height: 1;
}

/* Kiosk/Touchscreen Mode - hide QR icon on large screens (tablets+) */
@media (min-width: 768px) {
  body.kiosk #qr-icon {
    display: none; /* Hide QR scanner on kiosk displays */
  }
}

/* Kiosk/Touchscreen Mode - disable header/footer logo links on large screens */
@media (min-width: 768px) {
  body.kiosk header a,
  body.kiosk footer a {
    pointer-events: none; /* Disable clicking */
    cursor: default; /* Show normal cursor, not pointer */
  }

  /* Hide "Keep scanning to learn more" message on kiosk displays */
  body.kiosk .exhibit-message:last-of-type {
    display: none;
  }
}

#id-icon {
  position: fixed; /* Keep it in the top-right corner */
  top: 215px;
  right: 23px;
  cursor: pointer; /* Make it clickable */
  z-index: 1100; /* Ensure it appears above other elements */
  }
  
  #id-icon img {
  width: 33px; /* Adjust icon size */
  height: 33px;
  filter: invert(0%) brightness(100%);
  transition: transform 0.2s ease, opacity 0.2s ease; /* Add hover effects */
  }
  
  #id-icon:hover img {
  transform: scale(1.1); /* Slightly enlarge on hover */
  opacity: 0.8; /* Dim slightly for visual feedback */
  }
  
  .notice-container {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    border-radius: 10px;
    background-color: #ffffff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
  }
  
  .notice-title {
    font-size: 24px;
    font-weight: bold;
    color: #161616;
    margin-bottom: 10px;
  }
  
  .notice-message {
    font-size: 18px;
    line-height: 1.6;
    color: #555555;
  }
  
  .notice-container a {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    font-size: 16px;
    color: #ffffff;
    background-color: #0078d7;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s ease;
  }
  
  .notice-container a:hover {
    background-color: #005ea6;
  }

  .notice-overdue {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    border-radius: 10px;
    background-color: #d69393; /* Light red background for a warning effect */
    border: 2px dashed #e5042d; /* Dashed red border for visual impact */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
    text-align: center;
  }
  
  .notice-overdue h2 {
    font-size: 24px;
    font-weight: bold;
    color: #000000;
    /* color: #b00020; Deep red text for emphasis */
    margin-bottom: 10px;
  }
  
  .notice-overdue p {
    font-size: 18px;
    line-height: 1.6;
    color: #000000;
    /* color: #b00020; Deep red text for emphasis */
  }

  .scan-another-button {
    display: block; /* Changes the button to a block-level element */
    margin: 20px auto; /* Centres the button horizontally and adds vertical spacing */
    padding: 10px 20px;
    font-size: 16px;
    color: #ffffff;
    background-color: #18236e;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s ease;
  }
  
  .scan-another-button:hover {
    background-color: #141e5b; /* Darker shade for hover effect */
  }

  #wifi-dialog {
    width: 90%;
    max-width: 400px;
    padding: 20px;
    border-radius: 10px;
    border: none;
    background: #fff;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    text-align: center;
  }
  
  #wifi-dialog h2 {
    margin-top: 0;
    font-size: 22px;
    color: #333;
  }
  
  #wifi-content p {
    font-size: 18px;
    margin: 10px 0;
    color: #555;
  }
  
  #wifi-content p strong {
    color: #222;
  }
  
  #close-wifi-dialog {
    background: #ff5f5f;
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 15px;
    width: 30%;
  }
  
  #close-wifi-dialog:hover {
    background: #e04b4b;
  }
/* Center the vote container */
.vote-container {
  display: flex;
  align-items: center;
  justify-content: center; /* Centers horizontally */
  margin-top: 15px;
  gap: 8px; /* Space between button and count */
}

/* Style the upvote button */
.upvote-button {
  font-size: 1rem; /* Smaller font size */
  padding: 6px 12px; /* Compact padding */
  background: #18236e; /* Dark background */
  color: #fff; /* White text */
  border: none;
  border-radius: 8px; /* Rounded edges */
  cursor: pointer;
  transition: background 0.2s ease-in-out;
}

.upvote-button:hover {
  background: #18236e; /* Slightly lighter on hover */
}

.upvote-button:disabled {
  background: #555; /* Greyed out when disabled */
  cursor: default;
}

/* Style the vote count */
.vote-count {
  font-size: 1rem;
  font-weight: bold;
  color: #18236e; /* White text */
}

/* Kiosk mode: Reposition and enlarge back button and upvote button */
@media (min-width: 768px) {
  /* Back button - top left */
  body.kiosk #back-button-container {
    position: fixed !important;
    top: 140px !important; /* Below header with space */
    left: 20px !important;
    text-align: left !important;
    margin: 0 !important;
    z-index: 99 !important; /* Below header but above content */
  }

  body.kiosk .back-button {
    font-size: 1.5rem !important;
    padding: 15px 30px !important;
    background: #18236e !important;
    color: #fff !important;
    border: none !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2) !important;
    transition: transform 0.2s, box-shadow 0.2s !important;
    line-height: 1.5 !important;
    height: auto !important;
  }

  body.kiosk .back-button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 12px rgba(0,0,0,0.3) !important;
  }

  /* Upvote container - top right */
  body.kiosk .vote-container {
    position: fixed !important;
    top: 140px !important;
    right: 20px !important;
    margin: 0 !important;
    z-index: 99 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
  }

  body.kiosk .upvote-button {
    font-size: 1.5rem !important;
    padding: 15px 30px !important;
    background: #18236e !important;
    color: #fff !important;
    border: none !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2) !important;
    transition: transform 0.2s, box-shadow 0.2s !important;
    line-height: 1.5 !important;
    height: auto !important;
  }

  body.kiosk .upvote-button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 12px rgba(0,0,0,0.3) !important;
  }

  body.kiosk .vote-count {
    font-size: 1.3rem !important;
  }
}

#camera-popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

#camera-feed {
  max-width: 100%;
  max-height: 100%;
}

#close-popup {
  position: absolute;
  top: 10px;
  right: 10px;
  background: white;
  border: none;
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  z-index: 1001;
}

.center {
text-align: center; /* Centre align text inside */
}


body.hidden > *:not(#loader) {
  display: none;
}

#loader {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: #f0f0f0; /* fallback background */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loader-content {
  text-align: center;
}

.loader-logo {
  width: 120px;
  margin-bottom: 20px;
}

#loader p {
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 20px;
  color: #444;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #ccc;
  border-top-color: #444;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

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

.emoji-thumbnail {
  font-size: 5rem;
  text-align: center;
  line-height: 1;
  padding: 1rem;
  background: #f0f0f0;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 150px;
  width: 150px;
  box-sizing: border-box;
}

/* Blog Styles */
.blog-header {
  margin-bottom: 40px;
  padding-bottom: 25px;
  border-bottom: 2px solid #e0e0e0;
  text-align: center;
}

.blog-header h2 {
  margin: 0 0 15px 0;
  color: #333;
  font-size: 2.2rem;
  font-weight: 600;
}

.blog-header p {
  margin: 0;
  color: #666;
  font-style: italic;
  font-size: 1.1rem;
}

.blog-content {
  max-width: 100%;
}

.blog-entry {
  margin-bottom: 50px;
  padding: 30px;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #f0ddc9;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
}

.blog-entry:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.blog-entry:last-child {
  margin-bottom: 30px;
}

.blog-entry h3 {
  margin: 0 0 15px 0;
  color: #333;
  font-size: 1.4rem;
  font-weight: 600;
  padding-bottom: 8px;
  border-bottom: 1px solid #f0f0f0;
}

.blog-entry .entry-date {
  margin: 0 0 20px 0;
  color: #888;
  font-size: 0.95rem;
  font-style: italic;
}

/* Featured image for blog entries */
.blog-entry .entry-image {
  margin: 15px 0 20px 0;
}

.blog-entry .entry-image img {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
}

.blog-entry .entry-image img:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.blog-entry .entry-content {
  line-height: 1.7;
  color: #444;
  font-size: 1rem;
}

.blog-entry .entry-content p {
  margin-bottom: 18px;
}

.blog-entry .entry-content p:last-child {
  margin-bottom: 0;
}

.blog-entry .entry-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 20px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.blog-entry .entry-content h4,
.blog-entry .entry-content h5,
.blog-entry .entry-content h6 {
  margin: 25px 0 15px 0;
  color: #333;
  font-weight: 600;
}

.blog-entry .entry-content ul,
.blog-entry .entry-content ol {
  margin: 20px 0;
  padding-left: 35px;
}

.blog-entry .entry-content li {
  margin-bottom: 8px;
}

.blog-entry .entry-content blockquote {
  margin: 25px 0;
  padding: 20px 25px;
  background: #f8f9fa;
  border: 1px solid #eadfd2;
  font-style: italic;
  border-radius: 8px;
}

.blog-entry .entry-content strong,
.blog-entry .entry-content b {
  color: #333;
  font-weight: 600;
}

/* ========================================
   KIOSK VIDEO STYLES
   ======================================== */

/* Video container responsive aspect ratio */
.video-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9; /* default; direct files override with their real shape (3F) */
  overflow: hidden;
  border-radius: 10px;
  max-height: 80vh;
  margin: 0 auto;
}

/* 3F: on phones the video breaks out of the page padding and fills the
   screen edge-to-edge instead of sitting in a small inset box. Centring is
   transform-based so clips narrower than the viewport (portrait clips get a
   JS-set max-width) stay centred instead of hugging the left edge. */
@media (max-width: 767px) {
  body:not(.kiosk) .video-container {
    width: 100vw;
    max-width: 100vw;
    margin-left: 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 0;
    max-height: none;
  }
}

.video-container iframe,
.video-container video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Kiosk mode: Hide title and description, maximize video */
@media (min-width: 768px) {
  body.kiosk .video-title,
  body.kiosk .video-description-title,
  body.kiosk .video-description,
  body.kiosk #content br {
    display: none !important;
  }
  
  body.kiosk #content:has(.video-container) {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    min-height: calc(100vh - 160px);
  }
  
  body.kiosk .video-container {
    width: 90vw;
    max-width: 90vw;
    height: calc(85vh - 160px);
    max-height: calc(85vh - 160px);
    padding-bottom: 0;
  }
  
  body.kiosk .video-container iframe,
  body.kiosk .video-container video {
    width: 100%;
    height: 100%;
    border-radius: 10px;
  }
}
/* ============================================================
   PLAN 1 + 2 ADDITIONS (July 2026)
   ============================================================ */

/* --- 2B: brand type on visitor headings ------------------- */
header h1,
#exhibit-title,
.card h3,
.species-details h2,
.species-details h3,
.advert-card h2,
.blog-header h2,
.quiz-card h3,
.notice-title,
.empty-state h3,
#site-name,
#welcome-title {
  font-family: var(--font-display, 'Inter', sans-serif);
  font-weight: 700;
  letter-spacing: -0.01em;
}
/* Inter: the species line stays a step lighter than the name */
.species-details h3 { font-weight: 600; }

/* --- 1C: readable measure on factfile copy ----------------- */
.species-details p {
  max-width: 65ch;
}

/* --- 1H: image loading hygiene ------------------------------ */
.card img,
.species-image {
  background: #e6e9f2; /* something to look at while lazy images arrive */
}

.img-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 6px;
  margin: 0 0 8px;
  background: linear-gradient(135deg, var(--c-navy, #18236e), #2a4a9e);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 650;
  text-align: center;
}

/* --- 1G: talk times know what time it is -------------------- */
.talk-row-past td {
  opacity: 0.45;
}

.talk-row-next td {
  font-weight: 700;
}

.talk-next-badge {
  display: inline-block;
  background: var(--c-orange, #d35c18);
  color: #fff;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  margin-left: 8px;
  white-space: nowrap;
}

.talk-done-label {
  display: inline-block;
  background: rgba(127, 132, 156, 0.18);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  margin-left: 8px;
  white-space: nowrap;
  opacity: 0.9;
}

/* --- 1E: exhibit directory (bare index.html) ---------------- */
.directory-list {
  max-width: 520px;
  margin: 0 auto;
  padding: 4px;
}

.directory-intro {
  text-align: center;
  max-width: 46ch;
  margin: 0 auto 16px;
}

.directory-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--c-panel, #fff);
  color: var(--c-ink, #22284b);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 10px;
  text-decoration: none;
  box-shadow: var(--shadow-1, 0 1px 3px rgba(24, 35, 110, 0.12));
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.directory-row:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2, 0 4px 14px rgba(24, 35, 110, 0.16));
}

.directory-row .dir-thumb {
  width: 52px;
  height: 52px;
  border-radius: 9px;
  object-fit: cover;
  flex-shrink: 0;
  background: #e6e9f2;
}

.directory-row .dir-thumb-none {
  width: 52px;
  height: 52px;
  border-radius: 9px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e6e9f2;
  color: #7b8098;
}

.directory-row .dir-thumb-emoji {
  width: 52px;
  height: 52px;
  border-radius: 9px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  background: linear-gradient(135deg, var(--c-navy, #18236e), #2a4a9e);
}

.directory-row b {
  display: block;
  font-family: var(--font-display, 'Inter', sans-serif);
  font-size: 1.02rem;
  color: var(--c-ink, #22284b) !important;
}

.directory-row small {
  color: var(--c-muted, #5f6689) !important;
  font-size: 0.82rem;
}

.directory-row .dir-chev {
  margin-left: auto;
  color: var(--c-faint, #9aa1c4);
  font-size: 1.4rem;
}

/* --- 1A/1B: quiz answer feedback + results ------------------ */
.options button.answer-correct {
  background: var(--c-good, #1e7a45) !important;
  color: #fff !important;
}

.options button.answer-wrong {
  background: var(--c-crit, #b3261e) !important;
  color: #fff !important;
}

.options button.answer-dim {
  opacity: 0.5;
}

.options button:disabled {
  cursor: default;
}

.quiz-explanation {
  background: var(--c-good-bg, #e3f1e8);
  border: 1px solid rgba(30, 122, 69, 0.3);
  color: #174d2e;
  border-radius: 10px;
  padding: 10px 14px;
  margin-top: 12px;
  font-size: 0.95rem;
  text-align: left;
}

.quiz-explanation.wrong {
  background: var(--c-crit-bg, #f9e9e7);
  border-color: rgba(179, 38, 30, 0.3);
  color: #6e1d18;
}

.quiz-next-btn {
  display: block !important;
  width: 100%;
  margin-top: 12px;
}

.quiz-results-screen {
  text-align: center;
  color: inherit;
}

.score-ring {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  margin: 10px auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.score-ring i {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--c-navy, #18236e);
}

.quiz-percentile {
  font-weight: 700;
  margin: 0 0 14px;
}

/* the optional "Did you know" card matches the review column */
.quiz-results-screen .didyou-card {
  max-width: 420px;
  margin: 0 auto 18px;
  text-align: left;
}

.quiz-review {
  text-align: left;
  max-width: 420px;
  margin: 0 auto 16px;
}

.quiz-review-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 7px 2px;
  border-bottom: 1px solid rgba(127, 127, 127, 0.2);
  font-size: 0.92rem;
}

.quiz-review-row:last-child {
  border-bottom: none;
}

.quiz-review-row .rev-ok {
  color: var(--c-good, #1e7a45);
  font-weight: 750;
  white-space: nowrap;
}

.quiz-review-row .rev-no {
  color: var(--c-crit, #b3261e);
  font-weight: 750;
  white-space: nowrap;
}

.quiz-results-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 6px;
}

/* ============================================================
   PLAN 3 ADDITIONS (July 2026)
   ============================================================ */

/* --- 3G: smooth page-to-page transitions -------------------- */
@view-transition {
  navigation: auto;
}

@media (prefers-reduced-motion: reduce) {
  @view-transition {
    navigation: none;
  }
}

/* --- 3A: exhibit hero + grouped rows ------------------------ */
.exhibit-hero {
  position: relative;
  max-width: 520px;
  margin: 0 auto 12px;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--c-navy, #18236e), #2a4a9e);
  min-height: 96px;
}

.exhibit-hero img {
  display: block;
  width: 100%;
  height: 160px;
  object-fit: cover;
  margin: 0;
  border-radius: 0;
}

.exhibit-hero-overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 28px 16px 10px;
  background: linear-gradient(to top, rgba(10, 14, 40, 0.78), transparent);
  color: #fff;
}

.exhibit-hero-overlay h2 {
  margin: 0;
  font-family: var(--font-display, 'Inter', sans-serif);
  font-size: 1.45rem;
  line-height: 1.2;
  color: #fff;
  text-wrap: balance;
}

.exhibit-hero-overlay span {
  font-size: 0.82rem;
  opacity: 0.92;
}

.exhibit-progress {
  max-width: 520px;
  margin: 0 auto 10px;
  text-align: left;
}

.exhibit-list {
  max-width: 520px;
  margin: 0 auto;
}

.exhibit-section-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  margin: 18px 2px 8px;
  opacity: 0.9;
}

.row-seen {
  margin-left: auto;
  color: var(--c-good, #1e7a45);
  background: var(--c-good-bg, #e3f1e8);
  border-radius: 999px;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  flex-shrink: 0;
}

/* --- 3C: factfile redesign ---------------------------------- */
.factfile-name {
  font-size: 1.7rem;
  margin: 0 0 2px;
}

.factfile-species {
  font-size: 1.05rem;
  font-weight: 500;
  margin: 0 0 12px;
  opacity: 0.9;
}

.stat-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0 0 14px;
}

.stat-chips .pill {
  background: var(--c-panel, #fff);
  color: var(--c-ink, #22284b);
  box-shadow: var(--shadow-1, 0 1px 3px rgba(24, 35, 110, 0.12));
}

.keeper-note {
  background: var(--c-info-bg, #e7eef8);
  border: 1px solid rgba(43, 95, 163, 0.3);
  color: #1c3a63;
  border-radius: 12px;
  padding: 12px 16px;
  margin: 0 0 16px;
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 65ch;
}

.keeper-note b {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
  color: var(--c-info, #2b5fa3);
}

.factfile-body {
  max-width: 65ch;
  line-height: 1.75;
}

.didyou-card {
  background: #fff6e8;
  border: 1px solid #f0d9ae;
  color: #5c4200;
  border-radius: 12px;
  padding: 12px 16px;
  margin: 16px 0;
  font-size: 0.95rem;
  max-width: 65ch;
}

.didyou-card b {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
  color: #8f6400;
}

.iucn-block {
  margin: 18px 0 8px;
  max-width: 65ch;
}

.iucn-title {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.iucn-scale {
  display: flex;
  gap: 3px;
}

.iucn-scale i {
  flex: 1;
  height: 26px;
  border-radius: 5px;
  font-style: normal;
  font-size: 0.7rem;
  font-weight: 800;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.35;
}

.iucn-scale i.on {
  opacity: 1;
  outline: 2.5px solid currentColor;
  outline-offset: 2px;
  transform: scale(1.06);
}

.factfile-conservation {
  max-width: 65ch;
  font-size: 0.92rem;
  opacity: 0.92;
}

/* --- 3D: favourite heart ------------------------------------ */
.vote-container.vote-inline {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 2px auto 14px;
  width: 100%;
}

.fav-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--c-panel, #fff) !important;
  color: var(--c-ink, #22284b) !important;
  border: none;
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 1rem;
  font-weight: 750;
  cursor: pointer;
  box-shadow: var(--shadow-1, 0 1px 3px rgba(24, 35, 110, 0.14));
}

.fav-button .fav-heart {
  color: #de3a5e;
  font-size: 1.15rem;
  line-height: 1;
}

.fav-button.voted {
  cursor: default;
}

.fav-count.fav-pop {
  animation: fav-pop 0.45s ease;
}

@keyframes fav-pop {
  0% { transform: scale(1); }
  45% { transform: scale(1.6); }
  100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .fav-count.fav-pop { animation: none; }
}

.fav-reply {
  background: var(--c-panel, #fff);
  color: var(--c-ink, #22284b);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 0.9rem;
  font-weight: 650;
  box-shadow: var(--shadow-1, 0 1px 3px rgba(24, 35, 110, 0.14));
}

/* H1 (16 Oct 2026): the thanks is a speech bubble under the heart, out of
   the row, so the heart stays put; a few hearts float out as it lands */
.vote-container { position: relative; z-index: 20; }
.fav-button .fav-heart { display: inline-block; width: 1.1em; text-align: center; }
.fav-button .fav-count { font-variant-numeric: tabular-nums; }
.vote-container .fav-reply {
  position: absolute; top: calc(100% + 12px); right: 0; z-index: 3;
  width: max-content; max-width: min(240px, calc(100vw - 40px));
  background: #fff; color: #1d2433; border-radius: 14px; padding: 10px 14px;
  font-size: 15px; line-height: 1.3; font-weight: 650; text-align: left;
  box-shadow: 0 6px 20px rgba(10, 14, 25, 0.28);
  animation: fav-reply-in 0.35s cubic-bezier(.2, 1.4, .4, 1);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.vote-container .fav-reply::before {
  content: ""; position: absolute; top: -6px; right: 22px; width: 14px; height: 14px;
  background: #fff; transform: rotate(45deg); border-radius: 3px;
}
.vote-container .fav-reply small { display: block; font-size: 13px; font-weight: 500; color: #5a6275; margin-top: 2px; }
.vote-container .fav-reply--out { opacity: 0; transform: translateY(-6px); }
.vote-container.vote-inline .fav-reply { right: 50%; margin-right: -120px; }
.vote-container.vote-inline .fav-reply::before { right: 112px; }
@keyframes fav-reply-in { from { opacity: 0; transform: scale(0.6) translateY(-8px); } to { opacity: 1; transform: none; } }

.fav-float {
  position: absolute; left: 18px; top: 50%; z-index: 4; pointer-events: none;
  color: #ff5a7a; line-height: 1; opacity: 0; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  font-size: 20px; animation: fav-float 1.4s ease-out forwards;
}
@keyframes fav-float {
  0% { opacity: 0; transform: translate(0, -50%) scale(0.4); }
  15% { opacity: 1; transform: translate(calc(var(--dx) * 0.25), calc(-50% + var(--dy) * 0.25)) scale(1.15); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), calc(-50% + var(--dy))) scale(0.8); }
}
@media (prefers-reduced-motion: reduce) {
  .vote-container .fav-reply { animation: none; transition: none; }
  .fav-float { display: none; }
}

/* --- 3E: audio player ---------------------------------------- */
.audio-player-card {
  background: var(--c-panel, #fff);
  color: var(--c-ink, #22284b);
  border-radius: 16px;
  padding: 18px 20px;
  max-width: 480px;
  margin: 10px auto;
  box-shadow: var(--shadow-1, 0 1px 3px rgba(24, 35, 110, 0.12));
}

.audio-player-title {
  margin: 0 0 14px;
  font-size: 1.1rem;
  color: var(--c-ink, #22284b);
}

.audio-controls-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.audio-play-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: var(--c-navy, #18236e) !important;
  color: #fff !important;
  font-size: 1.15rem;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: var(--shadow-1, 0 1px 3px rgba(24, 35, 110, 0.2));
}

.audio-track {
  flex: 1;
  min-width: 0;
}

.audio-scrubber {
  width: 100%;
  accent-color: var(--c-navy, #18236e);
  cursor: pointer;
  margin: 0;
}

.audio-times {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--c-muted, #5f6689);
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}

.audio-skips {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 12px;
}

.audio-skip {
  background: var(--c-wash, #f4f5f9) !important;
  color: var(--c-navy, #18236e) !important;
  border: none;
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: none;
}

.audio-description {
  margin: 14px 0 0;
  font-size: 0.9rem;
  color: var(--c-muted, #5f6689);
  line-height: 1.6;
}

/* --- 6A: journey layer --------------------------------------- */
.journey-panel {
  display: flex;
  gap: 16px;
  align-items: center;
  background: var(--c-panel, #fff);
  color: var(--c-ink, #22284b);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-1, 0 1px 3px rgba(24, 35, 110, 0.12));
}

.journey-ring {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.journey-ring i {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--c-navy, #18236e);
}

.journey-ring i small {
  font-size: 0.7rem;
  color: var(--c-muted, #5f6689);
  font-weight: 700;
}

.journey-meta {
  min-width: 0;
}

.journey-meta > b {
  font-family: var(--font-display, 'Inter', sans-serif);
  display: block;
  margin-bottom: 6px;
}

.journey-zones {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.journey-zones .pill {
  font-size: 0.74rem;
  padding: 3px 10px;
}

.journey-share-btn {
  margin-top: 10px;
}

#journey-recap {
  position: fixed;
  inset: 0;
  background: rgba(12, 16, 42, 0.65);
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.recap-card {
  position: relative;
  background: #fff;
  color: var(--c-ink, #22284b);
  border-radius: 20px;
  padding: 26px 24px;
  max-width: 340px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-2, 0 4px 14px rgba(24, 35, 110, 0.3));
}

.recap-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--c-wash, #f4f5f9) !important;
  color: var(--c-muted, #5f6689) !important;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  padding: 0;
  cursor: pointer;
  box-shadow: none;
}

.recap-head b {
  font-family: var(--font-display, 'Inter', sans-serif);
  font-size: 1.15rem;
  display: block;
}

.recap-head small {
  color: var(--c-muted, #5f6689);
}

.recap-ring {
  margin: 16px auto 6px;
  width: 96px;
  height: 96px;
}

.recap-ring i {
  width: 72px;
  height: 72px;
  font-size: 1.25rem;
}

.recap-line {
  color: var(--c-muted, #5f6689);
  font-size: 0.9rem;
  margin: 4px 0 10px;
}

.recap-zones {
  justify-content: center;
  margin-bottom: 14px;
}

.recap-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Discovery layer (plan items 2A-2D, 3A) ------------------ */

/* 2A: the one-row site-wide bar, same element on every page */
/* Same pill layout as ever, but branded like the Discovery Hub: the site's
   header colour as the backdrop, white text, amber ring. --disc-brand is set
   from the runtime theme by v2-config. */
.discovery-bar {
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: 520px;
  /* main's 20px top padding above; 20px below (collapses with the back
     button's 10px top margin) — the bar sits evenly between the header
     and what follows */
  margin: 0 auto 20px;
  background: var(--disc-brand, var(--c-navy, #18236e));
  color: #fff !important;
  border-radius: 999px;
  padding: 6px 14px 6px 7px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.88rem;
  box-shadow: var(--shadow-1, 0 1px 3px rgba(24, 35, 110, 0.12));
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.discovery-bar:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-2, 0 4px 14px rgba(24, 35, 110, 0.16));
}

.disc-ring {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.disc-ring i {
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: var(--disc-brand, var(--c-navy, #18236e));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
  font-size: 0.5rem;
  font-weight: 800;
}

.disc-text b {
  display: block;
  font-family: var(--font-display, 'Inter', sans-serif);
  font-size: 0.92rem;
  line-height: 1.2;
  color: #fff;
}

.disc-text small {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.2;
}

.disc-newest {
  margin-left: auto;
  letter-spacing: -2px;
  font-size: 0.95rem;
}

.discovery-bar .disc-chev {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.25rem;
  line-height: 1;
}

.discovery-bar .disc-newest + .disc-chev {
  margin-left: 4px;
}

.discovery-bar .disc-text + .disc-chev {
  margin-left: auto;
}

/* Wall displays: personal discovery is meaningless on a kiosk */
body.kiosk .discovery-bar,
body.kiosk #badge-toast {
  display: none;
}

/* 2B: the hub */
.discovery-hub {
  max-width: 520px;
  margin: 0 auto;
  padding: 4px;
}

.disc-hero {
  background: var(--c-panel, #fff);
  border-radius: 16px;
  padding: 20px 16px 16px;
  text-align: center;
  box-shadow: var(--shadow-1, 0 1px 3px rgba(24, 35, 110, 0.12));
  margin-bottom: 12px;
}

.disc-hero h2 {
  font-family: var(--font-display, 'Inter', sans-serif);
  font-size: 1.25rem;
  margin: 12px 0 2px;
  color: var(--c-ink, #22284b);
}

.disc-hero-ring {
  width: 118px;
  height: 118px;
  border-radius: 50%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.disc-hero-ring i {
  width: 94px;
  height: 94px;
  border-radius: 50%;
  background: var(--c-panel, #fff);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-style: normal;
}

.disc-hero-ring b {
  font-family: var(--font-display, 'Inter', sans-serif);
  font-size: 1.5rem;
  line-height: 1;
  color: var(--c-ink, #22284b);
}

.disc-hero-ring b small {
  font-size: 0.8rem;
  opacity: 0.7;
}

.disc-hero-ring i > span {
  font-size: 0.62rem;
  color: var(--c-muted, #5f6689);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.disc-visit-line {
  margin: 2px 0 0;
  font-size: 0.85rem;
  color: var(--c-muted, #5f6689);
}

.disc-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin-bottom: 12px; /* matches the hub's other card gaps */
}

.disc-tile {
  background: var(--c-panel, #fff);
  border-radius: 13px;
  padding: 10px 6px 8px;
  text-align: center;
  box-shadow: var(--shadow-1, 0 1px 3px rgba(24, 35, 110, 0.12));
}

.disc-tile em {
  font-style: normal;
  font-size: 1.25rem;
  display: block;
}

.disc-tile b {
  display: block;
  font-family: var(--font-display, 'Inter', sans-serif);
  font-size: 1.05rem;
  color: var(--c-ink, #22284b);
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
}

.disc-tile small {
  font-size: 0.62rem;
  color: var(--c-muted, #5f6689);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.disc-sec {
  font-family: var(--font-display, 'Inter', sans-serif);
  font-size: 1rem;
  color: var(--c-ink, #22284b);
  margin: 16px 2px 8px;
  text-align: left;
}

/* 2C: badge case — earned badges celebrate (green tint + solid border),
   locked ones read as empty slots (dashed outline, grey emoji) */
.disc-badges {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.disc-badge {
  border-radius: 13px;
  padding: 9px 6px 8px;
  text-align: center;
  background: var(--c-good-bg, #e7f4ec);
  border: 1.5px solid rgba(30, 122, 69, 0.4);
  box-shadow: var(--shadow-1, 0 1px 3px rgba(24, 35, 110, 0.12));
}

.disc-badge em {
  font-style: normal;
  font-size: 1.35rem;
  display: block;
}

.disc-badge b {
  display: block;
  font-size: 0.72rem;
  color: var(--c-ink, #22284b);
  line-height: 1.25;
}

.disc-badge small {
  display: block;
  font-size: 0.62rem;
  color: var(--c-good, #1e7a45);
  font-weight: 700;
  line-height: 1.3;
}

.disc-badge.locked {
  background: rgba(255, 255, 255, 0.55);
  border: 1.5px dashed #9fbdd4;
  box-shadow: none;
}

.disc-badge.locked em {
  filter: grayscale(1);
  opacity: 0.55;
}

.disc-badge.locked b {
  color: var(--c-muted, #5f6689);
}

.disc-badge.locked small {
  color: var(--c-muted, #5f6689);
  font-weight: 400;
}

.disc-badge[role="button"] {
  cursor: pointer;
}

.disc-badge[role="button"]:focus-visible {
  outline: 3px solid var(--c-navy, #18236e);
  outline-offset: 2px;
}

/* Badge story card — tap any badge for the how and the when */
#badge-modal {
  position: fixed;
  inset: 0;
  z-index: 1300;
  background: rgba(16, 22, 46, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.badge-modal-card {
  position: relative;
  background: var(--c-panel, #fff);
  color: var(--c-ink, #22284b);
  border-radius: 18px;
  padding: 26px 22px 22px;
  max-width: 320px;
  width: 100%;
  text-align: center;
  box-shadow: 0 18px 46px rgba(16, 19, 31, 0.4);
  animation: badge-modal-in 0.25s ease;
}

.badge-modal-card em {
  font-style: normal;
  font-size: 2.6rem;
  display: block;
}

.badge-modal-card.locked em {
  filter: grayscale(1);
  opacity: 0.55;
}

.badge-modal-card b {
  display: block;
  font-family: var(--font-display, 'Inter', sans-serif);
  font-size: 1.25rem;
  margin-top: 4px;
}

.badge-modal-status {
  display: inline-block;
  margin: 7px 0 4px;
  background: var(--c-good-bg, #e7f4ec);
  color: var(--c-good, #1e7a45);
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 0.8rem;
  font-weight: 700;
}

.badge-modal-card.locked .badge-modal-status {
  background: rgba(127, 132, 156, 0.16);
  color: var(--c-muted, #5f6689);
}

.badge-modal-card p {
  margin: 6px 0 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--c-ink, #22284b);
}

.badge-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(127, 132, 156, 0.14);
  color: var(--c-ink, #22284b);
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  padding: 0;
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
}

@keyframes badge-modal-in {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .badge-modal-card { animation: none; }
}

/* 2D: per-exhibit progress */
.disc-zones {
  display: block;
}

/* display:block above would defeat the hidden attribute without this */
.disc-zones[hidden] {
  display: none;
}

.disc-zone {
  display: block;
  background: var(--c-panel, #fff);
  border-radius: 12px;
  padding: 9px 13px 11px;
  margin-bottom: 8px;
  text-decoration: none;
  box-shadow: var(--shadow-1, 0 1px 3px rgba(24, 35, 110, 0.12));
}

.disc-zone .t {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--c-ink, #22284b);
  margin-bottom: 5px;
}

.disc-zone .t small {
  color: var(--c-muted, #5f6689);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.disc-track {
  display: block;
  height: 7px;
  border-radius: 5px;
  background: #d9e8f5;
  overflow: hidden;
}

.disc-track i {
  display: block;
  height: 100%;
  border-radius: 5px;
  background: var(--c-navy, #18236e);
}

.disc-track i.done {
  background: var(--c-good, #1e7a45);
}

.disc-all-btn,
.disc-share-btn {
  display: block;
  width: 100%;
  margin-top: 4px;
}

.disc-share-btn {
  margin-top: 10px;
}

/* 3A: badge unlock toast */
/* Badge pop-ups (Oct 2026): one brand-colour bar for everyday badges, the
   exhibit welcome and (inline) Perfect Score; a "badge moment" card for the
   big five. Page: claude.ai/artifact/Us1DeRUseEZQPMS54NMghF */
.badge-bar { display: flex; align-items: center; gap: 12px; background: var(--disc-brand, #18236e); color: #fff !important; text-decoration: none !important; border-radius: 20px; padding: 12px 14px; box-shadow: 0 10px 26px rgba(0, 0, 0, 0.3); font-family: inherit; text-align: left; }
#badge-toast.badge-bar { position: fixed; left: 14px; right: 14px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 1200; max-width: 440px; margin: 0 auto; cursor: pointer; animation: badge-bar-in 0.4s cubic-bezier(.2, .9, .3, 1.2); }
/* the bar takes the bottom of the screen, so the Scan button steps aside while it's up */
#qr-icon { transition: opacity 0.25s ease, transform 0.25s ease; }
body.badge-bar-up #qr-icon { opacity: 0; transform: scale(0.85); pointer-events: none; }
.badge-bar--inline { margin-top: 12px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15); }
.bb-disc { flex: none; width: 46px; height: 46px; border-radius: 50%; background: var(--disc-accent, #ffb703); display: flex; align-items: center; justify-content: center; font-size: 24px; line-height: 1; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9); }
.bb-t { flex: 1; min-width: 0; }
.bb-t small { display: block; font-weight: 700; font-size: 11px; line-height: 1.2; letter-spacing: 0.09em; text-transform: uppercase; color: var(--disc-accent, #ffb703); }
.bb-t b { display: block; font-weight: 800; font-size: 17px; line-height: 1.2; margin-top: 2px; }
.badge-bar .bb-t b, .badge-bar .bb-t > span { color: #fff !important; }
.bb-t > span { display: block; font-size: 13px; line-height: 1.3; opacity: 0.8; margin-top: 2px; }
.bb-go { flex: none; background: var(--disc-accent, #ffb703); color: var(--disc-brand, #18236e); border-radius: 999px; padding: 9px 13px; font-weight: 800; font-size: 14px; line-height: 1; white-space: nowrap; }
#badge-toast.gone { opacity: 0; transform: translateY(16px); transition: opacity 0.4s ease, transform 0.4s ease; }
@keyframes badge-bar-in { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

#badge-moment { position: fixed; inset: 0; z-index: 1300; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(8, 12, 24, 0.55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: bm-fade 0.3s ease; }
#badge-moment.gone { opacity: 0; transition: opacity 0.3s ease; }
.bm-card:focus { outline: none; }
.bm-card { width: min(340px, 100%); background: var(--disc-brand, #18236e); color: #fff; border-radius: 26px; padding: 22px 22px 14px; text-align: center; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45); animation: bm-pop 0.45s cubic-bezier(.2, .9, .3, 1.25); font-family: inherit; }
.bm-medal { position: relative; width: 160px; height: 160px; margin: -4px auto 6px; }
.bm-medal svg { position: absolute; inset: 0; width: 160px; height: 160px; animation: bm-spin 18s linear infinite; }
.bm-medal line { stroke: var(--disc-accent, #ffb703); stroke-width: 4; stroke-linecap: round; }
.bm-medal .bb-disc { position: absolute; left: 30px; top: 30px; width: 100px; height: 100px; font-size: 52px; box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.9), 0 8px 20px rgba(0, 0, 0, 0.3); }
.bm-card > small { display: inline-block; background: var(--disc-accent, #ffb703); color: var(--disc-brand, #18236e); border-radius: 999px; padding: 6px 10px; font-weight: 800; font-size: 11px; line-height: 1; letter-spacing: 0.1em; text-transform: uppercase; }
.bm-card > b { display: block; font-weight: 800; font-size: 26px; line-height: 1.15; margin-top: 10px; }
.bm-card > p { margin: 8px 0 0; font-size: 15px; line-height: 1.45; opacity: 0.88; color: #fff; }
.bm-card > p.bm-reward { opacity: 1; font-weight: 700; }
.bm-count { display: block; margin-top: 10px; font-size: 13px; font-weight: 700; color: var(--disc-accent, #ffb703); }
.bm-go { display: block; margin-top: 16px; background: var(--disc-accent, #ffb703); color: var(--disc-brand, #18236e) !important; text-decoration: none !important; border-radius: 999px; padding: 14px; font-weight: 800; font-size: 16px; line-height: 1; }
.bm-later { display: block; width: 100%; margin-top: 4px; background: none !important; border: 0 !important; box-shadow: none !important; color: #fff !important; font: inherit; font-weight: 700; font-size: 15px; padding: 12px !important; opacity: 0.85; cursor: pointer; }
.bm-go:focus-visible, .bm-later:focus-visible, #badge-toast:focus-visible { outline: 3px solid var(--disc-accent, #ffb703); outline-offset: 3px; }
@keyframes bm-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes bm-pop { from { transform: scale(0.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes bm-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  #badge-toast, #badge-moment, .bm-card, .bm-medal svg { animation: none !important; }
}

/* 3B: badges on the share recap */
.recap-badges {
  font-size: 1.3rem;
  letter-spacing: 2px;
  margin: 6px 0 0;
}

/* --- Talk times & experiences as cards (get-started) --------- */
.talk-card {
  display: flex;
  align-items: center;
  gap: 11px;
  background: var(--c-panel, #fff);
  border-radius: 12px;
  padding: 9px 12px;
  margin-bottom: 8px;
  text-align: left;
  box-shadow: var(--shadow-1, 0 1px 3px rgba(24, 35, 110, 0.12));
}

.talk-thumb {
  width: 42px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
}

/* Sprite icon thumbs (clock / ticket) — same kit as the dashboard */
.talk-thumb .icn {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--c-navy, #18236e);
}

.talk-card.talk-empty .talk-thumb .icn {
  color: var(--c-muted, #5f6689);
}

.talk-info {
  min-width: 0;
}

.talk-info b {
  display: block;
  font-family: var(--font-display, 'Inter', sans-serif);
  font-size: 0.98rem;
  color: var(--c-ink, #22284b);
  line-height: 1.3;
}

.talk-info small {
  display: block;
  font-size: 0.82rem;
  color: var(--c-muted, #5f6689);
}

.talk-card .talk-next-badge,
.talk-card .talk-done-label {
  margin-left: auto;
}

.talk-card.talk-past {
  opacity: 0.5;
}

/* .btn class opts the link out of the theme's a:not(.btn) colour repaint;
   the scoped selector outranks foundation's .btn sizing */
.talk-card .talk-book-btn {
  margin-left: auto;
  background: var(--c-navy, #18236e);
  color: #fff !important;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

/* ---- Get Started page: talk & experience cards as translucent brand panels,
   matching the welcome-mat steps + discovery bar. Scoped to .gs-page so the
   404 / team pages (which also use these classes) keep their light styling.
   --wm-brand / --wm-accent come from welcome-mat.css, loaded on this page. ---- */
body.gs-page .advert-card {
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: none;
  border-radius: 16px;
  padding: 14px 15px 8px;
  max-width: 440px;
}
body.gs-page .advert-card h2 {
  color: var(--wm-accent, #ffb703);
  margin: 0 0 4px;
  font-size: 1.05rem;
  text-align: left;
}
/* rows lose their white card + shadow; hairline divider between them */
body.gs-page .talk-card {
  background: none;
  box-shadow: none;
  border-radius: 0;
  padding: 10px 0;
  margin: 0;
  gap: 12px;
}
body.gs-page .talk-card + .talk-card {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
/* bare amber icon, tucked hard left (no disc) so long names get the width */
body.gs-page .talk-thumb {
  flex: 0 0 auto;
  width: auto;
}
body.gs-page .talk-thumb .icn {
  width: 23px;
  height: 23px;
  color: var(--wm-accent, #ffb703);
}
body.gs-page .talk-info { text-align: left; }
body.gs-page .talk-info b { color: #fff; }
body.gs-page .talk-info small { color: rgba(255, 255, 255, 0.68); }
body.gs-page .talk-card.talk-empty .talk-thumb .icn { color: rgba(255, 255, 255, 0.6); }
/* next = white chip; finished = quiet tint (both replace the light-page orange/grey) */
body.gs-page .talk-next-badge {
  background: #fff;
  color: var(--wm-brand, #18236e);
}
body.gs-page .talk-done-label {
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.82);
  opacity: 1;
}
body.gs-page .talk-card .talk-book-btn {
  background: #fff;
  color: var(--wm-brand, #18236e) !important;
}

/* --- Discovery I1: since your last visit --------------------- */
.disc-new,
.disc-trail {
  background: var(--c-panel, #fff);
  border-radius: 13px;
  padding: 11px 13px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-1, 0 1px 3px rgba(24, 35, 110, 0.12));
}

.disc-block-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display, 'Inter', sans-serif);
  font-weight: 600;
  font-size: 1rem;
  color: var(--c-ink, #22284b);
  margin-bottom: 8px;
}

.disc-new-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 2px;
  text-decoration: none;
}

.disc-new-thumb {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  background: linear-gradient(135deg, var(--c-navy, #18236e), #2a4a9e);
}

.disc-new-info {
  min-width: 0;
}

.disc-new-info b {
  display: block;
  font-family: var(--font-display, 'Inter', sans-serif);
  font-size: 0.95rem;
  color: var(--c-ink, #22284b) !important;
  line-height: 1.3;
}

.disc-new-info small {
  display: block;
  color: var(--c-muted, #5f6689) !important;
  font-size: 0.78rem;
}

.disc-new-pill {
  margin-left: auto;
  background: #fdf3dd;
  border: 1px solid #e8c988;
  color: #8f6400;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 2px 9px;
  flex-shrink: 0;
}

.disc-block-note {
  font-size: 0.75rem;
  color: var(--c-muted, #5f6689);
  margin: 6px 0 0;
}

/* --- Discovery I3: today's trail (stops are NOT links) ------- */
.disc-trail-count {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--c-muted, #5f6689);
}

.disc-trail-track {
  display: block;
  margin-bottom: 8px;
}

.disc-stop {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 2px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--c-ink, #22284b);
}

.disc-stop i {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  flex-shrink: 0;
  font-style: normal;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.disc-stop:not(.done) i {
  border: 2px dashed #9fbdd4;
}

.disc-stop.done i {
  background: var(--c-good, #1e7a45);
  color: #fff;
}

.disc-stop.done {
  opacity: 0.55;
}

.disc-stop small {
  color: var(--c-muted, #5f6689);
  font-weight: 500;
}

.disc-trail-reward {
  background: #fdf3dd;
  border: 1px solid #e8c988;
  color: #8f6400;
  border-radius: 10px;
  padding: 7px 10px;
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
  margin-top: 8px;
}

.disc-trail-reward.done {
  background: var(--c-good-bg, #e7f4ec);
  border-color: rgba(30, 122, 69, 0.4);
  color: var(--c-good, #1e7a45);
}

/* --- Discovery I4: next-best-action nudge -------------------- */
/* Rendered as a pill beside the "x of y viewed" badge — same family */
.exhibit-progress {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

a.disc-nudge {
  text-decoration: none;
  cursor: pointer;
}

/* --- Discovery 4B: rewards ----------------------------------- */
/* an earned, unclaimed reward badge goes gold */
.disc-badge.reward {
  background: #fdf3dd;
  border-color: #e8c988;
}

.disc-badge.reward small {
  color: #8f6400;
}

.disc-reward-panel {
  background: #fdf3dd;
  border: 1.5px solid #e8c988;
  border-radius: 12px;
  padding: 9px 12px;
  margin-top: 10px;
}

.disc-reward-panel b {
  display: block;
  font-size: 0.9rem;
  color: #5c4200;
}

.disc-reward-panel small {
  display: block;
  color: #8f6400;
  font-size: 0.75rem;
  margin-top: 2px;
}

.disc-reward-panel.claimed {
  background: var(--c-good-bg, #e7f4ec);
  border-color: rgba(30, 122, 69, 0.4);
}

.disc-reward-panel.claimed b {
  color: var(--c-good, #1e7a45);
}

.disc-reward-panel.claimed small {
  color: var(--c-muted, #5f6689);
}

.disc-reward-panel.teaser {
  background: transparent;
  border-style: dashed;
  padding: 6px 10px;
}

.disc-claim-btn {
  display: block;
  width: 100%;
  margin-top: 9px;
  background: #fff;
  border: 1.5px dashed #9fbdd4;
  color: #5c6480;
  border-radius: 10px;
  padding: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

/* --- IUCN explainer modal (opened from the fact-file scale) --- */
.iucn-block {
  cursor: pointer;
}

.iucn-block:focus-visible {
  outline: 3px solid var(--c-navy, #18236e);
  outline-offset: 3px;
  border-radius: 6px;
}

.iucn-info-hint {
  opacity: 0.55;
  font-weight: 400;
  font-size: 0.85em;
}

#iucn-modal {
  position: fixed;
  inset: 0;
  z-index: 1300;
  background: rgba(16, 22, 46, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.iucn-modal-card {
  position: relative;
  background: var(--c-panel, #fff);
  color: var(--c-ink, #22284b);
  border-radius: 18px;
  padding: 22px 18px 16px;
  max-width: 380px;
  width: 100%;
  max-height: 84vh;
  overflow-y: auto;
  box-shadow: 0 18px 46px rgba(16, 19, 31, 0.4);
}

.iucn-modal-title {
  display: block;
  font-family: var(--font-display, 'Inter', sans-serif);
  font-size: 1.15rem;
}

.iucn-modal-sub {
  margin: 2px 0 12px;
  font-size: 0.82rem;
  color: var(--c-muted, #5f6689);
}

.iucn-expl-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 10px;
  margin-bottom: 2px;
}

.iucn-expl-row.on {
  background: var(--c-wash, #eef3fa);
  outline: 2px solid var(--c-navy, #18236e);
}

.iucn-expl-row i {
  width: 34px;
  flex-shrink: 0;
  border-radius: 6px;
  color: #fff;
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 800;
  text-align: center;
  padding: 3px 0;
  margin-top: 2px;
}

.iucn-expl-row b {
  display: block;
  font-size: 0.88rem;
  line-height: 1.3;
}

.iucn-expl-row small {
  display: block;
  font-size: 0.78rem;
  color: var(--c-muted, #5f6689);
  line-height: 1.4;
}

/* Non-tappable closer for the explored-exhibits list */
.disc-zone-teaser {
  border: 1.5px dashed #9fbdd4;
  border-radius: 12px;
  padding: 10px 13px;
  text-align: center;
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--c-muted, #5f6689);
  margin-bottom: 8px;
}

/* ===================================================================
   Discovery Hub — restyled to the Get Started brand surface. The page is
   painted with the header (brand) colour + white text by setBodyStyles
   (view=discovery); these rules turn the white cards into translucent
   brand panels with amber accents. .disc-* classes are hub-only, so this
   is scoped to body.discovery-view.
   =================================================================== */
body.discovery-view .discovery-hub { color: #fff; }

/* Hero — panel-less on the brand surface */
body.discovery-view .disc-hero { background: none; box-shadow: none; border-radius: 0; padding: 8px 0 4px; margin-bottom: 0; }
body.discovery-view .disc-hero h2 { color: #fff; }

/* Large page title above the gauge */
body.discovery-view .disc-title {
  text-align: center;
  font-family: var(--font-display, 'Inter', sans-serif);
  font-size: 2.1rem;
  font-weight: 600;
  color: var(--disc-accent, #ffb703);
  margin: 6px 0 10px;
}
body.discovery-view .disc-hero-ring i { background: var(--disc-brand, #18236e); }
body.discovery-view .disc-hero-ring b { color: #fff; }
body.discovery-view .disc-hero-ring i > span { color: rgba(255, 255, 255, 0.68); }
body.discovery-view .disc-visit-line { color: rgba(255, 255, 255, 0.68); }

/* Grouped panels (Your history / Since your last visit / Today's trail) */
body.discovery-view .disc-record,
body.discovery-view .disc-new,
body.discovery-view .disc-trail {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: none;
  border-radius: 16px;
}
body.discovery-view .disc-record { padding: 12px 14px 14px; margin: 18px 0 0; }
body.discovery-view .disc-block-head { color: var(--disc-accent, #ffb703); }

/* Your history — stats as plain cells inside the box */
body.discovery-view .disc-tiles { margin: 10px 0 0; gap: 6px; }
body.discovery-view .disc-tile { background: none; border: none; box-shadow: none; padding: 8px 4px; }
body.discovery-view .disc-tile b { color: #fff; }
body.discovery-view .disc-tile small { color: rgba(255, 255, 255, 0.68); }

/* Section headings — amber */
body.discovery-view .disc-sec { color: var(--disc-accent, #ffb703); }

/* Since your last visit */
body.discovery-view .disc-new-row { border-top: 1px solid rgba(255, 255, 255, 0.1); }
body.discovery-view .disc-new-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 50%; }
body.discovery-view .disc-new-info b { color: #fff !important; }
body.discovery-view .disc-new-info small { color: rgba(255, 255, 255, 0.68) !important; }
body.discovery-view .disc-new-pill { background: var(--disc-accent, #ffb703); border: none; color: var(--disc-brand, #18236e); }
body.discovery-view .disc-block-note { color: rgba(255, 255, 255, 0.68); }

/* Today's trail */
body.discovery-view .disc-trail-count { background: var(--disc-accent, #ffb703); color: var(--disc-brand, #18236e); border-radius: 999px; padding: 2px 10px; font-size: 0.72rem; }
body.discovery-view .disc-stop { color: #fff; }
body.discovery-view .disc-stop:not(.done) i { border: 1.5px solid rgba(255, 255, 255, 0.3); }
body.discovery-view .disc-stop.done i { background: var(--disc-accent, #ffb703); color: var(--disc-brand, #18236e); }
body.discovery-view .disc-stop small { color: rgba(255, 255, 255, 0.68); }
body.discovery-view .disc-trail-reward { background: rgba(255, 183, 3, 0.14); background: color-mix(in srgb, var(--disc-accent, #ffb703) 14%, transparent); border: 1px solid rgba(255, 183, 3, 0.4); border: 1px solid color-mix(in srgb, var(--disc-accent, #ffb703) 40%, transparent); color: var(--disc-accent, #ffb703); }
body.discovery-view .disc-trail-reward.done { background: rgba(255, 183, 3, 0.22); background: color-mix(in srgb, var(--disc-accent, #ffb703) 22%, transparent); border-color: rgba(255, 183, 3, 0.6); border-color: color-mix(in srgb, var(--disc-accent, #ffb703) 60%, transparent); color: var(--disc-accent, #ffb703); }

/* Badge case — earned wears warm amber, locked reads as a dashed slot */
body.discovery-view .disc-badge { background: rgba(255, 183, 3, 0.14); background: color-mix(in srgb, var(--disc-accent, #ffb703) 14%, transparent); border: 1.5px solid rgba(255, 183, 3, 0.55); border: 1.5px solid color-mix(in srgb, var(--disc-accent, #ffb703) 55%, transparent); box-shadow: none; }
body.discovery-view .disc-badge b { color: #fff; }
body.discovery-view .disc-badge small { color: var(--disc-accent, #ffb703); }
body.discovery-view .disc-badge.locked { background: rgba(255, 255, 255, 0.05); border: 1.5px dashed rgba(255, 255, 255, 0.28); }
body.discovery-view .disc-badge.locked b,
body.discovery-view .disc-badge.locked small { color: rgba(255, 255, 255, 0.68); }

/* Explored exhibits */
body.discovery-view .disc-zone { background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.16); box-shadow: none; }
body.discovery-view .disc-zone .t { color: #fff; }
body.discovery-view .disc-zone .t small { color: rgba(255, 255, 255, 0.68); }
body.discovery-view .disc-track { background: rgba(255, 255, 255, 0.16); }
body.discovery-view .disc-track i,
body.discovery-view .disc-track i.done { background: var(--disc-accent, #ffb703); }
body.discovery-view .disc-zone-teaser { border: none; padding: 4px 0 0; color: rgba(255, 255, 255, 0.68); }

/* Hub, Oct 2026 (H2-H4): in line with the redesigned fact file and progress
   card. H2: earned badges on a solid amber disc in an amber-edged card; the
   rest on a white disc with the emoji in grey (it was nearly invisible). */
body.discovery-view .disc-badge { background: rgba(255, 183, 3, 0.12); background: color-mix(in srgb, var(--disc-accent, #ffb703) 12%, transparent); border: 2px solid var(--disc-accent, #ffb703); }
body.discovery-view .disc-badge em { display: flex; align-items: center; justify-content: center; width: 46px; height: 46px; margin: 0 auto 6px; border-radius: 50%; background: var(--disc-accent, #ffb703); font-size: 23px; font-style: normal; filter: none; opacity: 1; }
body.discovery-view .disc-badge.locked { background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.14); }
body.discovery-view .disc-badge.locked em { background: rgba(255, 255, 255, 0.92); filter: grayscale(1); opacity: 0.6; }
/* H3: found trail stops keep full strength with an amber tick and are
   struck through; the reward line is a solid amber pill */
body.discovery-view .disc-stop:not(.done) i { border: 2px solid rgba(255, 255, 255, 0.45); }
body.discovery-view .disc-stop.done { opacity: 1; }
/* one strike line in the site accent through the name and the smaller
   exhibit name alike (a text-decoration draws two, one per font size);
   drawn per line so it follows a wrapped stop */
body.discovery-view .disc-stop.done .disc-stop-t { color: rgba(255, 255, 255, 0.75); background: linear-gradient(var(--disc-accent, #ffb703), var(--disc-accent, #ffb703)) 0 56% / 100% 2.5px no-repeat; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
body.discovery-view .disc-trail-reward, body.discovery-view .disc-trail-reward.done { background: var(--disc-accent, #ffb703); border: 0; border-radius: 999px; color: var(--disc-brand, #18236e); font-weight: 800; }
/* H4: explored exhibits as "Keep exploring" cards */
body.discovery-view .disc-zone { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.disc-zone-t { flex: 1; min-width: 0; }
.disc-zone-t small { display: block; font-weight: 700; font-size: 11px; line-height: 1.2; letter-spacing: 0.09em; text-transform: uppercase; color: var(--disc-accent, #ffb703); }
.disc-zone-t b { display: block; margin: 2px 0 8px; font-weight: 800; font-size: 16px; line-height: 1.25; color: #fff; }
.disc-zone-thumbs { display: flex; }
.disc-zone-thumbs img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 2px solid var(--disc-brand, #18236e); margin-left: -10px; background: #334; }
.disc-zone-thumbs img:first-child { margin-left: 0; }
.disc-zone-done { flex: 0 0 34px; height: 34px; border-radius: 50%; background: var(--disc-accent, #ffb703); color: var(--disc-brand, #18236e); display: flex; align-items: center; justify-content: center; font-weight: 900; }
.disc-zone-chev { font-weight: 700; font-size: 22px; line-height: 1; color: rgba(255, 255, 255, 0.7); }

/* Share button — amber pill */
body.discovery-view .disc-share-btn.btn { background: var(--disc-accent, #ffb703) !important; color: var(--disc-brand, #18236e) !important; border-radius: 999px; }

/* Empty state (brand-new visitor) reads on the brand surface */
body.discovery-view .empty-state { background: none; box-shadow: none; border: none; }
body.discovery-view .empty-state h3,
body.discovery-view .empty-state p { color: #fff; }
body.discovery-view .empty-state .empty-browse { background: var(--disc-accent, #ffb703); color: var(--disc-brand, #18236e); }

/* Hub chrome + vertical rhythm: hide the page header (the hero leads), give
   the stacked cards and section titles more room to breathe. */
body.discovery-view header { display: none; }
body.discovery-view .disc-new,
body.discovery-view .disc-trail { margin: 18px 0 0; }
body.discovery-view .disc-sec { margin-top: 26px; }

/* Back button — a translucent pill like the prototype, top-left above the hero */
body.discovery-view #back-button-container {
  max-width: 520px;
  margin: 0 auto 6px !important;
  padding: 0 4px;
  text-align: left !important;
}
/* The theme engine paints plain <button>s with an inline navy bg + 8px radius
   (v2-config), which on the navy hub is an invisible square. These !important
   rules override those inline styles into a visible translucent pill. */
body.discovery-view .back-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.18) !important;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
  border-radius: 999px !important;
  color: #fff !important;
  padding: 8px 16px 8px 13px !important;
  font-family: var(--font-display, 'Inter', sans-serif);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
}

/* Fuller bleed — less edge padding, closer to the preview */
body.discovery-view main { padding: 14px 12px 32px; }

/* Your-history stats use Lucide sprite icons in amber (not emoji) */
body.discovery-view .disc-tile-ic { display: block; line-height: 0; margin-bottom: 4px; }
body.discovery-view .disc-tile-ic .icn {
  width: 26px; height: 26px; color: var(--disc-accent, #ffb703);
  display: inline-block; vertical-align: middle;
}

/* "Since your last visit" thumbs use sprite icons */
body.discovery-view .disc-new-thumb .icn { width: 20px; height: 20px; color: var(--disc-accent, #ffb703); }
/* inline binoculars in the "more zones" teaser + the empty-state compass */
body.discovery-view .disc-zone-teaser .icn { width: 1.2em; height: 1.2em; color: var(--disc-accent, #ffb703); vertical-align: -0.25em; margin-left: 3px; }
body.discovery-view .empty-state .empty-emoji .icn { width: 48px; height: 48px; color: var(--disc-accent, #ffb703); }

/* Badge story modal — brand surface, amber status */
body.discovery-view #badge-modal .badge-modal-card {
  background: var(--disc-brand, #18236e);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.16);
}
body.discovery-view #badge-modal .badge-modal-card b { color: #fff; }
body.discovery-view #badge-modal .badge-modal-card p { color: rgba(255, 255, 255, 0.8); }
body.discovery-view #badge-modal .badge-modal-status { background: rgba(255, 183, 3, 0.18); background: color-mix(in srgb, var(--disc-accent, #ffb703) 18%, transparent); color: var(--disc-accent, #ffb703); }
body.discovery-view #badge-modal .badge-modal-card.locked .badge-modal-status { background: rgba(255, 255, 255, 0.1); color: rgba(255, 255, 255, 0.65); }
body.discovery-view #badge-modal .badge-modal-close { background: rgba(255, 255, 255, 0.12); color: #fff; }
body.discovery-view #badge-modal .disc-reward-panel { background: rgba(255, 183, 3, 0.14); background: color-mix(in srgb, var(--disc-accent, #ffb703) 14%, transparent); border-color: rgba(255, 183, 3, 0.4); border-color: color-mix(in srgb, var(--disc-accent, #ffb703) 40%, transparent); color: var(--disc-accent, #ffb703); }
body.discovery-view #badge-modal .disc-reward-panel small { color: rgba(255, 255, 255, 0.72); }

/* Share recap card — branded to the discovery hub (navy + amber). Scoped to
   #journey-recap so it applies wherever the recap is opened. */
#journey-recap .recap-card { background: var(--disc-brand, #18236e); color: #fff; border: 1px solid rgba(255, 255, 255, 0.16); }
#journey-recap .recap-close { background: rgba(255, 255, 255, 0.12) !important; color: #fff !important; }
#journey-recap .recap-head small { color: rgba(255, 255, 255, 0.7); }
#journey-recap .recap-ring i { background: var(--disc-brand, #18236e); color: #fff; }
#journey-recap .recap-line { color: rgba(255, 255, 255, 0.75); }
#journey-recap .recap-zones .pill { background: rgba(255, 255, 255, 0.1); color: #fff; border-color: rgba(255, 255, 255, 0.16); }
#journey-recap .recap-zones .pill-good { background: rgba(255, 183, 3, 0.18); background: color-mix(in srgb, var(--disc-accent, #ffb703) 18%, transparent); color: var(--disc-accent, #ffb703); }
#journey-recap .recap-share { background: var(--disc-accent, #ffb703) !important; color: var(--disc-brand, #18236e) !important; }
#journey-recap .recap-save,
#journey-recap .recap-copy { background: rgba(255, 255, 255, 0.08) !important; color: #fff !important; border: 1px solid rgba(255, 255, 255, 0.16) !important; }

/* D-C: the scan greeting shares the toast look but isn't tappable */

/* --- Experience booking cards on exhibit + fact-file pages (E-C) --- */
a.exp-card {
  text-decoration: none;
}

.exp-card .talk-book-btn {
  margin-left: auto;
  background: var(--c-navy, #18236e);
  color: #fff !important;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.exp-card-compact {
  margin-top: 16px;
  max-width: 65ch;
}

/* ---- Appeals (AP1-3, AP1-4): the donation card and the donate sheet ---- */
.appeal-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 520px;
  margin: 14px 0;
  padding: 16px 16px 14px;
  background: var(--c-panel, #fff);
  color: var(--c-ink, #22284b);
  border: 1px solid var(--c-line, #e3e6f0);
  border-radius: 14px;
  box-shadow: var(--shadow-1, 0 1px 3px rgba(24, 35, 110, 0.12));
  text-align: left;
}

.appeal-tag {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--disc-brand, var(--c-navy, #18236e));
  background: var(--c-wash, #f4f5f9);
  border-radius: 999px;
  padding: 2px 10px;
}

.appeal-headline {
  font-family: var(--font-display, 'Inter', sans-serif);
  font-size: 1.1rem;
  line-height: 1.3;
}

.appeal-card .appeal-summary,
.appeal-card .appeal-payee {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

.appeal-payee {
  color: var(--c-muted, #5f6689);
  font-size: 0.82rem;
}

.appeal-progress {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.appeal-progress[hidden] {
  display: none;
}

.appeal-meter {
  height: 8px;
  border-radius: 999px;
  background: var(--c-wash, #f4f5f9);
  overflow: hidden;
}

.appeal-meter span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--disc-brand, var(--c-navy, #18236e));
  transition: width 0.4s ease;
}

.appeal-raised {
  font-size: 0.82rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.appeal-donate,
.appeal-sheet-donate,
.appeal-done {
  align-self: stretch;
  margin-top: 4px;
}

#appeal-sheet {
  position: fixed;
  inset: 0;
  z-index: 1300;
  background: rgba(16, 22, 46, 0.55);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.appeal-sheet-card {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 92vh;
  overflow-y: auto;
  background: var(--c-panel, #fff);
  color: var(--c-ink, #22284b);
  border-radius: 18px 18px 0 0;
  padding: 22px 18px calc(18px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -10px 36px rgba(16, 19, 31, 0.3);
  animation: appeal-sheet-in 0.25s ease;
}

.appeal-sheet-choose,
.appeal-thanks {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.appeal-sheet-choose[hidden],
.appeal-thanks[hidden] {
  display: none;
}

.appeal-sheet-title,
.appeal-thanks b {
  font-family: var(--font-display, 'Inter', sans-serif);
  font-size: 1.15rem;
  line-height: 1.3;
  padding-right: 34px;
}

.appeal-sheet-payee,
.appeal-thanks p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

.appeal-amounts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.appeal-amount {
  font: inherit;
  font-weight: 700;
  padding: 11px 4px;
  border-radius: 10px;
  border: 1.5px solid var(--c-line, #e3e6f0);
  background: var(--c-panel, #fff);
  color: var(--c-ink, #22284b);
  cursor: pointer;
}

.appeal-amount[aria-pressed="true"] {
  border-color: var(--c-navy, #18236e);
  background: var(--c-info-bg, #e7eef8);
}

.appeal-other {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
}

.appeal-other[hidden] {
  display: none;
}

.appeal-other input {
  font: inherit;
  font-size: 1rem;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1.5px solid var(--c-line, #e3e6f0);
}

.appeal-error {
  margin: 0;
  font-size: 0.85rem;
  color: var(--c-crit, #b3261e);
  background: var(--c-crit-bg, #f9e9e7);
  border-radius: 8px;
  padding: 8px 10px;
}

.appeal-fine {
  margin: 0;
  font-size: 0.75rem;
  color: var(--c-muted, #5f6689);
  text-align: center;
}

.appeal-pay:empty {
  display: none;
}

.appeal-pay {
  margin-top: 26px;
}

@keyframes appeal-sheet-in {
  from { transform: translateY(24px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .appeal-sheet-card { animation: none; }
  .appeal-meter span { transition: none; }
}

/* A9/V3: Live Labels and kiosk screens never show the card */
body.kiosk .appeal-card,
body.kiosk #appeal-sheet {
  display: none;
}
