:root {
    --brand-purple: #6F3B78; /* Official Jönköping Brand Purple */
    --brand-purple-dark: #562E5E;
    --brand-purple-light: #8E5497;
    --brand-blue: #00659E; /* Official Jönköping Blue */
    --sky-blue: #007FC7; /* Jönköping Accent Sky Blue */
    --teal-accent: #00A483; /* Supporting Teal */
    --terracotta-red: #DB3C4D; /* Official Red Accent / Hangup */
    --bg-mesh-1: #FAF9FB; /* Soft Off-White Gray */
    --bg-mesh-2: #E8E5EC; /* Very soft lila-tinted light gray */
    --card-bg-glass: rgba(255, 255, 255, 0.7); /* Frosted Glassmorphism */
    --text-slate: #122C36; /* High-contrast slate charcoal */
    --text-muted: #627A86;
    --border-glass: rgba(111, 59, 120, 0.12); /* Subtle lila border */
    --shadow-soft: 0 10px 40px -10px rgba(111, 59, 120, 0.15);
    --shadow-glow: 0 0 30px rgba(0, 127, 199, 0.2);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background: radial-gradient(circle at 10% 20%, var(--bg-mesh-1) 0%, var(--bg-mesh-2) 90%);
    color: var(--text-slate);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100vw;
    margin: 0;
    overflow: hidden;
}

/* 2026 Kiosk Full-Screen Responsive Container */
.kiosk-container {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    background: transparent;
    overflow: hidden; /* Prevent any translated elements (like keyboard) from peeking or overflowing! */
}

/* Screens */
.screen {
    display: none;
    flex-direction: column;
    height: 100%;
    width: 100%;
    opacity: 0;
    animation: slideInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.screen.active {
    display: flex;
}

/* 1. BRAND HERO BANNER - Exact Screenshot Match */
.kiosk-hero-banner {
    background-color: var(--brand-purple);
    color: white;
    padding: 30px 40px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    position: relative;
    border-bottom: 3px solid var(--sky-blue);
}

.municipal-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 800;
}

.logo-group h1 {
    font-size: 32px;
    font-weight: 900;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.logo-group p {
    font-size: 15px;
    line-height: 1.5;
    opacity: 0.95;
    max-width: 900px;
}

/* Main Kiosk Body (Welcome flag cards) */
.kiosk-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.welcome-prompt-text {
    font-size: 24px;
    font-weight: 800;
    color: var(--brand-purple);
    margin-bottom: 30px;
    text-align: center;
}

/* 2x2 Language Selection Grid */
.language-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.lang-card {
    background-color: var(--brand-purple);
    border: none;
    border-radius: 16px;
    padding: 24px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    color: white;
    text-align: left;
    box-shadow: 0 8px 25px rgba(111, 59, 120, 0.25);
}

.lang-card:hover {
    background-color: var(--brand-purple-light);
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(111, 59, 120, 0.4);
}

.lang-card:active {
    transform: scale(0.97);
}

.lang-card-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.lang-card .flag {
    font-size: 48px;
}

.lang-card .lang-info h3 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 4px;
}

.lang-card .lang-info p {
    font-size: 13px;
    opacity: 0.85;
    line-height: 1.4;
}

.caret-icon {
    font-size: 24px;
    font-weight: 900;
    color: white;
    opacity: 0.9;
}

.kiosk-footer {
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
    border-top: 1px solid rgba(0,0,0,0.05);
    padding: 20px 40px;
}

/* 2. ACTIVE ASSISTANT HEADER - Sleek, transparent minimal header */
.assistant-header {
    background-color: transparent;
    color: var(--text-slate);
    padding: 15px 40px 10px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: none;
    box-shadow: none;
}

.assistant-logo-minimal {
    font-size: 20px;
    font-weight: 800;
    color: var(--brand-purple-dark);
    letter-spacing: -0.5px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mic-container {
    display: flex;
    align-items: center;
    background: var(--card-bg-glass);
    border: 1px solid var(--border-glass);
    height: 40px;
    padding: 0 16px;
    border-radius: 20px;
    gap: 8px;
    box-shadow: var(--shadow-soft);
}


.mic-icon {
    width: 16px;
    height: 16px;
    color: var(--brand-purple);
}

.mic-dropdown {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-slate);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    max-width: 250px;
}

