/* Channel Accent Color Variable */
:root {
    --channel-accent: red;
}

/* Base Styles */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
    background: black;
    font-family: Arial, sans-serif;
}

/* YouTube player base styles */
#youtube-player {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.3s ease;
}

#youtube-player.disabled-controls {
    pointer-events: none;
}

#youtube-player.disabled-controls iframe {
    pointer-events: none;
}

/* YouTube Player Wrapper for blockers */
.yt-player-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.yt-player-wrapper #youtube-player {
    position: absolute;
    z-index: 1;
}

/* YouTube UI Blockers - black bars that cover controls temporarily */
.yt-blocker {
    position: absolute;
    left: 0;
    right: 0;
    height: 80px;
    background: black;
    z-index: 100;
    transition: transform 0.6s ease-out;
    pointer-events: none;
}

.yt-blocker-top {
    top: 0;
    transform: translateY(0);
}

.yt-blocker-top.hidden {
    transform: translateY(-100%);
}

.yt-blocker-bottom {
    bottom: 0;
    transform: translateY(0);
}

.yt-blocker-bottom.hidden {
    transform: translateY(100%);
}

/* Video cover for inventory mode */
/* FAST LOAD: Start visible by default for instant load on root URL */
.video-cover {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: black;
    z-index: 2;
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.3s ease;
}

/* Hidden state for when video should show through */
.video-cover.hidden {
    opacity: 0;
    pointer-events: none;
}

/* ============================================================================
   POCKET VIEWING MODE - Content takes over the TV
   ============================================================================ */

.pocket-viewing-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5; /* Above player, below UI controls */
    background: black;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.pocket-viewing-overlay.active {
    display: flex;
}

.pocket-viewing-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto; /* Allow scrolling for tall content */
    position: relative;
}

/* Contributor credit for collab channel pocket items - right side, vertically centered */
.pocket-contributor-credit {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: rgba(255, 255, 255, 0.5);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    pointer-events: auto;
    z-index: 10;
    text-align: right;
}

.pocket-contributor-credit .credit-label {
    font-size: 11px;
    text-transform: lowercase;
    margin-bottom: 2px;
}

.pocket-contributor-credit .credit-name {
    font-size: 14px;
    margin-bottom: 4px;
}

.pocket-contributor-credit .credit-name a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
}

.pocket-contributor-credit .credit-name a:hover {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: underline;
}

.pocket-contributor-credit .credit-date {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
}

/* Text content in pocket viewing */
.pocket-text-content {
    max-width: 800px;
    max-height: 90vh;
    padding: 40px;
    color: #ccc; /* Light text for black background */
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 20px;
    line-height: 1.7;
    overflow-y: auto;
    text-align: left;
}

.pocket-text-content::-webkit-scrollbar {
    width: 4px;
}

.pocket-text-content::-webkit-scrollbar-track {
    background: transparent;
}

.pocket-text-content::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 2px;
}

/* Links in pocket text content */
.pocket-text-content a {
    color: #7ab8ff;
    text-decoration: underline;
    cursor: pointer;
    pointer-events: auto;
}

.pocket-text-content a:hover {
    color: #a8d0ff;
}

.pocket-text-content a:active {
    color: #5a98df;
}

/* Pocket text wrapper for edit mode */
.pocket-text-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Pocket text edit button */
.pocket-text-edit-btn {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(40, 40, 40, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease, background 0.2s ease;
    z-index: 10;
}

.pocket-text-wrapper:hover .pocket-text-edit-btn {
    opacity: 1;
}

.pocket-text-edit-btn:hover {
    background: rgba(60, 60, 60, 0.95);
    color: white;
}

.pocket-text-edit-btn.editing {
    background: var(--channel-accent, #4a9eff);
    color: white;
    border-color: var(--channel-accent, #4a9eff);
    opacity: 1;
}

/* Pocket text editing state */
.pocket-text-content.pocket-text-editing {
    outline: 2px solid var(--channel-accent, #4a9eff);
    outline-offset: 4px;
    border-radius: 4px;
    cursor: text;
}

.pocket-text-content.pocket-text-editing:focus {
    outline: 2px solid var(--channel-accent, #4a9eff);
}

/* Image content in pocket viewing */
.pocket-image-content {
    max-width: 95vw;
    max-height: 95vh;
    object-fit: contain;
}

/* Image with description layout */
.pocket-image-with-description {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    max-width: 95vw;
    max-height: 95vh;
}

.pocket-image-with-description .pocket-image-content {
    max-width: 60vw;
    max-height: 90vh;
    flex-shrink: 0;
}

.pocket-image-description {
    max-width: 300px;
    max-height: 80vh;
    overflow-y: auto;
    color: #ccc;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 18px;
    line-height: 1.7;
    text-align: left;
}

.pocket-image-description::-webkit-scrollbar {
    width: 4px;
}

.pocket-image-description::-webkit-scrollbar-track {
    background: transparent;
}

.pocket-image-description::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

/* Mobile: stack image and description vertically */
@media screen and (max-width: 768px) {
    .pocket-image-with-description {
        flex-direction: column;
        gap: 20px;
    }

    .pocket-image-with-description .pocket-image-content {
        max-width: 95vw;
        max-height: 60vh;
    }

    .pocket-image-description {
        max-width: 90vw;
        max-height: 30vh;
        font-size: 16px;
        padding: 0 15px;
    }
}

/* Pocket image wrapper for edit mode */
.pocket-image-wrapper {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

/* Pocket image edit button */
.pocket-image-edit-btn {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(40, 40, 40, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    padding: 8px 24px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, background 0.2s ease;
    z-index: 10;
}

.pocket-image-edit-btn.visible {
    opacity: 1;
    pointer-events: auto;
}

.pocket-image-edit-btn:hover {
    background: rgba(60, 60, 60, 0.95);
    color: white;
}

/* Pocket image editor overlay */
.pocket-image-editor-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
}

/* Pocket image editor modal */
.pocket-image-editor {
    background: #1a1a1a;
    border-radius: 12px;
    padding: 24px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.pocket-image-editor h3 {
    margin: 0 0 20px 0;
    color: #fff;
    font-size: 18px;
    font-weight: 500;
}

.pocket-image-editor-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.pocket-image-editor-close:hover {
    color: white;
}

/* Image preview with remove button */
.pocket-image-editor-preview {
    position: relative;
    margin-bottom: 20px;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pocket-image-editor-preview img {
    max-width: 100%;
    max-height: 200px;
    object-fit: contain;
}

.pocket-image-editor-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(220, 50, 50, 0.9);
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.pocket-image-editor-remove:hover {
    background: #e74c3c;
}

/* Editor fields */
.pocket-image-editor-field {
    margin-bottom: 16px;
}

.pocket-image-editor-field label {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    margin-bottom: 6px;
}

.pocket-image-editor-field input[type="text"],
.pocket-image-editor-field textarea {
    width: 100%;
    padding: 10px 12px;
    background: #2a2a2a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    box-sizing: border-box;
}

.pocket-image-editor-field input[type="text"]:focus,
.pocket-image-editor-field textarea:focus {
    outline: none;
    border-color: var(--channel-accent, #4a9eff);
}

.pocket-image-editor-field textarea {
    min-height: 80px;
    resize: vertical;
    font-family: Georgia, 'Times New Roman', serif;
    line-height: 1.5;
}

.pocket-image-editor-field input[type="file"] {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
}

/* Editor action buttons */
.pocket-image-editor-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
}

.pocket-image-editor-cancel,
.pocket-image-editor-save {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    border: none;
}

.pocket-image-editor-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

.pocket-image-editor-cancel:hover {
    background: rgba(255, 255, 255, 0.15);
}

.pocket-image-editor-save {
    background: var(--channel-accent, #4a9eff);
    color: white;
}

.pocket-image-editor-save:hover {
    opacity: 0.9;
}

/* Video content in pocket viewing (YouTube) */
.pocket-video-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Swipe overlay for videos/movies - captures touch events over iframes */
.pocket-video-swipe-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10;
    background: transparent;
}

.pocket-video-player {
    width: 100%;
    height: 100%;
    max-width: 100vw;
    max-height: 100vh;
}

#pocketYouTubePlayerContainer {
    width: 100%;
    height: 100%;
    max-width: 100vw;
    max-height: 100vh;
}

#pocketYouTubePlayerContainer iframe {
    width: 100%;
    height: 100%;
}

/* Movie content in pocket viewing (Dropbox videos) */
.pocket-movie-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: black;
    position: relative;
}

.pocket-movie-player {
    width: 100%;
    height: 100%;
    max-width: 100vw;
    max-height: 100vh;
    object-fit: contain;
}

.pocket-movie-fullscreen-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.3;
    transition: opacity 0.3s ease;
    z-index: 100;
}

.pocket-movie-container:hover .pocket-movie-fullscreen-btn,
.pocket-movie-fullscreen-btn:hover {
    opacity: 1;
}

.pocket-movie-fullscreen-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Pocket video/movie blockers (black bars that recede) */
.pocket-blocker {
    position: absolute;
    left: 0;
    right: 0;
    height: 80px;
    background: black;
    z-index: 50;
    transition: transform 0.6s ease-out;
    pointer-events: none;
}

.pocket-blocker-top {
    top: 0;
    transform: translateY(0);
}

.pocket-blocker-top.hidden {
    transform: translateY(-100%);
}

.pocket-blocker-bottom {
    bottom: 0;
    transform: translateY(0);
}

.pocket-blocker-bottom.hidden {
    transform: translateY(100%);
}

/* Pocket video/movie title overlay - matches episode title styling */
.pocket-media-title {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 120px;
    font-family: 'Times New Roman', Times, serif;
    font-style: italic;
    line-height: 1.2;
    z-index: 60;
    opacity: 1;
    transition: opacity 0.5s ease;
    pointer-events: none;
    max-width: calc(100vw - 200px);
    word-wrap: break-word;
}

.pocket-media-title.hidden,
.pocket-media-channel.hidden,
.pocket-media-via.hidden {
    opacity: 0;
}

/* YouTube channel name in pocket viewing */
.pocket-media-channel {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    z-index: 60;
    opacity: 1;
    transition: opacity 0.5s ease;
    pointer-events: none;
    display: none;
}

/* "via channelname" tag in pocket viewing */
.pocket-media-via {
    position: absolute;
    right: 20px;
    top: calc(50% + 30px);
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    font-style: italic;
    z-index: 60;
    opacity: 1;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

/* "via channelname" tag in pocket grid */
.pocket-item-via {
    position: absolute;
    bottom: 8px;
    left: 8px;
    right: 8px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 10px;
    font-style: italic;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    pointer-events: none;
}

/* Mobile: smaller title */
@media screen and (max-width: 1024px) {
    .pocket-media-title {
        font-size: 28px;
        top: 60px;
        transform: none;
        max-width: calc(100vw - 120px);
        text-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
    }

    .pocket-media-channel {
        right: 15px;
        top: 60px;
        transform: none;
        font-size: 12px;
    }

    .pocket-media-via {
        right: 15px;
        top: 80px;
        font-size: 11px;
    }
}

/* PDF content in pocket viewing */
.pocket-pdf-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    position: relative;
}

.pocket-pdf-page {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

.pocket-pdf-page-number {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    font-family: Georgia, serif;
}

/* PDF page container - clickable area */
.pocket-pdf-page-container {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Spread containers should fill available space */
.pocket-pdf-spread .pocket-pdf-page-container {
    flex: 1;
    height: 100%;
    min-height: 80vh;
}

/* PDF canvas rendering */
.pocket-pdf-canvas {
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.6);
    background: white;
}

/* Single page view (cover/back cover) */
.pocket-pdf-single .pocket-pdf-canvas {
    max-height: 85vh;
}

/* PDF loading state */
.pocket-pdf-loading {
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
    font-family: Georgia, serif;
    font-style: italic;
}

/* Mobile PDF cover view - tap to open */
.pocket-pdf-mobile-cover {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    padding: 20px;
}

.pocket-pdf-mobile-cover-img {
    max-width: 70vw;
    max-height: 60vh;
    object-fit: contain;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    border-radius: 4px;
}

.pocket-pdf-mobile-cover-placeholder {
    font-size: 120px;
    opacity: 0.6;
}

.pocket-pdf-mobile-cover-label {
    font-family: Arial, sans-serif;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: lowercase;
}

/* Two-page spread container */
.pocket-pdf-spread {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex-direction: row;
}

.pocket-pdf-spread-view {
    flex-direction: column;
}

.pocket-pdf-spread canvas {
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    background: white;
}

/* Left and right page click areas */
.pocket-pdf-left,
.pocket-pdf-right {
    position: relative;
}

.pocket-pdf-left::after,
.pocket-pdf-right::after {
    content: '';
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.pocket-pdf-left::after {
    left: 0;
}

.pocket-pdf-right::after {
    right: 0;
}

/* Mobile PDF: scrollable container with all pages */
.pocket-pdf-mobile-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    touch-action: pan-y pinch-zoom;
}

.pocket-pdf-mobile-scroll {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 20px 0 100px 0;
    -webkit-overflow-scrolling: touch;
    transform-origin: top center;
}

.pocket-pdf-canvas-mobile {
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    background: white;
    flex-shrink: 0;
}

/* Desktop PDF: scrollable spreads container */
.pocket-pdf-desktop-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.pocket-pdf-desktop-scroll {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 60px;
    padding: 40px 0 100px 0;
}

.pocket-pdf-desktop-spread {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.pocket-pdf-desktop-spread .pocket-pdf-spread {
    display: flex;
    gap: 4px;
}

.pocket-pdf-desktop-spread .pocket-pdf-single-page {
    display: flex;
    justify-content: center;
}

.pocket-pdf-canvas-desktop {
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    background: white;
}

/* Mobile: hide desktop spread view */
@media screen and (max-width: 768px) {
    .pocket-pdf-spread {
        display: none;
    }

    .pocket-pdf-single {
        display: none;
    }
}

/* Side arrows for skipping pocket items */
.pocket-skip-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    opacity: 0.3;
    transition: opacity 0.2s ease;
    color: white;
    font-size: 24px;
}

.pocket-skip-arrow:hover {
    opacity: 0.8;
}

.pocket-skip-prev {
    left: 10px;
}

.pocket-skip-next {
    right: 10px;
}

/* Hide arrows when only one item or at boundaries */
.pocket-skip-arrow.hidden {
    display: none;
}

/* Magnifying glass */
.pocket-magnifier {
    position: fixed;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5), inset 0 0 10px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    pointer-events: none;
    display: none;
    z-index: 100;
}

.pocket-magnifier.active {
    display: block;
}

.pocket-magnifier canvas {
    width: 100%;
    height: 100%;
}

/* Pocket close button - matches canvas style */
.pocket-close-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.3);
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
    line-height: 1;
    transition: color 0.2s ease;
}

.pocket-close-btn:hover {
    color: rgba(255, 255, 255, 0.7);
}


/* Highlight/feature button for owners */
.pocket-highlight-btn {
    position: fixed;
    top: 20px;
    right: 70px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(80, 80, 80, 0.6);
    border: none;
    color: white;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease;
}

.pocket-highlight-btn:hover {
    background: rgba(100, 100, 100, 0.8);
}

.pocket-highlight-btn.active {
    color: gold;
    background: rgba(100, 80, 0, 0.6);
}

.pocket-viewing-nav {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    opacity: 1;
    transition: opacity 0.6s ease-out;
}

.pocket-viewing-nav.hidden {
    opacity: 0;
}

.pocket-nav-hint {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    font-style: italic;
    text-align: center;
}

/* ============================================================================
   POCKET SCROLL VIEW MODE - Vertical scrolling through all items
   ============================================================================ */

.pocket-scroll-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.pocket-scroll-content {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.pocket-scroll-item {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 20px;
    box-sizing: border-box;
}

/* PDF Cover in Scroll View */
.pocket-scroll-pdf {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.pocket-scroll-pdf:active {
    transform: scale(0.98);
}

.pdf-cover-wrapper {
    position: relative;
    display: inline-block;
}

.pdf-cover-canvas {
    display: block;
    box-shadow:
        0 0 40px rgba(255, 255, 255, 0.12),
        0 0 80px rgba(255, 255, 255, 0.06);
    border-radius: 2px;
}

.pdf-cover-glow {
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

.pdf-cover-label {
    margin-top: 16px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
    font-family: Georgia, serif;
    font-style: italic;
    text-transform: lowercase;
    letter-spacing: 1px;
}

/* Images in Scroll View */
.pocket-scroll-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-view-image {
    max-width: 95vw;
    max-height: 95vh;
    object-fit: contain;
}

/* Text in Scroll View */
.pocket-scroll-text {
    width: 100%;
    max-width: 800px;
}

.scroll-view-text {
    color: #ccc;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 18px;
    line-height: 1.8;
    text-align: left;
    padding: 30px 0;
}

/* Video/Movie in Scroll View */
.pocket-scroll-video,
.pocket-scroll-movie {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.scroll-video-wrapper,
.scroll-movie-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 95vw;
    max-height: 90vh;
}

.scroll-view-thumbnail {
    max-width: 95vw;
    max-height: 85vh;
    object-fit: contain;
}

.scroll-view-movie-preview {
    max-width: 95vw;
    max-height: 85vh;
    object-fit: contain;
    background: #000;
}

/* YouTube iframe in scroll view */
.scroll-youtube-container {
    width: 100%;
    max-width: 95vw;
    aspect-ratio: 16/9;
    max-height: 85vh;
}

.scroll-youtube-container iframe {
    width: 100%;
    height: 100%;
}

.scroll-media-label {
    margin-top: 16px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
    font-family: Georgia, serif;
    font-style: italic;
    text-transform: lowercase;
    letter-spacing: 1px;
}

/* Unmute button for videos/movies in scroll view */
.scroll-unmute-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.2s ease;
}

.scroll-unmute-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.scroll-unmute-btn.muted::before {
    content: "🔇";
}

.scroll-unmute-btn.unmuted::before {
    content: "🔊";
}

/* Album in Scroll View */
.pocket-scroll-album {
    cursor: pointer;
}

.scroll-view-album-cover {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 4px;
}

.scroll-album-label {
    margin-top: 12px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    font-family: Georgia, serif;
    font-style: italic;
}

/* Detail overlay for horizontal swipe navigation */
.pocket-detail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: black;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile scroll view adjustments */
@media screen and (max-width: 768px) {
    .pocket-scroll-content {
        padding: 60px 15px 100px 15px;
        gap: 50px;
    }

    .scroll-view-text {
        font-size: 16px;
        line-height: 1.7;
        padding: 20px 0;
    }

    .pdf-cover-canvas {
        max-width: 75vw;
    }

    .scroll-play-btn {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
}

/* Mobile adjustments */
@media screen and (max-width: 768px) {
    .pocket-text-content {
        padding: 25px;
        font-size: 17px;
        max-width: 100%;
    }

    .pocket-pdf-page {
        max-width: 95vw;
        max-height: 85vh;
    }
}

.video-cover.visible {
    opacity: 1;
    pointer-events: auto;
}

/* Play Button Overlay Styles */
#playButtonOverlay {
    transition: opacity 0.3s ease;
}

#playButtonOverlay .play-button {
    position: relative;
    z-index: 1002;
}

#playButtonOverlay .play-button:hover {
    transform: scale(1.1) !important;
    background: rgba(255, 255, 255, 1) !important;
}

#playButtonOverlay .play-button:active {
    transform: scale(0.95) !important;
}

/* Ensure play button is above other elements */
#playButtonOverlay svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Hide play button overlay in inventory mode */
.inventory-overlay.visible ~ #playButtonOverlay {
    display: none !important;
}

/* Hide play button overlay when viewing items */
.channel-avatar-container.item-viewing ~ #playButtonOverlay {
    display: none !important;
}

/* Responsive adjustments for different screen sizes */
@media (max-width: 480px) {
    #playButtonOverlay .play-button {
        width: 70px !important;
        height: 70px !important;
    }

    #playButtonOverlay .play-button svg {
        width: 28px !important;
        height: 28px !important;
    }
}

@media (min-width: 1200px) {
    #playButtonOverlay .play-button {
        width: 120px !important;
        height: 120px !important;
    }

    #playButtonOverlay .play-button svg {
        width: 48px !important;
        height: 48px !important;
    }
}

/* Ensure smooth fade out animation */
#playButtonOverlay[style*="opacity: 0"] {
    pointer-events: none;
}

/* Universal Modal System - Updated for borderless, full-screen content with horizontal scroll */
.universal-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.universal-modal.visible {
    opacity: 1;
    visibility: visible;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.95);
    border: none;
    border-radius: 0;
    max-width: 98vw;
    max-height: 98vh;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: none;
}

/* Make modal content even larger for images */
.modal-content.image-modal {
    max-width: 100vw;
    max-height: 100vh;
    width: 100vw;
    height: 100vh;
    top: 0;
    left: 0;
    transform: none;
}

/* Horizontal scroll container for multiple items */
.modal-scroll-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    display: flex;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.modal-scroll-container::-webkit-scrollbar {
    display: none;
}

.modal-scroll-container {
    scrollbar-width: none;
}

.modal-scroll-item {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Single item modal (no scroll) */
.modal-content.single-item .modal-scroll-container {
    overflow: hidden;
}

.modal-header {
    display: none;
}

.modal-header h2 {
    margin: 0;
    color: white;
    font-size: 16px;
    font-weight: bold;
    flex: 1;
}

.modal-body {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

/* Special styling for image modal body */
.modal-body.image-body {
    padding: 0;
    min-height: auto;
}

/* Special styling for text modal body */
.modal-body.text-body {
    padding: 0 20px;
    justify-content: flex-start;
    align-items: stretch;
    cursor: pointer;
}

/* Make sure text content doesn't inherit cursor */
.modal-body.text-body .modal-text-content {
    cursor: default;
}

/* Clickable exit areas for text modals */
.text-exit-area {
    flex-shrink: 0;
    width: 100%;
    cursor: pointer;
    background: transparent;
}

.text-exit-area.top {
    height: 100px;
}

.text-exit-area.bottom {
    height: 100px;
}

.text-exit-area:hover {
    background: rgba(255, 255, 255, 0.02);
}

.modal-body img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    box-shadow: none;
}

/* For full-screen image modals */
.modal-body.image-body img {
    max-width: 100vw;
    max-height: 100vh;
    width: auto;
    height: auto;
}

.modal-navigation {
    display: none;
}

.modal-navigation.hidden {
    display: none;
}

/* New fixed corner navigation */
.modal-nav-corners {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1001;
}

.nav-btn {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #888888;
    width: 60px;
    height: 60px;
    font-size: 32px;
    font-weight: normal;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    pointer-events: auto;
    border-radius: 0;
}

.nav-btn.prev {
    left: 20px;
}

.nav-btn.next {
    right: 20px;
}

.nav-btn:hover {
    color: #bbbbbb;
    transform: translateY(-50%) scale(1.1);
}

.nav-btn:active {
    transform: translateY(-50%) scale(0.95);
    color: #666666;
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Hide specific navigation buttons when they shouldn't be shown */
.nav-btn.hidden {
    display: none;
}

/* Modal content types - updated for borderless display */
.modal-text-content {
    color: white;
    line-height: 1.6;
    text-align: justify;
    font-size: 16px;
    max-width: 800px;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
    padding: 20px;
    margin: 20px 0;
    flex-shrink: 0;
    align-self: center;
}

/* Force white color on ALL nested elements in modal text content */
.modal-text-content * {
    color: white !important;
}

.modal-pdf-content {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    color: white;
    padding: 0;
    position: relative;
}

.modal-pdf-cover {
    max-width: 300px;
    max-height: 400px;
    box-shadow: none;
    position: relative;
    cursor: pointer;
    /* Glow effect - swap animation name to try different options:
       borderLights = rotating spotlight (original)
       glowPulse = gentle breathing (Option 2)
       glowStatic = constant soft glow (Option 3)
       glowFilm = warm film flicker (Option 4) */
    animation: glowPulse 4s ease-in-out infinite;
    border: none;
}

/* OPTION 1: Original rotating spotlight (current) */
@keyframes borderLights {
    0% {
        box-shadow:
            0 0 10px 2px rgba(255, 255, 255, 0.8),
            10px 0 10px 2px rgba(255, 255, 255, 0),
            0 10px 10px 2px rgba(255, 255, 255, 0),
            -10px 0 10px 2px rgba(255, 255, 255, 0),
            0 -10px 10px 2px rgba(255, 255, 255, 0);
    }
    25% {
        box-shadow:
            0 0 10px 2px rgba(255, 255, 255, 0),
            10px 0 10px 2px rgba(255, 255, 255, 0.8),
            0 10px 10px 2px rgba(255, 255, 255, 0),
            -10px 0 10px 2px rgba(255, 255, 255, 0),
            0 -10px 10px 2px rgba(255, 255, 255, 0);
    }
    50% {
        box-shadow:
            0 0 10px 2px rgba(255, 255, 255, 0),
            10px 0 10px 2px rgba(255, 255, 255, 0),
            0 10px 10px 2px rgba(255, 255, 255, 0.8),
            -10px 0 10px 2px rgba(255, 255, 255, 0),
            0 -10px 10px 2px rgba(255, 255, 255, 0);
    }
    75% {
        box-shadow:
            0 0 10px 2px rgba(255, 255, 255, 0),
            10px 0 10px 2px rgba(255, 255, 255, 0),
            0 10px 10px 2px rgba(255, 255, 255, 0),
            -10px 0 10px 2px rgba(255, 255, 255, 0.8),
            0 -10px 10px 2px rgba(255, 255, 255, 0);
    }
    100% {
        box-shadow:
            0 0 10px 2px rgba(255, 255, 255, 0.8),
            10px 0 10px 2px rgba(255, 255, 255, 0),
            0 10px 10px 2px rgba(255, 255, 255, 0),
            -10px 0 10px 2px rgba(255, 255, 255, 0),
            0 -10px 10px 2px rgba(255, 255, 255, 0);
    }
}

/* OPTION 2: Gentle breathing pulse - soft glow fades in and out */
@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 15px 3px rgba(255, 255, 255, 0.2);
    }
    50% {
        box-shadow: 0 0 25px 6px rgba(255, 255, 255, 0.4);
    }
}

/* OPTION 3: Static soft glow - no animation, just constant subtle glow */
@keyframes glowStatic {
    0%, 100% {
        box-shadow: 0 0 20px 4px rgba(255, 255, 255, 0.25);
    }
}

/* OPTION 4: Warm film flicker - occasional subtle warm pulse */
@keyframes glowFilm {
    0%, 90%, 100% {
        box-shadow: 0 0 12px 2px rgba(255, 245, 230, 0.15);
    }
    92% {
        box-shadow: 0 0 18px 4px rgba(255, 240, 220, 0.35);
    }
    95% {
        box-shadow: 0 0 10px 2px rgba(255, 245, 230, 0.1);
    }
    97% {
        box-shadow: 0 0 20px 5px rgba(255, 235, 210, 0.3);
    }
}

