/* SALIN-LAHI — styles.css — extracted from index.html */
      * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
        -webkit-tap-highlight-color: transparent;
      }
      html,
      body {
        width: 100vw;
        max-width: 100vw;
        height: 100vh;
        overflow: hidden;
        overflow-x: hidden;
        background: #fff;
        font-family: "Plus Jakarta Sans", sans-serif;
      }

      .material-symbols-outlined {
        font-variation-settings:
          "FILL" 0,
          "wght" 400,
          "GRAD" 0,
          "opsz" 24;
      }
      .fill-icon {
        font-variation-settings:
          "FILL" 1,
          "wght" 400,
          "GRAD" 0,
          "opsz" 24;
      }

      /* ── Two-page slider ── */
      #app {
        position: fixed;
        inset: 0;
        width: 100vw;
        height: 100vh;
        overflow: hidden;
      }
      #track {
        display: flex;
        width: 200vw;
        height: 100vh;
        transition: transform 0.42s cubic-bezier(0.4, 0, 0.2, 1);
      }
      .page {
        width: 100vw;
        height: 100vh;
        flex-shrink: 0;
        overflow: hidden;
        position: relative;
      }

      /* ── IDLE ── */
      #idle {
        background: #ffffff;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        user-select: none;
        overflow: hidden;
        position: relative;
      }
      /* fullscreen background images stacked, fading */
      .idle-bg {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        opacity: 0;
        transition: opacity 1.6s ease-in-out;
        z-index: 0;
      }
      .idle-bg.visible {
        opacity: 0.28;
      }
      /* white overlay so images don't overpower text */
      .idle-overlay {
        position: absolute;
        inset: 0;
        background: #ffffff;
        opacity: 0.15;
        z-index: 1;
        pointer-events: none;
      }
      /* center content sits above images */
      .idle-center {
        position: relative;
        z-index: 2;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
      }
      .idle-wordmark {
        font-family: "Fraunces", serif;
        font-weight: 900;
        font-size: clamp(80px, 16vw, 160px);
        letter-spacing: -2px;
        line-height: 0.95;
        white-space: nowrap;
        background: linear-gradient(
          135deg,
          #bd001a 0%,
          #0038a8 50%,
          #fcd116 100%,
          #bd001a 150%
        );
        background-size: 200%;
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        animation: shimmer 3s linear infinite;
      }
      @keyframes shimmer {
        0% {
          background-position: 0%;
        }
        100% {
          background-position: 200%;
        }
      }
      .idle-tap {
        font-family: "Space Grotesk", sans-serif;
        font-weight: 700;
        font-size: 18px;
        letter-spacing: 0.2em;
        text-transform: uppercase;
        color: #5d3f3c;
        margin-top: 36px;
        animation: blink 2.2s ease-in-out infinite;
      }
      @keyframes blink {
        0%,
        100% {
          opacity: 0.3;
        }
        50% {
          opacity: 1;
        }
      }

      /* ── DASHBOARD ── */
      #dashboard {
        background: #faf9f7;
        display: flex;
        flex-direction: column;
        padding: 22px 26px max(18px, env(safe-area-inset-bottom));
        gap: 10px;
        height: 100vh;
        height: 100dvh;
        overflow: hidden;
        position: relative;
      }

      /* ── Credit stamp ── */
      .credit-stamp {
        position: absolute;
        top: 18px;
        right: 22px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1px;
        transform: none;
        pointer-events: auto;
        cursor: pointer;
        z-index: 5;
        max-width: 38vw;
      }
      .credit-stamp:active {
        transform: scale(0.96);
      }
      .credit-stamp-star {
        font-size: clamp(12px, 3.5vw, 22px);
        color: #fcd400;
        line-height: 1;
        filter: drop-shadow(0 1px 3px rgba(0,0,0,0.22));
      }
      .credit-stamp-title {
        font-family: "Fraunces", serif;
        font-weight: 900;
        font-size: clamp(14px, 5vw, 30px);
        letter-spacing: 0.12em;
        color: #bd001a;
        line-height: 1;
        text-shadow: 0 2px 8px rgba(189,0,26,0.18);
        white-space: nowrap;
      }
      .credit-stamp-by {
        font-family: "Space Grotesk", sans-serif;
        font-weight: 600;
        font-size: clamp(9px, 3vw, 18px);
        letter-spacing: 0.04em;
        color: #8a8b8f;
        line-height: 1;
        text-transform: lowercase;
        white-space: nowrap;
      }
      .greeting-title {
        font-family: "Fraunces", serif;
        font-weight: 900;
        font-size: clamp(36px, 4vw, 52px);
        line-height: 1;
        color: #bd001a;
        letter-spacing: -0.02em;
        flex-shrink: 0;
        padding-right: clamp(100px, 38vw, 180px);
      }
      .greeting-sub {
        font-family: "Plus Jakarta Sans", sans-serif;
        font-weight: 500;
        font-size: 17px;
        color: #5d3f3c;
        margin-top: 4px;
        flex-shrink: 0;
        padding-right: clamp(100px, 38vw, 180px);
      }

      /* ── Bento grid ── */
      .bento-grid {
        flex: 1;
        display: grid;
        grid-template-columns: repeat(12, 1fr);
        grid-template-rows: repeat(6, 1fr);
        gap: 10px;
        min-height: 0;
        overflow: hidden;
      }
      .tile {
        border-radius: 20px;
        border: 1px solid #a8a9ad;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
        cursor: pointer;
        transition:
          transform 0.15s,
          box-shadow 0.15s;
        position: relative;
      }
      /* overflow:hidden only on desktop where grid controls height */
      @media (min-width: 901px) {
        .tile {
          overflow: hidden;
        }
      }
      .tile:active {
        transform: scale(0.97);
        box-shadow: none;
      }
      .t-city {
        grid-column: span 8;
        grid-row: span 4;
        background: #fcd400;
      }
      .t-guide {
        grid-column: span 4;
        grid-row: span 3;
        background: #e61e2a;
      }
      .t-quiz {
        grid-column: span 4;
        grid-row: span 2;
        background: #4b6edd;
      }
      .t-timeline {
        grid-column: span 4;
        grid-row: span 3;
        background: #E37F4E;
      }
      .t-lb {
        grid-column: span 4;
        grid-row: span 2;
        background: #6E66B9;
      }
      .tile-inner {
        padding: 18px;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        position: relative;
        z-index: 1;
      }
      @media (min-width: 901px) {
        .tile-inner {
          height: 100%;
        }
      }
      @media (max-width: 900px) {
        /* Quiz tile: always auto-height so content stacks tightly regardless of grid row height */
        .t-quiz .tile-inner {
          height: auto !important;
          justify-content: flex-start !important;
        }
        .tile-inner {
          height: auto;
          padding: 16px;
        }
      }
      .tile-tag {
        display: inline-block;
        font-family: "Space Grotesk", sans-serif;
        font-weight: 700;
        font-size: 14px;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        padding: 4px 12px;
        border-radius: 9999px;
        background: #bd001a;
        color: #fff;
        align-self: flex-start;
      }
      .tile-title {
        font-family: "Fraunces", serif;
        font-weight: 800;
        line-height: 1.1;
      }
      .tile-desc {
        font-family: "Plus Jakarta Sans", sans-serif;
        font-weight: 500;
      }
      .tile-btn {
        font-family: "Space Grotesk", sans-serif;
        font-weight: 700;
        font-size: 16px;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        padding: 14px 24px;
        border-radius: 14px;
        border: none;
        cursor: pointer;
        transition: all 0.15s;
        align-self: flex-start;
      }
      .tile-btn:active {
        transform: translateY(2px);
      }
      .tile-deco {
        position: absolute;
        border-radius: 50%;
        pointer-events: none;
        z-index: 0;
      }

      /* ══════════════════════════════════
       OVERLAY SYSTEM — Pista Moderno
       Bricolage headlines · Chrome borders
       Street Sun shadows · Pill buttons
    ══════════════════════════════════ */

      /* ── Overlay shell ── */
      .overlay {
        position: fixed;
        inset: 0;
        height: 100dvh;
        z-index: 200;
        transform: translateX(100%);
        transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
        overflow: hidden;
        display: flex;
        flex-direction: column;
        background: #faf9f7;
      }
      .overlay.open {
        transform: translateX(0);
      }

      /* ── Top bar — chrome plaka style ── */
      .ov-topbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 28px;
        flex-shrink: 0;
        background: #faf9f7;
        border-bottom: 1px solid #a8a9ad;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06);
      }
      .ov-topbar-left {
        display: flex;
        align-items: center;
        gap: 12px;
      }
      .ov-icon {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 26px;
        flex-shrink: 0;
        border: 1px solid #a8a9ad;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
      }
      .ov-topbar-title {
        font-family: "Bricolage Grotesque", sans-serif;
        font-size: 26px;
        font-weight: 800;
        color: #1b1c1b;
        letter-spacing: -0.01em;
      }
      .back-btn {
        background: #fff;
        border: 1px solid #a8a9ad;
        color: #1b1c1b;
        border-radius: 9999px;
        padding: 9px 20px;
        font-size: 16px;
        cursor: pointer;
        font-family: "Space Grotesk", sans-serif;
        font-weight: 700;
        letter-spacing: 0.04em;
        box-shadow: 0 4px 0 #d4d4d4;
        transition: all 0.15s;
      }
      .back-btn:active {
        transform: translateY(4px);
        box-shadow: none;
      }
      .ov-scrollable {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        background: #faf9f7;
        padding-bottom: env(safe-area-inset-bottom);
      }
      ::-webkit-scrollbar {
        width: 3px;
      }
      ::-webkit-scrollbar-thumb {
        background: #a8a9ad;
        border-radius: 3px;
      }

      /* ── Section header used across overlays ── */
      .section-eyebrow {
        font-family: "Space Grotesk", sans-serif;
        font-weight: 700;
        font-size: 11px;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        color: #926e6b;
        margin-bottom: 8px;
      }
      .section-title {
        font-family: "Bricolage Grotesque", sans-serif;
        font-weight: 800;
        font-size: 36px;
        line-height: 1.1;
        color: #1b1c1b;
        letter-spacing: -0.01em;
      }
      /* chrome rule */
      .chrome-rule {
        height: 1px;
        background: linear-gradient(90deg, #a8a9ad, #e7bdb9, #a8a9ad);
        margin: 0;
      }

      /* ══ CITY OVERVIEW — bento layout ══ */
      #ov-city .ov-scrollable {
        background: #eceae7;
      }
      /* desktop/tablet: fit everything in one screen, no scrolling */
      @media (min-width: 761px) {
        #ov-city .ov-scrollable {
          overflow: hidden;
        }
      }
      .cty-root {
        display: flex;
        gap: 12px;
        padding: 14px;
        height: 100%;
        min-height: 100%;
        background: #eceae7;
      }
      .cty-main {
        display: flex;
        flex-direction: column;
        gap: 12px;
        flex: 1;
        min-width: 0;
        min-height: 0;
      }
      .cty-hero {
        flex: 1.55;
        position: relative;
        border-radius: 18px;
        overflow: hidden;
        display: flex;
        align-items: flex-end;
        background: linear-gradient(135deg, #0f3460, #1a3488);
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14), 0 0 0 1px #d6d4d1;
        min-height: 0;
      }
      .cty-hero img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
      }
      .cty-hero-grad {
        position: relative;
        z-index: 2;
        width: 100%;
        padding: clamp(16px, 2vw, 28px);
        background: linear-gradient(
          to top,
          rgba(0, 0, 0, 0.78) 0%,
          rgba(0, 0, 0, 0.15) 70%,
          transparent 100%
        );
        display: flex;
        align-items: flex-end;
        justify-content: space-between;
        gap: 14px;
      }
      .cty-hero-badge {
        display: inline-block;
        background: #fcd400;
        color: #705d00;
        font-family: "Space Grotesk", sans-serif;
        font-size: clamp(10px, 1vw, 13px);
        font-weight: 700;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        padding: 4px 12px;
        border-radius: 999px;
        margin-bottom: 8px;
      }
      .cty-hero-title {
        font-family: "Bricolage Grotesque", sans-serif;
        font-size: clamp(34px, 4.2vw, 60px);
        font-weight: 800;
        color: #fff;
        line-height: 0.95;
      }
      .cty-hero-sub {
        font-family: "Space Grotesk", sans-serif;
        font-size: clamp(13px, 1.3vw, 18px);
        font-weight: 500;
        color: rgba(255, 255, 255, 0.8);
        margin-top: 6px;
        letter-spacing: 0.02em;
      }
      .cty-hero-loc {
        background: #fcd400;
        color: #705d00;
        font-family: "Space Grotesk", sans-serif;
        font-size: clamp(11px, 1.05vw, 14px);
        font-weight: 700;
        padding: 8px 16px;
        border-radius: 999px;
        display: flex;
        align-items: center;
        gap: 6px;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.28);
        flex-shrink: 0;
        white-space: nowrap;
      }
      .cty-hero-loc .material-symbols-outlined {
        font-size: 16px;
      }

      .cty-bottom {
        display: flex;
        gap: 12px;
        flex: 1;
        min-height: 0;
      }
      .cty-card {
        border-radius: 16px;
        padding: clamp(14px, 1.5vw, 22px);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 0 0 1px #d6d4d1;
        display: flex;
        flex-direction: column;
        min-height: 0;
        overflow: hidden;
      }
      .cty-about {
        flex: 1.5;
        background: #fff;
        color: #1b1c1b;
      }
      .cty-about-label {
        font-family: "Space Grotesk", sans-serif;
        font-size: clamp(11px, 1.05vw, 14px);
        font-weight: 700;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        color: #bd001a;
        display: flex;
        align-items: center;
        gap: 7px;
        margin-bottom: 10px;
        flex-shrink: 0;
      }
      .cty-about-label::before {
        content: "";
        width: 7px;
        height: 7px;
        background: #bd001a;
        border-radius: 50%;
        display: inline-block;
        flex-shrink: 0;
      }
      .cty-about-text {
        font-family: "Plus Jakarta Sans", sans-serif;
        font-size: clamp(13.5px, 1.1vw, 18px);
        line-height: 1.65;
        color: #33332f;
        flex: 1;
        overflow: hidden;
      }
      .cty-facts {
        flex: 1.05;
        background: #bd001a;
        color: #fff;
      }
      .cty-facts-title {
        font-family: "Bricolage Grotesque", sans-serif;
        font-size: clamp(15px, 1.4vw, 20px);
        font-weight: 700;
        margin-bottom: 8px;
        display: flex;
        align-items: center;
        gap: 7px;
        flex-shrink: 0;
      }
      .cty-facts-list {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        min-height: 0;
      }
      .cty-fact-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
        padding: 6px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.3);
      }
      .cty-fact-row:last-child {
        border-bottom: none;
        padding-bottom: 10px;
      }
      .cty-fact-k {
        font-family: "Space Grotesk", sans-serif;
        font-size: clamp(10px, 0.95vw, 13px);
        font-weight: 700;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        color: #fcd400;
        flex-shrink: 0;
      }
      .cty-fact-v {
        font-family: "Plus Jakarta Sans", sans-serif;
        font-size: clamp(11px, 1.05vw, 15px);
        font-weight: 700;
        color: #fff;
        text-align: right;
      }

      .cty-mapcol {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 12px;
        min-height: 0;
      }
      .cty-maptile {
        flex: 1;
        background: #2e54c2;
        color: #fff;
      }
      .cty-maptile-title {
        font-family: "Bricolage Grotesque", sans-serif;
        font-size: clamp(14px, 1.3vw, 18px);
        font-weight: 700;
        margin-bottom: 7px;
        display: flex;
        align-items: center;
        gap: 6px;
        flex-shrink: 0;
      }
      .cty-map-img-wrap {
        flex: 1;
        background: rgba(255, 255, 255, 0.12);
        border-radius: 10px;
        overflow: hidden;
        border: 1px solid rgba(255, 255, 255, 0.2);
        min-height: 0;
      }
      .cty-map-img-wrap img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        transform: scale(1.18);
        display: block;
      }
      .cty-maptile-loc {
        font-family: "Space Grotesk", sans-serif;
        font-size: clamp(10px, 1vw, 13px);
        font-weight: 500;
        text-align: center;
        opacity: 0.88;
        margin-top: 7px;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
      }
      .cty-maptile-loc .material-symbols-outlined {
        font-size: 14px;
      }

      .cty-mayor-card {
        flex-shrink: 0;
        border-radius: 16px;
        padding: clamp(12px, 1.3vw, 18px);
        background: #1a3488;
        color: #fff;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 0 0 1px #d6d4d1;
        display: flex;
        align-items: center;
        gap: 13px;
      }
      .cty-mayor-avatar {
        width: clamp(44px, 4vw, 58px);
        height: clamp(44px, 4vw, 58px);
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.18);
        border: 2px solid rgba(255, 255, 255, 0.4);
        display: flex;
        align-items: center;
        justify-content: center;
        font-family: "Bricolage Grotesque", sans-serif;
        font-size: clamp(16px, 1.6vw, 22px);
        font-weight: 800;
        color: #fff;
        flex-shrink: 0;
      }
      .cty-mayor-label {
        font-family: "Space Grotesk", sans-serif;
        font-size: clamp(10px, 0.95vw, 13px);
        font-weight: 700;
        letter-spacing: 0.07em;
        text-transform: uppercase;
        opacity: 0.65;
      }
      .cty-mayor-name {
        font-family: "Bricolage Grotesque", sans-serif;
        font-size: clamp(15px, 1.5vw, 21px);
        font-weight: 700;
        line-height: 1.15;
        margin-top: 3px;
      }

      /* sidebar — stat tiles */
      .cty-sidebar {
        display: flex;
        flex-direction: column;
        gap: 12px;
        width: clamp(158px, 16vw, 216px);
        min-height: 0;
        flex-shrink: 0;
      }
      .cty-stat {
        flex: 1;
        border-radius: 16px;
        padding: clamp(16px, 2vw, 22px) clamp(12px, 1.4vw, 18px);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 0 0 1px #d6d4d1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        gap: 5px;
        min-height: 0;
        overflow: hidden;
      }
      .cty-stat-icon {
        width: clamp(36px, 3.2vw, 48px);
        height: clamp(36px, 3.2vw, 48px);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
      }
      .cty-stat-icon .material-symbols-outlined {
        font-size: clamp(18px, 1.9vw, 26px);
      }
      .cty-stat-val {
        font-family: "Bricolage Grotesque", sans-serif;
        font-size: clamp(26px, 1.5vw, 30px);
        font-weight: 800;
        line-height: 1;
      }
      .cty-stat-val-sm {
        font-size: clamp(20px, 2.2vw, 30px);
      }
      .cty-stat-lbl {
        font-family: "Space Grotesk", sans-serif;
        font-size: clamp(11px, 1.1vw, 15px);
        font-weight: 700;
        letter-spacing: 0.05em;
        text-transform: uppercase;
      }
      .cty-stat-red {
        background: #bd001a;
        color: #fff;
      }
      .cty-stat-red .cty-stat-icon {
        background: rgba(255, 255, 255, 0.16);
      }
      .cty-stat-red .cty-stat-lbl {
        opacity: 0.85;
      }
      .cty-stat-yellow {
        background: #fcd400;
        color: #705d00;
      }
      .cty-stat-yellow .cty-stat-icon {
        background: rgba(0, 0, 0, 0.08);
      }
      .cty-stat-yellow .cty-stat-lbl {
        opacity: 0.8;
      }
      .cty-stat-blue {
        background: #1a3488;
        color: #fff;
      }
      .cty-stat-blue .cty-stat-icon {
        background: rgba(255, 255, 255, 0.16);
      }
      .cty-stat-blue .cty-stat-lbl {
        opacity: 0.85;
      }
      .cty-stat-white {
        background: #fff;
        color: #1b1c1b;
      }
      .cty-stat-white .cty-stat-icon {
        background: rgba(189, 0, 26, 0.08);
        color: #bd001a;
      }
      .cty-stat-white .cty-stat-val {
        color: #bd001a;
      }
      .cty-stat-white .cty-stat-lbl {
        color: #888;
      }
      .cty-stat-navy {
        background: #2e54c2;
        color: #fff;
        gap: 3px;
      }
      .cty-stat-navy .cty-stat-lbl {
        opacity: 0.85;
      }
      .cty-stat-region {
        font-family: "Space Grotesk", sans-serif;
        font-size: clamp(10px, 1vw, 13px);
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        opacity: 0.7;
      }

      /* stack into a single column on narrow screens */
      @media (max-width: 760px) {
        .cty-root {
          flex-direction: column;
          height: auto;
          min-height: 0;
          padding: 10px;
          gap: 10px;
        }
        .cty-hero {
          min-height: 200px;
        }
        .cty-hero-grad {
          flex-wrap: wrap;
        }
        .cty-bottom {
          flex-direction: column;
          flex: none;
        }
        .cty-about {
          flex: none;
          min-height: 170px;
        }
        .cty-facts {
          flex: none;
          min-height: 230px;
        }
        .cty-mapcol {
          flex: none;
        }
        .cty-maptile {
          min-height: 160px;
        }
        .cty-sidebar {
          width: 100%;
          display: grid;
          grid-template-columns: repeat(2, 1fr);
          gap: 8px;
        }
        .cty-stat {
          min-height: 110px;
        }
      }

      /* ══ HERITAGE GUIDE ══ */
      #ov-guide .ov-scrollable {
        background: #faf9f7;
      }
      .guide-intro {
        padding: 16px 28px 8px;
        font-family: "Plus Jakarta Sans", sans-serif;
        font-size: 17px;
        color: #5d3f3c;
        font-weight: 500;
        line-height: 1.6;
        flex-shrink: 0;
      }
      .guide-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 14px;
        padding: 8px 28px 32px;
      }
      .ai-disclosure {
        font-family: "Space Grotesk", sans-serif;
        font-size: 11px;
        color: #b0b0b0;
        text-align: center;
        margin: 6px 0 0;
        letter-spacing: 0.03em;
        pointer-events: none;
      }
      /* exp-card — plaka panel */
      .exp-card {
        border-radius: 16px;
        overflow: hidden;
        cursor: pointer;
        transition:
          transform 0.15s,
          box-shadow 0.15s;
        user-select: none;
        background: #fff;
        border: none;
        box-shadow: none;
        display: flex;
        flex-direction: column;
      }
      .exp-card:active {
        transform: scale(0.97);
        box-shadow: none;
      }
      .exp-card-wrap {
        border-radius: 20px;
        padding: 6px;
        box-shadow: 0 0 0 1.5px rgba(0,0,0,0.22);
      }
      .exp-card-stripe {
        height: 5px;
        flex-shrink: 0;
      }
      .exp-card-inner {
        display: flex;
        align-items: flex-start;
        gap: 12px;
        padding: 16px 16px 10px;
      }
      .exp-card-icon {
        width: 48px;
        height: 48px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 22px;
        flex-shrink: 0;
        border: 1px solid #a8a9ad;
      }
      .exp-card-body {
        flex: 1;
      }
      .exp-card-station {
        font-family: "Space Grotesk", sans-serif;
        font-size: 13px;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        font-weight: 700;
        margin-bottom: 4px;
      }
      .exp-card-title {
        font-family: "Bricolage Grotesque", sans-serif;
        font-size: 20px;
        font-weight: 800;
        line-height: 1.2;
        color: #1b1c1b;
      }
      .exp-card-preview {
        font-family: "Plus Jakarta Sans", sans-serif;
        font-size: 15px;
        color: #926e6b;
        line-height: 1.45;
        margin-top: 4px;
        font-weight: 400;
      }
      .exp-card-footer {
        padding: 10px 16px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        border-top: 1px solid #e7bdb9;
        background: #faf9f7;
      }
      .exp-card-cta {
        font-family: "Space Grotesk", sans-serif;
        font-size: 14px;
        font-weight: 700;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        color: #bd001a;
      }
      .exp-card-arrow {
        font-size: 18px;
        color: #a8a9ad;
      }

      /* ══ DETAIL ══ */
      #ov-detail .ov-scrollable {
        background: #faf9f7;
      }
      .detail-hero {
        position: relative;
        height: 220px;
        overflow: hidden;
        flex-shrink: 0;
        background: #efeeec;
      }
      .detail-hero img {
        width: 100%;
        height: 100%;
        object-fit: cover;
      }
      .detail-hero-grad {
        position: absolute;
        inset: 0;
        background: linear-gradient(transparent 20%, rgba(0, 0, 0, 0.8));
      }
      .detail-hero-text {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 20px 28px;
      }
      .detail-station {
        font-family: "Space Grotesk", sans-serif;
        font-size: 14px;
        letter-spacing: 0.12em;
        color: #fcd400;
        text-transform: uppercase;
        font-weight: 700;
        margin-bottom: 6px;
      }
      .detail-title {
        font-family: "Bricolage Grotesque", sans-serif;
        font-size: 36px;
        font-weight: 800;
        color: #fff;
        letter-spacing: -0.01em;
      }
      .detail-caption {
        font-family: "Plus Jakarta Sans", sans-serif;
        font-size: 15px;
        color: rgba(255, 255, 255, 0.5);
        margin-top: 4px;
        font-weight: 400;
      }
      .detail-pad {
        padding: 24px 28px;
      }
      /* TTS — action button */
      .tts-row {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 20px;
      }
      .tts-play {
        display: flex;
        align-items: center;
        gap: 8px;
        background: #bd001a;
        color: #fff;
        border: none;
        border-radius: 9999px;
        padding: 14px 28px;
        font-size: 17px;
        font-weight: 700;
        cursor: pointer;
        font-family: "Space Grotesk", sans-serif;
        letter-spacing: 0.04em;
        box-shadow: 0 4px 0 #930011;
        transition: all 0.15s;
      }
      .tts-play:active {
        transform: translateY(4px);
        box-shadow: none;
      }
      .tts-stop {
        background: #fff;
        border: 1px solid #a8a9ad;
        color: #bd001a;
        border-radius: 9999px;
        padding: 12px 20px;
        font-size: 16px;
        cursor: pointer;
        font-family: "Space Grotesk", sans-serif;
        font-weight: 700;
        box-shadow: 0 4px 0 #d4d4d4;
        transition: all 0.15s;
      }
      .tts-stop:active {
        transform: translateY(4px);
        box-shadow: none;
      }
      .tts-stat {
        font-family: "Space Grotesk", sans-serif;
        font-size: 15px;
        color: #2e54c2;
        font-weight: 700;
      }
      /* body text */
      .detail-text {
        font-family: "Plus Jakarta Sans", sans-serif;
        font-size: 19px;
        line-height: 1.85;
        color: #1b1c1b;
        font-weight: 400;
      }
      .detail-text p {
        margin-bottom: 14px;
      }
      /* quiz CTA banner */
      .quiz-cta {
        margin-top: 24px;
        border-radius: 16px;
        background: #fff3b0;
        border: 1px solid #a8a9ad;
        padding: 18px 20px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06);
      }
      .quiz-cta-left {
        display: flex;
        align-items: center;
        gap: 14px;
      }
      .quiz-cta-emoji {
        font-size: 28px;
      }
      .quiz-cta-title {
        font-family: "Bricolage Grotesque", sans-serif;
        font-size: 20px;
        font-weight: 800;
        color: #1b1c1b;
      }
      .quiz-cta-sub {
        font-family: "Plus Jakarta Sans", sans-serif;
        font-size: 15px;
        color: #5d3f3c;
        margin-top: 2px;
        font-weight: 400;
      }
      .quiz-cta-btn {
        background: #bd001a;
        color: #fff;
        border: none;
        border-radius: 9999px;
        padding: 15px 26px;
        font-size: 16px;
        font-weight: 700;
        cursor: pointer;
        font-family: "Space Grotesk", sans-serif;
        letter-spacing: 0.04em;
        white-space: nowrap;
        flex-shrink: 0;
        box-shadow: 0 4px 0 #930011;
        transition: all 0.15s;
      }
      .quiz-cta-btn:active {
        transform: translateY(4px);
        box-shadow: none;
      }

      /* ══ QUIZ ══ */
      #ov-quiz .ov-scrollable {
        background: #faf9f7;
      }
      .quiz-sel-pad {
        padding: 20px 28px;
      }
      .quiz-sel-title {
        font-family: "Space Grotesk", sans-serif;
        font-size: 15px;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        color: #926e6b;
        font-weight: 700;
        margin-bottom: 16px;
      }
      .quiz-topics-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
      }
      /* topic button — plaka panel */
      .quiz-topic-btn {
        border-radius: 14px;
        padding: 16px 14px;
        background: #fff;
        border: none;
        box-shadow: none;
        cursor: pointer;
        color: #1b1c1b;
        transition: all 0.15s;
        user-select: none;
        text-align: left;
        font-family: "Plus Jakarta Sans", sans-serif;
        width: 100%;
        display: block;
      }
      .quiz-topic-btn:active {
        transform: scale(0.97);
        box-shadow: none;
      }
      .quiz-topic-name {
        font-family: "Bricolage Grotesque", sans-serif;
        font-size: 20px;
        font-weight: 800;
        line-height: 1.2;
        color: #1b1c1b;
      }
      .quiz-topic-count {
        font-family: "Space Grotesk", sans-serif;
        font-size: 14px;
        color: #926e6b;
        margin-top: 4px;
        font-weight: 700;
        letter-spacing: 0.04em;
      }
      /* active quiz */
      .quiz-game {
        display: none;
        padding: 20px 28px;
        flex-direction: column;
        align-items: center;
      }
      .q-prog-row {
        width: 100%;
        max-width: 700px;
        display: flex;
        align-items: center;
        gap: 14px;
        margin-bottom: 20px;
      }
      .q-prog-track {
        flex: 1;
        height: 8px;
        background: #e3e2e0;
        border-radius: 8px;
        overflow: hidden;
        border: 1px solid #a8a9ad;
      }
      .q-prog-fill {
        height: 100%;
        background: linear-gradient(90deg, #bd001a, #fcd400);
        border-radius: 8px;
        transition: width 0.4s;
      }
      .q-prog-txt {
        font-family: "Space Grotesk", sans-serif;
        font-size: 16px;
        font-weight: 700;
        color: #926e6b;
        white-space: nowrap;
        letter-spacing: 0.04em;
      }
      .q-chip {
        display: inline-block;
        border-radius: 9999px;
        padding: 6px 16px;
        font-family: "Space Grotesk", sans-serif;
        font-size: 15px;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        margin-bottom: 16px;
        background: #fcd400;
        color: #221b00;
        border: 1px solid #a8a9ad;
      }
      .q-question {
        font-family: "Bricolage Grotesque", sans-serif;
        font-size: 34px;
        font-weight: 800;
        line-height: 1.3;
        text-align: center;
        max-width: 720px;
        margin-bottom: 24px;
        color: #1b1c1b;
        letter-spacing: -0.01em;
      }
      .q-opts-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 14px;
        width: 100%;
        max-width: 660px;
      }
      /* option button — physical plaka */
      .q-opt {
        background: #fff;
        border: 1.5px solid #a8a9ad;
        border-radius: 16px;
        padding: 22px 18px;
        font-size: 19px;
        color: #1b1c1b;
        cursor: pointer;
        text-align: left;
        font-family: "Plus Jakarta Sans", sans-serif;
        font-weight: 500;
        transition: all 0.15s;
        user-select: none;
        min-height: 88px;
        display: flex;
        align-items: center;
        line-height: 1.35;
        box-shadow: 0 4px 0 #d4d4d4;
      }
      .q-opt:active {
        transform: translateY(4px);
        box-shadow: none;
      }
      .q-opt.correct {
        background: #d4edda;
        border-color: #22c55e;
        color: #14532d;
        box-shadow: 0 4px 0 #16a34a;
      }
      .q-opt.wrong {
        background: #fde8e8;
        border-color: #ef4444;
        color: #7f1d1d;
        box-shadow: none;
      }
      .q-opt.disabled {
        pointer-events: none;
      }
      .q-fb {
        margin-top: 18px;
        font-family: "Bricolage Grotesque", sans-serif;
        font-size: 22px;
        text-align: center;
        font-weight: 800;
        min-height: 30px;
        color: #1b1c1b;
      }
      .q-fb.ok {
        color: #16a34a;
      }
      .q-fb.bad {
        color: #bd001a;
      }
      .q-next-btn {
        margin-top: 22px;
        background: #bd001a;
        color: #fff;
        border: none;
        border-radius: 9999px;
        padding: 17px 48px;
        font-size: 18px;
        font-weight: 700;
        cursor: pointer;
        font-family: "Space Grotesk", sans-serif;
        letter-spacing: 0.04em;
        box-shadow: 0 4px 0 #930011;
        transition: all 0.15s;
      }
      .q-next-btn:active {
        transform: translateY(4px);
        box-shadow: none;
      }
      /* result screen */
      .q-result {
        display: none;
        padding: 28px;
        text-align: center;
      }
      .result-emoji {
        font-size: 72px;
        margin-bottom: 12px;
      }
      .result-score {
        font-family: "Bricolage Grotesque", sans-serif;
        font-size: 120px;
        font-weight: 800;
        line-height: 1;
        color: #bd001a;
        letter-spacing: -0.04em;
      }
      .result-of {
        font-family: "Space Grotesk", sans-serif;
        font-size: 19px;
        color: #926e6b;
        margin: 8px 0 18px;
        font-weight: 700;
      }
      .result-msg {
        font-family: "Bricolage Grotesque", sans-serif;
        font-size: 26px;
        font-weight: 800;
        margin-bottom: 28px;
        color: #1b1c1b;
      }
      .result-form {
        text-align: left;
        max-width: 440px;
        margin: 0 auto;
      }
      .result-label {
        font-family: "Space Grotesk", sans-serif;
        font-size: 14px;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: #926e6b;
        font-weight: 700;
        display: block;
        margin-bottom: 6px;
      }
      /* recessed metal slot input */
      .result-input {
        width: 100%;
        background: #efeeec;
        border: 1px solid #a8a9ad;
        border-radius: 12px;
        box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.08);
        padding: 16px 18px;
        color: #1b1c1b;
        font-size: 18px;
        margin-bottom: 14px;
        font-family: "Plus Jakarta Sans", sans-serif;
        outline: none;
        font-weight: 500;
      }
      .result-input:focus {
        border-color: #bd001a;
        box-shadow:
          inset 0 2px 4px rgba(0, 0, 0, 0.08),
          0 0 0 2px rgba(189, 0, 26, 0.15);
      }
      .result-save {
        width: 100%;
        background: #bd001a;
        color: #fff;
        border: none;
        border-radius: 9999px;
        padding: 18px;
        font-size: 18px;
        font-weight: 700;
        cursor: pointer;
        font-family: "Space Grotesk", sans-serif;
        letter-spacing: 0.04em;
        margin-bottom: 14px;
        box-shadow: 0 4px 0 #930011;
        transition: all 0.15s;
      }
      .result-save:active {
        transform: translateY(4px);
        box-shadow: none;
      }
      .result-skip {
        background: none;
        border: none;
        color: #926e6b;
        font-size: 16px;
        cursor: pointer;
        font-family: "Space Grotesk", sans-serif;
        font-weight: 700;
      }

      /* ══ LEADERBOARD ══ */
      #ov-lb .ov-scrollable {
        background: #faf9f7;
      }
      .lb-head {
        padding: 20px 28px 0;
        flex-shrink: 0;
      }
      .lb-head h2 {
        font-family: "Bricolage Grotesque", sans-serif;
        font-size: 32px;
        font-weight: 800;
        margin-bottom: 4px;
        color: #1b1c1b;
        letter-spacing: -0.01em;
      }
      .lb-head p {
        font-family: "Plus Jakarta Sans", sans-serif;
        font-size: 17px;
        color: #926e6b;
        font-weight: 400;
        margin-bottom: 16px;
      }
      /* filter area — now holds a single <select> */
      .lb-filters {
        padding: 0 28px 14px;
        flex-shrink: 0;
      }
      #lb-topic-select {
        font-family: "Space Grotesk", sans-serif;
        font-weight: 700;
        font-size: 14px;
        border: 1.5px solid #a8a9ad;
        border-radius: 9999px;
        padding: 10px 20px;
        background: #fff;
        color: #1b1c1b;
        cursor: pointer;
        outline: none;
        width: auto;
      }
      @media (max-width: 600px) {
        #lb-topic-select { width: 100%; }
      }
      /* kept for reference — no longer rendered */
      .lb-filter-btn {
        display: none;
      }
      .lb-filter-btn.on {
        display: none;
        background: #fcd400;
        border-color: #a8a9ad;
        color: #221b00;
        box-shadow: 0 4px 0 #b29400;
      }
      .lb-filter-btn:active {
        transform: scale(0.96);
      }
      /* chrome-tinted table */
      .lb-tbl {
        width: 100%;
        border-collapse: collapse;
        margin: 0 28px;
        width: calc(100% - 56px);
      }
      .lb-tbl th {
        text-align: left;
        font-family: "Space Grotesk", sans-serif;
        font-size: 13px;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        color: #926e6b;
        padding: 12px 16px;
        border-bottom: 1px solid #a8a9ad;
        font-weight: 700;
        background: #efeeec;
      }
      .lb-tbl th:first-child {
        border-radius: 8px 0 0 0;
      }
      .lb-tbl th:last-child {
        border-radius: 0 8px 0 0;
      }
      .lb-tbl td {
        padding: 15px 16px;
        border-bottom: 1px solid #e7bdb9;
        font-family: "Plus Jakarta Sans", sans-serif;
        font-size: 16px;
        font-weight: 500;
        color: #1b1c1b;
        background: #fff;
      }
      .lb-tbl tr:last-child td {
        border-bottom: none;
      }
      .lb-tbl tr:last-child td:first-child {
        border-radius: 0 0 0 8px;
      }
      .lb-tbl tr:last-child td:last-child {
        border-radius: 0 0 8px 0;
      }
      .rank-badge {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 44px;
        height: 28px;
        border-radius: 9999px;
        font-family: "Space Grotesk", sans-serif;
        font-size: 13px;
        font-weight: 700;
        border: 1px solid #a8a9ad;
      }
      .r1 {
        background: linear-gradient(135deg, #ffd700, #ffa500);
        color: #000;
        border-color: #c8900a;
      }
      .r2 {
        background: linear-gradient(135deg, #c0c0c0, #909090);
        color: #000;
        border-color: #808080;
      }
      .r3 {
        background: linear-gradient(135deg, #cd7f32, #8b5e3c);
        color: #fff;
        border-color: #6b3e1e;
      }
      .rn {
        background: #efeeec;
        color: #926e6b;
      }
      .score-pill {
        background: #fcd400;
        color: #221b00;
        border-radius: 9999px;
        padding: 6px 14px;
        font-family: "Space Grotesk", sans-serif;
        font-size: 14px;
        font-weight: 700;
        border: 1px solid #a8a9ad;
      }
      .lb-empty {
        text-align: center;
        padding: 56px 20px;
        color: #926e6b;
        font-size: 19px;
        font-weight: 500;
        font-family: "Plus Jakarta Sans", sans-serif;
      }

      /* ══ TIMELINE ══ */
      #ov-timeline .ov-scrollable {
        background: #faf9f7;
      }
      .tl-hero {
        padding: 20px 28px 14px;
        flex-shrink: 0;
        border-bottom: 1px solid #a8a9ad;
      }
      .tl-hero-title {
        font-family: "Bricolage Grotesque", sans-serif;
        font-size: 36px;
        font-weight: 800;
        color: #1b1c1b;
        letter-spacing: -0.01em;
      }
      .tl-hero-sub {
        font-family: "Plus Jakarta Sans", sans-serif;
        font-size: 18px;
        color: #5d3f3c;
        margin: 6px 0 8px;
        font-weight: 400;
      }
      .tl-years-badge {
        display: inline-block;
        background: #fcd400;
        border: 1px solid #a8a9ad;
        border-radius: 9999px;
        padding: 5px 16px;
        font-family: "Space Grotesk", sans-serif;
        font-size: 14px;
        color: #221b00;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
      }
      /* spine — chrome rod */
      .tl-spine-wrap {
        position: relative;
        padding: 16px 0 32px;
      }
      .tl-spine {
        position: absolute;
        left: 43px;
        top: 0;
        bottom: 0;
        width: 3px;
        background: linear-gradient(180deg, #bd001a, #fcd400, #2e54c2);
        border-radius: 3px;
        opacity: 0.5;
      }
      .tl-events {
        padding: 0 28px 0 72px;
      }
      .tl-item {
        position: relative;
        margin-bottom: 20px;
      }
      .tl-node {
        position: absolute;
        left: -42px;
        top: 18px;
        width: 30px;
        height: 30px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 2;
        border: 2px solid #a8a9ad;
      }
      .tl-node-icon {
        font-size: 14px;
      }
      /* tl-card — plaka panel */
      .tl-card {
        background: #fff;
        border: 1px solid #a8a9ad;
        border-radius: 16px;
        overflow: hidden;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.07);
      }
      .tl-card-year {
        padding: 12px 18px 0;
        font-family: "Space Grotesk", sans-serif;
        font-size: 15px;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
      }
      .tl-card-title {
        padding: 4px 18px 2px;
        font-family: "Bricolage Grotesque", sans-serif;
        font-size: 26px;
        font-weight: 800;
        color: #1b1c1b;
        letter-spacing: -0.01em;
      }
      .tl-card-sub {
        padding: 0 18px 10px;
        font-family: "Plus Jakarta Sans", sans-serif;
        font-size: 16px;
        color: #926e6b;
        font-weight: 400;
      }
      .tl-card-body {
        padding: 0 18px 14px;
        font-family: "Plus Jakarta Sans", sans-serif;
        font-size: 17px;
        line-height: 1.75;
        color: #1b1c1b;
        font-weight: 400;
      }
      /* did you know — route tag accent */
      .tl-card-legend {
        margin: 0 14px 14px;
        border-radius: 12px;
        border: 1px solid #a8a9ad;
        overflow: hidden;
      }
      .tl-legend-label {
        font-family: "Space Grotesk", sans-serif;
        font-size: 13px;
        font-weight: 700;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        padding: 10px 16px;
        background: #fcd400;
        color: #221b00;
        border-bottom: 1px solid #a8a9ad;
      }
      .tl-legend-text {
        font-family: "Plus Jakarta Sans", sans-serif;
        font-size: 15px;
        line-height: 1.65;
        color: #1b1c1b;
        font-weight: 400;
        padding: 12px 16px;
        background: #fff;
      }

      /* ── Confirm Modal ── */
      /* Timeline photo carousel */
      #ov-timeline .ov-scrollable.tl-carousel-shell {
        position: relative;
        flex: 1;
        overflow: hidden;
        background: #111;
      }
      #ov-timeline .tl-hero {
        display: none;
      }
      .tl-carousel {
        height: 100%;
        width: 100%;
        display: flex;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        -ms-overflow-style: none;
        scrollbar-width: none;
      }
      .tl-carousel::-webkit-scrollbar {
        display: none;
      }
      .tl-slide {
        position: relative;
        flex: 0 0 100%;
        height: 100%;
        width: 100%;
        overflow: hidden;
        scroll-snap-align: start;
        background: #111;
      }
      .tl-photo-strip {
        position: absolute;
        inset: 0;
        overflow: hidden;
      }
      .tl-photo {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        opacity: 0;
        transition: opacity 0.7s ease-in-out;
      }
      .tl-photo.active {
        opacity: 1;
      }
      .tl-slide::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(
          90deg,
          rgba(0, 0, 0, 0.16),
          rgba(0, 0, 0, 0) 48%,
          rgba(0, 0, 0, 0.24)
        );
        pointer-events: none;
      }
      .tl-info {
        position: absolute;
        inset: 0 auto 0 0;
        z-index: 2;
        width: min(440px, 42vw);
        padding: 0;
        gap: 0;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        background: rgba(46, 84, 194, 0.88);
        border-right: 1px solid rgba(255, 255, 255, 0.18);
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.28);
        backdrop-filter: blur(4px);
      }
      .tl-scrollable {
        flex: 1;
        min-height: 0;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding: 20px 36px 12px;
      }
      .tl-footer {
        flex-shrink: 0;
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 10px 36px 20px;
      }
      .tl-info-red {
        background: rgba(230, 30, 42, 0.88);
      }
      .tl-kicker {
        font-family: "Space Grotesk", sans-serif;
        font-size: 14px;
        line-height: 20px;
        font-weight: 700;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        color: #fcd400;
      }
      .tl-year {
        font-family: "Fraunces", serif;
        font-size: clamp(28px, 3.5vw, 44px);
        line-height: 1;
        font-weight: 900;
        letter-spacing: 0;
        color: #fff;
      }
      .tl-rule {
        width: 96px;
        height: 6px;
        flex-shrink: 0;
        background: #fcd400;
      }
      .tl-title {
        font-family: "Fraunces", serif;
        font-size: 28px;
        line-height: 1.12;
        font-weight: 800;
        color: #fcd400;
        text-transform: uppercase;
      }
      .tl-sub {
        margin-top: 6px;
        font-family: "Plus Jakarta Sans", sans-serif;
        font-size: 17px;
        line-height: 1.45;
        font-weight: 600;
        color: rgba(255, 255, 255, 0.86);
      }
      .tl-body {
        font-family: "Plus Jakarta Sans", sans-serif;
        font-size: 17px;
        line-height: 1.55;
        color: rgba(255, 255, 255, 0.92);
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        scrollbar-width: thin;
        scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
      }
      .tl-body::-webkit-scrollbar {
        width: 3px;
      }
      .tl-body::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.22);
        border-radius: 9999px;
      }
      .tl-fact {
        border: 1px solid rgba(252, 212, 0, 0.64);
        border-radius: 0;
        overflow: visible;
        background: rgba(0, 0, 0, 0.12);
        flex-shrink: 0;
      }
      .tl-fact-text {
        overflow-y: auto;
        max-height: 110px;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
      }
      .tl-fact-label {
        padding: 8px 12px;
        border-bottom: 1px solid rgba(252, 212, 0, 0.5);
        font-family: "Space Grotesk", sans-serif;
        font-size: 12px;
        line-height: 16px;
        font-weight: 700;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: #221b00;
        background: rgba(252, 212, 0, 0.88);
      }
      .tl-fact-text {
        padding: 9px 12px 11px;
        font-family: "Plus Jakarta Sans", sans-serif;
        font-size: 15px;
        line-height: 1.45;
        color: rgba(255, 255, 255, 0.88);
      }
      .tl-listen-btn {
        align-self: flex-start;
      }
      .tl-info-red .tl-listen-btn {
        background: #fff;
        color: #bd001a;
        box-shadow: 0 3px 0 #aaa;
      }
      .tl-info-red .tl-listen-btn:hover {
        background: #f5f0f0;
        box-shadow: 0 2px 0 #aaa;
      }
      .tl-audio-bar {
        margin-top: 0;
      }
      .tl-info-red .tl-audio-bar {
        background: rgba(255, 255, 255, 0.15);
        border-color: rgba(255, 255, 255, 0.28);
      }
      .tl-info-red .tl-audio-bar .hs-audio-time {
        color: rgba(255, 255, 255, 0.9);
      }
      .tl-info-red .hs-audio-seek {
        background: linear-gradient(to right, #fff var(--p), rgba(255,255,255,0.3) var(--p));
      }
      .tl-info-red .hs-audio-seek::-webkit-slider-thumb { background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.35); }
      .tl-info-red .hs-audio-seek::-moz-range-thumb     { background: #fff; }
      .tl-nav {
        position: absolute;
        z-index: 4;
        top: 50%;
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        transform: translateY(-50%);
        border: 1px solid rgba(255, 255, 255, 0.42);
        border-radius: 50%;
        background: rgba(189, 0, 26, 0.18);
        color: rgba(255, 255, 255, 0.72);
        cursor: pointer;
        box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
        backdrop-filter: blur(3px);
        transition:
          transform 0.15s,
          background 0.15s,
          color 0.15s;
      }
      .tl-nav:hover {
        background: rgba(0, 0, 0, 0.34);
        color: rgba(255, 255, 255, 0.94);
      }
      .tl-nav:active {
        transform: translateY(-50%) scale(0.94);
        background: rgba(189, 0, 26, 0.52);
      }
      .tl-nav-prev {
        left: 448px;
      }
      .tl-nav-next {
        right: 22px;
      }
      .tl-nav .material-symbols-outlined {
        font-size: 30px;
      }
      .tl-dots {
        position: absolute;
        z-index: 4;
        right: 34px;
        bottom: 28px;
        display: flex;
        align-items: center;
        gap: 8px;
      }
      #tl-tts-row {
        position: absolute;
        z-index: 5;
        left: 0;
        bottom: 0;
        width: min(440px, 42vw);
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 12px 28px;
        background: rgba(0, 0, 0, 0.28);
        backdrop-filter: blur(4px);
      }
      #tl-tts-row .tts-play {
        padding: 10px 20px;
        font-size: 15px;
      }
      #tl-tts-row .tts-stop {
        padding: 9px 16px;
        font-size: 14px;
      }
      #tl-tts-status {
        font-family: "Space Grotesk", sans-serif;
        font-size: 13px;
        font-weight: 700;
        color: rgba(255, 255, 255, 0.88);
      }
      .tl-dot {
        width: 12px;
        height: 12px;
        border: 0;
        border-radius: 9999px;
        background: rgba(255, 255, 255, 0.52);
        cursor: pointer;
        transition:
          width 0.22s,
          background 0.22s;
      }
      .tl-dot.active {
        width: 26px;
        background: #fcd400;
      }

      /* ── Pio & Gelo Research Photo Journal carousel ── */
      #ov-research {
        background: #000;
      }
      .research-back-btn {
        position: absolute;
        top: 18px;
        left: 22px;
        z-index: 3;
        background: rgba(0, 0, 0, 0.45);
        border: 1px solid rgba(255, 255, 255, 0.3);
        color: #fff;
        box-shadow: none;
      }
      .research-carousel {
        position: absolute;
        inset: 0;
      }
      .research-slide {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center bottom;
        opacity: 0;
        transition: opacity 1s ease-in-out;
        z-index: 0;
      }
      .research-slide.visible {
        opacity: 1;
        z-index: 1;
      }
      .research-gradient {
        position: absolute;
        inset: 0;
        top: auto;
        height: 52%;
        background: linear-gradient(
          to top,
          rgba(0, 0, 0, 0.92) 0%,
          rgba(0, 0, 0, 0.6) 50%,
          rgba(0, 0, 0, 0) 100%
        );
        z-index: 2;
        pointer-events: none;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        gap: 6px;
        padding: 0 32px max(28px, env(safe-area-inset-bottom));
      }
      .research-caption {
        font-family: "Plus Jakarta Sans", sans-serif;
        font-weight: 400;
        font-size: clamp(13px, 1.5vw, 18px);
        line-height: 1.45;
        color: rgba(255, 255, 255, 0.82);
        text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
        max-width: 680px;
      }
      .research-title {
        font-family: "Fraunces", serif;
        font-weight: 900;
        font-size: clamp(26px, 4vw, 46px);
        line-height: 1.1;
        color: #fff;
        text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
      }
      @media (max-width: 1050px) and (min-width: 761px) {
        .tl-info {
          width: min(400px, 46vw);
        }
        .tl-scrollable {
          padding-left: 34px;
          padding-right: 34px;
        }
        .tl-footer {
          padding-left: 34px;
          padding-right: 34px;
        }
        .tl-nav-prev {
          left: calc(min(400px, 46vw) + 12px);
        }
        #tl-tts-row {
          width: min(400px, 46vw);
        }
      }
      @media (max-width: 760px) {
        /* Stack photo above panel instead of overlapping it — the photo
           gets its own flex-sized band at the top, the panel fills the
           rest, so the full image is always visible before the panel starts */
        .tl-slide {
          display: flex;
          flex-direction: column;
        }
        .tl-photo-strip {
          position: relative;
          inset: auto;
          flex: 0 0 34%;
          width: 100%;
        }
        .tl-slide::after {
          display: none;
        }
        .tl-info {
          position: relative;
          inset: auto;
          flex: 1 1 auto;
          min-height: 0;
          width: 100%;
          max-height: none;
          overflow: hidden;
          border-right: 0;
          border-top: 1px solid rgba(168, 169, 173, 0.38);
        }
        .tl-scrollable {
          padding: 16px 16px 8px;
          gap: 8px;
          touch-action: pan-y;
          overscroll-behavior-y: contain;
        }
        .tl-footer {
          padding: 8px 16px 20px;
        }
        .tl-year {
          font-size: 28px;
        }
        .tl-title {
          font-size: 20px;
        }
        .tl-sub,
        .tl-body {
          font-size: 13px;
        }
        .tl-fact-text {
          font-size: 12px;
        }
        .tl-listen-btn {
          padding: 9px 14px !important;
          font-size: 11px !important;
        }
        .tl-audio-bar {
          padding: 7px 10px;
          gap: 8px;
        }
        .tl-nav {
          width: 38px;
          height: 38px;
        }
        .tl-nav .material-symbols-outlined {
          font-size: 24px;
        }
        /* Anchor arrows to the photo strip (top), never overlapping the
           bottom info panel, whose height varies with slide content */
        .tl-nav-prev {
          left: 10px;
          top: 14px;
          transform: none;
        }
        .tl-nav-next {
          right: 10px;
          top: 14px;
          transform: none;
        }
        /* Moved to the photo strip (top) — bottom is now the info panel/
           audio bar, so a bottom-anchored dots row would overlap them */
        .tl-dots {
          right: 50%;
          top: 18px;
          bottom: auto;
          transform: translateX(50%);
        }
        #tl-tts-row {
          left: 12px;
          bottom: 18px;
          width: auto;
          padding: 0;
          background: none;
          backdrop-filter: none;
          gap: 6px;
        }
        #tl-tts-row .tts-play {
          padding: 7px 13px;
          font-size: 13px;
          box-shadow: 0 3px 0 #930011;
        }
        #tl-tts-row .tts-stop {
          padding: 6px 11px;
          font-size: 13px;
          box-shadow: 0 3px 0 #d4d4d4;
        }
        #tl-tts-status {
          font-size: 12px;
        }
      }
      @media (max-height: 620px) and (min-width: 761px) {
        .tl-scrollable {
          padding: 16px 34px 8px;
          gap: 8px;
        }
        .tl-footer {
          padding: 8px 34px 16px;
        }
        .tl-year {
          font-size: 38px;
        }
        .tl-title {
          font-size: 22px;
        }
        .tl-body {
          font-size: 14px;
          line-height: 1.48;
        }
        .tl-fact-text {
          font-size: 13px;
          line-height: 1.42;
        }
      }

      #confirm-modal {
        position: fixed;
        inset: 0;
        z-index: 500;
        background: rgba(0, 0, 0, 0.45);
        display: none;
        align-items: center;
        justify-content: center;
        backdrop-filter: blur(4px);
      }
      #confirm-modal.open {
        display: flex;
      }
      .confirm-box {
        background: #fff;
        border: 1px solid #a8a9ad;
        border-radius: 20px;
        padding: 28px 28px 24px;
        width: 360px;
        box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
      }
      .confirm-icon {
        font-size: 36px;
        margin-bottom: 10px;
      }
      .confirm-title {
        font-family: "Bricolage Grotesque", sans-serif;
        font-weight: 800;
        font-size: 20px;
        color: #1b1c1b;
        margin-bottom: 8px;
      }
      .confirm-msg {
        font-family: "Plus Jakarta Sans", sans-serif;
        font-size: 15px;
        color: #5d3f3c;
        line-height: 1.5;
        margin-bottom: 24px;
      }
      .confirm-btns {
        display: flex;
        gap: 12px;
      }
      .confirm-ok {
        flex: 1;
        background: #bd001a;
        color: #fff;
        border: none;
        border-radius: 9999px;
        padding: 14px;
        font-family: "Space Grotesk", sans-serif;
        font-weight: 700;
        font-size: 15px;
        letter-spacing: 0.04em;
        cursor: pointer;
        box-shadow: 0 4px 0 #930011;
        transition: all 0.15s;
      }
      .confirm-ok:active {
        transform: translateY(4px);
        box-shadow: none;
      }
      .confirm-cancel {
        flex: 1;
        background: #fff;
        color: #1b1c1b;
        border: 1px solid #a8a9ad;
        border-radius: 9999px;
        padding: 14px;
        font-family: "Space Grotesk", sans-serif;
        font-weight: 700;
        font-size: 15px;
        letter-spacing: 0.04em;
        cursor: pointer;
        box-shadow: 0 4px 0 #d4d4d4;
        transition: all 0.15s;
      }
      .confirm-cancel:active {
        transform: translateY(4px);
        box-shadow: none;
      }

      /* ── Toast ── */
      #toast {
        position: fixed;
        bottom: max(24px, calc(env(safe-area-inset-bottom) + 8px));
        right: 24px;
        max-width: min(360px, calc(100vw - 48px));
        box-sizing: border-box;
        white-space: normal;
        word-wrap: break-word;
        text-align: center;
        background: linear-gradient(135deg, #06b6a4, #22c55e);
        border-radius: 50px;
        padding: 12px 22px;
        font-size: 17px;
        font-weight: 700;
        display: none;
        z-index: 500;
        font-family: "Space Grotesk", sans-serif;
      }

      /* ═══════════════════════════════════════════
         RESPONSIVE — Mobile & Small Tablet
         Targets: phones (≤600px) and small tablets (≤900px portrait)
      ═══════════════════════════════════════════ */

      /* ── Small tablet portrait (≤900px) ── */
      @media (max-width: 900px) {
        /* Dashboard — allow scroll on mobile */
        #dashboard {
          padding: 16px 18px max(14px, env(safe-area-inset-bottom));
          gap: 10px;
          overflow-y: auto;
          overflow-x: hidden;
          height: 100vh;
          height: 100dvh;
        }
        .greeting-title {
          font-size: clamp(26px, 4vw, 36px);
        }
        .greeting-sub {
          font-size: 14px;
        }

        /* Bento: 2-col, auto rows, tiles size to content */
        .bento-grid {
          grid-template-columns: 1fr 1fr;
          grid-template-rows: unset;
          grid-auto-rows: auto;
          gap: 10px;
          overflow: visible;
          height: auto;
          flex: unset;
        }
        /* reset row spans — let content dictate height */
        .t-city,
        .t-guide,
        .t-quiz,
        .t-timeline,
        .t-lb {
          grid-row: unset !important;
          overflow: visible !important;
          height: auto !important;
        }
        .t-city {
          grid-column: span 2;
        }
        .t-guide {
          grid-column: span 1;
        }
        .t-quiz {
          grid-column: span 1;
        }
        .t-timeline {
          grid-column: span 1;
        }
        .t-lb {
          grid-column: span 2;
        }

        /* tile — force natural height, no clipping */
        .tile {
          overflow: visible !important;
          height: auto !important;
        }
        .tile-inner {
          padding: 16px !important;
          height: auto !important;
          min-height: unset !important;
        }
        .tile-tag {
          font-size: 11px;
          padding: 3px 10px;
        }
        .tile-btn {
          font-size: 13px;
          padding: 11px 18px;
          align-self: stretch;
          text-align: center;
          display: block;
        }

        /* Overlay topbar */
        .ov-topbar {
          padding: 12px 18px;
        }
        .ov-topbar-title {
          font-size: 17px;
        }
        .back-btn {
          font-size: 13px;
          padding: 8px 16px;
        }

        /* Guide 2-col */
        .guide-grid {
          grid-template-columns: 1fr 1fr;
          gap: 10px;
          padding: 6px 18px 20px;
        }

        /* Quiz */
        .q-opts-grid {
          grid-template-columns: 1fr 1fr;
          gap: 10px;
        }
        .q-question {
          font-size: 22px;
        }
        .q-opt {
          font-size: 16px;
          min-height: 68px;
          padding: 16px 14px;
        }
        .quiz-topics-grid {
          grid-template-columns: 1fr 1fr;
        }

        /* Timeline */
        .tl-hero-title {
          font-size: 22px;
        }
        .tl-hero {
          padding: 14px 18px 10px;
        }

        /* Detail */
        .detail-pad {
          padding: 16px;
        }
        .detail-title {
          font-size: 26px;
        }
        .detail-text {
          font-size: 16px;
        }

        /* Leaderboard — tighten columns so they don't get cramped */
        .lb-head {
          padding: 16px 18px 0;
        }
        .lb-head h2 {
          font-size: 26px;
        }
        .lb-head p {
          font-size: 14px;
        }
        .lb-filters {
          padding: 0 18px 12px;
        }
        .lb-tbl {
          margin: 0 18px;
          width: calc(100% - 36px);
        }
        .lb-tbl th,
        .lb-tbl td {
          padding: 10px 8px;
          font-size: 13px;
        }
        .lb-tbl td {
          font-size: 14px;
        }

        /* Result */
        .result-score {
          font-size: 80px;
        }
      }

      /* ── Phone landscape (≤812px height) ── */
      @media (max-height: 500px) {
        #dashboard {
          padding: 10px 16px max(8px, env(safe-area-inset-bottom));
          gap: 6px;
          overflow-y: auto;
          height: 100vh;
          height: 100dvh;
        }
        .bento-grid {
          grid-template-columns: repeat(3, 1fr);
          overflow-y: auto;
        }
        .t-city {
          grid-column: span 3;
          min-height: 160px;
        }
        .t-guide,
        .t-quiz {
          grid-column: span 1;
          min-height: 130px;
        }
        .t-timeline,
        .t-lb {
          grid-column: span 1;
          min-height: 110px;
        }
        .greeting-title {
          font-size: 24px;
        }
        .greeting-sub {
          font-size: 13px;
          margin-top: 2px;
        }

        /* overlays scroll on small height */
        .ov-scrollable {
          overflow-y: auto;
        }
        .detail-hero {
          height: 140px;
        }
        .cty-hero {
          min-height: 140px;
        }
        .q-question {
          font-size: 18px;
          margin-bottom: 14px;
        }
        .q-opt {
          font-size: 14px;
          min-height: 54px;
          padding: 12px;
        }
      }

      /* ── Phone portrait (≤600px) ── */
      @media (max-width: 600px) {
        /* Research carousel — show full landscape image with letterboxing on portrait mobile */
        .research-slide {
          object-fit: contain;
          object-position: center center;
        }
        /* Idle wordmark */
        .idle-wordmark {
          font-size: clamp(48px, 14vw, 80px);
          letter-spacing: -1px;
        }
        .idle-tap {
          font-size: 13px;
          margin-top: 20px;
        }

        /* Dashboard */
        #dashboard {
          padding: 14px 14px max(12px, env(safe-area-inset-bottom));
          gap: 8px;
          overflow-y: auto;
          height: 100vh;
          height: 100dvh;
        }
        .greeting-title {
          font-size: clamp(24px, 7vw, 32px);
        }
        .greeting-sub {
          font-size: 13px;
        }

        /* Bento: single column on small phones */
        .bento-grid {
          grid-template-columns: 1fr;
          grid-auto-rows: auto !important;
          overflow: visible !important;
          height: auto !important;
          flex: unset !important;
        }
        .t-city,
        .t-guide,
        .t-quiz,
        .t-timeline,
        .t-lb {
          grid-column: span 1 !important;
          grid-row: unset !important;
          height: auto !important;
          overflow: visible !important;
        }
        /* Tile text scales down */
        .tile-inner {
          padding: 14px !important;
          height: auto !important;
          min-height: unset !important;
        }
        .tile {
          overflow: visible !important;
          height: auto !important;
        }
        .tile-tag {
          font-size: 10px;
        }
        .tile-btn {
          font-size: 12px;
          padding: 10px 16px;
          align-self: stretch;
          text-align: center;
          display: block;
        }

        /* Guide: single col on phone */
        .guide-grid {
          grid-template-columns: 1fr;
          padding: 6px 14px 20px;
        }
        .exp-card-title {
          font-size: 16px;
        }
        .exp-card-preview {
          font-size: 13px;
        }

        /* Quiz: single col options */
        .q-opts-grid {
          grid-template-columns: 1fr;
          gap: 8px;
        }
        .quiz-topics-grid {
          grid-template-columns: 1fr;
        }
        .q-question {
          font-size: 20px;
        }
        .q-opt {
          font-size: 15px;
          min-height: 56px;
        }
        .quiz-game {
          padding: 14px;
        }
        .quiz-sel-pad {
          padding: 14px;
        }

        /* Detail */
        .detail-hero {
          height: 180px;
        }
        .detail-hero-text {
          padding: 14px;
        }
        .detail-title {
          font-size: 22px;
        }
        .detail-pad {
          padding: 14px;
        }
        .detail-text {
          font-size: 15px;
        }
        .tts-play {
          font-size: 14px;
          padding: 11px 18px;
        }
        .quiz-cta {
          flex-direction: column;
          gap: 10px;
        }
        .quiz-cta-btn {
          width: 100%;
          text-align: center;
        }

        /* Timeline */
        .tl-hero {
          padding: 12px 14px 8px;
        }
        .tl-hero-title {
          font-size: 22px;
        }
        .tl-events {
          padding: 0 14px 0 56px;
        }
        .tl-card-title {
          font-size: 20px;
        }
        .tl-card-body {
          font-size: 14px;
        }

        /* Overlay topbar */
        .ov-topbar {
          padding: 10px 14px;
        }
        .ov-topbar-title {
          font-size: 15px;
        }
        .back-btn {
          font-size: 12px;
          padding: 7px 14px;
        }
        .ov-icon {
          width: 32px;
          height: 32px;
          font-size: 16px;
        }

        /* Leaderboard */
        .lb-head {
          padding: 14px 14px 0;
        }
        .lb-head h2 {
          font-size: 22px;
        }
        .lb-filters {
          padding: 0 14px 10px;
          gap: 6px;
        }
        .lb-tbl {
          margin: 0 14px;
          width: calc(100% - 28px);
        }
        .lb-tbl th,
        .lb-tbl td {
          padding: 10px 10px;
          font-size: 12px;
        }
        /* hide less important columns on phone */
        .lb-tbl th:nth-child(3),
        .lb-tbl td:nth-child(3),
        .lb-tbl th:nth-child(6),
        .lb-tbl td:nth-child(6) {
          display: none;
        }

        /* Result */
        .result-score {
          font-size: 72px;
        }
        .result-msg {
          font-size: 18px;
        }
        .q-result {
          padding: 16px;
        }
        .result-form {
          max-width: 100%;
        }

        /* Confirm modal */
        .confirm-box {
          width: calc(100vw - 32px);
          padding: 20px;
        }
        .confirm-title {
          font-size: 18px;
        }
        .confirm-msg {
          font-size: 14px;
        }

        /* Bottom bar — 5 buttons collapse to icon-only circles so they
           always fit one row, instead of wrapping/overflowing offscreen */
        .dash-bottombar {
          gap: 6px;
        }
        .dash-bottombar-right {
          gap: 6px !important;
        }
        .dash-bottombar-btn {
          width: 38px !important;
          height: 38px !important;
          padding: 0 !important;
          gap: 0 !important;
          justify-content: center !important;
          flex-shrink: 0 !important;
        }
        .dash-bottombar-btn .dash-btn-label {
          display: none;
        }
        .dash-bottombar-btn .material-symbols-outlined {
          font-size: 18px !important;
        }

        /* Toast: full-width pill, no edge clipping */
        #toast {
          left: 16px;
          right: 16px;
          bottom: max(16px, calc(env(safe-area-inset-bottom) + 8px));
          max-width: calc(100vw - 32px);
          border-radius: 16px;
          font-size: 14px;
          padding: 12px 16px;
        }
      }

      /* ── QR Modal ── */
      #qr-modal-backdrop {
        position: fixed;
        inset: 0;
        z-index: 500;
        background: rgba(0, 0, 0, 0.55);
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.22s ease;
      }
      #qr-modal-backdrop.open {
        opacity: 1;
        pointer-events: all;
      }
      #qr-modal {
        background: #faf9f7;
        border-radius: 24px;
        padding: 32px 28px 28px;
        max-width: 340px;
        width: calc(100vw - 48px);
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 16px;
        transform: scale(0.92);
        transition: transform 0.22s ease;
        border: 1px solid #a8a9ad;
      }
      #qr-modal-backdrop.open #qr-modal {
        transform: scale(1);
      }
      .qr-modal-title {
        font-family: "Bricolage Grotesque", sans-serif;
        font-weight: 800;
        font-size: 22px;
        color: #1b1c1b;
        letter-spacing: -0.01em;
        text-align: center;
      }
      .qr-modal-sub {
        font-family: "Plus Jakarta Sans", sans-serif;
        font-size: 14px;
        color: #926e6b;
        text-align: center;
        line-height: 1.5;
        margin-top: -6px;
      }
      .qr-img-wrap {
        width: 220px;
        height: 220px;
        border-radius: 16px;
        border: 2px solid #a8a9ad;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #fff;
      }
      .qr-img-wrap img {
        width: 100%;
        height: 100%;
        object-fit: contain;
      }
      .qr-close-btn {
        background: #fff;
        border: 1px solid #a8a9ad;
        color: #926e6b;
        border-radius: 9999px;
        padding: 10px 28px;
        font-family: "Space Grotesk", sans-serif;
        font-weight: 700;
        font-size: 13px;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        cursor: pointer;
        box-shadow: 0 4px 0 #d4d4d4;
        transition: all 0.15s;
        margin-top: 4px;
      }
      .qr-close-btn:active {
        transform: translateY(4px);
        box-shadow: none;
      }

      /* ── MOBILE INLINE OVERRIDE — targets inline styles on tile elements ── */
      @media (max-width: 900px) {
        /* Force tiles to expand to content */
        .bento-grid {
          display: flex !important;
          flex-direction: column !important;
          gap: 12px !important;
          overflow-y: auto !important;
          overflow-x: hidden !important;
          height: auto !important;
        }
        .t-city,
        .t-guide,
        .t-quiz,
        .t-timeline,
        .t-lb {
          width: 100% !important;
          height: auto !important;
          overflow: visible !important;
          grid-column: unset !important;
          grid-row: unset !important;
        }
        .t-city {
          overflow: hidden !important;
        }
        /* Hide mono logo on mobile to prevent text overlap */
        #btn-guide > img {
          display: none !important;
        }
        .t-timeline {
          min-height: 170px !important;
          overflow: hidden !important;
          position: relative !important;
        }
        /* Timeline dashboard tile — scale down icon/title/button (not inside .tile-inner) */
        .t-timeline .tl-dash-icon-wrap {
          width: 40px !important;
          height: 40px !important;
          top: 14px !important;
          left: 14px !important;
        }
        .t-timeline .fill-icon {
          font-size: 20px !important;
        }
        /* padding-top clears the icon badge, padding-bottom clears the button */
        .t-timeline .tl-dash-content {
          padding: 14px !important;
          padding-top: 60px !important;
          padding-bottom: 64px !important;
          justify-content: flex-start !important;
        }
        .t-timeline .tile-title {
          font-size: 22px !important;
          margin-bottom: 2px !important;
        }
        .t-timeline .tl-dash-sub {
          font-size: 11px !important;
        }
        .t-timeline .tl-dash-btn-wrap {
          padding: 14px !important;
        }
        .t-timeline .tile-btn {
          padding: 11px 18px !important;
          font-size: 13px !important;
        }
        .tile {
          overflow: visible !important;
          height: auto !important;
          border-radius: 16px !important;
        }
        .tile-inner {
          height: auto !important;
          padding: 16px !important;
          min-height: unset !important;
          justify-content: flex-start !important;
          gap: 12px !important;
        }
        /* buttons flow after content, full width */
        .tile-inner > button.tile-btn,
        .tile-inner button.tile-btn {
          margin-top: 4px !important;
          align-self: stretch !important;
          width: 100% !important;
          display: block !important;
          text-align: center !important;
          order: 99 !important;
        }

        /* Scale down all inline font-sizes inside tiles using * selector */
        .tile-inner * {
          font-size: revert;
        }
        /* Re-apply sensible sizes */
        .tile-inner [style*="font-size: clamp(36px"] {
          font-size: 26px !important;
        }
        .tile-inner [style*="font-size: clamp(28px"] {
          font-size: 26px !important;
        }
        .tile-inner [style*="font-size: 30px"] {
          font-size: 20px !important;
        }
        .tile-inner [style*="font-size: 28px"] {
          font-size: 19px !important;
        }
        .tile-inner [style*="font-size: 26px"] {
          font-size: 18px !important;
        }
        .tile-inner [style*="font-size: 24px"] {
          font-size: 17px !important;
        }
        .tile-inner [style*="font-size: 18px"] {
          font-size: 14px !important;
        }
        .tile-inner [style*="font-size: 17px"] {
          font-size: 13px !important;
        }
        .tile-inner [style*="font-size: 16px"] {
          font-size: 13px !important;
        }
        .tile-inner [style*="font-size: 14px"] {
          font-size: 12px !important;
        }
        .tile-inner [style*="font-size: 13px"] {
          font-size: 11px !important;
        }

        /* Tile buttons full width */
        .tile-btn {
          width: 100% !important;
          text-align: center !important;
          display: block !important;
          align-self: stretch !important;
        }

        /* Greeting */
        .greeting-title {
          font-size: 28px !important;
        }
        .greeting-sub {
          font-size: 14px !important;
        }

        /* Bottom bar — wrap to a second row instead of overflowing,
           and shrink padding/font so more buttons fit per row */
        .dash-bottombar {
          flex-wrap: wrap !important;
          row-gap: 8px !important;
        }
        .dash-bottombar-right {
          flex-wrap: wrap !important;
          row-gap: 8px !important;
          justify-content: flex-end !important;
        }
        .dash-bottombar-btn {
          font-size: 12px !important;
          padding: 9px 16px !important;
          gap: 6px !important;
        }
      }

      @media (max-width: 600px) {
        /* Timeline dashboard tile — further scale down on small phones */
        .t-timeline {
          min-height: 150px !important;
        }
        .t-timeline .tl-dash-icon-wrap {
          width: 34px !important;
          height: 34px !important;
          top: 10px !important;
          left: 10px !important;
          border-radius: 10px !important;
        }
        .t-timeline .fill-icon {
          font-size: 16px !important;
        }
        /* padding-top clears the icon badge, padding-bottom clears the button */
        .t-timeline .tl-dash-content {
          padding: 10px 12px !important;
          padding-top: 50px !important;
          padding-bottom: 54px !important;
          justify-content: flex-start !important;
        }
        .t-timeline .tile-title {
          font-size: 18px !important;
        }
        .t-timeline .tl-dash-sub {
          font-size: 10px !important;
        }
        .t-timeline .tl-dash-btn-wrap {
          padding: 10px 12px !important;
        }
        .t-timeline .tile-btn {
          padding: 9px 14px !important;
          font-size: 12px !important;
        }

        .tile-inner [style*="font-size: clamp(36px"] {
          font-size: 22px !important;
        }
        .tile-inner [style*="font-size: clamp(28px"] {
          font-size: 22px !important;
        }
        .tile-inner [style*="font-size: 30px"] {
          font-size: 18px !important;
        }
        .tile-inner [style*="font-size: 28px"] {
          font-size: 17px !important;
        }
        .tile-inner [style*="font-size: 26px"] {
          font-size: 16px !important;
        }
        .tile-inner [style*="font-size: 24px"] {
          font-size: 15px !important;
        }
        .tile-inner [style*="font-size: 18px"] {
          font-size: 13px !important;
        }
        .tile-inner [style*="font-size: 17px"] {
          font-size: 12px !important;
        }
        .tile-inner [style*="font-size: 16px"] {
          font-size: 12px !important;
        }
        .greeting-title {
          font-size: 24px !important;
        }
        .greeting-sub {
          font-size: 13px !important;
        }
      }

      /* ════════════════════════════════════════════
         ADMIN PIN MODAL
         ════════════════════════════════════════════ */
      #admin-pin-modal {
        position: fixed;
        inset: 0;
        z-index: 600;
        background: rgba(0, 0, 0, 0.6);
        display: none;
        align-items: center;
        justify-content: center;
        backdrop-filter: blur(6px);
      }
      .pin-box {
        background: #faf9f7;
        border-radius: 24px;
        border: 1px solid #a8a9ad;
        padding: 32px 28px 28px;
        width: 320px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 14px;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
      }
      .pin-icon-lg { font-size: 36px; }
      .pin-title {
        font-family: "Bricolage Grotesque", sans-serif;
        font-weight: 800;
        font-size: 22px;
        color: #1b1c1b;
      }
      .pin-dots {
        display: flex;
        gap: 14px;
        padding: 6px 0;
      }
      .pin-dot {
        width: 16px;
        height: 16px;
        border-radius: 50%;
        background: #e3e2e0;
        border: 2px solid #a8a9ad;
        transition: all 0.15s;
      }
      .pin-dot.filled {
        background: #bd001a;
        border-color: #bd001a;
      }
      .pin-error {
        font-family: "Space Grotesk", sans-serif;
        font-size: 14px;
        font-weight: 700;
        color: #bd001a;
        min-height: 18px;
        text-align: center;
      }
      @keyframes pinShake {
        0%, 100% { transform: translateX(0); }
        15%  { transform: translateX(-8px); }
        30%  { transform: translateX(8px); }
        45%  { transform: translateX(-6px); }
        60%  { transform: translateX(6px); }
        75%  { transform: translateX(-4px); }
        90%  { transform: translateX(4px); }
      }
      .pin-dots.shake { animation: pinShake 0.5s ease; }
      .pin-numpad {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        width: 100%;
      }
      .pin-key {
        background: #fff;
        border: 1px solid #a8a9ad;
        border-radius: 14px;
        padding: 16px 8px;
        font-family: "Space Grotesk", sans-serif;
        font-size: 20px;
        font-weight: 700;
        color: #1b1c1b;
        cursor: pointer;
        text-align: center;
        box-shadow: 0 4px 0 #d4d4d4;
        transition: all 0.12s;
        user-select: none;
        line-height: 1;
      }
      .pin-key:active { transform: translateY(4px); box-shadow: none; }
      .pin-key.pin-clear { font-size: 13px; color: #926e6b; }
      .pin-key.pin-del   { font-size: 16px; color: #bd001a; }
      .pin-cancel {
        background: none;
        border: none;
        font-family: "Space Grotesk", sans-serif;
        font-size: 14px;
        font-weight: 700;
        color: #926e6b;
        cursor: pointer;
        padding: 4px 12px;
        letter-spacing: 0.04em;
      }

      /* ════════════════════════════════════════════
         ADMIN OVERLAY
         ════════════════════════════════════════════ */
      #admin-tabs {
        display: flex;
        gap: 8px;
        padding: 12px 28px;
        flex-shrink: 0;
        border-bottom: 1px solid #a8a9ad;
        background: #faf9f7;
      }
      .admin-tab-btn {
        background: #fff;
        border: 1px solid #a8a9ad;
        color: #5d3f3c;
        border-radius: 9999px;
        padding: 8px 22px;
        font-family: "Space Grotesk", sans-serif;
        font-size: 14px;
        font-weight: 700;
        letter-spacing: 0.04em;
        cursor: pointer;
        transition: all 0.15s;
      }
      .admin-tab-btn.on {
        background: #1b1c1b;
        color: #fff;
        border-color: #1b1c1b;
      }
      .admin-tab-content { padding: 20px 28px 48px; }

      /* ── Admin layout: hero pinned, tab content scrolls ── */
      #ov-admin {
        display: flex;
        flex-direction: column;
      }
      #admin-tabs {
        flex-shrink: 0;
      }
      #admin-tab-content-wrap {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        background: #faf9f7;
      }

      /* ── AI Insights Tab ── */
      #admin-ai-hero {
        background: linear-gradient(135deg, #1b1c1b 0%, #2d2d2b 100%);
        border-radius: 16px;
        padding: 20px 24px;
        margin: 16px 20px 20px 20px;
        border: 1px solid #3a3a38;
      }
      #admin-ai-hero-header {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 16px;
        flex-wrap: wrap;
        margin-bottom: 12px;
      }
      #admin-ai-hero-title {
        font-family: "Fraunces", serif;
        font-size: 20px;
        font-weight: 700;
        color: #fcd400;
        margin-bottom: 2px;
      }
      #admin-ai-hero-sub {
        font-family: "Plus Jakarta Sans", sans-serif;
        font-size: 12px;
        color: rgba(255,255,255,0.5);
      }
      #admin-ai-hero-controls {
        display: flex;
        gap: 8px;
        align-items: center;
        flex-wrap: wrap;
      }
      .groq-dd { position: relative; }
      .groq-dd-trigger {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 8px 14px;
        background: rgba(255,255,255,0.07);
        border: 1px solid rgba(255,255,255,0.18);
        border-radius: 9999px;
        cursor: pointer;
        user-select: none;
        transition: border-color 0.15s, background 0.15s;
        white-space: nowrap;
      }
      .groq-dd-trigger:hover { border-color: rgba(255,255,255,0.35); background: rgba(255,255,255,0.11); }
      .groq-dd.open .groq-dd-trigger { border-color: #fcd400; background: rgba(252,212,0,0.08); }
      .groq-dd-label { font-family: "Space Grotesk", sans-serif; font-size: 12px; font-weight: 600; color: #fff; }
      .groq-dd-arrow {
        width: 6px; height: 6px;
        border-right: 2px solid rgba(255,255,255,0.45);
        border-bottom: 2px solid rgba(255,255,255,0.45);
        transform: rotate(45deg) translateY(-2px);
        transition: transform 0.15s, border-color 0.15s;
        flex-shrink: 0; margin-top: -2px;
      }
      .groq-dd.open .groq-dd-arrow { transform: rotate(-135deg) translateY(0px); border-color: #fcd400; }
      .groq-dd-menu {
        display: none;
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        background: #1a1b1a;
        border: 1px solid rgba(255,255,255,0.12);
        border-radius: 14px;
        padding: 6px;
        min-width: 190px;
        z-index: 9999;
        box-shadow: 0 12px 32px rgba(0,0,0,0.55);
      }
      .groq-dd.open .groq-dd-menu { display: block; }
      .groq-dd-item {
        padding: 9px 12px;
        border-radius: 9px;
        font-family: "Plus Jakarta Sans", sans-serif;
        font-size: 12px;
        font-weight: 500;
        color: rgba(255,255,255,0.65);
        cursor: pointer;
        transition: background 0.1s, color 0.1s;
      }
      .groq-dd-item:hover { background: rgba(255,255,255,0.07); color: #fff; }
      .groq-dd-item.selected { background: rgba(252,212,0,0.12); color: #fcd400; font-weight: 600; }
      #groq-analyze-btn {
        font-family: "Space Grotesk", sans-serif;
        font-size: 12px;
        font-weight: 700;
        background: #fcd400;
        color: #1b1c1b;
        border: none;
        border-radius: 9999px;
        padding: 8px 18px;
        cursor: pointer;
        white-space: nowrap;
        box-shadow: 0 3px 0 #b89e00;
        transition: all 0.15s;
      }
      #groq-analyze-btn:active { box-shadow: none; transform: translateY(2px); }
      #groq-output { min-height: 60px; }
      #groq-placeholder { font-family: "Plus Jakarta Sans", sans-serif; font-size: 13px; color: rgba(255,255,255,0.35); text-align: center; padding: 16px 0 4px; }
      #groq-error { font-family: "Plus Jakarta Sans", sans-serif; font-size: 13px; color: #ff6b6b; padding: 8px 0; }
      #groq-loading { font-family: "Plus Jakarta Sans", sans-serif; font-size: 13px; color: rgba(255,255,255,0.6); padding: 12px 0; }
      .groq-spinner {
        display: inline-block;
        width: 13px; height: 13px;
        border: 2px solid #fcd400;
        border-top-color: transparent;
        border-radius: 50%;
        animation: spin 0.7s linear infinite;
        vertical-align: middle;
        margin-left: 6px;
      }
      #groq-cards { display: flex; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
      .groq-card { flex: 1 1 0; min-width: 180px; border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
      .groq-card-strengths { background: rgba(34,197,94,0.10); border: 1px solid rgba(34,197,94,0.25); }
      .groq-card-weaknesses { background: rgba(239,68,68,0.10); border: 1px solid rgba(239,68,68,0.25); }
      .groq-card-improve { background: rgba(252,212,0,0.10); border: 1px solid rgba(252,212,0,0.30); }
      .groq-card-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
      .groq-card-icon { font-size: 18px; line-height: 1; }
      .groq-card-title { font-family: "Space Grotesk", sans-serif; font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
      .groq-card-strengths  .groq-card-title { color: #4ade80; }
      .groq-card-weaknesses .groq-card-title { color: #f87171; }
      .groq-card-improve    .groq-card-title { color: #fcd400; }
      .groq-card-body { font-family: "Plus Jakarta Sans", sans-serif; font-size: 12.5px; line-height: 1.7; color: rgba(255,255,255,0.80); }
      .groq-card-body ul { padding-left: 16px; margin: 0; list-style: disc; }
      .groq-card-body li { margin-bottom: 5px; }
      .groq-card-body li:last-child { margin-bottom: 0; }

      /* ── Analytics Tab ── */
      #admin-tab-analytics { padding: 16px 16px 24px; }
      .analytics-topic-bar {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 18px;
        flex-wrap: wrap;
      }
      .analytics-topic-bar label {
        font-family: "Space Grotesk", sans-serif;
        font-size: 12px;
        font-weight: 700;
        color: #888;
        text-transform: uppercase;
        letter-spacing: 0.06em;
      }
      .analytics-topic-select {
        font-family: "Space Grotesk", sans-serif;
        font-size: 13px;
        font-weight: 600;
        color: #1c1c28;
        background: #efeeec;
        border: 1.5px solid #c8c9cf;
        border-radius: 9px;
        padding: 7px 12px;
        outline: none;
        cursor: pointer;
        flex: 1;
        min-width: 160px;
      }
      .analytics-stat-chips {
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
        margin-bottom: 20px;
      }
      .analytics-chip {
        background: #f5f4f2;
        border: 1.5px solid #dddcda;
        border-radius: 12px;
        padding: 10px 16px;
        min-width: 90px;
      }
      .analytics-chip-val {
        font-family: "Space Grotesk", sans-serif;
        font-size: 22px;
        font-weight: 800;
        color: #1c1c28;
      }
      .analytics-chip-label {
        font-family: "Space Grotesk", sans-serif;
        font-size: 11px;
        font-weight: 500;
        color: #888;
        margin-top: 1px;
      }
      .analytics-section-title {
        font-family: "Space Grotesk", sans-serif;
        font-size: 11px;
        font-weight: 700;
        color: #888;
        letter-spacing: 0.09em;
        text-transform: uppercase;
        margin: 0 0 10px;
      }
      .analytics-q-card {
        background: #fff;
        border: 1.5px solid #e0dedd;
        border-radius: 14px;
        padding: 16px;
        margin-bottom: 12px;
      }
      .analytics-q-header {
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        margin-bottom: 4px;
      }
      .analytics-q-label {
        font-family: "Space Grotesk", sans-serif;
        font-size: 11px;
        font-weight: 700;
        color: #888;
        text-transform: uppercase;
        letter-spacing: 0.06em;
      }
      .analytics-q-pct {
        font-family: "Space Grotesk", sans-serif;
        font-size: 13px;
        font-weight: 700;
      }
      .analytics-q-text {
        font-family: "Space Grotesk", sans-serif;
        font-size: 14px;
        font-weight: 600;
        color: #1c1c28;
        margin-bottom: 14px;
        line-height: 1.45;
      }
      .analytics-bar-row {
        display: grid;
        grid-template-columns: 18px 1fr 36px;
        align-items: center;
        gap: 8px;
        margin-bottom: 7px;
      }
      .analytics-bar-letter {
        font-family: "Space Grotesk", sans-serif;
        font-size: 11px;
        font-weight: 700;
        color: #aaa;
      }
      .analytics-bar-wrap {
        background: #eeecea;
        border-radius: 5px;
        height: 26px;
        position: relative;
        overflow: hidden;
      }
      .analytics-bar-fill {
        height: 100%;
        border-radius: 5px;
        transition: width 0.5s cubic-bezier(0.4,0,0.2,1);
        min-width: 0;
      }
      .analytics-bar-fill-wrong { background: #d6d4d1; }
      .analytics-bar-fill-correct { background: #bbf7d0; }
      .analytics-bar-label {
        position: absolute;
        left: 8px;
        top: 50%;
        transform: translateY(-50%);
        font-family: "Space Grotesk", sans-serif;
        font-size: 11px;
        font-weight: 600;
        color: #333;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: calc(100% - 16px);
        pointer-events: none;
      }
      .analytics-bar-count {
        font-family: "Space Grotesk", sans-serif;
        font-size: 11px;
        font-weight: 600;
        color: #888;
        text-align: right;
      }
      .analytics-bar-row.is-correct .analytics-bar-letter { color: #16a34a; }
      .analytics-bar-row.is-correct .analytics-bar-fill-correct { background: #22c55e; }
      .analytics-bar-row.is-correct .analytics-bar-label { color: #14532d; font-weight: 700; }
      .analytics-bar-row.is-correct .analytics-bar-count { color: #16a34a; }
      .analytics-q-foot {
        font-family: "Space Grotesk", sans-serif;
        font-size: 11px;
        color: #888;
        margin-top: 8px;
        padding-top: 8px;
        border-top: 1px solid #eeecea;
      }
      .analytics-overall {
        background: #fff;
        border: 1.5px solid #e0dedd;
        border-radius: 14px;
        overflow: hidden;
        margin-top: 4px;
      }
      .analytics-overall-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 16px;
        border-bottom: 1px solid #f0efed;
        font-family: "Space Grotesk", sans-serif;
      }
      .analytics-overall-row:last-child { border-bottom: none; }
      .analytics-overall-key { font-size: 13px; color: #666; font-weight: 500; }
      .analytics-overall-val { font-size: 13px; color: #1c1c28; font-weight: 700; }
      .analytics-subrows { border-bottom: 1px solid #f0efed; }
      .analytics-grade-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 7px 16px 7px 28px;
        font-family: "Space Grotesk", sans-serif;
        border-bottom: 1px solid #f7f6f5;
      }
      .analytics-grade-row:last-child { border-bottom: none; }
      .analytics-grade-key { font-size: 12px; color: #888; }
      .analytics-grade-val { font-size: 12px; color: #444; font-weight: 600; }
      .analytics-empty {
        text-align: center;
        padding: 48px 20px;
        font-family: "Space Grotesk", sans-serif;
        font-size: 14px;
        color: #888;
      }
      @keyframes spin { to { transform: rotate(360deg); } }

      /* Scores tab */
      .admin-toolbar {
        display: flex;
        gap: 10px;
        align-items: center;
        margin-bottom: 16px;
        flex-wrap: wrap;
      }
      .admin-search {
        flex: 1;
        min-width: 160px;
        background: #efeeec;
        border: 1px solid #a8a9ad;
        border-radius: 10px;
        padding: 10px 14px;
        font-family: "Plus Jakarta Sans", sans-serif;
        font-size: 15px;
        outline: none;
        color: #1b1c1b;
      }
      .admin-search:focus { border-color: #bd001a; }
      .admin-select {
        background: #fff;
        border: 1px solid #a8a9ad;
        border-radius: 10px;
        padding: 10px 14px;
        font-family: "Space Grotesk", sans-serif;
        font-size: 14px;
        font-weight: 700;
        color: #1b1c1b;
        outline: none;
        cursor: pointer;
      }
      .admin-export-btn {
        background: #0038a8;
        color: #fff;
        border: none;
        border-radius: 9999px;
        padding: 10px 20px;
        font-family: "Space Grotesk", sans-serif;
        font-size: 14px;
        font-weight: 700;
        cursor: pointer;
        letter-spacing: 0.04em;
        white-space: nowrap;
        box-shadow: 0 4px 0 #002575;
        transition: all 0.15s;
      }
      .admin-export-btn:active { transform: translateY(4px); box-shadow: none; }
      .admin-tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
      .admin-tbl th {
        text-align: left;
        font-family: "Space Grotesk", sans-serif;
        font-size: 11px;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: #926e6b;
        padding: 10px 12px;
        background: #efeeec;
        border-bottom: 1px solid #a8a9ad;
        font-weight: 700;
      }
      .admin-tbl td {
        padding: 11px 12px;
        border-bottom: 1px solid #e7bdb9;
        font-family: "Plus Jakarta Sans", sans-serif;
        color: #1b1c1b;
        background: #fff;
        font-size: 14px;
      }
      .admin-tbl tr:hover td { background: #fdf5f5; }
      .admin-del-btn {
        background: #fff;
        border: 1px solid #ef4444;
        color: #ef4444;
        border-radius: 8px;
        padding: 4px 10px;
        font-size: 12px;
        cursor: pointer;
        font-family: "Space Grotesk", sans-serif;
        font-weight: 700;
        white-space: nowrap;
        transition: all 0.12s;
      }
      .admin-del-btn:hover { background: #fde8e8; }
      .admin-del-yes {
        background: #bd001a;
        color: #fff;
        border: none;
        border-radius: 8px;
        padding: 4px 10px;
        font-size: 12px;
        font-family: "Space Grotesk", sans-serif;
        font-weight: 700;
        cursor: pointer;
        white-space: nowrap;
      }
      .admin-del-no {
        background: #efeeec;
        color: #1b1c1b;
        border: 1px solid #a8a9ad;
        border-radius: 8px;
        padding: 4px 10px;
        font-size: 12px;
        font-family: "Space Grotesk", sans-serif;
        font-weight: 700;
        cursor: pointer;
        white-space: nowrap;
      }
      .admin-clear-btn {
        margin-top: 24px;
        background: #fff;
        border: 1.5px solid #bd001a;
        color: #bd001a;
        border-radius: 9999px;
        padding: 12px 28px;
        font-family: "Space Grotesk", sans-serif;
        font-size: 15px;
        font-weight: 700;
        cursor: pointer;
        letter-spacing: 0.04em;
        display: block;
        width: 100%;
        transition: all 0.15s;
      }
      .admin-clear-btn:hover { background: #fde8e8; }
      .clear-confirm-box {
        margin-top: 12px;
        background: #fde8e8;
        border: 1px solid #ef4444;
        border-radius: 14px;
        padding: 18px;
        display: none;
      }
      .clear-confirm-box.open { display: block; }
      .clear-confirm-input {
        width: 100%;
        box-sizing: border-box;
        border: 1px solid #a8a9ad;
        border-radius: 8px;
        padding: 10px 12px;
        font-family: "Space Grotesk", sans-serif;
        font-size: 16px;
        font-weight: 700;
        text-align: center;
        letter-spacing: 0.2em;
        margin: 10px 0;
        outline: none;
      }
      .clear-confirm-input:focus { border-color: #bd001a; }

      /* Stats tab */
      .stat-card-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
        margin-bottom: 20px;
      }
      .stat-card {
        background: #fff;
        border: 1px solid #a8a9ad;
        border-radius: 16px;
        padding: 18px 16px;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
      }
      .stat-card-val {
        font-family: "Bricolage Grotesque", sans-serif;
        font-size: 30px;
        font-weight: 800;
        color: #bd001a;
        line-height: 1;
        word-break: break-word;
      }
      .stat-card-lbl {
        font-family: "Space Grotesk", sans-serif;
        font-size: 11px;
        font-weight: 700;
        color: #926e6b;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        margin-top: 6px;
      }
      .bar-chart {
        background: #fff;
        border: 1px solid #a8a9ad;
        border-radius: 16px;
        padding: 18px 20px;
      }
      .bar-chart-title {
        font-family: "Space Grotesk", sans-serif;
        font-size: 12px;
        font-weight: 700;
        color: #926e6b;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        margin-bottom: 14px;
      }
      .bar-row {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 10px;
      }
      .bar-label {
        font-family: "Plus Jakarta Sans", sans-serif;
        font-size: 13px;
        color: #5d3f3c;
        width: 150px;
        flex-shrink: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }
      .bar-track {
        flex: 1;
        height: 22px;
        background: #efeeec;
        border-radius: 6px;
        overflow: hidden;
      }
      .bar-fill {
        height: 100%;
        background: linear-gradient(90deg, #bd001a, #fcd400);
        border-radius: 6px;
        transition: width 0.5s ease;
      }
      .bar-count {
        font-family: "Space Grotesk", sans-serif;
        font-size: 13px;
        font-weight: 700;
        color: #1b1c1b;
        width: 28px;
        text-align: right;
        flex-shrink: 0;
      }

      /* Settings tab */
      .settings-section {
        background: #fff;
        border: 1px solid #a8a9ad;
        border-radius: 16px;
        padding: 20px;
        margin-bottom: 16px;
      }
      .settings-section-title {
        font-family: "Bricolage Grotesque", sans-serif;
        font-size: 18px;
        font-weight: 800;
        color: #1b1c1b;
        margin-bottom: 16px;
      }
      .settings-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 9px 0;
        border-bottom: 1px solid #e7bdb9;
        font-family: "Plus Jakarta Sans", sans-serif;
        font-size: 15px;
        color: #5d3f3c;
      }
      .settings-row:last-child { border-bottom: none; }
      .settings-row-val {
        font-family: "Space Grotesk", sans-serif;
        font-weight: 700;
        color: #1b1c1b;
        font-size: 14px;
        text-align: right;
        max-width: 60%;
        word-break: break-all;
      }
      .settings-input {
        background: #efeeec;
        border: 1px solid #a8a9ad;
        border-radius: 10px;
        padding: 10px 14px;
        font-family: "Space Grotesk", sans-serif;
        font-size: 16px;
        font-weight: 700;
        outline: none;
        color: #1b1c1b;
        width: 100%;
        box-sizing: border-box;
        margin: 6px 0;
      }
      .settings-input:focus { border-color: #bd001a; }
      .settings-btn {
        background: #1b1c1b;
        color: #fff;
        border: none;
        border-radius: 9999px;
        padding: 11px 28px;
        font-family: "Space Grotesk", sans-serif;
        font-size: 15px;
        font-weight: 700;
        cursor: pointer;
        margin-top: 10px;
        letter-spacing: 0.04em;
        transition: opacity 0.15s;
      }
      .settings-btn:active { opacity: 0.75; }
      .settings-msg {
        font-family: "Space Grotesk", sans-serif;
        font-size: 13px;
        font-weight: 700;
        margin-top: 8px;
        min-height: 18px;
      }
      .settings-msg.ok  { color: #16a34a; }
      .settings-msg.err { color: #bd001a; }

      /* ══════════════════════════════════
         HERITAGE STATION DETAIL — Mockup Layout
         Full-screen panel with 70/30 grid
      ══════════════════════════════════ */

      #ov-detail {
        background: #F4F2EF;
        overflow: hidden;
      }

      /* ── Header Bar ── */
      .hs-header {
        flex: 0 0 auto;
        height: 60px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 24px;
        background: #FFFFFF;
        border-bottom: 1px solid #E6E3DE;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
      }
      .hs-header-left {
        display: flex;
        align-items: center;
        gap: 14px;
      }
      .hs-back-btn {
        width: 34px;
        height: 34px;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 1px solid #E6E3DE;
        background: #FFFFFF;
        border-radius: 9px;
        cursor: pointer;
        color: #C0152E;
        transition: background 0.15s;
      }
      .hs-back-btn:active { background: #FEF2F2; }
      .hs-header-title {
        font-family: "Bricolage Grotesque", sans-serif;
        font-weight: 800;
        font-size: 19px;
        letter-spacing: -0.01em;
        color: #C0152E;
      }
      .hs-listen-btn {
        display: flex;
        align-items: center;
        gap: 10px;
        background: #C0152E;
        color: #FFFFFF;
        border: none;
        border-radius: 10px;
        padding: 11px 18px;
        font-family: "Space Grotesk", sans-serif;
        font-weight: 700;
        font-size: 11.5px;
        letter-spacing: 0.13em;
        text-transform: uppercase;
        cursor: pointer;
        box-shadow: 0 2px 10px rgba(192,21,46,0.28);
        transition: opacity 0.15s;
        white-space: nowrap;
      }
      .hs-listen-btn:active { opacity: 0.85; }
      .hs-listen-icon {
        display: flex;
        width: 18px;
        height: 18px;
        align-items: center;
        justify-content: center;
        background: rgba(255,255,255,0.18);
        border-radius: 50%;
        flex-shrink: 0;
      }

      /* ── Main Grid ── */
      .hs-main {
        flex: 1 1 auto;
        min-height: 0;
        display: grid;
        grid-template-columns: minmax(0, 7fr) minmax(260px, 3fr);
        gap: 16px;
        padding: 16px;
        overflow: hidden;
      }

      /* ── Left Section ── */
      .hs-left {
        min-height: 0;
        display: grid;
        grid-template-rows: minmax(0, 1.1fr) minmax(0, 1fr);
        gap: 16px;
      }

      /* ── Hero Image ── */
      .hs-hero {
        position: relative;
        min-height: 0;
        border-radius: 16px;
        overflow: hidden;
        box-shadow: 0 6px 24px rgba(0,0,0,0.12);
        background: #103040;
      }
      .hs-hero-img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.6s ease, opacity 0.4s ease;
      }
      .hs-hero-dots {
        position: absolute;
        bottom: 58px;
        left: 0;
        right: 0;
        display: flex;
        justify-content: center;
        gap: 7px;
        z-index: 4;
      }
      .hs-hero-dot {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: rgba(255,255,255,0.45);
        border: none;
        padding: 0;
        cursor: pointer;
        transition: background 0.25s, transform 0.25s;
      }
      .hs-hero-dot.active {
        background: #fff;
        transform: scale(1.35);
      }
      .hs-hero-overlay {
        position: absolute;
        inset: 0;
        background: linear-gradient(180deg, rgba(0,0,0,0.32) 0%, rgba(0,0,0,0) 26%, rgba(0,0,0,0) 58%, rgba(0,0,0,0.5) 100%);
        pointer-events: none;
      }
      .hs-station-badge {
        position: absolute;
        top: 16px;
        left: 16px;
        display: inline-flex;
        align-items: center;
        gap: 7px;
        background: #C0152E;
        color: #FFFFFF;
        font-family: "Space Grotesk", sans-serif;
        font-weight: 800;
        font-size: 11px;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        padding: 7px 13px;
        border-radius: 8px;
        white-space: nowrap;
        box-shadow: 0 2px 8px rgba(0,0,0,0.3);
      }
      .hs-station-badge::before {
        content: '';
        display: block;
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: #F0C419;
        flex-shrink: 0;
      }
      .hs-hero-bottom {
        position: absolute;
        left: 18px;
        bottom: 16px;
        right: 18px;
        color: #FFFFFF;
        text-shadow: 0 1px 12px rgba(0,0,0,0.6);
      }
      .hs-hero-label {
        font-family: "Space Grotesk", sans-serif;
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.16em;
        text-transform: uppercase;
        opacity: 0.85;
      }
      .hs-hero-title {
        font-family: "Bricolage Grotesque", sans-serif;
        font-size: clamp(20px, 2.4vw, 32px);
        font-weight: 900;
        letter-spacing: -0.02em;
        line-height: 1.05;
        margin-top: 3px;
      }

      /* ── About Box ── */
      .hs-about {
        min-height: 0;
        background: #FFFFFF;
        border: 1px solid #E6E3DE;
        border-radius: 16px;
        padding: 18px 20px;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
      }
      .hs-about-header {
        display: flex;
        align-items: center;
        gap: 10px;
        flex: 0 0 auto;
        min-width: 0;
      }
      .hs-station-tag {
        display: inline-flex;
        align-items: center;
        background: #F0C419;
        color: #5A4500;
        font-family: "Space Grotesk", sans-serif;
        font-weight: 800;
        font-size: 9.5px;
        letter-spacing: 0.13em;
        text-transform: uppercase;
        padding: 4px 9px;
        border-radius: 6px;
        white-space: nowrap;
        flex-shrink: 0;
      }
      .hs-about-title {
        margin: 0;
        font-family: "Bricolage Grotesque", sans-serif;
        font-size: 22px;
        font-weight: 900;
        letter-spacing: -0.01em;
        color: #1A1A1A;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .hs-about-subhead {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-top: 12px;
        flex: 0 0 auto;
        font-family: "Space Grotesk", sans-serif;
        font-weight: 800;
        font-size: 13px;
        letter-spacing: 0.02em;
        color: #1A1A1A;
      }
      .hs-about-icon {
        display: inline-flex;
        width: 24px;
        height: 24px;
        align-items: center;
        justify-content: center;
        border: 1.5px solid #C0152E;
        border-radius: 50%;
        color: #C0152E;
        flex-shrink: 0;
      }
      .hs-about-body {
        display: flex;
        flex-direction: row;
        gap: 12px;
        flex: 1 1 auto;
        min-height: 0;
        align-items: flex-start;
        overflow: hidden;
      }
      .hs-about-body > #detail-indig-block {
        flex-shrink: 0;
        width: 110px;
        align-self: stretch;
      }
      .hs-about-body > #detail-indig-block .hs-indig-tile {
        height: 100%;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        padding: 10px;
        gap: 6px;
      }
      .hs-about-body > #detail-indig-block .hs-indig-tile-title {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        font-size: 11px;
      }
      .hs-about-text {
        margin: 9px 0 0;
        font-family: "Plus Jakarta Sans", sans-serif;
        font-size: 16px;
        line-height: 1.6;
        color: #4A4744;
        flex: 1 1 auto;
        min-height: 60px;
        overflow-y: auto;
      }
      .hs-about-body > .hs-about-text {
        margin: 0;
        min-height: 0;
        -webkit-overflow-scrolling: touch;
      }
      .hs-tts-word {
        display: inline;
        border-radius: 3px;
        padding: 1px 1px;
        transition: background 0.08s, color 0.08s;
      }
      .hs-tts-active {
        background: #FFE44D;
        color: #1A1A1A;
        border-radius: 3px;
      }

      /* ── Mini Audio Bar ── */
      .hs-audio-bar {
        display: flex;
        align-items: center;
        gap: 11px;
        margin-top: 12px;
        padding: 9px 12px;
        background: #F7F5F2;
        border: 1px solid #ECE8E2;
        border-radius: 10px;
        flex: 0 0 auto;
      }
      .hs-mini-play {
        width: 28px;
        height: 28px;
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #C0152E;
        color: #FFFFFF;
        border: none;
        border-radius: 50%;
        cursor: pointer;
        transition: opacity 0.15s;
      }
      .hs-mini-play:active { opacity: 0.8; }
      .hs-audio-seek {
        --p: 0%;
        flex: 1 1 auto;
        height: 5px;
        -webkit-appearance: none;
        appearance: none;
        background: linear-gradient(to right, #C0152E var(--p), #E2DDD6 var(--p));
        border-radius: 3px;
        cursor: pointer;
        outline: none;
        border: none;
      }
      .hs-audio-seek::-webkit-slider-thumb {
        -webkit-appearance: none;
        width: 14px;
        height: 14px;
        border-radius: 50%;
        background: #C0152E;
        cursor: pointer;
        box-shadow: 0 1px 4px rgba(192,21,46,0.35);
      }
      .hs-audio-seek::-moz-range-thumb {
        width: 14px;
        height: 14px;
        border-radius: 50%;
        background: #C0152E;
        border: none;
        cursor: pointer;
      }
      .hs-audio-seek::-webkit-slider-runnable-track { background: transparent; }
      .hs-audio-seek::-moz-range-track { background: transparent; }
      /* legacy fill element kept for JS compat */
      .hs-audio-fill {
        display: none;
        transition: width 0.5s linear;
      }
      .hs-audio-time {
        font-family: "Space Grotesk", sans-serif;
        font-size: 11px;
        font-weight: 600;
        color: #8A857E;
        font-variant-numeric: tabular-nums;
        white-space: nowrap;
      }

      /* ── Right Section ── */
      .hs-right {
        min-height: 0;
        display: grid;
        grid-template-rows: minmax(0, 1.35fr) minmax(0, 1fr);
        gap: 16px;
      }

      /* Fun facts stack (fills the top row) */
      .hs-ff-stack {
        min-height: 0;
        display: flex;
        flex-direction: column;
        gap: 12px;
      }
      .hs-fun-fact {
        flex: 1 1 0;
        min-height: 0;
        background: #FBF5DA;
        border: 1px solid #EBDB95;
        display: flex;
        align-items: center;
        gap: 12px;
        border-radius: 14px;
        padding: 14px;
        overflow: hidden;
      }
      .hs-ff-yellow {
        background: #FBF5DA;
        border: 1px solid #EBDB95;
      }
      .hs-ff-blue {
        background: #EAF0FA;
        border: 1px solid #C4D5EE;
      }
      .hs-ff-icon {
        flex: 0 0 auto;
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 9px;
      }
      .hs-ff-icon-yellow { background: #F0C419; color: #5A4500; }
      .hs-ff-icon-blue   { background: #3D5A99; color: #FFFFFF; }
      .hs-ff-body { min-width: 0; }
      .hs-ff-title {
        font-family: "Space Grotesk", sans-serif;
        font-weight: 800;
        font-size: 13px;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: #8A6D00;
      }
      .hs-ff-title-blue { color: #3D5A99; }
      .hs-ff-text {
        margin: 4px 0 0;
        font-family: "Plus Jakarta Sans", sans-serif;
        font-size: 15px;
        line-height: 1.45;
        color: #4A4744;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 5;
        -webkit-box-orient: vertical;
      }

      /* ── Quiz CTA (bottom row of right aside) ── */
      .hs-quiz-cta {
        min-height: 0;
        position: relative;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        gap: 6px;
        background: #C0152E;
        border-radius: 16px;
        padding: 16px 18px;
        color: #FFFFFF;
        box-shadow: 0 6px 20px rgba(192,21,46,0.3);
      }
      .hs-quiz-cta-bg {
        position: absolute;
        inset: 0;
        background: radial-gradient(circle at 50% 18%, rgba(255,255,255,0.14), rgba(255,255,255,0) 60%);
        pointer-events: none;
      }
      .hs-quiz-icon {
        width: 52px;
        height: 52px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
      }
      .hs-quiz-title {
        font-family: "Bricolage Grotesque", sans-serif;
        font-size: 18px;
        font-weight: 900;
        line-height: 1.1;
        letter-spacing: -0.01em;
      }
      .hs-quiz-sub {
        font-family: "Plus Jakarta Sans", sans-serif;
        font-size: 12px;
        opacity: 0.88;
        line-height: 1.35;
      }
      .hs-quiz-btn {
        margin-top: 4px;
        width: 100%;
        background: #FFFFFF;
        color: #C0152E;
        border: none;
        border-radius: 10px;
        padding: 11px;
        font-family: "Space Grotesk", sans-serif;
        font-weight: 800;
        font-size: 12px;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        cursor: pointer;
        transition: opacity 0.15s;
      }
      .hs-quiz-btn:active { opacity: 0.85; }

      @keyframes hs-bounce {
        0%, 100% { transform: translateY(0); }
        50% { transform: translateY(-7px); }
      }
      .hs-bounce-icon {
        animation: hs-bounce 1.2s ease-in-out infinite;
      }

      /* ══════════════════════════════════════════════
         HERITAGE STATION DETAIL — Mobile Responsive
         Collapses 2-col grid → single scrollable column
      ══════════════════════════════════════════════ */

      /* ── Tablet & phone portrait (≤768px) ── */
      @media (max-width: 768px) {
        /* Header: slightly shorter, tighter padding */
        .hs-header {
          height: 54px;
          padding: 0 16px;
        }
        .hs-header-title {
          font-size: 16px;
        }
        .hs-listen-btn {
          padding: 9px 13px;
          font-size: 10.5px;
          gap: 7px;
        }

        /* Main: single column, full scroll */
        .hs-main {
          display: flex;
          flex-direction: column;
          overflow-y: auto;
          overflow-x: hidden;
          -webkit-overflow-scrolling: touch;
          gap: 12px;
          padding: 12px;
        }

        /* Left: flow naturally, no grid rows */
        .hs-left {
          display: flex;
          flex-direction: column;
          gap: 12px;
          min-height: unset;
        }

        /* Hero: explicit height instead of grid fraction */
        .hs-hero {
          height: 220px;
          min-height: unset;
          flex-shrink: 0;
        }
        .hs-hero-title {
          font-size: clamp(16px, 4vw, 22px);
        }

        /* About box: grow to fit all its text */
        .hs-about {
          min-height: unset;
          height: auto;
          overflow: visible;
          flex-shrink: 0;
        }
        .hs-about-title {
          white-space: normal;
          overflow: visible;
          text-overflow: clip;
          font-size: 17px;
        }
        .hs-about-text {
          flex: unset;
          min-height: unset;
          overflow-y: visible;
          font-size: 14px;
          line-height: 1.65;
        }

        /* Right: flow naturally, no grid rows */
        .hs-right {
          display: flex;
          flex-direction: column;
          gap: 12px;
          min-height: unset;
        }

        /* Fun facts: side-by-side row saves vertical space */
        .hs-ff-stack {
          display: grid;
          grid-template-columns: 1fr 1fr;
          gap: 10px;
          min-height: unset;
          flex-direction: unset;
        }
        .hs-fun-fact {
          flex: unset;
          min-height: unset;
          align-items: flex-start;
        }
        .hs-ff-text {
          -webkit-line-clamp: 5;
          font-size: 12px;
        }

        /* Quiz CTA: compact horizontal row */
        .hs-quiz-cta {
          min-height: unset;
          flex-direction: row;
          flex-wrap: wrap;
          justify-content: flex-start;
          text-align: left;
          padding: 16px;
          gap: 10px;
        }
        .hs-quiz-icon {
          width: 36px;
          height: 36px;
        }
        .hs-quiz-title {
          font-size: 16px;
          flex: 1 1 auto;
          min-width: 0;
        }
        .hs-quiz-sub {
          width: 100%;
          order: 3;
        }
        .hs-quiz-btn {
          width: 100%;
          order: 4;
          margin-top: 0;
          padding: 13px;
        }
      }

      /* ── Small phone portrait (≤480px) ── */
      @media (max-width: 480px) {
        .hs-header {
          height: 50px;
          padding: 0 12px;
        }
        .hs-header-title {
          font-size: 14px;
        }
        /* Show only icon on very small screens */
        .hs-listen-btn .hs-listen-label {
          display: none;
        }
        .hs-listen-btn {
          padding: 9px 12px;
          gap: 0;
          border-radius: 50%;
          min-width: 36px;
          min-height: 36px;
          justify-content: center;
        }
        .hs-listen-icon {
          width: 20px;
          height: 20px;
        }

        .hs-main {
          padding: 10px;
          gap: 10px;
        }

        /* Hero: shorter on small screens */
        .hs-hero {
          height: 190px;
        }
        .hs-hero-title {
          font-size: 16px;
        }

        /* Fun facts: stack vertically */
        .hs-ff-stack {
          grid-template-columns: 1fr;
        }

        .hs-about-title {
          font-size: 15px;
        }
        .hs-about-text {
          font-size: 13px;
        }

        .hs-quiz-title {
          font-size: 15px;
        }
        .hs-quiz-sub {
          font-size: 11px;
        }
      }

      /* ══ CITY STAT MODAL ══ */
      #city-stat-modal {
        position: fixed;
        inset: 0;
        z-index: 500;
        background: rgba(0, 0, 0, 0.55);
        display: none;
        align-items: center;
        justify-content: center;
        backdrop-filter: blur(4px);
        padding: 24px;
      }
      #city-stat-modal.open {
        display: flex;
      }
      .csm-box {
        border-radius: 24px;
        padding: 32px 28px 24px;
        width: min(460px, 92vw);
        max-height: 80vh;
        overflow-y: auto;
        box-shadow: 0 24px 64px rgba(0, 0, 0, 0.36);
        display: flex;
        flex-direction: column;
        gap: 8px;
      }
      .csm-emoji {
        font-size: 44px;
        line-height: 1;
        margin-bottom: 4px;
      }
      .csm-title {
        font-family: "Bricolage Grotesque", sans-serif;
        font-size: 30px;
        font-weight: 800;
        letter-spacing: -0.01em;
        line-height: 1.1;
      }
      .csm-sub {
        font-family: "Space Grotesk", sans-serif;
        font-size: 14px;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        opacity: 0.72;
      }
      .csm-rule {
        height: 5px;
        width: 52px;
        border-radius: 5px;
        margin: 6px 0 4px;
        flex-shrink: 0;
      }
      .csm-body {
        font-family: "Plus Jakarta Sans", sans-serif;
        font-size: 17px;
        line-height: 1.75;
        font-weight: 400;
      }
      .csm-close-btn {
        align-self: flex-start;
        margin-top: 14px;
        border: none;
        border-radius: 9999px;
        padding: 13px 28px;
        font-family: "Space Grotesk", sans-serif;
        font-weight: 700;
        font-size: 15px;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        cursor: pointer;
        transition: all 0.15s;
      }
      .csm-close-btn:active {
        transform: translateY(4px);
        box-shadow: none !important;
      }

      /* make stat cards feel clickable */
      .cty-stat {
        cursor: pointer;
      }
      .cty-stat:active {
        transform: scale(0.96);
        box-shadow: none;
      }
      .cty-mayor-card {
        cursor: pointer;
      }
      .cty-mayor-card:active {
        opacity: 0.82;
      }

      /* ══════════════════════════════════════════
         INDIGENOUS CULTURE BLOCK (Station A)
      ══════════════════════════════════════════ */
      #detail-indig-block {
        margin-top: 8px;
        flex-shrink: 0;
      }
      .hs-indig-link {
        display: inline-block;
        background: none;
        border: none;
        padding: 0;
        margin-bottom: 5px;
        font-family: "Plus Jakarta Sans", sans-serif;
        font-size: clamp(12.5px, 1.05vw, 14px);
        color: #2563eb;
        cursor: pointer;
        text-decoration: underline;
        text-underline-offset: 3px;
        text-decoration-color: rgba(37,99,235,0.4);
        transition: color 0.15s, text-decoration-color 0.15s;
      }
      .hs-indig-link:hover {
        color: #1d4ed8;
        text-decoration-color: #1d4ed8;
      }
      .hs-indig-tile {
        display: flex;
        align-items: center;
        gap: 10px;
        background: linear-gradient(135deg, #1b3a27 0%, #2d5a3d 100%);
        border-radius: 10px;
        padding: 8px 12px;
        cursor: pointer;
        transition: transform 0.15s, box-shadow 0.15s;
        box-shadow: 0 3px 12px rgba(27,58,39,0.3);
      }
      .hs-indig-tile:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(27,58,39,0.4); }
      .hs-indig-tile:active { transform: translateY(0); }
      .hs-indig-tile-icon {
        font-size: 20px;
        flex-shrink: 0;
        line-height: 1;
      }
      .hs-indig-tile-content { flex: 1; min-width: 0; }
      .hs-indig-tile-tag {
        display: none;
      }
      .hs-indig-tile-title {
        font-family: "Bricolage Grotesque", sans-serif;
        font-size: 13px;
        font-weight: 800;
        color: #fff;
        line-height: 1.2;
        margin-bottom: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }
      .hs-indig-tile-sub {
        display: none;
      }
      .hs-indig-tile-arrow {
        font-size: 18px;
        color: rgba(255,255,255,0.5);
        flex-shrink: 0;
      }

      /* (City Overview Quick Facts tile — original styles preserved in .cty-facts) */

      /* ══════════════════════════════════════════
         INDIGENOUS CULTURE MODAL
      ══════════════════════════════════════════ */
      #indig-modal {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 8500;
        background: rgba(0,0,0,0.78);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 24px 16px 48px;
        align-items: flex-start;
        justify-content: center;
      }
      .indm-box {
        background: #f8f7f4;
        border-radius: 18px;
        width: 100%;
        max-width: 600px;
        overflow: hidden;
        box-shadow: 0 24px 80px rgba(0,0,0,0.45);
      }

      /* Header */
      .indm-header {
        background: linear-gradient(140deg, #1b3a27 0%, #2e6b44 60%, #3a7a52 100%);
        padding: 20px 20px 18px;
        position: relative;
      }
      .indm-close-btn {
        position: absolute;
        top: 16px;
        right: 16px;
        background: rgba(255,255,255,0.18);
        border: 1px solid rgba(255,255,255,0.3);
        border-radius: 50%;
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        color: #fff;
        transition: background 0.15s;
      }
      .indm-close-btn:hover { background: rgba(255,255,255,0.3); }
      .indm-close-btn .material-symbols-outlined { font-size: 18px; }
      .indm-eyebrow {
        font-family: "Space Grotesk", sans-serif;
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: #7dd3a8;
        margin-bottom: 8px;
      }
      .indm-title {
        font-family: "Fraunces", serif;
        font-size: clamp(20px, 2.5vw, 26px);
        font-weight: 900;
        color: #fff;
        line-height: 1.1;
        letter-spacing: -0.02em;
      }
      .indm-subtitle {
        font-family: "Plus Jakarta Sans", sans-serif;
        font-size: clamp(12px, 1.1vw, 13px);
        color: rgba(255,255,255,0.75);
        margin-top: 5px;
        font-style: italic;
      }
      .indm-source-tag {
        font-family: "Plus Jakarta Sans", sans-serif;
        font-size: 11px;
        color: rgba(255,255,255,0.5);
        margin-top: 12px;
      }

      /* Body */
      .indm-body {
        padding: 24px 20px 28px;
        display: flex;
        flex-direction: column;
        gap: 14px;
      }
      .indm-row-2 {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 14px;
      }

      /* Cards */
      .indm-card {
        background: #fff;
        border-radius: 16px;
        padding: 20px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.07), 0 0 0 1px #e8e5e1;
      }
      .indm-card-icon {
        font-size: 26px;
        margin-bottom: 8px;
        line-height: 1;
      }
      .indm-card-tag {
        font-family: "Space Grotesk", sans-serif;
        font-size: 10px;
        font-weight: 700;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: #2d5a3d;
        margin-bottom: 4px;
      }
      .indm-card-title {
        font-family: "Bricolage Grotesque", sans-serif;
        font-size: clamp(15px, 1.6vw, 19px);
        font-weight: 800;
        color: #1b1c1b;
        line-height: 1.2;
        margin-bottom: 10px;
      }
      .indm-card-text {
        font-family: "Plus Jakarta Sans", sans-serif;
        font-size: clamp(12.5px, 1.1vw, 14.5px);
        line-height: 1.65;
        color: #3d3c39;
      }

      /* Expandable type cards */
      .indm-card-type { cursor: pointer; }
      .indm-card-type:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1), 0 0 0 1px #d0cdc8; }
      .indm-type-header {
        display: flex;
        align-items: center;
        gap: 14px;
      }
      .indm-type-badge {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        color: #fff;
        font-family: "Space Grotesk", sans-serif;
        font-weight: 700;
        font-size: 13px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
      }
      .indm-type-info { flex: 1; min-width: 0; }
      .indm-chevron {
        font-size: 22px;
        color: #9a9690;
        transition: transform 0.25s;
        flex-shrink: 0;
      }
      .indm-type-body {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
      }
      .indm-card-type.indm-open .indm-type-body { /* height set by JS */ }
      .indm-type-body .indm-card-text { margin-top: 14px; }
      .indm-chip-row {
        display: flex;
        flex-wrap: wrap;
        gap: 7px;
        margin-top: 12px;
      }
      .indm-chip {
        background: #f0ede8;
        border: 1px solid #ddd9d3;
        border-radius: 999px;
        padding: 4px 11px;
        font-size: 12px;
        font-family: "Plus Jakarta Sans", sans-serif;
        color: #3d3c39;
        font-weight: 500;
      }

      /* Section headings */
      .indm-section-heading {
        font-family: "Space Grotesk", sans-serif;
        font-size: 13px;
        font-weight: 700;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        color: #6b6860;
        display: flex;
        align-items: center;
        gap: 7px;
        padding: 4px 0 2px;
        border-bottom: 2px solid #e8e5e1;
      }
      .indm-section-heading .material-symbols-outlined { font-size: 18px; }

      /* Themes grid */
      .indm-themes-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
      }
      .indm-theme {
        background: #fff;
        border-radius: 14px;
        padding: 16px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06), 0 0 0 1px #e8e5e1;
      }
      .indm-theme-icon { font-size: 24px; margin-bottom: 6px; }
      .indm-theme-title {
        font-family: "Bricolage Grotesque", sans-serif;
        font-size: 14px;
        font-weight: 800;
        color: #1b1c1b;
        margin-bottom: 5px;
      }
      .indm-theme-text {
        font-family: "Plus Jakarta Sans", sans-serif;
        font-size: 12px;
        line-height: 1.6;
        color: #5a5852;
      }

      /* Faith card */
      .indm-card-faith {
        background: linear-gradient(135deg, #fdf6e3 0%, #fef9ec 100%);
        border-left: 4px solid #f5a623;
        box-shadow: 0 2px 8px rgba(245,166,35,0.12), 0 0 0 1px #f0e8cc;
      }
      .indm-card-faith .indm-card-tag { color: #b07a00; }

      /* Risk card */
      .indm-card-risk {
        background: linear-gradient(135deg, #fff5f5 0%, #fff8f7 100%);
        border-left: 4px solid #bd001a;
        box-shadow: 0 2px 8px rgba(189,0,26,0.08), 0 0 0 1px #f5d5d5;
      }
      .indm-card-risk .indm-card-tag { color: #bd001a; }
      .indm-quote {
        margin-top: 14px;
        background: rgba(189,0,26,0.06);
        border-left: 3px solid #bd001a;
        padding: 10px 14px;
        border-radius: 0 10px 10px 0;
        font-family: "Fraunces", serif;
        font-size: clamp(13px, 1.2vw, 15px);
        font-style: italic;
        color: #bd001a;
        font-weight: 700;
      }

      /* Citation */
      .indm-citation {
        background: #f0ede8;
        border-radius: 14px;
        padding: 16px 18px;
      }
      .indm-citation-label {
        font-family: "Space Grotesk", sans-serif;
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: #6b6860;
        margin-bottom: 8px;
      }
      .indm-citation p {
        font-family: "Plus Jakarta Sans", sans-serif;
        font-size: 12px;
        line-height: 1.65;
        color: #5a5852;
      }

      /* Mobile responsive */
      @media (max-width: 600px) {
        #indig-modal { padding: 12px 10px 40px; }
        .indm-header { padding: 22px 18px 20px; }
        .indm-body { padding: 16px 14px 20px; gap: 12px; }
        .indm-row-2 { grid-template-columns: 1fr; }
        .indm-themes-grid { grid-template-columns: 1fr 1fr; }
        .indm-card { padding: 16px; }
        .indm-card-title { font-size: 15px; }
      }
      @media (max-width: 400px) {
        .indm-themes-grid { grid-template-columns: 1fr; }
      }
