/* Shared Base CSS Reset */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
}

/* Centralized Semantic Z-Index Design Tokens (Single Source of Truth) */
:root {
    --z-bg-slideshow: 0;
    --z-caption-overlay: 5;
    --z-card-controls: 10;
    --z-container-card: 50;
    --z-main-content: 100;
    --z-sticky-nav: 1000;
    --z-modal-overlay: 30000;
    --z-floating-controls: 20000;
    --z-floating-controls-active: 20005;
    --z-fullscreen-caption: 35005;
}

/* Background Slideshow Layers */
#bg-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: var(--z-bg-slideshow);
    overflow: hidden;
    background-color: #030712;
}

/* Single Unified Font Per Language Engine (Max Readability & 2028 Visual Cohesion) */
html[lang="ja"],
html[lang="ja"] * {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Meiryo', sans-serif;
}

html[lang="en"],
html[lang="en"] * {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html[lang="pt"],
html[lang="pt"] * {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.full-bg-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: var(--z-bg-slideshow);
    background-size: cover;
    background-position: center;
    transition: opacity 1.2s ease-in-out;
    opacity: 0;
    pointer-events: none;
}

/* Symmetrical Top Navigation Bar */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    border-bottom: 1px solid rgba(16, 185, 129, 0.15);
    padding-bottom: 14px;
    margin-bottom: 24px;
    width: 100%;
    box-sizing: border-box;
}

.nav-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 18px;
    background: rgba(16, 185, 129, 0.08);
    border: 1.5px solid #10b981;
    border-radius: 9999px;
    color: #047857;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}

.nav-pill-btn:hover {
    background-color: #047857;
    background: #047857;
    color: #ffffff;
    border-color: #047857;
    box-shadow: 0 4px 14px rgba(4, 120, 87, 0.4);
    transform: translateY(-1px);
}

/* Shared Universal Glass Content Container Rules (100% Identical Across index.html & terao.html) */
main.container,
.container {
    max-width: 900px;
    width: 90%;
    margin-top: 50vh;
    margin-bottom: 50vh;
    margin-left: auto;
    margin-right: auto;
    background: linear-gradient(180deg, #f0fdf4 0%, #f4fbf7 100%);
    border: 1px solid rgba(240, 253, 244, 0.7);
    border-radius: 16px;
    padding: 36px 30px;
    box-shadow: 0 0 0 1px rgba(167, 243, 208, 0.25), 0 24px 72px rgba(0, 0, 0, 0.4), 0 0 45px 15px rgba(240, 253, 244, 0.45);
    position: relative;
    z-index: var(--z-card-controls);
    box-sizing: border-box;
}

@media (max-width: 768px) {
    main.container,
    .container {
        margin-top: 50vh;
        margin-bottom: 50vh;
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
        padding: 24px 16px 20px 16px;
        border: none;
        outline: none;
        box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.12);
        border-top-left-radius: 22px;
        border-top-right-radius: 22px;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
        box-sizing: border-box;
    }
}

/* Top-Right Cinematic Caption Overlay (Neatly framed under unified control bar) */
#side-bee-caption-top,
#cinematic-white-text-top,
.unified-media-caption {
    position: fixed;
    top: 68px;
    right: 28px;
    z-index: var(--z-caption-overlay);
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 3px 12px;
    border-radius: 12px;
    border: 1px solid rgba(254, 240, 138, 0.3);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95);
    pointer-events: none;
    transition: opacity 0.5s ease;
    white-space: nowrap;
    max-width: 90vw;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 768px) {
    #side-bee-caption-top,
    #cinematic-white-text-top,
    .unified-media-caption {
        top: calc(max(8px, env(safe-area-inset-top, 8px)) + 48px);
        right: auto;
        left: 50%;
        transform: translateX(-50%);
        font-size: 0.78rem;
        padding: 3px 10px;
    }
}

/* Background Spoken Video Subtitle Overlay */
#bg-video-caption-overlay {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: var(--z-caption-overlay);
    width: 90%;
    max-width: 820px;
    text-align: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

