/**
 * camera_style.css — Pro Camera (Minimalist Leica / Halide / Moment Masterclass Aesthetic)
 * High-End Dark Mode UI: Matte magnesium chassis, OLED pitch-black viewfinder,
 * razor-sharp typographic parameter readouts, silk-smooth precision dial,
 * tactile Leica-style double-ring shutter, Halide emerald horizon level.
 */

:root {
    --cam-bg: #030406;
    --cam-chassis: #06080c;
    --cam-deck: #090c12;
    --cam-panel-glass: rgba(9, 12, 18, 0.88);
    --cam-border: #141923;
    --cam-border-subtle: rgba(255, 255, 255, 0.05);
    --cam-border-gold: rgba(245, 158, 11, 0.35);
    --cam-accent-gold: #f59e0b;
    --cam-accent-gold-glow: #fbbf24;
    --cam-accent-amber: #f97316;
    --cam-accent-red: #e11d48;
    --cam-accent-red-hover: #f43f5e;
    --cam-accent-cyan: #38bdf8;
    --cam-accent-green: #10b981;
    --cam-text-main: #f8fafc;
    --cam-text-muted: #8e9bb0;
    --cam-text-dim: #4b5565;
    --cam-knurl-dark: #080a0f;
    --cam-knurl-light: #141923;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: var(--cam-bg);
}

body.camera-body {
    background-color: var(--cam-bg);
    color: var(--cam-text-main);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    display: flex;
    justify-content: center;
    align-items: stretch;
}

/* =========================================================================
   1. MAIN CAMERA CONTAINER & CHASSIS (OLED MAGNESIUM TEXTURE)
   ========================================================================= */
.camera-chassis {
    width: 100%;
    max-width: 440px;
    height: 100vh;
    height: 100dvh;
    margin: 0 auto;
    background: #06080c;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.95);
    border-left: 1px solid rgba(255, 255, 255, 0.04);
    border-right: 1px solid rgba(255, 255, 255, 0.04);
}

@media (max-width: 440px) {
    .camera-chassis {
        max-width: 100%;
        border-left: none;
        border-right: none;
    }
}

/* Subtle matte camera micro-texture */
.camera-chassis::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.012) 1px, transparent 0);
    background-size: 8px 8px;
    pointer-events: none;
    opacity: 0.6;
}

/* =========================================================================
   2. TOP PRO HUD BAR (ULTRA-CLEAN FLOATING GLASSMORPHISM)
   ========================================================================= */
.camera-top-bar {
    position: relative;
    z-index: 15;
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: 46px;
    padding: calc(var(--safe-top) + 4px) 12px 4px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(6, 8, 12, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--cam-border-subtle);
}

.top-left-status {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    flex-shrink: 1;
    overflow: hidden;
}

.pro-badge {
    background: transparent;
    border: 1px solid rgba(56, 189, 248, 0.4);
    color: var(--cam-accent-cyan);
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 0.54rem;
    font-weight: 800;
    letter-spacing: 0.6px;
    font-family: 'JetBrains Mono', monospace;
    flex-shrink: 0;
}

.raw-toggle-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--cam-text-dim);
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 0.54rem;
    cursor: pointer;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    transition: all 0.15s ease;
    flex-shrink: 0;
}
.raw-toggle-btn.active {
    background: rgba(56, 189, 248, 0.1);
    color: #ffffff;
    border-color: var(--cam-accent-cyan);
}

/* Miniature RGB Histogram */
.histogram-box {
    width: 38px;
    height: 18px;
    border-radius: 3px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
#histCanvas {
    width: 38px;
    height: 18px;
}