.modal-pdf-label {
    position: absolute;
    right: -60px;
    bottom: 10px;
    color: white;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.modal-pdf-actions {
    display: none; /* Hide the Open PDF button */
}

.open-pdf-btn {
    background: var(--channel-accent);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.open-pdf-btn:hover {
    background: darkred;
}

/* Video Modal - Muted autoplay preview with glow effect */
.modal-video-content {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    color: white;
    padding: 0;
    position: relative;
    cursor: pointer;
}

.modal-video-glow .modal-video-player-wrapper {
    position: relative;
    width: 100%;
    max-width: 500px;
    aspect-ratio: 16 / 9;
    animation: glowPulse 4s ease-in-out infinite;
    overflow: hidden; /* Hide the enlarged iframe edges */
}

.modal-video-iframe {
    /* Enlarge iframe to crop out YouTube UI elements */
    position: absolute;
    top: -60px;
    left: -60px;
    width: calc(100% + 120px);
    height: calc(100% + 120px);
    pointer-events: none; /* Prevent interaction with iframe */
}

.modal-video-click-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: transparent;
    cursor: pointer;
    padding-bottom: 15px;
}

.modal-video-play-hint {
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    font-style: italic;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

/* Movie Modal - muted autoplay preview with glow effect */
.modal-movie-content {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    color: white;
    padding: 0;
    position: relative;
    cursor: pointer;
}

.modal-movie-glow .modal-movie-player-wrapper {
    position: relative;
    width: 100%;
    max-width: 500px;
    max-height: 70vh;
    animation: glowPulse 4s ease-in-out infinite;
    overflow: hidden;
}

.modal-movie-video {
    width: 100%;
    height: 100%;
    max-height: 70vh;
    object-fit: contain;
    display: block;
}

.modal-movie-click-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    cursor: pointer;
}

.modal-image-content {
    text-align: center;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Image itself should not show pointer cursor */
.modal-image-content img {
    cursor: default;
}

.modal-image-info {
    color: white;
    margin-top: 15px;
    font-size: 14px;
    opacity: 0.9;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 90%;
    text-align: center;
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 16px;
    border-radius: 4px;
}

/* UPDATED: Hide modal in landscape mode - ONLY ON MOBILE DEVICES */
@media screen and (orientation: landscape) and (max-width: 1024px) {
    .universal-modal {
        display: none !important;
    }

    .modal-nav-corners {
        display: none !important;
    }
}

/* Channel Index Overlay - now shows channel grid in normal mode */
/* Start hidden by default - JS adds .visible class when needed */
/* NO transition on initial load - JS adds .animated class after first interaction */
.channel-index-overlay {
    position: fixed;
    top: 80px;
    left: 20px;
    right: 20px;
    bottom: 120px;
    background: transparent;
    z-index: 240;
    opacity: 0;
    transform: translateY(-20px);
    transition: none;
    pointer-events: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Only animate after user interacts */
.channel-index-overlay.animated {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Visible class shows the overlay */
.channel-index-overlay.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Hidden state - JS adds this class when closing the overlay */
.channel-index-overlay.hidden {
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
}

/* DIRECT CHANNEL LINK: Hide overlay immediately when URL has channel path */
.direct-channel-link .channel-index-overlay {
    opacity: 0 !important;
    transform: translateY(-20px) !important;
    pointer-events: none !important;
}

/* GLOBAL CHANNEL ON MOBILE: Hide overlay and antennas immediately - go straight to player */
/* Only hide when NOT explicitly opened (visible class) */
@media screen and (max-width: 1024px) and (orientation: portrait) {
    html.global-channel-active .channel-index-overlay:not(.visible) {
        opacity: 0 !important;
        transform: translateY(-20px) !important;
        pointer-events: none !important;
    }
    html.global-channel-active .antenna-dot {
        opacity: 0 !important;
    }
}

.direct-channel-link .video-cover {
    opacity: 0 !important;
    pointer-events: none !important;
}

.direct-channel-link .channel-avatar-container {
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* Hide channel info until correct channel loads */
.direct-channel-link .channel-info-display {
    opacity: 0;
}

.direct-channel-link .header-info {
    opacity: 0;
}

/* Channel Index Header - hidden */
.channel-index-header {
    display: none;
}

/* Age Daily title link at top of index */
.channel-index-global {
    display: flex;
    justify-content: center;
    padding: 20px 0 15px 0;
    position: relative;
    z-index: 2;
}

.channel-index-title-link {
    font-family: Arial, sans-serif;
    font-size: 14px;
    font-weight: bold;
    color: white;
    cursor: pointer;
    text-decoration: none;
    transition: text-decoration 0.2s ease;
}

.channel-index-title-link:hover {
    text-decoration: underline;
}

/* Channel Index Tabs */
.channel-index-tabs {
    display: flex;
    justify-content: center;
    gap: 25px;
    padding: 10px 0 20px 0;
    position: relative;
    z-index: 2;
}

.channel-index-tab {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    font-weight: bold;
    padding: 4px 0;
    cursor: pointer;
    transition: color 0.2s ease;
    font-family: inherit;
    text-transform: lowercase;
    border-bottom: 2px solid transparent;
}

.channel-index-tab:hover {
    color: rgba(255, 255, 255, 0.8);
}

.channel-index-tab.active {
    color: white;
    border-bottom: 2px solid white;
}

/* Channel Index backdrop - full clickable area behind content */
.channel-index-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 1;
    cursor: pointer;
}

/* Channel Index content area - grid layout */
.channel-index-content {
    flex: 1;
    color: var(--channel-accent);
    font-size: 14px;
    line-height: 1.6;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 15px;
    align-content: center;
    justify-items: center;
    padding: 10px 20px 20px 20px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--channel-accent) transparent;
    position: relative;
    z-index: 2;
}

/* Adjust grid for fewer items */
.channel-index-content.few-items {
    grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
    justify-content: center;
}

.channel-index-content::-webkit-scrollbar {
    width: 6px;
}

.channel-index-content::-webkit-scrollbar-track {
    background: transparent;
}

.channel-index-content::-webkit-scrollbar-thumb {
    background: var(--channel-accent);
    border-radius: 3px;
}

/* Channel item styling for grid */
.channel-index-item-grid {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
    width: 60px;
    height: auto;
    position: relative;
    z-index: 3;
}

.channel-index-item-grid:hover {
    transform: scale(1.1);
}

.channel-index-item-grid:active {
    transform: scale(0.95);
}

.channel-index-grid-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 2px solid var(--channel-accent);
    margin-bottom: 4px;
}

.channel-index-grid-avatar.global-channel {
    border: 2px solid gold;
}

.channel-index-grid-title {
    font-size: 7px;
    font-weight: bold;
    color: white;
    line-height: 1.1;
    max-width: 60px;
    word-wrap: break-word;
    text-align: center;
}

/* Current channel highlighting */
.channel-index-item-grid.current .channel-index-grid-title {
    color: var(--channel-accent);
    font-weight: bold;
}

.channel-index-item-grid.current .channel-index-grid-avatar {
    border: 2px solid var(--channel-accent);
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

/* UPDATED: Hide channel index in landscape mode - ONLY ON MOBILE DEVICES */
@media screen and (orientation: landscape) and (max-width: 1024px) {
    .channel-index-overlay {
        display: none !important;
    }
}

/* Loading */
.loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 18px;
    z-index: 50;
    display: none; 
}

/* Channel avatar styles */
.channel-avatar {
    position: fixed;
    top: 60px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--channel-accent);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 3px solid var(--channel-accent);
    z-index: 250;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.channel-avatar.blog-mode {
    opacity: 0 !important;
    pointer-events: none !important;
}

.antenna-dot {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--channel-accent);
    border-radius: 50%;
    top: -19px;
    z-index: 251;
    transition: opacity 0.3s ease;
    opacity: 0; /* Start hidden - JS will show when appropriate */
}

.antenna-dot.left {
    left: 11px;
}

.antenna-dot.right {
    right: 11px;
}

.antenna-dot.hidden {
    opacity: 0;
}

/* Show antennas when visible class added (non-global channels) */
.antenna-dot.visible {
    opacity: 1;
}

.antenna-dot.item-viewing {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.channel-avatar-container.item-viewing {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Hide avatar and antenna dots when in folder mode */
.channel-avatar-container.folder-mode .channel-avatar {
    opacity: 0;
    pointer-events: none;
}

.channel-avatar-container.folder-mode .antenna-dot {
    opacity: 0;
    pointer-events: none;
}

.age-daily.item-viewing {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.typo-controls.item-viewing {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Channel avatar container - hidden by default since overlay starts visible */
.channel-avatar-container {
    position: fixed;
    top: 60px;
    right: 20px;
    width: 60px;
    height: 60px;
    z-index: 250;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 0;
    pointer-events: none;
}

.channel-avatar-container.blog-mode {
    opacity: 0 !important;
    pointer-events: none !important;
}

.channel-avatar-container:active {
    transform: scale(0.9);
}

.channel-avatar-container::before,
.channel-avatar-container::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 15px;
    background: var(--channel-accent);
    top: -15px;
    transition: opacity 0.3s ease;
}

.channel-avatar-container::before {
    left: 15px;
    transform: rotate(-20deg);
}

.channel-avatar-container::after {
    right: 15px;
    transform: rotate(20deg);
}

.channel-avatar-container.blog-mode::before,
.channel-avatar-container.blog-mode::after {
    opacity: 0;
}

/* Mobile: Hide avatar completely when in pocket/blog mode */
@media screen and (max-width: 768px) {
    .channel-avatar-container.blog-mode {
        opacity: 0 !important;
        pointer-events: none !important;
    }

    .channel-avatar-container.blog-mode::before,
    .channel-avatar-container.blog-mode::after {
        opacity: 0 !important;
    }

    .channel-avatar-container.blog-mode .antenna-dot {
        opacity: 0 !important;
    }
}

/* Global channel special styling */
.channel-avatar-container.global-channel {
    border: none;
    width: auto;
    height: auto;
    cursor: default;
    pointer-events: none;
}

.channel-avatar-container.global-channel .channel-avatar {
    display: none;
}

.channel-avatar-container.global-channel::before,
.channel-avatar-container.global-channel::after {
    display: none;
}

.channel-avatar-container.global-channel .antenna-dot {
    display: none;
}

/* Hide hover highlight on global channel */
.channel-avatar-container.global-channel .avatar-hover-highlight {
    display: none !important;
}

/* Collab channel contributor avatar - shows contributor's avatar when viewing their item */
.channel-avatar-container.collab-contributor {
    cursor: pointer;
    pointer-events: auto;
}

.channel-avatar-container.collab-contributor .channel-avatar {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
    transition: box-shadow 0.2s ease;
}

.channel-avatar-container.collab-contributor:hover .channel-avatar {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.8);
}

/* Global channel title - replaces avatar on global channel (desktop only) */
.global-channel-title {
    display: none;
    color: white;
    font-size: 120px;
    font-family: 'Times New Roman', Times, serif;
    font-style: italic;
    white-space: nowrap;
}

.global-channel-title span {
    display: inline;
}

/* Two-line layout when shop is open */
.global-channel-title.two-line {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    white-space: normal;
    font-size: 0; /* Hide &nbsp; between spans */
    gap: 0;
}

.global-channel-title.two-line span {
    display: block;
    font-size: 120px;
    line-height: 0.85;
}

/* Hide big Age Daily title on mobile - show in channel-info-display instead */
@media screen and (max-width: 1024px) and (orientation: portrait) {
    .global-channel-title {
        display: none !important;
    }
}

.channel-avatar-container.global-channel .global-channel-title {
    display: flex;
}

/* Also show via body/html class for direct global channel loads */
body.global-channel-active .channel-avatar-container .global-channel-title,
html.global-channel-active .channel-avatar-container .global-channel-title {
    display: flex;
}

/* Hide Age Daily title when channel index is open */
.channel-index-overlay.visible ~ .channel-avatar-container .global-channel-title {
    display: none !important;
}

/* Hide Age Daily title when pocket/inventory is open */
.inventory-overlay.visible ~ .channel-avatar-container .global-channel-title {
    display: none !important;
}

/* Make avatar container visible on global channel */
body.global-channel-active .channel-avatar-container,
html.global-channel-active .channel-avatar-container {
    opacity: 1;
    pointer-events: auto;
}

/* Hide the regular avatar image on global channel */
body.global-channel-active .channel-avatar-container .channel-avatar,
html.global-channel-active .channel-avatar-container .channel-avatar {
    opacity: 0;
}

/* Channel info display */
.channel-info-display {
    position: fixed;
    bottom: 55px;
    right: 20px;
    color: white;
    font-size: 18px;
    text-align: right;
    z-index: 200;
    line-height: 1.4;
    opacity: 1;
    transition: opacity 0.3s ease;
    pointer-events: none; /* Container doesn't catch events */
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.channel-info-display.item-viewing {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Video title display (desktop only) */
.channel-video-title {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 2px;
    opacity: 0.9;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.9), 0 0 20px rgba(0, 0, 0, 0.7);
    max-width: 400px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Channel source info (via ChannelName) */
.channel-info-source {
    font-size: 14px;
    margin-bottom: 4px;
    opacity: 0.9;
    pointer-events: auto; /* Enable clicks on source */
    cursor: pointer;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.9), 0 0 20px rgba(0, 0, 0, 0.7); /* Visibility against black */
}

/* About link (home channel only) */
.channel-info-about {
    font-size: 14px;
    color: white;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.channel-info-about:hover {
    opacity: 1;
}

/* Hide video title on mobile */
@media (max-width: 768px) {
    .channel-video-title {
        display: none !important;
    }
}

.channel-info-source span {
    pointer-events: auto;
}

.channel-info-name {
    font-weight: bold;
    margin-bottom: 4px;
}

.channel-info-subtitle {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 4px;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.9), 0 0 20px rgba(0, 0, 0, 0.7);
}

.channel-info-subtitle a {
    font-weight: bold;
    color: inherit;
    text-decoration: none;
    pointer-events: auto;
    cursor: pointer;
}

.channel-info-subtitle a:hover {
    text-decoration: underline;
}

.channel-info-location {
    font-size: 16px;
    opacity: 0.8;
}

/* External link (legacy - separate container above notebook/pocket) */
.channel-info-external {
    text-align: right;
    margin-bottom: 4px;
}

.channel-info-external a {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: underline;
    opacity: 0.8;
    transition: opacity 0.2s;
    pointer-events: auto;
}

.channel-info-external a:hover {
    opacity: 1;
}

/* External link - inline with notebook/pocket (matches their styling exactly) */
.channel-info-external-link {
    font-size: 12px;
    color: white;
    opacity: 0.8;
    text-decoration: underline;
    cursor: pointer;
    display: block;
    transition: opacity 0.3s ease;
    pointer-events: auto;
    position: relative;
    z-index: 250;
    padding: 8px;
    margin: -8px;
}

.channel-info-external-link:hover {
    opacity: 1;
}

.channel-info-external-link:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

/* External link row - separate line below main links, positioned absolutely so it doesn't push content */
.channel-info-external-row {
    position: absolute;
    top: 100%;
    right: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
    white-space: nowrap;
}

.channel-info-external-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

/* Mobile external link - hidden on desktop */
@media (min-width: 769px) {
    .channel-info-external-mobile {
        display: none !important;
    }
}

/* Container for links - horizontal layout */
.channel-info-links {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 4px;
}

/* Global channel info styling */
.channel-info-display.global-channel .channel-info-name {
    color: #0f0;
}

/* Channel preview styles */
.channel-preview {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: black;
    z-index: 50;
    opacity: 0;
    transform: translateY(100%);
    transition: none;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.channel-preview.from-top {
    transform: translateY(-100%);
}

.channel-preview-avatar {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 6px solid var(--channel-accent);
    margin-bottom: 30px;
    box-shadow: 0 0 50px rgba(255, 0, 0, 0.3);
}

.channel-preview-info {
    color: var(--channel-accent);
    font-size: 18px;
    text-align: center;
    max-width: 300px;
}

.channel-preview-info h1 {
    margin: 0 0 15px 0;
    font-size: 32px;
    text-decoration: underline;
}

.channel-preview-info .bio {
    font-size: 16px;
    line-height: 1.4;
}

.channel-preview-info a {
    color: var(--channel-accent);
    text-decoration: underline;
}

/* Global channel preview styling */
.channel-preview.global .channel-preview-avatar {
    border: 6px solid gold;
    box-shadow: 0 0 50px rgba(255, 215, 0, 0.3);
}

.channel-preview.global .channel-preview-info {
    color: gold;
}

.channel-preview.global .channel-preview-info a {
    color: gold;
}

/* Inventory overlay */
.inventory-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 80px;
    background: black;
    z-index: 240;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: none;
    overflow-y: auto;
    overflow-x: hidden;
    display: block;
}

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

/* Drag-and-drop visual indicator */
.inventory-overlay.drag-over {
    outline: 3px dashed rgba(100, 200, 255, 0.5);
    outline-offset: -20px;
}

.inventory-overlay.drag-over #inventoryContent::before {
    content: 'Drop to add';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(100, 200, 255, 0.8);
    font-size: 24px;
    font-style: italic;
    z-index: 300;
    pointer-events: none;
}

/* Black blocks at top and bottom - items scroll under these */
.inventory-overlay::before,
.inventory-overlay::after {
    content: '';
    position: fixed;
    left: 0;
    right: 0;
    height: 120px;
    background: black;
    z-index: 250;
    pointer-events: none;
}

.inventory-overlay::before {
    top: 0;
}

.inventory-overlay::after {
    bottom: 80px; /* Above the nav controls */
    height: 110px;
}

/* Mobile: slightly smaller blocks */
@media screen and (max-width: 768px) {
    .inventory-overlay::before,
    .inventory-overlay::after {
        height: 100px;
    }
}

/* Pocket close button - matches canvas style */
.pocket-close-x {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10002;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 28px;
    cursor: pointer;
    padding: 10px;
    line-height: 1;
    transition: color 0.2s ease;
}

.pocket-close-x:hover {
    color: rgba(255, 255, 255, 0.8);
}

/* Mobile pocket close button - always visible */
@media screen and (max-width: 1024px) {
    .pocket-close-x {
        color: white !important;
        font-size: 32px !important;
        z-index: 10010 !important;
        top: env(safe-area-inset-top, 20px) !important;
        padding-top: 20px !important;
    }
}

/* ============================================================================
   SAFARI VIDEO PLAY OVERLAY
   Black overlay with play button over just the video area (UI stays visible)
   ============================================================================ */

/* Black overlay covering only the video area */
.safari-video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: black;
    z-index: 200; /* Below UI (avatar=250, channel-info=200+) but above video */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Play button in center */
.safari-video-play-btn {
    color: var(--channel-accent, white);
    cursor: pointer;
    pointer-events: auto;
    padding: 40px;
}

.safari-video-play-btn svg {
    width: 80px;
    height: 80px;
    pointer-events: none;
}

/* Hide video title when Safari overlay is showing */
body:has(.safari-video-overlay) .channel-video-title {
    display: none !important;
}

/* Safari canvas play button - appears over canvas on Safari initial load */
.safari-canvas-play-btn {
    position: fixed;
    top: 50%;
    left: 40px;
    transform: translateY(-50%);
    z-index: 100005;
    color: var(--channel-accent, white);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: opacity 0.2s ease;
}

.safari-canvas-play-btn:hover {
    opacity: 0.8;
}

.safari-canvas-play-btn:active {
    opacity: 0.6;
}

.safari-canvas-play-btn .play-label {
    font-family: 'Times New Roman', Times, serif;
    font-style: italic;
    font-size: 32px;
    color: var(--channel-accent, white);
}

.safari-canvas-play-btn svg {
    width: 160px;
    height: 160px;
    pointer-events: none;
    color: var(--channel-accent, white);
}

.safari-canvas-play-btn .channel-label {
    font-family: Arial, sans-serif;
    font-size: 48px;
    font-weight: bold;
    color: var(--channel-accent, white);
    text-transform: uppercase;
}

/* Channel info uses accent color when canvas/notes view is open */
body:has(.notes-view-overlay.active) .channel-info-display .channel-info-name,
body:has(.notes-view-overlay.active) .channel-info-display .channel-info-location,
body:has(.notes-view-overlay.active) .channel-info-display .channel-info-subtitle,
body:has(.notes-view-overlay.active) .channel-info-display .channel-info-pocket,
body:has(.notes-view-overlay.active) .channel-info-display .channel-info-notes,
body:has(.notes-view-overlay.active) .channel-info-display .channel-info-about {
    color: var(--channel-accent, white) !important;
}

/* Pocket drafts toggle button */
/* Pocket tabs (public/private) */
.pocket-tabs {
    position: fixed;
    top: 30px;
    left: 30px;
    z-index: 10002;
    display: flex;
    gap: 20px;
}

.pocket-tab {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    font-weight: bold;
    padding: 4px 0;
    cursor: pointer;
    transition: color 0.2s ease;
    font-family: inherit;
    text-transform: lowercase;
    border-bottom: 2px solid transparent;
}

.pocket-tab:hover {
    color: rgba(255, 255, 255, 0.8);
}

.pocket-tab.active {
    color: white;
    border-bottom: 2px solid white;
}

/* Mobile: Pocket tabs with black background block */
@media screen and (max-width: 768px) {
    .pocket-tabs {
        position: fixed;
        top: 5px;
        left: 15px;
        right: 15px;
        padding: 10px 0 15px 0;
        background: linear-gradient(to bottom,
            rgba(0, 0, 0, 1) 0%,
            rgba(0, 0, 0, 1) 70%,
            rgba(0, 0, 0, 0) 100%);
        margin: 0;
    }
}

/* Canvas tabs container - bottom left, shown when canvas view is open */
.canvas-tabs-container {
    position: fixed;
    bottom: 105px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100000; /* Very high - above everything */
    display: flex;
    align-items: center;
    gap: 20px;
}


.canvas-tabs {
    display: flex;
    gap: 15px;
}

.canvas-tab {
    position: relative;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    font-weight: bold;
    padding: 4px 0;
    cursor: pointer;
    transition: color 0.2s ease;
    font-family: inherit;
    text-transform: lowercase;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    user-select: none;
}

.canvas-tab:hover {
    color: rgba(255, 255, 255, 0.8);
}

.canvas-tab.active {
    color: var(--channel-accent);
    border-bottom: 2px solid var(--channel-accent);
}

.canvas-tab.dragging {
    opacity: 0.5;
}

/* Rename option on hover */
.canvas-tab-rename {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 4px;
    background: rgba(0, 0, 0, 0.8);
    color: rgba(255, 255, 255, 0.6);
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
    white-space: nowrap;
}

.canvas-tab:hover .canvas-tab-rename {
    opacity: 1;
}

.canvas-tab-rename:hover {
    color: white;
}

/* Notebook toolbar buttons */
.notebook-destroy-btn,
.notebook-new-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    cursor: pointer;
    padding: 4px 8px;
    font-family: inherit;
}

.notebook-destroy-btn:hover {
    color: #ff6b6b;
}

.notebook-new-btn:hover {
    color: white;
}

/* Canvas creator modal */
.canvas-creator-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #1a1a1a;
    border-radius: 12px;
    padding: 24px;
    z-index: 10010;
    min-width: 300px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.canvas-creator-title {
    color: white;
    font-size: 16px;
    margin: 0 0 20px 0;
    font-weight: normal;
}

.canvas-creator-field {
    margin-bottom: 16px;
}

.canvas-creator-field label {
    display: block;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    margin-bottom: 6px;
}

.canvas-creator-field input[type="text"] {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 10px 12px;
    color: white;
    font-size: 14px;
    box-sizing: border-box;
}

.canvas-creator-field input[type="text"]:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
}

.canvas-creator-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.canvas-creator-cancel,
.canvas-creator-save {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}

.canvas-creator-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.canvas-creator-save {
    background: white;
    color: black;
}

.canvas-creator-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10009;
}

/* Display in channel info button */
.notebook-primary-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.5);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    margin-left: 10px;
    transition: all 0.2s ease;
}

.notebook-primary-btn:hover {
    color: white;
    border-color: white;
}

.notebook-primary-btn.is-primary {
    color: rgba(100, 255, 150, 0.8);
    border-color: rgba(100, 255, 150, 0.4);
    cursor: default;
}

/* Mobile: Canvas tabs */
@media screen and (max-width: 768px) {
    .canvas-tabs-container {
        bottom: 40px;
        left: 20px;
        gap: 12px;
    }


    .canvas-tabs {
        gap: 10px;
    }

    .canvas-tab {
        font-size: 12px;
    }

    .canvas-tab-rename {
        display: none; /* No hover on mobile */
    }
}

/* Pocket Screenings View */
.pocket-screenings {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow-y: auto;
    padding: 120px 30px 120px 30px;
    box-sizing: border-box;
}

.pocket-screenings-content {
    max-width: 600px;
    margin: 0 auto;
}

.screenings-table {
    width: 100%;
    border-collapse: collapse;
}

.screenings-table th,
.screenings-table td {
    text-align: left;
    padding: 12px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
}

.screenings-table th {
    color: rgba(255, 255, 255, 0.5);
    font-weight: normal;
    text-transform: lowercase;
}

.screenings-table td {
    color: white;
}

.screenings-table .screening-title {
    font-weight: bold;
}

.screenings-table .screening-channel {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
}

.screenings-table .screening-time {
    white-space: nowrap;
}

.screenings-table .screening-status {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    display: inline-block;
}

.screenings-table .screening-status.upcoming {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

.screenings-table .screening-status.live {
    background: rgba(255, 100, 100, 0.3);
    color: #ff6b6b;
}

.screenings-empty {
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    padding: 40px 20px;
    font-style: italic;
}

@media (max-width: 600px) {
    .pocket-screenings {
        padding: 15px;
    }

    .screenings-table th,
    .screenings-table td {
        padding: 10px 6px;
        font-size: 13px;
    }
}

/* Pocket Split View (Drafts mode) */
.pocket-split-view {
    display: flex;
    width: 100%;
    height: 100%;
    padding-top: 60px; /* Space for fixed button */
    box-sizing: border-box;
}

.pocket-split-left,
.pocket-split-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    min-width: 0;
}

.pocket-split-divider {
    width: 2px;
    background: linear-gradient(to bottom,
        transparent 0%,
        rgba(255, 255, 255, 0.2) 15%,
        rgba(255, 255, 255, 0.2) 85%,
        transparent 100%);
    margin: 60px 10px 20px 10px;
    flex-shrink: 0;
}

.pocket-split-header {
    padding: 10px 15px;
    font-size: 11px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 1px;
    text-align: center;
    flex-shrink: 0;
}

.pocket-split-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
    padding: 10px;
    flex: 1;
    align-content: start;
}

.pocket-split-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: rgba(255, 255, 255, 0.3);
    font-size: 12px;
    padding: 30px 10px;
}