@media (max-width: 768px) {
    #bg-video-caption-overlay {
        top: 96px;
    }
}

/* 2028 Unified Senior-Friendly Always-On Media & Language Control Bar */
.unified-media-bar {
    position: fixed;
    top: 16px;
    right: 24px;
    z-index: var(--z-sticky-nav);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(6, 78, 59, 0.94) 0%, rgba(2, 44, 34, 0.96) 100%);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1.5px solid rgba(254, 240, 138, 0.55);
    border-radius: 9999px;
    padding: 6px 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 12px rgba(16, 185, 129, 0.25);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    user-select: none;
    -webkit-user-select: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

/* Unified bar info button active state when shelf is toggled open */
.unified-bar-btn.info-action.shelf-active {
    background: #047857;
    color: #ffffff;
    border-color: #fef08a;
    box-shadow: 0 0 10px rgba(254, 240, 138, 0.5);
}

.unified-bar-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(254, 240, 138, 0.12);
    border: 1.5px solid rgba(254, 240, 138, 0.35);
    color: #fef08a;
    font-size: 0.86rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    white-space: nowrap;
    height: 38px;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.unified-bar-btn:hover {
    background: rgba(254, 240, 138, 0.28);
    border-color: #fef08a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    color: #ffffff;
}

.unified-bar-btn:active {
    transform: scale(0.96);
    background: rgba(254, 240, 138, 0.4);
}

.bg-btn-play-action {
    min-width: 82px;
    justify-content: center;
}

.bg-btn-play-action .btn-icon {
    flex-shrink: 0;
}

/* Play/Pause Button Timer Ring */
.btn-play-timer-ring-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    margin-right: 2px;
    vertical-align: middle;
}

.btn-play-timer-ring-wrap .btn-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
}

.btn-play-timer-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 22px;
    height: 22px;
    transform: rotate(-90deg);
}

.btn-play-timer-ring circle.ring-bg {
    stroke: rgba(254, 240, 138, 0.22);
}

.btn-play-timer-ring circle.ring-progress {
    stroke: #fef08a;
    transition: stroke-dashoffset 0.08s linear;
}

.unified-media-bar.is-paused .btn-play-timer-ring circle.ring-progress {
    stroke: #94a3b8;
}

.unified-nav-cluster {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.unified-nav-btn {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fef08a;
}

/* Integrated Segmented Language Selector */
.unified-lang-segmented {
    display: inline-flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.4);
    border: 1.5px solid rgba(254, 240, 138, 0.35);
    border-radius: 9999px;
    padding: 2px 4px;
    gap: 3px;
    box-sizing: border-box;
}

.lang-seg-btn {
    background: transparent;
    border: none;
    color: #cbd5e1;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.18s ease;
    height: 30px;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}

.lang-seg-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}