.mic-dropdown option {
    background-color: white;
    color: var(--text-slate);
}

/* Assistant Interactive Screen Layout */
.assistant-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 30px 40px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    transition: padding-bottom 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.assistant-body.keyboard-open {
    padding-bottom: 270px; /* Leave exactly enough space for the keyboard! */
}

/* 3D Orb Visualizer Container */
.canvas-container {
    width: 100%;
    height: 340px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
    transition: height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.assistant-body.keyboard-open .canvas-container {
    height: 160px; /* Scale down the orb slightly to fit the keyboard perfectly! */
}

#orb-canvas {
    width: 100%;
    height: 100%;
    outline: none;
}

.status-overlay {
    position: absolute;
    bottom: -10px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--card-bg-glass);
    backdrop-filter: blur(25px);
    padding: 10px 24px;
    border-radius: 40px;
    border: 1px solid var(--border-glass);
    box-shadow: var(--shadow-soft);
}

.pulse-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.id-idle {
    background-color: var(--sky-blue);
    box-shadow: 0 0 12px var(--sky-blue);
    animation: pulse 2.2s infinite;
}

.id-listening {
    background-color: #8b5cf6;
    box-shadow: 0 0 14px #8b5cf6;
    animation: pulse 1s infinite;
}

.id-thinking {
    background-color: var(--teal-accent);
    box-shadow: 0 0 14px var(--teal-accent);
    animation: pulse 1.6s infinite;
}

.id-speaking {
    background-color: #10b981;
    box-shadow: 0 0 14px #10b981;
    animation: pulse 0.6s infinite;
}

#status-text {
    font-size: 13px;
    font-weight: 800;
    color: var(--brand-purple);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* High-Contrast Glassmorphic Feedback Box */
.text-feedback {
    background: var(--card-bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 10px 30px;
    min-height: 56px;
    max-height: 56px;
    overflow: hidden;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: var(--shadow-soft);
    margin: 10px 0;
}

#transcript-text {
    font-size: 20px;
    line-height: 1.2;
    font-weight: 800;
    color: var(--brand-purple-dark);
    white-space: nowrap;
    overflow: hidden;
}

#transcript-text.placeholder {
    color: var(--text-muted);
    font-weight: 500;
    font-style: italic;
}

/* Suggestion Quick Actions (Grid of 6 Buttons) */
.suggestions-container {
    margin: 15px 0;
}

.suggestions-container h4 {
    font-size: 13px;
    text-transform: uppercase;
    color: var(--brand-purple-light);
    font-weight: 800;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
}

.suggestions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.suggestion-btn {
    background: var(--brand-purple);
    border: none;
    border-radius: 12px;
    color: white;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 15px rgba(111, 59, 120, 0.15);
}

.suggestion-btn:hover {
    background: var(--brand-purple-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(111, 59, 120, 0.25);
}

.suggestion-btn:active {
    transform: scale(0.97);
}

/* Play Button Circular Icon (2026 Style) */
.play-button-circular {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    flex-shrink: 0;
}

.play-icon-svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    margin-left: 2px; /* Center-adjust the play triangle visually! */
}

.lang-card:hover .play-button-circular {
    background: white;
    color: var(--brand-purple);
    border-color: white;
    transform: scale(1.1);
    box-shadow: 0 0 15px white;
}

/* Small suggestion-pills play button */
.play-button-circular-small {
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.2);
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
}

.play-icon-svg-small {
    width: 12px;
    height: 12px;
    fill: currentColor;
    margin-left: 1px;
}

.suggestion-btn:hover .play-button-circular-small {
    background: white;
    color: var(--brand-purple);
    border-color: white;
    transform: scale(1.1);
}

/* Controls, On-Screen Keyboard, and Hangup */
.kiosk-controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 15px;
}

