        /* Scanner-specific body overrides (camera page: fixed viewport, no scroll) */
        html, body {
            height: 100%;
            overflow: hidden;
            overscroll-behavior: none;
            touch-action: manipulation;
            min-height: 100%;
        }

        body {
            font-family: var(--font-sans);
            background: var(--bg);
            color: var(--ink);
            height: 100dvh;
            overflow: hidden;
            -webkit-user-select: none;
            user-select: none;
            padding-bottom: 0;
        }

        .container {
            max-width: 100%;
            margin: 0;
            padding: 0;
            height: 100dvh;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        .header {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            z-index: 100;
            padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px 12px;
            background: transparent;
        }

        .back-link {
            color: white;
            text-decoration: none;
            font-weight: 600;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            font-size: 1rem;
            padding: 8px 14px;
            margin: -8px 0 -8px -8px;
            border-radius: 50px;
            background: transparent;
            transition: background 0.15s ease;
        }

        .back-link:hover {
            background: rgba(255, 255, 255, 0.15);
        }

        .back-link:active {
            background: rgba(255, 255, 255, 0.25);
        }

        .camera-container {
            position: relative;
            width: 100%;
            height: 42dvh;
            background: #000;
            overflow: hidden;
            flex-shrink: 0;
            transition: height 0.35s cubic-bezier(0.32, 0.72, 0, 1);
        }

        .camera-container.compact {
            height: 30dvh;
        }

        .camera-container.mode-search,
        .camera-container.mode-listen {
            background: var(--bg);
            flex: 1;
            height: auto;
            transition: none;
        }

        .camera-container.compact.mode-listen,
        .camera-container.compact.mode-search {
            flex: none;
            height: 30dvh;
            transition: height 0.35s cubic-bezier(0.32, 0.72, 0, 1);
        }

        .camera-container.mode-listen ~ .info-placeholder,
        .camera-container.mode-search ~ .info-placeholder {
            display: none !important;
        }

        /* Hide info-placeholder when loading artist from URL */
        .scanner-view.loading-artist .info-placeholder {
            display: none !important;
        }

        #videoElement {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        #videoElement::-webkit-media-controls {
            display: none !important;
        }

        #videoElement::-webkit-media-controls-enclosure {
            display: none !important;
        }

        #videoElement::-webkit-media-controls-panel {
            display: none !important;
        }

        .camera-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            background: radial-gradient(ellipse at center, transparent 45%, rgba(0,0,0,0.35) 100%);
        }

        .camera-overlay > * {
            pointer-events: auto;
        }

        .scan-frame {
            position: absolute;
            left: 15%;
            top: 35%;
            width: 70%;
            height: 30%;
            min-width: 80px;
            min-height: 50px;
            border: none;
            border-radius: 0;
            pointer-events: none;
            cursor: pointer;
        }

        /* Corner brackets */
        .scan-frame-corner {
            position: absolute;
            width: 24px;
            height: 24px;
            pointer-events: none;
        }
        .scan-frame-corner::before,
        .scan-frame-corner::after {
            content: '';
            position: absolute;
            background: rgba(255,255,255,0.9);
            border-radius: 2px;
            transition: background 0.3s;
        }
        .scan-frame-corner::before { width: 24px; height: 3px; }
        .scan-frame-corner::after  { width: 3px; height: 24px; }

        .scan-frame-corner.tl { top: 0; left: 0; }
        .scan-frame-corner.tl::before { top: 0; left: 0; }
        .scan-frame-corner.tl::after  { top: 0; left: 0; }

        .scan-frame-corner.tr { top: 0; right: 0; }
        .scan-frame-corner.tr::before { top: 0; right: 0; }
        .scan-frame-corner.tr::after  { top: 0; right: 0; }

        .scan-frame-corner.bl { bottom: 0; left: 0; }
        .scan-frame-corner.bl::before { bottom: 0; left: 0; }
        .scan-frame-corner.bl::after  { bottom: 0; left: 0; }

        .scan-frame-corner.br { bottom: 0; right: 0; }
        .scan-frame-corner.br::before { bottom: 0; right: 0; }
        .scan-frame-corner.br::after  { bottom: 0; right: 0; }

        /* Detection pulse: corners turn orange */
        .scan-frame.detecting .scan-frame-corner::before,
        .scan-frame.detecting .scan-frame-corner::after {
            background: var(--accent);
        }
        .scan-frame.detecting {
            animation: detect-glow 1s ease-in-out;
        }
        @keyframes detect-glow {
            0%, 100% { filter: drop-shadow(0 0 0 transparent); }
            50% { filter: drop-shadow(0 0 16px rgba(232,106,51,0.5)); }
        }

        .scan-frame::before {
            content: 'Aim at artist name';
            position: absolute;
            top: -36px;
            left: 50%;
            transform: translateX(-50%);
            color: var(--ink);
            font-size: 0.72rem;
            font-weight: 700;
            font-family: var(--font-sans);
            text-transform: uppercase;
            text-shadow: none;
            white-space: nowrap;
            transition: all 0.3s;
            background: var(--paper);
            padding: 6px 14px;
            border-radius: 999px;
            letter-spacing: 0.08em;
            border: var(--border) solid var(--ink);
            box-shadow: 2px 2px 0 var(--ink);
        }

        /* Paused state: dim camera feed */
        .camera-container:has(.scan-frame.paused) #videoElement {
            filter: brightness(0.4);
            transition: filter 0.3s;
        }
        .scan-frame.paused::before {
            display: none;
        }

        /* Tap-to-scan button inside the scan frame */
        .tap-to-scan-btn {
            display: none;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 64px;
            height: 64px;
            background: white !important;
            color: var(--ink);
            padding: 0;
            border-radius: 50%;
            border: var(--border) solid var(--ink);
            box-shadow: var(--shadow);
            cursor: pointer;
            pointer-events: auto;
            z-index: 2;
            transition: transform 0.12s, box-shadow 0.12s;
            -webkit-tap-highlight-color: transparent;
            align-items: center;
            justify-content: center;
        }
        .tap-to-scan-btn:active {
            transform: translate(-50%, -50%) translate(2px, 2px);
            box-shadow: none;
        }
        .tap-to-scan-btn svg {
            width: 28px;
            height: 28px;
        }
        .scan-frame.paused .tap-to-scan-btn {
            display: flex;
        }

        .scan-frame-resize {
            pointer-events: auto;
            position: absolute;
            right: -2px;
            bottom: -2px;
            width: 22px;
            height: 22px;
            border-radius: 6px;
            background: var(--paper);
            border: var(--border) solid var(--ink);
            box-shadow: var(--shadow);
            cursor: se-resize;
            touch-action: none;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .scan-frame-resize::before,
        .scan-frame-resize::after {
            content: '';
            position: absolute;
            width: 10px;
            height: 2px;
            background: var(--ink);
            border-radius: 1px;
            transform: rotate(-45deg);
        }

        .scan-frame-resize::before {
            margin: -4px 0 0 -4px;
        }

        .scan-frame-resize::after {
            margin: 2px 0 0 2px;
        }

        .camera-bottom-row {
            position: absolute;
            bottom: 8px;
            left: 0;
            right: 0;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            gap: 8px;
            z-index: 10;
            padding: 0 16px;
        }

        .zoom-buttons {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            right: calc(8px + env(safe-area-inset-right, 0px));
            display: flex;
            flex-direction: column;
            gap: 6px;
            z-index: 11;
            -webkit-touch-callout: none;
            -webkit-tap-highlight-color: transparent;
            user-select: none;
        }

        .zoom-btn {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            border: var(--border) solid var(--ink);
            background: rgba(255,255,245,0.85);
            color: var(--ink);
            font-family: var(--font-sans);
            font-size: 0.8rem;
            font-weight: 700;
            box-shadow: var(--shadow);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: transform 0.1s, box-shadow 0.1s;
            -webkit-touch-callout: none;
            -webkit-tap-highlight-color: transparent;
            user-select: none;
            touch-action: manipulation;
            backdrop-filter: blur(6px);
            -webkit-backdrop-filter: blur(6px);
        }

        .zoom-btn:active {
            transform: translate(2px, 2px);
            box-shadow: none;
        }

        .zoom-btn.active {
            background: var(--teal);
            color: white;
        }

        .zoom-btn:disabled {
            opacity: 0.5;
            cursor: default;
        }

        .scanning-indicator {
            background: rgba(0,0,0,0.7);
            color: white;
            padding: 12px 24px;
            border-radius: 28px;
            font-size: 0.9rem;
            font-weight: 600;
            display: none;
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            border: 2px solid rgba(255,255,255,0.15);
        }

        .scanning-indicator.active {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .scan-frame,
        .zoom-buttons,
        .camera-bottom-row {
            transition: opacity 0.2s ease;
        }

        .camera-container.permission-active .scan-frame,
        .camera-container.permission-active .zoom-buttons,
        .camera-container.permission-active .camera-bottom-row {
            opacity: 0;
            pointer-events: none;
        }


        .scanning-dot {
            width: 8px;
            height: 8px;
            background: #4ade80;
            border-radius: 50%;
            animation: pulse 1s infinite;
        }

        @keyframes pulse {
            0%, 100% { opacity: 1; transform: scale(1); }
            50% { opacity: 0.5; transform: scale(0.8); }
        }

        .now-playing-overlay {
            flex: 1;
            min-height: 0;
            background: var(--bg);
            display: none;
        }

        .now-playing-overlay.active {
            display: flex;
            flex-direction: column;
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            z-index: 30;
            padding-top: calc(env(safe-area-inset-top, 0px) + 52px);
            padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px) + var(--bottom-nav-gap));
            overflow: hidden;
        }

        .now-playing-scroll-wrapper {
            flex: 1;
            min-height: 0;
            min-width: 0;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
        }

        /* When now-playing is active, hide camera so player is full-screen in its own "page" */
        .scanner-view:has(.now-playing-overlay.active) .camera-container,
        .scanner-view:has(.now-playing-overlay.active) .info-placeholder {
            display: none !important;
        }

        /* When opening from Recent list, hide scanner content until player is shown */
        .scanner-view.from-recent .camera-container,
        .scanner-view.from-recent .info-placeholder {
            display: none !important;
        }

        .info-placeholder {
            flex: 1;
            background: var(--bg);
            display: flex;
            align-items: flex-start;
            justify-content: flex-start;
            min-height: 0;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            padding: 14px 16px calc(var(--bottom-nav-clearance) + 10px);
            text-align: center;
        }

        .scanner-copy-kicker {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 8px 14px;
            border-radius: 999px;
            border: 2px solid var(--ink);
            background: var(--paper);
            color: var(--ink);
            font-family: var(--font-sans);
            font-size: 0.72rem;
            font-weight: 700;
            letter-spacing: 0.08em;
            line-height: 1;
            text-transform: uppercase;
            box-shadow: 2px 2px 0 var(--ink);
        }

        .info-placeholder-content {
            width: min(100%, 380px);
            max-width: 380px;
            margin: 0 auto;
            display: flex;
            flex-direction: column;
            align-items: stretch;
        }

        .info-placeholder-panel {
            background: var(--paper);
            border: 3px solid var(--ink);
            border-radius: 26px;
            box-shadow: 4px 4px 0 var(--ink);
            padding: 16px 14px 14px;
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            gap: 12px;
            text-align: left;
        }

        .info-placeholder-top {
            width: 100%;
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 12px;
        }

        .info-placeholder-vinyl {
            width: 56px;
            height: 56px;
            flex-shrink: 0;
            border-radius: 50%;
            border: 2px solid var(--ink);
            box-shadow: 2px 2px 0 var(--ink);
            background:
                radial-gradient(circle at center, var(--paper) 0 11px, var(--accent) 11px 18px, var(--ink) 18px 100%);
        }

        .info-placeholder .scanner-copy-kicker,
        .camera-permission .scanner-copy-kicker {
            background: var(--accent);
            color: white;
        }

        .info-placeholder h2 {
            margin: 0;
            max-width: 9ch;
            font-family: var(--font-serif);
            font-size: clamp(1.9rem, 7vw, 2.55rem);
            font-weight: 700;
            line-height: 0.92;
            letter-spacing: -0.035em;
            color: var(--ink);
            text-wrap: balance;
        }

        .info-placeholder p {
            margin: 0;
            max-width: 28ch;
            color: var(--text-dark);
            font-family: var(--font-sans);
            font-size: clamp(0.92rem, 3.5vw, 1rem);
            font-weight: 500;
            line-height: 1.38;
            text-wrap: balance;
        }

        .info-placeholder-steps {
            width: 100%;
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 8px;
        }

        .info-placeholder-step {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 8px;
            min-height: 82px;
            padding: 10px 8px;
            border: 2px solid rgba(26,46,53,0.14);
            border-radius: 18px;
            background: rgba(255,255,245,0.72);
            text-align: center;
        }

        .info-placeholder-step + .info-placeholder-step {
            border-top: none;
        }

        .info-placeholder-step-num {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            background: var(--accent);
            color: white;
            border: 2px solid var(--ink);
            box-shadow: 1px 1px 0 var(--ink);
            display: inline-flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            font-family: var(--font-sans);
            font-size: 0.82rem;
            font-weight: 700;
            line-height: 1;
        }

        .info-placeholder-step-copy {
            color: var(--ink);
            font-family: var(--font-sans);
            font-size: 0.82rem;
            font-weight: 700;
            line-height: 1.1;
            text-wrap: balance;
        }

        .info-placeholder-tip {
            display: none;
            align-items: center;
            align-self: flex-start;
            padding: 8px 14px;
            border: 2px solid var(--ink);
            border-radius: var(--radius-pill);
            background: rgba(61,107,125,0.08);
            color: var(--ink);
            font-family: var(--font-sans);
            font-size: 0.76rem;
            font-weight: 700;
            line-height: 1.25;
        }

        @media (max-width: 480px) {
            .camera-container {
                height: 40dvh;
            }

            .info-placeholder h2 {
                font-size: clamp(1.8rem, 7vw, 2.35rem);
            }

            .info-placeholder p {
                font-size: 0.92rem;
            }
        }

        @media (max-height: 760px) {
            .camera-container {
                height: 39dvh;
            }

            .info-placeholder {
                padding-top: 12px;
            }

            .info-placeholder-panel {
                padding: 14px 12px 12px;
                gap: 10px;
            }

            .info-placeholder-vinyl {
                width: 48px;
                height: 48px;
            }

            .info-placeholder h2 {
                font-size: clamp(1.65rem, 6.5vw, 2.1rem);
            }

            .info-placeholder p {
                font-size: 0.88rem;
                line-height: 1.32;
            }

            .info-placeholder-step {
                min-height: 70px;
                padding: 8px 6px;
            }

            .info-placeholder-step-copy {
                font-size: 0.76rem;
            }
        }

        .now-playing-fixed {
            flex-shrink: 0;
            padding: 0 20px 6px;
            overflow: hidden;
        }

        .now-playing-content {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
            text-align: center;
        }

        .now-playing-header-row {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 10px;
            width: 100%;
        }

        .now-playing-artist {
            font-family: var(--font-serif);
            font-size: 1.2rem;
            font-weight: 700;
            color: var(--ink);
            line-height: 1.2;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            padding: 0 4px;
            max-width: 100%;
        }

        .now-playing-artist-info {
            font-size: 0.8rem;
            color: var(--text-muted);
            line-height: 1.4;
            padding: 2px 4px 0;
            margin-bottom: 4px;
        }

        .artist-event-banner {
            display: none;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            padding: 16px 20px;
            background: var(--paper);
            color: var(--ink);
            border-radius: var(--radius);
            border: 3px solid var(--ink);
            box-shadow: var(--shadow);
            margin-top: 16px;
            flex-wrap: wrap;
        }

        .artist-event-banner-text {
            font-size: 0.88rem;
            font-weight: 600;
            color: var(--ink);
        }

        .artist-event-banner-link {
            color: white;
            font-size: 0.8rem;
            font-weight: 700;
            text-decoration: none;
            padding: 8px 14px;
            background: var(--accent);
            border: 3px solid var(--ink);
            border-radius: var(--radius-pill);
            box-shadow: var(--shadow);
        }

        .artist-event-banner-link:hover {
            opacity: 0.95;
        }

        .vinyl-container {
            position: relative;
            width: min(200px, 55vw);
            height: min(200px, 55vw);
            flex-shrink: 0;
        }

        .vinyl-disc {
            width: 100%;
            height: 100%;
            border-radius: var(--radius);
            position: relative;
            overflow: hidden;
            border: var(--border) solid var(--ink);
            box-shadow: var(--shadow);
            background: var(--paper);
        }

        .vinyl-disc.playing {
        }

        @keyframes vinyl-spin {
            from { transform: rotate(0deg); }
            to   { transform: rotate(360deg); }
        }

        .vinyl-disc img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }

        .vinyl-disc::after {
            display: none;
        }

        .vinyl-spindle {
            display: none;
        }

        .now-playing-info {
            text-align: center;
            width: 100%;
            min-width: 0;
            overflow: hidden;
        }

        .now-playing-track {
            font-family: var(--font-sans);
            font-size: 0.95rem;
            font-weight: 600;
            color: var(--ink);
            line-height: 1.3;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .now-playing-album {
            font-size: 0.78rem;
            color: var(--text-muted);
            margin-top: 2px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .now-playing-album:empty {
            display: none;
        }

        .now-playing-genre-pill {
            display: inline-block;
            background: var(--teal);
            color: white;
            font-family: var(--font-sans);
            font-size: 0.62rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            padding: 2px 10px;
            border-radius: 10px;
            margin-top: 4px;
        }

        .now-playing-genre-pill:empty {
            display: none;
        }

        .now-playing-meta {
            font-size: 0.78rem;
            color: var(--text-muted);
            line-height: 1.3;
        }

        .now-playing-meta:empty {
            display: none;
        }

        .now-playing-bottom {
            flex-shrink: 0;
            padding: 0 20px;
        }

        .now-playing-scroll-area {
            padding: 0 20px 20px;
        }

        .progress-container {
            margin-bottom: 8px;
        }

        .progress-bar {
            width: 100%;
            height: 7px;
            background: var(--paper);
            border-radius: var(--radius-pill);
            overflow: hidden;
            cursor: pointer;
            touch-action: none;
            border: var(--border) solid var(--ink);
        }

        .progress-fill {
            height: 100%;
            background: var(--teal);
            border-radius: var(--radius-pill);
            width: 0%;
            pointer-events: none;
            transition: width 0.1s linear;
        }

        .progress-time {
            display: flex;
            justify-content: space-between;
            font-size: 0.75rem;
            font-weight: 600;
            color: var(--text-muted);
            margin-top: 4px;
            margin-bottom: 10px;
        }

        .now-playing-overlay .happening-badge {
            display: none !important;
        }

        .scanner-desktop-sidebar {
            display: none;
        }

        .now-playing-left-column {
            display: block;
        }

        .now-playing-controls {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: var(--space-sm);
            margin-bottom: 0;
        }

        .control-btn {
            width: 44px;
            height: 44px;
            min-width: 44px;
            min-height: 44px;
            border-radius: 50%;
            border: var(--border) solid var(--ink);
            background: var(--paper);
            color: var(--ink);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: var(--shadow);
            transition: all 0.15s ease;
        }

        .control-btn:hover {
            transform: translate(-1px, -1px);
            box-shadow: var(--shadow-hover);
            background: var(--teal-light);
            color: var(--paper);
        }

        .control-btn:active {
            transform: translate(2px, 2px);
            box-shadow: none;
        }

        .control-btn svg {
            width: 22px;
            height: 22px;
        }

        .control-btn-large {
            width: 60px;
            height: 60px;
            min-width: 60px;
            min-height: 60px;
            border-radius: 50%;
            border: var(--border) solid var(--ink);
            background: var(--teal);
            color: var(--paper);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: var(--shadow);
            transition: all 0.15s ease;
            position: relative;
        }

        .control-btn-large:hover {
            transform: translate(-1px, -1px);
            box-shadow: var(--shadow-hover);
        }

        .control-btn-large:active {
            transform: translate(2px, 2px);
            box-shadow: none;
        }

        .control-btn-large svg {
            width: 30px;
            height: 30px;
            fill: white;
        }

        .control-btn-large.loading {
            pointer-events: none;
        }

        .loading-spinner-btn {
            position: absolute;
            width: 40px;
            height: 40px;
            border: 3px solid rgba(255,255,255,0.3);
            border-top-color: white;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }

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

        .loading-status {
            text-align: center;
            color: var(--text-muted);
            font-size: 0.8rem;
            margin-bottom: 4px;
            min-height: 1.1em;
        }


        .now-playing-track-list {
            display: none;
        }

        .now-playing-actions {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 10px;
            margin-top: 6px;
        }

        .action-primary {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

        .action-secondary {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
        }

        .ticket-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            flex: 1;
            padding: 11px 16px;
            background: var(--accent);
            color: white;
            text-decoration: none;
            font-family: var(--font-sans);
            font-size: 0.72rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            border-radius: var(--radius-pill);
            border: var(--border) solid var(--ink);
            cursor: pointer;
            transition: all 0.2s ease-out;
            box-shadow: var(--shadow);
            white-space: nowrap;
            position: relative;
            overflow: hidden;
        }

        .ticket-btn:active {
            transform: translate(2px, 2px);
            box-shadow: none;
        }

        .ticket-btn svg {
            width: 16px;
            height: 16px;
            flex-shrink: 0;
        }

        .artist-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            flex: 1;
            padding: 11px 16px;
            background: transparent;
            color: var(--ink);
            text-decoration: none;
            font-family: var(--font-sans);
            font-size: 0.72rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            border-radius: var(--radius-pill);
            border: var(--border) solid var(--ink);
            cursor: pointer;
            transition: all 0.2s ease-out;
            box-shadow: none;
            white-space: nowrap;
        }

        .artist-btn:hover {
            background: rgba(61, 107, 125, 0.08);
        }
        .artist-btn:active {
            transform: translate(1px, 1px);
        }

        .artist-btn svg {
            width: 16px;
            height: 16px;
            flex-shrink: 0;
        }

        .action-pill {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 32px;
            height: 32px;
            padding: 0;
            background: white;
            color: var(--ink);
            border: var(--border) solid var(--ink);
            border-radius: 50%;
            font-size: 0;
            cursor: pointer;
            box-shadow: var(--shadow);
            transition: transform 0.1s, box-shadow 0.1s;
        }

        .action-pill:active {
            transform: translate(2px, 2px);
            box-shadow: none;
        }

        .action-pill svg {
            width: 14px;
            height: 14px;
            flex-shrink: 0;
        }

        #shareBtn.copied {
            background: var(--bg);
            color: white;
            border-color: var(--ink);
        }

        #shareBtn.copied svg {
            display: none;
        }

        #shareBtn.copied::before {
            content: '✓';
            font-size: 0.8rem;
            line-height: 1;
        }

        .event-popup-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.5);
            z-index: 299;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.3s;
        }

        .event-popup-overlay.visible {
            opacity: 1;
            pointer-events: auto;
        }

        .event-popup {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%) scale(0.9);
            z-index: 300;
            background: var(--paper);
            border: 3px solid var(--ink);
            border-radius: var(--radius);
            box-shadow: 4px 4px 0 var(--ink);
            width: calc(100vw - 40px);
            max-width: 380px;
            max-height: 80dvh;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            opacity: 0;
            pointer-events: none;
            transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.25s;
        }

        .event-popup.visible {
            transform: translate(-50%, -50%) scale(1);
            opacity: 1;
            pointer-events: auto;
        }

        .event-popup-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 16px 16px 0;
        }

        .event-popup-badge {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            background: var(--teal);
            color: white;
            padding: 5px 12px;
            border-radius: 20px;
            font-size: 0.72rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

        .event-popup-badge svg {
            width: 14px;
            height: 14px;
        }

        .event-popup-close {
            width: 36px;
            height: 36px;
            background: var(--paper);
            border: var(--border) solid var(--ink);
            border-radius: 50%;
            color: var(--ink);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: var(--shadow);
            transition: transform 0.1s, box-shadow 0.1s;
            padding: 0;
            flex-shrink: 0;
        }

        .event-popup-close:active {
            transform: translate(2px, 2px);
            box-shadow: none;
        }

        .event-popup-close svg {
            width: 18px;
            height: 18px;
        }

        .event-popup-body {
            padding: 20px;
            overflow-y: auto;
            flex: 1;
            min-height: 0;
            -webkit-overflow-scrolling: touch;
            overscroll-behavior: contain;
        }

        .event-popup-artist {
            font-family: var(--font-serif);
            font-size: 1.15rem;
            font-weight: 700;
            color: var(--ink);
            margin-bottom: 14px;
            line-height: 1.3;
        }

        .event-popup-list {
            display: flex;
            flex-direction: column;
            gap: 20px;
            margin-bottom: 16px;
        }

        .event-popup-card {
            background: var(--paper);
            border: 3px solid var(--ink);
            border-radius: var(--radius);
            padding: 20px;
            box-shadow: var(--shadow);
        }

        .event-popup-card.near-you {
            border: 3px solid var(--ink);
            background: var(--paper);
        }

        .event-popup-near-badge {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            background: var(--accent);
            color: white;
            padding: 2px 8px;
            border-radius: 10px;
            font-size: 0.68rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.04em;
            margin-bottom: 4px;
        }

        .event-popup-date {
            font-family: var(--font-sans);
            font-size: 0.95rem;
            font-weight: 700;
            color: var(--accent);
            margin-bottom: 4px;
        }

        .event-popup-venue {
            font-family: var(--font-sans);
            font-size: 0.9rem;
            font-weight: 600;
            color: var(--ink);
            line-height: 1.3;
        }

        .event-popup-location {
            font-size: 0.8rem;
            color: var(--text-muted);
            margin-top: 2px;
        }

        .event-popup-ticket-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            width: 100%;
            margin-top: 8px;
            padding: 9px 14px;
            background: var(--accent);
            color: white;
            border: 3px solid var(--ink);
            border-radius: var(--radius-pill);
            font-family: var(--font-sans);
            font-size: 0.85rem;
            font-weight: 700;
            text-decoration: none;
            cursor: pointer;
            box-shadow: var(--shadow);
            transition: transform 0.1s, box-shadow 0.1s;
        }

        .event-popup-ticket-btn:active {
            transform: translate(2px, 2px);
            box-shadow: none;
        }

        .event-popup-ticket-btn svg {
            width: 16px;
            height: 16px;
            flex-shrink: 0;
        }

        .action-pill.saved {
            background: var(--bg);
            color: white;
            border-color: var(--bg);
        }

        /* Similar Artists Strip */
        .similar-artists-section {
            margin-top: 16px;
            padding-top: 14px;
            border-top: var(--border) dashed var(--ink);
        }

        .similar-artists-section + .similar-artists-section {
            margin-top: 12px;
        }

        .similar-artists-header {
            display: flex;
            align-items: flex-end;
            flex-wrap: wrap;
            gap: 8px 10px;
            margin-bottom: 12px;
        }

        .similar-artists-title {
            margin: 0;
            font-size: 1.25rem;
            letter-spacing: -0.02em;
            line-height: 1.2;
        }

        .similar-artists-count {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-height: 24px;
            background: var(--teal);
            color: white;
            font-size: 0.68rem;
            font-weight: 700;
            padding: 0 10px;
            border-radius: 999px;
            line-height: 1;
            white-space: nowrap;
        }

        .similar-artists-scroll {
            display: flex;
            gap: 10px;
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
            scrollbar-width: none;
            padding-bottom: 4px;
        }

        .similar-artists-scroll::-webkit-scrollbar { display: none; }

        .similar-artists-arrow {
            display: none;
        }

        .similar-artist-card {
            flex: 0 0 160px;
            background: var(--paper);
            border: var(--border) solid var(--ink);
            border-radius: var(--radius);
            padding: 14px 12px;
            box-shadow: var(--shadow);
            cursor: pointer;
            transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
            text-align: center;
        }

        .similar-artist-card:hover {
            transform: translate(-1px, -1px);
            box-shadow: var(--shadow-hover);
        }

        .similar-artist-card:active {
            transform: translate(2px, 2px);
            box-shadow: none;
        }

        .similar-artist-card.has-event {
            border-color: var(--ink);
        }

        .similar-artist-card.near-you {
            border-color: var(--accent);
        }

        .similar-artist-card.near-you:hover {
            border-color: var(--accent);
        }

        .similar-artist-img-wrap {
            position: relative;
            width: 88px;
            height: 88px;
            margin: 0 auto 18px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .similar-artist-img {
            width: 100%;
            height: 100%;
            border-radius: 50%;
            object-fit: cover;
            border: var(--border) solid var(--ink);
            display: block;
            background: var(--paper);
        }

        .similar-artist-actions {
            position: absolute;
            bottom: -10px;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            justify-content: center;
            gap: 5px;
            z-index: 3;
        }

        .similar-artist-play-btn {
            width: 30px;
            height: 30px;
            background: var(--accent);
            border: var(--border) solid var(--ink);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            padding: 0;
            box-shadow: 2px 2px 0 var(--ink);
        }

        .similar-artist-play-btn svg {
            width: 12px;
            height: 12px;
            fill: white;
            margin-left: 1px;
        }

        .similar-artist-play-btn.playing svg {
            margin-left: 0;
        }

        .similar-artist-play-btn.playing {
            background: var(--teal);
        }

        .similar-artist-play-btn:hover {
            background: var(--accent-light);
        }

        .similar-artist-name {
            font-family: var(--font-sans);
            font-size: 0.78rem;
            font-weight: 700;
            color: var(--ink);
            line-height: 1.2;
            margin-bottom: 4px;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            line-clamp: 2;
            -webkit-box-orient: vertical;
        }

        .similar-artist-genre {
            display: inline-block;
            font-size: 0.58rem;
            font-weight: 600;
            color: var(--ink);
            background: rgba(61,107,125,0.1);
            padding: 1px 7px;
            border-radius: 8px;
            margin-bottom: 6px;
        }

        .similar-artist-event {
            font-size: 0.62rem;
            line-height: 1.3;
        }

        .similar-artist-event-venue {
            font-weight: 600;
            color: var(--ink);
        }

        .similar-artist-event-date {
            color: var(--accent);
            font-weight: 700;
        }

        .similar-artist-event-city {
            color: var(--text-muted);
        }

        .similar-artist-near-badge {
            display: inline-flex;
            align-items: center;
            gap: 2px;
            background: var(--accent);
            color: white;
            padding: 1px 6px;
            border-radius: 8px;
            font-size: 0.55rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.03em;
            margin-bottom: 4px;
        }

        .similar-artists-loading {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 16px;
            font-size: 0.8rem;
            color: var(--text-muted);
        }

        .similar-artists-loading .dot-pulse {
            display: inline-flex;
            gap: 3px;
        }

        .similar-artists-loading .dot-pulse span {
            width: 4px;
            height: 4px;
            border-radius: 50%;
            background: var(--teal);
            animation: dotPulse 1.2s infinite ease-in-out;
        }

        .similar-artists-loading .dot-pulse span:nth-child(2) { animation-delay: 0.2s; }
        .similar-artists-loading .dot-pulse span:nth-child(3) { animation-delay: 0.4s; }

        @keyframes dotPulse {
            0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
            40% { opacity: 1; transform: scale(1); }
        }

        /* ── Mobile artist page improvements ── */
        @media (max-width: 899px) {
            /* Reduce top padding since header is hidden */
            .now-playing-overlay.active {
                padding-top: calc(env(safe-area-inset-top, 0px) + 12px);
            }

            .now-playing-hero {
                background: var(--paper);
                border: 3px solid var(--ink);
                border-radius: var(--radius);
                box-shadow: var(--shadow);
                margin: 0 12px 14px;
                padding: 18px;
                overflow: hidden;
            }

            .now-playing-fixed {
                padding: 0;
            }

            .now-playing-content {
                align-items: stretch;
                gap: 14px;
                text-align: left;
            }

            .now-playing-header-row {
                align-items: flex-start;
                gap: 8px;
            }

            .now-playing-artist {
                font-size: 1.45rem;
                line-height: 1.05;
                padding: 0;
                -webkit-line-clamp: unset;
            }

            .now-playing-artist-info {
                display: none !important;
            }

            .vinyl-container {
                width: 100%;
                height: auto;
                aspect-ratio: 16 / 9;
                max-width: none;
            }

            .vinyl-disc {
                border-radius: 16px;
            }

            .vinyl-disc img {
                object-position: center top;
            }

            .now-playing-info {
                text-align: left;
                overflow: visible;
            }

            .now-playing-track {
                font-family: var(--font-serif);
                font-size: 1.08rem;
                font-weight: 700;
                line-height: 1.2;
                white-space: normal;
                overflow: visible;
                text-overflow: clip;
            }

            .now-playing-album {
                margin-top: 4px;
                font-size: 0.78rem;
                white-space: normal;
                overflow: visible;
                text-overflow: clip;
            }

            .now-playing-genre-pill {
                display: inline-flex;
                align-items: center;
                margin-top: 10px;
                padding: 4px 12px;
                background: rgba(61, 107, 125, 0.08);
                color: var(--ink);
                border: var(--border) solid var(--ink);
                border-radius: 999px;
                font-size: 0.66rem;
            }

            .now-playing-meta {
                margin-top: 10px;
                font-size: 0.76rem;
                color: var(--text-muted);
            }

            .now-playing-actions {
                flex-direction: column;
                align-items: stretch;
                gap: 10px;
                margin-top: 2px;
            }

            .now-playing-actions .action-primary,
            .now-playing-actions .action-secondary {
                width: 100%;
                justify-content: stretch;
            }

            .now-playing-actions .action-primary {
                gap: 10px;
            }

            .now-playing-actions .action-secondary {
                gap: 8px;
                justify-content: center;
            }

            .now-playing-actions .ticket-btn,
            .now-playing-actions .artist-btn {
                flex: 1;
                min-height: 44px;
                padding: 12px 16px;
                font-size: 0.75rem;
                justify-content: center;
            }

            .now-playing-actions .artist-btn {
                background: #1DB954;
                color: white;
            }

            .now-playing-actions .artist-btn svg {
                color: currentColor;
            }

            .now-playing-actions .action-pill {
                flex: 0 0 46px;
                width: 46px;
                min-width: 46px;
                height: 46px;
                min-height: 46px;
                padding: 0;
                border-radius: var(--radius-pill);
                gap: 0;
            }

            .now-playing-actions .action-pill svg {
                width: 16px;
                height: 16px;
            }

            #saveBtn.saved {
                background: var(--bg);
                color: white;
                border-color: var(--ink);
            }

            .now-playing-bottom {
                padding: 18px 14px 12px;
                margin: 0;
                background: var(--paper);
                border: 3px solid var(--ink);
                border-radius: var(--radius);
                box-shadow: var(--shadow);
            }

            .loading-status {
                text-align: left;
                margin-bottom: 8px;
            }

            .progress-container {
                margin-bottom: 8px;
            }

            .progress-time {
                margin-bottom: 12px;
            }

            .now-playing-controls {
                margin-bottom: 0;
                gap: 12px;
            }

            .artist-event-banner {
                display: none !important;
            }

            .now-playing-scroll-area {
                padding: 0 12px 20px;
            }
        }

        /* ── Scanner Artist page: desktop (900px+) — single column, horizontal scroll rows ── */
        @media (min-width: 900px) {
            .now-playing-overlay.active .now-playing-scroll-wrapper {
                width: 100%;
                background: var(--bg);
                padding: 24px 20px 32px;
            }
            .now-playing-container {
                max-width: 1000px;
                margin: 0 auto;
                padding: 0;
                width: 100%;
            }
            .now-playing-hero {
                display: block;
                margin-bottom: 0;
                padding: 28px 28px 24px;
                background: var(--paper);
                border: var(--border) solid var(--ink);
                border-radius: var(--radius);
                box-shadow: var(--shadow);
                overflow: visible; /* Prevent clipping of buttons */
            }
            .now-playing-fixed {
                padding: 0;
                overflow: visible;
            }
            .now-playing-content {
                display: grid;
                grid-template-columns: auto 1fr;
                grid-template-rows: auto auto auto auto auto;
                gap: 16px 24px;
                align-items: start;
                text-align: left;
            }
            .now-playing-content .now-playing-header-row {
                grid-column: 1 / -1;
                grid-row: 1;
                display: flex;
                align-items: flex-start;
                justify-content: space-between;
                gap: 16px;
                width: 100%;
            }
            /* Artist at top; song title and all content underneath */
            .now-playing-content .now-playing-artist {
                font-size: 1.5rem;
                margin-bottom: 0;
                text-align: left;
            }
            .now-playing-content .now-playing-artist-info {
                grid-column: 1 / -1;
                grid-row: 2;
                font-size: 0.82rem;
                margin-bottom: 0;
            }
            .now-playing-content .happening-badge {
                margin-top: 0;
                flex-shrink: 0;
            }
            .now-playing-content .vinyl-container {
                grid-column: 1;
                grid-row: 3 / 6;
                width: 350px;
                height: 350px;
            }
            .now-playing-content .now-playing-info {
                grid-column: 2;
                grid-row: 3;
                text-align: left;
                margin-top: 0;
                min-width: 0;
                overflow: hidden;
            }
            .now-playing-content .now-playing-album {
                margin-top: 8px;
            }
            .now-playing-content .now-playing-genre-pill {
                margin-top: 12px;
            }
            /* Location info styled as lighter subtitle */
            .now-playing-content .now-playing-meta {
                font-size: 0.75rem;
                color: var(--text-muted);
                margin-top: 10px;
            }
            .now-playing-content .now-playing-actions {
                grid-column: 2;
                grid-row: 4;
                flex-direction: column;
                flex-wrap: nowrap;
                justify-content: flex-start;
                align-items: flex-start;
                gap: 12px;
                margin-top: 8px;
            }
            .now-playing-content .now-playing-actions .action-primary {
                display: flex;
                flex-direction: row;
                gap: 10px;
            }
            .now-playing-content .now-playing-actions .action-secondary {
                display: flex;
                flex-direction: row;
                gap: 6px;
                margin-top: 2px;
            }
            .now-playing-actions .ticket-btn,
            .now-playing-actions .artist-btn {
                flex: 1 1 0;
                min-width: 0;
                max-width: 200px;
                padding: 10px 14px;
                font-size: 0.72rem;
                justify-content: center;
            }
            .now-playing-actions .artist-btn svg,
            .now-playing-actions .ticket-btn svg {
                width: 15px;
                height: 15px;
            }
            .now-playing-content .now-playing-actions .action-pill {
                width: 30px;
                height: 30px;
            }
            .now-playing-content .now-playing-actions .action-pill svg {
                width: 14px;
                height: 14px;
            }
            .now-playing-track-list {
                display: none;
            }
            /* Player in right column beside album art; cream card with navy outline */
            .now-playing-content .now-playing-bottom {
                grid-column: 2;
                grid-row: 5;
                padding: var(--space-sm) var(--space-md);
                margin: 0;
                max-width: 100%;
                background: var(--paper);
                border: var(--border) solid var(--ink);
                border-radius: var(--radius);
                box-shadow: var(--shadow);
            }
            .now-playing-track {
                font-size: 1.05rem;
            }
            .now-playing-album {
                font-size: 0.86rem;
            }
            .now-playing-genre-pill {
                font-size: 0.68rem;
                padding: 2px 10px;
            }
            .progress-container {
                margin-bottom: 12px;
            }
            .now-playing-controls {
                margin-bottom: 0;
                justify-content: flex-start;
            }
            .artist-event-banner {
                margin-top: 12px;
            }
            .now-playing-scroll-area {
                padding: 0 0 32px;
            }
            .similar-artists-section {
                margin-top: 20px;
                padding-top: 18px;
                padding-bottom: 20px;
                border-top: var(--border) dashed var(--ink);
            }
            .similar-artists-section + .similar-artists-section {
                margin-top: 16px;
                padding-top: 18px;
                padding-bottom: 20px;
            }
            .similar-artists-header {
                margin-bottom: 12px;
                justify-content: flex-start;
            }
            .similar-artists-title {
                font-size: 1.55rem;
            }
            .similar-artists-row {
                display: flex;
                align-items: stretch;
                gap: 0;
                position: relative;
            }
            .similar-artists-arrow {
                display: flex;
                flex-shrink: 0;
                width: 40px;
                height: 40px;
                min-height: auto;
                border: var(--border) solid var(--ink);
                background: var(--paper);
                color: var(--ink);
                cursor: pointer;
                align-items: center;
                justify-content: center;
                border-radius: 50%;
                transition: background 0.15s, color 0.15s, opacity 0.2s, transform 0.15s, box-shadow 0.15s;
                position: absolute;
                top: 50%;
                transform: translateY(-50%);
                z-index: 5;
                box-shadow: var(--shadow);
            }
            .similar-artists-arrow:hover {
                background: var(--teal);
                color: white;
                transform: translateY(-50%) translate(-1px, -1px);
                box-shadow: var(--shadow-hover);
            }
            .similar-artists-arrow svg {
                width: 20px;
                height: 20px;
            }
            .similar-artists-arrow-left {
                left: 4px;
                border-radius: 50%;
            }
            .similar-artists-arrow-right {
                right: 4px;
                border-radius: 50%;
            }
            .similar-artists-row.at-start .similar-artists-arrow-left {
                opacity: 0;
                pointer-events: none;
            }
            .similar-artists-row.at-end .similar-artists-arrow-right {
                opacity: 0;
                pointer-events: none;
            }
            .similar-artists-scroll {
                display: flex;
                flex: 1;
                gap: 10px;
                overflow-x: auto;
                overflow-y: hidden;
                scroll-behavior: smooth;
                scrollbar-width: none;
                -webkit-overflow-scrolling: touch;
                padding: 8px 16px;
                min-width: 0;
                -webkit-mask-image: linear-gradient(to right, transparent 0px, black 24px, black calc(100% - 24px), transparent 100%);
                mask-image: linear-gradient(to right, transparent 0px, black 24px, black calc(100% - 24px), transparent 100%);
            }
            .similar-artists-scroll::-webkit-scrollbar {
                display: none;
            }
            /* Card width ~170px to match main page style */
            .similar-artist-card {
                flex: 0 0 170px;
                width: 170px;
                min-width: 170px;
                display: flex;
                flex-direction: column;
                align-items: center;
                padding: 14px 12px;
                text-align: center;
                min-height: 160px;
            }
            .similar-artist-card .similar-artist-img-wrap {
                width: 88px;
                height: 88px;
                margin: 0 auto 18px;
                flex-shrink: 0;
            }
            .similar-artist-card .similar-artist-img {
                width: 100%;
                height: 100%;
            }
            .similar-artist-card .similar-artist-name {
                font-size: 0.78rem;
                margin-bottom: 4px;
                overflow: hidden;
                text-overflow: ellipsis;
                display: -webkit-box;
                -webkit-line-clamp: 2;
                line-clamp: 2;
                -webkit-box-orient: vertical;
                width: 100%;
            }
            .similar-artist-card .similar-artist-genre {
                font-size: 0.58rem;
                margin-bottom: 6px;
                flex-shrink: 0;
                display: inline-block;
            }
            .similar-artist-card .similar-artist-near-badge {
                display: inline-flex;
                margin-bottom: 4px;
                flex-shrink: 0;
            }
            .similar-artist-card .similar-artist-event {
                font-size: 0.62rem;
                line-height: 1.3;
                text-align: center;
                margin-top: 2px;
                width: 100%;
            }
            .similar-artist-card .similar-artist-event-date,
            .similar-artist-card .similar-artist-event-venue,
            .similar-artist-card .similar-artist-event-city {
                display: block;
            }
            .similar-artist-card .similar-artist-event-date {
                color: var(--accent);
                font-weight: 700;
            }
            .similar-artist-card .similar-artist-event-venue {
                font-weight: 600;
                color: var(--ink);
            }
            .similar-artist-card .similar-artist-event-city {
                color: var(--text-muted);
            }
        }

        /* ── Desktop Dashboard (1024px+) — single column layout, NO sidebar ── */
        @media (min-width: 1024px) {
            .scanner-view.visible {
                flex-direction: column;
            }
            /* Hide back button on desktop; user navigates via browser or main site */
            .back-link {
                display: none !important;
            }
            .scanner-desktop-sidebar {
                display: none !important;
            }
            .now-playing-overlay.active {
                left: 0;
                right: 0;
                width: auto;
                padding: 0;
                display: flex;
                flex-direction: column;
                align-items: stretch;
            }
            .desktop-nav-tab {
                display: flex;
                flex-direction: column;
                align-items: center;
                gap: 4px;
                padding: 12px 8px;
                background: none;
                border: none;
                border-radius: 12px;
                color: var(--text-muted);
                font-family: var(--font-sans);
                font-size: 0.65rem;
                font-weight: 700;
                text-transform: uppercase;
                letter-spacing: 0.04em;
                cursor: pointer;
                transition: background 0.15s, color 0.15s;
            }
            .desktop-nav-tab:hover {
                background: rgba(61,107,125,0.08);
                color: var(--ink);
            }
            .desktop-nav-tab.active {
                color: var(--accent);
                background: rgba(232,103,60,0.12);
            }
            .desktop-nav-tab svg {
                width: 22px;
                height: 22px;
            }
            .now-playing-overlay.active .now-playing-scroll-wrapper {
                flex: 1;
                min-width: 0;
                width: 100%;
                display: flex;
                flex-direction: column;
                overflow-y: auto;
                background: var(--bg);
                padding: calc(env(safe-area-inset-top, 0px) + 56px) 64px 48px;
            }
            /* Single column layout for artist detail page - max 1000px centered */
            .now-playing-overlay.active .now-playing-container {
                display: flex;
                flex-direction: column;
                gap: 0;
                max-width: 1000px;
                margin: 0 auto;
                padding: 0;
                width: 100%;
                align-items: stretch;
            }
            .now-playing-left-column {
                flex: none;
                width: 100%;
                max-width: 100%;
                position: static;
            }
            .now-playing-scroll-area {
                flex: none;
                width: 100%;
                min-width: 0;
                padding: 0;
                padding-top: 0;
                border-top: none;
            }
            .now-playing-hero {
                padding: 28px 28px 24px;
                background: var(--paper);
                border: var(--border) solid var(--ink);
                border-radius: var(--radius);
                box-shadow: var(--shadow);
                overflow: visible;
            }
            .now-playing-content {
                display: grid;
                grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
                grid-template-rows: auto auto auto auto;
                gap: 24px 36px;
                align-items: start;
                text-align: left;
            }
            .now-playing-header-row {
                grid-column: 1 / -1;
                grid-row: 1;
                flex-direction: row;
                align-items: flex-start;
                justify-content: space-between;
                gap: 16px;
            }
            .now-playing-content .now-playing-artist {
                font-size: clamp(2.6rem, 4.1vw, 4.4rem);
                line-height: 0.95;
                margin: 0;
                padding: 0;
                text-align: left;
                max-width: min(100%, 700px);
            }
            .now-playing-content .now-playing-artist-info {
                grid-column: 1 / -1;
                grid-row: 2;
                display: none !important;
            }
            .now-playing-overlay .happening-badge {
                margin-top: 2px;
                padding: 8px 16px;
                background: rgba(61, 107, 125, 0.12);
                color: var(--ink);
                border: var(--border) solid var(--ink);
                border-radius: var(--radius-pill);
                font-size: 0.76rem;
                letter-spacing: 0.02em;
                white-space: nowrap;
                box-shadow: none;
                flex-shrink: 0;
            }
            .now-playing-overlay .happening-badge svg {
                width: 14px;
                height: 14px;
                color: var(--accent);
            }
            .now-playing-content .vinyl-container {
                grid-column: 1;
                grid-row: 2 / 6;
                width: clamp(280px, 30vw, 380px);
                height: clamp(280px, 30vw, 380px);
                box-shadow: var(--shadow);
                border-radius: var(--radius);
                border: var(--border) solid var(--ink);
            }
            .now-playing-content .vinyl-disc {
                border-radius: calc(var(--radius) - 2px);
                box-shadow: none;
            }
            .now-playing-content .now-playing-info {
                grid-column: 2;
                grid-row: 2;
                text-align: left;
                margin-top: 4px;
                min-width: 0;
            }
            .now-playing-content .now-playing-track {
                font-family: var(--font-serif);
                font-size: 1.2rem;
                font-weight: 700;
                line-height: 1.2;
                white-space: normal;
                overflow: visible;
                text-overflow: clip;
            }
            .now-playing-content .now-playing-album {
                font-size: 0.9rem;
                margin-top: 4px;
                white-space: normal;
            }
            .now-playing-content .now-playing-genre-pill {
                display: inline-flex;
                align-items: center;
                margin-top: 14px;
                padding: 4px 12px;
                border: var(--border) solid var(--ink);
                border-radius: 999px;
                font-size: 0.72rem;
            }
            .now-playing-content .now-playing-meta {
                margin-top: 12px;
                font-size: 0.82rem;
            }
            .now-playing-content .now-playing-actions {
                grid-column: 2;
                grid-row: 3;
                flex-direction: column;
                flex-wrap: nowrap;
                align-items: flex-start;
                justify-content: flex-start;
                gap: 12px;
                margin-top: 0;
            }
            .now-playing-content .now-playing-actions .action-primary {
                display: flex;
                flex-direction: row;
                gap: 10px;
            }
            .now-playing-content .now-playing-actions .action-secondary {
                display: flex;
                flex-direction: row;
                gap: 6px;
                margin-top: 2px;
            }
            .now-playing-actions .ticket-btn,
            .now-playing-actions .artist-btn {
                min-width: 200px;
                padding: 14px 28px;
                font-size: 0.85rem;
                letter-spacing: 0.08em;
                box-shadow: var(--shadow);
            }
            .now-playing-actions .artist-btn {
                background: var(--paper);
            }
            .now-playing-actions .artist-btn svg {
                color: #1DB954;
            }
            .now-playing-content .now-playing-bottom {
                grid-column: 2;
                grid-row: 4;
                padding: 18px 22px;
                margin: 2px 0 0;
                width: min(100%, 560px);
                max-width: 100%;
                background: #F5F0E6;
                border: var(--border) solid var(--ink);
                border-radius: var(--radius);
                box-shadow: 1px 1px 0 var(--ink);
            }
            .loading-status {
                text-align: left;
                margin-bottom: 8px;
            }
            .progress-container {
                margin-bottom: 12px;
            }
            .progress-bar {
                height: 10px;
                background: rgba(26, 46, 53, 0.12);
                border: 1px solid rgba(26, 46, 53, 0.25);
            }
            .progress-fill {
                background: var(--accent);
            }
            .progress-time {
                margin-top: 8px;
                margin-bottom: 14px;
                font-size: 0.8rem;
            }
            .now-playing-controls {
                margin-bottom: 0;
                justify-content: center;
                gap: 16px;
            }
            .control-btn {
                width: 52px;
                height: 52px;
                min-width: 52px;
                min-height: 52px;
            }
            .control-btn-large {
                width: 66px;
                height: 66px;
                min-width: 66px;
                min-height: 66px;
            }
            .now-playing-content .now-playing-actions .action-pill {
                width: 44px;
                height: 44px;
                box-shadow: var(--shadow);
            }
            .now-playing-content .now-playing-actions .action-pill svg {
                width: 18px;
                height: 18px;
            }
            .similar-artists-section {
                margin-top: 24px;
                padding-top: 20px;
                padding-bottom: 24px;
                border-top: var(--border) dashed var(--ink);
            }
            .similar-artists-section + .similar-artists-section {
                margin-top: 20px;
                padding-top: 20px;
                padding-bottom: 24px;
            }
            .similar-artists-header {
                margin-bottom: 14px;
            }
            .similar-artists-title {
                font-size: 1.7rem;
            }
            .similar-artists-count {
                min-height: 26px;
                font-size: 0.72rem;
                padding: 0 10px;
            }
            /* Keep horizontal scroll with arrows on desktop - do NOT use grid */
            .similar-artists-row {
                display: flex;
                align-items: stretch;
                gap: 0;
                position: relative;
            }
            .similar-artists-row .similar-artists-arrow-left,
            .similar-artists-row .similar-artists-arrow-right {
                display: flex;
            }
            .similar-artists-scroll {
                display: flex;
                flex: 1;
                gap: 10px;
                overflow-x: auto;
                overflow-y: hidden;
                scroll-behavior: smooth;
                scrollbar-width: none;
                -webkit-overflow-scrolling: touch;
                padding: 8px 16px;
                min-width: 0;
                -webkit-mask-image: linear-gradient(to right, transparent 0px, black 24px, black calc(100% - 24px), transparent 100%);
                mask-image: linear-gradient(to right, transparent 0px, black 24px, black calc(100% - 24px), transparent 100%);
            }
            .similar-artist-card {
                flex: 0 0 170px;
                width: 170px;
                min-width: 170px;
                min-height: 160px;
                padding: 14px 12px;
            }
            .similar-artist-card .similar-artist-genre {
                display: inline-block;
                margin-bottom: 6px;
            }
            .similar-artist-card .similar-artist-near-badge {
                font-size: 0.55rem;
                padding: 2px 6px;
                border-radius: 8px;
            }
        }

        .liner-notes-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.4);
            z-index: 999;
        }
        .liner-notes-overlay.open { display: block; }

        .liner-notes-sheet {
            position: fixed;
            bottom: var(--bottom-nav-clearance);
            left: 0;
            right: 0;
            z-index: 1000;
            max-height: min(80dvh, calc(100dvh - var(--bottom-nav-clearance) - 12px));
            background: var(--paper);
            border-radius: var(--radius);
            border: var(--border) solid var(--ink);
            box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
            display: flex;
            flex-direction: column;
            overflow: hidden;
            transform: translateY(calc(100% + var(--bottom-nav-clearance)));
            transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
            will-change: transform;
            touch-action: none;
        }
        .liner-notes-sheet.expanded { transform: translateY(0); }
        .liner-notes-sheet.hidden { transform: translateY(calc(100% + var(--bottom-nav-clearance))); pointer-events: none; }
        .liner-notes-sheet.dragging { transition: none; }

        .liner-notes-handle { flex-shrink: 0; display: flex; justify-content: center; padding: 10px 0 4px; cursor: grab; }
        .liner-notes-handle-bar { width: 40px; height: 4px; background: var(--text-muted); border-radius: 2px; opacity: 0.4; }

        .liner-notes-close-btn {
            display: none;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            border: var(--border) solid var(--ink);
            background: var(--paper);
            align-items: center;
            justify-content: center;
            cursor: pointer;
            box-shadow: var(--shadow);
            transition: transform 0.1s, box-shadow 0.1s;
            -webkit-tap-highlight-color: transparent;
        }
        .liner-notes-close-btn:active {
            transform: translate(2px,2px);
            box-shadow: none;
        }
        .liner-notes-close-btn svg { width: 18px; height: 18px; }

        .liner-notes-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 2px 14px 8px;
            flex-shrink: 0;
        }
        .liner-notes-title-group { display: flex; align-items: baseline; gap: 6px; }
        .liner-notes-title { font-family: var(--font-serif); font-size: 0.95rem; font-weight: 700; color: var(--ink); }
        .liner-notes-count { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; }

        .liner-notes-expanded-content { display: flex; flex: 1; flex-direction: column; min-height: 0; overflow: hidden; }

        .liner-notes-sort-row { display: flex; align-items: center; gap: 8px; padding: 4px 14px 8px; flex-shrink: 0; }
        .liner-notes-sort-btn {
            padding: 6px 14px;
            background: var(--paper);
            color: var(--text-muted);
            border: var(--border) solid transparent;
            border-radius: var(--radius-pill);
            font-family: var(--font-sans);
            font-size: 0.75rem;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.15s;
        }
        .liner-notes-sort-btn.active { background: var(--teal); color: white; border-color: var(--ink); }

        .liner-notes-list { flex: 1; overflow-y: auto; padding: 0 14px; -webkit-overflow-scrolling: touch; }
        .liner-note-item { padding: 14px 0; border-bottom: 1px solid rgba(0,0,0,0.07); }
        .liner-note-item:last-child { border-bottom: none; }
        .liner-note-text { font-size: 0.92rem; color: var(--text-dark); line-height: 1.55; margin-bottom: 8px; word-break: break-word; }
        .liner-note-meta { display: flex; align-items: center; justify-content: space-between; }
        .liner-note-time { font-size: 0.72rem; color: var(--text-muted); font-weight: 500; }
        .liner-note-felt-btn {
            display: inline-flex; align-items: center; gap: 5px; padding: 5px 12px;
            background: none; border: 1.5px solid rgba(0,0,0,0.15); border-radius: 20px;
            color: var(--text-muted); font-family: var(--font-sans); font-size: 0.72rem;
            font-weight: 700; cursor: pointer; transition: all 0.15s;
        }
        .liner-note-felt-btn.felt { background: var(--bg); border-color: var(--bg); color: white; }
        .liner-note-felt-btn svg { width: 13px; height: 13px; }
        .liner-notes-empty { text-align: center; padding: 32px 20px; color: var(--text-muted); font-size: 0.9rem; font-style: italic; line-height: 1.5; }

        .liner-notes-attach-btn {
            width: 40px; height: 40px; background: var(--paper); color: var(--text-muted);
            border: var(--border) solid var(--ink); border-radius: 50%; display: flex;
            align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0;
            box-shadow: var(--shadow); transition: all 0.15s;
        }
        .liner-notes-attach-btn:hover { background: var(--paper); color: var(--teal); }
        .liner-notes-attach-btn.has-image { background: var(--teal); color: white; }
        .liner-notes-attach-btn svg { width: 18px; height: 18px; }
        .liner-notes-image-preview {
            display: none; position: relative; margin-bottom: 10px; padding: 0 16px;
        }
        .liner-notes-image-preview.active { display: block; }
        .liner-notes-image-preview img {
            width: 100%; max-height: 150px; object-fit: cover; border-radius: var(--radius);
            border: var(--border) solid var(--ink);
        }
        .liner-notes-image-preview-remove {
            position: absolute; top: 8px; right: 24px; width: 28px; height: 28px;
            background: rgba(0,0,0,0.6); border: none; border-radius: 50%; color: white;
            cursor: pointer; display: flex; align-items: center; justify-content: center;
        }
        .liner-notes-image-preview-remove svg { width: 16px; height: 16px; }
        .liner-note-image {
            width: 100%; border-radius: var(--radius); margin-top: 8px;
            border: var(--border) solid var(--ink); cursor: pointer; transition: transform 0.15s;
        }
        .liner-note-image:hover { transform: scale(1.02); }

        /* Play button row */
        .liner-note-play-row {
            display: flex; align-items: center; gap: 10px; margin-top: 10px;
            padding: 8px 10px; background: rgba(0,0,0,0.03); border-radius: 10px;
        }
        .liner-note-album-art {
            width: 36px; height: 36px; border-radius: 6px; object-fit: cover;
            border: var(--border) solid var(--ink); flex-shrink: 0;
        }
        .liner-note-album-placeholder {
            width: 36px; height: 36px; border-radius: 6px; background: rgba(0,0,0,0.08);
            display: flex; align-items: center; justify-content: center; flex-shrink: 0;
            border: var(--border) solid var(--ink);
        }
        .liner-note-album-placeholder svg { width: 16px; height: 16px; color: var(--text-muted); }
        .liner-note-play-btn {
            width: 30px; height: 30px; border-radius: 50%; background: var(--bg);
            border: none; color: white; cursor: pointer; display: flex;
            align-items: center; justify-content: center; flex-shrink: 0; transition: all 0.15s;
        }
        .liner-note-play-btn:hover { transform: scale(1.1); }
        .liner-note-play-btn.disabled { background: rgba(0,0,0,0.1); cursor: default; }
        .liner-note-play-btn.disabled:hover { transform: none; }
        .liner-note-play-btn svg { width: 14px; height: 14px; }
        .liner-note-play-btn.playing { background: var(--teal); }
        .liner-note-progress {
            flex: 1; height: 4px; background: rgba(0,0,0,0.1);
            border-radius: 2px; overflow: hidden;
        }
        .liner-note-progress-fill {
            height: 100%; background: var(--bg); border-radius: 2px;
            width: 0%; transition: width 0.2s;
        }

        /* Reply section */
        .liner-note-reply-btn {
            display: inline-flex; align-items: center; gap: 4px; background: none;
            border: none; color: var(--text-muted); font-family: var(--font-sans);
            font-size: 0.72rem; font-weight: 600; cursor: pointer;
            padding: 4px 8px; border-radius: 12px; transition: all 0.15s;
        }
        .liner-note-reply-btn:hover { background: rgba(0,0,0,0.05); color: var(--teal); }
        .liner-note-reply-btn svg { width: 13px; height: 13px; }
        .liner-note-replies { display: none; margin-top: 10px; padding-left: 16px; border-left: 2px solid rgba(0,0,0,0.08); }
        .liner-note-replies.open { display: block; }
        .liner-note-reply-item { padding: 8px 0; border-bottom: 1px solid rgba(0,0,0,0.04); }
        .liner-note-reply-item:last-child { border-bottom: none; }
        .liner-note-reply-text { font-size: 0.85rem; color: var(--text-dark); line-height: 1.4; }
        .liner-note-reply-time { font-size: 0.68rem; color: var(--text-muted); margin-top: 3px; }
        .liner-note-reply-input-row {
            display: flex; align-items: center; gap: 8px; margin-top: 8px;
        }
        .liner-note-reply-input {
            flex: 1; padding: 7px 10px; background: var(--paper);
            border: 1.5px solid rgba(0,0,0,0.12); border-radius: 8px;
            font-family: var(--font-sans); font-size: 0.82rem;
            color: var(--text-dark); outline: none;
        }
        .liner-note-reply-input:focus { border-color: var(--teal); }
        .liner-note-reply-send {
            width: 30px; height: 30px; background: var(--teal); color: white;
            border: none; border-radius: 50%; cursor: pointer;
            display: flex; align-items: center; justify-content: center; flex-shrink: 0;
        }
        .liner-note-reply-send svg { width: 14px; height: 14px; }

        .liner-notes-input-row {
            display: flex; align-items: center; gap: 10px;
            padding: 10px 14px; padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
            border-top: var(--border) solid rgba(0,0,0,0.06); background: var(--paper); flex-shrink: 0;
        }
        .liner-notes-input {
            flex: 1; padding: 10px 14px; background: var(--paper);
            border: var(--border) solid var(--ink); border-radius: 10px;
            font-family: var(--font-sans); font-size: 0.88rem;
            color: var(--text-dark); outline: none; resize: none;
            min-height: 40px; max-height: 80px;
        }
        .liner-notes-input:focus { border-color: var(--teal); box-shadow: 0 0 0 2px rgba(61,107,125,0.15); }
        .liner-notes-input::placeholder { color: var(--text-muted); }
        .liner-notes-send-btn {
            width: 40px; height: 40px; background: var(--teal); color: white;
            border: var(--border) solid var(--ink); border-radius: 50%;
            display: flex; align-items: center; justify-content: center;
            cursor: pointer; flex-shrink: 0; box-shadow: var(--shadow); transition: all 0.15s;
        }
        .liner-notes-send-btn:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: none; }
        .liner-notes-send-btn:disabled { opacity: 0.35; cursor: default; }
        .liner-notes-send-btn svg { width: 18px; height: 18px; }

        @media (max-width: 768px) {
            body.liner-notes-open .bottom-nav,
            body.liner-notes-open .bottom-spacer {
                display: none !important;
            }

            .liner-notes-overlay {
                inset: 0;
                z-index: 9998;
            }

            .liner-notes-sheet {
                inset: auto 0 0 0;
                left: 0;
                right: 0;
                width: 100%;
                max-width: 100%;
                max-height: min(80dvh, calc(100dvh - var(--safe-top)));
                z-index: 9999;
                transform: translateY(100%);
                border-radius: 18px 18px 0 0;
                border-bottom-width: 0;
                box-shadow: 0 -10px 30px rgba(0,0,0,0.18);
                touch-action: none;
            }

            .liner-notes-input-row {
                padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
                border-radius: 0;
            }

            .liner-notes-sheet.expanded {
                transform: translateY(0);
                visibility: visible;
            }

            .liner-notes-sheet.hidden {
                transform: translateY(100%);
                visibility: hidden;
                display: none;
            }
        }

        @media (max-width: 540px) {
            .liner-notes-header {
                padding: 2px 14px 8px;
            }

            .liner-notes-title {
                font-size: 0.95rem;
            }

            .liner-notes-sort-row {
                padding: 4px 14px 8px;
            }

            .liner-notes-list {
                padding: 0 14px;
            }

            .liner-notes-input-row {
                padding: 10px 14px;
                padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
                border-radius: 0;
                background: var(--paper);
            }

            .liner-notes-input {
                background: var(--paper);
            }
        }

        /* Desktop: right-side panel instead of bottom sheet */
        @media (min-width: 769px) {
            .liner-notes-sheet {
                top: 0;
                right: 0;
                bottom: 0;
                left: auto;
                width: 400px;
                max-height: none;
                border-radius: var(--radius) 0 0 var(--radius);
                border: var(--border) solid var(--ink);
                border-right: none;
                transform: translateX(100%);
                box-shadow: -4px 0 20px rgba(0,0,0,0.15);
            }
            .liner-notes-sheet.expanded { transform: translateX(0); }
            .liner-notes-sheet.hidden { transform: translateX(100%); }
            .liner-notes-sheet.dragging { transition: none; }
            .liner-notes-handle { display: none; }
            .liner-notes-close-btn { display: flex; }
            .liner-notes-header { padding: 16px 18px 12px; border-bottom: 2px solid rgba(0,0,0,0.06); }
            .liner-notes-expanded-content { overflow: hidden; }
            .liner-notes-list { padding: 0 18px; overflow-y: auto; overflow-x: hidden; }
            .liner-notes-input-row { padding: 12px 18px; }
        }

        .manual-search {
            display: none;
        }


        .camera-permission {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 14px;
            color: var(--ink);
            text-align: center;
            padding: 24px 22px 22px;
            background: var(--paper);
            border-radius: var(--radius);
            border: 3px solid var(--ink);
            box-shadow: 4px 4px 0 var(--ink);
            width: min(340px, calc(100% - 32px));
            max-width: 80%;
            z-index: 20;
        }

        .camera-permission-title {
            margin: 0;
            font-family: var(--font-serif);
            font-size: clamp(1.8rem, 7vw, 2.6rem);
            font-weight: 700;
            letter-spacing: -0.04em;
            line-height: 0.98;
            color: var(--ink);
            text-wrap: balance;
        }

        .camera-permission p {
            margin: 0;
            max-width: 20ch;
            font-family: var(--font-sans);
            font-size: 1rem;
            font-weight: 500;
            line-height: 1.5;
            color: var(--text-dark);
            text-wrap: balance;
        }

        .enable-camera-btn {
            padding: 12px 22px;
            background: var(--accent);
            color: white;
            border: var(--border) solid var(--ink);
            border-radius: var(--radius-pill);
            box-shadow: var(--shadow);
            font-family: var(--font-sans);
            font-size: 0.8rem;
            font-weight: 700;
            letter-spacing: 0.08em;
            line-height: 1;
            text-transform: uppercase;
            cursor: pointer;
            transition: transform 0.12s, box-shadow 0.12s, background 0.12s ease;
        }

        .enable-camera-btn:active {
            transform: translate(2px, 2px);
            box-shadow: none;
        }

        .hidden {
            display: none !important;
        }

        /* Web desktop: only Search + Recent, no Point & Play; allow trackpad/page scroll */
        @media (min-width: 769px) {
            html {
                overflow: hidden;
                height: 100%;
            }
            body {
                overflow-x: hidden;
                overflow-y: auto;
                height: auto;
                min-height: 100dvh;
                overscroll-behavior-y: auto;
                touch-action: pan-y;
            }
            .container {
                overflow: visible;
                height: auto;
                min-height: 100dvh;
            }
            .scanner-view {
                overflow: visible;
                min-height: 100dvh;
            }
            .camera-container.mode-search {
                flex: 1 1 auto;
                min-height: 100dvh;
                position: relative;
            }
            /* Search overlay in flow so body scrolls with trackpad */
            .camera-container.mode-search .search-overlay {
                position: relative;
                width: 100%;
                height: auto;
                min-height: 100dvh;
                overflow: visible;
                -webkit-overflow-scrolling: auto;
            }
            .scanner-view #videoElement,
            .scanner-view .camera-overlay,
            .scanner-view .camera-permission,
            .scanner-view .camera-bottom-row,
            .scanner-view .zoom-buttons {
                display: none !important;
            }
        }

        /* ── Main Action Button ── */
        .main-action-btn {
            width: 64px;
            height: 64px;
            min-width: 0;
            padding: 0;
            border-radius: 50%;
            background: white !important;
            color: var(--ink);
            border: var(--border) solid var(--ink);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: var(--shadow);
            transition: transform 0.12s, box-shadow 0.12s;
            -webkit-tap-highlight-color: transparent;
            flex-shrink: 0;
        }

        .main-action-btn:active {
            transform: translate(3px, 3px);
            box-shadow: none;
        }

        .main-action-btn svg {
            width: 26px;
            height: 26px;
        }

        .main-action-btn #mainActionLabel {
            display: none;
        }

        .main-action-btn.listening {
            animation: btn-pulse 1.5s ease-in-out infinite;
        }

        @keyframes btn-pulse {
            0%, 100% { box-shadow: var(--shadow); }
            50% { box-shadow: var(--shadow), 0 0 0 8px rgba(232,106,51,0.3); }
        }

        /* ── Search Overlay ── */
        .search-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: var(--bg);
            display: none;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 24px;
            z-index: 5;
            overflow-y: auto;
        }

        /* Hide search bar in overlay - now in header */
        .search-overlay-top {
            display: none !important;
        }

        /* Desktop: content in upper portion of screen, not dead center */
        @media (min-width: 769px) {
            .search-overlay {
                padding-top: 10vh;
            }
        }

        .search-overlay.active {
            display: flex;
        }

        /* Hide search overlay when now-playing is active */
        .scanner-view:has(.now-playing-overlay.active) .search-overlay {
            display: none !important;
        }

        /* When loading initial artist from URL, show skeleton card — no form, no camera */
        .search-overlay.initial-artist-loading .search-overlay-top,
        .search-overlay.initial-artist-loading .search-result,
        .search-overlay.initial-artist-loading .search-empty-card {
            display: none !important;
        }
        .search-overlay.initial-artist-loading .search-status {
            display: none;
        }
        .search-initial-loading {
            display: none;
            flex: 1;
            align-items: center;
            justify-content: center;
            width: 100%;
            padding: 24px;
        }
        .search-overlay.initial-artist-loading .search-initial-loading {
            display: flex;
        }
        .search-initial-loading-card {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 14px;
            max-width: 340px;
            width: 100%;
            padding: 28px 24px;
            background: var(--paper);
            border: var(--border) solid var(--ink);
            border-radius: var(--radius);
            box-shadow: var(--shadow);
            text-align: center;
        }
        .search-initial-loading-badge {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 6px 12px;
            background: var(--teal);
            color: white;
            border: var(--border) solid var(--ink);
            border-radius: var(--radius-pill);
            font-size: 0.68rem;
            font-weight: 700;
            letter-spacing: 0.08em;
            text-transform: uppercase;
        }
        .search-initial-loading-badge svg {
            width: 14px;
            height: 14px;
        }
        .search-initial-loading-icon {
            width: 76px;
            height: 76px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: var(--accent);
            color: white;
            border: var(--border) solid var(--ink);
            border-radius: 50%;
            box-shadow: var(--shadow);
        }
        .search-initial-loading-icon svg {
            width: 34px;
            height: 34px;
        }
        .search-initial-loading-title {
            font-family: var(--font-serif);
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--ink);
            line-height: 1.15;
            letter-spacing: -0.02em;
        }
        .search-initial-loading-copy {
            font-size: 0.84rem;
            color: var(--text-muted);
            line-height: 1.45;
        }
        .search-initial-loading-status {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            font-size: 0.72rem;
            font-weight: 700;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: var(--teal);
            margin-top: 2px;
        }
        .search-initial-loading-status .dot-pulse {
            display: inline-flex;
            gap: 3px;
        }
        .search-initial-loading-status .dot-pulse span {
            width: 4px;
            height: 4px;
            border-radius: 50%;
            background: var(--teal);
            animation: dotPulse 1.2s infinite ease-in-out;
        }
        .search-initial-loading-status .dot-pulse span:nth-child(2) { animation-delay: 0.2s; }
        .search-initial-loading-status .dot-pulse span:nth-child(3) { animation-delay: 0.4s; }

        .search-overlay-top {
            width: 100%;
            max-width: 760px;
            text-align: center;
        }

        .search-overlay .search-heading {
            font-family: var(--font-serif);
            font-size: 1.65rem;
            font-weight: 700;
            color: var(--ink);
            margin-bottom: 10px;
            letter-spacing: -0.02em;
            line-height: 1.2;
        }

        .search-overlay .search-sub {
            font-size: 0.8rem;
            color: var(--text-muted);
            margin-bottom: 28px;
            line-height: 1.4;
            font-weight: 400;
        }

        .search-controls-row {
            width: 100%;
            max-width: 760px;
            margin: 0 auto;
            display: flex;
            align-items: stretch;
            gap: 10px;
        }

        .search-bar {
            flex: 1;
            min-width: 0;
            max-width: none;
            position: relative;
            margin: 0;
        }

        .search-mode-shortcuts {
            display: flex;
            align-items: stretch;
            gap: 8px;
            flex-shrink: 0;
        }

        .search-mode-shortcuts .header-action-btn {
            height: 100%;
            min-height: 56px;
            padding: 0 14px;
            justify-content: center;
            white-space: nowrap;
            cursor: pointer;
        }

        .search-mode-shortcuts .header-action-btn .shortcut-label {
            display: inline;
        }

        .search-bar-icon {
            position: absolute;
            left: 16px;
            top: 50%;
            transform: translateY(-50%);
            width: 22px;
            height: 22px;
            color: var(--ink);
            opacity: 0.7;
            pointer-events: none;
        }

        .search-bar-icon svg {
            width: 100%;
            height: 100%;
        }

        .search-input {
            width: 100%;
            padding: 16px 48px 16px 50px;
            background: white;
            border: var(--border) solid var(--ink);
            border-radius: var(--radius);
            font-family: var(--font-sans);
            font-size: 1rem;
            color: var(--ink);
            outline: none;
            box-shadow: var(--shadow);
            transition: border-color 0.2s ease, box-shadow 0.2s ease;
        }

        .search-input:focus {
            border-color: var(--teal);
            box-shadow: 2px 2px 0 var(--teal);
        }

        .search-overlay .search-bar:focus-within .search-bar-icon {
            color: var(--ink);
            opacity: 1;
        }

        .search-input::placeholder {
            color: var(--text-muted);
        }

        .search-clear-btn {
            position: absolute;
            right: 12px;
            top: 50%;
            transform: translateY(-50%);
            width: 32px;
            height: 32px;
            border: none;
            background: var(--paper);
            color: var(--ink);
            font-size: 1.2rem;
            cursor: pointer;
            display: none;
            align-items: center;
            justify-content: center;
            border-radius: 10px;
        }

        .search-clear-btn.visible {
            display: flex;
        }

        @media (max-width: 767px) {
            .search-controls-row {
                gap: 8px;
            }

            .search-mode-shortcuts {
                gap: 6px;
            }

            .search-mode-shortcuts .header-action-btn {
                width: 52px;
                min-height: 52px;
                padding: 0;
                gap: 0;
            }

            .search-mode-shortcuts .header-action-btn .shortcut-label {
                display: none;
            }
        }

        .search-actions {
            display: none; /* Hide separate Search button - triggers on Enter key */
            gap: 12px;
            justify-content: center;
            margin-top: 16px;
            flex-wrap: wrap;
        }

        .search-go-btn,
        .search-new-btn {
            font-family: var(--font-sans);
            font-size: 1rem;
            font-weight: 600;
            padding: 12px 24px;
            border-radius: var(--radius-pill);
            border: var(--border) solid var(--ink);
            cursor: pointer;
            transition: transform 0.15s ease, box-shadow 0.15s ease;
        }

        .search-go-btn {
            background: var(--ink);
            color: white;
            box-shadow: var(--shadow);
        }

        .search-go-btn:hover {
            transform: translate(-1px, -1px);
            box-shadow: var(--shadow-hover);
        }

        .search-new-btn {
            display: none;
            background: white;
            color: var(--ink);
            box-shadow: var(--shadow);
        }

        .search-new-btn:hover {
            transform: translate(-1px, -1px);
            box-shadow: var(--shadow-hover);
        }

        .search-new-btn.visible {
            display: inline-block;
        }

        .search-status.visible ~ .search-empty-card,
        .search-result.visible ~ .search-empty-card {
            display: none;
        }

        .search-empty-card {
            margin-top: 0;
            width: 100%;
            max-width: 340px;
            background: var(--paper);
            border: var(--border) solid var(--ink);
            border-radius: var(--radius);
            box-shadow: var(--shadow);
            padding: 32px 24px;
            text-align: center;
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .search-empty-card-icon {
            width: 64px;
            height: 64px;
            margin: 0 auto 16px;
            background: var(--teal);
            border-radius: 50%;
            border: var(--border) solid var(--ink);
            box-shadow: var(--shadow);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
        }

        .search-empty-card-icon svg {
            width: 32px;
            height: 32px;
        }

        .search-empty-card-heading {
            font-family: var(--font-serif);
            font-size: 1.25rem;
            font-weight: 700;
            color: var(--ink);
            margin-bottom: 8px;
            line-height: 1.2;
        }

        .search-empty-card-sub {
            font-size: 0.875rem;
            color: var(--text-muted);
            line-height: 1.45;
            font-weight: 400;
        }

        .search-status {
            color: white;
            font-size: 0.95rem;
            font-weight: 600;
            padding: 12px 24px;
            background: rgba(255, 255, 255, 0.15);
            border-radius: 12px;
            display: none;
        }

        .search-status.visible {
            display: block;
        }

        /* Artist Not Found State */
        .artist-not-found {
            display: none;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            text-align: center;
            padding: 32px 24px;
            background: var(--paper);
            border-radius: var(--radius);
            border: var(--border) solid var(--ink);
            box-shadow: var(--shadow);
            max-width: 320px;
            width: 100%;
        }

        .not-found-icon {
            width: 56px;
            height: 56px;
            margin-bottom: 16px;
            color: var(--text-muted);
        }

        .not-found-icon svg {
            width: 100%;
            height: 100%;
        }

        .not-found-title {
            font-family: var(--font-serif);
            font-size: 1.2rem;
            font-weight: 700;
            color: var(--text-dark);
            margin-bottom: 8px;
        }

        .not-found-query {
            font-size: 0.9rem;
            color: var(--text-muted);
            margin-bottom: 20px;
        }

        .not-found-actions {
            display: flex;
            gap: 10px;
        }

        .not-found-back,
        .not-found-search {
            padding: 10px 20px;
            border-radius: var(--radius-pill);
            font-family: var(--font-sans);
            font-size: 0.85rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.15s;
            border: var(--border) solid var(--ink);
        }

        .not-found-back {
            background: var(--paper);
            color: var(--ink);
        }

        .not-found-back:hover {
            background: var(--paper);
        }

        .not-found-search {
            background: var(--teal);
            color: white;
            box-shadow: var(--shadow);
        }

        .not-found-search:hover {
            transform: translate(-1px, -1px);
            box-shadow: var(--shadow-hover);
        }

        .search-result {
            display: none;
            flex-direction: column;
            align-items: center;
            margin-top: 12px;
            gap: 10px;
            width: 100%;
            max-width: 340px;
        }

        .search-result.visible {
            display: flex;
        }

        .search-result-frame {
            width: 120px;
            height: 120px;
            border: var(--border) solid var(--ink);
            border-radius: var(--radius);
            overflow: hidden;
            box-shadow: var(--shadow);
        }

        .search-result-frame img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .search-result-name {
            font-family: var(--font-serif);
            font-size: 1.1rem;
            font-weight: 700;
            color: var(--ink);
            padding: 0 4px;
        }

        .search-play-btn {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 12px 32px;
            background: var(--orange);
            color: white;
            border: 2.5px solid var(--border-dark);
            border-radius: 28px;
            font-family: var(--font-sans);
            font-size: 0.95rem;
            font-weight: 700;
            cursor: pointer;
            box-shadow: 3px 3px 0 var(--border-dark);
            transition: transform 0.1s, box-shadow 0.1s;
        }

        .search-play-btn:active {
            transform: translate(3px, 3px);
            box-shadow: none;
        }

        .search-play-btn svg {
            width: 20px;
            height: 20px;
        }

        /* ── Listen Overlay (actively listening) — retro design system ── */
        .listen-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: var(--bg);
            display: none;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            z-index: 5;
            padding: 32px 24px;
            overflow-y: auto;
        }

        .listen-overlay.active {
            display: flex;
        }

        .listen-card {
            background: var(--surface-cream);
            border: var(--border-thick) solid var(--ink-navy);
            border-radius: 22px;
            box-shadow: 2px 2px 0 var(--ink-navy);
            padding: 32px;
            text-align: center;
            max-width: 340px;
            width: 100%;
        }

        .listen-heading {
            font-family: var(--font-serif);
            font-size: 1.3rem;
            font-weight: 700;
            color: var(--ink-navy);
            margin-bottom: 6px;
        }

        .listen-sub {
            font-size: 0.88rem;
            color: var(--text-muted);
            margin-bottom: 20px;
            line-height: 1.4;
        }

        .listen-pulse-container {
            position: relative;
            width: 120px;
            height: 120px;
            margin: 0 auto 24px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .listen-pulse-ring {
            position: absolute;
            width: 100%;
            height: 100%;
            border-radius: 50%;
            border: 2.5px solid var(--ink-navy);
            opacity: 0;
            animation: listen-expand 2.2s ease-out infinite;
        }

        .listen-pulse-ring.delay {
            animation-delay: 0.7s;
        }

        .listen-pulse-ring.delay2 {
            animation-delay: 1.4s;
        }

        @keyframes listen-expand {
            0%   { transform: scale(0.5); opacity: 0.7; }
            100% { transform: scale(2);   opacity: 0; }
        }

        .listen-icon-circle {
            width: 72px;
            height: 72px;
            background: var(--orange);
            border-radius: 50%;
            border: var(--border-thick) solid var(--ink-navy);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            z-index: 1;
            box-shadow: 2px 2px 0 var(--ink-navy);
            animation: listen-icon-pulse 1.2s ease-in-out infinite;
        }

        @keyframes listen-icon-pulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.04); }
        }

        .listen-icon-circle svg {
            width: 28px;
            height: 28px;
        }

        .listen-status {
            font-family: var(--font-sans);
            font-size: 0.9rem;
            font-weight: 600;
            color: var(--ink-navy);
            margin-bottom: 18px;
            text-align: center;
            line-height: 1.5;
        }

        .listen-stop-btn {
            padding: 14px 28px;
            min-height: 44px;
            background: var(--surface-cream);
            color: var(--ink-navy);
            border: var(--border-thick) solid var(--ink-navy);
            border-radius: var(--radius-pill);
            font-family: var(--font-sans);
            font-size: 0.9rem;
            font-weight: 700;
            cursor: pointer;
            box-shadow: 2px 2px 0 var(--ink-navy);
            transition: transform 0.12s, box-shadow 0.12s;
        }

        .listen-stop-btn:active {
            transform: translate(2px, 2px);
            box-shadow: none;
        }

        /* Listen idle state (before tapping to start) — retro concert poster design system */
        .listen-idle {
            display: none;
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: var(--bg);
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 32px 24px;
            z-index: 4;
            overflow-y: auto;
        }

        .camera-container.mode-listen .listen-idle {
            display: flex;
        }

        .camera-container.listening-active .listen-idle {
            display: none !important;
        }

        /* Scanner card — cream paper, thick navy outline, featured card style */
        .listen-idle-card {
            background: var(--surface-cream);
            border: var(--border-thick) solid var(--ink-navy);
            border-radius: 22px;
            box-shadow: 2px 2px 0 var(--ink-navy);
            padding: 32px;
            text-align: center;
            max-width: 340px;
            width: 100%;
            cursor: pointer;
            transition: transform 0.15s, box-shadow 0.15s;
            -webkit-tap-highlight-color: transparent;
            touch-action: manipulation;
            position: relative;
            z-index: 1;
        }

        .listen-idle-card:active {
            transform: translate(2px, 2px);
            box-shadow: none;
        }

        /* Icon area — vinyl record / music signal badge */
        .listen-idle-icon-wrap {
            position: relative;
            width: 120px;
            height: 120px;
            margin: 0 auto 24px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .listen-idle-icon-halo {
            position: absolute;
            inset: -8px;
            border-radius: 50%;
            border: 2px solid rgba(61, 107, 125, 0.2);
            pointer-events: none;
        }

        .listen-idle-icon {
            width: 96px;
            height: 96px;
            background: var(--orange);
            border-radius: 50%;
            border: var(--border-thick) solid var(--ink-navy);
            box-shadow: 2px 2px 0 var(--ink-navy);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            position: relative;
            z-index: 1;
        }

        .listen-idle-icon svg {
            width: 40px;
            height: 40px;
        }

        .listen-idle-heading {
            font-family: var(--font-serif);
            font-size: 1.6rem;
            font-weight: 700;
            color: var(--ink-navy);
            letter-spacing: -0.02em;
            line-height: 1.2;
            margin-bottom: 8px;
        }

        .listen-idle-sub {
            font-family: var(--font-sans);
            font-size: 0.82rem;
            color: var(--text-muted);
            line-height: 1.5;
            margin-bottom: 24px;
        }

        .listen-idle-sub strong {
            color: var(--text-dark);
        }

        /* Primary CTA — orange pill, navy outline */
        .listen-idle-cta {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            min-height: 44px;
            padding: 14px 28px;
            background: var(--orange);
            color: white;
            border-radius: var(--radius-pill);
            border: var(--border-thick) solid var(--ink-navy);
            box-shadow: 2px 2px 0 var(--ink-navy);
            font-family: var(--font-sans);
            font-size: 0.9rem;
            font-weight: 700;
            pointer-events: none;
        }

        .listen-idle-cta svg {
            width: 20px;
            height: 20px;
        }

        /* ── Happening Near You Badge ── */
        .happening-badge {
            display: none;
            align-items: center;
            gap: 5px;
            padding: 4px 12px;
            background: var(--orange);
            color: white;
            border-radius: 20px;
            font-family: var(--font-sans);
            font-size: 0.68rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.04em;
            cursor: pointer;
            transition: transform 0.1s;
            margin-top: 2px;
        }

        .happening-badge.visible {
            display: inline-flex;
        }

        .happening-badge:active {
            transform: scale(0.95);
        }

        .happening-badge svg {
            width: 12px;
            height: 12px;
        }

        /* ── Discovery Hub (initial welcome) ── */
        .discovery-hub {
            position: fixed;
            inset: 0;
            z-index: 50;
            background: var(--bg);
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: calc(env(safe-area-inset-top, 0px) + 56px) 20px calc(env(safe-area-inset-bottom, 0px) + 20px);
            overflow-y: auto;
            transition: opacity 0.25s cubic-bezier(0.32, 0.72, 0, 1), transform 0.25s cubic-bezier(0.32, 0.72, 0, 1);
        }

        .discovery-hub.hidden {
            display: none;
        }

        .discovery-hub .hub-title {
            width: min(100%, 360px);
            font-family: var(--font-serif);
            font-size: clamp(2.4rem, 11vw, 3.35rem);
            font-weight: 700;
            color: var(--ink);
            text-align: left;
            margin-bottom: 8px;
            line-height: 0.98;
            letter-spacing: -0.04em;
            text-wrap: balance;
        }

        .discovery-hub .hub-sub {
            width: min(100%, 360px);
            font-size: 0.98rem;
            color: var(--text-dark);
            text-align: left;
            margin-bottom: 28px;
            line-height: 1.45;
            font-weight: 500;
            text-wrap: balance;
        }

        .discovery-hub-cards {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 14px;
            max-width: 360px;
            width: 100%;
        }

        .discovery-card {
            background: var(--paper);
            border: 3px solid var(--ink);
            border-radius: 26px;
            box-shadow: 4px 4px 0 var(--ink);
            padding: 24px 16px 20px;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 14px;
            cursor: pointer;
            transition: transform 0.12s, box-shadow 0.12s;
            -webkit-tap-highlight-color: transparent;
            text-align: center;
        }

        .discovery-card:active {
            transform: translate(3px, 3px);
            box-shadow: none;
        }

        .discovery-card.wide {
            grid-column: 1 / -1;
            flex-direction: row;
            align-items: center;
            text-align: left;
            padding: 18px 20px;
            gap: 14px;
            border-radius: 24px;
        }

        .discovery-card-icon {
            width: 60px;
            height: 60px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .discovery-card.wide .discovery-card-icon {
            width: 48px;
            height: 48px;
        }

        .discovery-card-icon.camera {
            background: var(--accent);
            color: white;
            border: 2.5px solid var(--ink);
            box-shadow: 2px 2px 0 var(--ink);
        }

        .discovery-card-icon.identify {
            background: var(--teal);
            color: white;
            border: 2.5px solid var(--ink);
            box-shadow: 2px 2px 0 var(--ink);
        }

        .discovery-card-icon.search {
            background: var(--paper);
            color: var(--ink);
            border: 2.5px solid var(--ink);
            box-shadow: 2px 2px 0 var(--ink);
        }

        .discovery-card-icon.recent {
            background: var(--teal);
            color: white;
            border: 2.5px solid var(--ink);
            box-shadow: 2px 2px 0 var(--ink);
        }

        .discovery-card-icon svg {
            width: 28px;
            height: 28px;
        }

        .discovery-card.wide .discovery-card-icon svg {
            width: 24px;
            height: 24px;
        }

        .discovery-card-text h3 {
            font-family: var(--font-serif);
            font-size: 1.08rem;
            font-weight: 700;
            color: var(--text-dark);
            margin-bottom: 4px;
            line-height: 1.12;
        }

        .discovery-card-text p {
            font-size: 0.84rem;
            color: var(--text-muted);
            line-height: 1.4;
        }


        .scanner-view {
            display: none;
            flex: 1;
            flex-direction: column;
            min-height: 0;
            overflow: hidden;
            opacity: 0;
            transform: scale(0.97);
            transition: opacity 0.25s cubic-bezier(0.32, 0.72, 0, 1), transform 0.25s cubic-bezier(0.32, 0.72, 0, 1);
            padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px) + var(--bottom-nav-gap));
            position: relative;
        }

        .scanner-view.visible {
            display: flex;
        }

        .scanner-view.visible.active {
            opacity: 1;
            transform: scale(1);
        }

        /* ── Recently Played (full screen) ── */
        .recent-played-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: transparent;
            z-index: 299;
            pointer-events: none;
        }
        .recent-played-overlay.open { display: block; pointer-events: auto; }

        .recent-played-sheet {
            position: fixed;
            inset: 0;
            z-index: 300;
            background: var(--bg-cream);
            display: flex;
            flex-direction: column;
            overflow: hidden;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.25s ease, visibility 0.25s ease;
        }
        .recent-played-sheet.open {
            opacity: 1;
            visibility: visible;
        }

        .recent-played-handle {
            display: none;
        }

        .recent-played-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: calc(env(safe-area-inset-top, 0px) + 16px) 20px 16px;
            flex-shrink: 0;
            border-bottom: 2px dashed var(--teal-light);
        }
        .recent-played-title {
            font-family: var(--font-serif);
            font-size: 1.35rem;
            font-weight: 700;
            color: var(--teal-dark);
        }
        .recent-played-close {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            border: 2px solid var(--border-dark);
            background: var(--bg-warm);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            box-shadow: 2px 2px 0 var(--border-dark);
            transition: transform 0.1s, box-shadow 0.1s;
            -webkit-tap-highlight-color: transparent;
        }
        .recent-played-close:active {
            transform: translate(2px,2px);
            box-shadow: none;
        }
        .recent-played-close svg { width: 18px; height: 18px; }

        .recent-played-list {
            flex: 1;
            min-height: 0;
            overflow-y: auto;
            padding: 20px 20px calc(env(safe-area-inset-bottom, 0px) + 80px);
            -webkit-overflow-scrolling: touch;
        }

        .recent-played-item {
            display: flex;
            align-items: center;
            gap: 14px;
            padding: 12px 0;
            border-bottom: 1px solid rgba(0,0,0,0.07);
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
        }
        .recent-played-item:last-child { border-bottom: none; }
        .recent-played-item:active .recent-played-item-art {
            transform: translate(1px,1px);
        }

        .recent-played-item-art {
            width: 58px;
            height: 58px;
            border-radius: 11px;
            border: 2.5px solid var(--border-dark);
            box-shadow: 3px 3px 0 var(--border-dark);
            overflow: hidden;
            flex-shrink: 0;
            background: var(--bg-warm);
            display: flex;
            align-items: center;
            justify-content: center;
            transition: transform 0.1s, box-shadow 0.1s;
        }
        .recent-played-item-art img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }
        .recent-played-item-art-fallback {
            font-size: 0.72rem;
            font-weight: 700;
            color: var(--text-muted);
            text-align: center;
            padding: 4px;
            line-height: 1.2;
        }

        .recent-played-item-info {
            flex: 1;
            min-width: 0;
        }
        .recent-played-item-name {
            font-size: 0.97rem;
            font-weight: 700;
            color: var(--text-dark);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .recent-played-item-sub {
            font-size: 0.78rem;
            color: var(--text-muted);
            margin-top: 3px;
        }

        .recent-played-item-play {
            width: 38px;
            height: 38px;
            border-radius: 50%;
            border: 2px solid var(--border-dark);
            background: var(--teal);
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            box-shadow: 2px 2px 0 var(--border-dark);
            transition: transform 0.1s, box-shadow 0.1s;
            -webkit-tap-highlight-color: transparent;
        }
        .recent-played-item-play:active {
            transform: translate(2px,2px);
            box-shadow: none;
        }
        .recent-played-item-play svg { width: 16px; height: 16px; margin-left: 2px; }

        /* ── Search bar at top of artist page (all screen sizes) ── */
        .now-playing-search-bar {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 12px;
            padding: 4px 12px 0;
            background: none;
            border: none;
            border-radius: 0;
            box-shadow: none;
        }
        .now-playing-search-input {
            flex: 1;
            min-width: 0;
            padding: 10px 14px;
            background: white;
            border: 2px solid var(--teal-dark);
            border-radius: 12px;
            font-family: var(--font-sans);
            font-size: 0.9rem;
            color: var(--text-dark);
            outline: none;
            transition: border-color 0.15s;
        }
        .now-playing-search-input:focus {
            border-color: var(--teal);
        }
        .now-playing-search-input::placeholder {
            color: var(--text-muted);
        }
        .now-playing-search-btn {
            padding: 10px 18px;
            background: var(--teal-dark);
            color: #fff;
            border: none;
            border-radius: 12px;
            font-family: var(--font-sans);
            font-size: 0.85rem;
            font-weight: 700;
            cursor: pointer;
            white-space: nowrap;
            transition: all 0.12s;
            flex-shrink: 0;
        }
        .now-playing-search-btn:hover {
            background: var(--teal);
        }
        .now-playing-search-btn:active {
            opacity: 0.85;
        }
        .now-playing-back-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            min-width: 46px;
            height: 46px;
            padding: 0 14px;
            background: white;
            color: var(--teal-dark);
            border: 2px solid var(--teal-dark);
            border-radius: 12px;
            font-family: var(--font-sans);
            font-size: 0.85rem;
            font-weight: 700;
            cursor: pointer;
            white-space: nowrap;
            transition: all 0.12s;
            flex-shrink: 0;
        }
        .now-playing-back-btn:hover {
            background: var(--bg-warm);
            color: var(--teal-dark);
        }
        .now-playing-back-btn:active {
            opacity: 0.85;
        }
        .now-playing-back-btn svg {
            width: 18px;
            height: 18px;
        }
        .now-playing-back-label {
            display: none;
        }

        @media (min-width: 560px) {
            .now-playing-back-btn {
                padding: 0 14px 0 12px;
            }
            .now-playing-back-label {
                display: inline;
            }
        }

        @media (min-width: 900px) {
            body {
                background: var(--coral);
            }
            .bg-pattern {
                background: var(--coral);
                background-image: none;
            }
            .now-playing-overlay.active .now-playing-scroll-wrapper {
                background: var(--coral) !important;
            }
            /* Show only the back button on desktop; search stays in the header */
            .now-playing-search-bar {
                display: flex !important;
                justify-content: flex-start;
                padding: 0 20px 8px;
                margin-bottom: 4px;
            }
            .now-playing-search-input {
                display: none;
            }
            .now-playing-search-btn {
                display: none;
            }
            .now-playing-back-btn {
                padding: 0 14px 0 12px;
                height: 42px;
            }
        }

        @media (max-width: 767px) {
            .site-header {
                display: none;
            }
        }

        /* ═══════════════════════════════════════════════════════════
           CONSISTENT NAVIGATION (site-header uses design-system.css)
        ═══════════════════════════════════════════════════════════ */
        .city-picker-overlay {
            position: fixed; top: 0; left: 0; right: 0; bottom: 0;
            background: rgba(0,0,0,0.4); display: flex; align-items: flex-end;
            justify-content: center; z-index: 2100; opacity: 0; visibility: hidden;
            transition: all 0.2s ease;
        }
        .city-picker-overlay.open { opacity: 1; visibility: visible; }
        .city-picker-modal {
            background: var(--bg-cream); border: 2px solid var(--border-dark);
            border-radius: 16px 16px 0 0; box-shadow: 0 -4px 0px var(--border-dark);
            width: 100%; max-width: 100%; max-height: 85vh; transform: translateY(100%);
            transition: transform 0.2s ease; padding-bottom: env(safe-area-inset-bottom);
            overflow: hidden; display: flex; flex-direction: column;
        }
        @media (min-width: 768px) {
            .city-picker-overlay { align-items: center; }
            .city-picker-modal { max-width: 500px; border-radius: 16px; max-height: 70vh; }
        }
        .city-picker-overlay.open .city-picker-modal { transform: translateY(0); }
        .city-picker-header {
            display: flex; align-items: center; justify-content: space-between;
            padding: 16px 20px; background: var(--teal); color: var(--bg-cream);
            border-bottom: 2px solid var(--border-dark); flex-shrink: 0;
        }
        .city-picker-title { font-family: var(--font-serif); font-size: 1.1rem; font-weight: 700; }
        .city-picker-close {
            background: rgba(255,255,255,0.2); border: 2px solid rgba(255,255,255,0.3);
            border-radius: 8px; width: 36px; height: 36px; display: flex;
            align-items: center; justify-content: center; cursor: pointer; padding: 0;
            color: var(--bg-cream);
        }
        .city-picker-close:hover { background: rgba(255,255,255,0.3); }
        .city-picker-close svg { width: 20px; height: 20px; }
        .city-picker-search-wrap { padding: 12px 20px; border-bottom: 2px solid var(--bg-warm); flex-shrink: 0; }
        .city-picker-search-wrap input {
            width: 100%; padding: 12px 16px; background: white; border: 2px solid var(--border-dark);
            border-radius: 10px; font-family: var(--font-sans); font-size: 0.9rem;
            color: var(--text-dark); outline: none; box-sizing: border-box;
        }
        .city-picker-search-wrap input:focus { border-color: var(--teal); }
        .city-picker-body { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 20px 20px; }
        .city-picker-option {
            display: flex; align-items: center; justify-content: space-between;
            padding: 14px 16px; background: white; border: 2px solid var(--border-dark);
            border-radius: 10px; margin-bottom: 8px; cursor: pointer; transition: all 0.15s ease;
        }
        .city-picker-option:hover, .city-picker-option:active { border-color: var(--teal); background: var(--bg-warm); }
        .city-picker-option.active { border-color: var(--teal); background: rgba(61,107,125,0.1); }
        .city-picker-option .metro-name { font-weight: 600; color: var(--text-dark); }
        .city-picker-option .metro-cities { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }
        .city-picker-option .check-icon { color: var(--teal); display: none; flex-shrink: 0; }
        .city-picker-option.active .check-icon { display: block; }

        /* Search bar + desktop nav use design-system.css */

        /* Container spacing */

        /* Hide old header */
        .header { display: none !important; }

        /* ── Note count badge on similar artist cards ── */
        .similar-artist-card { position: relative; }
        .similar-artist-note-badge {
            position: absolute;
            top: -6px;
            left: -6px;
            width: 22px;
            height: 22px;
            background: var(--teal);
            color: #fff;
            border: 2px solid var(--border-dark);
            border-radius: 50%;
            font-size: 0.62rem;
            font-weight: 800;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 4;
            box-shadow: 1px 1px 0 var(--border-dark);
        }

        /* ── Hover speech bubble popup ── */
        .similar-artist-hover-popup {
            display: none;
            position: fixed;
            width: 220px;
            background: #fff;
            border: 2px solid var(--border-dark);
            border-radius: 14px;
            box-shadow: 3px 3px 0 var(--border-dark);
            z-index: 9999;
            opacity: 0;
            transition: opacity 0.15s;
            pointer-events: none;
        }
        .similar-artist-hover-popup.visible {
            display: block;
            opacity: 1;
            pointer-events: auto;
        }
        .similar-artist-hover-popup::after {
            content: '';
            position: absolute;
            bottom: -9px;
            left: 50%;
            transform: translateX(-50%);
            width: 0;
            height: 0;
            border-left: 9px solid transparent;
            border-right: 9px solid transparent;
            border-top: 9px solid #fff;
            filter: drop-shadow(0 2px 0 var(--border-dark));
        }
        .similar-artist-hover-popup::before {
            content: '';
            position: absolute;
            bottom: -12px;
            left: 50%;
            transform: translateX(-50%);
            width: 0;
            height: 0;
            border-left: 10px solid transparent;
            border-right: 10px solid transparent;
            border-top: 10px solid var(--border-dark);
        }
        .similar-artist-hover-popup.flipped::after {
            bottom: auto;
            top: -9px;
            border-top: none;
            border-bottom: 9px solid #fff;
            filter: drop-shadow(0 -2px 0 var(--border-dark));
        }
        .similar-artist-hover-popup.flipped::before {
            bottom: auto;
            top: -12px;
            border-top: none;
            border-bottom: 10px solid var(--border-dark);
        }
        .hover-popup-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 8px 12px 6px;
            border-bottom: 1px solid rgba(0,0,0,0.08);
        }
        .hover-popup-name {
            font-family: var(--font-sans);
            font-size: 0.78rem;
            font-weight: 700;
            color: var(--text-dark);
        }
        .hover-popup-view-all {
            font-size: 0.65rem;
            font-weight: 600;
            color: var(--teal);
            cursor: pointer;
        }
        .hover-popup-view-all:hover { text-decoration: underline; }
        .hover-popup-note {
            padding: 8px 12px;
        }
        .hover-popup-note-text {
            font-size: 0.72rem;
            color: var(--text-dark);
            line-height: 1.35;
            overflow: hidden;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            line-clamp: 2;
            -webkit-box-orient: vertical;
        }
        .hover-popup-note-time {
            font-size: 0.6rem;
            color: var(--text-muted);
            margin-top: 3px;
        }
        .hover-popup-input {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 6px 10px 10px;
            border-top: 1px solid rgba(0,0,0,0.08);
        }
        .hover-popup-input input {
            flex: 1;
            border: 1.5px solid var(--border-dark);
            border-radius: 20px;
            padding: 5px 10px;
            font-size: 0.68rem;
            font-family: var(--font-sans);
            outline: none;
            background: var(--bg-cream);
        }
        .hover-popup-input input:focus { border-color: var(--teal); }
        .hover-popup-submit {
            width: 28px;
            height: 28px;
            background: var(--teal);
            border: 2px solid var(--border-dark);
            border-radius: 50%;
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            flex-shrink: 0;
            padding: 0;
        }
        .hover-popup-submit svg { width: 12px; height: 12px; }
        .hover-popup-submit:hover { background: var(--teal-light); }
        .hover-popup-empty {
            padding: 10px 12px;
            font-size: 0.68rem;
            color: var(--text-muted);
            text-align: center;
        }
        @media (hover: none) {
            .similar-artist-hover-popup { display: none !important; }
        }

        /* ── Live Video Modal ── */
        .live-video-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.7);
            z-index: 1100;
        }
        .live-video-overlay.open { display: block; }

        .live-video-modal {
            display: none;
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            z-index: 1101;
            width: 90vw;
            max-width: 640px;
            border-radius: 14px;
            overflow: hidden;
            background: #000;
        }
        .live-video-modal.open { display: block; }

        .live-video-close {
            position: absolute;
            top: -36px;
            right: 0;
            background: none;
            border: none;
            color: #fff;
            cursor: pointer;
            padding: 4px;
            z-index: 2;
        }
        .live-video-close svg { width: 24px; height: 24px; }

        .live-video-container {
            position: relative;
            width: 100%;
            padding-top: 56.25%; /* 16:9 */
        }
        .live-video-container iframe {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
        }