/* Split view items - smaller, album-like sizing */
.pocket-split-item {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 4px;
    overflow: hidden;
    cursor: grab;
    background: rgba(255, 255, 255, 0.05);
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.pocket-split-item:active {
    cursor: grabbing;
}

.pocket-split-item.dragging {
    opacity: 0.5;
    transform: scale(0.95);
}

.pocket-split-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pocket-split-item .split-item-text {
    padding: 8px;
    font-size: 9px;
    color: rgba(255, 255, 255, 0.7);
    overflow: hidden;
    height: 100%;
    box-sizing: border-box;
}

.pocket-split-item .split-item-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.pocket-split-item .split-item-pdf,
.pocket-split-item .split-item-album,
.pocket-split-item .split-item-voice,
.pocket-split-item .split-item-default {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 20px;
    color: rgba(255, 255, 255, 0.5);
}

/* Delete button on split items */
.pocket-split-delete {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(200, 60, 60, 0.9);
    border: none;
    color: white;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.pocket-split-item:hover .pocket-split-delete {
    opacity: 1;
}

/* Drag over highlight for zones */
.pocket-split-grid.drag-over {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

/* Mobile: Single column stacks side by side */
@media screen and (max-width: 768px) {
    .pocket-split-view {
        padding-top: 50px;
    }

    .pocket-split-grid {
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 8px;
    }

    .pocket-split-item {
        width: 100%;
        height: auto;
        aspect-ratio: 1;
    }

    .pocket-split-divider {
        width: 1px;
        margin: 50px 5px 10px 5px;
    }

    .pocket-split-header {
        font-size: 10px;
        padding: 8px 10px;
    }

    .pocket-split-delete {
        opacity: 1;
    }
}

/* Inventory backdrop - full clickable area behind content */
.inventory-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 1;
    cursor: pointer;
}

/* Main inventory content area - 4 columns by default */
.inventory-content {
    flex: 1;
    height: 100%;
    color: var(--channel-accent);
    font-size: 14px;
    line-height: 1.6;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(100px, auto);
    gap: 25px 10px; /* row-gap column-gap */
    align-content: start;
    justify-items: center;
    padding: 350px 20px 180px 20px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--channel-accent) transparent;
    position: relative;
    z-index: 2;
}

/* All item counts start from top for consistent positioning */
.inventory-content.few-items,
.inventory-content.medium-items,
.inventory-content.many-items {
    align-content: start;
}

/* All items flow normally - no blank first slot */
.inventory-content .inventory-item {
    grid-column: auto;
}

/* Mobile: 3 columns */
@media screen and (max-width: 768px) {
    .inventory-content {
        grid-template-columns: repeat(3, 1fr);
        justify-content: center;
        padding: 160px 15px 140px 15px;
    }

    /* Make room for showtimes table when present */
    .inventory-overlay.has-showtimes .inventory-content {
        padding-bottom: 160px;
    }
}

/* Mobile pocket showtimes table */
.pocket-showtimes {
    display: none;
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    text-align: center;
    padding: 10px 20px;
    z-index: 10;
}

.pocket-showtimes-label {
    font-family: Arial, sans-serif;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: lowercase;
    margin-bottom: 6px;
}

.pocket-showtimes-table {
    width: auto;
    margin: 0 auto;
    border-collapse: collapse;
}

.pocket-showtimes-table td {
    font-family: Arial, sans-serif;
    font-size: 11px;
    color: white;
    padding: 3px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.pocket-showtimes-table tr:last-child td {
    border-bottom: none;
}

.pocket-showtimes-table td:first-child {
    text-align: left;
}

.pocket-showtimes-table td:last-child {
    text-align: right;
    opacity: 0.7;
}

/* Only show showtimes on mobile */
@media screen and (min-width: 769px) {
    .pocket-showtimes {
        display: none !important;
    }
}

/* Single item should span all columns and be centered */
.inventory-content.single-item {
    grid-template-columns: 1fr;
    align-content: center;
    justify-items: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Reset first item positioning for single item view */
.inventory-content.single-item .inventory-item:nth-child(1) {
    grid-column: auto;
}

/* Single video items should have constrained size like folder items */
.inventory-content.single-item .inventory-item.video-item {
    width: auto;
    max-width: 400px; /* Reasonable max width for single video */
    height: auto;
}

/* Desktop: larger single video */
@media screen and (min-width: 1025px) {
    .inventory-content.single-item .inventory-item.video-item {
        max-width: 500px;
    }
}

/* Mobile: smaller single video */
@media screen and (max-width: 1024px) {
    .inventory-content.single-item .inventory-item.video-item {
        max-width: 300px;
    }
}

.inventory-content::-webkit-scrollbar {
    width: 6px;
}

.inventory-content::-webkit-scrollbar-track {
    background: transparent;
}

.inventory-content::-webkit-scrollbar-thumb {
    background: var(--channel-accent);
    border-radius: 3px;
}

.inventory-item {
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
    z-index: 3;
}

/* Delete button for pocket items (owner mode) */
.pocket-item-delete {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(200, 60, 60, 0.9);
    border: 2px solid white;
    color: white;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.inventory-item:hover .pocket-item-delete {
    opacity: 1;
}

.pocket-item-delete:hover {
    background: rgba(220, 40, 40, 1);
    transform: scale(1.1);
}

/* Mobile: simple red X without circle */
@media screen and (max-width: 768px) {
    .pocket-item-delete {
        background: transparent;
        border: none;
        color: rgba(220, 60, 60, 1);
        font-size: 20px;
        width: auto;
        height: auto;
        top: -6px;
        right: -4px;
    }

    .pocket-item-delete:hover {
        background: transparent;
        transform: none;
    }
}

/* Edit button for pocket items - lower left corner on hover */
.pocket-item-edit {
    position: absolute;
    bottom: 6px;
    left: 6px;
    padding: 3px 8px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    font-size: 10px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    text-transform: lowercase;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease, background 0.2s ease;
    z-index: 10;
    pointer-events: auto;
}

.inventory-item:hover .pocket-item-edit {
    opacity: 1;
}

.pocket-item-edit:hover {
    background: rgba(0, 0, 0, 0.9);
}

/* Edit modal for pocket items */
.pocket-edit-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.pocket-edit-modal-content {
    background: #1a1a1a;
    border-radius: 12px;
    padding: 20px;
    width: 100%;
    max-width: 320px;
}

.pocket-edit-modal-content h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 500;
    color: white;
    text-transform: capitalize;
}

.pocket-edit-input {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: white;
    font-size: 14px;
    box-sizing: border-box;
}

.pocket-edit-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
}

.pocket-edit-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.pocket-edit-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.pocket-edit-actions button {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
}

.pocket-edit-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.pocket-edit-cancel:hover {
    background: rgba(255, 255, 255, 0.15);
}

.pocket-edit-save {
    background: white;
    color: black;
    font-weight: 500;
}

.pocket-edit-save:hover {
    background: rgba(255, 255, 255, 0.9);
}

/* Highlight/star button in pocket grid */
.pocket-item-highlight {
    position: absolute;
    top: -8px;
    left: -8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(80, 80, 80, 0.9);
    border: 2px solid white;
    color: white;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.inventory-item:hover .pocket-item-highlight {
    opacity: 1;
}

.pocket-item-highlight:hover {
    background: rgba(100, 100, 100, 1);
    transform: scale(1.1);
}

.pocket-item-highlight.active {
    background: rgba(180, 140, 0, 0.9);
    color: gold;
    opacity: 1;
}

.pocket-item-highlight.active:hover {
    background: rgba(200, 160, 0, 1);
}

.inventory-item .pocket-item-highlight {
    pointer-events: auto;
}

/* Draft toggle button for pocket items */
.pocket-item-draft-toggle {
    position: absolute;
    bottom: 4px;
    right: 4px;
    padding: 3px 8px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: rgba(255, 255, 255, 0.9);
    font-size: 9px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    text-transform: lowercase;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease, background 0.2s ease;
    z-index: 10;
    white-space: nowrap;
    pointer-events: none;
}

.inventory-item:hover .pocket-item-draft-toggle {
    opacity: 1;
    pointer-events: auto;
}

.pocket-item-draft-toggle:hover {
    background: rgba(0, 0, 0, 0.9);
}

/* Mobile: show on tap via active state */
@media screen and (max-width: 768px) {
    .pocket-item-draft-toggle {
        font-size: 10px;
        padding: 4px 10px;
    }

    /* On mobile, always show the button so users can tap it */
    .inventory-item .pocket-item-draft-toggle {
        opacity: 1;
        pointer-events: auto;
    }
}

/* Drag and drop states for pocket items */
.inventory-item.dragging {
    opacity: 0.5;
    transform: scale(0.95);
}

.inventory-item.drag-over {
    outline: 2px dashed white;
    outline-offset: 4px;
}

.inventory-item[draggable="true"] {
    cursor: grab;
}

.inventory-item[draggable="true"]:active {
    cursor: grabbing;
}

/* Prevent images from being dragged separately */
.inventory-item[draggable="true"] img {
    -webkit-user-drag: none;
    user-drag: none;
    pointer-events: none;
}

/* Ghost element for custom drag */
.pocket-drag-ghost {
    width: 80px;
    height: 80px;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

/* Delete button must be clickable */
.inventory-item .pocket-item-delete {
    pointer-events: auto;
}

.inventory-item.image-item {
    width: 150px;
    height: 150px;
    object-fit: cover;
}

.inventory-item.pdf-item-large {
    width: 150px;
    height: 150px;
    box-shadow: none;
    overflow: visible;
}

.inventory-item.single-glow.pdf-item-large {
    width: 120px;
    min-height: 140px;
    box-shadow: none;
}

.inventory-item-pdf-large {
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    background: transparent;
}

.inventory-item-pdf-title {
    font-size: 8px;
    font-weight: bold;
    color: white;
    text-align: center;
    margin-bottom: 5px;
    line-height: 1.1;
    max-width: 80px;
    word-wrap: break-word;
}

.inventory-item-pdf-cover-large {
    width: 60px;
    height: 75px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
    background: transparent;
}

/* Album item styles */
.inventory-item.album-item {
    width: 150px;
    height: 150px;
    overflow: visible;
}

.inventory-item-album {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.inventory-item-album-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.inventory-item-album-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    text-align: center;
    padding: 10px;
}

.inventory-item-album-badge {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 4px;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.inventory-item-album-badge svg {
    stroke: white;
}

/* Voice memo thumbnail styling - matches text-item */
.inventory-item-voice {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 12px;
    gap: 8px;
    height: 100%;
    box-sizing: border-box;
}

.inventory-item-voice-title {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.4;
    max-width: 130px;
    word-wrap: break-word;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.inventory-item-voice-play {
    color: rgba(255, 255, 255, 0.6);
    margin: 4px 0;
}

.inventory-item-voice-play svg {
    width: 28px;
    height: 28px;
}

.inventory-item-voice-duration {
    font-size: 10px;
    font-style: italic;
    color: rgba(255, 255, 255, 0.4);
}

.inventory-item-pdf-cover-large img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.inventory-pdf-cover-canvas {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.inventory-item-pdf-label-large {
    font-size: 8px;
    font-weight: bold;
    color: white;
    text-transform: lowercase;
    line-height: 1.1;
    text-align: center;
}

/* Single item PDF styling */
.inventory-content.single-item .inventory-item-pdf-title {
    font-size: 12px;
    max-width: 120px;
    margin-bottom: 8px;
}

.inventory-content.single-item .inventory-item-pdf-cover-large {
    width: 90px;
    height: 110px;
    margin-bottom: 8px;
}

.inventory-content.single-item .inventory-item-pdf-label-large {
    font-size: 12px;
}

.inventory-item.text-item {
    width: 150px;
    height: 150px;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.inventory-item.single-glow {
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

.inventory-item.single-glow.image-item {
    max-width: 160px;
    max-height: 160px;
}

/* Text items should not have glow even when single */
.inventory-item.single-glow.text-item {
    box-shadow: none;
}

.inventory-item:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.9);
}

/* Text items should not have glow on hover either */
.inventory-item.text-item:hover {
    transform: scale(1.1);
    box-shadow: none;
}

.inventory-item.single-glow:hover {
    transform: scale(1.15);
    box-shadow: 0 0 25px rgba(255, 255, 255, 1);
}

/* Override hover glow for single text items too */
.inventory-item.single-glow.text-item:hover {
    transform: scale(1.15);
    box-shadow: none;
}

.inventory-item.enlarged {
    transform: scale(4);
    z-index: 280;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.inventory-item-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: transparent;
}

/* New text item styling - no background, just text */
.inventory-item-text-preview {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    padding: 10px;
    color: white !important;
    text-align: center;
    line-height: 1.2;
    font-weight: bold;
    word-wrap: break-word;
    overflow: hidden;
    position: relative;
}

/* Force white color on ALL nested elements in text preview */
.inventory-item-text-preview * {
    color: white !important;
}

/* Smooth fade-in for lazy-loaded images */
.inventory-item-image.lazy-image {
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

.inventory-item-image.lazy-image.loaded,
.inventory-item-image.cached {
    opacity: 1;
}

/* Single item text styling */
.inventory-content.single-item .inventory-item.text-item {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
}

.inventory-content.single-item .inventory-item-text-preview {
    width: 100%;
    height: 100%;
    color: white !important;
    padding: 20px;
}

.inventory-item-pdf {
    width: 100%;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
    position: relative;
    background: transparent;
}

.inventory-item-pdf-cover {
    width: 100%;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2px;
}

.inventory-item-pdf-cover img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.inventory-item-pdf-label {
    font-size: 5px;
    font-weight: normal;
    color: white;
    text-transform: lowercase;
    line-height: 1;
    align-self: flex-end;
}

/* Enlarged item overlay */
.enlarged-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 270;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

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

.inventory-content.viewing-item .inventory-item {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.inventory-enlarged-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    z-index: 260;
}

.inventory-enlarged-image.visible {
    opacity: 1;
    pointer-events: auto;
}

.inventory-enlarged-image img {
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
    z-index: 265;
    position: relative;
}

/* Landscape corner labels - hidden by default, only show in landscape */
.landscape-channel-name {
    display: none;
}

/* UPDATED: Show landscape name only on mobile devices in landscape */
@media screen and (orientation: landscape) and (max-width: 1024px) {
    .landscape-channel-name {
        display: block !important;
    }
}

/* UPDATED: Enhanced landscape mode display - ONLY ON MOBILE DEVICES */
@media screen and (orientation: landscape) and (max-width: 1024px) {
    /* Hide the entire inventory overlay and all its contents in landscape */
    .inventory-overlay {
        display: none !important;
    }

    .inventory-content {
        display: none !important;
    }

    .inventory-backdrop {
        display: none !important;
    }

    /* Hide ALL opened inventory items instantly in landscape */
    .inventory-enlarged-image {
        display: none !important;
    }

    .enlarged-overlay {
        display: none !important;
    }

    .enlarged-content {
        display: none !important;
    }

    .image-close-area {
        display: none !important;
    }

    /* Hide text items instantly too */
    .text-display-overlay {
        display: none !important;
    }

    .text-display-background {
        display: none !important;
    }

    /* Hide existing UI elements in landscape */
    .channel-avatar-container,
    .antenna-dot,
    .header-info,
    .mobile-controls,
    .typo-controls,
    .age-daily,
    .title-blocker,
    .bottom-blocker,
    .channel-info-display {
        display: none !important;
    }

    /* Landscape channel name in upper-right corner */
    .landscape-channel-name {
        position: fixed !important;
        top: 20px !important;
        right: 20px !important;
        color: var(--channel-accent) !important;
        font-size: 18px !important;
        font-family: Arial, sans-serif !important;
        z-index: 300 !important;
        display: block !important;
        text-shadow: 0 0 10px rgba(0, 0, 0, 0.8) !important;
    }

    /* Global channel landscape styling */
    .landscape-channel-name.global-channel {
        color: var(--channel-accent) !important;
    }
    
    /* Channel source tag in lower right corner (landscape, global channel only) */
    .channel-source-tag {
        position: fixed !important;
        bottom: 20px !important;
        right: 20px !important;
        color: white !important;
        font-size: 14px !important;
        z-index: 300 !important;
        display: none !important;
        text-shadow: 0 0 10px rgba(0, 0, 0, 0.8) !important;
        pointer-events: auto !important;
    }
    
    .channel-source-tag.visible {
        display: block !important;
    }
    
    .source-via {
        font-weight: 300;
        opacity: 0.8;
    }
    
    .source-channel-name {
        font-weight: bold;
        cursor: pointer;
    }
}

/* Optional: Hide landscape-only elements on desktop */
@media screen and (min-width: 1025px) {
    .landscape-channel-name {
        display: none !important;
    }
    
    /* Hide channel source tag in landscape position on desktop */
    .channel-source-tag {
        display: none !important;
    }
}

/* Channel source tag - default hidden, shown only in landscape on global channel */
.channel-source-tag {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    color: white;
    font-size: 14px;
    z-index: 300;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
    pointer-events: auto;
}

.channel-source-tag .source-via {
    font-weight: 300;
    opacity: 0.8;
}

.channel-source-tag .source-channel-name {
    font-weight: bold;
    cursor: pointer;
}

/* Maintained by - visible on global channel */
.maintained-by {
    display: none;
    position: fixed;
    bottom: 40px;
    right: 20px;
    color: white;
    font-family: Arial, sans-serif;
    font-size: 12px;
    z-index: 300;
    pointer-events: auto;
}

body.global-channel-active .maintained-by {
    display: block;
}

.maintained-by span {
    opacity: 0.8;
}

/* Contact email - below maintained-by by default, repositions in shop mode */
.contact-email {
    display: none;
    position: fixed;
    bottom: 25px;
    right: 20px;
    font-family: Arial, sans-serif;
    font-size: 12px;
    z-index: 300;
    pointer-events: auto;
}

body.global-channel-active .contact-email {
    display: block;
}

/* Keep email below maintained-by when shop is open */
body.shop-open .contact-email {
    bottom: 25px;
    right: 20px;
}

.contact-email a {
    color: white;
    opacity: 0.8;
    text-decoration: none;
}

.contact-email a:hover {
    text-decoration: underline;
}

/* Mention links - @username style */
.mention-link {
    color: white;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
}

.mention-link:hover {
    text-decoration: underline;
}

.enlarged-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 80vw;
    max-height: calc(100vh - 200px);
    z-index: 285;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.enlarged-content.visible {
    opacity: 1;
    pointer-events: auto;
}

.enlarged-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
}

.enlarged-content .image-content {
    display: flex;
    align-items: center;
    justify-content: center;
}

.enlarged-content .image-content img {
    max-width: 90vw;
    max-height: calc(100vh - 200px);
}

.enlarged-content .image-content.horizontal {
    position: fixed;
    top: 180px;
    left: 50%;
    transform: translateX(-50%);
    width: 85vw;
    height: auto;
}

.enlarged-content .image-content.horizontal img {
    width: 100%;
    height: auto;
    max-height: calc(100vh - 300px);
}

.enlarged-content .text-content {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    padding: 20px 40px;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
    max-width: 80vw;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    font-size: 16px;
    line-height: 1.6;
    width: 70vw;
    min-height: 200px;
}

.enlarged-content .pdf-content {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    padding: 40px;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
    text-align: center;
}

/* Text display overlay */
.text-display-overlay {
    position: fixed;
    top: 90px;
    left: 50px;
    right: 50px;
    background: transparent;
    z-index: 270;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    overflow: visible;
    height: auto;
    max-height: calc(100vh - 230px);
}

.text-display-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.text-display-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 265;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.text-display-background.visible {
    opacity: 1;
    pointer-events: auto;
}

/* Expanded clickable area for images */
.image-close-area {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 260;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.image-close-area.visible {
    opacity: 1;
    pointer-events: auto;
}

.text-display-content {
    width: 100%;
    height: auto;
    min-height: 100px;
    max-height: calc(100vh - 230px);
    padding: 20px;
    overflow-y: auto;
    background: transparent;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.text-display-content::-webkit-scrollbar {
    display: none;
}

.text-display-text {
    color: white;
    font-size: 16px;
    line-height: 1.6;
    text-align: justify;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.8),
                 0 0 12px rgba(255, 255, 255, 0.6),
                 0 0 16px rgba(255, 255, 255, 0.4);
    background: transparent;
}

.text-display-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 20px;
    color: white;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.9),
                 0 0 15px rgba(255, 255, 255, 0.7),
                 0 0 20px rgba(255, 255, 255, 0.5);
}

/* Item viewer modal */
.item-viewer {
    display: none;
}

.empty-inventory {
    color: var(--channel-accent);
    text-align: center;
    padding: 40px;
    font-size: 16px;
    grid-column: 1 / -1;
    position: relative;
    z-index: 2;
}

.header-info {
    position: fixed;
    top: 10px;
    left: 10px;
    right: 90px;
    color: var(--channel-accent);
    font-size: 16px;
    z-index: 200;
    background: rgba(0,0,0,0.8);
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: none;
    opacity: 0;
    transform: translateY(-20px);
}

.header-info.visible {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.header-info h1 {
    margin: 0;
    font-size: 24px;
    text-decoration: underline;
}

.header-info .bio {
    font-size: 14px;
    margin-top: 10px;
}

.header-info a {
    color: var(--channel-accent);
    text-decoration: underline;
}

/* Global channel header styling */
.header-info.global-channel {
    color: gold;
}

.header-info.global-channel h1 {
    color: gold;
}

.header-info.global-channel a {
    color: gold;
}

/* Mobile controls */
.mobile-controls {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.9);
    padding: 15px;
    display: none;
    justify-content: space-around;
    align-items: center;
    z-index: 200;
}

.control-btn {
    background: var(--channel-accent);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 50%;
    font-size: 20px;
    width: 60px;
    height: 60px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.control-btn:active {
    background: darkred;
}

/* Shop coming soon message */
.shop-coming-soon {
    position: fixed;
    top: 15px;
    left: 15px;
    color: white;
    font-family: Arial, sans-serif;
    font-size: 14px;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.shop-coming-soon.visible {
    opacity: 1;
}

/* Mobile channel navigation arrows */
.mobile-channel-arrows {
    display: none;
}

@media screen and (max-width: 1024px) and (orientation: portrait) {
    .mobile-channel-arrows {
        display: flex;
        flex-direction: column;
        gap: 4px;
        position: fixed;
        top: 45%;
        transform: translateY(-50%);
        right: 20px;
        z-index: 200;
    }

    .mobile-arrow-btn {
        width: 24px;
        height: 20px;
        background: transparent;
        border: 1px solid var(--channel-accent);
        border-radius: 3px;
        color: var(--channel-accent);
        font-size: 12px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-arrow-btn:active {
        opacity: 0.6;
    }

    /* Move navigation buttons to right on mobile */
    .typo-controls {
        left: auto !important;
        right: 180px !important;
        bottom: 25px !important;
        max-width: none;
    }

    #homeIndexButtons {
        left: auto !important;
        right: 20px !important;
    }

    /* Hide login button on mobile - fingerprint is the login */
    #typoLoginBtn {
        display: none !important;
    }

    /* Hide shop button on mobile */
    #typoShopBtn {
        display: none !important;
    }

    /* Hide original index button on mobile, use the one in typo-controls instead */
    #typoIndexBtn {
        display: none !important;
    }

    /* Show mobile index button */
    .typo-btn-mobile-index {
        display: inline-block !important;
    }

    /* Fixed width for mute button so it doesn't resize when toggling */
    #typoMuteBtn {
        width: 52px;
        box-sizing: content-box;
    }

    /* Hide original home button on mobile - use mobile-home in typo-controls instead */
    #typoHomeBtn {
        display: none !important;
    }

    /* Show mobile home button only on global channel when logged in */
    .typo-btn-mobile-home {
        display: none !important;
    }

    html.global-channel-active body.owner-logged-in .typo-btn-mobile-home {
        display: inline-block !important;
    }

    /* Global channel title - top right on mobile, global channel only */
    html.global-channel-active .mobile-global-title {
        display: block;
        position: fixed;
        top: 55px;
        right: 20px;
        color: white;
        font-family: Arial, sans-serif;
        font-weight: bold;
        font-size: 18px;
        z-index: 200;
        pointer-events: none;
    }

    /* Hide pocket button when pocket is open on mobile */
    body:has(.pocket-viewing-overlay.active) .channel-info-pocket,
    body:has(.inventory-overlay.visible) .channel-info-pocket {
        display: none !important;
    }

    /* Nudge channel info up on mobile (except Caveh) */
    .channel-info-display:not(.caveh-active) {
        bottom: 75px !important;
    }

    /* Hide mobile channel arrows when notebook or pocket (album) is open */
    body:has(.notes-viewing-overlay.active) .mobile-channel-arrows,
    body:has(.pocket-viewing-overlay.active) .mobile-channel-arrows {
        display: none !important;
    }

    /* External link on mobile - hide the row, use mobile element instead */
    .channel-info-external-row {
        display: none !important;
    }

    /* Mobile external link styling - matches pocket styling */
    .channel-info-external-mobile {
        font-size: 12px;
        color: white;
        opacity: 0.8;
        cursor: pointer;
        pointer-events: auto;
        padding: 8px;
        margin: -8px;
        margin-left: 4px;
    }
}

/* Mobile global title - hidden by default, shown on mobile global channel only */
.mobile-global-title {
    display: none;
}

/* Typography controls */
.typo-controls {
    position: fixed;
    bottom: 55px;
    left: 10px;
    display: flex;
    gap: 8px;
    z-index: 200;
    max-width: 120px;
}

/* Mobile-only index button - hidden on desktop */
.typo-btn-mobile-index {
    display: none;
}

/* Mobile-only home button - hidden on desktop */
.typo-btn-mobile-home {
    display: none;
}

.typo-btn {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: transparent;
    color: var(--channel-accent);
    border: 1px solid var(--channel-accent);
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-family: Arial, sans-serif;
    cursor: pointer;
    text-transform: lowercase;
    transition: background-color 0.2s ease;
    line-height: 1.2;
    box-sizing: border-box;
}

.typo-btn:active {
    background: color-mix(in srgb, var(--channel-accent) 10%, transparent);
}

/* Collective canvas & pocket buttons - top left */
.collective-buttons {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 200;
    align-items: center;
    gap: 6px;
}

/* Hide collective buttons when canvas or pocket is open */
body:has(.notes-viewing-overlay.active) .collective-buttons,
body:has(.inventory-overlay.visible) .collective-buttons,
body:has(.notes-viewing-overlay.active) .collective-buttons-mobile,
body:has(.inventory-overlay.visible) .collective-buttons-mobile {
    display: none !important;
}

/* Hide desktop collective buttons on mobile - use mobile version instead */
@media screen and (max-width: 768px) {
    .collective-buttons {
        display: none !important;
    }
}

.collective-label {
    color: white;
    font-size: 12px;
    font-family: Arial, sans-serif;
    text-transform: lowercase;
    margin-right: 4px;
}

.collective-btn {
    background: transparent;
    color: white;
    border: 1px solid white;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-family: Arial, sans-serif;
    cursor: pointer;
    text-transform: lowercase;
    transition: background-color 0.2s ease;
}

.collective-btn:active {
    background: rgba(255, 255, 255, 0.1);
}

.collective-separator {
    color: white;
    font-size: 12px;
    font-family: Arial, sans-serif;
}

/* Mobile collective pocket button - above home/index buttons, below via name */
.collective-buttons-mobile {
    display: none;
    position: fixed;
    bottom: 58px;
    right: 20px;
    z-index: 200;
}

.collective-btn-mobile {
    background: transparent;
    color: var(--channel-accent);
    border: 1px solid var(--channel-accent);
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-family: Arial, sans-serif;
    cursor: pointer;
    text-transform: lowercase;
    transition: background-color 0.2s ease;
}

.collective-btn-mobile:active {
    background: color-mix(in srgb, var(--channel-accent) 10%, transparent);
}

/* Hide collective mobile button in landscape and on desktop */
@media screen and (orientation: landscape),
       screen and (min-width: 769px) {
    .collective-buttons-mobile {
        display: none !important;
    }
}

/* Desktop logout button - right of channel nav arrows, visible when logged in */
.desktop-logout {
    display: none;
    position: fixed;
    bottom: 25px;
    left: 235px;
    z-index: 200;
}

@media screen and (min-width: 1025px) {
    .desktop-logout.visible {
        display: block;
    }
}

/* Channel navigation arrows - desktop only */
.channel-nav-arrows {
    display: none;
}

@media screen and (min-width: 1025px) {
    .channel-nav-arrows {
        display: flex;
        flex-direction: column;
        gap: 2px;
        position: fixed;
        bottom: 25px;
        left: 200px;
        z-index: 200;
    }

    .arrow-key-btn {
        width: 24px;
        height: 20px;
        background: transparent;
        border: 1px solid var(--channel-accent);
        border-radius: 3px;
        color: var(--channel-accent);
        font-size: 10px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background-color 0.2s ease;
    }

    .arrow-key-btn:active {
        background: color-mix(in srgb, var(--channel-accent) 10%, transparent);
    }
}

/* Directory */
.directory {
    position: fixed;
    bottom: 100px;
    right: 10px;
    color: var(--channel-accent);
    font-size: 18px;
    background: rgba(0,0,0,0.8);
    padding: 10px;
    border-radius: 8px;
    z-index: 200;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.directory:active {
    background: rgba(0,0,0,0.9);
}

/* Directory dropdown */
.directory-dropdown {
    position: fixed;
    bottom: 160px;
    right: 10px;
    width: 200px;
    max-height: 300px;
    background: rgba(0,0,0,0.9);
    border-radius: 8px;
    z-index: 199;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: all 0.3s ease;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--channel-accent) transparent;
}

.directory-dropdown::-webkit-scrollbar {
    width: 6px;
}

.directory-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.directory-dropdown::-webkit-scrollbar-thumb {
    background: var(--channel-accent);
    border-radius: 3px;
}

.directory-dropdown.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.directory-item {
    color: var(--channel-accent);
    font-size: 16px;
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid color-mix(in srgb, var(--channel-accent) 20%, transparent);
    transition: background-color 0.2s ease;
}

.directory-item:last-child {
    border-bottom: none;
}

.directory-item:hover {
    background: color-mix(in srgb, var(--channel-accent) 10%, transparent);
}

.directory-item:active {
    background: color-mix(in srgb, var(--channel-accent) 20%, transparent);
}

.directory-item.current {
    background: color-mix(in srgb, var(--channel-accent) 15%, transparent);
    font-weight: bold;
}

/* Global channel directory item styling */
.directory-item.global-channel {
    color: gold;
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

.directory-item.global-channel:hover {
    background: rgba(255, 215, 0, 0.1);
}

.directory-item.global-channel:active {
    background: rgba(255, 215, 0, 0.2);
}

.directory-item.global-channel.current {
    background: rgba(255, 215, 0, 0.15);
}

.age-daily {
    position: fixed;
    bottom: 100px;
    left: 10px;
    color: var(--channel-accent);
    font-size: 18px;
    background: rgba(0,0,0,0.8);
    padding: 10px;
    border-radius: 8px;
    z-index: 350;
    opacity: 0; /* Start hidden - JS will show when appropriate */
    cursor: pointer;
}

/* Show age-daily when visible class added */
.age-daily.visible {
    opacity: 1;
}

/* Caveh folder title - centered on same line as age-daily */
.caveh-folder-title {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 18px;
    font-family: Arial, sans-serif;
    font-weight: bold;
    z-index: 350;
    pointer-events: none;
}

/* Caveh film titles below thumbnails */
.caveh-film-title {
    position: absolute;
    bottom: -20px;
    left: 0;
    right: 0;
    color: white;
    font-family: Arial, sans-serif;
    font-size: 12px;
    text-align: center;
    padding: 0 4px;
    line-height: 1.2;
}

.caveh-film-year {
    position: absolute;
    bottom: -36px;
    left: 0;
    right: 0;
    color: white;
    font-family: Arial, sans-serif;
    font-size: 12px;
    text-align: center;
    padding: 0 4px;
    line-height: 1.2;
}

/* Make video items with titles have room for the title and year */
.inventory-item.video-item:has(.caveh-film-title) {
    margin-bottom: 44px;
}

/* Swipe overlay */
.swipe-overlay {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    bottom: 120px;
    z-index: 150;
    background: transparent;
    touch-action: none;
}

/* Black bar to hide video title */
.title-blocker {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px; /* Increased from 60px */
    background: black;
    z-index: 100; /* Above video but below UI */
    pointer-events: auto; /* Block clicks */
}

/* Black bar to hide related videos at bottom */
.bottom-blocker {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to top, black 0%, black 83%, transparent 100%);
    z-index: 100; /* Above video but below UI */
    pointer-events: none;
}

/* Transparent blocker to prevent YouTube player clicks in bottom gap */
.bottom-blocker::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    pointer-events: auto; /* Block clicks */
}

/* Hide bottom blocker during screening - it blocks the mic button */
body:has(.screening-overlay:not(.hidden)) .bottom-blocker,
body.screening-active .bottom-blocker {
    display: none !important;
}

/* Swipe overlay stays visible during screening to allow channel switching */
/* Video skipping is blocked via JS, but vertical swipes for channels still work */

/* Hide title blocker during screening */
body:has(.screening-overlay:not(.hidden)) .title-blocker,
body.screening-active .title-blocker {
    display: none !important;
}

/* Video Context Menu (right-click menu) */
.video-context-menu {
    position: fixed;
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 6px 0;
    min-width: 180px;
    z-index: 10000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

.context-menu-item {
    padding: 10px 16px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s;
}

.context-menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.context-menu-item.active {
    color: var(--channel-accent, #ff0000);
}

.context-menu-item.active::before {
    content: '✓ ';
}

.context-menu-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.15);
    margin: 6px 0;
}

/* Hide blockers when subtitles mode is active */
body.subtitles-mode .title-blocker,
body.subtitles-mode .bottom-blocker {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* UPDATED: OLD landscape query for header-info - now restricted to mobile devices only */
@media screen and (orientation: landscape) and (max-width: 1024px) {
    .enlarged-overlay {
        display: none !important;
    }

    .channel-avatar-container,
    .antenna-dot,
    .header-info,
    .mobile-controls,
    .typo-controls,
    .age-daily, 
    #typoPressBtn,
    #typoIndexBtn {
        display: none !important;
    }
}
/* Hide avatar when channel index is visible */
.channel-index-overlay.visible ~ .channel-avatar-container {
    opacity: 0;
    pointer-events: none;
}

/* Show avatar when channel index is hidden */
.channel-index-overlay.hidden ~ .channel-avatar-container {
    opacity: 1;
    pointer-events: auto;
}

/* Black background only when viewing global channel */
.global-channel-active .channel-index-overlay.visible {
    background: rgba(0, 0, 0, 0.95);
}

/* Transparent background when not on global channel */
.channel-index-overlay.hidden {
    background: transparent;
}

/* FAST LOAD: Mobile-only - black background by default (starts on global channel) */
@media screen and (max-width: 1024px) {
    .channel-index-overlay {
        background: rgba(0, 0, 0, 0.95);
    }
}
@keyframes tvDistortion {
    0% {
        transform: scaleX(1.1) skewX(-3deg);
        letter-spacing: 3px;
        filter: blur(2px);
    }
    15% {
        transform: scaleX(0.95) skewX(2deg);
        letter-spacing: -1px;
        filter: blur(1px);
    }
    30% {
        transform: scaleX(1.05) skewX(-1deg);
        letter-spacing: 1px;
        filter: blur(0.5px);
    }
    50% {
        transform: scaleX(0.98) skewX(0.5deg);
        letter-spacing: 0px;
        filter: blur(0px);
    }
    100% {
        transform: scaleX(1) skewX(0deg);
        letter-spacing: 0px;
        filter: blur(0px);
    }
}
/* Enhanced channel avatar container with smooth transitions */
.channel-avatar-container {
    position: fixed;
    top: 60px;
    right: 20px;
    width: 60px;
    height: 60px;
    z-index: 250;
    cursor: pointer;
    /* UPDATED: Smooth transition for all properties including transform and opacity */
    transition: all 0.5s cubic-bezier(0.4, 0.0, 0.2, 1), 
                transform 0.5s cubic-bezier(0.4, 0.0, 0.2, 1),
                opacity 0.5s ease;
}

/* Smooth transition for blog mode */
.channel-avatar-container.blog-mode {
    opacity: 0 !important;
    pointer-events: none !important;
}


/* The actual avatar with smooth transitions */
.channel-avatar {
    position: fixed;
    top: 60px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 3px solid var(--channel-accent);
    z-index: 250;
    /* UPDATED: Smooth transition matching container */
    transition: all 0.5s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.channel-avatar.blog-mode {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Antenna stems with smooth fade */
.channel-avatar-container::before,
.channel-avatar-container::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 15px;
    background: var(--channel-accent);
    top: -15px;
    /* UPDATED: Smooth opacity transition */
    transition: opacity 0.4s ease;
}

.channel-avatar-container::before {
    left: 15px;
    transform: rotate(-20deg);
}

.channel-avatar-container::after {
    right: 15px;
    transform: rotate(20deg);
}

/* Hide antenna stems smoothly in blog mode */
.channel-avatar-container.blog-mode::before,
.channel-avatar-container.blog-mode::after {
    opacity: 0;
}

/* Antenna dots with smooth transitions */
.antenna-dot {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--channel-accent);
    border-radius: 50%;
    top: -19px;
    z-index: 251;
    opacity: 0; /* Start hidden - JS shows when appropriate */
    /* UPDATED: Smooth opacity transition */
    transition: opacity 0.4s ease;
}

.antenna-dot.left {
    left: 11px;
}

.antenna-dot.right {
    right: 11px;
}

.antenna-dot.hidden {
    opacity: 0;
}

/* Active click feedback - keep snappy */
.channel-avatar-container:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
}

/* Position global channel info lower - aligned with top typo controls */
.channel-info-display.global-channel {
    bottom: 55px; /* Same as typo-controls bottom position */
}
/* Navigation Instructions */
.nav-instructions {
    display: none;
}

.nav-instruction-line {
    opacity: 1;
    transition: opacity 0.5s ease;
}

.nav-instruction-line.hidden {
    opacity: 0;
}

/* Hide instructions in inventory mode */
.inventory-overlay.visible ~ .nav-instructions {
    opacity: 0;
}

/* Hide instructions when channel index is open */
.channel-index-overlay.visible ~ .nav-instructions {
    opacity: 0;
}

/* Hide instructions when viewing items */
.channel-avatar-container.item-viewing ~ .nav-instructions {
    opacity: 0;
}

/* Hide in landscape mode on mobile */
@media screen and (orientation: landscape) and (max-width: 1024px) {
    .nav-instructions {
        display: none !important;
    }
}

/* Desktop instructions - different text */
@media screen and (min-width: 1025px) {
    .nav-instructions {
        font-size: 12px;
    }
    
    /* Horizontal layout for channel info links on desktop */
    .channel-info-links {
        flex-direction: row;
        gap: 12px;
    }

    /* Desktop inventory grid - larger images with row gaps */
    .inventory-content {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px 0px; /* row-gap column-gap */
        align-content: start;
        padding: 200px 40px 200px 40px;
        grid-auto-rows: 200px;
        overflow: visible;
        height: auto;
        min-height: 100%;
    }
    
    /* Items flow naturally into all 4 columns */
    .inventory-content .inventory-item {
        grid-column: auto;
    }
    
    /* Much larger images that fill cells and touch */
    .inventory-item.image-item {
        width: 100%;
        height: 200px; /* Reduced from 350px for faster loading */
        max-width: none;
        max-height: none;
        min-width: 0;
        min-height: 0;
        box-shadow: none;
    }
    
    .inventory-item-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    /* Remove hover effects that might add spacing */
    .inventory-item:hover {
        transform: none;
        box-shadow: none;
    }

    /* Remove extra margin from video items with titles */
    .inventory-item.video-item:has(.caveh-film-title) {
        margin-bottom: 0;
    }
    
    /* Larger PDFs for desktop */
    .inventory-item.pdf-item-large {
        width: 200px;
        min-height: 250px;
    }
    
    .inventory-item.single-glow.pdf-item-large {
        width: 250px;
        min-height: 300px;
    }
    
    .inventory-item-pdf-title {
        font-size: 14px;
        max-width: 200px;
    }
}
.channel-info-pocket {
    font-size: 12px;
    opacity: 0.8;
    text-decoration: underline;
    cursor: pointer;
    display: block;
    transition: opacity 0.3s ease;
    pointer-events: auto;
    position: relative;
    z-index: 250;
    padding: 8px;
    margin: -8px;
}

.channel-info-pocket:hover {
    opacity: 1;
}

.channel-info-pocket:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.channel-info-pocket.item-viewing {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Screening toggle button - appears below pocket/canvas links */
.channel-info-screening-toggle {
    font-size: 12px;
    opacity: 0.8;
    text-decoration: underline;
    cursor: pointer;
    display: block;
    transition: opacity 0.3s ease;
    pointer-events: auto;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    z-index: 250;
    padding: 8px;
    white-space: nowrap;
}

.channel-info-screening-toggle:hover {
    opacity: 1;
}

.channel-info-screening-toggle:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

/* Caveh-specific links row - positioned below channel info */
.caveh-links {
    position: absolute;
    top: 100%;
    right: 0;
    display: none;
    gap: 16px;
    margin-top: 1px;
    pointer-events: auto;
}

/* External link - now shown in channel info, hide from avatar hover */
.avatar-hover-external-link {
    display: none !important;
}

/* Custom channel-specific links (e.g., Caveh's TV/Film) */
.channel-info-custom {
    font-size: 12px;
    opacity: 0.8;
    text-decoration: underline;
    cursor: pointer;
    position: relative;
    z-index: 250;
    padding: 8px;
    pointer-events: auto;
}

.channel-info-custom:hover {
    opacity: 1;
}

.channel-info-custom:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

/* Desktop-specific: Simple fade for avatar transitions */
@media screen and (min-width: 1025px) {
    .channel-avatar-container {
        /* Remove position transitions on desktop - only fade */
        transition: opacity 0.3s ease !important;
    }
    
    .channel-avatar-container.blog-mode {
        /* Instant position change, only fade */
        transition: opacity 0.3s ease, 
                    top 0s, 
                    left 0s, 
                    right 0s, 
                    width 0s, 
                    height 0s !important;
    }
    
    .channel-avatar {
        /* Desktop: Only fade, no position animation */
        transition: opacity 0.3s ease !important;
    }
    
    .channel-avatar.blog-mode {
        /* Instant position change, only fade */
        transition: opacity 0.3s ease, 
                    border-radius 0.3s ease,
                    top 0s, 
                    left 0s, 
                    right 0s, 
                    width 0s, 
                    height 0s !important;
    }
    
    /* Remove the scale effect on active for desktop */
    .channel-avatar-container:active {
        transform: none !important;
    }
}


    }
}

}