/* Full Width Touch Text wrapper */
.touch-text-wrapper {
    display: flex;
    background: var(--card-bg-glass);
    backdrop-filter: blur(20px);
    border: 2px solid var(--border-glass);
    border-radius: 16px;
    padding: 6px 12px;
    height: 64px;
    align-items: center;
    box-shadow: var(--shadow-soft);
    gap: 10px;
}

#text-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--brand-purple-dark);
    font-size: 18px;
    font-weight: 700;
    padding-left: 10px;
}

#text-input::placeholder {
    color: var(--text-muted);
    font-weight: 500;
}

.btn-control {
    background: rgba(111, 59, 120, 0.08);
    border: 1px solid rgba(111, 59, 120, 0.15);
    color: var(--brand-purple);
    width: 48px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-control:hover {
    background: rgba(111, 59, 120, 0.15);
    transform: translateY(-1px);
}

.keyboard-icon {
    width: 24px;
    height: 24px;
}

.btn-send-text {
    background: var(--brand-purple);
    border: none;
    color: white;
    width: 48px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-send-text:hover:not(:disabled) {
    background: var(--brand-purple-light);
    transform: translateY(-1px);
}

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

.icon-send {
    width: 20px;
    height: 18px;
}

/* Full Width Red Hangup Button at bottom */
.btn-hangup {
    width: 100%;
    height: 68px;
    background: var(--terracotta-red);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 1px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    box-shadow: 0 10px 25px rgba(219, 60, 77, 0.3);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-hangup:hover {
    background: #e15261;
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(219, 60, 77, 0.45);
}

.btn-hangup:active {
    transform: scale(0.98);
}

.hangup-icon {
    width: 26px;
    height: 26px;
}

/* 3. INTERACTIVE GLASSMORPHIC HELP MODAL */
.kiosk-modal {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(18, 44, 54, 0.4);
    backdrop-filter: blur(15px);
    z-index: 100;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease forwards;
}

.kiosk-modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    width: 90%;
    max-width: 700px;
    padding: 35px;
    box-shadow: 0 30px 70px rgba(0,0,0,0.3);
    animation: slideInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid rgba(0,0,0,0.05);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.modal-header h2 {
    font-size: 24px;
    font-weight: 900;
    color: var(--brand-purple);
}

.close-modal-btn {
    background: transparent;
    border: none;
    outline: none;
    font-size: 32px;
    font-weight: 300;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s;
}

.close-modal-btn:hover {
    color: var(--brand-purple);
}

.help-desc {
    font-size: 16px;
    line-height: 1.5;
    color: var(--text-slate);
    margin-bottom: 25px;
}

.capabilities-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.cap-card {
    background: var(--bg-mesh-1);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 16px;
    padding: 16px 20px;
}

.cap-icon {
    font-size: 28px;
    margin-bottom: 8px;
    display: block;
}

.cap-card h4 {
    font-size: 16px;
    font-weight: 800;
    color: var(--brand-purple-dark);
    margin-bottom: 4px;
}

.cap-card p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.4;
}

.help-action-box {
    background: rgba(111, 59, 120, 0.05);
    border: 1.5px dashed var(--brand-purple-light);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
}

.help-action-box p {
    font-size: 14px;
    font-weight: 700;
    color: var(--brand-purple-dark);
    margin-bottom: 12px;
}

.btn-voice-help {
    background: var(--brand-purple);
    color: white;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(111, 59, 120, 0.2);
}

.btn-voice-help:hover {
    background: var(--brand-purple-light);
    transform: translateY(-1px);
}

/* 4. SLIDE-UP ONSCREEN VIRTUAL KEYBOARD */
.virtual-keyboard {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(26, 55, 66, 0.85);
    backdrop-filter: blur(25px);
    border-top: 2px solid rgba(255, 255, 255, 0.1);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transform: translateY(100%);
    visibility: hidden; /* COMPLETELY HIDE KEYBOARD from rendering when closed, preventing it from peeking out at bottom! */
    pointer-events: none; /* Ignore any finger touch events while hidden */
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 200;
    box-shadow: 0 -15px 40px rgba(0,0,0,0.3);
}

.virtual-keyboard.active {
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
}

.keyboard-row {
    display: flex;
    justify-content: center;
    width: 100%;
    gap: 8px;
}

.key {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 18px;
    font-weight: 700;
    height: 52px;
    flex: 1;
    max-width: 64px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    user-select: none;
}

.key:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.03);
}