/* Event Tag Pill */
.event-tag-pill {
    font-size: 0.58rem;
    font-weight: 600;
    color: var(--cam-accent-gold-glow);
    letter-spacing: 0.2px;
    background: rgba(245, 158, 11, 0.07);
    border: 1px solid rgba(245, 158, 11, 0.16);
    padding: 1px 6px;
    border-radius: 10px;
    white-space: nowrap;
    max-width: 75px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    flex-shrink: 1;
}
.event-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--cam-accent-gold);
    box-shadow: 0 0 3px var(--cam-accent-gold);
    display: inline-block;
    flex-shrink: 0;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.top-icon-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--cam-text-muted);
    font-size: 0.74rem;
    cursor: pointer;
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}
.top-icon-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}
.top-icon-btn:active {
    transform: scale(0.92);
}
.top-icon-btn.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
}
.top-icon-btn.active-gold {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.35);
}
.top-icon-btn.close-btn:hover {
    color: #f87171;
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.3);
}

/* =========================================================================
   3. SCN QUICK PRESET MODES BAR (Streamlined / Hidden to Avoid Redundancy with LUTs)
   ========================================================================= */
.scn-modes-bar {
    display: none !important;
}

.scn-chip {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--cam-text-muted);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.68rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.scn-chip.active {
    background: rgba(245, 158, 11, 0.15);
    border-color: var(--cam-accent-gold);
    color: var(--cam-accent-gold);
}

/* =========================================================================
   4. LIVE VIEWFINDER (PITCH BLACK OLED FRAMING)
   ========================================================================= */
.viewfinder-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 4 / 3;
    flex-shrink: 0;
    background: #000000;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: crosshair;
}

#cameraCanvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Screen Flash animation */
.screen-flash-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #ffffff;
    opacity: 0;
    pointer-events: none;
    z-index: 25;
    transition: opacity 0.05s ease-out;
}
.screen-flash-overlay.flashing {
    opacity: 0.95;
}