.desktop-episode-title-line2 {
    display: block;
    margin-top: 4px;
}

/* Show desktop version only on desktop */
@media screen and (min-width: 1025px) {
    .mobile-now-playing {
        display: none !important;
    }
    
    .desktop-episode-title {
        display: block;
    }
}

/* OLD episode title in channel info - REMOVE */
.channel-episode-title {
    display: none !important;
}

/* ===== DESKTOP: Episode Title Display ===== */
/* Title appears in upper left corner */
.desktop-episode-title {
    position: fixed;
    left: 20px;
    top: 50%; transform: translateY(-50%);
    z-index: 300;
    color: white;
    font-size: 120px;
    font-style: italic;
    font-family: 'Times New Roman', Times, serif;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    max-width: calc(100vw - 200px);
    word-wrap: break-word;
    display: none;
}

.desktop-episode-title.visible {
    opacity: 1;
}

/* Episode number appears in channel info (lower right) */
.channel-episode-number {
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    text-align: right;
    margin-top: 8px;
    display: none;
}

/* Show desktop version only on desktop */
@media screen and (min-width: 1025px) {
    .mobile-now-playing {
        display: none !important;
    }
    
    .desktop-episode-title {
        display: block;
    }
}

/* OLD episode title in channel info - REMOVE */
.channel-episode-title {
    display: none !important;
}

/* ===== MOBILE: Now Playing Display ===== */
/* ===== DESKTOP: Episode Title Display ===== */
.desktop-episode-title {
    position: fixed;
    left: 20px;
    top: 50%; transform: translateY(-50%);
    z-index: 300;
    color: white;
    font-size: 120px;
    font-style: italic;
    font-family: 'Times New Roman', Times, serif;
    line-height: 1.2;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    max-width: calc(100vw - 200px);
    word-wrap: break-word;
    display: none;
}

.desktop-episode-title.visible {
    opacity: 1;
}

.desktop-episode-line1 {
    display: block;
}

.desktop-episode-line2 {
    display: block;
}

/* Desktop-specific rules */
@media screen and (min-width: 1025px) {
    .mobile-now-playing {
        display: none !important;
    }
    
    .desktop-episode-title {
        display: block;
    }
    
    /* Hide channel info when index is open */
    body.index-open .channel-info-display {
        display: none !important;
    }
}

/* Remove old styles */
.channel-episode-title,
.channel-episode-number {
    display: none !important;
}

/* ==================== SHOP OVERLAY ==================== */
.shop-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 180;
    display: none;
    pointer-events: none;
}

.shop-overlay.visible {
    display: block;
}

/* Safari Desktop - hide channel index immediately, show shop overlay */
html.safari-desktop .channel-index-overlay {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Hide the small "age daily | TV" badge immediately on Safari Desktop */
html.safari-desktop .age-daily {
    display: none !important;
}

/* Only show shop overlay on Safari Desktop for global/home page, not profile pages */
html.safari-desktop:not(.direct-channel-link) .shop-overlay {
    display: block !important;
    background: black;
    z-index: 250;
    pointer-events: auto;
}

/* Safari entry mode - shop overlay with black background */
.shop-overlay.safari-entry {
    background: black;
    z-index: 250;
    pointer-events: auto;
}

/* Hide navigation UI during Safari entry */
body.safari-entry-mode .channel-info-display,
body.safari-entry-mode .mobile-channel-arrows,
body.safari-entry-mode .typo-controls,
body.safari-entry-mode #homeIndexButtons,
body.safari-entry-mode .owner-buttons,
body.safari-entry-mode .channel-index-overlay {
    display: none !important;
}

/* Hide the small "age daily | TV" badge during Safari entry */
body.safari-entry-mode .age-daily {
    display: none !important;
}

/* Safari entry - static left sidebar */
.safari-entry-static {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 320px;
    height: 100vh;
    padding: 60px 40px;
    box-sizing: border-box;
    z-index: 300;
    flex-direction: column;
}

body.safari-entry-mode .safari-entry-static {
    display: flex;
}

/* Safari entry title - in static sidebar */
.safari-entry-title {
    display: none;
    color: white;
    font-size: 72px;
    font-family: 'Times New Roman', Times, serif;
    font-style: italic;
    margin-bottom: 10px;
}

/* Show Safari entry title only during Safari entry mode */
body.safari-entry-mode .safari-entry-title {
    display: flex;
}

/* Birth year - below Age Daily in static sidebar */
.safari-entry-birth {
    display: none;
    color: rgba(255, 255, 255, 0.5);
    font-family: Arial, sans-serif;
    font-size: 14px;
    margin-bottom: auto;
}

body.safari-entry-mode .safari-entry-birth {
    display: block;
}

/* Safari scrollable catalog */
.safari-catalog {
    display: none;
    position: fixed;
    top: 0;
    left: 320px;
    right: 460px; /* Leave space for featured image (380px + margins) */
    bottom: 0;
    overflow-y: auto;
    padding: 60px 40px 120px 40px;
    box-sizing: border-box;
    z-index: 301;
}

body.safari-entry-mode .safari-catalog {
    display: block;
}

/* Two-column grid for catalog entries */
.safari-catalog-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px 40px;
}

/* Catalog entry - each cell in grid */
.safari-catalog-entry {
    display: flex;
    flex-direction: column;
}

/* Cover cell - substantial size in grid */
.safari-catalog-cover {
    width: 280px;
    aspect-ratio: 0.7;
    background: white;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.safari-catalog-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Info cell */
.safari-catalog-info {
    padding: 10px 0;
}

.safari-catalog-author {
    font-family: 'Times New Roman', Times, serif;
    font-style: italic;
    font-size: 36px;
    color: white;
    line-height: 1;
    margin-bottom: 8px;
}

.safari-catalog-title {
    font-family: 'Times New Roman', Times, serif;
    font-style: italic;
    font-size: 18px;
    color: white;
    margin-bottom: 10px;
}

.safari-catalog-description {
    font-family: Georgia, serif;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
    margin-top: 15px;
    margin-bottom: 0;
}

.safari-catalog-thumbs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.safari-catalog-thumb {
    width: 50px;
    height: 70px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
    cursor: pointer;
    transition: opacity 0.2s;
}

.safari-catalog-thumb:hover {
    opacity: 0.8;
}

.safari-catalog-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Static featured image area on right - larger than covers */
.safari-featured-static {
    display: none;
    position: fixed;
    top: 60px;
    right: 40px;
    width: 380px;
    bottom: 40px;
    z-index: 302;
}

body.safari-entry-mode .safari-featured-static {
    display: block;
}

.safari-featured-static img {
    width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

/* Featured stack - scrollable column of previews */
.safari-featured-stack {
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow-y: auto;
    max-height: 100%;
}

.safari-featured-item {
    cursor: pointer;
    transition: opacity 0.2s;
}

.safari-featured-item:hover {
    opacity: 0.85;
}

.safari-featured-item img {
    width: 100%;
    height: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

/* Enlarged image overlay - scrollable stack */
.safari-enlarged-overlay {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 340px;
    right: 0;
    background: black;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.safari-enlarged-overlay.scrollable {
    padding: 0;
}

.safari-enlarged-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.safari-enlarged-item {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-height: 100vh;
    padding: 40px;
    box-sizing: border-box;
}

.safari-enlarged-item img {
    max-width: 100%;
    max-height: calc(100vh - 80px);
    object-fit: contain;
}

.safari-enlarged-close {
    position: fixed;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 32px;
    font-weight: 200;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    width: 40px;
    height: 40px;
    z-index: 10001;
}

.safari-enlarged-close:hover {
    color: white;
}

/* Add to cart button in catalog */
.safari-add-cart-btn {
    margin-top: 15px;
    padding: 10px 20px;
    background: white;
    color: black;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
}

.safari-add-cart-btn:hover {
    opacity: 0.85;
}

/* TV button in catalog (below Compact's add to cart) */
.safari-tv-btn {
    display: block;
    margin-top: 30px;
    margin-left: 40px;
    padding: 8px 16px;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.safari-tv-btn:hover {
    color: white;
    border-color: rgba(255, 255, 255, 0.6);
}

/* Hide old shop elements in Safari entry mode */
body.safari-entry-mode .shop-featured,
body.safari-entry-mode .shop-featured-info,
body.safari-entry-mode .shop-backlist {
    display: none !important;
}

/* Position contact info in left static column during Safari entry */
body.safari-entry-mode .contact-email {
    display: block !important;
    position: fixed !important;
    left: 40px !important;
    right: auto !important;
    bottom: 40px !important;
    top: auto !important;
    transform: none !important;
}

body.safari-entry-mode .maintained-by {
    display: block !important;
    position: fixed !important;
    left: 40px !important;
    right: auto !important;
    bottom: 60px !important;
    top: auto !important;
    transform: none !important;
}

/* Toggle positioned midway between Age Daily and maintained-by */
body.safari-entry-mode .shop-tv-toggle {
    bottom: 120px !important;
}

/* In TV mode, position toggle near bottom left */
body.global-channel-active:not(.safari-entry-mode) .shop-tv-toggle {
    bottom: 40px;
}

/* Cart positioned below contact email in Safari entry mode */
body.safari-entry-mode #shopCart {
    position: fixed !important;
    left: 40px !important;
    right: auto !important;
    top: calc(50% + 30px) !important;
    bottom: auto !important;
    width: 240px !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Safari TV link - in static sidebar at bottom */
.safari-tv-link {
    display: none;
    position: fixed;
    bottom: 60px;
    left: 40px;
    color: white;
    cursor: pointer;
    z-index: 9999;
    pointer-events: auto !important;
    text-decoration: none;
    opacity: 0.8;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.safari-tv-link:hover {
    opacity: 1;
}

/* "& see:" text */
.safari-tv-ampersand {
    font-family: Arial, sans-serif;
    font-size: 14px;
}

/* Row with circle and network text */
.safari-tv-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* TV circle - larger with A.D / T.V text */
.tv-circle {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 60px;
    height: 60px;
    border: 2px solid white;
    border-radius: 50%;
    font-family: Arial, sans-serif;
    font-weight: bold;
    line-height: 1.1;
}

.tv-circle-ad {
    font-size: 14px;
    letter-spacing: 1px;
}

.tv-circle-tv {
    font-size: 14px;
    letter-spacing: 1px;
}

/* Left antenna (rabbit ear) */
.tv-circle::before {
    content: '';
    position: absolute;
    width: 2px;
    height: 16px;
    background: white;
    top: -14px;
    left: 14px;
    transform: rotate(-30deg);
    transform-origin: bottom center;
}

/* Right antenna (rabbit ear) */
.tv-circle::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 16px;
    background: white;
    top: -14px;
    right: 14px;
    transform: rotate(30deg);
    transform-origin: bottom center;
}

/* "Collective Curatorial Network" text - to the right of circle, italic Times */
.safari-tv-network {
    font-family: "Times New Roman", Times, serif;
    font-style: italic;
    font-size: 13px;
    white-space: nowrap;
    margin-left: 4px;
}

/* Show TV link during Safari entry */
body.safari-entry-mode .safari-tv-link {
    display: inline-flex !important;
}

/* Fix shop-featured-info position for Safari entry - more space from image */
.shop-overlay.safari-entry .shop-featured-info {
    right: 1080px;
}

/* Featured book section - positioned left of Age Daily title */
.shop-featured {
    position: absolute;
    top: 60px;
    right: 560px;
    bottom: 120px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    pointer-events: auto;
}

.shop-author-name {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    align-self: flex-start;
    margin-right: 15px;
}

.shop-author-name span {
    font-family: 'Times New Roman', Times, serif;
    font-style: italic;
    font-size: 120px;
    color: white;
    line-height: 0.9;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.shop-featured-cover {
    position: relative;
    top: auto;
    right: auto;
    width: auto;
    height: 85%;
    aspect-ratio: 0.7;
    background: white;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    flex-shrink: 0;
    align-self: flex-start;
    z-index: auto;
}

.shop-featured-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Small size variant for smaller books */
.shop-featured-cover.small {
    height: 65%;
    aspect-ratio: 0.71; /* 105x148mm ratio */
}

.shop-featured-cover.small img {
    object-fit: contain;
}

/* Spread mode - horizontal images cover the right side */
.shop-featured-cover.spread {
    position: fixed;
    top: 60px;
    right: 20px;
    width: auto;
    height: 85%;
    aspect-ratio: auto;
    z-index: 190;
}

.shop-featured-cover.spread img {
    width: auto;
    height: 100%;
    object-fit: contain;
}

/* Hide Age Daily title and author name when spread is showing */
body.shop-spread-mode .global-channel-title {
    display: none !important;
}

body.shop-spread-mode .shop-author-name {
    display: none !important;
}

.shop-featured-info {
    position: absolute;
    bottom: 140px;
    right: 1020px;
    max-width: 220px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: auto;
}

.shop-featured-title {
    font-family: 'Times New Roman', Times, serif;
    font-style: italic;
    font-size: 20px;
    color: white;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.shop-featured-description {
    font-family: Georgia, serif;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
}

/* Preview thumbnails */
.shop-preview-thumbs {
    display: flex;
    gap: 6px;
    margin-top: 10px;
}

.shop-preview-thumb {
    width: 45px;
    height: 64px;
    background: white;
    cursor: pointer;
    overflow: hidden;
    opacity: 0.5;
    transition: opacity 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.shop-preview-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.shop-preview-thumb:hover {
    opacity: 0.9;
}

.shop-preview-thumb.active {
    opacity: 1;
    box-shadow: 0 0 0 2px white, 0 3px 10px rgba(0, 0, 0, 0.4);
}

.shop-buy-link {
    font-family: 'Times New Roman', Times, serif;
    font-style: italic;
    font-size: 16px;
    color: white;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    padding-bottom: 2px;
    margin-top: 10px;
    align-self: flex-start;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
}

.shop-buy-link:hover {
    border-color: white;
}

.shop-buy-link.disabled {
    pointer-events: none;
    cursor: default;
    opacity: 0.7;
    border-bottom-style: dashed;
}

/* Shop tagline - in bottom black bar, aligned with Add to Cart */
.shop-tagline {
    position: absolute;
    bottom: 40px;
    left: calc(100% - 1020px - 220px);
    font-family: Arial, sans-serif;
    font-style: italic;
    font-size: 12px;
    color: white;
    pointer-events: none;
}

/* Shop established - in bottom black bar, aligned with right edge of featured image */
.shop-established {
    position: absolute;
    bottom: 40px;
    right: 560px;
    font-family: Arial, sans-serif;
    font-size: 12px;
    color: white;
    pointer-events: none;
}

/* Shop A.D. label - in bottom black bar, just right of featured image */
.shop-ad-label {
    position: absolute;
    bottom: 40px;
    left: calc(100% - 555px);
    font-family: Arial, sans-serif;
    font-size: 12px;
    color: white;
    pointer-events: none;
}

/* Hide tagline, established, A.D. label, notice, maintained-by, and contact-email on mobile */
@media screen and (max-width: 768px) {
    .shop-tagline,
    .shop-established,
    .shop-ad-label,
    .shop-notice,
    .maintained-by,
    .contact-email {
        display: none !important;
    }
}

/* Backlist items - positioned below Age Daily title */
.shop-backlist {
    position: absolute;
    top: 50%;
    right: 60px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px 30px;
    max-width: 460px;
    pointer-events: auto;
}

.shop-backlist-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.shop-backlist-cover {
    width: 70px;
    height: 100px;
    background: white;
    background-size: cover;
    background-position: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.shop-backlist-info {
    max-width: 120px;
}

.shop-backlist-title {
    font-family: 'Times New Roman', Times, serif;
    font-style: italic;
    font-size: 14px;
    color: white;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
    margin-bottom: 4px;
}

.shop-backlist-author {
    font-family: Georgia, serif;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
}

.shop-notice {
    position: absolute;
    bottom: 40px;
    right: 280px;
    font-family: Arial, sans-serif;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    pointer-events: none;
}

/* Desktop login button (home channel only when not logged in) */
.desktop-login {
    display: none;
    position: fixed;
    bottom: 25px;
    left: 129px;
    z-index: 200;
}

/* Show by default on desktop when on home/global channel */
@media screen and (min-width: 1025px) {
    html.global-channel-active .desktop-login {
        display: block;
    }
}

/* Mobile shop overlay */
@media screen and (max-width: 1024px) {
    .shop-featured {
        top: auto;
        bottom: 200px;
        right: 20px;
        left: 20px;
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .shop-author-name {
        align-items: center;
        text-align: center;
    }

    .shop-author-name span {
        font-size: 40px;
    }

    .shop-featured-cover {
        width: 180px;
        height: 260px;
    }

    .shop-featured-info {
        text-align: center;
        align-items: center;
    }

    .shop-preview-thumbs {
        justify-content: center;
    }

    .shop-buy-link {
        align-self: center;
    }

    .shop-backlist {
        top: auto;
        bottom: 80px;
        right: 20px;
        left: 20px;
        justify-content: center;
    }

    .shop-backlist-cover {
        width: 50px;
        height: 72px;
    }

    .shop-backlist-info {
        max-width: 80px;
    }

    .shop-backlist-title {
        font-size: 12px;
    }

    .shop-backlist-author {
        font-size: 10px;
    }
}

/* Hide shop on mobile */
@media screen and (max-width: 768px) {
    .shop-overlay,
    .shop-cart,
    .shop-mobile-grid,
    .shop-mobile-expanded,
    .shop-mobile-cart-icon,
    .shop-mobile-cart-overlay {
        display: none !important;
    }
}

/* Hide mobile shop elements on desktop */
.shop-mobile-grid,
.shop-mobile-expanded,
.shop-mobile-cart-icon,
.shop-mobile-cart-overlay {
    display: none;
}

/* Shopping Cart */
.shop-cart {
    position: fixed;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 12px;
    min-width: 200px;
    max-width: 280px;
    z-index: 1001;
    display: none;
    font-family: Arial, sans-serif;
}

/* Cart visibility is now controlled by JS based on items in cart */

.shop-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.shop-cart-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

.shop-cart-items {
    max-height: 200px;
    overflow-y: auto;
}

.shop-cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 13px;
}

.shop-cart-item:last-child {
    border-bottom: none;
}

.shop-cart-item-name {
    flex: 1;
    margin-right: 10px;
}

.shop-cart-item-remove {
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    font-size: 16px;
    padding: 0 5px;
}

.shop-cart-item-remove:hover {
    color: white;
}

.shop-cart-footer {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.shop-checkout-btn {
    width: 100%;
    padding: 10px;
    background: white;
    color: black;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.shop-checkout-btn:hover {
    opacity: 0.9;
}

.shop-cart-empty {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    text-align: center;
    padding: 10px 0;
}

/* Mobile cart adjustments */
@media (max-width: 768px) {
    .shop-cart {
        bottom: 10px;
        left: 10px;
        right: 10px;
        max-width: none;
    }
}

/* Folder item styling in inventory grid */
.inventory-item.folder-item {
    background: transparent;
    border: none;
    box-shadow: none;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.inventory-item.folder-item:hover {
    box-shadow: none;
}

.inventory-item.folder-item::before {
    content: "📁";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    opacity: 0.8;
}

.inventory-item.folder-item .inventory-item-name {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    text-align: center;
    background: rgba(0, 0, 0, 0.8);
    padding: 8px;
    font-size: 14px;
    z-index: 1;
}

/* Mobile-specific: Remove glowing box and position name closer to icon */
@media screen and (max-width: 1024px) {
    .inventory-item.folder-item {
        background: transparent;
        border: none;
        box-shadow: none;
    }
    
    .inventory-item.folder-item:hover {
        box-shadow: none;
    }
    
    .inventory-item.folder-item .inventory-item-name {
        position: absolute;
        top: 55%;
        bottom: auto;
        left: 50%;
        transform: translateX(-50%);
        background: transparent;
        padding: 4px 8px;
        font-size: 14px;
        white-space: normal;
        width: auto;
        max-width: 120px;
        text-align: center;
        line-height: 1.3;
    }
}

/* Video thumbnail styling in inventory grid */
.inventory-item.video-item {
    background-size: cover;
    background-position: center;
    position: relative;
    width: 150px;
    height: 150px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

/* Small play icon in bottom right of thumbnail */
.inventory-item.video-item::before {
    content: "▶";
    position: absolute;
    bottom: 8px;
    right: 8px;
    font-size: 16px;
    color: white;
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
    opacity: 0.9;
    z-index: 2;
}

/* Episode number below thumbnail */
.inventory-item.video-item .inventory-item-name {
    position: absolute;
    bottom: -25px;
    left: 0;
    right: 0;
    background: transparent;
    padding: 4px;
    font-size: 12px;
    text-align: center;
    color: white;
    z-index: 1;
}

/* Movie items - same dimensions as video items */
.inventory-item.movie-item {
    background-size: cover;
    background-position: center;
    position: relative;
    width: 150px;
    height: 150px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.inventory-item.movie-item::before {
    content: "▶";
    position: absolute;
    bottom: 8px;
    right: 8px;
    font-size: 16px;
    color: white;
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
    opacity: 0.9;
    z-index: 2;
}

.inventory-item.movie-item .inventory-item-name {
    position: absolute;
    bottom: -25px;
    left: 0;
    right: 0;
    background: transparent;
    padding: 4px;
    font-size: 12px;
    text-align: center;
    color: white;
    z-index: 1;
}

/* Folder breadcrumb */
.folder-breadcrumb {
    position: fixed;
    top: 140px;
    left: 20px;
    color: white;
    font-size: 14px;
    z-index: 290;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
    -webkit-appearance: none;
    appearance: none;
}

.folder-breadcrumb:hover {
    opacity: 1;
    background: transparent;
    box-shadow: none;
}

/* Desktop: All items same size */
@media screen and (min-width: 1025px) {
    .inventory-item.image-item,
    .inventory-item.video-item,
    .inventory-item.movie-item,
    .inventory-item.text-item,
    .inventory-item.pdf-item-large,
    .inventory-item.folder-item,
    .inventory-item.album-item {
        width: 200px;
        height: 200px;
    }

    /* PDF items should be vertically centered (they're smaller) */
    .inventory-item.pdf-item-large {
        align-self: center;
    }
}

/* Mobile: All items same size */
@media screen and (max-width: 1024px) {
    .inventory-item.image-item,
    .inventory-item.video-item,
    .inventory-item.movie-item,
    .inventory-item.text-item,
    .inventory-item.pdf-item-large,
    .inventory-item.folder-item,
    .inventory-item.album-item {
        width: 80px;
        height: 80px;
    }

    /* Hide video/movie labels on mobile */
    .inventory-item.video-item .inventory-item-name,
    .inventory-item.movie-item .inventory-item-name {
        display: none;
    }

    /* PDF items should be vertically centered on mobile too */
    .inventory-item.pdf-item-large {
        align-self: center;
    }
}
/* Mobile Now Playing Display - Three lines in upper left */
/* Mobile Episode Display - positioned across from channel avatar */
.mobile-now-playing {
    display: none;
    position: fixed;
    top: 60px;
    left: 20px;
    z-index: 200;
    text-align: left;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    max-width: calc(100vw - 120px); /* Leave room for avatar on right */
}

.mobile-now-playing.visible {
    opacity: 1;
}

.mobile-episode-title {
    font-size: 28px;
    font-family: 'Times New Roman', Times, serif;
    font-style: italic;
    color: white;
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
    line-height: 1.2;
    margin-bottom: 4px;
}

.mobile-episode-number {
    font-size: 16px;
    color: white;
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
}

/* Only show on mobile */
@media screen and (max-width: 1024px) {
    .mobile-now-playing {
        display: block;
    }
    
    /* Hide in landscape or when index is open */
    body.landscape-mode .mobile-now-playing,
    body.index-open .mobile-now-playing {
        display: none !important;
    }
}

/* ===== DESKTOP: Avatar Hover Display ===== */
/* Highlight info appears below avatar on hover */
.avatar-hover-highlight {
    display: none;
    position: fixed;
    top: 130px;
    right: 20px;
    color: white;
    font-size: 14px;
    text-align: right;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
    z-index: 249;
    max-width: 300px;
}

.avatar-hover-highlight .highlight-label {
    font-weight: normal;
    margin-bottom: 4px;
    color: var(--channel-accent);
}

.avatar-hover-highlight .highlight-title {
    font-weight: bold;
    text-decoration: underline;
    margin-bottom: 2px;
}

.avatar-hover-highlight .highlight-type {
    font-style: italic;
    font-weight: normal;
    opacity: 0.9;
    margin-bottom: 2px;
}

.avatar-hover-highlight .highlight-date-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 12px;
    color: var(--channel-accent);
}

.avatar-hover-highlight .highlight-star {
    font-size: 14px;
}

.avatar-hover-highlight .highlight-date {
    font-weight: normal;
}

.avatar-hover-highlight .highlight-time {
    color: var(--channel-accent);
    font-weight: normal;
}

/* Desktop only - show hover elements */
@media screen and (min-width: 1025px) {
    .avatar-hover-highlight {
        display: block;
    }

    .avatar-hover-external-link {
        display: block;
        top: 280px;
    }

    /* COMMENTED OUT: TV shape experiment - to revisit later
    .channel-avatar-container::after {
        content: '';
        position: fixed;
        top: 20px;
        right: -1px;
        width: 120px;
        height: 160px;
        pointer-events: none;
        z-index: 248;
        clip-path: polygon(
            0% 0%,
            100% 0%,
            100% 100%,
            94% 100%,
            94% 94%,
            6% 94%,
            6% 100%,
            0% 100%
        );
    }

    .channel-avatar-container::before {
        content: '';
        position: fixed;
        top: -50px;
        left: auto;
        right: 39px;
        width: 60px;
        height: 70px;
        background: var(--channel-accent);
        pointer-events: none;
        z-index: 247;
        transform: none;
        clip-path: polygon(
            46% 100%,
            0% 0%,
            8% 0%,
            48% 90%,
            52% 90%,
            92% 0%,
            100% 0%,
            54% 100%
        );
    }

    .channel-avatar-container:hover::after {
        pointer-events: auto;
    }
    */

    /* Show elements on container hover */
    .channel-avatar-container:hover .avatar-hover-highlight,
    .channel-avatar-container:hover .avatar-hover-external-link {
        opacity: 1;
        pointer-events: auto;
    }

    /* Keep external link visible when hovering it directly */
    .avatar-hover-external-link:hover {
        opacity: 1;
        pointer-events: auto;
    }

    /* Hide hover elements when inventory/index is open or item viewing */
    .channel-avatar-container.item-viewing .avatar-hover-highlight,
    .channel-avatar-container.item-viewing .avatar-hover-external-link,
    .inventory-overlay.visible ~ .channel-avatar-container .avatar-hover-highlight,
    .inventory-overlay.visible ~ .channel-avatar-container .avatar-hover-external-link,
    .channel-index-overlay.visible ~ .channel-avatar-container .avatar-hover-highlight,
    .channel-index-overlay.visible ~ .channel-avatar-container .avatar-hover-external-link {
        display: none !important;
    }
}

/* ============================================================================
   NOTES VIEWING MODE
   ============================================================================ */

.notes-viewing-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5; /* Same as pocket - above player, below UI controls */
    background: black;
    display: none;
    user-select: text;
    -webkit-user-select: text;
    touch-action: manipulation;
}

.notes-viewing-overlay.active {
    display: block;
}

/* White background mode for canvas */
.notes-viewing-overlay.white-bg {
    background: #ffffff;
}

.notes-viewing-overlay.white-bg .notes-island-text,
.notes-viewing-overlay.white-bg .notes-rich-content,
.notes-viewing-overlay.white-bg .notes-island-transcription {
    color: #111111;
}

.notes-viewing-overlay.white-bg .notes-close-btn {
    color: rgba(0, 0, 0, 0.3);
}

.notes-viewing-overlay.white-bg .notes-close-btn:hover {
    color: rgba(0, 0, 0, 0.6);
}

.notes-viewing-overlay.white-bg .note-edit-btn,
.notes-viewing-overlay.white-bg .note-delete-btn {
    background: rgba(220, 220, 220, 0.9);
    color: #333;
    border-color: rgba(0, 0, 0, 0.2);
}

.notes-viewing-overlay.white-bg .inline-edit-toolbar {
    background: rgba(240, 240, 240, 0.95);
    border-color: rgba(0, 0, 0, 0.2);
}

.notes-viewing-overlay.white-bg .inline-edit-btn {
    color: #333;
}

/* Canvas tabs in white canvas mode (container is at body level) */
body:has(.notes-viewing-overlay.white-bg) .canvas-tab {
    color: rgba(0, 0, 0, 0.5);
}

body:has(.notes-viewing-overlay.white-bg) .canvas-tab:hover {
    color: rgba(0, 0, 0, 0.8);
}

body:has(.notes-viewing-overlay.white-bg) .canvas-tab.active {
    color: #111;
    border-bottom-color: #111;
}

/* Channel info in white canvas mode */
.channel-info.canvas-white-bg,
.channel-info.canvas-white-bg .channel-info-name,
.channel-info.canvas-white-bg .channel-info-links,
.channel-info.canvas-white-bg .channel-info-pocket,
.channel-info.canvas-white-bg .channel-info-notes,
.channel-info.canvas-white-bg .channel-info-about {
    color: #111111 !important;
}

/* Bottom blocker in white canvas mode */
.swipe-overlay-blocker.canvas-white-bg {
    background: linear-gradient(to top, #ffffff 0%, rgba(255, 255, 255, 0) 100%) !important;
}

/* Transparent canvas background - hide blocker */
.swipe-overlay-blocker.canvas-transparent-bg {
    display: none !important;
}

/* Semi-transparent notes during screening - must be above screening overlay */
.notes-viewing-overlay.screening-active {
    background: rgba(0, 0, 0, 0.85);
    z-index: 99998; /* Above screening overlay (z-index: 6) */
}

/* Hide swipe overlay when notes are active */
.notes-viewing-overlay.active ~ .swipe-overlay,
body:has(.notes-viewing-overlay.active) .swipe-overlay,
.pocket-viewing-overlay.active ~ .swipe-overlay,
body:has(.pocket-viewing-overlay.active) .swipe-overlay {
    pointer-events: none;
}

/* Hide title blocker when pocket viewing is active (especially for PDFs on mobile) */
body:has(.pocket-viewing-overlay.active) .title-blocker {
    display: none;
}

/* Hide title blocker when notes viewing is active (for layers button visibility) */
body:has(.notes-viewing-overlay.active) .title-blocker {
    display: none;
}

/* Hide avatar and hover elements when notebook is open */
body:has(.notes-viewing-overlay.active) .channel-avatar-container {
    display: none !important;
}

/* Close button - subtle, upper-right */
.notes-close-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 20;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.3);
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
    line-height: 1;
    transition: color 0.2s ease;
}

.notes-close-btn:hover {
    color: rgba(255, 255, 255, 0.7);
}

/* =========================
   MOBILE: Single Note View
   ========================= */

.notes-mobile-view {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    z-index: 1; /* Below canvas tabs */
}

.notes-mobile-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: safe center;
    padding: 40px 25px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    /* For swipe animations */
    will-change: transform, opacity;
    position: relative;
}

/* Mobile note delete button - positioned relative to the voice memo */
.notes-mobile-delete {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #c83c3c;
    border: 2px solid white;
    color: white;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.notes-mobile-delete.visible {
    opacity: 1;
    pointer-events: auto;
}

.notes-mobile-delete:active {
    background: rgba(220, 40, 40, 1);
    transform: scale(0.95);
}

/* Selected state for mobile voice notes - subtle highlight on inner content */
.notes-mobile-voice.selected .notes-mobile-voice-word,
.notes-mobile-audio-only.selected .notes-mobile-audio-icon {
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

/* Text note on mobile - matches pocket-text-content styling */
.notes-mobile-text {
    max-width: 800px;
    max-height: 90vh;
    color: white;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 20px;
    line-height: 1.7;
    text-align: center;
    padding: 20px;
}

/* Editable mobile note styling */
.notes-mobile-text[contenteditable="true"]:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.notes-mobile-text[contenteditable="true"]:hover {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
}

/* Rich note on mobile (embedded images + text) */
.notes-mobile-rich {
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    color: white;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 20px;
    line-height: 1.7;
    text-align: left;
    padding: 20px;
}

.notes-mobile-rich img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 10px 0;
    display: block;
}

/* Image note on mobile */
.notes-mobile-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 90vw;
    max-height: 80vh;
}

.notes-mobile-image img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    image-rendering: auto;
    image-rendering: -webkit-optimize-contrast;
    filter: grayscale(1) contrast(1.2) invert(1);
}

/* Voice note on mobile - single word display */
.notes-mobile-voice {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    position: relative;
}

/* Date and duration label */
.notes-mobile-voice-label {
    color: rgba(255, 255, 255, 0.5);
    font-family: Arial, sans-serif;
    font-size: 14px;
    margin-bottom: 30px;
    text-align: center;
}

.notes-mobile-voice-word {
    color: white;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 48px;
    font-weight: 400;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.1s ease;
    text-align: center;
    padding: 0 20px;
}

.notes-mobile-voice-controls {
    margin-top: 40px;
    display: flex;
    gap: 20px;
}

.notes-voice-play-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 32px;
    cursor: pointer;
    padding: 10px;
}

.notes-voice-play-btn:hover {
    opacity: 0.8;
}

/* Navigation indicator */
.notes-mobile-nav {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.notes-nav-indicator {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    font-style: italic;
}

/* Note date display */
.notes-date {
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
    font-family: Arial, sans-serif;
    margin-bottom: 20px;
}

/* =========================
   DESKTOP: Islands Layout
   ========================= */

.notes-desktop-view {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: auto; /* Enable both horizontal and vertical scroll */
    -webkit-overflow-scrolling: touch;
    touch-action: manipulation; /* Allow scroll and pinch-zoom */
    cursor: grab; /* Show grab cursor for drag navigation */
    z-index: 1; /* Below canvas tabs */
}

.notes-desktop-view.grabbing {
    cursor: grabbing;
    user-select: none;
}

/* Placement mode cursors */
.notes-desktop-view.placement-mode {
    cursor: crosshair;
}

.notes-desktop-view.placement-text {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='white' stroke='black' stroke-width='1'%3E%3Cpath d='M20.71 7.04c.39-.39.39-1.04 0-1.41l-2.34-2.34c-.37-.39-1.02-.39-1.41 0l-1.84 1.83 3.75 3.75M3 17.25V21h3.75L17.81 9.93l-3.75-3.75L3 17.25z'/%3E%3C/svg%3E") 2 22, crosshair;
}

.notes-desktop-view.placement-image {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='white' stroke='black' stroke-width='1'%3E%3Crect x='3' y='3' width='18' height='18' rx='2' ry='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpath d='M21 15l-5-5L5 21'/%3E%3C/svg%3E") 12 12, crosshair;
}

/* Drag mode cursor - show grab on draggable items */
.notes-text-draggable,
.notes-voice-draggable {
    cursor: grab;
}

.notes-text-draggable:active,
.notes-voice-draggable:active {
    cursor: grabbing;
}

/* For non-owners, images should allow grab-to-pan through them */
.notes-desktop-view:not(.owner-mode) .notes-island-image img {
    pointer-events: none;
}

.notes-desktop-scroll {
    position: relative; /* For absolutely positioned notes */
    min-width: 100%;
    width: max-content; /* Expand to fit positioned content */
    padding: 40px 200px 50vh 200px; /* Extra horizontal padding for off-screen items */
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 200vh; /* Extra height for absolutely positioned notes */
    -webkit-font-smoothing: subpixel-antialiased;
    touch-action: manipulation; /* Allow scroll and pinch-zoom */
}

/* When notes has content, add top padding for first note */
.notes-desktop-scroll .notes-island:first-child {
    margin-top: 35vh;
}

/* Each note is an "island" - spaced apart */
.notes-island {
    margin-bottom: 60px;
    width: 100%;
    text-align: center;
    position: relative;
}

/* Image notes go below text/voice notes */
.notes-island.notes-island-type-image {
    z-index: 1;
}

.notes-island.notes-island-type-text,
.notes-island.notes-island-type-voice {
    z-index: 10;
}

/* First note gets more space below to feel isolated */
.notes-island:first-child {
    margin-bottom: 150px;
}

.notes-island:last-child {
    margin-bottom: 0;
}

/* Text note island - matches pocket-text-content */
.notes-island-text {
    color: white;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 20px;
    line-height: 1.7;
    user-select: text;
    -webkit-user-select: text;
    cursor: text;
    text-align: center;
    display: inline-block;
    max-width: 100%;
}

/* Editable note styling for owners */
.notes-island-text[contenteditable="true"]:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    padding: 10px;
    margin: -10px;
}

.notes-island-text[contenteditable="true"]:hover {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 4px;
    padding: 10px;
    margin: -10px;
}

/* Rich note island (embedded images + text) */
.notes-island-rich {
    position: relative;
    max-width: 600px;
    padding-bottom: 20px; /* Space for edit button */
}

.notes-rich-content {
    color: white;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 20px;
    line-height: 1.7;
    text-align: left;
}

.notes-rich-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 10px 0;
    display: block;
}

/* ============================================================================
   LAYERS PANEL
   ============================================================================ */

.layers-toggle-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 36px;
    height: 36px;
    background: rgba(20, 20, 20, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: white;
    cursor: pointer;
    z-index: 265;
    display: none;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.layers-toggle-btn:hover {
    background: rgba(40, 40, 40, 0.95);
    border-color: var(--channel-accent);
}

.layers-toggle-btn.active {
    border-color: var(--channel-accent);
    background: rgba(var(--channel-accent-rgb, 255, 0, 0), 0.2);
}

.layers-toggle-btn svg {
    stroke: currentColor;
}

.layers-panel {
    position: fixed;
    top: 20px;
    left: 64px;
    width: 200px;
    max-height: 400px;
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    z-index: 260;
    display: none;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.layers-panel.visible {
    display: flex;
}

.layers-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
}

.layers-panel-title {
    color: white;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.layers-panel-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s ease;
}

.layers-panel-close:hover {
    color: white;
}

.layers-panel-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
    max-height: 280px;
}

.layers-panel-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    transition: background 0.15s ease;
    gap: 8px;
}

.layers-panel-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.layers-panel-item.selected {
    background: rgba(255, 0, 0, 0.15);
    border-left: 3px solid var(--channel-accent);
    padding-left: 9px;
}

.layers-panel-item.dragging {
    opacity: 0.5;
    background: rgba(255, 255, 255, 0.1);
}

.layers-panel-item.drag-over {
    background: rgba(255, 255, 255, 0.15);
    border-top: 2px solid var(--channel-accent);
}

.layers-panel-item.unlayered {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 8px;
    padding-top: 12px;
}

/* Multi-select checkbox */
.layer-checkbox {
    width: 14px;
    height: 14px;
    margin: 0;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: var(--channel-accent);
}

/* Multi-selected layer highlight */
.layers-panel-item.multi-selected {
    background: rgba(100, 150, 255, 0.2);
    border-left: 3px solid #6699ff;
    padding-left: 9px;
}

.layers-panel-item.multi-selected.selected {
    background: rgba(100, 150, 255, 0.3);
}

/* Merge button bar */
.layers-merge-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(100, 150, 255, 0.15);
    border-bottom: 1px solid rgba(100, 150, 255, 0.3);
    margin-bottom: 4px;
}

.layers-merge-btn {
    background: #6699ff;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
}

.layers-merge-btn:hover {
    background: #5588ee;
}

.layers-merge-cancel {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 18px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.layers-merge-cancel:hover {
    color: white;
}

/* Inline text editor toolbar */
.inline-toolbar-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    min-width: 28px;
    transition: all 0.15s ease;
}

.inline-toolbar-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.inline-toolbar-btn:active {
    background: rgba(255, 255, 255, 0.3);
}

.inline-toolbar-save {
    background: rgba(100, 200, 100, 0.3);
    border-color: rgba(100, 200, 100, 0.5);
}

.inline-toolbar-save:hover {
    background: rgba(100, 200, 100, 0.5);
}

.inline-toolbar-cancel {
    background: rgba(200, 100, 100, 0.3);
    border-color: rgba(200, 100, 100, 0.5);
}

.inline-toolbar-cancel:hover {
    background: rgba(200, 100, 100, 0.5);
}

.inline-toolbar-select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 4px 6px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    font-family: inherit;
}

.inline-toolbar-select option {
    background: #222;
    color: white;
}

.inline-toolbar-divider {
    width: 1px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 4px;
}

.layer-visibility-btn {
    background: none;
    border: none;
    font-size: 14px;
    cursor: pointer;
    padding: 2px;
    opacity: 1;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
}

.layer-visibility-btn.hidden {
    opacity: 0.3;
}

.layer-name {
    flex: 1;
    color: white;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.layer-name-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--channel-accent);
    border-radius: 3px;
    color: white;
    font-size: 13px;
    padding: 2px 6px;
    outline: none;
}

.layer-note-count {
    color: rgba(255, 255, 255, 0.4);
    font-size: 11px;
    flex-shrink: 0;
}

.layer-delete-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.3);
    font-size: 16px;
    cursor: pointer;
    padding: 0 4px;
    opacity: 0;
    transition: opacity 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
}

.layers-panel-item:hover .layer-delete-btn {
    opacity: 1;
}

.layer-delete-btn:hover {
    color: #ff4444;
}

/* Layer expand button */
.layer-expand-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 10px;
    cursor: pointer;
    padding: 2px 4px;
    margin-right: 4px;
    transition: color 0.15s ease;
}