.key:active {
    background: var(--sky-blue);
}

/* Key size overrides */
.space-key {
    max-width: 450px;
    background: rgba(255, 255, 255, 0.2);
}

.shift-key, .backspace-key, .action-key {
    max-width: 130px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.1);
}

.enter-key {
    background: var(--brand-purple);
    border-color: rgba(255,255,255,0.1);
}

.enter-key:hover {
    background: var(--brand-purple-light);
}

/* Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pulse {
    0% { transform: scale(0.9); opacity: 0.6; }
    50% { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.6; }
}

/* Adaptive scaling for normal desktop presentation */
@media (min-width: 1081px) {
    /* Always responsive 100% fullscreen kiosk layout! */
}

@media (max-height: 900px) {
    .logo-group h1 { font-size: 24px; }
    .logo-group p { font-size: 13px; }
    .kiosk-hero-banner { padding: 18px 30px; }
    .welcome-prompt-text { font-size: 18px; margin-bottom: 15px; }
    .language-grid { gap: 16px; }
    .lang-card { padding: 16px 20px; }
    .lang-card .flag { font-size: 36px; }
    .lang-card .lang-info h3 { font-size: 18px; }
    .canvas-container { height: 200px; }
    .text-feedback { min-height: 56px; max-height: 56px; padding: 10px 20px; }
    #transcript-text { font-size: 18px; }
    .suggestion-btn { padding: 10px 16px; font-size: 14px; }
    .btn-hangup { height: 52px; font-size: 15px; }
    .touch-text-wrapper { height: 48px; }
    #text-input { font-size: 15px; }
    .btn-send-text, .btn-control { width: 38px; height: 36px; }
    .keyboard-icon, .icon-send { width: 18px; height: 18px; }
}

/* KARAOKE STYLE WORD HIGHLIGHTING AND SCROLLING (2026 Premium Kiosk!) */
.karaoke-word {
    display: inline-block;
    color: var(--brand-purple-dark);
    font-size: 24px;
    font-weight: 800;
    transition: color 0.15s, text-shadow 0.15s, transform 0.15s;
    margin-right: 8px;
    transform-origin: center;
}

.karaoke-word.spoken-karaoke {
    color: var(--text-muted);
    opacity: 0.55;
    font-weight: 600;
}

.karaoke-word.active-karaoke {
    color: var(--sky-blue);
    text-shadow: 0 0 15px rgba(0, 127, 199, 0.4);
    transform: scale(1.12); /* Slightly enlarge like real karaoke! */
}

/* TOP-RIGHT FLOATING LANGUAGE SELECTOR AND ALPHA DISCLAIMER (2026 Style) */
.banner-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.kiosk-top-language-selector {
    position: relative;
    z-index: 10;
}

.top-lang-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    color: white;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.top-lang-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.caret-down-mini {
    font-size: 9px;
    opacity: 0.8;
}

.top-lang-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    width: 150px;
    overflow: hidden;
}

.top-lang-dropdown.active {
    display: flex;
    flex-direction: column;
}

.top-lang-opt {
    background: transparent;
    border: none;
    text-align: left;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-slate);
    cursor: pointer;
    width: 100%;
    transition: background 0.15s;
}

.top-lang-opt:hover {
    background: rgba(111, 59, 120, 0.08);
    color: var(--brand-purple);
}

/* Alpha Disclaimer Glassmorphism Box */
.alpha-disclaimer-box {
    background: rgba(111, 59, 120, 0.04);
    border: 1.5px dashed rgba(111, 59, 120, 0.2);
    border-radius: 16px;
    padding: 18px 24px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--brand-purple-dark);
    margin-top: 30px;
    text-align: center;
    box-shadow: inset 0 2px 8px rgba(111,59,120,0.02);
}

/* Mini flag language row setup */
.mini-languages-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 15px;
    margin-bottom: 10px;
    width: 100%;
}

.mini-lang-prompt {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-slate);
    margin-bottom: 8px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.mini-languages-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 14px;
    width: 100%;
    flex-wrap: wrap;
}