.lang-seg-btn.active {
    background: #fef08a;
    color: #064e3b;
    font-weight: 900;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

/* Senior-Friendly Mobile / iPhone Screen Adaptations (< 768px) */
@media (max-width: 768px) {
    .unified-media-bar {
        top: max(8px, env(safe-area-inset-top, 8px));
        right: auto;
        left: 50%;
        transform: translateX(-50%);
        width: calc(100% - 16px);
        max-width: 374px;
        padding: 4px 6px;
        justify-content: space-between;
        align-items: center;
        gap: 3px;
        border-radius: 9999px;
        box-sizing: border-box;
        transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    }

    body.media-bar-occluded:not(.cinematic-view) .unified-media-bar {
        opacity: 0;
        visibility: hidden;
        transform: translate(-50%, -24px);
        pointer-events: none;
    }

    body.media-bar-occluded:not(.cinematic-view) #side-bee-caption-top,
    body.media-bar-occluded:not(.cinematic-view) #cinematic-white-text-top,
    body.media-bar-occluded:not(.cinematic-view) .unified-media-caption {
        opacity: 0;
        visibility: hidden;
        transform: translateY(-24px);
        pointer-events: none;
    }

    .bar-desktop-text {
        display: none;
    }

    .unified-bar-btn {
        padding: 4px 6px;
        font-size: 0.72rem;
        height: 36px;
        gap: 2px;
    }

    .unified-bar-btn .btn-icon {
        width: 14px;
        height: 14px;
    }

    .bg-btn-play-action {
        min-width: 44px;
        padding: 4px 5px;
        justify-content: center;
    }

    .info-action {
        padding: 4px 5px;
    }

    .cinema-action {
        min-width: 44px;
        padding: 4px 5px;
        justify-content: center;
    }

    .mute-action {
        min-width: 44px;
        padding: 4px 5px;
        justify-content: center;
    }

    .unified-nav-cluster {
        display: none; /* Hide micro next/prev on iPhone to keep major buttons spacious and uncrowded */
    }

    .unified-lang-segmented {
        padding: 2px;
        gap: 2px;
    }

    .lang-seg-btn {
        padding: 2px 6px;
        font-size: 0.72rem;
        height: 30px;
        min-width: 26px;
    }
}

@media (max-width: 380px) {
    .unified-media-bar {
        padding: 3px 5px;
        gap: 2px;
        max-width: calc(100vw - 8px);
    }

    .unified-bar-btn {
        padding: 3px 4px;
        font-size: 0.66rem;
        height: 34px;
        min-width: 0;
    }

    .bg-btn-play-action,
    .cinema-action,
    .mute-action {
        min-width: 0;
        padding: 3px 4px;
    }

    .lang-seg-btn {
        padding: 2px 4px;
        font-size: 0.66rem;
        height: 28px;
        min-width: 22px;
    }
}

/* Zero-Popup Unified Media Shelf (Docked directly under #unified-media-bar) */
.unified-media-shelf {
    position: fixed;
    top: 68px;
    right: 24px;
    width: 640px;
    max-width: calc(100vw - 32px);
    z-index: var(--z-floating-controls);
    background: linear-gradient(135deg, rgba(6, 78, 59, 0.96) 0%, rgba(2, 44, 34, 0.98) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1.5px solid rgba(254, 240, 138, 0.55);
    border-radius: 20px;
    padding: 12px 14px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6), 0 0 16px rgba(16, 185, 129, 0.25);
    box-sizing: border-box;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.unified-media-shelf.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.unified-media-shelf-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(254, 240, 138, 0.25);
}

.shelf-filter-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.shelf-filter-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(254, 240, 138, 0.25);
    color: #cbd5e1;
    padding: 3px 10px;
    border-radius: 9999px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    height: 26px;
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
}

.shelf-filter-btn:hover {
    background: rgba(254, 240, 138, 0.15);
    color: #fef08a;
    border-color: rgba(254, 240, 138, 0.6);
}

.shelf-filter-btn.active {
    background: #047857;
    color: #ffffff;
    border-color: #fef08a;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.shelf-close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #e2e8f0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 0.85rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    flex-shrink: 0;
    box-sizing: border-box;
    padding: 0;
}

.shelf-close-btn:hover {
    background: rgba(239, 68, 68, 0.85);
    border-color: #ef4444;
    color: #ffffff;
}

.shelf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 8px;
    max-height: 240px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 4px;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: rgba(254, 240, 138, 0.4) transparent;
}

.shelf-grid::-webkit-scrollbar {
    width: 5px;
}

.shelf-grid::-webkit-scrollbar-thumb {
    background: rgba(254, 240, 138, 0.4);
    border-radius: 4px;
}