@keyframes flashStrobeBurst {
    0% { opacity: 0; background: #ffffff; }
    15% { opacity: 0.75; background: #fff5e6; }
    30% { opacity: 0.15; }
    55% { opacity: 1.0; background: #ffffff; }
    80% { opacity: 0.85; }
    100% { opacity: 0; }
}

.screen-flash-overlay.flash-strobe {
    animation: flashStrobeBurst 0.18s cubic-bezier(0.1, 0.9, 0.2, 1) forwards;
}

/* Viewfinder Screen Fill Light */
.screen-fill-light {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 6;
    border-radius: 10px;
    box-shadow: inset 0 0 50px 15px rgba(255, 246, 230, 0.35);
    border: 2px solid rgba(255, 248, 235, 0.55);
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.screen-fill-light.active {
    opacity: 1;
}

/* Floating HUD Toast Notification */
.camera-hud-toast {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    background: rgba(10, 13, 18, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #ffffff;
    font-size: 0.70rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    padding: 4px 12px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    z-index: 40;
    opacity: 0;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.camera-hud-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.camera-hud-toast.toast-gold {
    border-color: rgba(245, 158, 11, 0.5);
    color: #fbbf24;
}
.camera-hud-toast.toast-gold i {
    color: #fbbf24;
}

/* Horizon Level Indicator (Halide Style Emerald Laser Line) */
.horizon-level {
    position: absolute;
    width: 90px;
    height: 1px;
    background: rgba(255, 255, 255, 0.28);
    pointer-events: none;
    z-index: 5;
    transition: transform 0.08s ease-out, background 0.15s, box-shadow 0.15s;
}
.horizon-level::before,
.horizon-level::after {
    content: '';
    position: absolute;
    top: -3px;
    width: 1px;
    height: 7px;
    background: inherit;
}
.horizon-level::before { left: 0; }
.horizon-level::after { right: 0; }
.horizon-level.level-perfect {
    background: var(--cam-accent-green);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.8);
}

/* Simulation scene switch badge on top of viewfinder */
.sim-mode-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(6, 8, 12, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 3px 9px;
    border-radius: 14px;
    font-size: 0.64rem;
    font-weight: 600;
    color: var(--cam-text-main);
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    z-index: 8;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.18s ease;
}
.sim-mode-badge i:first-child {
    color: var(--cam-accent-gold);
}
.sim-mode-badge:hover {
    background: rgba(12, 16, 22, 0.9);
    border-color: var(--cam-accent-gold);
    color: #ffffff;
}
.sim-mode-badge:active {
    transform: scale(0.96);
}

/* Live Cam Switcher Badge */
.live-cam-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(225, 29, 72, 0.16);
    border: 1px solid rgba(225, 29, 72, 0.45);
    padding: 3px 9px;
    border-radius: 14px;
    font-size: 0.64rem;
    font-weight: 600;
    color: #ffffff;
    display: none;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    z-index: 8;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.18s ease;
}
.live-cam-badge.show {
    display: flex;
}
.live-cam-badge:hover {
    background: rgba(225, 29, 72, 0.3);
}

/* Peaking Indicator Pill */
.peaking-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid var(--cam-accent-green);
    color: var(--cam-accent-green);
    font-size: 0.58rem;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.5px;
    padding: 2px 5px;
    border-radius: 3px;
    z-index: 8;
    display: none;
}
.peaking-badge.show {
    display: block;
}

/* Webcam Status Notification Alert */
.cam-status-alert {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(8, 11, 16, 0.96);
    border: 1px solid rgba(244, 63, 94, 0.35);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85);
    border-radius: 14px;
    padding: 20px;
    max-width: 90%;
    width: 320px;
    text-align: center;
    z-index: 30;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    animation: alertFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes alertFadeIn {
    from { opacity: 0; transform: translate(-50%, -46%) scale(0.95); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.cam-status-alert.show {
    display: flex;
}
.cam-status-icon {
    font-size: 1.8rem;
    color: var(--cam-accent-red-hover);
}
.cam-status-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
}
.cam-status-desc {
    font-size: 0.74rem;
    color: var(--cam-text-muted);
    line-height: 1.4;
}
.cam-status-btn {
    background: #0284c7;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s;
}
.cam-status-btn:hover {
    background: #0369a1;
}
.cam-status-dismiss {
    background: transparent;
    color: var(--cam-text-dim);
    border: none;
    font-size: 0.70rem;
    cursor: pointer;
    text-decoration: underline;
    padding: 3px;
}

/* =========================================================================
   5. MANUAL PARAMETER TABS (MINIMALIST TYPOGRAPHIC DECK)
   ========================================================================= */
.controls-section {
    position: relative;
    z-index: 10;
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    background: #07090e;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    padding: 4px 0 2px 0;
}

/* Borderless Typographic Parameter Deck */
.param-tabs {
    display: flex;
    justify-content: space-around;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 2px 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    gap: 0;
}

.param-tab-btn {
    background: transparent;
    border: none;
    color: var(--cam-text-muted);
    cursor: pointer;
    min-height: 40px;
    padding: 2px 1px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    flex: 1;
    min-width: 0;
    position: relative;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: all 0.15s ease;
}
.param-tab-btn span:first-child {
    font-size: 0.54rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--cam-text-dim);
    transition: color 0.15s;
}
.param-tab-btn .tab-val {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.76rem;
    font-weight: 600;
    color: #94a3b8;
    letter-spacing: -0.2px;
    font-variant-numeric: tabular-nums;
    transition: color 0.15s;
    white-space: nowrap;
}
.param-tab-btn:hover span:first-child {
    color: var(--cam-text-muted);
}
.param-tab-btn:hover .tab-val {
    color: #ffffff;
}
.param-tab-btn:active {
    transform: scale(0.95);
}
.param-tab-btn.active span:first-child {
    color: var(--cam-accent-gold);
    font-weight: 800;
}
.param-tab-btn.active .tab-val {
    color: #ffffff;
    font-weight: 700;
}
/* Delicate razor-thin 2px indicator bar under active tab */
.param-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 20%;
    right: 20%;
    height: 1.5px;
    background: var(--cam-accent-gold);
    border-radius: 1px;
    box-shadow: 0 0 4px var(--cam-accent-gold);
}

/* =========================================================================
   6. MECHANICAL PRECISION THUMBWHEEL (MINIMALIST SILK-SMOOTH)
   ========================================================================= */
.dial-container {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    padding: 4px 12px 2px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.dial-value-display {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.5px;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    gap: 6px;
}
#dialMainVal {
    color: #ffffff;
    font-variant-numeric: tabular-nums;
}
.dial-value-display span.dial-unit {
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: var(--cam-accent-gold);
    padding: 1px 4px;
    border-radius: 3px;
}

/* Quick presets bar */
.quick-preset-bar {
    display: flex;
    gap: 4px;
    margin-bottom: 5px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 1px 2px 2px 2px;
    scrollbar-width: none;
    touch-action: pan-x;
    -webkit-overflow-scrolling: touch;
}
.quick-preset-bar::-webkit-scrollbar {
    display: none;
}
.quick-preset-pill {
    flex-shrink: 0;
    padding: 4px 8px;
    min-height: 28px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    color: var(--cam-text-dim);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.quick-preset-pill:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}
.quick-preset-pill:active {
    transform: scale(0.94);
}
.quick-preset-pill.active {
    background: rgba(245, 158, 11, 0.12);
    border-color: var(--cam-accent-gold);
    color: #ffffff;
    font-weight: 700;
}

/* Silk-Smooth Thumbwheel Track */
.knurled-wheel {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: 38px;
    background: #080a0f;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    cursor: ew-resize;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 16%, black 84%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 16%, black 84%, transparent 100%);
}

/* Center Indicator Pointer (Razor-Thin Hairline) */
.dial-center-mark {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1.5px;
    background: var(--cam-accent-gold);
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.7);
    transform: translateX(-50%);
    z-index: 5;
    pointer-events: none;
}
.dial-center-mark::before,
.dial-center-mark::after {
    content: '';
    position: absolute;
    left: -2px;
    width: 5px;
    height: 3px;
    background: var(--cam-accent-gold);
}
.dial-center-mark::before { top: 0; clip-path: polygon(50% 100%, 0 0, 100% 0); }
.dial-center-mark::after { bottom: 0; clip-path: polygon(50% 0, 0 100%, 100% 100%); }

/* Tape of Tick Marks */
.dial-ticks-tape {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 50%;
    transition: transform 0.05s ease-out;
    will-change: transform;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
}
.tick-notch {
    width: 18px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    touch-action: none;
    cursor: pointer;
}
.tick-line {
    width: 1px;
    height: 10px;
    background: rgba(255, 255, 255, 0.16);
    border-radius: 1px;
    transition: background 0.15s, height 0.15s;
}
.tick-notch.major .tick-line {
    height: 18px;
    background: rgba(255, 255, 255, 0.4);
    width: 1.5px;
}
.tick-notch.active .tick-line {
    background: var(--cam-accent-gold);
    height: 22px;
    box-shadow: 0 0 5px rgba(245, 158, 11, 0.6);
}

/* =========================================================================
   7. FILM SIMULATION LUT CAROUSEL (MINIMALIST LOW-PROFILE PILLS)
   ========================================================================= */
.lut-strip-wrapper {
    padding: 4px 10px 5px 10px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    display: flex;
    gap: 5px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.lut-strip-wrapper::-webkit-scrollbar {
    display: none;
}

.lut-chip {
    flex-shrink: 0;
    padding: 4px 9px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    font-size: 0.66rem;
    font-weight: 600;
    color: var(--cam-text-dim);
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}
.lut-chip:hover {
    color: var(--cam-text-main);
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.14);
}
.lut-chip:active {
    transform: scale(0.95);
}
.lut-chip.active {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.22);
    color: #ffffff;
    font-weight: 700;
}
.lut-chip-icon {
    font-size: 0.70rem;
}