.mini-lang-btn {
    background: white;
    border: 1.5px solid var(--border-glass);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.mini-lang-btn:hover {
    transform: scale(1.15) translateY(-3px);
    box-shadow: 0 8px 20px rgba(111, 59, 120, 0.15);
    border-color: var(--brand-purple);
}

/* Muted button warning red class */
.btn-control.muted {
    background: #ef4444 !important;
    color: white !important;
    border-color: #ef4444 !important;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4) !important;
}

.btn-control.muted:hover {
    background: #dc2626 !important;
}

/* Mobile Optimization for iPhone 16 Pro and other smartphones */
@media (max-width: 768px) {
    .logo-group h1 {
        font-size: 20px;
    }
    .logo-group p {
        font-size: 11px;
    }
    .welcome-prompt-text {
        font-size: 16px;
        margin-bottom: 12px;
    }
    .language-grid {
        grid-template-columns: 1fr; /* Single column on mobile! */
        gap: 12px;
    }
    .lang-card {
        padding: 12px 16px;
        border-radius: 12px;
    }
    .lang-card .flag {
        font-size: 28px;
        margin-right: 12px;
    }
    .lang-card .lang-info h3 {
        font-size: 16px;
        margin-bottom: 2px;
    }
    .lang-card .lang-info p {
        font-size: 11px;
    }
    
    /* Active Screen Adjustments */
    .assistant-header {
        padding: 10px 16px;
    }
    .assistant-logo {
        font-size: 16px;
    }
    .canvas-container {
        height: 160px; /* Squeeze slightly on mobile to make room for buttons */
    }
    .text-feedback {
        min-height: 48px;
        max-height: 48px;
        padding: 6px 14px;
        margin-bottom: 6px;
    }
    #transcript-text {
        font-size: 16px;
    }
    .suggestions-container h4 {
        font-size: 11px;
        margin-bottom: 8px;
    }
    .suggestions-grid {
        grid-template-columns: 1fr; /* Single column on mobile! */
        gap: 8px;
    }
    .suggestion-btn {
        padding: 10px 14px;
        font-size: 13px;
        border-radius: 10px;
    }
    
    /* Control Bar */
    .kiosk-controls {
        gap: 8px;
    }
    .touch-text-wrapper {
        height: 44px;
        border-radius: 10px;
    }
    #text-input {
        font-size: 13px;
        padding: 0 10px;
    }
    .btn-send-text, .btn-control {
        width: 34px;
        height: 32px;
        border-radius: 6px;
    }
    .keyboard-icon, .mute-icon {
        width: 16px;
        height: 16px;
    }
    .btn-hangup {
        height: 44px;
        font-size: 13px;
        border-radius: 10px;
    }
    
    /* Mini flags */
    .mini-languages-container {
        margin-top: 10px;
    }
    .mini-lang-prompt {
        font-size: 11px;
        margin-bottom: 6px;
    }
    .mini-languages-row {
        gap: 10px;
    }
    .mini-lang-btn {
        width: 38px;
        height: 38px;
        font-size: 20px;
    }
}

/* --- AUDIO DSP SETTINGS PANEL OVERLAY --- */
.settings-toggle-btn {
    background: var(--card-bg-glass);
    border: 1px solid var(--border-glass);
    color: var(--brand-purple);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-soft);
}

.settings-toggle-btn:hover {
    background: var(--brand-purple);
    border-color: var(--brand-purple-light);
    color: white;
    transform: rotate(30deg);
}

.settings-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 450px;
    height: 100vh;
    background: rgba(15, 10, 20, 0.94);
    backdrop-filter: blur(35px);
    -webkit-backdrop-filter: blur(35px);
    border-left: 1.5px solid var(--border-glass);
    z-index: 10000;
    box-shadow: -15px 0 45px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.settings-panel.hidden {
    transform: translateX(100%);
    pointer-events: none;
}

.settings-panel-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 30px;
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1.5px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.settings-header h3 {
    font-size: 18px;
    font-weight: 800;
    color: white;
    margin: 0;
}