.layer-expand-btn:hover {
    color: rgba(255, 255, 255, 0.9);
}

.layer-expand-btn.expanded {
    color: rgba(255, 255, 255, 0.8);
}

/* Layer items list (expanded) */
.layer-items-list {
    padding: 4px 0 8px 28px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    margin-left: 16px;
}

.layer-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.15s ease, color 0.15s ease;
}

.layer-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.layer-item.selected {
    background: rgba(var(--channel-accent-rgb, 255, 0, 0), 0.25);
    color: white;
    border-left: 2px solid var(--channel-accent);
    padding-left: 8px;
}

.layer-item-icon {
    font-size: 12px;
    flex-shrink: 0;
}

.layer-item-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.layer-item-empty {
    padding: 6px 10px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
}

.layer-item-delete {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.3);
    font-size: 14px;
    cursor: pointer;
    padding: 0 4px;
    margin-left: auto;
    opacity: 0;
    transition: opacity 0.15s ease, color 0.15s ease;
}

.layer-item:hover .layer-item-delete {
    opacity: 1;
}

.layer-item-delete:hover {
    color: #ff4444;
}

.layer-item-edit {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    padding: 2px 4px;
    font-size: 12px;
    margin-left: auto;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.layer-item:hover .layer-item-edit {
    opacity: 1;
}

.layer-item-edit:hover {
    color: var(--channel-accent, #4a9eff);
}

/* Inline edit toolbar */
.inline-edit-toolbar {
    position: fixed;
    display: none;
    background: rgba(40, 40, 40, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 4px;
    gap: 2px;
    z-index: 10001;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.inline-edit-toolbar.visible {
    display: flex;
}

.inline-edit-btn {
    background: none;
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.inline-edit-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Divider between button groups */
.inline-edit-divider {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 4px;
}

/* Text note resize handles */
.notes-text-resize-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 8px;
    cursor: ew-resize;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 10;
}

.notes-text-resize-left {
    left: -4px;
}

.notes-text-resize-right {
    right: -4px;
}

.notes-island-text-wrapper:hover .notes-text-resize-handle {
    opacity: 1;
}

.notes-text-resize-handle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 4px;
    height: 30px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 2px;
}

.notes-text-resize-handle:hover::after {
    background: var(--channel-accent, #4a9eff);
}

/* Inline editing state - on the wrapper */
.notes-island-text-wrapper.inline-editing,
.notes-island-rich.inline-editing,
.notes-island-voice.inline-editing {
    cursor: default !important;
}

/* Hide delete button while editing */
.notes-island-text-wrapper.inline-editing .note-delete-btn,
.notes-island-rich.inline-editing .note-delete-btn,
.notes-island-voice.inline-editing .note-delete-btn {
    display: none !important;
}

/* Content editable state */
.content-editable {
    outline: 2px solid var(--channel-accent, #4a9eff);
    outline-offset: 4px;
    background: rgba(0, 0, 0, 0.3);
    min-height: 40px;
    padding: 8px;
    border-radius: 4px;
    cursor: text !important;
    user-select: text;
    -webkit-user-select: text;
}

.content-editable:focus {
    outline: 2px solid var(--channel-accent, #4a9eff);
}

/* Edit button in editing mode (shows as "done") */
.note-edit-btn.editing {
    background: var(--channel-accent, #4a9eff);
    color: white;
    border-color: var(--channel-accent, #4a9eff);
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* Highlight pulse animation for scrolling to items */
@keyframes highlight-pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.8); }
    50% { box-shadow: 0 0 20px 10px rgba(255, 255, 255, 0.4); }
    100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

.notes-island.highlight-pulse {
    animation: highlight-pulse 1.5s ease-out;
}

.layers-panel-actions {
    padding: 8px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.layers-action-btn {
    width: 100%;
    padding: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: white;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.layers-action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Show layers button only when notes view is active in owner mode on desktop (free design mode only) */
body.owner-mode .notes-viewing-overlay.active .layers-toggle-btn {
    display: flex;
}

/* Hide layers panel on mobile */
@media screen and (max-width: 768px) {
    .layers-panel,
    .layers-toggle-btn {
        display: none !important;
    }
}

/* Image note on desktop */
.notes-island-image {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    max-width: 1000px;
    width: fit-content;
}

.notes-island-image img {
    display: block;
    max-width: 100%;
    max-height: 70vh;
    width: 100%;
    height: auto;
    object-fit: contain;
    image-rendering: auto;
    image-rendering: -webkit-optimize-contrast;
    filter: grayscale(1) contrast(1.2) invert(1);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
}

/* Image filter - inverted for ink drawing aesthetic */
.notes-image-inverted {
    filter: invert(1) brightness(1.1);
}

/* Image filter - normal colors (no inversion) */
.notes-image-color {
    filter: none !important;
}

/* Draggable image notes (owner mode) */
.notes-image-draggable {
    cursor: grab;
    position: relative;
    transition: box-shadow 0.2s ease;
}

.notes-image-draggable:hover {
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.notes-image-draggable:active {
    cursor: grabbing;
}

/* Image wrapper - positions resize handle relative to image */
.notes-image-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

/* Resize handle - bottom right corner of image */
.notes-image-resize-handle {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 16px;
    height: 16px;
    cursor: nwse-resize;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    z-index: 10;
    background: transparent;
}

.notes-image-resize-handle::before {
    content: '';
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 8px;
    height: 8px;
    border-right: 2px solid rgba(255, 255, 255, 0.9);
    border-bottom: 2px solid rgba(255, 255, 255, 0.9);
}

.notes-image-draggable:hover .notes-image-resize-handle,
.notes-image-draggable:active .notes-image-resize-handle {
    opacity: 1;
}

/* Image caption */
.notes-image-caption {
    color: rgba(255, 255, 255, 0.7);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 14px;
    font-style: italic;
    margin-top: 15px;
    text-align: center;
}

/* Empty state styling - both positioned consistently */
.notes-empty-state,
.pocket-empty-state {
    color: rgba(255, 255, 255, 0.4);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 18px;
    font-style: italic;
    text-align: center;
    grid-column: 1 / -1;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.pocket-empty-state.pocket-loading {
    animation: pocket-loading-pulse 1.5s ease-in-out infinite;
}

@keyframes pocket-loading-pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.7; }
}

/* Canvas loading state */
.canvas-loading-state {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    animation: pocket-loading-pulse 1.5s ease-in-out infinite;
}

/* Notes empty state needs special positioning since its parent has width: max-content */
.notes-empty-state {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
}

/* Draggable text notes (owner mode) */
.notes-text-draggable {
    cursor: grab;
    position: relative;
}

.notes-text-draggable:active {
    cursor: grabbing;
}

/* Draggable voice notes (owner mode) */
.notes-voice-draggable {
    cursor: grab;
}

.notes-voice-draggable:active {
    cursor: grabbing;
}

/* Voice note island */
.notes-island-voice {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 400px;
    max-width: 90vw;
    padding-bottom: 20px; /* Space for edit button */
}

/* Audio box - consistent for all voice memos (with or without transcription) */
.notes-island-audio-box {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.notes-island-audio-box:hover {
    background: rgba(255, 255, 255, 0.06);
}

/* Waveform player area - shows animated bars and subtitle overlay during playback */
.notes-island-waveform {
    position: relative;
    flex: 1;
    height: 120px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.notes-waveform-bars {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    height: 70px;
    padding: 0 10px;
}

.notes-waveform-bar {
    width: 3px;
    min-height: 4px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 2px;
    transition: height 0.05s ease;
}

.notes-waveform-subtitle {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    text-align: center;
    color: white;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 16px;
    line-height: 1.4;
    background: rgba(0, 0, 0, 0.8);
    padding: 8px 12px;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 10;
    pointer-events: none;
}

.notes-waveform-subtitle.visible {
    opacity: 1;
}

.subtitle-word-active {
    color: #fff;
    font-weight: 600;
}

/* Progress bar for audio playback */
.notes-progress-bar-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0 0 8px 8px;
}

.notes-progress-bar {
    height: 100%;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 0 0 0 8px;
    width: 0%;
    transition: width 0.1s linear;
}

/* Drag handle for voice memos with transcription */
.notes-voice-drag-handle {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 18px;
    cursor: grab;
    opacity: 0.4;
    transition: opacity 0.2s ease;
    user-select: none;
    z-index: 10;
}

.notes-voice-drag-handle:hover {
    opacity: 1;
}

.notes-voice-drag-handle:active {
    cursor: grabbing;
}

.notes-island-transcription {
    color: white;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 20px;
    line-height: 1.9;
    user-select: text;
    -webkit-user-select: text;
    cursor: text;
    flex: 1;
}

/* Individual word spans for highlighting */
.notes-word {
    transition: background-color 0.1s ease, color 0.1s ease;
    padding: 2px 0;
    border-radius: 2px;
}

.notes-word.active {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.notes-word.past {
    color: rgba(255, 255, 255, 0.6);
}

/* Play button for desktop voice notes */
.notes-island-play {
    display: flex;
    align-items: center;
    cursor: pointer;
    flex-shrink: 0;
    padding-top: 6px;
}

.notes-island-play-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 28px;
    cursor: pointer;
    padding: 8px;
    transition: all 0.2s ease;
}

.notes-island-play-btn:hover {
    color: white;
}

.notes-island-play-btn.playing {
    color: white;
}

.notes-island-duration {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    font-family: Arial, sans-serif;
}

/* Island date */
.notes-island-date {
    color: rgba(255, 255, 255, 0.3);
    font-size: 13px;
    font-family: Arial, sans-serif;
    margin-bottom: 20px;
}

/* Note delete button - appears on hover, positioned inside transformed container */
.note-delete-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(200, 60, 60, 0.9);
    border: 2px solid white;
    color: white;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notes-island {
    position: relative;
}

/* Containers that hold delete button need position: relative */
/* Z-index: images below text/audio for collage layering */
.notes-island-image {
    position: relative;
    z-index: 1;
}

.notes-island-text-wrapper,
.notes-island-voice {
    position: relative;
    z-index: 10;
}

/* Text wrapper - fit content width with small padding */
.notes-island-text-wrapper {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    max-width: 800px;
    padding: 8px 12px 20px 12px; /* Extra bottom padding for edit button */
    border-radius: 4px;
}

.notes-island:hover .note-delete-btn,
.notes-island-image:hover .note-delete-btn,
.notes-island-text-wrapper:hover .note-delete-btn,
.notes-island-voice:hover .note-delete-btn {
    opacity: 1;
}

.note-delete-btn:hover {
    background: #e74c3c;
    transform: scale(1.1);
}

/* Edit button - minimalist text button inline with content on right */
.note-edit-btn {
    position: absolute;
    bottom: 8px;
    right: 0;
    background: rgba(40, 40, 40, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.7);
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 12px;
    cursor: pointer;
    padding: 4px 10px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, color 0.2s ease, background 0.2s ease;
    z-index: 10;
}

/* Show edit button on hover of the wrapper */
.notes-island-text-wrapper:hover .note-edit-btn,
.notes-island-rich:hover .note-edit-btn,
.notes-island-voice:hover .note-edit-btn {
    opacity: 1;
    pointer-events: auto;
}

.note-edit-btn:hover {
    background: rgba(60, 60, 60, 0.95);
    color: white;
}

/* Audio-only notes (no transcription) - Desktop */
.notes-island-audio-only {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 25px 30px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.notes-island-audio-only:hover {
    background: rgba(255, 255, 255, 0.1);
}

.notes-audio-play-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 28px;
    cursor: pointer;
    padding: 8px;
    transition: all 0.2s ease;
    flex-shrink: 0;
    order: 1;
}

.notes-audio-play-btn:hover,
.notes-audio-play-btn.playing {
    color: white;
}

.notes-audio-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
    min-width: 160px;
    max-width: 220px;
}

.notes-audio-title {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-family: Arial, sans-serif;
    line-height: 1.4;
}

.notes-audio-duration {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    font-family: Arial, sans-serif;
}

/* Audio-only notes - Mobile */
.notes-mobile-audio-only {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    width: auto;
    height: auto;
    cursor: pointer;
    position: relative;
    padding: 30px;
}

.notes-mobile-audio-icon {
    color: rgba(255, 255, 255, 0.6);
    transition: color 0.2s ease;
}

.notes-mobile-audio-icon.playing {
    color: white;
}

.notes-mobile-audio-title {
    color: white;
    font-size: 24px;
    font-family: Georgia, 'Times New Roman', serif;
    text-align: center;
}

.notes-mobile-audio-duration {
    color: rgba(255, 255, 255, 0.5);
    font-size: 16px;
    font-family: Arial, sans-serif;
}

/* Responsive: Show scroll view on both mobile and desktop */
.notes-mobile-view {
    display: none !important;
}
.notes-desktop-view {
    display: block;
}

/* Mobile adjustments - simple vertical stacking, no collage */
@media screen and (max-width: 768px) {
    .notes-desktop-view {
        overflow-y: auto;
        overflow-x: hidden; /* No horizontal scroll on mobile */
        cursor: auto; /* No grab cursor on mobile */
    }

    .notes-desktop-scroll {
        padding: 0 0 50vh 0; /* No horizontal padding - full width */
        width: 100%;
        min-width: unset;
        align-items: stretch; /* Full width items */
    }

    .notes-desktop-scroll .notes-island:first-child {
        margin-top: 140px; /* Below avatar area */
    }

    /* First item text needs to be centered on screen */
    .notes-desktop-scroll .notes-island.notes-island-type-text:first-child {
        margin-top: 35vh;
    }

    .notes-island {
        margin-bottom: 2px; /* Very close stacking for images */
        width: 100%;
        text-align: center;
    }

    /* Text items need more space to appear centered/isolated */
    .notes-island.notes-island-type-text {
        margin-top: 30vh;
        margin-bottom: 30vh;
    }

    /* But consecutive text items shouldn't double up margins */
    .notes-island.notes-island-type-text + .notes-island.notes-island-type-text {
        margin-top: 0;
    }

    /* Single text item should be centered vertically, not pushed low */
    .notes-island.notes-island-type-text:only-child {
        margin-top: 20vh;
        margin-bottom: 0;
    }

    /* Voice memo subtitle - center of screen on mobile */
    .notes-waveform-subtitle {
        position: fixed;
        top: 50%;
        left: 10%;
        right: 10%;
        bottom: auto;
        transform: translateY(-50%);
        font-size: 20px;
    }

    /* Remove transforms on mobile - no collage positioning */
    .notes-island-image,
    .notes-island-text-wrapper,
    .notes-island-voice {
        transform: none !important;
        width: 100% !important;
        max-width: 100%;
    }

    .notes-island-image {
        margin: 0;
        width: auto !important;
        height: auto !important;
    }

    .notes-island-image img {
        width: 100%;
        max-width: 100%;
        height: auto !important;
        max-height: none;
        display: block; /* Remove any inline spacing */
    }

    /* Keep resize handle visible on mobile for touch resizing */
    .notes-image-resize-handle {
        opacity: 0.7;
        width: 32px;
        height: 32px;
        bottom: -4px;
        right: -4px;
    }

    .notes-image-resize-handle::before {
        width: 12px;
        height: 12px;
        bottom: 4px;
        right: 4px;
    }

    /* Disable cursor styles on mobile (touch instead) */
    .notes-image-draggable,
    .notes-text-draggable,
    .notes-voice-draggable {
        cursor: auto;
    }

    /* Delete button on mobile - simple white X, no background */
    .note-delete-btn {
        right: 10px;
        top: 10px;
        width: auto;
        height: auto;
        background: none;
        border: none;
        border-radius: 0;
        color: white;
        font-size: 24px;
        opacity: 0;
        pointer-events: none;
    }

    /* Only show delete button when item is selected */
    .notes-island.selected .note-delete-btn {
        opacity: 1;
        pointer-events: auto;
    }

    /* Disable hover-based showing on mobile */
    .notes-island:hover .note-delete-btn,
    .notes-island-image:hover .note-delete-btn,
    .notes-island-text-wrapper:hover .note-delete-btn,
    .notes-island-voice:hover .note-delete-btn {
        opacity: 0;
        pointer-events: none;
    }

    .notes-island.selected:hover .note-delete-btn {
        opacity: 1;
        pointer-events: auto;
    }

    /* Mobile edit button - only visible when selected */
    .note-edit-btn {
        display: none; /* Hide edit button on mobile */
    }

    .notes-island-text {
        font-size: 17px;
        padding: 0 10px;
    }

    .notes-island-transcription {
        font-size: 17px;
    }
}

/* Channel info notes link styling (matches pocket link) */
.channel-info-notes {
    font-size: 12px;
    opacity: 0.8;
    text-decoration: underline;
    cursor: pointer;
    display: block;
    transition: opacity 0.3s ease;
    pointer-events: auto;
    position: relative;
    z-index: 250;
    padding: 8px;
    margin: -8px;
    color: white;
}

.channel-info-notes:hover {
    opacity: 1;
}

.channel-info-notes:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

/* Notebook is desktop-only */
@media screen and (max-width: 768px) {
    .channel-info-notes {
        display: none !important;
    }
}

/* ============================================================================
   OWNER MODE - Add buttons and editor
   ============================================================================ */

/* Circular add button (+ in circle) - matches nav button style */
.owner-add-btn {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: rgba(255, 255, 255, 0.7);
    font-size: 28px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: all 0.2s ease;
}

.owner-add-btn:hover {
    border-color: white;
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.owner-add-btn span {
    line-height: 1;
    margin-top: -2px;
}

/* Notes image button - positioned to the right of the add note button */
.notes-image-btn {
    left: calc(50% + 70px) !important;
}

.notes-image-btn svg {
    stroke: currentColor;
}

/* Owner Buttons - quill, rec, and pocket add */
/* Desktop: bottom center. Mobile: top-left opposite avatar */
/* Use white color instead of channel accent */
.owner-buttons {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    z-index: 250;
    --owner-btn-color: white;
}

/* Override channel accent with white for owner buttons */
.owner-btn {
    border-color: white !important;
    opacity: 1 !important;
}

.owner-btn svg {
    stroke: white !important;
}

.owner-btn .rec-dot {
    background: white !important;
}

.owner-btn.rec.recording .rec-dot {
    background: #ff3b30 !important;
}

.owner-btn.add-pocket span,
.owner-btn.add-menu span {
    color: white !important;
}

/* Mobile: position top-left opposite avatar */
@media screen and (max-width: 768px) {
    .owner-buttons {
        bottom: auto;
        top: 60px;
        left: 20px;
        transform: none;
        gap: 12px;
        z-index: 10000 !important; /* Above everything on mobile */
        pointer-events: auto !important;
    }

    .owner-btn {
        width: 38px;
        height: 38px;
        pointer-events: auto !important;
    }

    .owner-btn.quill svg {
        width: 16px;
        height: 16px;
    }

    .owner-btn.rec .rec-dot {
        width: 14px;
        height: 14px;
    }

    .owner-btn.add-pocket span {
        font-size: 20px;
    }

    .owner-btn.image-note svg {
        width: 16px;
        height: 16px;
    }

    .owner-btn.notebook svg,
    .owner-btn.pocket svg,
    .owner-btn.popcorn svg,
    .owner-btn.image svg {
        width: 16px;
        height: 16px;
    }

    /* Disabled/greyed out owner buttons on mobile */
    .owner-btn.disabled {
        opacity: 0.3;
        pointer-events: none;
    }

    /* Hide notebook input bar on mobile - we use the main owner buttons instead */
    .notebook-input-bar {
        display: none !important;
    }
}

/* Mobile photocopy button - appears on left side when notebook is open */
/* Hidden by default on desktop */
.mobile-photocopy-btn {
    display: none;
    position: fixed;
    top: 110px; /* Below owner controls */
    left: 20px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    z-index: 10001;
    padding: 8px 0;
}

.mobile-photocopy-btn:active {
    opacity: 0.5;
}

/* Show photocopy button on mobile when notebook is open AND user is owner */
@media screen and (max-width: 768px) {
    body.owner-mode .notes-viewing-overlay.active ~ .mobile-photocopy-btn {
        display: block !important;
    }
}

/* Owner Notebook Buttons - shown when notebook is open */
.owner-notebook-buttons {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    z-index: 10001;
}

@media screen and (max-width: 768px) {
    .owner-notebook-buttons {
        bottom: auto;
        top: 60px;
        left: 20px;
        transform: none;
        gap: 12px;
    }
}

/* Notebook Input Bar - positioned like main owner buttons */
.notebook-input-bar {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 10001;
}

/* Text section - left side */
.notebook-text-section {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Quill button - no circle */
.notebook-quill-btn {
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    padding: 0;
}

.notebook-quill-btn:hover {
    opacity: 1;
}

.notebook-quill-btn svg {
    width: 20px;
    height: 20px;
    stroke: var(--channel-accent);
}

/* Text field wrapper with expand button */
.notebook-text-field-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.notebook-text-field {
    width: 180px;
    height: 36px;
    padding: 0 32px 0 12px;
    background: rgba(30, 30, 30, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 18px;
    color: white;
    font-size: 13px;
    font-family: inherit;
    outline: none;
}

.notebook-text-field::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.notebook-text-field:focus {
    border-color: var(--channel-accent);
}

/* Expand button inside text field */
.notebook-expand-btn {
    position: absolute;
    right: 8px;
    width: 20px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    opacity: 0.4;
    transition: opacity 0.2s ease;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notebook-expand-btn:hover {
    opacity: 0.8;
}

.notebook-expand-btn svg {
    width: 12px;
    height: 12px;
    stroke: var(--channel-accent);
}

.notebook-post-btn {
    background: transparent;
    border: none;
    color: var(--channel-accent);
    font-size: 14px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    padding: 0;
}

.notebook-post-btn:hover {
    opacity: 1;
}

/* Notebook action buttons - no circles, clean icons */
.notebook-action-btn {
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    padding: 0;
}

.notebook-action-btn:hover {
    opacity: 1;
}

.notebook-action-btn svg {
    width: 20px;
    height: 20px;
    stroke: var(--channel-accent);
}

.notebook-action-btn.image-btn svg {
    width: 18px;
    height: 18px;
}

.notebook-action-btn.rec-btn {
    border: 2px solid var(--channel-accent);
    border-radius: 50%;
}

.notebook-action-btn.rec-btn .rec-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--channel-accent);
    transition: all 0.3s ease;
}

.notebook-action-btn.rec-btn.recording {
    border-color: #ff3b30;
    background: rgba(255, 59, 48, 0.15);
}

.notebook-action-btn.rec-btn.recording .rec-dot {
    width: 12px;
    height: 12px;
    background: #ff3b30;
    animation: pulse-recording 1.5s ease-in-out infinite;
}

/* Image section - right side */
.notebook-image-section {
    display: flex;
    align-items: center;
    gap: 8px;
}

.notebook-image-url-field {
    width: 140px;
    height: 36px;
    padding: 0 12px;
    background: rgba(30, 30, 30, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 18px;
    color: white;
    font-size: 13px;
    font-family: inherit;
    outline: none;
}

.notebook-image-url-field::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.notebook-image-url-field:focus {
    border-color: var(--channel-accent);
}

.notebook-add-image-btn {
    background: transparent;
    border: none;
    color: var(--channel-accent);
    font-size: 14px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    padding: 0;
}

.notebook-add-image-btn:hover {
    opacity: 1;
}

.notebook-clear-btn {
    background: transparent;
    color: var(--channel-accent);
    border: 1px solid var(--channel-accent);
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-family: Arial, sans-serif;
    cursor: pointer;
    text-transform: lowercase;
    transition: background-color 0.2s ease;
    margin-left: 35px;
}

.notebook-clear-btn:hover,
.notebook-clear-btn:active {
    background: color-mix(in srgb, var(--channel-accent) 10%, transparent);
}

/* Mobile: Reposition and adjust sizing */
@media screen and (max-width: 768px) {
    .notebook-input-bar {
        bottom: auto;
        top: 60px;
        left: 15px;
        right: 15px;
        transform: none;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .notebook-text-field {
        width: 140px;
    }

    .notebook-image-url-field {
        width: 100px;
    }
}

/* Notebook Image Uploader Modal */
.notebook-image-uploader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notebook-image-uploader-content {
    background: rgba(30, 30, 30, 0.95);
    padding: 25px;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
}

.notebook-image-uploader-content h3 {
    margin: 0 0 20px 0;
    color: white;
    font-size: 18px;
    font-weight: normal;
}

.owner-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    position: relative;
    overflow: visible;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    user-select: none;
    -webkit-user-select: none;
}

/* Ensure SVGs and spans inside owner buttons don't block touches */
.owner-btn svg,
.owner-btn span {
    pointer-events: none;
}

/* Quill button - white circle outline with quill icon */
.owner-btn.quill {
    border: 2px solid white;
    opacity: 1;
}

.owner-btn.quill svg {
    width: 20px;
    height: 20px;
    stroke: white;
}

.owner-btn.quill:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

.owner-btn.quill:hover svg {
    stroke: white;
}

/* Rec button - iPhone Voice Memo style */
.owner-btn.rec {
    border: 2px solid white;
    opacity: 1;
}

.owner-btn.rec .rec-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    transition: all 0.3s ease;
}

.owner-btn.rec:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

.owner-btn.rec:hover .rec-dot {
    background: white;
}

/* Recording state - red button with smaller dot */
.owner-btn.rec.recording {
    opacity: 1;
    border-color: #ff3b30;
    background: rgba(255, 59, 48, 0.15);
}

.owner-btn.rec.recording .rec-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ff3b30;
    animation: pulse-recording 1.5s ease-in-out infinite;
}

@keyframes pulse-recording {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Add pocket button - just a + sign, no circle */
.owner-btn.add-pocket {
    border: none;
    width: auto;
    height: auto;
    padding: 5px 10px;
}

.owner-btn.add-pocket span {
    font-size: 28px;
    font-weight: 300;
    color: white;
    opacity: 1;
    line-height: 1;
}

.owner-btn.add-pocket:hover span {
    opacity: 1;
}

/* Settings button */
.owner-btn.settings {
    border: none;
    opacity: 0.7;
}

.owner-btn.settings svg {
    width: 20px;
    height: 20px;
    stroke: var(--channel-accent);
}

.owner-btn.settings:hover {
    opacity: 1;
    background: color-mix(in srgb, var(--channel-accent) 10%, transparent);
}

/* Projector button */
.owner-btn.projector {
    border: none;
    opacity: 0.7;
}

.owner-btn.projector .projector-icon {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

.owner-btn.projector:hover {
    opacity: 1;
    background: color-mix(in srgb, var(--channel-accent) 10%, transparent);
}

.owner-btn.projector:hover .projector-icon {
    opacity: 1;
}

/* Notebook button */
.owner-btn.notebook {
    border: 2px solid var(--channel-accent);
    opacity: 0.7;
}

.owner-btn.notebook svg {
    width: 20px;
    height: 20px;
    stroke: var(--channel-accent);
}

.owner-btn.notebook:hover {
    opacity: 1;
    background: color-mix(in srgb, var(--channel-accent) 10%, transparent);
}

/* Pocket button */
.owner-btn.pocket {
    border: 2px solid var(--channel-accent);
    opacity: 0.7;
}

.owner-btn.pocket svg {
    width: 20px;
    height: 20px;
    stroke: var(--channel-accent);
}

.owner-btn.pocket:hover {
    opacity: 1;
    background: color-mix(in srgb, var(--channel-accent) 10%, transparent);
}

/* Popcorn button */
.owner-btn.popcorn {
    border: 2px solid var(--channel-accent);
    opacity: 0.7;
}

.owner-btn.popcorn svg {
    width: 20px;
    height: 20px;
    stroke: var(--channel-accent);
}

.owner-btn.popcorn:hover {
    opacity: 1;
    background: color-mix(in srgb, var(--channel-accent) 10%, transparent);
}

/* Image button (for notebook images) */
.owner-btn.image {
    border: 2px solid var(--channel-accent);
    opacity: 0.7;
}

.owner-btn.image svg {
    width: 20px;
    height: 20px;
    stroke: var(--channel-accent);
}

.owner-btn.image:hover {
    opacity: 1;
    background: color-mix(in srgb, var(--channel-accent) 10%, transparent);
}

/* Image note button - for ink drawings (only shown to users with canUploadNoteImages permission) */
.owner-btn.image-note {
    border: 2px solid var(--channel-accent);
    opacity: 0.7;
}

.owner-btn.image-note svg {
    width: 20px;
    height: 20px;
    stroke: var(--channel-accent);
}

.owner-btn.image-note:hover {
    opacity: 1;
    background: color-mix(in srgb, var(--channel-accent) 10%, transparent);
}

.owner-btn.image-note:hover svg {
    stroke: var(--channel-accent);
}

/* Add menu button (replaces multiple buttons) */
.owner-btn.add-menu {
    opacity: 0.7;
}

.owner-btn.add-menu span {
    font-size: 28px;
    font-weight: 300;
    color: var(--channel-accent);
    line-height: 1;
}

.owner-btn.add-menu:hover {
    opacity: 1;
}

/* Owner menu - dropdown with sections */
.owner-menu {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid var(--channel-accent, rgba(255, 255, 255, 0.3));
    border-radius: 12px;
    padding: 16px 20px;
    z-index: 10001;
    font-family: Arial, sans-serif;
    min-width: 180px;
}

.owner-menu-section {
    margin-bottom: 16px;
}

.owner-menu-section:last-child {
    margin-bottom: 0;
}

.owner-menu-header {
    font-size: 14px;
    font-weight: bold;
    color: var(--channel-accent, white);
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.owner-menu-header.owner-menu-link {
    cursor: pointer;
}

.owner-menu-header.owner-menu-link:hover {
    text-decoration: underline;
}

.owner-menu-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
}

.owner-menu-or {
    font-size: 14px;
    font-weight: bold;
    color: var(--channel-accent, white);
    margin-left: 8px;
    letter-spacing: 0.5px;
}

.owner-menu-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1.5px solid var(--channel-accent, rgba(255, 255, 255, 0.5));
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.owner-menu-btn:hover {
    background: color-mix(in srgb, var(--channel-accent, white) 15%, transparent);
}

.owner-menu-btn svg {
    width: 18px;
    height: 18px;
    stroke: var(--channel-accent, white);
}

.owner-menu-btn .rec-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--channel-accent, white);
}

.owner-menu-btn.pdf-btn {
    font-size: 10px;
    font-weight: bold;
    color: var(--channel-accent, white);
    letter-spacing: -0.5px;
}

/* Mobile positioning for owner menu */
@media screen and (max-width: 768px) {
    .owner-menu {
        bottom: auto;
        top: 70px;
        right: 15px;
        left: auto;
    }
}

/* Uploaded message - fades in/out */
.uploaded-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 24px;
    font-style: italic;
    font-family: Georgia, 'Times New Roman', serif;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.uploaded-message.visible {
    opacity: 1;
}

/* Transcribe prompt - Yes/No buttons after upload */
.transcribe-prompt {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10001;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    text-align: center;
    background: rgba(0, 0, 0, 0.9);
    padding: 30px 40px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.transcribe-prompt.visible {
    opacity: 1;
    pointer-events: auto;
}

.transcribe-prompt-text {
    color: white;
    font-size: 22px;
    font-style: italic;
    font-family: Georgia, 'Times New Roman', serif;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.transcribe-prompt-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.transcribe-btn {
    padding: 10px 30px;
    font-size: 16px;
    font-family: Arial, sans-serif;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
    color: white;
}

.transcribe-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.transcribe-btn.transcribe-yes {
    background: rgba(255, 255, 255, 0.15);
}

.transcribe-btn.transcribe-yes:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Voice memo form - shown after recording ends */
.voice-memo-form {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10001;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    text-align: center;
    background: rgba(0, 0, 0, 0.95);
    padding: 30px 40px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    min-width: 280px;
}

.voice-memo-form.visible {
    opacity: 1;
    pointer-events: auto;
}

.voice-memo-form-title {
    color: white;
    font-size: 18px;
    font-family: Georgia, 'Times New Roman', serif;
    margin-bottom: 20px;
}

.voice-memo-form-field {
    margin-bottom: 18px;
    text-align: left;
}

.voice-memo-form-field label {
    display: block;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    margin-bottom: 6px;
    text-transform: lowercase;
}

.voice-memo-form-field input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: white;
    font-family: Arial, sans-serif;
    box-sizing: border-box;
}

.voice-memo-form-field input[type="text"]:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.12);
}

.voice-memo-form-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    cursor: pointer;
}

.voice-memo-form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--channel-accent, #888);
}

.voice-memo-form-checkbox span {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.voice-memo-form-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.voice-memo-form-btn {
    padding: 10px 24px;
    font-size: 14px;
    font-family: Arial, sans-serif;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
    color: white;
    text-transform: lowercase;
}

.voice-memo-form-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.voice-memo-form-btn.primary {
    background: rgba(255, 255, 255, 0.15);
}

.voice-memo-form-btn.primary:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Playback waveform overlay - shows during voice note playback */
.playback-waveform-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    z-index: 50;
}

.playback-waveform-overlay.active {
    display: block;
}

.playback-waveform {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 100%;
    height: 100%;
    padding: 0 10%;
    box-sizing: border-box;
}

.playback-waveform .bar {
    flex: 1;
    max-width: 6px;
    min-width: 2px;
    background: var(--channel-accent);
    border-radius: 2px;
    transition: height 0.05s ease;
}

/* Subtitle overlay on playback waveform */
.playback-subtitle {
    position: absolute;
    bottom: 15%;
    left: 10%;
    right: 10%;
    text-align: center;
    color: white;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 24px;
    line-height: 1.5;
    background: rgba(0, 0, 0, 0.7);
    padding: 15px 25px;
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 10;
}

.playback-subtitle.visible {
    opacity: 1;
}

.playback-subtitle .subtitle-word-active {
    color: var(--channel-accent);
    font-weight: 600;
}

/* Mobile subtitle overlay - just centered text, no waveform */
.mobile-subtitle-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 60;
}

.mobile-subtitle-overlay.active {
    display: flex;
}

.mobile-subtitle {
    color: white;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 48px;
    font-weight: 400;
    text-align: center;
    padding: 20px 40px;
    max-width: 90%;
    line-height: 1.3;
}

/* Recording overlay - shows waveform over player */
.recording-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

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

.recording-label {
    position: absolute;
    top: 30%;
    left: 0;
    right: 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    font-family: Arial, sans-serif;
    text-transform: lowercase;
    letter-spacing: 0.5px;
    z-index: 101;
}

.recording-waveform {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    padding: 0 10%;
    box-sizing: border-box;
}

.recording-waveform .bar {
    flex: 1;
    max-width: 6px;
    min-width: 2px;
    background: var(--channel-accent);
    border-radius: 2px;
    transition: height 0.05s ease;
}

.recording-timer {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'SF Mono', 'Monaco', monospace;
    font-size: 24px;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 2px;
}

.recording-stop-btn {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--channel-accent);
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.recording-stop-btn:hover {
    background: color-mix(in srgb, var(--channel-accent) 20%, transparent);
}

.recording-stop-btn .stop-icon {
    width: 16px;
    height: 16px;
}

/* Voice Playback Overlay - matches recording overlay style */
.voice-playback-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.voice-playback-overlay.active {
    display: flex;
}

.voice-playback-title {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 20px;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    max-width: 80%;
}

.voice-playback-waveform {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    padding: 0 10%;
    box-sizing: border-box;
}

.voice-playback-waveform .bar {
    flex: 1;
    max-width: 6px;
    min-width: 2px;
    background: var(--channel-accent);
    border-radius: 2px;
    transition: height 0.05s ease;
}

.voice-playback-btn {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--channel-accent);
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: var(--channel-accent);
}

.voice-playback-btn:hover {
    background: color-mix(in srgb, var(--channel-accent) 20%, transparent);
}

.voice-playback-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.voice-playback-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.3);
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    line-height: 1;
    padding: 10px;
    transition: color 0.2s ease;
}

.voice-playback-close:hover {
    color: rgba(255, 255, 255, 0.7);
}

.voice-playback-subtitle {
    position: absolute;
    bottom: 100px;
    left: 10%;
    right: 10%;
    text-align: center;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 24px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.5);
}

.voice-playback-subtitle .active {
    color: white;
}

.recording-option {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

.recording-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--channel-accent);
}

.recording-option.transcribe-option {
    cursor: pointer;
}

.recording-option.transcribe-option:hover {
    color: rgba(255, 255, 255, 0.9);
}

.recording-limit-warning {
    color: var(--channel-accent);
    font-size: 14px;
    margin-top: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.recording-limit-warning.visible {
    opacity: 1;
}

@keyframes pulse-border {
    0%, 100% { border-color: var(--channel-accent); }
    50% { border-color: color-mix(in srgb, var(--channel-accent) 50%, transparent); }
}

@keyframes pulse-dot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(0.85); opacity: 0.7; }
}