/* =========================================================================
   8. MASTER SHUTTER RELEASE BAR (LEICA MINIMALIST DOUBLE-RING SHUTTER)
   ========================================================================= */
.camera-bottom-bar {
    position: relative;
    z-index: 10;
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 6px 20px calc(8px + var(--safe-bottom)) 20px;
    background: #05070a;
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Gallery Roll Thumbnail */
.gallery-roll-btn {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #0c0f16;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
}
.gallery-roll-btn:hover {
    border-color: var(--cam-accent-gold);
    transform: scale(1.04);
}
.gallery-roll-btn:active {
    transform: scale(0.92);
}
.gallery-roll-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.gallery-roll-empty {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--cam-text-dim);
    font-size: 1.1rem;
}

/* Leica / Apple Pro Minimalist Shutter Release Button */
.shutter-btn-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.shutter-btn {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.7);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.12s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.15s;
    padding: 0;
    outline: none;
}
.shutter-btn:hover {
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.03);
}
.shutter-btn:active {
    transform: scale(0.92);
    border-color: #ffffff;
}
.shutter-inner-red {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #e11d48;
    box-shadow: 0 2px 10px rgba(225, 29, 72, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.08s, background 0.1s;
}
.shutter-btn:active .shutter-inner-red {
    transform: scale(0.93);
    background: #be123c;
}

/* Lens Selector Buttons */
.lens-selector-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: center;
    min-width: 44px;
    flex-shrink: 0;
}
.lens-pill-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #e2e8f0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
.lens-pill-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.22);
    transform: scale(1.04);
}
.lens-pill-btn:active {
    transform: scale(0.92);
}
.lens-pill-btn.active {
    border-color: var(--cam-accent-gold);
    color: var(--cam-accent-gold-glow);
    background: rgba(245, 158, 11, 0.08);
}
.upload-photo-label {
    cursor: pointer;
    font-size: 0.56rem;
    font-weight: 600;
    color: var(--cam-text-dim);
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 1px 3px;
    border-radius: 4px;
    transition: color 0.15s;
}
.upload-photo-label:hover {
    color: #ffffff;
}
.upload-photo-label:active {
    opacity: 0.7;
}