.close-settings-btn {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 28px;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.close-settings-btn:hover {
    color: white;
}

.settings-body {
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-right: 5px;
}

/* Custom Scrollbar for settings */
.settings-body::-webkit-scrollbar {
    width: 6px;
}
.settings-body::-webkit-scrollbar-track {
    background: transparent;
}
.settings-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}

.settings-group {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
}

.settings-group label {
    font-size: 13px;
    font-weight: 700;
    color: #cbd5e1;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.slider-header, .checkbox-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.slider-header span, .checkbox-header span {
    font-size: 12px;
    font-weight: 800;
    color: var(--teal-accent);
}

.settings-slider {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    outline: none;
    -webkit-appearance: none;
    margin: 10px 0;
}

.settings-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--teal-accent);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(55, 183, 186, 0.5);
    transition: transform 0.1s;
}

.settings-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.settings-desc {
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.4;
    margin: 0;
}

/* Checkbox Toggle */
.checkbox-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-container input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--teal-accent);
    cursor: pointer;
}

.checkbox-label {
    font-size: 13px;
    font-weight: 700;
    color: #cbd5e1;
    margin: 0 !important;
}

/* Volume Meter */
.level-meter-container {
    width: 100%;
    height: 16px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.level-meter-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #10b981 0%, #fbbf24 70%, #ef4444 100%);
    transition: width 0.05s ease-out;
}

.noise-gate-indicator {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 5%; /* Representing default 0.005 threshold */
    width: 2px;
    background-color: #ef4444;
    box-shadow: 0 0 6px #ef4444;
    z-index: 10;
    transition: left 0.1s ease;
}

/* Diagnostic Box */
.diagnostic-box {
    border: 1.5px dashed rgba(55, 183, 186, 0.3) !important;
    background: rgba(55, 183, 186, 0.03) !important;
}

.diagnostic-box h4 {
    font-size: 14px;
    font-weight: 800;
    color: white;
    margin: 0 0 6px 0;
}

.diag-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 800;
    color: white;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s;
}

.diag-btn-red {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.diag-btn-red:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.4);
    transform: translateY(-1px);
}

.diag-btn-blue {
    background: rgba(55, 183, 186, 0.2);
    border: 1px solid rgba(55, 183, 186, 0.4);
}

.diag-btn-blue:hover:not(:disabled) {
    background: rgba(55, 183, 186, 0.4);
    transform: translateY(-1px);
}

.diag-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
}

/* Responsive Setting Panel */
@media (max-width: 600px) {
    .settings-panel {
        width: 100%;
        border-left: none;
    }
}

/* ==========================================================================
   CO-BROWSING & SPLIT SCREEN ASSISTANT STYLES
   ========================================================================== */

.voice-agent-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.browser-helper-section {
    width: 0;
    opacity: 0;
    display: none;
    height: 100%;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Activated Side-by-Side Browser layout with Floating iPad-like Card */
.assistant-body.browser-active {
    position: relative !important;
    max-width: 100% !important;
    width: 100% !important;
    flex: 1 !important;
    min-height: 0 !important;
    padding: 24px !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: row !important;
    gap: 24px !important;
    box-sizing: border-box !important;
}

.assistant-body.browser-active.keyboard-open {
    padding-bottom: 290px !important;
}

.assistant-body.browser-active .voice-agent-section {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    bottom: auto !important;
    right: auto !important;
    width: 380px !important;
    height: 100% !important;
    flex-shrink: 0 !important;
    z-index: 10 !important;
    background: linear-gradient(135deg, rgba(22, 15, 38, 0.85) 0%, rgba(13, 8, 24, 0.92) 100%) !important;
    backdrop-filter: blur(25px) !important;
    -webkit-backdrop-filter: blur(25px) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 24px !important;
    padding: 24px !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5) !important;
    pointer-events: auto !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
}

.assistant-body.browser-active .browser-helper-section {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    width: auto !important;
    height: 100% !important;
    flex: 1 !important;
    display: flex !important;
    opacity: 1 !important;
    z-index: 1 !important;
}

/* Glassmorphic Browser Card Panel */
.browser-panel-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.assistant-body.browser-active .browser-panel-card {
    border-radius: 24px !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45) !important;
}