.shelf-tile {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background: #0f172a;
    border: 1.5px solid rgba(254, 240, 138, 0.25);
    aspect-ratio: 4 / 3;
    width: 100%;
    height: auto;
    padding-top: 0;
    box-sizing: border-box;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.shelf-tile:hover {
    transform: scale(1.04);
    border-color: #fef08a;
}

.shelf-tile.active-playing {
    border-color: #fef08a;
    box-shadow: 0 0 0 2px #fef08a, 0 4px 12px rgba(0, 0, 0, 0.5);
}

.shelf-tile img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.shelf-tile-badge-num {
    position: absolute;
    top: 3px;
    left: 3px;
    background: rgba(0, 0, 0, 0.8);
    color: #fef08a;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 0.66rem;
    font-weight: 800;
    font-family: monospace;
    letter-spacing: 0.5px;
    border: 0.5px solid rgba(254, 240, 138, 0.35);
    pointer-events: none;
}

.shelf-tile-badge-type {
    position: absolute;
    top: 3px;
    right: 3px;
    background: rgba(0, 0, 0, 0.8);
    color: #fef08a;
    padding: 1px 4px;
    border-radius: 4px;
    font-size: 0.62rem;
    font-weight: 800;
    border: 0.5px solid rgba(254, 240, 138, 0.35);
    pointer-events: none;
}

/* Active Shelf Tile Micro Progress Bar */
.shelf-tile-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3.5px;
    background: rgba(0, 0, 0, 0.65);
    overflow: hidden;
    pointer-events: none;
    display: none;
}

.shelf-tile.active-playing .shelf-tile-progress-bar {
    display: block;
}

.shelf-tile-progress-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #10b981 0%, #34d399 45%, #fef08a 100%);
    box-shadow: 0 0 6px rgba(254, 240, 138, 0.9);
    border-radius: 9999px;
    transition: width 0.08s linear;
}

@media (max-width: 768px) {
    .unified-media-shelf {
        top: calc(max(8px, env(safe-area-inset-top, 8px)) + 48px);
        right: auto;
        left: 50%;
        transform: translate(-50%, -8px);
        width: calc(100% - 16px);
        max-width: 410px;
        padding: 10px 10px max(10px, env(safe-area-inset-bottom, 10px)) 10px;
    }

    .unified-media-shelf.open {
        transform: translate(-50%, 0);
    }

    .shelf-grid {
        grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
        gap: 6px;
        max-height: 190px;
    }

    .shelf-filter-btn {
        padding: 2px 7px;
        font-size: 0.72rem;
        height: 24px;
    }

    .shelf-close-btn {
        width: 24px;
        height: 24px;
        font-size: 0.78rem;
    }
}



/* Native HTML5 Video Subtitle Track (::cue) Glass & Transparent Custom Styling */
video::cue {
    background: transparent;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.15rem;
    line-height: 1.4;
    padding: 2px 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.95), 0 0 10px rgba(0, 0, 0, 0.9), -1.5px -1.5px 0 #000, 1.5px -1.5px 0 #000, -1.5px 1.5px 0 #000, 1.5px 1.5px 0 #000;
}

video::cue(c.speaker) {
    color: #fef08a; /* Golden Yellow Accent for Speaker Tags */
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.95), 0 0 10px rgba(0, 0, 0, 0.9), -1.5px -1.5px 0 #000, 1.5px -1.5px 0 #000, -1.5px 1.5px 0 #000, 1.5px 1.5px 0 #000;
}

video::cue(c.text) {
    color: #ffffff; /* Crisp Pure White for Dialogue/Scene Text */
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.95), 0 0 10px rgba(0, 0, 0, 0.9), -1.5px -1.5px 0 #000, 1.5px -1.5px 0 #000, -1.5px 1.5px 0 #000, 1.5px 1.5px 0 #000;
}

/* Map Interactive Product Pins (Box on USA & Bottle on Australia) */
.map-hover-pin {
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.35s ease;
}

.map-hover-pin:hover {
    transform: translate(-50%, -50%) scale(1.35);
    z-index: var(--z-container-card);
    filter: drop-shadow(0 25px 40px rgba(0,0,0,0.45));
}

/* ==========================================================================
   Zero-Popup In-Place Cinematic Mode (Full View without Dialog Overlays)
   ========================================================================== */
html.cinematic-view,
body.cinematic-view {
    cursor: pointer;
    overflow: hidden;
    height: 100vh;
}