/* =========================================================================
   9. DARKROOM MODAL (GALLERY & EXIF INSPECTOR)
   ========================================================================= */
.darkroom-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(4, 6, 9, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    z-index: 1000;
    display: none;
    flex-direction: column;
    padding: calc(var(--safe-top) + 12px) calc(var(--safe-right) + 14px) calc(var(--safe-bottom) + 12px) calc(var(--safe-left) + 14px);
    animation: darkroomFadeIn 0.2s ease-out;
}
@keyframes darkroomFadeIn {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}
.darkroom-modal.open {
    display: flex;
}

.darkroom-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.darkroom-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--cam-accent-gold);
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 7px;
    font-family: 'JetBrains Mono', monospace;
}

.darkroom-close-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-size: 1rem;
    cursor: pointer;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}
.darkroom-close-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}
.darkroom-close-btn:active {
    transform: scale(0.92);
}

.darkroom-preview-area {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px 0;
    position: relative;
    overflow: hidden;
}

.darkroom-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.85);
}

.darkroom-frame-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    background: rgba(12, 16, 22, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 6px 10px;
}

.darkroom-frame-title {
    font-size: 0.70rem;
    font-weight: 700;
    color: var(--cam-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.darkroom-frame-pills {
    display: flex;
    gap: 5px;
    overflow-x: auto;
}

.frame-pill-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    color: #cbd5e1;
    font-size: 0.70rem;
    font-weight: 600;
    padding: 5px 9px;
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.frame-pill-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.frame-pill-btn:active {
    transform: scale(0.92);
}

.frame-pill-btn.active {
    background: #ffffff;
    color: #0f172a;
    border-color: #ffffff;
    font-weight: 700;
}

.frame-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.frame-dot.white {
    background: #ffffff;
    border: 1px solid #94a3b8;
}

.frame-dot.dark {
    background: #0f172a;
    border: 1px solid var(--cam-accent-gold);
}

.frame-dot.none {
    background: transparent;
    border: 1.5px solid #ef4444;
}

.darkroom-meta-card {
    background: rgba(12, 16, 22, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 6px 10px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.72rem;
    font-family: 'JetBrains Mono', monospace;
}

.darkroom-actions {
    display: flex;
    gap: 6px;
}

.btn-darkroom {
    flex: 1;
    min-height: 40px;
    padding: 8px;
    border-radius: 8px;
    border: none;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-darkroom:hover {
    transform: translateY(-1px);
}
.btn-darkroom:active {
    transform: scale(0.96);
}
.btn-darkroom-gold {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #0f172a;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}
.btn-darkroom-wa {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.3);
}
.btn-darkroom-sec {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