/* Browser Header with Dots and status */
.browser-panel-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.35);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.browser-address-bar {
    display: flex;
    align-items: center;
    gap: 8px;
}

.browser-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.browser-dot.red { background-color: #ff5f56; }
.browser-dot.yellow { background-color: #ffbd2e; }
.browser-dot.green { background-color: #27c93f; }

.browser-url {
    flex: 1;
    font-family: monospace;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    background: rgba(0, 0, 0, 0.2);
    padding: 6px 12px;
    border-radius: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-left: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.browser-status-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #e9d5ff;
    font-weight: 500;
}

.pulse-indicator-small {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #c084fc;
    box-shadow: 0 0 0 0 rgba(192, 132, 252, 0.7);
}

.pulse-indicator-small.active {
    animation: pulse-small 1.5s infinite;
}

@keyframes pulse-small {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(192, 132, 252, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(192, 132, 252, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(192, 132, 252, 0);
    }
}

/* Browser Viewport and Interactive Screenshot Wrapper */
.browser-viewport-container {
    flex: 1;
    background: #111;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    overflow: auto;
}

.screenshot-touch-wrapper {
    position: relative;
    width: 100%;
    cursor: default; /* Regular arrow pointer */
}

#browser-screenshot {
    width: 100%;
    height: auto;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
}

/* Adjustments to layout when screen is split */
.assistant-body.browser-active .canvas-container {
    height: 180px !important;
}

.assistant-body.browser-active .text-feedback {
    min-height: 80px;
    max-height: 160px;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: none !important;
}

.assistant-body.browser-active #transcript-text {
    color: rgba(255, 255, 255, 0.95) !important;
}

.assistant-body.browser-active #transcript-text.placeholder {
    color: rgba(255, 255, 255, 0.4) !important;
}

.assistant-body.browser-active .suggestions-container h4 {
    color: rgba(255, 255, 255, 0.5) !important;
}

.assistant-body.browser-active .suggestions-container {
    margin-top: 10px;
}

.assistant-body.browser-active .suggestions-grid {
    grid-template-columns: 1fr; /* Stack suggested buttons vertically */
    gap: 8px;
}

.assistant-body.browser-active .suggestion-btn {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: rgba(255, 255, 255, 0.9) !important;
    box-shadow: none !important;
    padding: 12px 18px !important;
    font-size: 14px !important;
    border-radius: 12px !important;
}

.assistant-body.browser-active .suggestion-btn:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
}

.assistant-body.browser-active .play-button-circular-small {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

.assistant-body.browser-active .suggestion-btn:hover .play-button-circular-small {
    background: #ffffff !important;
    color: #120c24 !important;
    border-color: #ffffff !important;
}

/* Guidance Banner for authentication / QR scanner */
.browser-guidance-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 8px;
    padding: 12px 16px;
    margin: 10px 15px 0 15px;
    color: #10b981;
    font-weight: 500;
    font-size: 14px;
    animation: slideDown 0.3s ease-out;
    backdrop-filter: blur(5px);
}
.browser-guidance-banner.hidden {
    display: none;
}

/* Support Personal SMS alert button in header */
.support-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    border: none;
    border-radius: 20px;
    height: 40px;
    padding: 0 20px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35);
}
.support-btn:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.5);
}
.support-btn:active {
    transform: translateY(0) scale(0.97);
}
.support-btn.sent {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35) !important;
    cursor: default;
    pointer-events: none;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Zoom controls in browser panel header */
.browser-zoom-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2px 6px;
    user-select: none;
}

#browser-zoom-val {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    min-width: 42px;
    text-align: center;
    letter-spacing: 0.5px;
    font-family: monospace;
}

.zoom-ctrl-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    transition: all 0.2s ease;
    padding: 0;
}

.zoom-ctrl-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.1);
}

.zoom-ctrl-btn:active {
    transform: scale(0.95);
}

.zoom-ctrl-btn.reset {
    font-size: 11px;
    opacity: 0.8;
}

.zoom-ctrl-btn.reset:hover {
    opacity: 1;
}
