        @font-face {
            font-family: 'LexendDeca';
            src: url("/static/LexendDeca-Regular.ttf") format('truetype');
            font-weight: 600;
            font-style: normal;
            font-display: swap;
        }
        @font-face {
            font-family: 'IntroRust';
            src: url("/static/IntroRust-Base.otf") format('opentype');
            font-weight: normal;
            font-style: normal;
            font-display: swap;
        }

        :root {
            --cream: #FDF9EE;
            --blue: #1751AA;
            --blue-dark: #0F3D7A;
            --blue-light: #B2C3D7;
            --border-strong: #6B84A8;
            --blue-glow: rgba(23, 81, 170, 0.08);
            --text-body: #1a1a1a;
            --text-muted: #5C5C5C;
            --placeholder: #4A6A92;
        }

        * { box-sizing: border-box; }

        .sr-only {
            position: absolute;
            width: 1px;
            height: 1px;
            padding: 0;
            margin: -1px;
            overflow: hidden;
            clip: rect(0, 0, 0, 0);
            white-space: nowrap;
            border: 0;
        }

        body {
            margin: 0;
            background: var(--cream);
            font-family: 'Inter', 'Trebuchet MS', sans-serif;
            color: var(--text-body);
        }

        /* ── Header image ── */
        /* Fixed-height box so swapping between the clubs/courses graphics
           (different aspect ratios) doesn't shift the toggle and search bar
           below it. object-fit keeps each image's proportions inside the box. */
        .hero-img {
            display: block;
            width: 100%;
            max-width: 876px;
            height: 300px;
            object-fit: contain;
            margin: 0 auto;
            position: relative;
            z-index: 1;
        }

        @media (max-width: 640px) {
            .hero-img { height: 200px; }
        }

        /* ── Mode toggle ── */
        /* Desktop: pinned to the top-right corner, floating over the page. */
        .mode-toggle-wrap {
            position: fixed;
            top: 20px;
            right: 20px;
            z-index: 50;
        }
        .mode-toggle {
            display: inline-flex;
            background: white;
            border: 3px solid var(--border-strong);
            border-radius: 14px;
            padding: 4px;
            gap: 4px;
        }
        .mode-toggle__btn {
            font-family: 'Inter', sans-serif;
            font-weight: 600;
            font-size: 13px;
            letter-spacing: 0.12em;
            text-transform: uppercase;
            color: var(--placeholder);
            background: transparent;
            border: none;
            border-radius: 10px;
            padding: 10px 28px;
            cursor: pointer;
            transition: background 0.2s, color 0.2s;
        }
        .mode-toggle__btn:hover {
            color: var(--blue);
        }
        .mode-toggle__btn.is-active {
            background: var(--blue);
            color: var(--cream);
        }
        .mode-toggle__btn:focus-visible {
            outline: 3px solid var(--blue-dark);
            outline-offset: 3px;
        }

        /* ── Course cards (reuse club-card visual shell) ── */
        .course-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin: 8px 0 0 44px;
        }
        .course-pill {
            display: inline-block;
            background: var(--blue-glow);
            border: 1.5px solid var(--blue-light);
            color: var(--blue);
            font-size: 11px;
            font-weight: 600;
            letter-spacing: 0.04em;
            padding: 3px 10px;
            border-radius: 6px;
        }

        /* ── Search bar ── */
        .search-wrap {
            background: white;
            border: 3px solid var(--border-strong);
            border-radius: 16px;
            padding: 6px;
            transition: border-color 0.3s, box-shadow 0.3s;
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .search-wrap:focus-within {
            border-color: var(--blue);
            box-shadow: 0 0 0 4px var(--blue-glow);
        }
        .search-input {
            border: none;
            outline: none;
            background: transparent;
            font-family: 'LexendDeca', 'Inter', sans-serif;
            font-weight: 600;
            font-size: 13px;
            color: var(--text-body);
            width: 100%;
            padding: 12px 16px;
        }
        .search-input::placeholder {
            font-family: 'LexendDeca', 'Inter', sans-serif;
            font-weight: 600;
            color: var(--placeholder);
            font-size: 13px;
        }
        .search-btn {
            background: var(--blue);
            color: var(--cream);
            font-family: 'Inter', sans-serif;
            font-weight: 600;
            font-size: 14px;
            letter-spacing: 0.12em;
            text-transform: uppercase;
            border: none;
            border-radius: 12px;
            padding: 14px 32px;
            cursor: pointer;
            transition: transform 0.15s, box-shadow 0.15s;
            box-shadow: 0 4px 0 0 var(--blue-dark);
            white-space: nowrap;
        }
        .search-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 0 0 var(--blue-dark);
        }
        .search-btn:active {
            transform: translateY(2px);
            box-shadow: 0 1px 0 0 var(--blue-dark);
        }
        .search-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            transform: none;
        }
        .search-btn:focus-visible,
        .visit-btn:focus-visible,
        .show-more-btn:focus-visible {
            outline: 3px solid var(--blue-dark);
            outline-offset: 3px;
        }

        /* ── Club cards ── */
        .club-card {
            background: white;
            border: 2px solid var(--border-strong);
            border-radius: 14px;
            padding: 20px 24px;
            transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
            font-family: 'LexendDeca', 'Trebuchet MS', sans-serif;
        }
        .club-card .club-name,
        .club-card .category-tag,
        .club-card .mission-text,
        .club-card .visit-btn,
        .club-card .rank-num {
            font-family: 'LexendDeca', 'Trebuchet MS', sans-serif;
        }
        .club-card:hover {
            transform: translateY(-4px);
            border-color: var(--blue);
            box-shadow: 0 12px 32px rgba(23, 81, 170, 0.1);
        }

        @keyframes slideUp {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }
        .card-enter {
            animation: slideUp 0.35s ease-out both;
        }

        .rank-num {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 30px;
            height: 30px;
            border-radius: 8px;
            background: var(--blue);
            color: white;
            font-size: 13px;
            font-weight: 700;
            flex-shrink: 0;
        }

        .match-tier {
            flex-shrink: 0;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 6px 10px;
            border-radius: 8px;
            font-family: 'LexendDeca', 'Trebuchet MS', sans-serif;
            font-size: 11px;
            font-weight: 700;
            letter-spacing: 0.1em;
            text-transform: uppercase;
            border: 1.5px solid;
            line-height: 1;
            white-space: nowrap;
        }
        .match-tier__dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: currentColor;
            flex-shrink: 0;
        }
        .match-tier--strong {
            background: #E8F5EC;
            border-color: #7FC99A;
            color: #0A5C2E;
        }
        .match-tier--medium {
            background: #FEF4D1;
            border-color: #E3B94B;
            color: #7A4F00;
        }
        .match-tier--weak {
            background: #FDE4E4;
            border-color: #E89191;
            color: #9B1C1C;
        }

        .club-name {
            font-size: 16px;
            font-weight: 700;
            color: var(--text-body);
            margin: 0 0 6px 0;
            line-height: 1.3;
        }

        .category-tag {
            display: inline-block;
            background: var(--blue-glow);
            border: 1.5px solid var(--blue-light);
            color: var(--blue);
            font-size: 11px;
            font-weight: 600;
            letter-spacing: 0.15em;
            text-transform: uppercase;
            padding: 3px 10px;
            border-radius: 6px;
        }

        .mission-text {
            color: var(--text-muted);
            font-size: 13px;
            line-height: 1.7;
            margin: 0;
        }

        .visit-btn {
            display: inline-block;
            font-family: 'Inter', sans-serif;
            font-size: 12px;
            font-weight: 600;
            letter-spacing: 0.1em;
            text-transform: uppercase;
            text-decoration: none;
            color: var(--blue);
            border: 2px solid var(--blue);
            border-radius: 10px;
            padding: 8px 20px;
            transition: background 0.2s, color 0.2s;
        }
        .visit-btn:hover {
            background: var(--blue);
            color: white;
        }

        .show-more-btn {
            width: 100%;
            margin-top: 16px;
            padding: 14px;
            background: transparent;
            border: 2px dashed var(--border-strong);
            border-radius: 14px;
            font-family: 'Inter', sans-serif;
            font-size: 13px;
            font-weight: 600;
            letter-spacing: 0.1em;
            text-transform: uppercase;
            color: var(--blue);
            cursor: pointer;
            transition: border-color 0.2s, background 0.2s;
        }
        .show-more-btn:hover {
            border-color: var(--blue);
            background: var(--blue-glow);
        }

        /* ── Loading dots ── */
        @keyframes bounce {
            0%, 80%, 100% { transform: translateY(0); }
            40% { transform: translateY(-12px); }
        }
        .load-dot {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background: var(--blue);
            display: inline-block;
            margin: 0 5px;
        }
        .load-dot:nth-child(1) { animation: bounce 1s infinite 0s; }
        .load-dot:nth-child(2) { animation: bounce 1s infinite 0.15s; }
        .load-dot:nth-child(3) { animation: bounce 1s infinite 0.3s; }

        /* ── Divider ── */
        .results-divider {
            display: flex;
            align-items: center;
            gap: 14px;
            padding-bottom: 8px;
            margin-bottom: 16px;
        }
        .results-divider::before,
        .results-divider::after {
            content: '';
            flex: 1;
            height: 2px;
            background: var(--blue-light);
        }
        .results-divider > span,
        .results-divider > h2 {
            color: var(--blue);
            font-size: 12px;
            font-weight: 600;
            letter-spacing: 0.25em;
            text-transform: uppercase;
            white-space: nowrap;
            margin: 0;
        }

        /* ── Floating action buttons (home + feedback) ── */
        .fab-stack {
            position: fixed;
            bottom: 24px;
            right: 24px;
            z-index: 50;
            display: flex;
            align-items: center;
            gap: 12px;
        }
        .fab {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            font-family: 'Inter', sans-serif;
            font-weight: 600;
            font-size: 13px;
            letter-spacing: 0.1em;
            text-transform: uppercase;
            text-decoration: none;
            border-radius: 14px;
            padding: 12px 18px;
            transition: transform 0.15s, box-shadow 0.15s;
        }
        /* Primary (filled) — feedback */
        .fab--primary {
            background: var(--blue);
            color: var(--cream);
            box-shadow: 0 4px 0 0 var(--blue-dark), 0 6px 16px rgba(23, 81, 170, 0.25);
        }
        .fab--primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 0 0 var(--blue-dark), 0 10px 20px rgba(23, 81, 170, 0.3);
        }
        .fab--primary:active {
            transform: translateY(2px);
            box-shadow: 0 1px 0 0 var(--blue-dark);
        }
        /* Secondary (outlined) — home, so feedback stays the standout action */
        .fab--secondary {
            background: white;
            color: var(--blue);
            border: 2px solid var(--blue);
            box-shadow: 0 4px 0 0 var(--blue-light), 0 6px 16px rgba(23, 81, 170, 0.15);
        }
        .fab--secondary:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 0 0 var(--blue-light), 0 10px 20px rgba(23, 81, 170, 0.2);
        }
        .fab--secondary:active {
            transform: translateY(2px);
            box-shadow: 0 1px 0 0 var(--blue-light);
        }
        /* Icon-only variant — square button, no label */
        .fab--icon {
            padding: 12px;
        }
        .fab:focus-visible {
            outline: 3px solid var(--blue-dark);
            outline-offset: 3px;
        }
        .fab svg {
            width: 18px;
            height: 18px;
            flex-shrink: 0;
        }
        @media (max-width: 640px) {
            .fab-stack {
                bottom: 16px;
                right: 16px;
                gap: 8px;
            }
            .fab { padding: 14px; }
            /* Icon-only on small screens to avoid covering content */
            .fab .fab__label { display: none; }
        }

        .hidden { display: none !important; }

        @media (max-width: 640px) {
            .search-wrap { flex-direction: column; align-items: stretch; }
            .search-btn { width: 100%; }
        }

        /* Tablet and below: drop the toggle into normal flow, centered above
           the search bar, so it no longer floats cramped against the browser
           chrome / top-right corner. */
        @media (max-width: 1024px) {
            .mode-toggle-wrap {
                position: static;
                display: flex;
                justify-content: center;
                margin-bottom: 20px;
            }
            .mode-toggle { display: flex; width: 100%; max-width: 340px; }
            .mode-toggle__btn { flex: 1; padding: 12px 0; }
        }

        @media (prefers-reduced-motion: reduce) {
            .load-dot,
            .card-enter {
                animation: none !important;
            }
            .club-card { transition: none; }
        }