/* Hide on mobile landscape */
@media (max-width: 768px) and (orientation: landscape) {
    .owner-buttons {
        display: none !important;
    }
}

/* Note Editor Overlay */
.note-editor-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.note-editor-overlay.active {
    display: flex;
}

.note-editor-container {
    width: 90%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.95);
    padding: 25px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    position: relative;
}

.note-editor-content {
    width: 100%;
    min-height: 200px;
    max-height: 60vh;
    overflow-y: auto;
    padding: 20px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 18px;
    line-height: 1.7;
    box-sizing: border-box;
}

.note-editor-content:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
}

.note-editor-content:empty::before {
    content: attr(data-placeholder);
    color: rgba(255, 255, 255, 0.3);
}

/* Embedded images in note editor */
.note-editor-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 10px 0;
    display: block;
}

/* Links in note editor */
.note-editor-content a {
    color: #00b8ff;
    text-decoration: underline;
}

/* Headers in note editor */
.note-editor-content h1 {
    font-size: 28px;
    font-weight: 600;
    margin: 0.5em 0;
}

.note-editor-content h2 {
    font-size: 22px;
    font-weight: 600;
    margin: 0.4em 0;
}

.note-editor-content h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0.3em 0;
}

/* Legacy textarea support */
.note-editor-container textarea {
    width: 100%;
    min-height: 200px;
    padding: 20px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 18px;
    line-height: 1.7;
    resize: vertical;
    box-sizing: border-box;
}

.note-editor-container textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
}

.note-editor-container textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* Note editor close button */
.note-editor-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    z-index: 10;
}

.note-editor-close:hover {
    color: white;
}

/* Note editor toolbar */
.note-editor-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
}

.toolbar-btn {
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.toolbar-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.toolbar-btn svg {
    stroke: currentColor;
}

.toolbar-divider {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 8px;
}

/* Upload options in note editor */
/* Note editor image section */
.note-editor-image-section {
    margin-bottom: 15px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}

.note-editor-image-preview {
    margin-bottom: 10px;
    text-align: center;
}

.note-editor-image-preview img {
    max-width: 100%;
    max-height: 150px;
    border-radius: 6px;
}

.note-editor-invert-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
}

.note-editor-invert-label input[type="checkbox"] {
    cursor: pointer;
}

/* Note editor upload row */
.note-editor-upload-row {
    margin-bottom: 15px;
}

.note-editor-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: transparent;
    border: 1px dashed rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.note-editor-upload-btn:hover {
    border-color: rgba(255, 255, 255, 0.5);
    color: rgba(255, 255, 255, 0.9);
}

.note-editor-upload-btn svg {
    stroke: currentColor;
}

/* Old upload options - kept for backwards compatibility */
.note-editor-upload-options {
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
}

.note-editor-upload-option {
    flex: 1;
    padding: 12px;
    border: 1px dashed rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    text-align: center;
}

.note-editor-upload-option input[type="file"] {
    display: none;
}

.note-editor-upload-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    transition: color 0.2s ease;
}

.note-editor-upload-label:hover {
    color: rgba(255, 255, 255, 0.9);
}

.note-editor-upload-icon {
    font-size: 18px;
}

.note-editor-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.note-editor-cancel,
.note-editor-save {
    padding: 10px 24px;
    font-size: 14px;
    cursor: pointer;
    border: none;
    border-radius: 4px;
}

.note-editor-cancel {
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.note-editor-cancel:hover {
    color: white;
    border-color: rgba(255, 255, 255, 0.6);
}

.note-editor-save {
    background: white;
    color: black;
}

.note-editor-save:hover {
    background: rgba(255, 255, 255, 0.9);
}

.note-editor-save:disabled {
    background: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
}

/* Bottom row: pictures icon left, post button right */
.note-editor-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.note-editor-pictures-btn {
    width: 44px;
    height: 44px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.note-editor-pictures-btn:hover {
    color: white;
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.1);
}

/* Voice memo content in pocket viewing */
.pocket-voice-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    max-width: 800px;
    padding: 40px 20px;
    width: 100%;
}

.pocket-voice-title-display {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.9);
    font-family: Georgia, 'Times New Roman', serif;
    margin-bottom: 10px;
}

.pocket-audio-player {
    display: none; /* Hidden, using custom controls */
}

/* Desktop voice playback */
.pocket-voice-desktop {
    gap: 30px;
}

.pocket-voice-waveform-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pocket-voice-waveform {
    width: 100%;
    height: 100%;
}

.pocket-voice-controls-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.pocket-voice-play-btn-large {
    background: transparent;
    border: none;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: all 0.2s ease;
}

.pocket-voice-play-btn-large:hover {
    color: rgba(255, 255, 255, 0.8);
}

/* Div-based waveform for pocket voice (mirrored style) */
.pocket-voice-waveform-bars {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 100%;
    height: 100%;
    padding: 0 10%;
    box-sizing: border-box;
}

.pocket-voice-waveform-bars .bar {
    flex: 1;
    max-width: 6px;
    min-width: 2px;
    background: var(--channel-accent);
    border-radius: 2px;
    transition: height 0.05s ease;
}

.pocket-voice-subtitles {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 24px;
    line-height: 1.6;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    min-height: 80px;
    max-width: 700px;
}

.subtitle-word {
    transition: color 0.15s ease;
}

.subtitle-word.active {
    color: white;
    font-weight: 500;
}

.subtitle-word.spoken {
    color: rgba(255, 255, 255, 0.4);
}

/* Mobile voice playback */
.pocket-voice-mobile {
    gap: 20px;
    padding: 30px 20px;
}

.pocket-voice-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    max-width: 350px;
}

.pocket-voice-play-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    min-width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.2s ease;
}

.pocket-voice-play-btn:hover,
.pocket-voice-play-btn:active {
    background: rgba(255, 255, 255, 0.2);
}

.pocket-voice-progress-bar {
    flex: 1;
    height: 8px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    cursor: pointer;
    overflow: hidden;
}

.pocket-voice-progress {
    height: 100%;
    width: 0%;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 4px;
    transition: width 0.1s linear;
}

.pocket-voice-transcription {
    color: rgba(255, 255, 255, 0.6);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 16px;
    line-height: 1.8;
    text-align: center;
    max-height: 50vh;
    overflow-y: auto;
    padding: 0 10px;
}

/* Word highlighting in transcription */
.voice-word {
    transition: color 0.15s ease, background 0.15s ease;
    padding: 2px 0;
}

.voice-word.active {
    color: white;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
    padding: 2px 4px;
    margin: 0 -4px;
}

.voice-word.spoken {
    color: rgba(255, 255, 255, 0.4);
}

/* =============================================
   MOBILE COMPOSER (Tumblr-style)
   ============================================= */
.mobile-composer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 100000;
    flex-direction: column;
}

.mobile-composer.active {
    display: flex;
}

.mobile-composer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    padding-top: max(12px, env(safe-area-inset-top));
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-composer-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 28px;
    font-weight: 300;
    padding: 0;
    width: 40px;
    height: 40px;
    cursor: pointer;
    line-height: 1;
}

.mobile-composer-post {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-size: 16px;
    font-weight: 500;
    padding: 8px 20px;
    border-radius: 4px;
    cursor: not-allowed;
}

.mobile-composer-post:enabled {
    background: #00b8ff;
    color: white;
    cursor: pointer;
}

.mobile-composer-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 16px;
}

.mobile-composer-text {
    width: 100%;
    min-height: 100px;
    color: white;
    font-size: 18px;
    line-height: 1.5;
    outline: none;
    border: none;
    background: transparent;
}

.mobile-composer-text:empty::before {
    content: attr(data-placeholder);
    color: rgba(255, 255, 255, 0.35);
    pointer-events: none;
}

.mobile-composer-text:focus:empty::before {
    color: rgba(255, 255, 255, 0.25);
}

/* Selected images in body */
.mobile-composer-images {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.mobile-composer-images:empty {
    display: none;
}

.mobile-composer-image-item {
    position: relative;
    width: calc(50% - 4px);
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
}

.mobile-composer-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mobile-composer-image-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Recent photos row - positioned above toolbar */
.mobile-composer-photos {
    position: fixed;
    bottom: 60px; /* Above the toolbar */
    left: 0;
    right: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 0;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    background: #000;
    z-index: 100001;
}

.mobile-composer-photos-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 0 16px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.mobile-composer-photos-scroll::-webkit-scrollbar {
    display: none;
}

.mobile-composer-photo-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    scroll-snap-align: start;
    position: relative;
}

.mobile-composer-photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mobile-composer-photo-thumb.selected::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 3px solid #00b8ff;
    border-radius: 6px;
    pointer-events: none;
}

.mobile-composer-photo-thumb .thumb-check {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    background: #00b8ff;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
}

.mobile-composer-photo-thumb.selected .thumb-check {
    display: flex;
}

.mobile-composer-photo-thumb .thumb-check svg {
    width: 12px;
    height: 12px;
    stroke: white;
    stroke-width: 3;
}

.mobile-composer-photo-library {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    scroll-snap-align: start;
}

.mobile-composer-photo-library svg {
    stroke: rgba(255, 255, 255, 0.6);
}

.mobile-composer-photo-library span {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.6);
}

.mobile-composer-photo-library:active {
    background: rgba(255, 255, 255, 0.2);
}

/* Bottom toolbar - always at bottom */
.mobile-composer-toolbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: flex-end; /* Buttons on right side */
    gap: 4px;
    padding: 12px 16px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: #000;
    z-index: 100002;
}