body.cinematic-view .container,
body.cinematic-view #border-pop-container,
body.cinematic-view #cart-summary-floating-badge,
body.cinematic-view #cart-summary-mobile-bar,
body.cinematic-view .top-nav,
body.cinematic-view header.hero-banner {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

body.cinematic-view #unified-media-bar,
body.cinematic-view #unified-media-shelf {
    cursor: auto;
    z-index: var(--z-floating-controls-active);
}

body.cinematic-view #side-bee-caption-top,
body.cinematic-view #cinematic-white-text-top,
body.cinematic-view .unified-media-caption,
body.cinematic-view #bg-video-caption-overlay,
body.cinematic-view #cinematic-exit-helper,
body.cinematic-view #cinematic-play-hud {
    z-index: var(--z-fullscreen-caption);
}

.unified-bar-btn.cinema-action.active-cinema {
    background: #fef08a;
    color: #064e3b;
    border-color: #fef08a;
    font-weight: 800;
    box-shadow: 0 0 14px rgba(254, 240, 138, 0.65);
}

/* Reassuring Exit Helper Notification Pill */
#cinematic-exit-helper {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(6, 78, 59, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid rgba(254, 240, 138, 0.45);
    color: #fef08a;
    font-size: 0.84rem;
    font-weight: 700;
    padding: 6px 18px;
    border-radius: 9999px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    white-space: nowrap;
    max-width: 90vw;
    text-align: center;
}

body.cinematic-view #cinematic-exit-helper {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 768px) {
    #cinematic-exit-helper {
        bottom: max(16px, calc(16px + env(safe-area-inset-bottom)));
        font-size: 0.74rem;
        padding: 5px 12px;
    }
}

/* Tactile Centered Play / Pause HUD Feedback (Cinematic & Background) */
#cinematic-play-hud {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.75);
    min-width: 88px;
    height: 88px;
    padding: 10px 18px;
    border-radius: 44px;
    background: rgba(6, 78, 59, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 2px solid rgba(254, 240, 138, 0.65);
    color: #fef08a;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.65), 0 0 24px rgba(254, 240, 138, 0.35);
    z-index: var(--z-fullscreen-caption);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.175, 0.885, 0.32, 1.275), visibility 0.22s ease;
}

#cinematic-play-hud.hud-visible {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

#cinematic-play-hud.hud-fading {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.18);
    transition: opacity 0.32s ease-out, transform 0.32s ease-out;
}

#cinematic-play-hud svg {
    width: 32px;
    height: 32px;
    fill: currentColor;
    flex-shrink: 0;
}

.hud-caption-label {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #fef08a;
    white-space: nowrap;
    line-height: 1;
}

@media (max-width: 768px) {
    #cinematic-play-hud {
        min-width: 76px;
        height: 76px;
        padding: 8px 14px;
        border-radius: 38px;
    }
    #cinematic-play-hud svg {
        width: 26px;
        height: 26px;
    }
    .hud-caption-label {
        font-size: 0.72rem;
    }
}

/* Tactile Expanding Click Ripple for Background Click */
.bg-click-ripple {
    position: fixed;
    border-radius: 50%;
    width: 90px;
    height: 90px;
    margin-left: -45px;
    margin-top: -45px;
    border: 2px solid rgba(254, 240, 138, 0.85);
    background: radial-gradient(circle, rgba(254, 240, 138, 0.45) 0%, rgba(6, 78, 59, 0.2) 60%, transparent 100%);
    pointer-events: none;
    z-index: var(--z-fullscreen-caption);
    animation: bgRippleAnim 0.5s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
}

@keyframes bgRippleAnim {
    0% {
        transform: scale(0.2);
        opacity: 1;
    }
    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

/* Control Bar Confirmation Pulse */
#unified-media-bar.bar-pulse-active {
    box-shadow: 0 0 22px rgba(254, 240, 138, 0.85), 0 8px 32px rgba(0, 0, 0, 0.55);
    border-color: #fef08a;
    transform: scale(1.02);
    transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}