/* Floating toolbar - hidden by default, appears above keyboard */
.mobile-composer-toolbar-floating {
    display: none;
    z-index: 100003;
}

.mobile-composer-toolbar-floating.visible {
    display: flex;
}

.mobile-composer-tool {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 8px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    user-select: none;
    -webkit-user-select: none;
}

.mobile-composer-tool:active {
    color: white;
}

.mobile-composer-tool .tool-text {
    font-size: 20px;
    font-weight: 500;
    font-family: Georgia, serif;
}

.mobile-composer-tool svg {
    stroke: currentColor;
}

/* Formatting popup */
.mobile-composer-format-popup {
    display: none;
    position: fixed;
    bottom: 70px;
    left: 16px;
    background: #222;
    border-radius: 8px;
    padding: 8px;
    gap: 4px;
    flex-direction: row;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    z-index: 100003;
}

.mobile-composer-format-popup.visible {
    display: flex;
}

.format-option {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 18px;
    padding: 10px 14px;
    cursor: pointer;
    border-radius: 4px;
    min-width: 44px;
    font-family: Georgia, serif;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    user-select: none;
    -webkit-user-select: none;
}

.format-option:active {
    background: rgba(255, 255, 255, 0.15);
}

.format-option strong {
    font-weight: 700;
}

.format-option em {
    font-style: italic;
}

.format-h1 {
    font-size: 20px;
    font-weight: 600;
}

.format-h2 {
    font-size: 17px;
    font-weight: 600;
}

.format-h3 {
    font-size: 14px;
    font-weight: 600;
}

.format-divider {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 4px;
}

/* Links in mobile composer */
.mobile-composer-text a {
    color: #00b8ff;
    text-decoration: underline;
}

/* Headers in mobile composer */
.mobile-composer-text h1 {
    font-size: 28px;
    font-weight: 600;
    margin: 0.5em 0;
}

.mobile-composer-text h2 {
    font-size: 22px;
    font-weight: 600;
    margin: 0.4em 0;
}

.mobile-composer-text h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0.3em 0;
}

/* Settings Overlay */
.settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: none;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 40px 0;
    box-sizing: border-box;
}

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

.settings-container {
    width: 90%;
    max-width: 500px;
    background: transparent;
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin: auto;
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.settings-header h2 {
    color: var(--channel-accent);
    font-size: 18px;
    font-weight: normal;
    margin: 0;
    text-transform: lowercase;
}

.settings-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    opacity: 0.7;
}

.settings-close:hover {
    opacity: 1;
}

.settings-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.settings-field label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    text-transform: lowercase;
}

.settings-field input[type="text"] {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 12px;
    font-size: 14px;
    border-radius: 4px;
}

.settings-field input[type="text"]:focus {
    outline: none;
    border-color: var(--channel-accent);
}

.settings-hint {
    color: rgba(255, 255, 255, 0.4);
    font-size: 11px;
}

.settings-avatar-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.settings-avatar-row input {
    flex: 1;
}

.settings-avatar-preview {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--channel-accent);
    object-fit: cover;
    display: none;
}

.settings-avatar-preview.visible {
    display: block;
}

.settings-color-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.settings-color-row input[type="color"] {
    width: 50px;
    height: 40px;
    border: none;
    cursor: pointer;
    background: transparent;
    padding: 0;
}

.settings-color-row input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.settings-color-row input[type="color"]::-webkit-color-swatch {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.settings-color-hex {
    color: white;
    font-family: monospace;
    font-size: 14px;
}

.settings-color-reset {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.6);
    padding: 6px 12px;
    font-size: 11px;
    cursor: pointer;
    border-radius: 3px;
}

/* Toggle button row (black/white) */
.settings-toggle-row {
    display: flex;
    gap: 8px;
}

.settings-toggle-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.6);
    padding: 8px 16px;
    font-size: 13px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.settings-toggle-btn:hover {
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

.settings-toggle-btn.active {
    background: var(--channel-accent, #ff0000);
    border-color: var(--channel-accent, #ff0000);
    color: white;
}

/* Pocket background options */
.settings-pocket-bg-options {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.settings-pocket-bg-options input[type="color"] {
    width: 50px;
    height: 36px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    cursor: pointer;
    background: transparent;
}

.settings-pocket-bg-options input[type="text"] {
    flex: 1;
    min-width: 200px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 10px 12px;
    font-size: 14px;
    border-radius: 4px;
}

.settings-pocket-bg-options .settings-hint {
    width: 100%;
    margin-top: 4px;
}

.settings-pocket-bg-preview {
    width: 120px;
    height: 68px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: none;
}

.settings-pocket-bg-preview.visible {
    display: block;
}

.settings-upload-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.8);
    padding: 10px 16px;
    font-size: 13px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.settings-upload-btn:hover {
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

.settings-color-reset:hover {
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

.settings-external-link-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

.settings-external-link-row select {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 12px;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
}

.settings-external-link-row select:focus {
    outline: none;
    border-color: var(--channel-accent, red);
}

.settings-external-link-row select option {
    background: #1a1a1a;
    color: white;
}

.settings-external-link-row input {
    flex: 1;
}

.settings-error {
    color: #ff6b6b;
    font-size: 12px;
    margin-top: 4px;
}

.settings-avatar-upload-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.8);
    padding: 12px 16px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.settings-avatar-upload-btn:hover {
    border-color: var(--preview-accent, var(--channel-accent));
    color: white;
}

.settings-avatar-upload-btn.uploading {
    opacity: 0.6;
    cursor: wait;
}

/* Admin Zone (site admin only) */
.settings-admin-zone {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(100, 200, 255, 0.3);
}

.settings-admin-header {
    color: rgba(100, 200, 255, 0.8);
    font-size: 12px;
    font-weight: bold;
    text-transform: lowercase;
    margin-bottom: 15px;
}

.settings-admin-btn {
    width: 100%;
    padding: 12px;
    background: rgba(100, 200, 255, 0.15);
    border: 1px solid rgba(100, 200, 255, 0.3);
    color: rgba(100, 200, 255, 0.9);
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    margin-bottom: 8px;
    transition: all 0.2s;
}

.settings-admin-btn:hover {
    background: rgba(100, 200, 255, 0.25);
    border-color: rgba(100, 200, 255, 0.5);
}

.settings-db-status {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 10px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.settings-db-status.error {
    color: rgba(255, 100, 100, 0.9);
    background: rgba(255, 100, 100, 0.1);
}

.settings-db-status.success {
    color: rgba(100, 255, 100, 0.9);
    background: rgba(100, 255, 100, 0.1);
}

/* Admin DB Indicator (floating, for hiccups) */
.admin-db-indicator {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 100, 100, 0.9);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    z-index: 9999;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    animation: pulse-indicator 2s infinite;
}

.admin-db-indicator .db-indicator-dot {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    animation: blink 1s infinite;
}

@keyframes pulse-indicator {
    0%, 100% { opacity: 0.9; }
    50% { opacity: 1; }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Shop Set Up Zone */
.settings-shop-zone {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(100, 180, 255, 0.3);
}

.settings-shop-header {
    color: rgba(100, 180, 255, 0.8);
    font-size: 12px;
    font-weight: bold;
    text-transform: lowercase;
    margin-bottom: 15px;
}

.settings-shop-btn {
    width: 100%;
    padding: 12px;
    background: rgba(100, 180, 255, 0.15);
    border: 1px solid rgba(100, 180, 255, 0.3);
    color: rgba(100, 180, 255, 0.9);
    border-radius: 6px;
    cursor: pointer;
}

.settings-shop-btn:hover {
    background: rgba(100, 180, 255, 0.25);
}

.settings-shop-btn.connected {
    background: rgba(100, 255, 150, 0.15);
    border-color: rgba(100, 255, 150, 0.3);
    color: rgba(100, 255, 150, 0.9);
    cursor: default;
}

/* Account Zone */
.settings-account-zone {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.settings-account-header {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    font-weight: bold;
    text-transform: lowercase;
    margin-bottom: 15px;
}

.settings-account-zone .settings-field {
    margin-bottom: 0;
}

.settings-account-zone .settings-field input[type="password"] {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 10px;
    font-size: 14px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.settings-account-zone .settings-field input[type="password"]:focus {
    outline: none;
    border-color: var(--channel-accent);
}

.settings-password-btn {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    margin-top: 8px;
}

.settings-password-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

.settings-success {
    color: rgba(100, 255, 100, 0.8);
    font-size: 12px;
    margin-top: 8px;
}

/* Danger Zone */
.settings-danger-zone {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 100, 100, 0.3);
}

.settings-danger-header {
    color: rgba(255, 100, 100, 0.8);
    font-size: 12px;
    font-weight: bold;
    text-transform: lowercase;
    margin-bottom: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.settings-danger-header:hover {
    color: rgba(255, 100, 100, 1);
}

.settings-danger-arrow {
    font-size: 10px;
    transition: transform 0.2s ease;
}

.settings-danger-arrow.open {
    transform: rotate(180deg);
}

.settings-danger-content {
    padding-top: 10px;
}

.settings-danger-btn {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(255, 100, 100, 0.5);
    background: transparent;
    color: rgba(255, 100, 100, 0.8);
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    margin-bottom: 8px;
}

.settings-danger-btn:hover {
    background: rgba(255, 100, 100, 0.1);
    border-color: rgba(255, 100, 100, 0.8);
    color: rgba(255, 100, 100, 1);
}

.settings-suspend-btn.suspended {
    background: rgba(255, 200, 100, 0.1);
    border-color: rgba(255, 200, 100, 0.5);
    color: rgba(255, 200, 100, 0.8);
}

.settings-delete-btn:hover {
    background: rgba(255, 50, 50, 0.2);
}

.settings-danger-zone .settings-hint {
    display: block;
    margin-bottom: 15px;
}

.settings-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 12px;
}

.settings-cancel {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
}

.settings-cancel:hover {
    border-color: rgba(255, 255, 255, 0.5);
}

.settings-save {
    background: var(--channel-accent);
    border: none;
    color: white;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
}

.settings-save:hover {
    opacity: 0.9;
}

/* Hide desktop-only elements on mobile */
@media screen and (max-width: 768px) {
    .settings-desktop-only,
    .desktop-only,
    #settingsNotebookBgField {
        display: none !important;
    }
}

/* Pocket Add Button - positioned inside inventory overlay */
.owner-add-btn.pocket-add {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
}

/* Pocket Uploader Overlay */
.pocket-uploader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.pocket-uploader-overlay.active {
    display: flex;
}

.pocket-uploader-container {
    background: var(--channel-accent, rgba(30, 30, 30, 0.98));
    border-radius: 16px;
    padding: 30px 35px;
    display: flex;
    flex-direction: column;
    gap: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.pocket-uploader-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    position: relative;
}

.pocket-uploader-header-tab {
    color: white;
    font-size: 18px;
    font-weight: normal;
    margin: 0;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s ease;
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
}

.pocket-uploader-header-tab:hover {
    opacity: 0.8;
}

.pocket-uploader-header-tab.active {
    opacity: 1;
}

.pocket-uploader-header-divider {
    color: rgba(255, 255, 255, 0.3);
    font-size: 18px;
}

.pocket-uploader-close {
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.pocket-uploader-close:hover {
    color: white;
}

.pocket-uploader-types {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.pocket-type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pocket-type-btn:hover,
.pocket-type-btn.selected {
    opacity: 0.7;
}

.pocket-type-icon {
    font-size: 28px;
    color: rgba(255, 255, 255, 0.7);
}

.pocket-type-icon svg {
    stroke: rgba(255, 255, 255, 0.7);
}

.pocket-type-btn:hover .pocket-type-icon svg,
.pocket-type-btn.selected .pocket-type-icon svg {
    stroke: white;
}

.pocket-type-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
}

.pocket-type-btn:hover .pocket-type-label,
.pocket-type-btn.selected .pocket-type-label {
    color: white;
}

/* Desktop-only pocket type buttons */
.pocket-type-desktop-only {
    display: flex;
}

@media (max-width: 768px) {
    .pocket-type-desktop-only {
        display: none;
    }
}

.pocket-uploader-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.pocket-input {
    width: 100%;
    padding: 12px 15px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 16px;
    border-radius: 4px;
    box-sizing: border-box;
}

.pocket-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
}

.pocket-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.pocket-uploader-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 10px;
}

.pocket-uploader-cancel,
.pocket-uploader-save {
    padding: 10px 24px;
    font-size: 14px;
    cursor: pointer;
    border: none;
    border-radius: 4px;
}

.pocket-uploader-cancel {
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.pocket-uploader-cancel:hover {
    color: white;
    border-color: rgba(255, 255, 255, 0.6);
}

.pocket-uploader-save {
    background: white;
    color: black;
}

.pocket-uploader-save:hover {
    background: rgba(255, 255, 255, 0.9);
}

.pocket-uploader-save:disabled {
    background: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
}

/* Or divider */
.pocket-or-divider {
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
    text-align: center;
    margin: 10px 0;
}

/* Helper text */
.pocket-helper-text {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    display: block;
    margin-top: 8px;
}

/* Save visibility dropdown */
.pocket-visibility-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
}

.pocket-visibility-row label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
}

.pocket-visibility-select {
    padding: 6px 12px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 13px;
    border-radius: 4px;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 14px;
    padding-right: 30px;
}

.pocket-visibility-select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
}

.pocket-visibility-select option {
    background: #1a1a1a;
    color: white;
}

/* Preview area */
.pocket-preview {
    margin-top: 10px;
}

/* Album images preview grid */
.album-images-preview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 12px;
    max-height: 200px;
    overflow-y: auto;
}

.album-images-preview .album-preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 4px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
}

.album-images-preview .album-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.album-images-preview .album-preview-item .album-preview-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.album-images-preview .album-preview-item:hover .album-preview-remove {
    opacity: 1;
}

.album-images-count {
    margin-top: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

/* Mobile styles for pocket uploader and note editor */
@media screen and (max-width: 768px) {
    .pocket-uploader-container {
        width: 90%;
        max-width: none;
        max-height: 90vh;
        overflow-y: auto;
        padding: 20px;
    }

    .pocket-uploader-header {
        flex-wrap: wrap;
        gap: 8px 15px;
    }

    .pocket-uploader-header-tab {
        font-size: 16px;
    }

    .pocket-uploader-header-divider {
        font-size: 16px;
    }

    .pocket-uploader-close {
        position: static;
        transform: none;
        order: -1;
        margin-left: auto;
        width: 100%;
        text-align: right;
        margin-bottom: -10px;
    }

    .pocket-uploader-types {
        flex-wrap: wrap;
        gap: 10px;
    }

    .pocket-type-btn {
        flex: 1 1 45%;
        padding: 15px 10px;
    }

    .pocket-input {
        font-size: 16px; /* Prevents iOS zoom */
    }

    .note-editor-container {
        width: 90%;
        max-width: calc(100vw - 40px);
        max-height: 90vh;
        overflow-y: auto;
        padding: 20px;
        box-sizing: border-box;
        background: rgba(0, 0, 0, 0.95);
        border-radius: 16px;
        border: 1px solid rgba(255, 255, 255, 0.15);
    }

    .note-editor-container textarea {
        min-height: 150px;
        font-size: 16px; /* Prevents iOS zoom */
        width: 100%;
        box-sizing: border-box;
    }

    .note-editor-upload-options {
        flex-direction: column;
        width: 100%;
    }

    .note-editor-upload-option {
        padding: 15px;
        width: 100%;
        box-sizing: border-box;
    }
}

/* Album Viewer - for viewing albums in pocket */
.pocket-album-viewer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1; /* Keep below fixed buttons */
}

.pocket-album-image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    overflow: hidden;
    padding: 20px;
    box-sizing: border-box;
    position: relative;
}

.pocket-album-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Tap zones for mobile album navigation */
.album-tap-zone {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40%;
    z-index: 10;
    cursor: pointer;
}

.album-tap-left {
    left: 0;
}

.album-tap-right {
    right: 0;
}

.pocket-album-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.5);
    width: 100%;
}

.pocket-album-nav-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.pocket-album-nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.pocket-album-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.pocket-album-counter {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    min-width: 60px;
    text-align: center;
}

/* Mobile: swipe navigation for albums */
@media (max-width: 768px) {
    .pocket-album-nav {
        padding: 10px;
        gap: 15px;
    }

    .pocket-album-nav-btn {
        padding: 8px 16px;
        font-size: 13px;
    }

    .pocket-album-image-container {
        padding: 10px;
    }
}

/* Album edit button in viewer nav */
.pocket-album-edit-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
}

.pocket-album-edit-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Desktop Album Scroll View - continuous vertical scroll through all images */
.pocket-album-scroll-viewer {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
}

.album-scroll-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.album-scroll-container::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.album-scroll-image-wrapper {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: black;
}

.album-scroll-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    display: block;
}

.album-scroll-nav {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 8px;
    z-index: 100;
}

/* Album Cover Preview - shown when navigating to album */
.pocket-album-cover {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    cursor: pointer;
    padding: 40px 20px;
    box-sizing: border-box;
}

.pocket-album-cover-image-container {
    position: relative;
    max-width: 300px;
    max-height: 300px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.pocket-album-cover-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pocket-album-cover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.pocket-album-cover:hover .pocket-album-cover-overlay {
    opacity: 1;
}

.pocket-album-cover-icon {
    color: white;
    opacity: 0.9;
}

.pocket-album-cover-info {
    margin-top: 24px;
    text-align: center;
}

.pocket-album-cover-name {
    font-size: 20px;
    font-weight: 500;
    color: white;
    margin-bottom: 8px;
}

.pocket-album-cover-count {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
}

@media screen and (max-width: 768px) {
    .pocket-album-cover-image-container {
        max-width: 200px;
        max-height: 200px;
    }

    .pocket-album-cover-name {
        font-size: 18px;
    }

    .pocket-album-cover-overlay {
        opacity: 1;
        background: rgba(0, 0, 0, 0.2);
    }
}

/* Album Grid View - shows thumbnails before enhanced view */
.pocket-album-grid {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pocket-album-grid-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.pocket-album-grid-title {
    font-size: 18px;
    font-weight: 500;
    color: white;
}

.pocket-album-grid-count {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
}

.pocket-album-grid-container {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    padding: 20px;
    overflow-y: auto;
    align-content: start;
}

.pocket-album-grid-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: visible;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.pocket-album-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.pocket-album-grid-item:hover {
    transform: scale(1.05);
}

/* Delete button in album grid - matches pocket grid delete style */
.pocket-album-grid-delete {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(200, 60, 60, 0.9);
    border: 2px solid white;
    color: white;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    z-index: 10;
}

.pocket-album-grid-item:hover .pocket-album-grid-delete {
    opacity: 1;
}

.pocket-album-grid-delete:hover {
    background: rgba(220, 40, 40, 1);
    transform: scale(1.1);
}

/* Add tile for adding more images to album */
.pocket-album-add-tile {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 8px;
}

.pocket-album-add-tile:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
}

.pocket-album-add-icon {
    font-size: 36px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 300;
}

.pocket-album-add-tile:hover .pocket-album-add-icon {
    color: rgba(255, 255, 255, 0.8);
}

/* Back to grid button in enhanced album view */
.pocket-album-back-btn {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
    z-index: 5;
}

.pocket-album-back-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Mobile adjustments for album grid */
@media (max-width: 768px) {
    .pocket-album-grid-container {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 8px;
        padding: 12px;
    }

    .pocket-album-grid-header {
        padding: 12px 15px;
    }

    .pocket-album-grid-title {
        font-size: 16px;
    }

    .pocket-album-grid-delete {
        opacity: 1; /* Always show on mobile */
    }

    .pocket-album-back-btn {
        top: 10px;
        left: 10px;
        padding: 6px 10px;
        font-size: 12px;
    }
}

/* Album Editor Overlay */
.album-editor-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 20;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
}

.album-editor-overlay.active {
    display: flex;
}

.album-editor-container {
    background: #1a1a1a;
    border-radius: 12px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.album-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.album-editor-header h2 {
    margin: 0;
    font-size: 18px;
    color: white;
    font-weight: 500;
}

.album-editor-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.album-editor-close:hover {
    color: white;
}

.album-editor-hint {
    margin: 0;
    padding: 12px 20px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

.album-editor-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 0 20px 20px;
    overflow-y: auto;
    flex: 1;
}

.album-editor-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: grab;
    border: 2px solid transparent;
    transition: border-color 0.2s, transform 0.2s, opacity 0.2s;
}

.album-editor-item:active {
    cursor: grabbing;
}

.album-editor-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.album-editor-item-num {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
}

.album-editor-item.dragging {
    opacity: 0.3;
    transform: scale(0.95);
}

.album-editor-item.drag-over {
    border-color: #4a9eff;
    transform: scale(1.05);
}

.album-editor-ghost {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
}

.album-editor-ghost img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.album-editor-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.album-editor-cancel {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.7);
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.album-editor-cancel:hover {
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

.album-editor-save {
    background: #4a9eff;
    border: none;
    color: white;
    padding: 10px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.album-editor-save:hover {
    background: #3a8eef;
}

.album-editor-save:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Responsive album editor */
@media (max-width: 768px) {
    .album-editor-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .album-editor-container {
        max-height: 80vh;
    }
}

@media (max-width: 480px) {
    .album-editor-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Upload button */
.pocket-upload-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 20px;
    background: transparent;
    border: 1px dashed rgba(255, 255, 255, 0.4);
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.pocket-upload-btn:hover {
    border-color: white;
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.pocket-upload-btn svg {
    stroke: currentColor;
}

.pocket-upload-btn-small {
    width: auto;
    padding: 10px 16px;
    font-size: 13px;
}

/* File uploaded indicator */
.pocket-file-uploaded {
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.pocket-file-name {
    word-break: break-all;
}

/* Thumbnail section */
.pocket-thumbnail-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.pocket-thumbnail-section label {
    display: block;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    margin-bottom: 10px;
}

/* =========================
   SCREENING OVERLAY
   Synchronized movie screenings
   ========================= */

.screening-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 6; /* Above pocket overlay */
    background: black;
    display: flex;
    align-items: center;
    justify-content: center;
}

.screening-overlay.hidden {
    display: none;
}

/* Countdown state */
.screening-countdown {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
}

.screening-countdown.hidden {
    display: none;
}

/* Curtain graphic - gradient panels on left and right */
.screening-curtains {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
}

/* Left curtain - gradient from accent color to transparent */
.screening-curtains::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 25%;
    background: linear-gradient(
        to right,
        var(--channel-accent, #661111) 0%,
        var(--channel-accent, #661111) 20%,
        rgba(0, 0, 0, 0.8) 60%,
        transparent 100%
    );
}

/* Right curtain - gradient from accent color to transparent */
.screening-curtains::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 25%;
    background: linear-gradient(
        to left,
        var(--channel-accent, #661111) 0%,
        var(--channel-accent, #661111) 20%,
        rgba(0, 0, 0, 0.8) 60%,
        transparent 100%
    );
}

/* Hide the fold divs - using pseudo-elements instead */
.curtain, .curtain-fold {
    display: none;
}

/* Countdown content on top of curtains */
.screening-countdown-content {
    position: relative;
    z-index: 1;
}

/* Voice chat label */
.voice-chat-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 8px;
    text-transform: lowercase;
}

.screening-countdown-title {
    font-size: 28px;
    font-weight: 300;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.9);
}

.screening-countdown-channel {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 50px;
}

.screening-countdown-timer {
    font-size: 80px;
    font-weight: 200;
    font-variant-numeric: tabular-nums;
    letter-spacing: 4px;
    color: white;
}

.screening-countdown-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 20px;
}

.screening-waiting-for {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 30px;
}

.screening-waiting-for:empty {
    display: none;
}

/* Voice chat during countdown */
.screening-voice-chat {
    position: fixed;
    bottom: 25%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 999998;
    pointer-events: auto;
}

/* On mobile, move voice chat even higher */
@media (max-width: 768px) {
    .screening-voice-chat {
        bottom: 35%;
    }
}

/* Voice chat during live playback (centered on screen) */
.screening-voice-chat-live {
    position: fixed;
    bottom: 50%;
    left: 50%;
    transform: translate(-50%, 50%);
    z-index: 100000;
    background: rgba(0, 0, 0, 0.8);
    padding: 20px 30px;
    border-radius: 12px;
}

.voice-chat-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    position: relative;
    color: white;
    pointer-events: auto !important;
    z-index: 999999;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.3);
    touch-action: manipulation;
}

.voice-chat-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.voice-chat-btn.muted {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    opacity: 0.6;
}

.voice-chat-btn.muted::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 30px;
    background: rgba(255, 100, 100, 0.9);
    transform: rotate(45deg);
    border-radius: 2px;
}

.voice-chat-btn:not(.muted) {
    background: rgba(100, 200, 100, 0.3);
    border-color: rgba(100, 200, 100, 0.5);
    animation: pulse-mic 2s infinite;
}

@keyframes pulse-mic {
    0%, 100% { box-shadow: 0 0 0 0 rgba(100, 200, 100, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(100, 200, 100, 0); }
}

.voice-icon {
    font-size: 20px;
    position: relative;
}

.voice-chat-participants {
    display: flex;
    gap: 8px;
}

.voice-participant {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transition: all 0.15s ease;
}

.voice-participant.speaking {
    background: rgba(100, 255, 150, 0.8);
    box-shadow: 0 0 8px rgba(100, 255, 150, 0.5);
}

.voice-chat-joining {
    font-family: 'Times New Roman', Times, serif;
    font-style: italic;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
}

/* Voice viewer count - upper left during voice chat period */
.voice-viewer-count {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 9999;
    font-family: 'Times New Roman', Times, serif;
    font-style: italic;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    gap: 8px;
}

.voice-viewer-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(100, 255, 150, 0.8);
    box-shadow: 0 0 6px rgba(100, 255, 150, 0.5);
    animation: voice-pulse 2s ease-in-out infinite;
}

@keyframes voice-pulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

/* Live playback state */
.screening-live {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.screening-live.hidden {
    display: none;
}

.screening-video {
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Ended state */
.screening-ended {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.screening-ended.hidden {
    display: none;
}

.screening-ended-title {
    font-size: 24px;
    font-weight: 300;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.6);
}

.screening-ended-message {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.4);
}

/* Viewer count - positioned above age daily text */
.screening-viewer-count {
    position: fixed;
    bottom: 145px;
    left: 10px;
    display: none; /* Hidden by default, shown when screening active */
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    z-index: 100001; /* Above screening overlay content */
    transition: opacity 0.3s ease;
    background: rgba(0, 0, 0, 0.6);
    padding: 6px 10px;
    border-radius: 6px;
}

/* Show viewer count when screening overlay is active (not hidden) */
.screening-overlay:not(.hidden) .screening-viewer-count {
    display: flex;
}

.viewer-dot {
    width: 8px;
    height: 8px;
    background: #e74c3c;
    border-radius: 50%;
    animation: viewer-pulse 1.5s infinite;
}

@keyframes viewer-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Fullscreen button - bottom right, minimal */
.screening-fullscreen-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: white;
    padding: 8px;
    cursor: pointer;
    z-index: 99999;
    transition: opacity 0.2s ease;
    opacity: 0.7;
    pointer-events: auto !important;
}

.screening-fullscreen-btn:hover {
    opacity: 1;
}

.screening-fullscreen-btn svg {
    display: block;
    width: 28px;
    height: 28px;
}

/* Now Playing indicator - upper left */
.screening-now-playing {
    position: fixed;
    top: 20px;
    left: 20px;
    color: white;
    font-size: 14px;
    font-family: Arial, sans-serif;
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.screening-now-playing span {
    font-style: italic;
}

/* Hide UI when fullscreen */
.screening-overlay:fullscreen .screening-fullscreen-btn,
.screening-overlay:-webkit-full-screen .screening-fullscreen-btn {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.screening-overlay:fullscreen:hover .screening-fullscreen-btn,
.screening-overlay:-webkit-full-screen:hover .screening-fullscreen-btn {
    opacity: 1;
}

.screening-overlay:fullscreen .screening-viewer-count,
.screening-overlay:-webkit-full-screen .screening-viewer-count {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.screening-overlay:fullscreen:hover .screening-viewer-count,
.screening-overlay:-webkit-full-screen:hover .screening-viewer-count {
    opacity: 1;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .screening-countdown-title {
        font-size: 22px;
        padding: 0 20px;
    }

    .screening-countdown-timer {
        font-size: 48px;
    }

    .screening-fullscreen-btn {
        display: none !important; /* Auto-fullscreen on landscape, no need for button */
    }

    .screening-viewer-count {
        bottom: 80px;
        left: 10px;
    }
}

/* Hide UI elements when screening overlay is visible (landscape/desktop only) */
@media screen and (min-width: 1025px), screen and (orientation: landscape) {
    body:has(.screening-overlay:not(.hidden)) .channel-info-display,
    body:has(.screening-overlay:not(.hidden)) .channel-avatar-container,
    body:has(.screening-overlay:not(.hidden)) .header-info,
    body:has(.screening-overlay:not(.hidden)) .channel-video-title,
    body:has(.screening-overlay:not(.hidden)) .landscape-channel-name,
    body:has(.screening-overlay:not(.hidden)) .typo-controls,
    body:has(.screening-overlay:not(.hidden)) #ageDaily,
    body:has(.screening-overlay:not(.hidden)) #homeIndexButtons,
    body:has(.screening-overlay:not(.hidden)) #ownerButtons,
    body:has(.screening-overlay:not(.hidden)) .channel-nav-arrows,
    body:has(.screening-overlay:not(.hidden)) .desktop-logout {
        opacity: 0 !important;
        pointer-events: none !important;
        transition: opacity 0.3s ease;
    }

    /* Hide viewer counter on desktop during screening */
    body:has(.screening-overlay:not(.hidden)) .screening-viewer-count,
    body.screening-active .screening-viewer-count {
        display: none !important;
    }

    /* Show channel avatar and info on hover during screening */
    body:has(.screening-overlay:not(.hidden)):hover .channel-avatar-container,
    body:has(.screening-overlay:not(.hidden)):hover .channel-info-display,
    body:has(.screening-overlay:not(.hidden)):hover .typo-controls,
    body:has(.screening-overlay:not(.hidden)):hover #ageDaily,
    body:has(.screening-overlay:not(.hidden)):hover #homeIndexButtons,
    body:has(.screening-overlay:not(.hidden)):hover #ownerButtons,
    body:has(.screening-overlay:not(.hidden)):hover .channel-nav-arrows,
    body:has(.screening-overlay:not(.hidden)):hover .desktop-logout,
    body.screening-active:hover .channel-avatar-container,
    body.screening-active:hover .channel-info-display,
    body.screening-active:hover .typo-controls,
    body.screening-active:hover #ageDaily,
    body.screening-active:hover #homeIndexButtons,
    body.screening-active:hover #ownerButtons,
    body.screening-active:hover .channel-nav-arrows,
    body.screening-active:hover .desktop-logout {
        opacity: 1 !important;
        pointer-events: auto !important;
    }

    /* Show big centered channel name on hover during screening - like channel-preview style */
    body:has(.screening-overlay:not(.hidden)):hover .channel-preview-info,
    body.screening-active:hover .channel-preview-info {
        display: block !important;
        opacity: 1 !important;
        pointer-events: none !important;
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        z-index: 100010 !important;
        text-align: center !important;
    }

    body:has(.screening-overlay:not(.hidden)):hover .channel-preview-info h1,
    body.screening-active:hover .channel-preview-info h1 {
        color: var(--channel-accent) !important;
        font-size: 32px !important;
        text-decoration: underline !important;
        margin: 0 !important;
    }

    /* Hide the bio part during screening hover */
    body:has(.screening-overlay:not(.hidden)):hover .channel-preview-info .bio,
    body.screening-active:hover .channel-preview-info .bio {
        display: none !important;
    }

    /* Keep small landscape name hidden during screening */
    body:has(.screening-overlay:not(.hidden)) .landscape-channel-name,
    body.screening-active .landscape-channel-name {
        display: none !important;
    }

    /* Grey out pause/skip buttons during screening, but keep mute visible */
    body:has(.screening-overlay:not(.hidden)) #typoPauseBtn,
    body:has(.screening-overlay:not(.hidden)) #typoSkipBtn,
    body.screening-active #typoPauseBtn,
    body.screening-active #typoSkipBtn {
        opacity: 0.3 !important;
        pointer-events: none !important;
    }

    /* Hide name/location from channel info during screening */
    body:has(.screening-overlay:not(.hidden)) .channel-info-name,
    body:has(.screening-overlay:not(.hidden)) .channel-info-location,
    body.screening-active .channel-info-name,
    body.screening-active .channel-info-location {
        display: none !important;
    }

    /* Hide Now Playing indicator */
    .screening-now-playing {
        display: none !important;
    }

    /* Position channel info links near fullscreen button during screening */
    body:has(.screening-overlay:not(.hidden)):hover .channel-info-display,
    body.screening-active:hover .channel-info-display {
        position: fixed !important;
        bottom: 20px !important;
        right: 70px !important;
        left: auto !important;
        top: auto !important;
        background: transparent !important;
        padding: 0 !important;
    }

    body:has(.screening-overlay:not(.hidden)):hover .channel-info-links,
    body.screening-active:hover .channel-info-links {
        display: flex !important;
        gap: 12px !important;
    }

    /* Hide Caveh-specific links during screening */
    body:has(.screening-overlay:not(.hidden)) .caveh-links,
    body.screening-active .caveh-links {
        display: none !important;
    }

    /* Ensure close buttons are visible during screening - position upper right */
    body:has(.screening-overlay:not(.hidden)) .notes-close-btn,
    body:has(.screening-overlay:not(.hidden)) .pocket-close-btn,
    body:has(.screening-overlay:not(.hidden)) .pocket-close-x,
    body.screening-active .notes-close-btn,
    body.screening-active .pocket-close-btn,
    body.screening-active .pocket-close-x {
        display: block !important;
        opacity: 1 !important;
        z-index: 100010 !important;
        position: fixed !important;
        top: 20px !important;
        right: 20px !important;
        left: auto !important;
        background: transparent !important;
        border: none !important;
        color: rgba(255, 255, 255, 0.6) !important;
        font-size: 32px !important;
        cursor: pointer !important;
        padding: 10px !important;
        line-height: 1 !important;
    }

    body:has(.screening-overlay:not(.hidden)) .pocket-close-x:hover,
    body.screening-active .pocket-close-x:hover {
        color: white !important;
    }

    /* Ensure pocket viewing overlay is above screening */
    body:has(.screening-overlay:not(.hidden)) .pocket-viewing-overlay.active,
    body.screening-active .pocket-viewing-overlay.active {
        z-index: 100005 !important;
    }

    /* Ensure notes overlay is above screening */
    body:has(.screening-overlay:not(.hidden)) .notes-viewing-overlay,
    body.screening-active .notes-viewing-overlay {
        z-index: 100005 !important;
    }

    /* Ensure inventory overlay (pocket grid) is above screening */
    body:has(.screening-overlay:not(.hidden)) .inventory-overlay,
    body.screening-active .inventory-overlay {
        z-index: 100005 !important;
    }

    /* Grey out video items in pocket during screening */
    body:has(.screening-overlay:not(.hidden)) .inventory-item[data-type="video"],
    body.screening-active .inventory-item[data-type="video"] {
        opacity: 0.3 !important;
        pointer-events: none !important;
    }

    /* Hide skip buttons for ALL users during screening (desktop/landscape) - pause just gets greyed out */
    body:has(.screening-overlay:not(.hidden)) #typoPrevBtn,
    body:has(.screening-overlay:not(.hidden)) #typoNextBtn,
    body:has(.screening-overlay:not(.hidden)) .mobile-prev-btn,
    body:has(.screening-overlay:not(.hidden)) .mobile-next-btn,
    body:has(.screening-overlay:not(.hidden)) .mobile-pause-btn {
        display: none !important;
    }
}

/* Grey out skip and pause buttons for ALL users during screening (all screen sizes) */
body:has(.screening-overlay:not(.hidden)) #typoPrevBtn,
body:has(.screening-overlay:not(.hidden)) #typoNextBtn,
body:has(.screening-overlay:not(.hidden)) #typoPauseBtn,
body:has(.screening-overlay:not(.hidden)) #typoSkipBtn,
body:has(.screening-overlay:not(.hidden)) .mobile-prev-btn,
body:has(.screening-overlay:not(.hidden)) .mobile-next-btn,
body:has(.screening-overlay:not(.hidden)) .mobile-pause-btn,
body.screening-active #typoPrevBtn,
body.screening-active #typoNextBtn,
body.screening-active #typoPauseBtn,
body.screening-active #typoSkipBtn,
body.screening-active .mobile-prev-btn,
body.screening-active .mobile-next-btn,
body.screening-active .mobile-pause-btn {
    opacity: 0.3 !important;
    pointer-events: none !important;
}

/* Hide Caveh-specific links during screening (all screen sizes) */
body:has(.screening-overlay:not(.hidden)) .caveh-links,
body:has(.screening-overlay:not(.hidden)) #channelInfoTV,
body:has(.screening-overlay:not(.hidden)) #channelInfoFilm,
body.screening-active .caveh-links,
body.screening-active #channelInfoTV,
body.screening-active #channelInfoFilm {
    display: none !important;
}

/* Fullscreen button - default hidden */
.screening-fullscreen-btn {
    opacity: 0 !important;
    transition: opacity 0.3s ease;
}

body:has(.screening-overlay:not(.hidden)):hover .screening-fullscreen-btn,
.screening-overlay:not(.hidden):hover ~ .screening-fullscreen-btn {
    opacity: 0.7 !important;
}

.screening-fullscreen-btn:hover {
    opacity: 1 !important;
}

/* Screening owner controls (upper right) */
.screening-owner-controls {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 100002;
    backdrop-filter: blur(10px);
}

.screening-owner-cancel {
    color: rgba(255, 100, 100, 0.9);
    cursor: pointer;
}

.screening-owner-cancel:hover {
    color: rgba(255, 100, 100, 1);
    text-decoration: underline;
}

/* Show for owners during screening - both desktop and mobile */
body.owner-mode:has(.screening-overlay:not(.hidden)) .screening-owner-controls,
body.owner-mode.screening-active .screening-owner-controls {
    display: block;
}

/* Channel info screening display */
.channel-screening-info {
    font-size: 13px;
    color: white;
    font-weight: bold;
    margin-top: 8px;
    line-height: 1.4;
}

/* Fixed screening countdown - upper left corner */
.screening-countdown-fixed {
    position: fixed;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 18px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    font-variant-numeric: tabular-nums;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.screening-countdown-fixed.waiting {
    color: rgba(241, 196, 15, 0.9);
}

/* Screening action links (edit | cancel) */
.channel-screening-actions {
    font-size: 12px;
    margin-top: 4px;
    pointer-events: auto;
}

.channel-screening-edit {
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
}

.channel-screening-edit:hover {
    color: white;
    text-decoration: underline;
}

.channel-screening-divider {
    color: rgba(255, 255, 255, 0.4);
    margin: 0 6px;
}

.channel-screening-cancel {
    color: rgba(255, 100, 100, 0.8);
    cursor: pointer;
}

.channel-screening-cancel:hover {
    color: rgba(255, 100, 100, 1);
    text-decoration: underline;
}

/* Edit Screening Modal */
.edit-screening-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.edit-screening-content {
    background: #1a1a1a;
    padding: 24px;
    border-radius: 12px;
    min-width: 280px;
}

.edit-screening-content h3 {
    margin: 0 0 20px 0;
    color: white;
    font-size: 18px;
}

.edit-screening-field {
    margin-bottom: 16px;
}

.edit-screening-field label {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    margin-bottom: 6px;
}

.edit-screening-field input {
    width: 100%;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 14px;
    box-sizing: border-box;
}

.edit-screening-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.edit-screening-buttons button {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    background: white;
    color: black;
}

.edit-screening-buttons button.cancel-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* ============================================
   THUMBPRINT LOGIN
   ============================================ */

/* Thumbprint Login Icon - Mobile Only */
.thumbprint-login {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 310px;
    width: 54px;
    height: 54px;
    z-index: 1000;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

@media screen and (max-width: 1024px) and (orientation: portrait) {
    .thumbprint-login {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

.thumbprint-icon {
    width: 42px;
    height: 42px;
    fill: var(--channel-accent);
    opacity: 0.6;
    transition: opacity 0.3s, transform 0.3s;
}

.thumbprint-login:active .thumbprint-icon,
.thumbprint-login.pressing .thumbprint-icon {
    opacity: 1;
    transform: scale(1.1);
}

/* Scanning animation ring */
.thumbprint-scanning {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 54px;
    height: 54px;
    border: 2px solid transparent;
    border-radius: 50%;
    pointer-events: none;
}

.thumbprint-scanning.active {
    border-color: var(--channel-accent);
    animation: thumbprint-scan 1.5s ease-in-out forwards;
}

@keyframes thumbprint-scan {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0;
        border-color: var(--channel-accent);
    }
    20% {
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
        border-color: rgba(0, 255, 0, 0.8);
    }
}

.thumbprint-scanning.success {
    animation: thumbprint-success 0.5s ease-out forwards;
}

@keyframes thumbprint-success {
    0% {
        transform: translate(-50%, -50%) scale(1);
        border-color: rgba(0, 255, 0, 0.8);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        border-color: rgba(0, 255, 0, 0);
        opacity: 0;
    }
}

/* Note: thumbprint is always visible on mobile, shows sign-out when logged in */

/* Login Overlay */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

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

.login-container {
    width: 90%;
    max-width: 400px;
    padding: 30px;
}

.login-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.login-header h2 {
    color: red;
    font-size: 18px;
    font-weight: normal;
    margin: 0;
}

.login-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    opacity: 0.7;
    line-height: 1;
}

.login-close:hover {
    opacity: 1;
}

.login-field {
    margin-bottom: 20px;
}

.login-field label {
    display: block;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    margin-bottom: 8px;
}

.login-field input {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 16px;
    border-radius: 4px;
    box-sizing: border-box;
}

.login-field input:focus {
    outline: none;
    border-color: red;
}

.login-error {
    color: #ff6b6b;
    font-size: 13px;
    margin-bottom: 15px;
    display: none;
}

.login-error.visible {
    display: block;
}

.login-success {
    color: #4ade80;
    font-size: 13px;
    margin-bottom: 15px;
    display: none;
}

.login-success.visible {
    display: block;
}

.login-actions {
    display: flex;
    gap: 12px;
    margin-top: 25px;
}

.login-invitation-note {
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-style: italic;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    margin-top: 20px;
    margin-bottom: 0;
}

.login-cancel {
    flex: 1;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.7);
    padding: 12px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
}

.login-cancel:hover {
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

.login-submit {
    flex: 1;
    background: red;
    border: none;
    color: white;
    padding: 12px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
}

.login-submit:hover {
    background: #cc0000;
}

.login-submit:disabled {
    background: rgba(255, 0, 0, 0.4);
    cursor: not-allowed;
}

/* Sign-out overlay - uses owner's accent color */
#signOutOverlay .login-header h2 {
    color: var(--owner-accent, red);
}

#signOutOverlay .login-submit {
    background: var(--owner-accent, red);
}

#signOutOverlay .login-submit:hover {
    filter: brightness(0.85);
}

.signout-message {
    text-align: center;
    padding: 20px 0;
}

.signout-message p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    margin: 10px 0;
}

.signout-message span {
    color: var(--owner-accent, red);
    font-weight: 500;
}

/* Hide thumbprint when overlays are open */
body:has(.notes-viewing-overlay.active) .thumbprint-login,
body:has(.pocket-viewing-overlay.active) .thumbprint-login,
body:has(.login-overlay.active) .thumbprint-login {
    display: none !important;
}

/* ============================================================================
   ONBOARDING MESSAGES - New user welcome messages
   ============================================================================ */

.onboarding-message {
    position: fixed;
    z-index: 999999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

.onboarding-message.visible {
    opacity: 1;
}

/* Desktop: Times italic, large like John Tottenham header (120px) */
@media screen and (min-width: 1025px) {
    .onboarding-welcome {
        top: 20px;
        left: 20px;
        font-family: 'Times New Roman', Times, Georgia, serif;
        font-style: italic;
        font-size: 120px;
        line-height: 0.9;
        color: white;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    }

    .onboarding-notebook,
    .onboarding-pocket {
        font-family: 'Times New Roman', Times, Georgia, serif;
        font-style: italic;
        font-size: 60px;
        line-height: 1.1;
        color: white;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    }

    .onboarding-notebook {
        top: 80px;
        left: 50%;
        transform: translateX(-50%);
        text-align: center;
        max-width: 800px;
    }

    .onboarding-pocket {
        top: 80px;
        left: 50%;
        transform: translateX(-50%);
        text-align: center;
        max-width: 900px;
    }
}

/* Mobile: Times italic, sized like mobile shop header (40px) */
@media screen and (max-width: 1024px) {
    .onboarding-welcome {
        top: 15px;
        left: 15px;
        right: 15px;
        font-family: 'Times New Roman', Times, Georgia, serif;
        font-style: italic;
        font-size: 40px;
        line-height: 0.9;
        color: white;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    }

    .onboarding-notebook,
    .onboarding-pocket {
        font-family: 'Times New Roman', Times, Georgia, serif;
        font-style: italic;
        font-size: 24px;
        line-height: 1.1;
        color: white;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
        text-align: center;
        padding: 0 20px;
    }

    .onboarding-notebook {
        top: 70px;
        left: 0;
        right: 0;
    }

    .onboarding-pocket {
        top: 70px;
        left: 0;
        right: 0;
    }
}

/* ============================================================================
   PROMO MODAL - Screening promotional images
   ============================================================================ */

.promo-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 100000;
    overflow-y: auto;
    padding: 20px;
}

.promo-modal.active {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.promo-modal-content {
    background: #1a1a1a;
    border-radius: 12px;
    padding: 24px;
    max-width: 800px;
    width: 100%;
    margin: 40px auto;
}

.promo-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-family: 'Times New Roman', Times, serif;
    font-style: italic;
    font-size: 24px;
    color: white;
}

.promo-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 32px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.7;
}

.promo-modal-close:hover {
    opacity: 1;
}

.promo-modal-subtitle {
    font-family: Arial, sans-serif;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 24px;
}

.promo-images {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
}

.promo-image-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.promo-image-container canvas {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

#promoSquare, #promoSquareFlat {
    width: 200px;
    height: 200px;
}

#promoStory, #promoStoryFlat {
    width: 130px;
    height: 230px;
}

.promo-download-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-family: Arial, sans-serif;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.promo-download-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

@media screen and (max-width: 600px) {
    .promo-images {
        flex-direction: column;
        align-items: center;
    }

    #promoSquare, #promoSquareFlat {
        width: 180px;
        height: 180px;
    }

    #promoStory, #promoStoryFlat {
        width: 120px;
        height: 213px;
    }
}
/* ============================================================================
   MESSAGING SYSTEM
   ============================================================================ */

/* Messages badge on button */
.messages-badge {
    background: var(--channel-accent);
    color: black;
    font-size: 10px;
    font-weight: bold;
    padding: 1px 5px;
    border-radius: 8px;
    margin-left: 4px;
}

.messages-badge:empty {
    display: none;
}

/* Message button in channel info (styled like pocket) */
.channel-info-message {
    font-size: 12px;
    opacity: 0.8;
    text-decoration: underline;
    cursor: pointer;
    display: block;
    transition: opacity 0.3s ease;
    pointer-events: auto;
    position: relative;
    z-index: 250;
    padding: 8px;
    padding-top: 4px;
    padding-bottom: 4px;
    margin-left: -8px;
}

.channel-info-message:hover {
    opacity: 1;
}

.channel-info-message:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

/* Messages Inbox Overlay */
.messages-overlay {
    position: fixed;
    top: 0;
    right: 0;
    width: 350px;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 600;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.messages-overlay.open {
    transform: translateX(0);
}

.messages-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 18px;
}

.messages-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.messages-close:hover {
    opacity: 1;
}

.messages-compose-btn {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    color: var(--channel-accent);
    font-size: 14px;
    transition: background 0.2s;
}

.messages-compose-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.messages-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
}

.messages-empty {
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    padding: 40px 20px;
    font-size: 14px;
}

/* Conversation thread item */
.message-thread {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    gap: 12px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s;
}

.message-thread:hover {
    background: rgba(255, 255, 255, 0.05);
}

.message-thread.unread {
    background: rgba(255, 255, 255, 0.03);
}

.message-thread-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.message-thread-content {
    flex: 1;
    min-width: 0;
}

.message-thread-name {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}

.message-thread.unread .message-thread-name {
    font-weight: 700;
}

.message-thread-preview {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.message-thread-time {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
}

.message-thread-unread-dot {
    width: 8px;
    height: 8px;
    background: var(--channel-accent);
    border-radius: 50%;
    flex-shrink: 0;
}

/* Compose Message Modal */
.compose-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 700;
    display: none;
    align-items: center;
    justify-content: center;
}

.compose-modal.open {
    display: flex;
}

.compose-container {
    background: rgba(20, 20, 20, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    width: 90%;
    max-width: 450px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.compose-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 16px;
}

.compose-close {
    background: none;
    border: none;
    color: white;
    font-size: 22px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.compose-close:hover {
    opacity: 1;
}

.compose-form {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.compose-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.compose-field label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: lowercase;
}

.compose-recipient-field {
    position: relative;
}

.compose-field input[type="text"] {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 12px;
    color: white;
    font-family: Arial, sans-serif;
    font-size: 14px;
}

.compose-field input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
}

.compose-field input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.compose-field textarea {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 12px;
    color: white;
    font-family: Arial, sans-serif;
    font-size: 14px;
    resize: vertical;
    min-height: 100px;
}

.compose-field textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
}

.compose-field textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* Recipient autocomplete dropdown */
.recipient-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(30, 30, 30, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 200px;
    overflow-y: auto;
    display: none;
    z-index: 10;
}

.recipient-dropdown.visible {
    display: block;
}

.recipient-option {
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.recipient-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.recipient-option-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.recipient-option-name {
    font-size: 14px;
}

.recipient-option-title {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-left: 6px;
}

/* Image preview */
.compose-image-preview {
    display: none;
}

.compose-image-preview.visible {
    display: block;
}

.compose-image-preview img {
    max-width: 100%;
    max-height: 150px;
    border-radius: 4px;
}

.compose-image-preview .remove-image {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.compose-actions {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
}

.compose-attach {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
    padding: 10px 16px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.compose-attach:hover {
    border-color: rgba(255, 255, 255, 0.4);
    color: white;
}

.compose-send {
    background: var(--channel-accent);
    border: none;
    color: black;
    padding: 10px 24px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
}

.compose-send:hover {
    opacity: 0.9;
}

.compose-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.compose-error {
    color: #ff6b6b;
    font-size: 13px;
    text-align: center;
}

/* Conversation View Modal */
.conversation-modal {
    position: fixed;
    top: 0;
    right: 0;
    width: 350px;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 650;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.conversation-modal.open {
    transform: translateX(0);
}

.conversation-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.conversation-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 16px;
}

.conversation-back {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.7;
    padding: 0 5px;
}

.conversation-back:hover {
    opacity: 1;
}

.conversation-header span {
    flex: 1;
}

.conversation-close {
    background: none;
    border: none;
    color: white;
    font-size: 22px;
    cursor: pointer;
    opacity: 0.7;
}

.conversation-close:hover {
    opacity: 1;
}

.conversation-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.conversation-message {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.4;
}

.conversation-message.sent {
    align-self: flex-end;
    background: var(--channel-accent);
    color: black;
    border-bottom-right-radius: 4px;
}

.conversation-message.received {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-bottom-left-radius: 4px;
}

.conversation-message img {
    max-width: 100%;
    border-radius: 8px;
    margin-top: 8px;
}

.conversation-message-time {
    font-size: 10px;
    opacity: 0.6;
    margin-top: 4px;
}

.conversation-compose {
    padding: 15px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.conversation-compose textarea {
    width: 100%;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 10px;
    color: white;
    font-family: Arial, sans-serif;
    font-size: 14px;
    resize: none;
    min-height: 60px;
    box-sizing: border-box;
}

.conversation-compose textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
}

.conversation-compose textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.conversation-image-preview {
    display: none;
    margin: 10px 0;
}

.conversation-image-preview.visible {
    display: block;
}

.conversation-image-preview img {
    max-width: 100%;
    max-height: 100px;
    border-radius: 4px;
}

.conversation-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.conversation-attach {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
}

.conversation-attach:hover {
    border-color: rgba(255, 255, 255, 0.4);
    color: white;
}

.conversation-send {
    background: var(--channel-accent);
    border: none;
    color: black;
    padding: 8px 18px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
}

.conversation-send:hover {
    opacity: 0.9;
}

/* Mobile responsive */
@media screen and (max-width: 768px) {
    .messages-overlay,
    .conversation-modal {
        width: 100%;
    }

    .compose-container {
        width: 95%;
        max-height: 90vh;
    }
}

/* Mobile landscape screening - fullscreen video experience */
@media screen and (max-width: 1024px) and (orientation: landscape) {
    body.screening-active .screening-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        z-index: 99999;
    }

    body.screening-active .screening-video {
        width: 100vw;
        height: 100vh;
        object-fit: contain;
    }

    /* Hide all other UI elements during screening in landscape */
    body.screening-active .channel-avatar-container,
    body.screening-active .channel-info-display,
    body.screening-active .header-info,
    body.screening-active .typo-controls,
    body.screening-active .mobile-controls,
    body.screening-active .age-daily-text,
    body.screening-active .channel-video-title,
    body.screening-active .screening-viewer-count,
    body.screening-active .screening-countdown-fixed,
    body.screening-active .screening-now-playing,
    body.screening-active .screening-fullscreen-btn {
        display: none !important;
    }
}

/* ============================================================================
   SHOP - Stripe Connect Seller Shop Styles
   ============================================================================ */

/* Shop Tab in Pocket */
#pocketTabShop {
    /* Inherits .pocket-tab styles */
}

/* Shop Container in Pocket */
.pocket-shop-container {
    display: none;
    padding: 120px 20px 120px 20px;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
    overflow-y: auto;
    height: 100%;
    box-sizing: border-box;
}

/* Setup Banner - shown to owners without Stripe connected */
.shop-setup-banner {
    display: none;
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    margin-bottom: 30px;
}

.shop-setup-banner p {
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 20px 0;
    font-size: 15px;
}

.shop-setup-banner button {
    background: white;
    color: black;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
}

.shop-setup-banner button:hover {
    opacity: 0.9;
}

.shop-setup-banner button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Products Grid */
.shop-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.shop-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    padding: 60px 20px;
    font-style: italic;
}

/* Product Card */
.shop-product-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

.shop-product-card:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.08);
}

.shop-product-card.draft {
    opacity: 0.6;
}

.shop-product-image {
    position: relative;
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.03);
    overflow: hidden;
}

.shop-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.shop-product-image .no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: rgba(255, 255, 255, 0.3);
    font-size: 11px;
}

.draft-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(255, 165, 0, 0.9);
    color: white;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: bold;
    text-transform: uppercase;
}

.shop-product-info {
    padding: 12px;
}

.shop-product-info h3 {
    margin: 0 0 6px 0;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shop-product-price {
    font-size: 16px;
    font-weight: bold;
    margin: 0;
    color: #4ade80;
}

.shop-product-stock {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    margin: 4px 0 0 0;
}

/* Add Product Button */
.shop-add-btn {
    display: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    color: black;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    position: fixed;
    bottom: 100px;
    right: 20px;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.shop-add-btn:hover {
    transform: scale(1.05);
}

/* Product Detail Modal */
.shop-product-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.shop-product-modal-content {
    background: #1a1a1a;
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.shop-product-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    z-index: 1;
}

.shop-product-detail-image {
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.shop-product-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.shop-product-detail-info {
    padding: 20px;
}

.shop-product-detail-info h2 {
    margin: 0 0 10px 0;
    font-size: 20px;
}

.shop-product-detail-price {
    font-size: 24px;
    font-weight: bold;
    color: #4ade80;
    margin: 0 0 15px 0;
}

.shop-product-description {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    margin: 0 0 15px 0;
    font-size: 14px;
}

.shop-buy-btn {
    width: 100%;
    background: #4ade80;
    color: black;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 15px;
}

.shop-buy-btn:hover {
    opacity: 0.9;
}

.shop-sold-out {
    color: #f87171;
    text-align: center;
    font-weight: bold;
    margin-top: 15px;
}

.shop-not-ready {
    color: rgba(255, 255, 255, 0.5);
    text-align: center;
    font-style: italic;
    margin-top: 15px;
}

.shop-owner-actions {
    display: flex;
    gap: 8px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.shop-owner-actions button {
    flex: 1;
    padding: 10px;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.shop-owner-actions button.delete {
    background: rgba(248, 113, 113, 0.2);
    color: #f87171;
}

/* Product Editor Modal */
.shop-editor-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    padding: 20px;
}

.shop-editor-content {
    background: #1a1a1a;
    border-radius: 16px;
    max-width: 450px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.shop-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.shop-editor-header h3 {
    margin: 0;
    font-size: 16px;
}

.shop-editor-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
}

.shop-editor-form {
    padding: 20px;
}

.shop-form-group {
    margin-bottom: 16px;
}

.shop-form-group label {
    display: block;
    margin-bottom: 6px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
}

.shop-form-group input[type="text"],
.shop-form-group input[type="number"],
.shop-form-group input[type="url"],
.shop-form-group textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 10px 12px;
    color: white;
    font-size: 14px;
    box-sizing: border-box;
}

.shop-form-group input:focus,
.shop-form-group textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
}

.shop-form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.shop-form-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
}

.shop-form-checkbox input {
    width: 16px;
    height: 16px;
}

.shop-form-checkbox label {
    margin: 0;
    font-size: 13px;
}

.shop-editor-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.shop-editor-actions button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}

.shop-editor-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.shop-editor-save {
    background: white;
    color: black;
    font-weight: 500;
}

/* Orders Section */
.shop-orders-section {
    display: none;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.shop-orders-section h3 {
    margin: 0 0 20px 0;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
}

.shop-orders-empty {
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
    padding: 30px;
    font-style: italic;
}

.shop-order-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 12px;
}

.shop-order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.shop-order-header .order-id {
    font-family: monospace;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
}

.shop-order-header .order-status {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
}

.shop-order-card.status-pending .order-status {
    background: rgba(255, 165, 0, 0.2);
    color: orange;
}

.shop-order-card.status-paid .order-status {
    background: rgba(74, 222, 128, 0.2);
    color: #4ade80;
}

.shop-order-card.status-shipped .order-status {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.shop-order-product {
    font-weight: 500;
    margin-bottom: 8px;
}

.shop-order-buyer {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 6px;
}

.shop-order-address {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 8px;
}

.shop-order-amount {
    font-size: 13px;
}

.shop-ship-btn {
    margin-top: 12px;
    background: #3b82f6;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
}

.shop-order-tracking {
    margin-top: 8px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    font-family: monospace;
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    .shop-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .shop-product-modal-content {
        max-height: 100vh;
        border-radius: 0;
    }

    .shop-add-btn {
        bottom: 80px;
        right: 15px;
    }
}

/* ========================================
   CHAT ROOM STYLES
   ======================================== */

/* Chat container - transparent, no background */
.chat-container {
    position: fixed;
    left: 20px;
    width: 320px;
    z-index: 150;
    pointer-events: none;
    background: transparent;
}

/* Messages appear in middle of screen */
.chat-messages {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    left: 20px;
    width: 320px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 0;
    max-height: 300px;
    overflow-y: auto;
    pointer-events: auto;
    z-index: 150;
}

/* Input stays at bottom */
.chat-input-wrapper {
    position: fixed;
    bottom: 120px;
    left: 20px;
    width: 320px;
    pointer-events: auto;
    z-index: 150;
}

.chat-message {
    font-size: 13px;
    line-height: 1.4;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.chat-message-sender {
    font-weight: bold;
    color: white;
    margin-right: 6px;
    text-decoration: none;
    cursor: pointer;
}

.chat-message-sender:hover {
    text-decoration: underline;
}

.chat-message-text {
    color: rgba(255, 255, 255, 0.85);
}

/* Clickable links in chat */
.chat-link {
    color: #7eb8ff;
    text-decoration: underline;
    word-break: break-all;
}

.chat-link:hover {
    color: #aed4ff;
}

/* Images in chat */
.chat-message-image {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.chat-image {
    max-width: 200px;
    max-height: 150px;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.chat-image:hover {
    opacity: 0.85;
}

.chat-input-area {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    pointer-events: auto;
}

.chat-input-area input {
    flex: 1;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 6px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-family: Arial, sans-serif;
}

.chat-input-area input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.chat-input-area input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
}

.chat-input-area button {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.7);
    padding: 6px 12px;
    border-radius: 3px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chat-input-area button:hover {
    color: white;
    border-color: white;
}

/* Hide chat on mobile */
@media screen and (max-width: 768px) {
    .chat-container {
        display: none !important;
    }
}

/* Hide when pocket/canvas is open */
body:has(.inventory-overlay.visible) .chat-container,
body:has(.notes-viewing-overlay.active) .chat-container {
    display: none !important;
}

/* Active state for chat button */
.collective-btn.chat-active {
    background: rgba(255, 255, 255, 0.2);
}
