/* ==========================================================================
   Voice2Sign – Unified Design System
   Modern, minimal, ChatGPT-inspired translation interface
   ========================================================================== */

/* ── Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ── CSS Variables ── */
:root {
    /* Light Mode (default) */
    --bg-primary: #f4f4f5;
    /* Smoky white */
    --bg-secondary: #eaeaf0;
    --bg-tertiary: #e0e0e6;
    --bg-elevated: #ffffff;
    --bg-sidebar: #f0f0f4;
    --bg-user-msg: #e1e1e8;
    --bg-assistant-msg: transparent;
    --bg-input: #ffffff;
    --bg-hover: rgba(0, 0, 0, 0.06);
    --bg-active: rgba(0, 0, 0, 0.08);
    --bg-overlay: rgba(244, 244, 245, 0.85);
    --bg-toast: #1d1d23;

    --text-primary: #1d1d23;
    /* Dark slate complimenting the smoky background */
    --text-secondary: #6b6b80;
    --text-tertiary: #9e9eb0;
    --text-inverse: #ffffff;
    --text-on-accent: #ffffff;

    --border: #e5e5ea;
    --border-light: #f0f0f0;
    --border-focus: #c4956a;

    --accent: #c4956a;
    --accent-hover: #b07d52;
    --accent-light: rgba(196, 149, 106, 0.1);
    --accent-glow: rgba(196, 149, 106, 0.2);

    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 20px rgba(196, 149, 106, 0.15);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg-primary: #0d0d14;
    --bg-secondary: #15151f;
    --bg-tertiary: #1e1e2e;
    --bg-elevated: #1a1a28;
    --bg-sidebar: #111118;
    --bg-user-msg: #1e1e2e;
    --bg-assistant-msg: transparent;
    --bg-input: #1a1a28;
    --bg-hover: rgba(255, 255, 255, 0.05);
    --bg-active: rgba(255, 255, 255, 0.08);
    --bg-overlay: rgba(13, 13, 20, 0.85);
    --bg-toast: #2a2a3e;

    --text-primary: #e8e8ed;
    --text-secondary: #9494a8;
    --text-tertiary: #5a5a6e;
    --text-inverse: #1a1a2e;

    --border: #2a2a3a;
    --border-light: #1f1f2f;
    --border-focus: #d4a574;

    --accent: #d4a574;
    --accent-hover: #e0b98a;
    --accent-light: rgba(212, 165, 116, 0.12);
    --accent-glow: rgba(212, 165, 116, 0.25);

    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 24px rgba(212, 165, 116, 0.2);
}

/* ── Reset ── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

html:has(body.portal-page) {
    scroll-padding-top: 70px;
}

/* ── Accessibility: focus ring + reduced motion + sr-only ── */
:focus {
    outline: none;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Form controls get a softer inner ring so the outline doesn't double up */
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
.form-input:focus-visible,
.composer-input:focus-visible,
.pref-input:focus-visible,
.pipeline-textarea:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

/* Buttons inside elements shouldn't show outline on parent if the child already has it */
.btn-primary:focus-visible,
.pipeline-btn-primary:focus-visible,
.pipeline-btn-secondary:focus-visible,
.btn-secondary:focus-visible,
.social-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    box-shadow: 0 0 0 4px var(--accent-light);
}

/* Universal disabled state */
button:disabled,
.btn-primary:disabled,
.pipeline-btn-primary:disabled,
.pipeline-btn-secondary:disabled,
.btn-secondary:disabled,
input:disabled,
textarea:disabled,
select:disabled,
.form-input:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Honor user OS preference for reduced motion even when the in-app toggle is off */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }

    .toast,
    .toast.toast-exit {
        animation-duration: 0.35s !important;
        animation-iteration-count: 1 !important;
    }

    .toast-sticky.toast-error .toast-icon {
        animation: none !important;
    }
}

/* Skip link — hidden until focused */
.skip-link {
    position: absolute;
    top: -40px;
    left: 12px;
    background: var(--accent);
    color: var(--text-on-accent);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    z-index: 100000;
    transition: top 0.2s ease;
}

.skip-link:focus-visible {
    top: 12px;
    outline: 2px solid var(--text-primary);
    outline-offset: 2px;
}

/* Selection highlight matches the brand */
::selection {
    background: var(--accent-light);
    color: var(--text-primary);
}

[data-theme="dark"] ::selection {
    background: var(--accent);
    color: var(--text-inverse);
}

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition-slow), color var(--transition-slow);
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    color: var(--accent-hover);
}

img {
    max-width: 100%;
    display: block;
}

video,
canvas,
iframe {
    max-width: 100%;
}

button,
a,
.uiverse-btn,
.sidebar-nav-item,
.maxton-menu-item,
.nav-link,
.nav-menu-btn,
.chat-header-toggle,
.maxton-icon-btn {
    touch-action: manipulation;
}

input,
button,
select,
textarea {
    font-family: var(--font);
    font-size: inherit;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

/* ══════════════════════════════════════════════════════════════════════════
   TOAST SYSTEM (custom, sileo-inspired)
   ══════════════════════════════════════════════════════════════════════════ */

.toast-container {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 30000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    flex: none;
    align-self: center;
    width: max-content;
    max-width: min(92vw, 420px);
    height: auto;
}

.toast {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: var(--bg-toast);
    color: var(--text-inverse);
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(12px);
    animation: toastIn 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
    will-change: transform, opacity;
}

[data-theme="dark"] .toast {
    color: var(--text-primary);
}

.toast.toast-error,
.toast.toast-warning {
    animation:
        toastIn 0.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards,
        toastShake 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97) 0.4s;
}

.toast.toast-shake-again {
    animation: toastShake 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

.toast.toast-exit {
    animation: toastOut 0.35s cubic-bezier(0.4, 0, 1, 1) forwards;
}

@keyframes toastShake {
    0%, 100% { transform: translateX(0); }
    10%, 90% { transform: translateX(-2px); }
    20%, 80% { transform: translateX(4px); }
    30%, 50%, 70% { transform: translateX(-7px); }
    40%, 60% { transform: translateX(7px); }
}

.toast-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.toast-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast-text {
    line-height: 1.35;
}

.toast-sticky {
    padding: 10px 16px;
    font-size: 13px;
}

.toast-sticky.toast-error .toast-icon {
    animation: toastPulse 1.2s ease-in-out infinite;
}

@keyframes toastPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.toast-success .toast-icon {
    color: var(--success);
}

.toast-error .toast-icon {
    color: var(--error);
}

.toast-warning .toast-icon {
    color: var(--warning);
}

.toast-info .toast-icon {
    color: var(--accent);
}

@keyframes toastIn {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toastOut {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    100% {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
}

/* ══════════════════════════════════════════════════════════════════════════
   AUTH PAGES (Login, Signup, Forgot Password)
   ══════════════════════════════════════════════════════════════════════════ */

.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(-45deg, #fcece3, #EBC8B2, #eef2f3, #d7e1ec);
    background-size: 400% 400%;
    animation: authGradientBG 15s ease infinite;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

[data-theme="dark"] .auth-page {
    background: linear-gradient(-45deg, #181820, #252229, #1a1520, #0a0a0c);
    background-size: 400% 400%;
}

@keyframes authGradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.auth-page::before,
.auth-page::after {
    content: '';
    position: absolute;
    width: 60vw;
    height: 60vw;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    animation: floatBlob 15s ease-in-out infinite alternate;
}

.auth-page::before {
    top: -20%;
    left: -10%;
    background: var(--accent-glow);
}

.auth-page::after {
    bottom: -20%;
    right: -10%;
    background: rgba(100, 150, 250, 0.1);
    animation-delay: -7.5s;
    animation-direction: alternate-reverse;
}

@keyframes floatBlob {
    0% {
        transform: scale(0.8) translate(0, 0);
    }

    100% {
        transform: scale(1.1) translate(100px, -100px);
    }
}

.auth-header {
    padding: 20px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 10;
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.4px;
    flex: 1;
    min-width: 0;
    margin-right: 12px;
    position: relative;
    z-index: 2;
}

.auth-logo img {
    width: 30px;
    height: 30px;
    filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.4));
}

.auth-logo-text {
    color: var(--accent);
    font-weight: 800;
    text-shadow: 0 0 20px rgba(245, 158, 11, 0.25);
}

.auth-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.icon-btn {
    width: 38px;
    height: 38px;
    border: 1px solid var(--border);
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition);
}

.icon-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border-focus);
}

.icon-btn svg {
    width: 18px;
    height: 18px;
}

.auth-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-md);
    animation: fadeUp 0.5s ease-out;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.auth-card-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-card-logo {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    opacity: 0.9;
    filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.4));
}

.auth-card-title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 6px;
}

.auth-card-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Forms */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 11px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-primary);
    transition: all var(--transition);
    outline: none;
}

.form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
    background: var(--bg-primary);
}

.form-input::placeholder {
    color: var(--text-tertiary);
}

.input-wrapper {
    position: relative;
}

.input-wrapper .input-icon {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--text-tertiary);
    cursor: pointer;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition), background var(--transition);
}

.input-wrapper .input-icon:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.input-wrapper .input-icon:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

.input-wrapper .input-icon svg {
    width: 18px;
    height: 18px;
}

/* When the input has a password toggle, give the text a bit of right padding
   so it doesn't slide under the icon. */
.input-wrapper input[autocomplete*="password"],
.input-wrapper input[type="password"],
.input-wrapper input[data-new-password],
.input-wrapper input[data-confirm-password] {
    padding-right: 48px;
}

.name-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Social Buttons */
.social-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.social-btn {
    width: 100%;
    padding: 11px;
    border: 1px solid var(--border);
    background: var(--bg-primary);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all var(--transition);
}

.social-btn:hover {
    background: var(--bg-hover);
    border-color: var(--border-focus);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.social-btn svg {
    width: 18px;
    height: 18px;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 24px 0;
}

.auth-divider-line {
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-divider-text {
    font-size: 12px;
    color: var(--text-tertiary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Primary Button */
.btn-primary {
    width: 100%;
    padding: 12px;
    background: var(--accent);
    color: var(--text-on-accent);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-glow);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Uiverse Subscribe button (gharsh11032000) — applied globally except pricing cards.
   Uses the existing site --accent (gold) so the new buttons stay on-brand. */
.uiverse-btn {
    --uiverse-accent: var(--accent, #e0b694);
    --uiverse-fill: var(--uiverse-accent);
    --uiverse-text: var(--uiverse-accent);
    --uiverse-text-hover: #1a1a1a;
    cursor: pointer;
    position: relative;
    padding: 12px 28px;
    font-size: 14px;
    color: var(--uiverse-text);
    border: 2px solid var(--uiverse-accent);
    border-radius: 34px;
    background-color: transparent;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: color 0.3s cubic-bezier(0.23, 1, 0.320, 1),
        box-shadow 0.3s cubic-bezier(0.23, 1, 0.320, 1),
        transform 0.3s cubic-bezier(0.23, 1, 0.320, 1);
    overflow: hidden;
    line-height: 1.2;
    text-align: center;
    /* The ::before fill paints at z-index -1, so it sits BEHIND the
       button's own background — and therefore behind the text and any
       child elements. This is what keeps the label readable on hover. */
    z-index: 0;
    /* Stable layout — prevent parent flex from shrinking the button. */
    flex-shrink: 0;
    /* Inline by default so nav / hero / toolbar buttons size to their label. */
    width: auto;
    min-width: 0;
}

/* When a uiverse button lives inside a form (or a card that wants a
   full-width primary action), stretch it to fill the container. */
form .uiverse-btn,
.auth-card .uiverse-btn,
.dev-panel .uiverse-btn,
.modal-content .uiverse-btn,
.uiverse-btn--block {
    width: 100%;
}

.uiverse-btn::before {
    content: '';
    position: absolute;
    /* Fill the button, then scale from the center. Using the button's own
       dimensions (100% 100%) means the hover fill covers wide / tall buttons
       completely — no more half-covered hover. */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    transform: scaleX(0);
    transform-origin: center;
    /* z-index -1 keeps the fill behind the button's own background and text. */
    z-index: -1;
    background-color: var(--uiverse-fill);
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.320, 1);
}

.uiverse-btn:hover::before {
    transform: scaleX(1);
}

.uiverse-btn > * {
    /* Keep label / icon children above the fill layer. */
    position: relative;
    z-index: 1;
}

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

.uiverse-btn:hover {
    color: var(--uiverse-text-hover);
    box-shadow: 0 0px 20px rgba(224, 182, 148, 0.4);
}

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

.uiverse-btn:disabled,
.uiverse-btn.btn-loading {
    opacity: 0.6;
    pointer-events: none;
    transform: none;
}

.btn-loading {
    color: transparent !important;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    top: 50%;
    left: 50%;
    margin: -9px 0 0 -9px;
    border: 2px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* Form Footer */
.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
    cursor: pointer;
}

.checkbox-label {
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
}

.form-link {
    font-size: 13px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.form-link:hover {
    color: var(--accent-hover);
}

button.form-link {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
}

.otp-input {
    letter-spacing: 0.35em;
    text-align: center;
    font-size: 22px;
    font-weight: 700;
}

.auth-verify-copy {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 16px;
}

.auth-switch {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: var(--text-secondary);
}

.auth-switch a {
    color: var(--accent);
    font-weight: 600;
}

/* Password Strength */
.password-strength {
    margin-top: 8px;
}

.strength-bar {
    height: 3px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 4px;
}

.strength-fill {
    height: 100%;
    width: 0%;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.strength-text {
    font-size: 12px;
    color: var(--text-tertiary);
}

.password-guide {
    margin-top: 8px;
}

.password-guide .password-strength {
    margin-top: 0;
}

.password-strength.is-rated {
    display: flex;
    align-items: center;
    gap: 10px;
}

.password-strength.is-rated .strength-bar {
    flex: 1;
    height: 6px;
    margin: 0;
}

.password-strength.is-rated .strength-text {
    margin: 0;
    font-weight: 650;
    white-space: nowrap;
}

.password-rules {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px 12px;
}

.password-rules li {
    min-width: 0;
    font-size: 12px;
    line-height: 1.35;
    color: var(--text-tertiary, #8b8478);
}

.password-rule__chars {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    letter-spacing: 0.01em;
}

.password-rules li.is-met,
.password-rules li.is-met .password-rule__chars {
    color: #22c55e;
}

.password-match {
    margin: 6px 0 0;
    font-size: 13px;
    font-weight: 650;
}

.password-match.is-ok {
    color: #22c55e;
}

.password-match.is-bad {
    color: #ef4444;
}

/* User Type Selector */
.user-type-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 6px;
}

.user-type-btn {
    padding: 12px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition);
}

.user-type-btn:hover {
    border-color: var(--accent);
    background: var(--accent-light);
}

.user-type-btn.active {
    border-color: var(--accent);
    background: var(--accent-light);
    color: var(--accent);
}

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

.social-role-email {
    margin: 0 0 18px;
    padding: 10px 14px;
    border-radius: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    line-height: 1.4;
    word-break: break-word;
}

.social-role-email:empty {
    display: none;
}

#socialRoleForm .user-type-grid {
    margin-top: 8px;
}

#socialRoleForm .auth-switch {
    margin-top: 14px;
}

/* ══════════════════════════════════════════════════════════════════════════
   DASHBOARD LAYOUT
   ══════════════════════════════════════════════════════════════════════════ */

.dashboard {
    display: flex;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

/* ── Sidebar ── */
.sidebar {
    width: 260px;
    min-width: 260px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: all var(--transition-slow);
    overflow: hidden;
}

.sidebar.collapsed {
    width: 0;
    min-width: 0;
    border-right: none;
}

.sidebar-header {
    padding: 14px 14px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    overflow: hidden;
    flex: 1;
    min-width: 0;
    margin-right: 8px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.4px;
}

.sidebar-logo img {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.4));
}

.sidebar-logo-text {
    color: var(--accent);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.4px;
    text-shadow: 0 0 20px rgba(245, 158, 11, 0.25);
    white-space: nowrap;
}

.sidebar-toggle {
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    flex-shrink: 0;
    transition: all var(--transition);
}

.sidebar-toggle:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.sidebar-toggle svg {
    width: 16px;
    height: 16px;
}

/* Sidebar Actions */
.sidebar-actions {
    padding: 6px 10px;
    flex-shrink: 0;
}

.new-chat-btn {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition);
}

.new-chat-btn:hover {
    background: var(--bg-hover);
    border-color: var(--accent);
}

.new-chat-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.new-chat-btn:disabled:hover {
    background: transparent;
    border-color: var(--border);
}

.new-chat-btn svg {
    width: 16px;
    height: 16px;
}

/* Sidebar Nav */
.sidebar-nav {
    padding: 6px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-shrink: 0;
}

.sidebar-nav-item {
    width: 100%;
    padding: 9px 12px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    transition: all var(--transition);
}

.sidebar-nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.sidebar-nav-item.active {
    background: var(--bg-active);
    color: var(--text-primary);
}

.sidebar-nav-item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Chat List */
.sidebar-section-label {
    padding: 14px 14px 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-tertiary);
}

.chat-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 8px;
}

.chat-item {
    padding: 9px 10px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition);
    position: relative;
}

.chat-item:hover {
    background: var(--bg-hover);
}

.chat-item.active {
    background: var(--bg-active);
}

.chat-item-icon {
    width: 16px;
    height: 16px;
    color: var(--text-tertiary);
    flex-shrink: 0;
}

.chat-item-copy {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.chat-item-name {
    flex: 1;
    font-size: 13px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-item-team {
    font-size: 11px;
    line-height: 1.3;
    color: var(--accent, #c4956a);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-item.is-pinned {
    background: var(--accent-light, rgba(196, 149, 106, 0.1));
}

.chat-item-star.is-on {
    color: var(--accent, #c4956a);
}

.chat-item-star.is-on svg {
    fill: var(--accent, #c4956a);
    stroke: var(--accent, #c4956a);
}

.chat-item-actions {
    display: flex;
    gap: 2px;
    opacity: 0;
    transition: opacity var(--transition);
}

.chat-item:hover .chat-item-actions {
    opacity: 1;
}

.chat-item-actions button {
    width: 26px;
    height: 26px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    transition: all var(--transition);
}

.chat-item-actions button:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.chat-item-actions button svg {
    width: 14px;
    height: 14px;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 10px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.sidebar-footer-btn {
    width: 100%;
    padding: 8px 12px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all var(--transition);
}

.sidebar-footer-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.sidebar-footer-btn svg {
    width: 16px;
    height: 16px;
}

/* ── Main Panel ── */
.main-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    position: relative;
}

/* Chat Header */
.chat-header {
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-primary);
    flex-shrink: 0;
}

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

.chat-header-toggle {
    display: none;
    width: 34px;
    height: 34px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.chat-header-toggle svg {
    width: 24px;
    height: 24px;
}

.sidebar.collapsed~.main-panel .chat-header-toggle {
    display: flex;
}

.chat-header-title {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

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

.mic-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: background 0.2s, border-color 0.2s;
}

.mic-indicator.active {
    background: rgba(34, 197, 94, 0.12);
    border-color: #22c55e;
    color: var(--text-primary);
    animation: micLivePulse 1.8s ease-in-out infinite;
}

@keyframes micLivePulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.25);
    }

    50% {
        box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.08);
    }
}

.mic-indicator-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.mic-indicator-label {
    display: none;
}

@media (min-width: 480px) {
    .mic-indicator-label {
        display: inline;
    }
}

.mic-level-meter {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 22px;
    opacity: 0.4;
    transition: opacity 0.2s;
}

.mic-level-meter.mic-level-meter--active {
    opacity: 1;
}

.mic-level-bar {
    display: block;
    width: 4px;
    min-height: 3px;
    height: calc(3px + var(--mic-level, 0) * 16px);
    background: var(--accent);
    border-radius: 2px;
    transition: height 0.07s ease-out;
}

.mic-indicator.active .mic-level-bar {
    background: #22c55e;
}

.mic-level-meter--large {
    height: 44px;
    gap: 4px;
    margin-bottom: 8px;
    justify-content: center;
}

.mic-level-meter--large .mic-level-bar {
    width: 6px;
    height: calc(6px + var(--mic-level, 0) * 32px);
}

body.reduced-motion .mic-level-bar {
    transition: none;
}

body.reduced-motion .mic-indicator.active {
    animation: none;
}

.header-auth-links {
    display: flex;
    gap: 8px;
}

.header-link-btn {
    padding: 7px 16px;
    border: 1px solid var(--border);
    background: transparent;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    transition: all var(--transition);
    cursor: pointer;
}

.header-link-btn:hover {
    background: var(--bg-hover);
    border-color: var(--accent);
    color: var(--text-primary);
}

.header-link-btn.primary {
    background: var(--accent);
    color: var(--text-on-accent);
    border-color: var(--accent);
}

.header-link-btn.primary:hover {
    background: var(--accent-hover);
}

/* ── Chat Body ── */
.chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.main-panel.is-chat {
    --chat-canvas: #efe8dc;
    background: var(--chat-canvas);
}

.main-panel.is-chat .chat-header {
    background: color-mix(in srgb, var(--chat-canvas) 82%, #fff 18%);
    border-bottom-color: color-mix(in srgb, var(--uv-ink, #1d1d23) 8%, transparent);
}

.main-panel.is-chat .chat-body:not(.section-hidden) {
    background:
        radial-gradient(900px 280px at 50% -40px, rgba(196, 149, 106, 0.14), transparent 62%),
        var(--chat-canvas);
}

.main-panel.is-chat .composer:not(.section-hidden) {
    background: color-mix(in srgb, var(--chat-canvas) 88%, #fff 12%);
    border-top: 1px solid color-mix(in srgb, var(--uv-ink, #1d1d23) 8%, transparent);
}

[data-theme="dark"] .main-panel.is-chat {
    --chat-canvas: #14121a;
}

[data-theme="dark"] .main-panel.is-chat .chat-header,
[data-theme="dark"] .main-panel.is-chat .composer:not(.section-hidden) {
    background: #17151e;
    border-color: rgba(255, 255, 255, 0.06);
}

.chat-thread {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 6px 0 14px;
}

.welcome-screen.hidden {
    display: none !important;
}

/* Welcome Screen */
.welcome-screen {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
    animation: fadeUp 0.6s ease-out;
}

.welcome-icon {
    width: 56px;
    height: 56px;
    background: var(--accent-light);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.welcome-icon svg {
    width: 28px;
    height: 28px;
    color: var(--accent);
}

.welcome-logo {
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
    opacity: 0.7;
}

.welcome-heading {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
}

.welcome-sub {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 400px;
}

.suggestion-grid {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.suggestion-card {
    padding: 14px 20px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    transition: all var(--transition);
    min-width: 180px;
}

.suggestion-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.suggestion-card svg {
    width: 20px;
    height: 20px;
    color: var(--accent);
}

/* Messages — text chat bubbles (Support uses .vvs-msg separately) */
.message {
    max-width: min(82%, 560px);
    width: fit-content;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: flex-end;
    gap: 8px;
    animation: fadeUp 0.28s ease-out;
}

.message.user {
    margin-left: auto;
    flex-direction: row-reverse;
}

.message-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.message.user .message-avatar {
    background: var(--accent);
    color: #1a120c;
}

.message.assistant .message-avatar {
    background: #2a2620;
    color: #f3e6d4;
}

[data-theme="dark"] .message.assistant .message-avatar {
    background: #2c2833;
    color: #f0e6d8;
}

.message-author {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--text-secondary);
    margin: 0 6px 5px;
}

.message.user .message-author {
    text-align: right;
    color: color-mix(in srgb, var(--accent) 70%, var(--text-secondary));
}

.message-content {
    flex: 1;
    min-width: 0;
    font-size: 14.5px;
    line-height: 1.5;
    color: var(--text-primary);
    padding-top: 0;
    display: flex;
    flex-direction: column;
}

.message-bubble {
    background: #fffaf4;
    color: var(--text-primary);
    border: 1px solid rgba(29, 29, 35, 0.08);
    border-radius: 18px 18px 18px 6px;
    padding: 10px 14px 11px;
    box-shadow: 0 1px 2px rgba(29, 29, 35, 0.05);
}

.message.user .message-bubble {
    background: var(--accent, #c4956a);
    color: #1a120c;
    border-color: transparent;
    border-radius: 18px 18px 6px 18px;
    box-shadow: 0 8px 18px rgba(196, 149, 106, 0.22);
}

.message-bubble .message-text {
    margin: 0;
}

.message-bubble .sign-viewer--chat {
    margin-top: 8px;
    background: transparent;
    padding: 6px 0 0;
}

[data-theme="dark"] .message-bubble {
    background: #1c1a24;
    color: #f4f1ea;
    border-color: rgba(255, 255, 255, 0.06);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .message.user .message-bubble {
    background: var(--accent, #d4a574);
    color: #1a120c;
}

.message.is-translating .message-bubble {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
}

.chat-live-preview {
    max-width: 740px;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 14px;
    background: #fffaf4;
    border: 1px solid rgba(29, 29, 35, 0.08);
    box-shadow: 0 1px 2px rgba(29, 29, 35, 0.04);
    color: var(--text-primary);
}

.chat-live-preview[hidden] {
    display: none !important;
}

.chat-live-preview__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.16);
    flex-shrink: 0;
}

.chat-live-preview__copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.chat-live-preview__text {
    font-size: 13.5px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-live-preview__meta {
    font-size: 11px;
    color: var(--text-secondary);
}

[data-theme="dark"] .chat-live-preview {
    background: #1c1a24;
    border-color: rgba(255, 255, 255, 0.06);
}

/* Camera Panel */
.camera-panel {
    display: none;
    margin: 0 auto;
    max-width: 740px;
    width: 100%;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    animation: fadeUp 0.3s ease-out;
}

.camera-panel.active {
    display: block;
}

.camera-panel-header {
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.camera-panel-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.camera-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-tertiary);
    transition: background var(--transition);
}

.camera-dot.live {
    background: var(--error);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
    animation: pulse 2s ease-in-out infinite;
}

.camera-panel-label {
    font-size: 13px;
    font-weight: 600;
}

.camera-panel-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.camera-state {
    font-size: 12px;
    color: var(--text-tertiary);
    font-weight: 500;
}

.camera-state:not([data-off]) {
    color: var(--success);
}

.camera-close-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    transition: all var(--transition);
}

.camera-close-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.camera-close-btn svg {
    width: 16px;
    height: 16px;
}

.camera-panel video {
    width: 100%;
    display: block;
    background: #000;
    aspect-ratio: 16/9;
}

/* ── Composer ── */
.composer {
    padding: 12px 24px 20px;
    flex-shrink: 0;
}

.composer-box {
    max-width: 740px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 6px 6px 6px 14px;
    transition: all var(--transition);
    box-shadow: var(--shadow-xs);
}

.composer-box:focus-within {
    border-color: var(--accent);
    box-shadow: var(--shadow-glow);
}

.main-panel.is-chat .composer-box {
    background: #fffaf4;
    border-color: rgba(29, 29, 35, 0.1);
    box-shadow: 0 10px 28px rgba(29, 29, 35, 0.07);
}

.main-panel.is-chat .composer-box:focus-within {
    border-color: var(--accent);
    box-shadow: 0 10px 28px rgba(196, 149, 106, 0.18);
}

[data-theme="dark"] .main-panel.is-chat .composer-box {
    background: #1c1a24;
    border-color: rgba(255, 255, 255, 0.08);
}

.composer-box.is-locked,
.composer-input:disabled {
    opacity: 0.72;
}

.composer-left {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.composer-icon-btn {
    width: 34px;
    height: 34px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    transition: all var(--transition);
}

.composer-icon-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.composer-icon-btn.active {
    color: var(--accent);
    background: var(--accent-light);
}

.composer-icon-btn svg {
    width: 18px;
    height: 18px;
}

.composer-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
    padding: 8px 4px;
    min-width: 0;
}

.composer-input::placeholder {
    color: var(--text-tertiary);
}

.send-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--accent);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all var(--transition);
    flex-shrink: 0;
}

.send-btn:hover {
    background: var(--accent-hover);
    transform: scale(1.05);
}

.send-btn svg {
    width: 16px;
    height: 16px;
}

.composer-hint {
    text-align: center;
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 8px;
}

/* ── Section Panels (Preferences, Settings, Profile) ── */
.section-panel {
    display: none;
    flex: 1;
    overflow-y: auto;
    padding: 40px 24px;
    animation: fadeUp 0.3s ease-out;
}

.section-panel.visible {
    display: block;
}

.section-hidden {
    display: none !important;
}

.panel-header {
    max-width: 600px;
    margin: 0 auto 32px;
}

.panel-title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 6px;
}

.panel-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
}

.panel-card {
    max-width: 600px;
    margin: 0 auto;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
}

.pref-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
}

.pref-row:last-child {
    border-bottom: none;
}

.pref-row.vertical {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.pref-row span {
    font-weight: 500;
}

.toggle-check {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    cursor: pointer;
}

.pref-input {
    width: 100%;
    padding: 9px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-primary);
    outline: none;
    transition: all var(--transition);
}

.pref-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.panel-save-btn {
    margin-top: 20px;
    width: 100%;
    padding: 11px;
    background: var(--accent);
    color: var(--text-on-accent);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

.panel-save-btn:hover {
    background: var(--accent-hover);
    box-shadow: var(--shadow-glow);
}

/* ══════════════════════════════════════════════════════════════════════════
   ANIMATIONS
   ══════════════════════════════════════════════════════════════════════════ */

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes floatWide1 {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(25vw, 15vh) rotate(45deg); }
}

@keyframes floatWide2 {
    0% { transform: translate(0, 0) rotate(0deg) scale(1); }
    100% { transform: translate(-20vw, -25vh) rotate(-30deg) scale(1.15); }
}

@keyframes floatWide3 {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-30vw, 10vh) rotate(60deg); }
}

/* ══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
    .sidebar,
    .sidebar.collapsed {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 110;
        box-shadow: var(--shadow-lg);
        width: min(280px, 88vw);
        min-width: 0;
        max-width: min(280px, 88vw);
        transform: translateX(-100%);
        pointer-events: none;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .sidebar.is-drawer-open,
    .sidebar.is-drawer-open.collapsed {
        transform: translateX(0);
        pointer-events: auto;
    }

    .chat-header-toggle {
        display: flex !important;
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 768px) {
    .auth-card {
        padding: 32px 24px;
    }

    .name-grid {
        grid-template-columns: 1fr;
    }

    .welcome-heading {
        font-size: 22px;
    }

    .suggestion-grid {
        flex-direction: column;
        align-items: stretch;
    }

    .suggestion-card {
        min-width: unset;
    }
}

@media (max-width: 480px) {
    .auth-header {
        padding: 16px 20px;
    }

    .auth-card {
        padding: 28px 20px;
        border-radius: var(--radius-md);
    }

    .chat-body {
        padding: 16px;
    }

    .composer {
        padding: 10px 16px 16px;
    }
}

/* ── Settings info (no server URL fields in UI) ── */
.settings-info-card {
    text-align: left;
}

.settings-info-lead {
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-secondary);
    margin-bottom: 14px;
}

.settings-info-list {
    margin: 0 0 18px 1.1em;
    padding: 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-secondary);
}

.settings-info-list li {
    margin-bottom: 8px;
}

.settings-info-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.panel-save-btn--ghost {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.panel-save-btn--ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
}

body.high-contrast {
    --accent: #a96c2f;
    --border: #8a8a8a;
}

body.no-smooth *,
body.no-smooth *:hover,
body.reduced-motion *,
body.reduced-motion *:hover {
    animation: none !important;
    transition: none !important;
}

/* ── Sidebar: translation flow labels ── */
.sidebar-nav-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-tertiary);
    padding: 12px 16px 6px;
}

/* ── Pipeline panels (conceptual diagram UI) ── */
.pipeline-section {
    max-width: 960px;
    margin: 0 auto;
}

.pipeline-inner {
    padding-bottom: 32px;
}

.pipeline-intro {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.5;
}

.pipeline-flow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 6px;
    padding: 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
}

.pipeline-flow--wrap {
    justify-content: flex-start;
}

.pipeline-step {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 12px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    font-size: 12px;
    text-align: center;
    max-width: 140px;
}

.pipeline-step small {
    display: block;
    font-size: 10px;
    color: var(--text-tertiary);
    font-weight: 400;
    line-height: 1.3;
}

.pipeline-step--out {
    border-color: var(--accent);
    background: rgba(212, 165, 116, 0.12);
}

.pipeline-step-num {
    font-weight: 700;
    font-size: 14px;
    color: var(--accent);
}

.pipeline-step-label {
    font-weight: 600;
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-align: center;
    flex-wrap: wrap;
}

.pipeline-step-label svg,
.pipeline-label svg,
.pipeline-media-head .dash-ico {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: var(--accent);
}

.pipeline-arrow {
    color: var(--text-tertiary);
    font-size: 18px;
    user-select: none;
}

.pipeline-limitation {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    padding: 10px 14px;
    background: rgba(180, 120, 60, 0.08);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(180, 120, 60, 0.25);
}

.pipeline-hint {
    font-weight: 400;
    color: var(--text-tertiary);
}

.pipeline-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.pipeline-grid--sign-live {
    grid-template-columns: minmax(0, 1.75fr) minmax(280px, 1fr);
    align-items: start;
}

@media (max-width: 900px) {
    .pipeline-grid {
        grid-template-columns: 1fr;
    }

    .pipeline-grid--sign-live {
        grid-template-columns: 1fr;
    }

    .pipeline-flow {
        justify-content: flex-start;
    }
}

.pipeline-media-card,
.pipeline-text-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
}

.pipeline-media-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 600;
}

.pipeline-media-head .pipeline-btn-secondary {
    margin-left: auto;
}

.pipeline-video-wrap {
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
    background: #0a0a0a;
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.45);
}

.pipeline-video {
    width: 100%;
    max-height: 320px;
    border-radius: var(--radius-sm);
    background: #111;
    object-fit: cover;
    display: block;
}

.pipeline-video--large {
    max-height: none;
    min-height: 420px;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transform: scaleX(-1);
}

.pipeline-media-card--camera {
    padding: 18px;
}

.pipeline-hand-badge {
    margin-left: auto;
    margin-right: 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.12);
    color: var(--text-tertiary);
    border: 1px solid rgba(148, 163, 184, 0.2);
    transition: all 0.2s ease;
}

.pipeline-hand-badge.active {
    color: #86efac;
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.35);
}

.pipeline-media-head .pipeline-btn-secondary {
    margin-left: 0;
}

.pipeline-canvas-hidden {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
}

.camera-dot,
.mic-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-tertiary);
    flex-shrink: 0;
}

.camera-dot.live,
.mic-dot.live {
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.35);
}

.uiverse-btn .mic-dot {
    display: inline-block;
    vertical-align: middle;
    margin-right: 4px;
}

.live-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-tertiary);
    flex-shrink: 0;
    opacity: 0.35;
}

.live-dot.live {
    opacity: 1;
    background: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.35);
    animation: pulse 1.5s ease-in-out infinite;
}

.pipeline-mic-placeholder {
    min-height: 200px;
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    border: 1px dashed var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--text-secondary);
    font-size: 13px;
    text-align: center;
    padding: 24px;
}

.pipeline-mic-placeholder svg {
    width: 48px;
    height: 48px;
    opacity: 0.5;
}

.pipeline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.pipeline-options {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 20px;
    margin-top: 12px;
}

.pipeline-settings-panel {
    margin-top: 14px;
    padding: 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.18);
}

.pipeline-settings-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.pipeline-settings-panel__title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.pipeline-api-pill {
    font-size: 11px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    color: var(--text-tertiary);
    background: rgba(148, 163, 184, 0.08);
    max-width: 100%;
    line-height: 1.3;
}

.pipeline-api-pill.ok {
    color: #86efac;
    border-color: rgba(34, 197, 94, 0.35);
    background: rgba(34, 197, 94, 0.1);
}

.pipeline-api-pill.error {
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.35);
    background: rgba(239, 68, 68, 0.1);
}

.pipeline-setting-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.pipeline-setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.pipeline-setting-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.pipeline-setting-copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.pipeline-setting-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.pipeline-setting-desc {
    font-size: 12px;
    color: var(--text-tertiary);
    line-height: 1.35;
}

.pipeline-switch {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
    cursor: pointer;
}

.pipeline-switch input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.pipeline-switch-track {
    width: 46px;
    height: 26px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.28);
    position: relative;
    transition: background 0.2s ease;
}

.pipeline-switch-track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.28);
    transition: transform 0.2s ease;
}

.pipeline-switch input:checked + .pipeline-switch-track {
    background: linear-gradient(135deg, #d4af37, #b8941f);
}

.pipeline-switch input:checked + .pipeline-switch-track::after {
    transform: translateX(20px);
}

.pipeline-switch input:focus-visible + .pipeline-switch-track {
    outline: 2px solid rgba(212, 175, 55, 0.65);
    outline-offset: 2px;
}

.pipeline-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--text-muted, #64748b);
    cursor: pointer;
}

.pipeline-check input {
    accent-color: var(--accent, #6366f1);
}

.pipeline-btn-primary {
    padding: 10px 16px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: background var(--transition);
}

.pipeline-btn-primary:hover {
    background: var(--accent-hover);
}

.pipeline-btn-secondary {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
}

.pipeline-btn-secondary:hover {
    border-color: var(--accent);
}

.pipeline-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.pipeline-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    background: var(--bg-primary);
    color: var(--text-primary);
    resize: vertical;
}

.pipeline-api-note {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 10px;
    line-height: 1.4;
}

/* Generic fallback (still used by pages that only render a single image) */
.pipeline-image-box {
    min-height: 200px;
    border-radius: var(--radius-sm);
    border: 1px dashed var(--border);
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.pipeline-sign-img {
    max-width: 100%;
    max-height: 280px;
    object-fit: contain;
}

.pipeline-image-placeholder {
    padding: 20px;
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}

/* ══════════════════════════════════════════════════════════════════════
   Sign viewer (Voice → Sign output)
   Large square stage for the current sign + the whole sentence as tiles.
   Everything scales with the container via CSS variables so it stays clean
   from a 320 px phone up to a wide desktop card.
   ══════════════════════════════════════════════════════════════════════ */
.pipeline-sign-card {
    margin-top: 20px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
}

.pipeline-sign-card .pipeline-media-head {
    margin-bottom: 14px;
    flex-wrap: wrap;
    row-gap: 4px;
}

.pipeline-sign-card__hint {
    margin-left: auto;
    min-width: 0;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-tertiary);
    white-space: normal;
    text-align: right;
}

/* ── One-screen layout for Voice → Sign: no vertical scrolling at 100 % zoom ──
   Left column = mic + transcript, right column = sign output. The picture is sized
   from the viewport height so the whole panel fits between the header and the
   bottom of the window; on short/narrow screens it falls back to stacking. */
.pipeline-section--fit {
    max-width: 1240px;
    padding: 14px 24px 16px;
}

.pipeline-section--fit.visible {
    display: flex;
    flex-direction: column;
}

.pipeline-section--fit .pipeline-inner {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
    padding-bottom: 0;
}

.pipeline-section--fit .pipeline-intro {
    display: none;
}

.pipeline-section--fit .pipeline-flow {
    flex: 0 0 auto;
    padding: 8px 10px;
    gap: 6px 4px;
    margin-bottom: 12px;
    justify-content: center;
}

.pipeline-section--fit .pipeline-step {
    flex-direction: row;
    gap: 6px;
    padding: 5px 10px;
    font-size: 11px;
    max-width: none;
}

.pipeline-section--fit .pipeline-step small {
    display: none;
}

.pipeline-section--fit .pipeline-step-num {
    font-size: 12px;
}

.pipeline-section--fit .pipeline-arrow {
    font-size: 14px;
}

.pipeline-fit-grid {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(280px, 5fr) minmax(0, 7fr);
    gap: 16px;
    align-items: stretch;
}

.pipeline-fit-side {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 0;
    min-width: 0;
}

.pipeline-fit-side .pipeline-media-card,
.pipeline-fit-side .pipeline-text-card {
    padding: 14px;
}

.pipeline-fit-side .pipeline-media-head {
    margin-bottom: 10px;
}

.pipeline-fit-side .pipeline-mic-placeholder {
    min-height: 0;
    padding: 8px 12px;
    font-size: 12px;
    line-height: 1.35;
    gap: 4px;
}

.pipeline-fit-side .pipeline-mic-placeholder svg {
    display: none;
}

.pipeline-fit-side .mic-level-meter--large {
    height: 30px;
    margin-bottom: 0;
}

.pipeline-fit-side .mic-level-meter--large .mic-level-bar {
    height: calc(6px + var(--mic-level, 0) * 22px);
}

/* Compact buttons so they sit on one row inside the narrow column */
.pipeline-fit-side .pipeline-actions {
    margin-top: 10px;
    gap: 8px;
}

.pipeline-fit-side .uiverse-btn {
    padding: 8px 14px;
    font-size: 12px;
}

.pipeline-fit-side .pipeline-media-head .uiverse-btn {
    padding: 6px 12px;
}

.pipeline-fit-side .pipeline-text-card {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.pipeline-fit-side .pipeline-textarea {
    flex: 1;
    min-height: 72px;
    resize: none;
}

.pipeline-fit-side .pipeline-api-note {
    margin-top: 8px;
}

.pipeline-fit-grid .pipeline-sign-card {
    margin-top: 0;
    min-height: 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.pipeline-fit-grid .pipeline-sign-card .pipeline-media-head {
    flex: 0 0 auto;
    margin-bottom: 10px;
}

.pipeline-fit-grid .sign-viewer {
    flex: 1;
    min-height: 0;
    justify-content: center;
    /* header (~58) + panel padding (30) + flow (~52) + card chrome, caption, bar, controls (~230) */
    --sign-stage: clamp(160px, calc(100vh - 372px), 420px);
}

@supports (height: 100dvh) {
    .pipeline-fit-grid .sign-viewer {
        --sign-stage: clamp(160px, calc(100dvh - 372px), 420px);
    }
}

@media (max-width: 900px) {
    .pipeline-section--fit {
        padding: 14px 16px 16px;
    }

    .pipeline-section--fit .pipeline-inner {
        flex: 0 0 auto;
    }

    .pipeline-fit-grid {
        flex: 0 0 auto;
        grid-template-columns: 1fr;
        align-items: start;
    }

    .pipeline-fit-side .pipeline-text-card {
        flex: 0 0 auto;
    }

    .pipeline-fit-side .pipeline-textarea {
        flex: 0 0 auto;
        resize: vertical;
    }

    .pipeline-fit-grid .sign-viewer {
        --sign-stage: min(82vw, 320px);
    }
}

/* ── One-screen layout for Sign → Voice: camera + all text boxes in one frame ── */
.pipeline-section--sign-voice {
    max-width: 1240px;
    padding: 10px 20px 12px;
}

.pipeline-section--sign-voice.visible {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.pipeline-section--sign-voice .pipeline-intro,
.pipeline-section--sign-voice .pipeline-limitation {
    display: none;
}

.pipeline-section--sign-voice .pipeline-flow {
    flex: 0 0 auto;
    padding: 6px 8px;
    gap: 4px;
    margin-bottom: 10px;
}

.pipeline-sign-voice-grid {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, 1fr);
    gap: 12px;
    align-items: stretch;
}

.pipeline-section--sign-voice .pipeline-media-card--camera {
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 12px;
}

.pipeline-section--sign-voice .pipeline-media-head {
    flex: 0 0 auto;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 6px 8px;
}

.pipeline-section--sign-voice .pipeline-video-wrap {
    flex: 1;
    min-height: 0;
    display: flex;
}

.pipeline-section--sign-voice .pipeline-video--large {
    min-height: 0;
    height: 100%;
    max-height: none;
    aspect-ratio: auto;
    object-fit: cover;
}

.pipeline-section--sign-voice .pipeline-actions {
    flex: 0 0 auto;
    margin-top: 8px;
}

.pipeline-section--sign-voice .pipeline-actions .uiverse-btn,
.pipeline-sign-voice-frame .uiverse-btn {
    padding: 7px 12px;
    font-size: 12px;
}

.pipeline-sign-voice-frame {
    min-height: 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.pipeline-sign-voice-frame .pipeline-text-card {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 0;
    border: none;
    background: transparent;
}

.pipeline-sign-voice-frame .pipeline-text-card--llm {
    flex: 1.35 1 auto;
}

.pipeline-sign-voice-frame .pipeline-textarea {
    flex: 1;
    min-height: 44px;
    resize: none;
}

.pipeline-sign-voice-frame .pipeline-text-card--llm .pipeline-textarea {
    min-height: 64px;
    border-color: var(--accent);
}

.pipeline-sign-voice-frame .pipeline-api-note {
    margin-top: 6px;
    font-size: 11px;
}

.pipeline-sign-voice-frame .pipeline-settings-panel {
    flex: 0 0 auto;
    margin-top: 0;
    padding: 8px 10px;
}

.pipeline-sign-voice-frame .pipeline-settings-panel__head {
    margin-bottom: 6px;
}

.pipeline-sign-voice-frame .pipeline-setting-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 12px;
}

.pipeline-sign-voice-frame .pipeline-setting-row {
    padding: 5px 0;
}

.pipeline-sign-voice-frame .pipeline-setting-title {
    font-size: 12px;
}

.pipeline-sign-voice-frame .pipeline-setting-desc {
    display: none;
}

.pipeline-ultra-ad {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin-top: 8px;
    padding: 10px 12px;
    text-align: left;
    cursor: pointer;
    border-radius: var(--radius-md);
    border: 1px dashed var(--accent);
    background: var(--accent-light);
    color: inherit;
    font: inherit;
}

.pipeline-ultra-ad:hover {
    background: var(--accent-glow);
}

.pipeline-ultra-ad__badge {
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--accent);
    color: var(--text-on-accent);
    width: fit-content;
}

.pipeline-ultra-ad__copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.35;
}

.pipeline-ultra-ad__copy strong {
    font-size: 13px;
    color: var(--text-primary);
}

/* Ultra coupon modal (membership card) */
#ultraGestureModal {
    background: rgba(18, 18, 22, 0.82);
    backdrop-filter: blur(8px);
}

.ultra-coupon {
    --uv-ink: var(--text-primary);
    --uv-primary: var(--accent);
    --uv-header-text: #f5f5f5;
    --uv-text: var(--text-primary);
    --uv-bg: var(--bg-elevated);
    --uv-shadow: var(--text-primary);
    --uv-grid: color-mix(in srgb, var(--text-primary) 10%, transparent);
    --uv-dash: color-mix(in srgb, var(--text-primary) 20%, transparent);
    --uv-muted: var(--text-secondary);
    position: relative;
    width: min(420px, calc(100vw - 32px));
    background: var(--uv-bg);
    border: 3px solid var(--uv-ink);
    border-radius: 14px;
    box-shadow: 10px 10px 0 var(--uv-shadow);
    overflow: visible;
    text-align: left;
    color: var(--uv-text);
    font-family: var(--font);
    transform: translateY(0) scale(1);
    transition: transform 0.3s, background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.modal-overlay.hidden .ultra-coupon {
    transform: translateY(16px) scale(0.96);
}

.ultra-coupon__close {
    position: absolute;
    top: -12px;
    right: -12px;
    z-index: 3;
    width: 28px;
    height: 28px;
    border: 2px solid var(--uv-bg);
    border-radius: 999px;
    background: var(--uv-text);
    color: var(--uv-bg);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.ultra-coupon__close:hover {
    background: var(--accent);
    color: var(--text-inverse);
}

.ultra-coupon__header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 22px 20px;
    border-radius: 11px 11px 0 0;
    background-color: var(--uv-primary);
    background-image: repeating-linear-gradient(
        -45deg,
        rgba(0, 0, 0, 0.07) 0 8px,
        transparent 8px 16px
    );
    overflow: visible;
}

.ultra-coupon__header h2 {
    margin: 0;
    font-size: 34px;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--uv-header-text);
    line-height: 1;
}

.ultra-coupon__tag {
    display: inline-block;
    margin-right: 18px;
    padding: 7px 12px;
    background: var(--uv-bg);
    color: var(--uv-text);
    border: 2.5px solid var(--uv-ink);
    box-shadow: 4px 4px 0 var(--uv-ink);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    transform: rotate(-8deg);
}

.ultra-coupon__star {
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: 13px;
    color: var(--uv-header-text);
}

.ultra-coupon__body {
    padding: 22px 22px 8px;
    background-color: var(--uv-bg);
    background-image:
        linear-gradient(var(--uv-grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--uv-grid) 1px, transparent 1px);
    background-size: 18px 18px;
}

.ultra-coupon__body p {
    margin: 0 0 20px;
    text-align: center;
    font-size: 13px;
    line-height: 1.45;
    color: var(--uv-muted);
}

.ultra-coupon__features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 10px;
    margin: 0;
    padding: 0 4px 12px;
    list-style: none;
}

.ultra-coupon__features li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--uv-text);
}

.ultra-coupon__icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--uv-text);
    color: var(--uv-bg);
    border-radius: 7px;
}

.ultra-coupon__icon svg {
    width: 16px;
    height: 16px;
}

.ultra-coupon__cut {
    position: relative;
    height: 0;
    margin: 4px 18px 0;
    border-top: 2px dashed var(--uv-dash);
}

.ultra-coupon__scissors {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) rotate(-90deg);
    padding: 0 6px;
    background: var(--uv-bg);
    color: var(--uv-muted);
    font-size: 13px;
    line-height: 1;
}

.ultra-coupon__footer {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 18px 20px;
    background: var(--uv-bg);
    border-radius: 0 0 11px 11px;
}

.ultra-coupon__footer::before {
    content: "";
    position: absolute;
    left: 16px;
    bottom: 10px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--uv-text) 22%, transparent);
    box-shadow: 12px 6px 0 3px color-mix(in srgb, var(--uv-text) 14%, transparent), 4px 14px 0 5px var(--uv-grid);
    pointer-events: none;
}

.ultra-coupon__footer::after {
    content: "";
    position: absolute;
    right: 22%;
    bottom: -10px;
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: 10px solid var(--uv-text);
}

.ultra-coupon__price {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ultra-coupon__price strong {
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    color: var(--uv-text);
}

.ultra-coupon__price span {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--uv-muted);
}

.ultra-coupon__cta {
    position: relative;
    z-index: 1;
    flex: 0 1 auto;
    padding: 13px 16px;
    border: none;
    border-radius: 8px;
    background: var(--uv-text);
    color: var(--uv-bg);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
}

.ultra-coupon__cta:hover {
    background: var(--accent);
    color: var(--text-inverse);
}

@media (max-width: 420px) {
    .ultra-coupon__header h2 {
        font-size: 28px;
    }

    .ultra-coupon__features {
        grid-template-columns: 1fr;
    }

    .ultra-coupon__footer {
        flex-direction: column;
        align-items: stretch;
    }

    .ultra-coupon__cta {
        width: 100%;
        text-align: center;
    }
}

/* Gated auth modal — login / signup / forgot, matches VoiceVerSign surfaces */
#guestBlockModal {
    overflow-y: auto;
    padding: 24px 16px;
}

.vvs-auth {
    position: relative;
    width: min(400px, calc(100vw - 32px));
    padding: 36px 32px 28px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    text-align: left;
    color: var(--text-primary);
    font-family: var(--font);
    transform: translateY(0) scale(1);
    transition: transform 0.3s;
}

body.guest-auth-open {
    overflow: hidden;
}

.vvs-auth--gate {
    width: min(420px, calc(100vw - 32px));
    max-height: min(88vh, 740px);
    overflow: auto;
}

.vvs-auth__tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin: 0 0 16px;
    padding: 4px;
    border-radius: 12px;
    background: var(--bg-secondary, #eaeaf0);
}

.vvs-auth__tab {
    border: 0;
    background: transparent;
    border-radius: 9px;
    padding: 8px 10px;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
}

.vvs-auth__tab.is-on {
    background: var(--bg-elevated, #fff);
    color: var(--text-primary);
    box-shadow: var(--shadow-xs);
}

.vvs-auth--gate .name-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.vvs-auth--gate .guest-gate-roles {
    margin-bottom: 4px;
}

.vvs-auth--gate .checkbox-wrapper {
    align-items: center;
}

.vvs-auth--choice .vvs-auth__mark {
    margin-bottom: 10px;
}

.vvs-auth--choice .vvs-auth__title {
    font-size: 18px;
}

.vvs-auth--choice .vvs-auth__subtitle {
    margin-bottom: 14px;
    font-size: 13px;
}

.vvs-auth__actions {
    display: flex;
    gap: 8px;
}

.vvs-auth__actions .uiverse-btn {
    flex: 1;
    width: auto;
    min-width: 0;
    padding: 10px 12px;
    font-size: 13px;
    text-decoration: none;
    text-align: center;
}

.modal-overlay.hidden .vvs-auth {
    transform: translateY(16px) scale(0.96);
}

.vvs-auth .modal-close-btn {
    top: 14px;
    right: 14px;
}

.vvs-auth__mark {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    background: var(--accent-light);
    color: var(--accent-hover);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.vvs-auth__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
}

.vvs-auth__title {
    margin: 0 0 6px;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text-primary);
}

.vvs-auth__subtitle {
    margin: 0 0 22px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-secondary);
}

.vvs-auth__form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vvs-auth__form[hidden] {
    display: none !important;
}

.vvs-auth__form .form-label {
    margin-bottom: 0;
}

.vvs-auth__form .form-message {
    margin: 0;
}

.vvs-auth__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.vvs-auth__types {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.vvs-auth__type {
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    padding: 10px 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.vvs-auth__type.is-active {
    border-color: var(--accent);
    background: var(--accent-light);
    color: var(--accent-hover);
}

.vvs-auth__terms {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    line-height: 1.35;
    color: var(--text-secondary);
}

.vvs-auth__terms input {
    margin-top: 2px;
    accent-color: var(--accent);
}

.vvs-auth__switch {
    margin: 2px 0 0;
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
}

.vvs-auth__switch--stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
}

.vvs-auth__switch--stack a {
    color: var(--accent-hover);
    font-weight: 600;
}

.vvs-auth__switch button {
    border: none;
    background: none;
    padding: 0;
    color: var(--accent-hover);
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
    font-family: inherit;
}

.vvs-auth .form-footer {
    display: flex;
    justify-content: flex-end;
    margin: 0;
}

.vvs-auth .form-link {
    font-size: 13px;
}

@media (max-width: 420px) {
    .vvs-auth {
        padding: 28px 20px 22px;
    }

    .vvs-auth__row {
        grid-template-columns: 1fr;
    }
}

.pipeline-collect-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.pipeline-collect-row .pipeline-textarea {
    flex: 1 1 140px;
    min-height: 36px !important;
    height: 36px;
    padding: 6px 10px;
    resize: none;
}

@media (max-width: 900px) {
    .pipeline-section--sign-voice.visible {
        overflow-y: auto;
    }

    .pipeline-sign-voice-grid {
        grid-template-columns: 1fr;
    }

    .pipeline-section--sign-voice .pipeline-video--large {
        min-height: 220px;
        height: min(42vh, 280px);
    }

    .pipeline-sign-voice-frame .pipeline-textarea {
        flex: 0 0 auto;
        min-height: 88px;
    }

    .pipeline-sign-voice-frame .pipeline-setting-list {
        grid-template-columns: 1fr;
    }
}

/* Tablet landscape and short phones: the two-column one-screen layout
   crushes the camera, the corrected-text panel, and the theme switch. */
@media (max-width: 1400px) and (max-height: 860px) {
    .pipeline-section--sign-voice.visible,
    .pipeline-section--fit.visible {
        overflow-x: hidden;
        overflow-y: auto;
        padding-bottom: 72px;
    }

    .pipeline-sign-voice-grid,
    .pipeline-fit-grid {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .pipeline-section--sign-voice .pipeline-video-wrap {
        flex: 0 0 auto;
    }

    .pipeline-section--sign-voice .pipeline-video--large {
        width: 100%;
        height: auto;
        min-height: 150px;
        max-height: min(40vh, 260px);
        aspect-ratio: 16 / 10;
        object-fit: cover;
    }

    .pipeline-sign-voice-frame {
        overflow: visible;
    }

    .pipeline-sign-voice-frame .pipeline-text-card,
    .pipeline-sign-voice-frame .pipeline-text-card--llm {
        flex: 0 0 auto;
    }

    .pipeline-sign-voice-frame .pipeline-textarea,
    .pipeline-sign-voice-frame .pipeline-text-card--llm .pipeline-textarea {
        flex: 0 0 auto;
        min-height: 64px;
        height: auto;
    }

    .pipeline-section--sign-voice .pipeline-step small {
        display: none;
    }

    .pipeline-fit-grid .sign-viewer {
        --sign-stage: min(70vw, 280px);
    }

    .theme-dock {
        left: auto;
        right: 12px;
        bottom: 12px;
    }
}

.sign-viewer {
    --sign-stage: clamp(220px, 50vw, 380px);
    --sign-media-bg: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 0;
    padding: 12px 8px 10px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-primary);
    outline: none;
}

.sign-viewer:focus-visible {
    box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ── Stage: fixed square so every image (any source size) is fully visible ── */
.sign-viewer__stage {
    position: relative;
    width: var(--sign-stage);
    max-width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-md);
    background: var(--sign-media-bg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: box-shadow 0.2s;
}

.sign-viewer__stage.is-empty {
    background: var(--bg-secondary);
    border-style: dashed;
    box-shadow: none;
}

.sign-viewer__media {
    display: none;
    width: 100%;
    height: 100%;
    object-fit: contain;      /* never crop a hand */
    object-position: center;
    padding: 6%;
    box-sizing: border-box;
    background: var(--sign-media-bg);
    user-select: none;
    -webkit-user-drag: none;
}

img.sign-viewer__media {
    opacity: 0;
    transition: opacity 0.18s ease;
}

img.sign-viewer__media.is-loaded {
    opacity: 1;
}

video.sign-viewer__media {
    padding: 0;
    background: #000;
}

.sign-viewer__empty {
    font-size: clamp(40px, 10vw, 72px);
    line-height: 1;
    opacity: 0.35;
    filter: grayscale(1);
    display: none;
}

.sign-viewer__stage.is-empty .sign-viewer__empty {
    display: block;
}

/* Big letter/word in the corner so the sign is unambiguous even at a glance */
.sign-viewer__badge {
    position: absolute;
    top: 10px;
    left: 10px;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--accent);
    color: #fff;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1;
    box-shadow: var(--shadow-sm);
    pointer-events: none;
    text-transform: uppercase;
}

.sign-viewer__badge--word {
    font-size: 14px;
    max-width: calc(100% - 20px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sign-viewer__stage:not(.is-empty) .sign-viewer__badge:not(:empty) {
    display: inline-flex;
}

/* Text-only sign (digit / letter missing from the folder): show the glyph large */
.sign-viewer__stage.is-text {
    background: var(--bg-secondary);
}

.sign-viewer__stage.is-text .sign-viewer__badge {
    position: static;
    height: auto;
    min-width: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
    color: var(--text-primary);
    font-size: clamp(64px, 18vw, 140px);
}

.sign-viewer__stage.is-text .sign-viewer__media {
    display: none !important;
}

/* ── Caption: "Letter L · HEL[L]O" ── */
.sign-viewer__caption {
    padding: 0 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
    line-height: 1.4;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.sign-viewer:not(.has-sentence) .sign-viewer__caption {
    font-weight: 500;
    color: var(--text-secondary);
}

.sign-viewer__word {
    display: inline-flex;
    gap: 2px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-secondary);
}

.sign-viewer__word > span.is-current {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

/* ── Progress through the sentence ── */
.sign-viewer__progress {
    width: min(100%, var(--sign-stage));
    height: 4px;
    border-radius: 999px;
    background: var(--bg-tertiary, var(--bg-secondary));
    overflow: hidden;
    display: none;
}

.sign-viewer.has-sentence .sign-viewer__progress {
    display: block;
}

.sign-viewer__progress > span {
    display: block;
    height: 100%;
    width: 0;
    background: var(--accent);
    border-radius: inherit;
    transition: width 0.25s ease;
}

/* ── Controls bar: previous · play/pause · next · counter (always visible) ── */
.sign-viewer__controls {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: min(100%, var(--sign-stage));
    padding-top: 2px;
}

.sign-viewer.has-sentence .sign-viewer__controls {
    display: flex;
}

.sign-viewer__btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text-primary);
    font-size: 26px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-xs);
    transition: background 0.15s, border-color 0.15s, transform 0.1s;
    padding: 0;
}

.sign-viewer__btn:hover {
    border-color: var(--accent);
    background: var(--accent-light);
}

.sign-viewer__btn:active {
    transform: scale(0.94);
}

.sign-viewer__btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.sign-viewer__btn--primary {
    width: 56px;
    height: 56px;
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    font-size: 18px;
    box-shadow: var(--shadow-sm);
}

.sign-viewer__btn--primary:hover {
    background: var(--accent-hover, var(--accent));
    border-color: var(--accent-hover, var(--accent));
}

.sign-viewer__counter {
    min-width: 3.5em;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--text-secondary);
}

.sign-viewer__counter:empty {
    display: none;
}

/* ── One sign tile (chat replies) ── */
.sign-tile {
    --tile: var(--sign-tile, 72px);
    flex: 0 0 auto;
    width: var(--tile);
    margin: 0;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border);
    background: var(--bg-elevated);
    overflow: hidden;
    text-align: center;
    transition: border-color 0.15s;
}

.sign-tile__frame {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--sign-media-bg, #fff);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.sign-tile__frame img,
.sign-tile__frame video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;      /* full hand always visible, never cropped */
    object-position: center;
    background: var(--sign-media-bg, #fff);
    user-select: none;
    -webkit-user-drag: none;
}

.sign-tile--image .sign-tile__frame img {
    padding: 5%;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.18s ease;
}

.sign-tile.is-loaded .sign-tile__frame img {
    opacity: 1;
}

/* Skeleton shimmer while an image is still loading */
.sign-tile--image:not(.is-loaded) .sign-tile__frame {
    background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-tertiary, var(--bg-secondary)) 50%, var(--bg-secondary) 75%);
    background-size: 200% 100%;
    animation: sign-tile-shimmer 1.2s linear infinite;
}

@keyframes sign-tile-shimmer {
    from { background-position: 200% 0; }
    to   { background-position: -200% 0; }
}

.sign-tile__text {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: calc(var(--tile) * 0.42);
    font-weight: 700;
    color: var(--text-secondary);
    background: var(--bg-tertiary, var(--bg-secondary));
}

.sign-tile figcaption {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
    padding: 2px 4px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: var(--bg-elevated);
}

/* ── Responsive tuning ── */
@media (min-width: 900px) {
    .sign-viewer {
        --sign-stage: 380px;
    }
}

@media (max-width: 600px) {
    .sign-viewer {
        --sign-stage: min(82vw, 320px);
        padding: 10px 6px 10px;
        gap: 10px;
    }

    .sign-viewer__caption {
        font-size: 14px;
    }

    .sign-viewer__btn {
        width: 48px;
        height: 48px;
    }

    .sign-viewer__btn--primary {
        width: 60px;
        height: 60px;
    }

    .pipeline-sign-card {
        padding: 12px;
    }

    .pipeline-sign-card__hint {
        display: none;
    }
}

@media (max-width: 380px) {
    .sign-tile figcaption {
        font-size: 11px;
    }
}

#voiceSignVideo {
    max-width: 100%;
    background: #000;
    border-radius: var(--radius-sm);
}

.pipeline-api-note.is-error {
    color: #dc2626;
}

/* ── Text chat: the same sign viewer inside an assistant reply ── */
.sign-viewer--chat {
    --sign-stage: clamp(180px, 38vw, 280px);
    margin-top: 10px;
    padding: 10px 8px 10px;
    gap: 10px;
    background: var(--bg-elevated);
}

.sign-viewer--chat .sign-viewer__caption {
    font-size: 14px;
}

.sign-viewer--chat .sign-viewer__btn {
    width: 38px;
    height: 38px;
    font-size: 22px;
}

.sign-viewer--chat .sign-viewer__btn--primary {
    width: 46px;
    height: 46px;
    font-size: 15px;
}

.message--sign .message-text {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Composer mic while the offline recognizer is listening */
.composer-icon-btn.is-listening {
    color: #22c55e;
    background: rgba(34, 197, 94, 0.12);
    animation: micLivePulse 1.8s ease-in-out infinite;
}

body.reduced-motion .composer-icon-btn.is-listening {
    animation: none;
}

.composer-hint.is-error {
    color: #dc2626;
}

@media (max-width: 600px) {
    .sign-viewer--chat {
        --sign-stage: min(70vw, 260px);
    }
}

/* Chat: sign images embedded in assistant replies (same tiles as the viewer) */
.message-sign-strip {
    --sign-tile: 64px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 4px;
}

.message-sign-cell {
    cursor: default;
}

.message-sign-cell:hover {
    border-color: var(--border);
}

.message-text {
    white-space: pre-wrap;
}

.reduced-motion .sign-tile,
.reduced-motion .sign-viewer__progress > span,
.reduced-motion img.sign-viewer__media,
.reduced-motion .sign-tile--image .sign-tile__frame img {
    transition: none;
}

.reduced-motion .sign-tile--image:not(.is-loaded) .sign-tile__frame {
    animation: none;
}

.chat-header.section-hidden {
    display: none !important;
}

/* ── Role-based dashboard (hearing / deaf / admin) ── */
.sidebar-nav-buttons {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.role-banner {
    margin: 0;
    padding: 10px 16px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--text-secondary);
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.role-banner.section-hidden {
    display: none !important;
}

/* Subtle role indicator dot — replaces the heavy left-tab border. */
.role-banner::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-tertiary);
    flex-shrink: 0;
    transition: background var(--transition);
}

.dashboard--hearing .role-banner::before {
    background: #3b82f6;
}

.dashboard--deaf .role-banner::before {
    background: #8b5cf6;
}

.dashboard--admin .role-banner::before {
    background: #22c55e;
}

.dashboard--guest .role-banner::before {
    background: var(--text-tertiary);
}

.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    max-width: 720px;
    margin: 0 auto;
}

.admin-stat-card {
    padding: 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: center;
}

.admin-stat-value {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.admin-stat-label {
    font-size: 12px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

@media (max-width: 480px) {
    .role-banner {
        font-size: 12px;
        padding: 8px 12px;
    }

    .admin-stat-value {
        font-size: 22px;
    }
}

/* ══════════════════════════════════════════════════════════════════════════
   MODALS AND PRICING
   ══════════════════════════════════════════════════════════════════════════ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-overlay);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.3s;
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.modal-content {
    background: var(--bg-elevated);
    padding: 40px;
    border-radius: var(--radius-xl);
    max-width: 500px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    text-align: center;
    position: relative;
    border: 1px solid var(--border);
    transform: translateY(0) scale(1);
    transition: transform 0.3s;
}

.modal-overlay.hidden .modal-content {
    transform: translateY(20px) scale(0.95);
}

.create-password-modal {
    text-align: left;
    max-width: 420px;
}

.create-password-modal h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

.create-password-modal p {
    margin: 0 0 18px;
    color: var(--text-secondary);
    line-height: 1.45;
}

.create-password-modal label {
    display: block;
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 650;
}

.create-password-modal input {
    width: 100%;
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-primary);
    color: var(--text-primary);
    font: inherit;
}

.create-password-modal .create-password-error {
    margin: -4px 0 12px;
    color: #c45c5c;
    font-size: 13px;
}

.create-password-modal button {
    width: 100%;
    margin-top: 4px;
}

.verify-email-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.verify-email-actions .btn-primary,
.verify-email-actions button {
    width: auto;
    margin-top: 0;
}

.verify-email-later,
.verify-email-resend {
    border: 0;
    background: transparent;
    color: var(--text-secondary);
    font: inherit;
    font-weight: 650;
    cursor: pointer;
    padding: 0;
}

.verify-email-resend {
    display: inline-block;
    margin-top: 14px;
}

/* Try Plus plans modal */
body.plus-plans-open {
    overflow: hidden;
}

.plus-plans-overlay {
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 10050;
}

.plus-plans-overlay.hidden {
    z-index: 0;
}

#paymentModal {
    z-index: 10100;
}

.gcash-pay {
    position: relative;
    width: min(380px, calc(100vw - 32px));
    overflow: hidden;
    text-align: left;
    color: var(--text-primary);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.gcash-pay__close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: var(--bg-hover);
    color: var(--text-secondary);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.gcash-pay__close:hover {
    background: var(--bg-active);
    color: var(--text-primary);
}

.gcash-pay__header {
    padding: 18px 20px 16px;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}

.gcash-pay__brand {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gcash-pay__logo {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #007dff;
    color: #fff;
    font-size: 16px;
    font-weight: 800;
}

.gcash-pay__wordmark {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #007dff;
}

.gcash-pay__kicker {
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--text-secondary);
}

.gcash-pay__body {
    padding: 18px 20px 20px;
}

.gcash-pay__title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.gcash-pay__merchant {
    margin: 4px 0 12px;
    font-size: 13px;
    color: var(--text-secondary);
}

.gcash-pay__amount {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    margin: 8px 0 2px;
    color: var(--text-primary);
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.gcash-pay__currency {
    font-size: 20px;
    color: var(--accent);
    font-family: "Segoe UI", Inter, Arial, sans-serif;
    line-height: 1;
}

.gcash-pay__currency::before {
    content: "\20B1";
}

.gcash-pay__ref {
    margin: 0 0 16px;
    text-align: center;
    font-size: 12px;
    color: var(--text-tertiary);
}

.gcash-pay .form-label {
    color: var(--text-secondary);
}

.gcash-pay .form-input {
    background: var(--bg-input);
    border-color: var(--border);
    color: var(--text-primary);
}

.gcash-pay .form-input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.gcash-pay__mpin {
    letter-spacing: 0.4em;
}

.gcash-pay__error {
    margin: -4px 0 10px;
    font-size: 12px;
    color: var(--error);
}

.gcash-pay__cta {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: var(--radius-full);
    background: var(--accent);
    color: var(--text-on-accent);
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.gcash-pay__cta:hover {
    background: var(--accent-hover);
}

.gcash-pay__note {
    margin: 10px 0 0;
    text-align: center;
    font-size: 11px;
    color: var(--text-tertiary);
}

.plus-plans-inner {
    position: relative;
    width: min(980px, calc(100vw - 48px));
    max-height: min(86vh, 720px);
    overflow: auto;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    padding: 28px 28px 22px;
    color: var(--text-primary);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    transform: translateY(0) scale(1);
    transition: transform 0.3s;
}

.modal-overlay.hidden .plus-plans-inner {
    transform: translateY(20px) scale(0.95);
}

.plus-plans-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: var(--bg-hover);
    color: var(--text-secondary);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.plus-plans-close:hover {
    background: var(--bg-active);
    color: var(--text-primary);
}

.plus-plans-title {
    margin: 0 36px 18px;
    text-align: center;
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.plus-plans-overlay .pricing-cards--uiverse {
    flex: 0 0 auto;
    max-width: none;
    width: 100%;
    align-items: stretch;
    gap: 14px;
}

.plus-plans-overlay .uiverse-card {
    flex: 1 1 0;
    min-width: 0;
    border-width: 3px;
    border-radius: 10px;
    box-shadow: 6px 6px 0 var(--uv-shadow);
    transform: none;
}

.plus-plans-overlay .uiverse-card:hover {
    transform: translate(-3px, -3px);
    box-shadow: 9px 9px 0 var(--uv-shadow);
}

.plus-plans-overlay .uiverse-card__title-area {
    font-size: 15px;
    padding: 12px 14px;
    border-bottom-width: 3px;
}

.plus-plans-overlay .uiverse-card__description,
.plus-plans-overlay .feature-text {
    font-size: 12px;
}

.plus-plans-overlay .uiverse-card__description {
    margin-bottom: 12px;
}

.plus-plans-overlay .uiverse-card .feature-grid {
    gap: 10px;
    margin-bottom: 12px;
}

.plus-plans-overlay .uiverse-card .feature-icon {
    width: 24px;
    height: 24px;
    border-radius: 5px;
}

.plus-plans-overlay .uiverse-card .feature-icon svg {
    width: 12px;
    height: 12px;
}

.plus-plans-overlay .uiverse-card__body {
    padding: 12px 14px 14px;
}

.plus-plans-overlay .uiverse-card__actions {
    padding-top: 12px;
    gap: 8px;
}

.plus-plans-overlay .uiverse-price {
    font-size: 18px;
}

.plus-plans-overlay .uiverse-card__button {
    flex: 0 0 auto;
    width: auto;
    padding: 4px 8px;
    font-size: 9px;
    line-height: 1.2;
    white-space: nowrap;
}

.plus-plans-overlay .uiverse-card__stamp {
    display: none;
}

@media (max-width: 860px) {
    .plus-plans-inner {
        width: min(520px, calc(100vw - 24px));
        max-height: 88vh;
        padding: 44px 16px 18px;
    }

    .plus-plans-overlay .pricing-cards--uiverse {
        flex-direction: column;
    }
}

.modal-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: var(--text-tertiary);
    cursor: pointer;

    padding: 4px;
    border-radius: var(--radius-full);
    transition: background var(--transition), color var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.modal-close-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.modal-content h2 {
    font-size: 24px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.modal-content p {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.pricing-tiers {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.tier {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px 16px;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
}

.tier.pro {
    border-color: var(--accent);
    background: var(--accent-light);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.tier.pro::before {
    content: "POPULAR";
    position: absolute;
    top: 10px;
    right: -25px;
    background: var(--accent);
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 4px 24px;
    transform: rotate(45deg);
}

.tier h3 {
    margin-bottom: 8px;
    font-size: 18px;
}

.tier p.price {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.tier ul {
    list-style: none;
    text-align: left;
    margin-bottom: auto;
    font-size: 13px;
    line-height: 2;
    color: var(--text-secondary);
}

.tier ul li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tier ul li::before {
    content: "✓";
    color: var(--accent);
    font-weight: bold;
}

.mt-1rem {
    margin-top: 1rem;
}

/* Custom cursor removed — using default system cursor */


/* ══════════════════════════════════════════════════════════════════════════
   PORTAL LANDING PAGE & EMBDEDDED WORKSPACE STYLES
   ══════════════════════════════════════════════════════════════════════════ */

/* Top Navbar — fixed so it stays visible despite overflow-x: hidden on html/body */
.sticky-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 70px;
    margin: 0;
    padding-top: env(safe-area-inset-top, 0px);
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
    background: var(--bg-elevated);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 50;
}

[data-theme="light"] .sticky-nav {
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--border);
}

.nav-container {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 28px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.4px;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}

.nav-logo span {
    color: var(--accent);
    font-weight: 800;
    text-shadow: 0 0 20px rgba(245, 158, 11, 0.25);
}

.nav-logo img {
    width: 30px;
    height: 30px;
    filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.4));
}

.nav-links {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 22px;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    z-index: 1;
}

.nav-menu-btn {
    display: none;
    width: auto;
    height: auto;
    min-width: 44px;
    min-height: 44px;
    padding: 8px;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    cursor: pointer;
    font-family: inherit;
    flex-shrink: 0;
    z-index: 3;
    align-items: center;
    justify-content: center;
}

.nav-menu-btn__bg,
[data-theme="dark"] .nav-menu-btn__bg {
    width: auto;
    height: auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

.menu__icon {
    width: 26px;
    height: 26px;
    padding: 3px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

.menu__icon span {
    width: 100%;
    height: 0.125rem;
    border-radius: 0.125rem;
    background-color: var(--accent);
    box-shadow: 0 0.5px 2px color-mix(in srgb, var(--text-primary) 22%, transparent);
    transition: transform 0.4s, background-color 0.4s, opacity 0.4s;
}

@media (hover: hover) and (pointer: fine) {
    .nav-menu-btn:hover .menu__icon span {
        background-color: var(--accent-hover);
    }
}

body.nav-open .menu__icon span:nth-child(1) {
    background-color: var(--accent-hover);
    transform: translateY(8px) rotate(-45deg);
}

body.nav-open .menu__icon span:nth-child(2) {
    transform: scaleX(0);
    opacity: 0;
}

body.nav-open .menu__icon span:nth-child(3) {
    background-color: var(--accent-hover);
    transform: translateY(-8px) rotate(45deg);
}

@media (prefers-reduced-motion: reduce) {
    .menu__icon span {
        transition: none;
    }
}

.nav-drawer-brand {
    display: none;
}

.nav-theme-row {
    display: none;
}

@media (max-width: 1180px) {
    .sticky-nav {
        height: 70px;
    }

    .nav-container {
        height: 70px;
        min-height: 70px;
        padding: 0 16px;
        flex-wrap: nowrap;
    }

    .nav-logo {
        display: none;
    }

    .nav-menu-btn {
        display: inline-flex;
    }

    .nav-auth-slot {
        margin-left: auto;
    }

    .nav-links {
        display: flex;
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
        position: fixed;
        top: 78px;
        left: 12px;
        right: auto;
        width: min(300px, calc(100vw - 24px));
        order: initial;
        transform: translateY(-12px) scale(0.96);
        transform-origin: top left;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 2px;
        padding: 10px;
        background: var(--bg-elevated);
        border: none;
        border-radius: 18px;
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
        z-index: 60;
        white-space: normal;
        max-height: min(calc(100dvh - 96px), 560px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        transition: opacity 0.28s ease, transform 0.42s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0.42s;
    }

    body.nav-open .nav-links {
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0) scale(1);
        transition: opacity 0.24s ease, transform 0.42s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s;
    }

    body.nav-open .nav-drawer-brand {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 8px 10px 12px;
        margin-bottom: 4px;
        border: none;
        text-decoration: none;
        color: var(--accent);
        font-size: 18px;
        font-weight: 800;
        letter-spacing: -0.4px;
    }

    .nav-drawer-brand img {
        width: 32px;
        height: 32px;
        filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.4));
    }

    .nav-link {
        width: 100%;
        padding: 12px 10px;
        font-size: 14px;
        border-radius: 8px;
        letter-spacing: 0.06em;
    }

    .nav-auth .uiverse-btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    .nav-theme-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-top: 6px;
        padding: 12px 10px 6px;
        border: none;
        color: var(--text-primary);
        font-size: 14px;
        font-weight: 700;
    }

    .portal-page .theme-dock {
        display: none;
    }
}

@media (max-width: 480px) {
    .sticky-nav {
        height: 64px;
    }

    .portal-page,
    .home-landing {
        padding-top: 64px;
    }

    html:has(body.portal-page) {
        scroll-padding-top: 64px;
    }

    .nav-container {
        height: 64px;
        min-height: 64px;
        padding: 0 12px;
    }

    .nav-menu-btn,
    .nav-menu-btn__bg {
        width: auto;
        height: auto;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    .nav-links {
        top: 72px;
    }
}

.nav-link {
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.08em;
    white-space: nowrap;
    transition: color var(--transition);
}

.nav-link:hover,
.nav-link:active,
.nav-link.is-active {
    color: var(--accent);
}

.nav-link--accent {
    color: #e0c97f !important;
    font-weight: 600;
}

.nav-link--accent:hover {
    color: var(--accent) !important;
}

/* Theme switch (Uiverse.io style) */
.theme-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 56px;
    height: 30px;
    border-radius: 999px;
    background: hsl(0, 0%, 7%);
    box-shadow: 0 2px 4px rgba(18, 18, 18, 0.25), 0 4px 8px rgba(18, 18, 18, 0.35);
    cursor: pointer;
    user-select: none;
    flex-shrink: 0;
    touch-action: manipulation;
}

.theme-switch__input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.theme-switch__track {
    position: absolute;
    inset: 2px;
    border-radius: 999px;
    border: 1px solid hsl(0, 0%, 25%);
    overflow: hidden;
    pointer-events: none;
}

.theme-switch__indicator {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 4px;
    border-radius: 999px;
    background: hsl(0, 0%, 50%);
    box-shadow: inset 0 2px 1px hsl(0, 0%, 40%);
    transition: opacity 0.3s ease;
}

.theme-switch__knob {
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #1a1a1a;
    box-shadow: inset 4px 4px 4px rgba(64, 64, 64, 0.25), inset -4px -4px 4px rgba(16, 16, 16, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

.theme-switch__icon {
    position: absolute;
    width: 14px;
    height: 14px;
    transition: opacity 0.25s ease, transform 0.3s ease;
    color: hsl(0, 0%, 80%);
}

.theme-switch__icon--sun {
    opacity: 1;
    transform: scale(1) rotate(0deg);
}

.theme-switch__icon--moon {
    opacity: 0;
    transform: scale(0.5) rotate(-90deg);
}

/* Checked = dark mode: slide knob right, show moon, hide sun indicator */
.theme-switch__input:checked ~ .theme-switch__track .theme-switch__knob {
    left: calc(100% - 28px);
    background: #2a2a2a;
}

.theme-switch__input:checked ~ .theme-switch__track .theme-switch__icon--sun {
    opacity: 0;
    transform: scale(0.5) rotate(90deg);
}

.theme-switch__input:checked ~ .theme-switch__track .theme-switch__icon--moon {
    opacity: 1;
    transform: scale(1) rotate(0deg);
    color: hsl(45, 90%, 70%);
}

.theme-switch__input:checked ~ .theme-switch__track .theme-switch__indicator {
    opacity: 0.3;
}

.theme-switch__input:focus-visible ~ .theme-switch__track {
    outline: 2px solid var(--accent, #22c55e);
    outline-offset: 2px;
}

.theme-dock {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 90;
    display: flex;
    align-items: center;
    pointer-events: auto;
}

.theme-dock .theme-switch {
    border-bottom: none;
    flex-shrink: 0;
    filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.28));
}

body.has-theme-dock .sidebar,
body.has-theme-dock .maxton-sidebar {
    padding-bottom: 52px;
}

.sidebar-theme-row {
    display: none;
}

@media (min-width: 1025px) {
    body.auth-page .auth-nav-btn,
    body.auth-page .auth-nav-links {
        display: none !important;
    }
}

@media (max-width: 1024px) {
    .theme-dock {
        display: none !important;
    }

    body.has-theme-dock .sidebar,
    body.has-theme-dock .maxton-sidebar {
        padding-bottom: 0;
    }

    body.auth-page .auth-header {
        justify-content: flex-start;
        gap: 6px;
        padding: 14px 16px;
    }

    body.auth-page .auth-nav-btn {
        margin-left: -8px;
    }

    body.auth-page .auth-logo {
        flex: 0 1 auto;
        margin-right: 0;
    }

    body.auth-page.nav-open .auth-header {
        z-index: 80;
    }

    body.auth-page.nav-open::after {
        inset: 0;
    }

    .sidebar-theme-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        color: var(--text-primary);
        font-size: 14px;
        font-weight: 700;
        flex-shrink: 0;
        margin-top: auto;
        padding: 12px 16px;
        border-top: 1px solid var(--border);
    }

    .sidebar-theme-row .theme-switch {
        border-bottom: none;
        flex-shrink: 0;
    }
}

@media (max-width: 720px) {
    .theme-dock {
        left: 8px;
        bottom: 8px;
        opacity: 1;
        transform: none;
    }

    .theme-dock .theme-switch {
        width: 64px;
        height: 36px;
    }
}

/* Contact section */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 8px;
}

@media (max-width: 720px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

.contact-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 24px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    text-decoration: none;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.contact-card:hover {
    transform: translateY(-4px);
    border-color: rgba(212, 175, 55, 0.45);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}

.contact-card__icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-light);
    color: var(--accent);
}

.contact-card__icon svg {
    width: 22px;
    height: 22px;
}

.contact-card__label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}

.contact-card__value {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    word-break: break-word;
}

.nav-auth-slot {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    margin-left: auto;
}

.nav-auth {
    display: flex;
    gap: 10px;
    align-items: center;
}

.nav-auth[hidden] {
    display: none !important;
}

html.is-logged-in #navAuthGuest,
body.is-logged-in #navAuthGuest {
    display: none !important;
}

html.is-logged-in #navAuthUser {
    display: flex !important;
}

.portal-section--workspace-cta {
    background: radial-gradient(circle at center, rgba(212, 175, 55, 0.08) 0%, transparent 65%);
    text-align: center;
    padding: 60px 0 40px;
}

.section-container--narrow {
    max-width: 640px;
}

.workspace-launch-btn {
    display: inline-block;
    text-decoration: none;
    padding: 14px 28px;
    font-size: 15px;
    margin-top: 8px;
}

/* ── Uiverse pricing cards (From Uiverse.io by seoulchik) ──
   Site palette: tan title (--accent), black body / button. */
.pricing-cards--uiverse {
    display: flex;
    flex-wrap: nowrap;
    gap: 24px;
    justify-content: center;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
}

.uiverse-card {
    --uv-ink: var(--text-primary);
    --uv-primary: var(--accent);
    --uv-header-text: #f5f5f5;
    --uv-primary-hover: var(--accent-hover);
    --uv-secondary: var(--text-primary);
    --uv-secondary-hover: var(--accent-hover);
    --uv-accent: var(--accent);
    --uv-text: var(--text-primary);
    --uv-bg: var(--bg-elevated);
    --uv-shadow: var(--text-primary);
    --uv-pattern: var(--border);
    --uv-grid: color-mix(in srgb, var(--text-primary) 10%, transparent);
    --uv-dash: color-mix(in srgb, var(--text-primary) 20%, transparent);

    position: relative;
    flex: 0 1 300px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: var(--uv-bg);
    border: 5px solid var(--uv-ink);
    border-radius: 10px;
    box-shadow: 11px 11px 0 var(--uv-shadow), inset 0 0 0 2.5px var(--uv-grid);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1), background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
    overflow: hidden;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    transform-origin: center;
    color: var(--uv-text);
}

.uiverse-card:hover {
    transform: translate(-6px, -6px) scale(1.02);
    box-shadow: 16px 16px 0 var(--uv-shadow);
}

.uiverse-card:hover .uiverse-card__pattern-grid,
.uiverse-card:hover .uiverse-card__overlay-dots {
    opacity: 1;
}

.uiverse-card:active {
    transform: translate(1.5px, 1.5px) scale(0.98);
    box-shadow: 8px 8px 0 var(--uv-shadow);
}

.uiverse-card::before {
    content: "";
    position: absolute;
    top: -16px;
    right: -16px;
    width: 64px;
    height: 64px;
    background: var(--uv-accent);
    transform: rotate(45deg);
    z-index: 1;
}

.uiverse-card::after {
    content: "★";
    position: absolute;
    top: 6px;
    right: 6px;
    color: var(--uv-ink);
    font-size: 19px;
    font-weight: bold;
    z-index: 2;
}

.uiverse-card__pattern-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, var(--uv-grid) 1px, transparent 1px),
        linear-gradient(to bottom, var(--uv-grid) 1px, transparent 1px);
    background-size: 8px 8px;
    pointer-events: none;
    opacity: 0.5;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.uiverse-card__overlay-dots {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(var(--uv-pattern) 1px, transparent 1px);
    background-size: 16px 16px;
    background-position: -8px -8px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.uiverse-card__bold-pattern {
    position: absolute;
    top: 0;
    right: 0;
    width: 96px;
    height: 96px;
    opacity: 0.15;
    pointer-events: none;
    z-index: 1;
    color: var(--uv-text);
}

.uiverse-card__bold-pattern svg {
    width: 100%;
    height: 100%;
}

.uiverse-card__title-area {
    position: relative;
    padding: 22px;
    background: var(--uv-primary);
    color: var(--uv-header-text);
    font-weight: 800;
    font-size: 19px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 5px solid var(--uv-ink);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 2;
    overflow: hidden;
}

.uiverse-card__title-area::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        45deg,
        rgba(0, 0, 0, 0.1),
        rgba(0, 0, 0, 0.1) 8px,
        transparent 8px,
        transparent 16px
    );
    pointer-events: none;
    opacity: 0.3;
}

.uiverse-card__tag {
    background: var(--uv-bg);
    color: var(--uv-text);
    font-size: 12px;
    font-weight: 800;
    padding: 6px 13px;
    border: 2.5px solid var(--uv-ink);
    border-radius: 5px;
    box-shadow: 3px 3px 0 var(--uv-ink);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transform: rotate(3deg);
    transition: all 0.3s ease;
}

.uiverse-card:hover .uiverse-card__tag {
    transform: rotate(-2deg) scale(1.1);
    box-shadow: 4px 4px 0 var(--uv-shadow);
}

.uiverse-card__body {
    position: relative;
    padding: 24px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

.uiverse-card__description {
    margin-bottom: 24px;
    color: var(--uv-text);
    font-size: 15px;
    line-height: 1.4;
    font-weight: 500;
}

.uiverse-card .feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.uiverse-card .feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.2s ease;
}

.uiverse-card .feature-item:hover {
    transform: translateX(5px);
}

.uiverse-card .feature-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--uv-bg);
    border: 1.5px solid color-mix(in srgb, var(--uv-ink) 72%, transparent);
    border-radius: 6px;
    box-shadow: 1.5px 1.5px 0 color-mix(in srgb, var(--uv-ink) 28%, transparent);
    color: var(--uv-text);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    flex-shrink: 0;
}

.uiverse-card .feature-item:hover .feature-icon {
    background: var(--uv-accent);
    border-color: var(--uv-ink);
    color: var(--uv-header-text);
    transform: rotate(6deg);
    box-shadow: 2px 2px 0 var(--uv-ink);
}

.uiverse-card .feature-icon svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.uiverse-card .feature-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--uv-text);
}

.uiverse-card__actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 19px;
    border-top: 2.5px dashed var(--uv-dash);
    position: relative;
}

.uiverse-card__actions::before {
    content: "✂";
    position: absolute;
    top: -13px;
    left: 50%;
    transform: translateX(-50%) rotate(90deg);
    background: var(--uv-bg);
    padding: 0 8px;
    font-size: 16px;
    color: color-mix(in srgb, var(--uv-text) 45%, transparent);
}

.uiverse-price {
    position: relative;
    font-size: 28px;
    font-weight: 800;
    color: var(--uv-text);
    background: var(--uv-bg);
    line-height: 1.1;
}

.uiverse-price::before {
    content: "";
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--uv-accent);
    z-index: -1;
    opacity: 0.5;
}

.uiverse-price__currency {
    font-size: 17px;
    font-weight: 700;
    vertical-align: top;
    margin-right: 1px;
}

.uiverse-price__period {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-top: 3px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.uiverse-card__button {
    position: relative;
    background: var(--uv-secondary);
    color: var(--uv-bg);
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 10px;
    font-weight: 700;
    padding: 6px 11px;
    border: 2px solid var(--uv-ink);
    border-radius: 4px;
    box-shadow: 2px 2px 0 var(--uv-shadow);
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.uiverse-card__button::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 100%
    );
    transition: left 0.6s ease;
}

.uiverse-card__button:hover {
    background: var(--uv-secondary-hover);
    transform: translate(-0.5px, -0.5px);
    box-shadow: 2.5px 2.5px 0 var(--uv-shadow);
}

.uiverse-card__button:hover::before {
    left: 100%;
}

.uiverse-card__button:active {
    transform: translate(0.5px, 0.5px);
    box-shadow: 1px 1px 0 var(--uv-shadow);
}

.uiverse-card__dots-pattern {
    position: absolute;
    bottom: 32px;
    left: -32px;
    width: 128px;
    height: 64px;
    opacity: 0.3;
    transform: rotate(-10deg);
    pointer-events: none;
    z-index: 1;
    color: var(--uv-text);
}

.uiverse-card__dots-pattern svg {
    width: 100%;
    height: 100%;
}

.uiverse-card__accent-shape {
    position: absolute;
    width: 40px;
    height: 40px;
    background: var(--uv-secondary);
    border: 2.5px solid var(--uv-ink);
    border-radius: 5px;
    transform: rotate(45deg);
    bottom: -19px;
    right: 32px;
    z-index: 0;
    transition: transform 0.3s ease;
}

.uiverse-card:hover .uiverse-card__accent-shape {
    transform: rotate(55deg) scale(1.1);
}

.uiverse-card__stamp {
    position: absolute;
    bottom: 24px;
    left: 24px;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2.5px solid var(--uv-dash);
    border-radius: 50%;
    transform: rotate(-15deg);
    opacity: 0.2;
    z-index: 1;
}

.uiverse-card__stamp-text {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--uv-text);
}

.uiverse-card__corner-slice {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 24px;
    height: 24px;
    background: var(--uv-bg);
    border-radius: 0 8px 0 0;
    z-index: 1;
}

.uiverse-card--featured {
    /* Featured card aligns with siblings — visual emphasis comes from the black corner triangle and white star. */
}

.uiverse-card--featured::before {
    background: var(--uv-ink);
}

.uiverse-card--featured::after {
    content: "★";
    color: var(--uv-bg);
}

.uiverse-card--note {
    flex: 0 0 auto;
    width: 100%;
    max-width: 300px;
    height: auto;
    min-height: 0;
    align-self: start;
    border-width: 3px;
    box-shadow: 6px 6px 0 var(--uv-shadow);
}

.uiverse-card--note:hover {
    transform: translate(-4px, -4px);
    box-shadow: 9px 9px 0 var(--uv-shadow);
}

.uiverse-card--note .uiverse-card__title-area {
    padding: 12px 14px;
    font-size: 14px;
    border-bottom-width: 3px;
    text-transform: none;
    letter-spacing: 0;
    gap: 8px;
}

.uiverse-card--note .uiverse-card__title-area h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
}

.uiverse-card--note .uiverse-card__tag {
    font-size: 10px;
    padding: 4px 8px;
    flex-shrink: 0;
}

.uiverse-card__who {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    z-index: 1;
}

.uiverse-card__avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--uv-bg);
    color: var(--uv-text);
    border: 2px solid var(--uv-ink);
    box-shadow: 2px 2px 0 var(--uv-shadow);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    flex-shrink: 0;
}

.uiverse-card__who-role {
    display: block;
    margin-top: 1px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.8;
}

.uiverse-card--note .uiverse-card__body {
    padding: 10px 12px 12px;
    gap: 8px;
    flex: 0 0 auto;
}

.uiverse-card--note .uiverse-card__description {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
}

.uiverse-card__quote {
    margin: 0;
    min-height: 0;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
    background: color-mix(in srgb, var(--uv-text) 6%, transparent);
    border-left: 4px solid var(--uv-primary);
    border-radius: 0 8px 8px 0;
}

.uiverse-card--note .uiverse-card__actions {
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
    padding-top: 8px;
    gap: 10px;
}

.uiverse-card--note .uiverse-card__actions::before,
.uiverse-card--note .uiverse-card__stamp,
.uiverse-card--note .uiverse-card__accent-shape,
.uiverse-card--note .uiverse-card__corner-slice {
    display: none;
}

.uiverse-card--note .uiverse-card__meta {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    opacity: 0.7;
    overflow-wrap: anywhere;
}

.uiverse-card--note .uiverse-card__stars,
.uiverse-card__star-pick {
    display: flex;
    align-items: center;
    gap: 2px;
    color: var(--uv-primary);
}

.uiverse-card--note .uiverse-card__stars svg {
    width: 14px;
    height: 14px;
}

.uiverse-card__star-pick button {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: inherit;
    opacity: 0.35;
    line-height: 0;
}

.uiverse-card__star-pick button.is-on {
    opacity: 1;
}

.uiverse-card--note textarea {
    width: 100%;
    min-height: 72px;
    border: 2.5px solid var(--uv-ink);
    border-radius: 6px;
    padding: 8px 10px;
    font: inherit;
    font-size: 13px;
    resize: vertical;
    background: var(--uv-bg);
    color: var(--uv-text);
}

.uiverse-card__field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.uiverse-card__field span {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--uv-text);
}

.uiverse-card__field input {
    width: 100%;
    border: 2.5px solid var(--uv-ink);
    border-radius: 6px;
    padding: 8px 10px;
    font: inherit;
    font-size: 13px;
    background: var(--uv-bg);
    color: var(--uv-text);
}

.uiverse-card__field input:focus,
.uiverse-card--note textarea:focus {
    outline: 2px solid var(--uv-primary);
    outline-offset: 1px;
}

.uiverse-card__like {
    background: none;
    border: 2.5px solid var(--uv-ink);
    border-radius: 6px;
    box-shadow: 2px 2px 0 var(--uv-shadow);
    cursor: pointer;
    color: var(--uv-text);
    padding: 4px 6px;
    line-height: 0;
}

.uiverse-card__like[data-liked="1"] {
    color: #e11d48;
    background: var(--uv-bg);
}

.uiverse-card__action-btns {
    display: inline-flex !important;
    flex-flow: row nowrap !important;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex: 0 0 auto !important;
    width: max-content;
    min-width: 76px;
    margin-left: auto;
    position: static;
}

.uiverse-card__action-btns .uiverse-card__like {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 34px;
    height: 34px;
    min-width: 34px;
    max-width: 34px;
    padding: 0;
    flex: 0 0 34px;
    position: static;
}

.uiverse-card__delete {
    color: #b91c1c;
}

.uiverse-card__delete:hover {
    color: #fff;
    background: #ef4444;
}

.uiverse-card--note .uiverse-card__button {
    margin-left: auto;
}

.admin-page .uiverse-card--note {
    --uv-primary: #22c55e;
    --uv-primary-hover: #16a34a;
    --uv-accent: #22c55e;
}

.admin-feedback-grid,
#userFeedbackList {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 300px));
    justify-content: start;
    align-items: start;
    align-content: start;
    gap: 16px;
    width: 100%;
}

.admin-feedback-grid .uiverse-card--note,
#userFeedbackList .uiverse-card--note,
.feedback-panel-grid .uiverse-card--compose {
    flex: none;
    width: 100%;
    max-width: 300px;
    height: auto;
}

.feedback-panel-grid {
    display: grid;
    grid-template-columns: minmax(240px, 320px) 1fr;
    gap: 16px;
    align-items: start;
}

body.feedback-modal-open {
    overflow: hidden;
}

.feedback-modal-overlay,
.feedback-success-overlay {
    padding: 16px;
    z-index: 10040;
}

.feedback-modal {
    position: relative;
    width: auto;
    max-width: none;
    background: none;
    border: none;
    box-shadow: none;
    padding: 0;
    overflow: visible;
}

.feedback-card-close {
    position: absolute;
    top: -12px;
    right: -12px;
    z-index: 6;
    width: 32px;
    height: 32px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--bg-elevated);
    color: var(--text-primary);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
}

.feedback-card-close:hover {
    background: var(--bg-hover, var(--bg-elevated));
}

.feedback-modal .uiverse-card--compose {
    width: 320px;
    max-width: calc(100vw - 32px);
    flex: none;
    margin: 0;
}

.feedback-modal .uiverse-card--compose .uiverse-card__title-area {
    padding-right: 36px;
}

.feedback-modal .uiverse-card:hover {
    transform: translate(-3px, -3px) scale(1.01);
}

.feedback-success {
    width: min(320px, calc(100vw - 32px));
    padding: 32px 28px 24px;
    border-radius: 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.feedback-success__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(34, 197, 94, 0.12);
    color: var(--success, #22c55e);
}

.feedback-success h3 {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.feedback-success p {
    margin: 0 0 24px;
    font-size: 14px;
    line-height: 1.45;
    color: var(--text-secondary);
}

.feedback-success__btn {
    width: 100%;
    border: none;
    border-radius: 8px;
    padding: 10px 14px;
    background: #d5bdaf;
    color: #1a1a1a;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.feedback-success__btn:hover {
    background: #c3a99a;
}

body.support-modal-open {
    overflow: hidden;
}

.support-modal-overlay {
    padding: 16px;
    z-index: 10040;
}

.support-modal {
    position: relative;
    width: min(460px, calc(100vw - 32px));
    height: min(72vh, 560px);
    display: flex;
    flex-direction: column;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.support-modal__head {
    padding: 22px 48px 12px 22px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.support-modal__head-copy {
    min-width: 0;
}

.support-avatar {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    background: #64748b;
}

.support-avatar--lg {
    width: 44px;
    height: 44px;
}

.support-avatar img,
.support-avatar > span {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
}

.support-avatar__dot {
    position: absolute;
    right: -1px;
    bottom: -1px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 2px solid var(--bg-elevated, var(--maxton-card, #1a1a24));
}

.support-avatar__dot.is-online {
    background: #22c55e;
}

.support-avatar__dot.is-offline {
    background: #64748b;
}

.support-status.is-online {
    color: #22c55e;
    font-weight: 600;
}

.support-status.is-offline {
    color: var(--text-secondary);
}

.support-modal__head h2 {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 700;
}

.support-modal__head p {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.support-modal__thread {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 18px 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    --support-canvas: #efe8dc;
    background:
        radial-gradient(720px 220px at 50% -48px, rgba(196, 149, 106, 0.16), transparent 64%),
        linear-gradient(180deg, rgba(255, 250, 244, 0.35), transparent 140px),
        var(--support-canvas);
}

.support-empty {
    margin: auto;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    max-width: 280px;
}

.vvs-msg,
.support-msg {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    align-self: flex-start;
    max-width: min(88%, 360px);
    background: transparent;
    border: 0;
    padding: 0;
}

.vvs-msg.is-mine,
.support-msg.is-mine {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.support-msg.is-staff .vvs-msg__bubble {
    border: 1px solid color-mix(in srgb, var(--accent, #c4956a) 50%, transparent);
}

.vvs-msg__avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #fffaf4;
    background: #5c5348;
}

.vvs-msg.is-mine .vvs-msg__avatar {
    background: var(--accent, #c4956a);
    color: #1a120c;
}

.vvs-msg__bubble {
    min-width: 0;
    background: #fffaf4;
    color: #1d1d23;
    border: 1px solid rgba(29, 29, 35, 0.07);
    box-shadow: 0 1px 2px rgba(29, 29, 35, 0.05), 0 10px 24px rgba(29, 29, 35, 0.04);
    border-radius: 18px 18px 18px 5px;
    padding: 10px 13px 8px;
}

.vvs-msg.is-mine .vvs-msg__bubble,
.support-msg.is-mine .vvs-msg__bubble {
    background: var(--uv-primary, var(--accent, #c4956a));
    color: #1a120c;
    border-color: transparent;
    border-radius: 18px 18px 5px 18px;
    box-shadow: 0 8px 18px rgba(196, 149, 106, 0.22);
}

.vvs-msg__content,
.vvs-msg__content p {
    user-select: text;
    -webkit-user-select: text;
    cursor: text;
}

.vvs-msg__content::selection,
.vvs-msg__content *::selection {
    background: #c4956a;
    color: #1a120c;
}

.vvs-msg.is-mine .vvs-msg__content::selection,
.vvs-msg.is-mine .vvs-msg__content *::selection {
    background: #1a120c;
    color: #fff6ea;
}

.vvs-msg__content p {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
    color: inherit;
}

.vvs-msg__content p + p,
.vvs-msg__content p + .support-preview,
.vvs-msg__content p + .support-file-card {
    margin-top: 8px;
}

.vvs-msg__footer {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    min-height: 18px;
}

.vvs-msg.is-mine .vvs-msg__footer {
    justify-content: flex-end;
}

.vvs-msg__head {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    margin-bottom: 4px;
}

.vvs-msg.is-mine .vvs-msg__head {
    justify-content: flex-end;
}

.vvs-msg__name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 600;
    color: inherit;
}

.vvs-msg__role {
    flex-shrink: 0;
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 16px;
    text-transform: uppercase;
}

.vvs-msg__role.is-admin {
    background: color-mix(in srgb, var(--accent, #d4a373) 22%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent, #d4a373) 55%, transparent);
    color: var(--accent, #d4a373);
}

.vvs-msg.is-mine .vvs-msg__role.is-admin {
    background: rgba(26, 18, 12, 0.14);
    border-color: rgba(26, 18, 12, 0.35);
    color: #1a120c;
}

.vvs-msg__role.is-user {
    background: rgba(148, 163, 184, 0.16);
    border: 1px solid rgba(148, 163, 184, 0.4);
    color: inherit;
}

.vvs-msg__footer time,
.support-msg > span {
    display: block;
    margin: 0;
    font-size: 10.5px;
    letter-spacing: 0.01em;
    color: inherit;
    opacity: 0.68;
}

.vvs-msg__copy {
    margin-left: 2px;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
}

.vvs-msg__copy:hover,
.vvs-msg__copy:focus-visible {
    opacity: 1;
    color: inherit;
    background: rgba(29, 29, 35, 0.14);
    outline: none;
}

.vvs-msg.is-mine .vvs-msg__copy:hover,
.vvs-msg.is-mine .vvs-msg__copy:focus-visible {
    color: #1a120c;
    background: rgba(26, 18, 12, 0.16);
}

.vvs-msg__copy svg {
    width: 13px;
    height: 13px;
}

.vvs-msg__check-icon,
.vvs-msg__copy.is-copied .vvs-msg__copy-icon {
    display: none;
}

.vvs-msg__copy.is-copied .vvs-msg__check-icon {
    display: block;
}

.vvs-msg__delete {
    margin-left: 2px;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
}

.vvs-msg__delete svg {
    width: 13px;
    height: 13px;
}

.vvs-msg__delete:hover,
.vvs-msg__delete:focus-visible {
    opacity: 1;
    color: #b91c1c;
    background: rgba(239, 68, 68, 0.12);
    outline: none;
}

.vvs-msg__edit-btn {
    margin-left: 2px;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    user-select: none;
}

.vvs-msg__edit-btn svg {
    width: 13px;
    height: 13px;
}

.vvs-msg__edit-btn:hover,
.vvs-msg__edit-btn:focus-visible {
    opacity: 1;
    color: inherit;
    background: rgba(29, 29, 35, 0.14);
    outline: none;
}

.vvs-msg.is-mine .vvs-msg__edit-btn:hover,
.vvs-msg.is-mine .vvs-msg__edit-btn:focus-visible,
.vvs-msg.is-mine .vvs-msg__delete:hover,
.vvs-msg.is-mine .vvs-msg__delete:focus-visible {
    color: #1a120c;
}

.vvs-msg.is-mine .vvs-msg__delete:hover,
.vvs-msg.is-mine .vvs-msg__delete:focus-visible {
    background: rgba(185, 28, 28, 0.16);
}

.vvs-msg__editor {
    display: block;
    width: 100%;
    min-width: 140px;
    min-height: 48px;
    box-sizing: border-box;
    margin: 0;
    padding: 6px 8px;
    border: 0;
    border-radius: 8px;
    resize: vertical;
    font: inherit;
    font-size: 14px;
    line-height: 1.45;
    color: #1d1d23;
    background: rgba(255, 255, 255, 0.82);
    user-select: text;
}

.vvs-msg__edit-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 6px;
}

.vvs-msg__edit-actions button {
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 650;
    cursor: pointer;
}

.vvs-msg__edit-actions [data-act="cancel"] {
    border: 1px solid rgba(29, 29, 35, 0.2);
    background: transparent;
    color: inherit;
}

.vvs-msg__edit-actions [data-act="save"] {
    border: 0;
    background: #1a120c;
    color: #fff6ea;
}

.chat-confirm {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(10, 10, 14, 0.55);
    backdrop-filter: blur(4px);
}

.chat-confirm__card {
    width: min(400px, 100%);
    background: var(--bg-elevated, #1c1c22);
    color: var(--text-primary, #f4efe8);
    border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
    border-radius: 16px;
    padding: 22px 22px 18px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    text-align: left;
}

.chat-confirm__card h2 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 650;
}

.chat-confirm__card p {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
    color: var(--text-secondary, #c8c0b4);
}

.chat-confirm__actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

.chat-confirm__cancel,
.chat-confirm__ok {
    border-radius: 10px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.chat-confirm__cancel {
    border: 1px solid var(--border, rgba(255, 255, 255, 0.14));
    background: transparent;
    color: inherit;
}

.chat-confirm__ok {
    border: 0;
    background: #dc2626;
    color: #fff;
}

.vvs-msg.is-enter {
    animation: vvs-msg-pop 0.28s cubic-bezier(0.2, 0.9, 0.32, 1.2);
    transform-origin: bottom left;
}

.vvs-msg.is-mine.is-enter {
    transform-origin: bottom right;
}

@keyframes vvs-msg-pop {
    0% {
        opacity: 0;
        transform: translateY(14px) scale(0.82);
    }
    72% {
        opacity: 1;
        transform: translateY(-2px) scale(1.03);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .vvs-msg.is-enter {
        animation: none;
    }
}

[data-theme="dark"] .support-modal__thread,
[data-theme="dark"] .admin-support__messages {
    --support-canvas: #14121a;
    background:
        radial-gradient(720px 220px at 50% -48px, rgba(196, 149, 106, 0.12), transparent 64%),
        var(--support-canvas);
}

[data-theme="dark"] .vvs-msg__bubble {
    background: #1c1a24;
    color: #f4f1ea;
    border-color: rgba(255, 255, 255, 0.06);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .vvs-msg.is-mine .vvs-msg__bubble {
    background: var(--uv-primary, var(--accent, #d4a574));
    color: #1a120c;
}

[data-theme="dark"] .vvs-msg__avatar {
    background: #2c2833;
    color: #f0e6d8;
}

.support-modal__composer {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid var(--border);
}

.support-compose-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.support-modal__composer input[type="text"]:not(.messageInput) {
    width: 100%;
    flex: none;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    background: var(--bg-main, transparent);
    color: var(--text-primary);
    font: inherit;
}

.support-attach-btn {
    position: relative;
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid var(--border, var(--maxton-border));
    background: var(--bg-elevated, var(--maxton-card));
    color: var(--text-primary, var(--maxton-text-main));
    cursor: pointer;
}

.support-attach-btn input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.support-attach-btn:hover {
    background: var(--bg-hover, var(--maxton-input));
}

.support-attach-preview {
    width: auto;
    max-width: 100%;
}

.support-attach-preview[hidden] {
    display: none !important;
}

/* From Uiverse.io by vinodjangid07 — support chat composer */
.messageBox {
    --msgbox-bg: #ececf1;
    --msgbox-border: #cfcfd6;
    --msgbox-border-focus: #9a9aa4;
    --msgbox-text: #1d1d23;
    --msgbox-icon: #6c6c6c;
    --msgbox-hover: #1d1d23;
    --msgbox-send-fill: #3c3c3c;
    --msgbox-send-stroke: #ffffff;
    width: 100%;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background-color: var(--msgbox-bg);
    padding: 0 15px;
    border-radius: 10px;
    border: 1px solid var(--msgbox-border);
    color: var(--msgbox-icon);
}

.messageBox:focus-within {
    border: 1px solid var(--msgbox-border-focus);
}

.fileUploadWrapper {
    width: fit-content;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Arial, Helvetica, sans-serif;
    flex-shrink: 0;
}

.fileUploadWrapper input[type="file"] {
    display: none;
}

.fileUploadWrapper label {
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-radius: 0;
    color: var(--vvs-nude);
    background: none;
    border: 0;
    transition: color 0.3s ease;
}

.fileUploadWrapper label svg,
#attachBtn svg {
    height: 18px;
    width: 18px;
    display: block;
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
}

.fileUploadWrapper label:hover,
.fileUploadWrapper label:focus-visible,
#attachBtn:hover,
#attachBtn:focus-visible {
    color: var(--vvs-nude-deep);
}

.fileUploadWrapper label:hover svg,
.fileUploadWrapper label:focus-visible svg,
#attachBtn:hover svg,
#attachBtn:focus-visible svg {
    transform: rotate(-14deg) scale(1.16);
    filter: drop-shadow(0 2px 4px color-mix(in srgb, var(--vvs-nude) 45%, transparent));
}

.fileUploadWrapper label:active svg,
#attachBtn:active svg {
    transform: rotate(-14deg) scale(0.94);
}

:root {
    --vvs-nude: #c9a383;
    --vvs-nude-deep: #a97c58;
}

[data-theme="dark"] {
    --vvs-nude: #d8b79a;
    --vvs-nude-deep: #ecd2bb;
}

#attachBtn,
#attachBtn:hover,
#attachBtn:focus-visible,
#attachBtn.active {
    background: none;
    box-shadow: none;
    color: var(--vvs-nude);
}

#attachBtn:hover,
#attachBtn:focus-visible {
    color: var(--vvs-nude-deep);
}

body.reduced-motion .fileUploadWrapper label svg,
body.reduced-motion #attachBtn svg {
    transition: none;
}

.fileUploadWrapper label:hover .tooltip {
    display: block;
    opacity: 1;
}

.messageBox .tooltip {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    opacity: 0;
    color: white;
    font-size: 10px;
    white-space: nowrap;
    background-color: #000;
    padding: 6px 10px;
    border: 1px solid #3c3c3c;
    border-radius: 5px;
    box-shadow: 0px 5px 10px rgba(0, 0, 0, 0.596);
    transition: all 0.3s;
    z-index: 2;
    pointer-events: none;
}

.messageBox .messageInput {
    width: auto;
    flex: 1 1 auto;
    min-width: 0;
    height: 40px;
    background-color: transparent;
    outline: none;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0;
    padding: 0 10px;
    color: var(--msgbox-text);
    font: inherit;
    font-size: 14px;
}

.messageBox .messageInput::placeholder {
    color: var(--text-secondary, #8a8a96);
}

.messageBox .messageInput:focus ~ .sendButton svg path,
.messageBox .messageInput:not(:placeholder-shown) ~ .sendButton svg path {
    fill: var(--msgbox-send-fill);
    stroke: var(--msgbox-send-stroke);
}

.messageBox .sendButton {
    width: fit-content;
    height: 40px;
    background-color: transparent;
    outline: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    flex-shrink: 0;
    padding: 0;
    color: inherit;
    box-shadow: none;
}

.messageBox .sendButton svg {
    height: 18px;
    width: 18px;
    transition: all 0.3s;
}

.messageBox .sendButton svg path {
    transition: all 0.3s;
}

.messageBox .sendButton:hover svg path {
    fill: var(--msgbox-send-fill);
    stroke: var(--msgbox-send-stroke);
}

.messageBox .sendButton:disabled,
.fileUploadWrapper input[type="file"]:disabled + label,
.messageBox .messageInput:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.fileUploadWrapper:has(input:disabled) label {
    cursor: not-allowed;
    pointer-events: none;
    opacity: 0.55;
}

[data-theme="dark"] .messageBox {
    --msgbox-bg: #2d2d2d;
    --msgbox-border: rgb(63, 63, 63);
    --msgbox-border-focus: rgb(110, 110, 110);
    --msgbox-text: #ffffff;
    --msgbox-icon: #6c6c6c;
    --msgbox-hover: #ffffff;
    --msgbox-send-fill: #3c3c3c;
    --msgbox-send-stroke: #ffffff;
}

.support-preview {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    max-width: min(220px, 100%);
    padding: 4px 6px 4px 4px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.support-preview__thumb {
    border: none;
    padding: 0;
    background: transparent;
    cursor: zoom-in;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
}

.support-preview img,
.support-preview__thumb img {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 6px;
    background: var(--bg-secondary);
    display: block;
}

.support-preview__meta {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.support-preview__meta strong {
    font-size: 12px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.support-preview__meta span {
    display: none;
}

.support-preview__icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    flex-shrink: 0;
}

.support-preview__icon svg {
    width: 16px;
    height: 16px;
}

.support-preview__clear {
    margin-left: 2px;
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
}

.support-preview__clear:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.support-preview--sent {
    display: block;
    height: auto;
    max-width: 148px;
    margin-top: 8px;
    padding: 0;
    border: none;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    cursor: zoom-in;
    background: transparent;
}

.support-preview--sent img {
    width: 100%;
    height: auto;
    max-height: 112px;
    object-fit: cover;
    border-radius: 10px;
    background: var(--bg-secondary);
}

.support-file-card {
    display: inline-flex;
    margin-top: 6px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.support-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10060;
    background: rgba(8, 10, 18, 0.82);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px 20px;
    gap: 12px;
}

.support-lightbox.hidden {
    display: none;
}

.support-lightbox img {
    width: auto;
    height: auto;
    max-width: min(92vw, 960px);
    max-height: 78vh;
    object-fit: contain;
    border-radius: 12px;
    background: #111;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

.support-lightbox p {
    margin: 0;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    max-width: 90vw;
}

.support-lightbox__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.send-plane-btn {
    font-family: inherit;
    font-size: clamp(13px, 2.4vw, 15px);
    background: var(--accent, #c4956a);
    color: var(--text-on-accent, #fff);
    padding: 0.55em 0.9em;
    padding-left: 0.75em;
    display: inline-flex;
    align-items: center;
    border: none;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.2s;
    cursor: pointer;
    flex-shrink: 0;
    width: auto;
    min-height: 42px;
}

.send-plane-btn span {
    display: block;
    margin-left: 0.3em;
    transition: all 0.3s ease-in-out;
}

.send-plane-btn svg {
    display: block;
    transform-origin: center center;
    transition: transform 0.3s ease-in-out;
    color: inherit;
}

.send-plane-btn:hover {
    background: var(--accent-hover, #b07d52);
}

.send-plane-btn:hover .svg-wrapper {
    animation: send-plane-fly 0.6s ease-in-out infinite alternate;
}

.send-plane-btn:hover svg {
    transform: translateX(1.2em) rotate(45deg) scale(1.1);
}

.send-plane-btn:hover span {
    transform: translateX(5em);
}

.send-plane-btn:active {
    transform: scale(0.95);
}

.send-plane-btn:disabled {
    opacity: 0.45;
    pointer-events: none;
}

@keyframes send-plane-fly {
    from { transform: translateY(0.1em); }
    to { transform: translateY(-0.1em); }
}

@media (max-width: 720px) {
    .uiverse-btn {
        padding: 10px 16px;
        font-size: 13px;
    }

    .support-compose-main,
    .admin-support__compose-main {
        flex: 1 1 100%;
        width: 100%;
    }

    .send-plane-btn {
        margin-left: auto;
    }
}

@media (max-width: 480px) {
    .send-plane-btn {
        padding: 0.7em;
        min-width: 42px;
        justify-content: center;
    }

    .send-plane-btn span {
        display: none;
    }

    .send-plane-btn:hover svg {
        transform: rotate(15deg);
    }

    .support-attach-btn {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 860px) {
    .feedback-panel-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1100px) {
    .pricing-cards--uiverse {
        flex-wrap: wrap;
    }

    .uiverse-card {
        flex: 1 1 300px;
        max-width: 320px;
    }
}

/* Page Sections & Typography */
.portal-section {
    padding: 100px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-bottom: 1px solid var(--border);
    scroll-margin-top: 70px;
}

.portal-section:last-of-type {
    border-bottom: none;
}

.hero-section {
    scroll-margin-top: 0;
}

.section-container {
    max-width: 1100px;
    width: 90%;
    margin: 0 auto;
    text-align: center;
}

.section-tag {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.section-tag svg {
    width: 14px;
    height: 14px;
}

.section-title {
    font-size: 36px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.section-desc {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 650px;
    margin: 0 auto 48px;
    line-height: 1.6;
}

/* Hero Section */
.hero-section {
    padding: 120px 0;
    background: radial-gradient(circle at top, rgba(212, 175, 55, 0.1) 0%, transparent 60%);
    text-align: center;
    border-bottom: 1px solid var(--border);
}

html.home-admin .hero-section,
body.home-admin .hero-section {
    background: radial-gradient(circle at top, rgba(196, 149, 106, 0.16) 0%, transparent 58%);
}

html.home-admin .hero-title span,
body.home-admin .hero-title span {
    color: var(--accent);
}

html.home-admin .section-tag,
body.home-admin .hero-section .section-tag {
    color: var(--accent);
}

html.home-admin .portal-section--user-only,
body.home-admin .portal-section--user-only,
html.home-admin #navPricingLink,
body.home-admin #navPricingLink,
html.home-admin #navServicesLink,
body.home-admin #navServicesLink,
html.home-admin #navPlusMenuBtn,
body.home-admin #navPlusMenuBtn {
    display: none !important;
}

html.home-admin .hero-trust li span[aria-hidden],
body.home-admin .hero-trust li span[aria-hidden] {
    color: var(--accent);
}

.nav-link[hidden] {
    display: none !important;
}

.admin-home-panel[hidden] {
    display: none !important;
}

html.home-admin #adminHomePanel,
body.home-admin #adminHomePanel {
    display: block !important;
}

.admin-home-panel {
    padding: 56px 0 72px;
    border-bottom: 1px solid var(--border);
    background: radial-gradient(circle at center, rgba(196, 149, 106, 0.08) 0%, transparent 70%);
}

.admin-home-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    max-width: 860px;
    margin: 0 auto;
    text-align: left;
}

.admin-home-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-elevated);
    text-decoration: none;
    color: var(--text-primary);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.admin-home-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.admin-home-card__icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-light);
    color: var(--accent);
    margin-bottom: 4px;
}

.admin-home-card__icon svg {
    width: 20px;
    height: 20px;
}

.admin-home-card strong {
    font-size: 16px;
}

.admin-home-card span {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.45;
}

@media (max-width: 720px) {
    .admin-home-grid {
        grid-template-columns: 1fr;
    }
}

.hero-title {
    font-size: 52px;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    color: var(--text-primary);
    letter-spacing: -1px;
}

.hero-title span {
    color: var(--accent);
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 36px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px 22px;
}

/* ── Hero "Launch Workspace" (adapted from Uiverse by dexter-st) ── */
.vvs-cta {
    --button-col: #f4e9de;
    --border-size: 5px;
    --rad: 6px;
    --corner-size: 24px;
    --corner-dist: 24px;
    --corner-col: #3a2616;
    position: relative;
    z-index: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 22px;
    padding: 0.85rem 1.4rem;
    text-decoration: none;
    cursor: pointer;
    background-color: var(--button-col);
    border-radius: var(--rad);
    border: 1px solid color-mix(in oklab, var(--corner-col) 20%, #0000 80%);
    transition: 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

[data-theme="dark"] .vvs-cta {
    --button-col: #2b221b;
    --corner-col: #f1dcc7;
}

.vvs-cta__txt {
    display: inline-flex;
    font-size: 1.1rem;
    font-family: "Inter", "Segoe UI", var(--font), sans-serif;
    color: var(--corner-col);
    white-space: pre;
    perspective: 400px;
}

.vvs-cta__txt .letter {
    display: inline-block;
    opacity: 0.72;
    transition: opacity 0.1s ease;
    transition-delay: calc(0.02s * var(--i));
    transform: rotateX(0);
}

.vvs-cta__txt .letter.bold {
    font-weight: 700;
}

.vvs-cta__txt .letter.lighter {
    font-weight: 300;
}

.vvs-cta::before {
    pointer-events: none;
    content: "";
    position: absolute;
    inset: calc(-1 * var(--border-size));
    z-index: -1;
    border-radius: calc(var(--border-size) + var(--rad));
    background-color: color-mix(in oklab, var(--corner-col) 10%, #0000 90%);
    box-shadow:
        0 0 0 1px color-mix(in oklab, var(--corner-col) 30%, #0000 70%),
        inset 0 1px 2px -1px var(--corner-col);
}

.vvs-cta__corner {
    pointer-events: none;
    position: absolute;
    height: var(--corner-size);
    width: var(--corner-size);
    fill: var(--corner-col);
    transition: 0.15s ease;
}

.vvs-cta__corner.top { top: calc(-1 * var(--corner-dist)); }
.vvs-cta__corner.bottom { bottom: calc(-1 * var(--corner-dist)); }
.vvs-cta__corner.left { left: calc(-1 * var(--corner-dist)); }
.vvs-cta__corner.right { right: calc(-1 * var(--corner-dist)); }
.vvs-cta__corner.rot-90 { rotate: 90deg; }
.vvs-cta__corner.rot-180 { rotate: 180deg; }
.vvs-cta__corner.rot-270 { rotate: 270deg; }

.vvs-cta:hover,
.vvs-cta:focus-visible {
    --corner-dist: 20px;
}

.vvs-cta:hover .vvs-cta__txt .letter,
.vvs-cta:focus-visible .vvs-cta__txt .letter {
    opacity: 1;
    animation: vvsCtaFlip ease 0.1s forwards;
    animation-delay: calc(0.03s * var(--i));
}

.vvs-cta:active {
    --corner-dist: 16px;
}

.vvs-cta:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 10px;
}

@keyframes vvsCtaFlip {
    50% { transform: rotateX(60deg); }
}

body.reduced-motion .vvs-cta__txt .letter {
    animation: none !important;
}

@media (max-width: 720px) {
    .vvs-cta {
        --corner-size: 20px;
        --corner-dist: 18px;
        margin: 18px;
    }

    .vvs-cta:hover,
    .vvs-cta:focus-visible {
        --corner-dist: 15px;
    }

    .vvs-cta:active {
        --corner-dist: 12px;
    }

    .vvs-cta__txt {
        font-size: 1rem;
    }
}

.hero-trust {
    list-style: none;
    margin: 28px 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 18px;
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.hero-trust li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.hero-trust li span[aria-hidden] {
    color: var(--accent);
    font-size: 10px;
}

/* Grid & Cards (About & Services) */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
    gap: 32px;
    margin-top: 20px;
}

.info-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 36px 24px;
    text-align: left;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.info-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}

.card-icon {
    width: 36px;
    height: 36px;
    background: var(--accent-light);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

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

.card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.card-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.55;
}

/* Pricing Grid & Cards */
.pricing-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
    max-width: 960px;
    margin: 0 auto;
}

.pricing-card {
    flex: 1;
    min-width: 280px;
    max-width: 320px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px 24px;
    text-align: left;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.pricing-card:hover {
    transform: translateY(-4px);
}

.pricing-card.pro-tier {
    border-color: var(--accent);
    background: radial-gradient(circle at top right, rgba(212, 175, 55, 0.05) 0%, var(--bg-elevated) 60%);
    box-shadow: var(--shadow-md);
    position: relative;
}

.pricing-card.pro-tier::before {
    content: "POPULAR";
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--accent);
    color: #18181b;
    font-size: 10px;
    font-weight: bold;
    padding: 3px 10px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.tier-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.tier-price {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.tier-price span {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-tertiary);
}

.tier-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    min-height: 40px;
}

.tier-features {
    list-style: none;
    padding: 0;
    margin: 0 0 32px;
    font-size: 13.5px;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tier-features li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tier-features li::before {
    content: "✓";
    color: var(--accent);
    font-weight: bold;
}

.tier-btn {
    width: 100%;
    margin-top: auto;
}

/* Embedded Workspace Container Section */
.workspace-section {
    padding: 80px 0;
    background: radial-gradient(circle at bottom, rgba(212, 175, 55, 0.05) 0%, transparent 60%);
    border-bottom: none;
}

/* Team Grid & Uiverse-style profile cards */
.team-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
    gap: 28px;
    justify-items: center;
    align-items: start;
}

.profile-card {
    --font-color: var(--text-primary);
    --font-color-sub: var(--accent);
    --bg-color: var(--bg-elevated);
    --main-color: var(--text-primary);
    width: 100%;
    max-width: 240px;
    min-height: 320px;
    padding: 28px 18px 22px;
    background: var(--bg-color);
    border: 2px solid var(--main-color);
    box-shadow: 4px 4px var(--main-color);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.profile-card:hover,
.profile-card:focus-within {
    transform: translateY(-6px);
    box-shadow: 8px 8px var(--main-color);
}

.profile-card__photo {
    width: 92px;
    height: 124px;
    border-radius: 46px;
    overflow: hidden;
    border: 2px solid var(--main-color);
    background: var(--bg-tertiary);
    flex-shrink: 0;
    margin-bottom: 14px;
}

.profile-card__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 8%;
    display: block;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.profile-card:hover .profile-card__photo img,
.profile-card:focus-within .profile-card__photo img {
    transform: scale(1.08);
}

.profile-card__photo--kent img {
    object-position: 46% 10%;
}

.profile-card__title {
    margin: 0;
    min-height: 52px;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--font-color);
    font-family: var(--font);
}

.profile-card__title span {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--font-color-sub);
}

.profile-card__bio {
    margin: 12px 0 0;
    min-height: 76px;
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--text-secondary);
}

.profile-card__socials {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    height: 0;
    opacity: 0;
    overflow: hidden;
    margin-top: 0;
    transition: height 0.4s ease, opacity 0.35s ease, margin 0.35s ease;
}

.profile-card:hover .profile-card__socials,
.profile-card:focus-within .profile-card__socials {
    height: 18px;
    opacity: 1;
    margin-top: 14px;
}

.profile-card__social {
    width: 15px;
    height: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--text-primary);
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.18s ease, color 0.18s ease;
}

.profile-card__social svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.profile-card__social svg.profile-card__globe {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.profile-card__social:hover {
    transform: translateY(-3px);
    color: var(--accent);
}

.profile-card__social[target="_blank"]::after {
    content: none;
    margin: 0;
}

.workspace-wrapper {
    max-width: 1750px;
    width: 98%;
    margin: 0 auto;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.workspace-title-bar {
    background: var(--bg-elevated);
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.workspace-title-text {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.workspace-status {
    background: var(--accent-light);
    color: var(--accent);
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
}

/* Unify full-viewport CSS properties for the embedded workspace */
.workspace-wrapper .dashboard {
    height: 1150px !important;
    width: 100% !important;
    display: flex !important;
    position: relative !important;
    overflow: hidden !important;
}

.workspace-wrapper .sidebar {
    height: 100% !important;
    border-right: 1px solid var(--border);
}

.workspace-wrapper .main-panel {
    height: 100% !important;
    overflow: hidden !important;
    display: flex;
    flex-direction: column;
}

.workspace-wrapper .chat-area {
    flex: 1;
    overflow-y: auto;
}

.workspace-wrapper .composer-wrapper {
    position: relative;
    bottom: auto;
    left: auto;
    right: auto;
    width: 100%;
}

/* ══════════════════════════════════════════════════════════════════════════
   UI POLISH ADDITIONS — focus rings, form states, error/success, offline banner
   ══════════════════════════════════════════════════════════════════════════ */

/* Inline form error / success messages */
.form-message {
    display: none;
    margin-top: 8px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    line-height: 1.45;
    border: 1px solid transparent;
}

.form-message.show {
    display: block;
    animation: fadeUp 0.25s ease-out;
}

.form-message.error {
    color: #b91c1c;
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.25);
}

.form-message.success {
    color: #15803d;
    background: rgba(34, 197, 94, 0.08);
    border-color: rgba(34, 197, 94, 0.25);
}

[data-theme="dark"] .form-message.error {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.35);
}

[data-theme="dark"] .form-message.success {
    color: #86efac;
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.35);
}

.form-input.is-invalid,
.pref-input.is-invalid,
.pipeline-textarea.is-invalid {
    border-color: var(--error) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

.field-error {
    margin: 6px 0 0;
    font-size: 12.5px;
    line-height: 1.4;
    color: #b91c1c;
}

[data-theme="dark"] .field-error {
    color: #fca5a5;
}

/* ── Terms and Conditions: agreement field + modal (js/terms.js) ── */
.terms-field {
    margin-bottom: 20px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 10px;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.terms-field .checkbox-wrapper {
    align-items: flex-start;
}

.terms-field .checkbox {
    flex: none;
    margin-top: 2px;
}

.terms-field .checkbox-label {
    line-height: 1.5;
}

.terms-field .checkbox-label .form-link {
    font-size: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.terms-field.is-invalid {
    border-color: rgba(220, 38, 38, 0.55);
    background: rgba(220, 38, 38, 0.06);
}

.terms-field .field-error {
    margin-left: 24px;
}

body.terms-open {
    overflow: hidden;
}

.terms-modal {
    position: fixed;
    inset: 0;
    z-index: 25000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.terms-modal[hidden] {
    display: none;
}

.terms-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 18, 0.62);
    backdrop-filter: blur(4px);
    animation: termsFade 0.2s ease-out;
}

.terms-modal__dialog {
    position: relative;
    display: flex;
    flex-direction: column;
    width: min(760px, 100%);
    max-height: min(86vh, 860px);
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: termsRise 0.25s ease-out;
}

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

@keyframes termsRise {
    from { opacity: 0; transform: translateY(14px) scale(0.98); }
    to { opacity: 1; transform: none; }
}

.terms-modal__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 26px 14px;
    border-bottom: 1px solid var(--border);
}

.terms-modal__eyebrow {
    margin: 0 0 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
}

.terms-modal__title {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    outline: none;
}

.terms-modal__meta {
    margin: 6px 0 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.terms-modal__close {
    flex: none;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: transparent;
    color: var(--text-secondary);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.terms-modal__close:hover,
.terms-modal__close:focus-visible {
    color: var(--text-primary);
    border-color: var(--accent);
}

.terms-modal__toc {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 12px 26px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
}

.terms-modal__toc a {
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.terms-modal__toc a:hover,
.terms-modal__toc a:focus-visible {
    color: var(--accent);
    border-color: var(--accent);
}

.terms-modal__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 8px 26px 20px;
    font-size: 14.5px;
    line-height: 1.65;
    color: var(--text-secondary);
    outline: none;
}

.terms-modal__body section {
    padding-top: 14px;
}

.terms-modal__body h3 {
    margin: 0 0 6px;
    font-size: 15.5px;
    font-weight: 700;
    color: var(--text-primary);
}

.terms-modal__body p {
    margin: 0 0 8px;
}

.terms-modal__body ul {
    margin: 0 0 8px;
    padding-left: 20px;
}

.terms-modal__body li {
    margin-bottom: 4px;
}

.terms-modal__body strong {
    color: var(--text-primary);
}

.terms-modal__body a {
    color: var(--accent);
}

.terms-modal__end {
    margin-top: 18px !important;
    padding-top: 12px;
    border-top: 1px dashed var(--border);
    font-size: 12.5px;
    text-align: center;
    color: var(--text-tertiary);
}

.terms-modal__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 26px;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
}

.terms-modal__hint {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.terms-modal__actions {
    display: flex;
    gap: 10px;
    flex: none;
}

.terms-modal__btn {
    min-width: 110px;
    padding: 10px 18px;
    border-radius: 10px;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}

.terms-modal__btn--ghost {
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-primary);
}

.terms-modal__btn--ghost:hover {
    border-color: #dc2626;
    color: #dc2626;
}

.terms-modal__btn--primary {
    border: 1px solid var(--accent);
    background: var(--accent);
    color: #fff;
}

.terms-modal__btn--primary:hover:not(:disabled) {
    background: var(--accent-hover);
}

.terms-modal__btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

@media (max-width: 600px) {
    .terms-modal {
        padding: 0;
        align-items: flex-end;
    }

    .terms-modal__dialog {
        max-height: 92vh;
        border-radius: 18px 18px 0 0;
    }

    .terms-modal__head,
    .terms-modal__toc,
    .terms-modal__body,
    .terms-modal__foot {
        padding-left: 18px;
        padding-right: 18px;
    }

    .terms-modal__foot {
        flex-direction: column;
        align-items: stretch;
    }

    .terms-modal__actions .terms-modal__btn {
        flex: 1 1 0;
    }
}

/* Inline label requirement marker */
.form-label .req {
    color: var(--error);
    margin-left: 2px;
    font-weight: 600;
}

/* Connection status uses the shared toast — never a layout-breaking banner. */
.connection-banner {
    display: none !important;
}

/* Skeleton loading helper */
.skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 0%, var(--bg-hover) 50%, var(--bg-tertiary) 100%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
    color: transparent;
    user-select: none;
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── Dev-only auto-login panel (login.html) ── */
.dev-panel {
    margin-top: 24px;
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px dashed var(--accent);
    background: var(--accent-light);
    text-align: left;
}

.dev-panel[hidden] {
    display: none;
}

.dev-panel-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.dev-panel-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 3px 7px;
    border-radius: 4px;
    background: var(--accent);
    color: var(--text-on-accent);
    text-transform: uppercase;
}

.dev-panel-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.dev-panel-desc {
    font-size: 12.5px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 12px;
}

.dev-panel-desc code {
    font-size: 11.5px;
    padding: 1px 5px;
    background: var(--bg-tertiary);
    border-radius: 3px;
}

.dev-panel-btn {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.dev-panel-btn svg {
    width: 16px;
    height: 16px;
}

/* Empty-state placeholder for chat / list panels */
.empty-state {
    padding: 32px 16px;
    text-align: center;
    color: var(--text-tertiary);
    font-size: 13px;
    line-height: 1.5;
}

.empty-state-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 12px;
    color: var(--text-tertiary);
    opacity: 0.5;
}

.empty-state-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.empty-state-text {
    font-size: 12px;
    color: var(--text-tertiary);
}

/* External link icon helper */
a[target="_blank"]::after {
    content: "↗";
    display: inline-block;
    margin-left: 3px;
    font-size: 0.85em;
    opacity: 0.7;
    text-decoration: none;
}

a[target="_blank"].no-external-icon::after {
    content: "";
    margin: 0;
}

/* Visually hidden but available to screen readers for live announcements */
.live-region {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Improved text rendering for body */
p {
    text-wrap: pretty;
}

h1, h2, h3, h4, h5, h6 {
    text-wrap: balance;
}

/* ══════════════════════════════════════════════════════════════════════════
   PORTAL LANDING PAGE (index.html)
   ══════════════════════════════════════════════════════════════════════════ */

.portal-page {
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    background: var(--bg-primary);
    padding-top: 70px;
}

.portal-section--contact {
    background: radial-gradient(circle at top, rgba(212, 175, 55, 0.05) 0%, transparent 55%);
    padding-bottom: 60px;
}

.contact-showcase {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 48px;
    text-align: left;
    align-items: start;
    margin-top: 16px;
}

@media (max-width: 900px) {
    .contact-showcase {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

.contact-showcase__intro {
    padding-top: 8px;
}

.contact-showcase__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 16px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--accent-light);
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.contact-showcase__badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
    animation: contactBadgePulse 2s ease-in-out infinite;
}

@keyframes contactBadgePulse {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.contact-showcase__headline {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.25;
}

.contact-showcase__text {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.65;
}

.contact-showcase__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    overflow: visible;
    padding-top: 36px;
}

@media (max-width: 600px) {
    .contact-showcase__grid {
        grid-template-columns: 1fr;
    }
}

.contact-tile {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 20px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    text-decoration: none;
    overflow: visible;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.25s ease;
}

.contact-tile:hover {
    transform: translateY(-3px);
    border-color: var(--accent);
    box-shadow: var(--shadow-md);
}

.contact-tile__icon {
    position: relative;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-bottom: 8px;
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.68, -0.55, 0.265, 1.55), background-color 0.25s ease, color 0.25s ease;
}

.contact-tile__icon svg {
    width: 22px;
    height: 22px;
    position: relative;
    z-index: 1;
}

.contact-tile__tooltip {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    font-size: 13px;
    font-weight: 600;
    background: var(--accent);
    color: var(--text-inverse);
    padding: 5px 8px;
    border-radius: 5px;
    box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
    opacity: 0;
    pointer-events: none;
    white-space: nowrap;
    z-index: 3;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.contact-tile__tooltip::before {
    position: absolute;
    content: "";
    height: 8px;
    width: 8px;
    background: var(--accent);
    bottom: -3px;
    left: 50%;
    transform: translate(-50%) rotate(45deg);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.contact-tile--email:hover .contact-tile__icon,
.contact-tile--email:hover .contact-tile__tooltip,
.contact-tile--email:hover .contact-tile__tooltip::before {
    background: #ea4335;
    color: #fff;
}

.contact-tile--phone:hover .contact-tile__icon,
.contact-tile--phone:hover .contact-tile__tooltip,
.contact-tile--phone:hover .contact-tile__tooltip::before {
    background: #22c55e;
    color: #fff;
}

.contact-tile--instagram:hover .contact-tile__icon,
.contact-tile--instagram:hover .contact-tile__tooltip,
.contact-tile--instagram:hover .contact-tile__tooltip::before {
    background: #e4405f;
    color: #fff;
}

.contact-tile--facebook:hover .contact-tile__icon,
.contact-tile--facebook:hover .contact-tile__tooltip,
.contact-tile--facebook:hover .contact-tile__tooltip::before {
    background: #1877f2;
    color: #fff;
}

.contact-tile--email .contact-tile__icon,
.contact-tile--phone .contact-tile__icon,
.contact-tile--instagram .contact-tile__icon,
.contact-tile--facebook .contact-tile__icon {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

.contact-tile__label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-tertiary);
}

.contact-tile__value {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.contact-tile__action {
    font-size: 13px;
    font-weight: 500;
    color: var(--accent);
    margin-top: 4px;
}

a.contact-tile[target="_blank"]::after {
    content: none;
    margin: 0;
}

.contact-showcase__social {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

.contact-showcase--dashboard {
    grid-template-columns: 1fr;
    gap: 24px;
    max-width: 720px;
}

.vvs-social-block {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.vvs-social-block__label {
    margin: 16px 0 0;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.vvs-social-block--auth {
    margin-top: 8px;
}

/* From Uiverse.io by david-mohseni — scoped as .vvs-social, retinted to VoiceVerSign */
.vvs-social {
    display: inline-flex;
    list-style: none;
    height: auto;
    width: auto;
    margin: 0;
    padding: 28px 0 8px;
    padding-inline-start: 0;
    font-family: inherit;
    justify-content: center;
}

.vvs-social {
    display: inline-flex;
    list-style: none;
    height: auto;
    width: auto;
    margin: 0;
    padding: 28px 0 8px;
    padding-inline-start: 0;
    font-family: inherit;
    justify-content: center;
}

.vvs-social .icon {
    position: relative;
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 50%;
    margin: 8px;
    width: 42px;
    height: 42px;
    font-size: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.68, -0.55, 0.265, 1.55), background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.vvs-social .icon a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: inherit;
    border-radius: 50%;
    text-decoration: none;
}

.vvs-social a[target="_blank"]::after {
    content: none;
    margin: 0;
}

.vvs-social .tooltip {
    position: absolute;
    top: 0;
    font-size: 13px;
    font-weight: 600;
    background: var(--accent);
    color: var(--text-inverse);
    padding: 5px 8px;
    border-radius: 5px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.16);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    white-space: nowrap;
    z-index: 2;
}

.vvs-social .tooltip::before {
    position: absolute;
    content: "";
    height: 8px;
    width: 8px;
    background: var(--accent);
    bottom: -3px;
    left: 50%;
    transform: translate(-50%) rotate(45deg);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.vvs-social .icon:hover .tooltip {
    top: -45px;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.vvs-social .icon:hover span,
.vvs-social .icon:hover .tooltip {
    text-shadow: 0px -1px 0px rgba(0, 0, 0, 0.1);
}

.vvs-social .facebook:hover,
.vvs-social .facebook:hover .tooltip,
.vvs-social .facebook:hover .tooltip::before {
    background: #1877f2;
    color: #fff;
    border-color: #1877f2;
}

.vvs-social .email:hover,
.vvs-social .email:hover .tooltip,
.vvs-social .email:hover .tooltip::before {
    background: #ea4335;
    color: #fff;
    border-color: #ea4335;
}

.vvs-social .phone:hover,
.vvs-social .phone:hover .tooltip,
.vvs-social .phone:hover .tooltip::before {
    background: #22c55e;
    color: #fff;
    border-color: #22c55e;
}

.vvs-social .instagram:hover,
.vvs-social .instagram:hover .tooltip,
.vvs-social .instagram:hover .tooltip::before {
    background: #e4405f;
    color: #fff;
    border-color: #e4405f;
}

.vvs-social .facebook:hover a,
.vvs-social .email:hover a,
.vvs-social .phone:hover a,
.vvs-social .instagram:hover a {
    color: #fff;
}

.vvs-social--compact {
    padding-top: 12px;
}

.vvs-social--compact .icon {
    width: 42px;
    height: 42px;
    margin: 8px;
    font-size: 16px;
}

.vvs-social--compact .icon:hover .tooltip {
    top: -38px;
}

.vvs-social--nav {
    padding: 6px 0 2px;
}

.vvs-social--nav .icon {
    width: 36px;
    height: 36px;
    margin: 4px;
    font-size: 14px;
}

.vvs-social--nav .icon:hover .tooltip {
    top: -36px;
}

.nav-contact {
    display: flex;
    align-items: center;
}

@media (max-width: 1100px) {
    .nav-contact {
        display: none;
    }
}

.vvs-contact-popover {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(10, 10, 16, 0.55);
}

.vvs-contact-popover[hidden] {
    display: none !important;
}

body.vvs-contact-open {
    overflow: hidden;
}

.vvs-contact-popover__card {
    position: relative;
    width: min(420px, 100%);
    padding: 28px 24px 16px;
    border-radius: 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
    text-align: center;
    color: var(--text-primary);
}

.vvs-contact-popover__close {
    position: absolute;
    top: 10px;
    right: 12px;
    border: 0;
    background: transparent;
    color: var(--text-secondary);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.vvs-contact-popover__tag {
    margin: 0 0 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
}

.vvs-contact-popover__card h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

.vvs-contact-popover__card p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.sidebar-contact,
.admin-sidebar-contact {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 8px 12px;
}

.sidebar.collapsed .sidebar-contact,
.maxton-sidebar.collapsed .admin-sidebar-contact {
    display: none;
}

.auth-contact {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-secondary);
    text-decoration: none;
}

.auth-contact:hover {
    color: var(--accent);
}

@media (max-width: 600px) {
    .auth-header [data-vvs-social] {
        display: none;
    }
}

/* Back-to-top floating button */
.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--bg-primary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease, background 0.2s ease;
    z-index: 40;
}

.back-to-top:hover {
    background: #e0c97f;
}

.back-to-top:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

@media (max-width: 600px) {
    .back-to-top {
        right: 16px;
        bottom: 16px;
        width: 44px;
        height: 44px;
    }
}

/* Logged-in home landing */
.home-landing {
    min-height: 100vh;
    padding-top: 70px;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.home-landing .sticky-nav {
    position: fixed;
}

.home-hero {
    padding: 88px 24px 48px;
    text-align: center;
}

.home-hero h1 {
    margin: 8px 0 12px;
    font-size: clamp(28px, 5vw, 44px);
    font-weight: 800;
    letter-spacing: -0.03em;
}

.home-hero p {
    max-width: 560px;
    margin: 0 auto 28px;
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.5;
}

.home-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 22px;
    max-width: 920px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

.home-card {
    --uv-ink: var(--text-primary);
    --uv-primary: var(--accent);
    --uv-header-text: #f5f5f5;
    --uv-text: var(--text-primary);
    --uv-bg: var(--bg-elevated);
    --uv-shadow: var(--text-primary);
    display: flex;
    flex-direction: column;
    text-align: left;
    text-decoration: none;
    color: var(--uv-text);
    background: var(--uv-bg);
    border: 5px solid var(--uv-ink);
    border-radius: 10px;
    box-shadow: 11px 11px 0 var(--uv-shadow);
    overflow: hidden;
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.home-card__bar {
    padding: 12px 14px;
    background: var(--uv-primary);
    color: var(--uv-header-text);
    border-bottom: 5px solid var(--uv-ink);
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 13px;
}

.home-card__body {
    padding: 16px 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.home-card__body p {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.45;
    color: inherit;
    opacity: 0.8;
}

.home-card__cta {
    margin-top: auto;
    align-self: flex-start;
    padding: 6px 12px;
    border: 2.5px solid var(--uv-ink);
    border-radius: 5px;
    background: var(--uv-text);
    color: var(--uv-bg);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow: 3px 3px 0 #000;
}

.home-card:hover {
    transform: translate(-3px, -3px);
    box-shadow: 14px 14px 0 #000;
}

/* ── App-wide tapping-hand loader (Uiverse.io by Pradeepsaranbishnoi) ── */
.vvs-app-loader {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.vvs-app-loader::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 36%, rgba(196, 149, 106, 0.16), transparent 58%);
    pointer-events: none;
}

html.vvs-loaded .vvs-app-loader:not(.is-on) {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.vvs-app-loader__panel {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    min-width: 260px;
    padding: 8px 16px 0;
}

.vvs-app-loader__brand-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.vvs-app-loader__logo {
    width: 30px;
    height: 30px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.4));
}

.vvs-app-loader__brand {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.4px;
    text-transform: none;
    color: var(--accent);
    text-shadow: 0 0 20px rgba(245, 158, 11, 0.25);
}

.vvs-app-loader__hand-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 68px;
    padding-right: 18px;
    transform: scale(0.55);
    transform-origin: center center;
}

.vvs-app-loader__status {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.01em;
}

.vvs-app-loader__track {
    width: 168px;
    height: 3px;
    border-radius: 999px;
    background: var(--border);
    overflow: hidden;
}

.vvs-app-loader__bar {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: var(--accent);
}

.vvs-hand {
    --skin-color: #E0B090;
    --tap-speed: 0.6s;
    --tap-stagger: 0.1s;
    position: relative;
    width: 80px;
    height: 60px;
    margin-left: 80px;
}

.vvs-hand::before {
    content: '';
    display: block;
    width: 180%;
    height: 75%;
    position: absolute;
    top: 70%;
    right: 20%;
    background-color: black;
    border-radius: 40px 10px;
    filter: blur(10px);
    opacity: 0.3;
}

.vvs-hand__palm {
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background-color: var(--skin-color);
    border-radius: 10px 40px;
}

.vvs-hand__thumb {
    position: absolute;
    width: 120%;
    height: 38px;
    background-color: var(--skin-color);
    bottom: -18%;
    right: 1%;
    transform-origin: calc(100% - 20px) 20px;
    transform: rotate(-20deg);
    border-radius: 30px 20px 20px 10px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
    border-left: 2px solid rgba(0, 0, 0, 0.1);
}

.vvs-hand__thumb::after {
    width: 20%;
    height: 60%;
    content: '';
    background-color: rgba(255, 255, 255, 0.3);
    position: absolute;
    bottom: -8%;
    left: 5px;
    border-radius: 60% 10% 10% 30%;
    border-right: 2px solid rgba(0, 0, 0, 0.05);
}

.vvs-hand__finger {
    position: absolute;
    width: 80%;
    height: 35px;
    background-color: var(--skin-color);
    bottom: 32%;
    right: 64%;
    transform-origin: 100% 20px;
    animation-duration: calc(var(--tap-speed) * 2);
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
    transform: rotate(10deg);
}

.vvs-hand__finger::before {
    content: '';
    position: absolute;
    width: 140%;
    height: 30px;
    background-color: var(--skin-color);
    bottom: 8%;
    right: 65%;
    transform-origin: calc(100% - 20px) 20px;
    transform: rotate(-60deg);
    border-radius: 20px;
}

.vvs-hand__finger:nth-child(1) {
    animation-delay: 0;
    filter: brightness(70%);
    animation-name: tap-upper-1;
}

.vvs-hand__finger:nth-child(2) {
    animation-delay: var(--tap-stagger);
    filter: brightness(80%);
    animation-name: tap-upper-2;
}

.vvs-hand__finger:nth-child(3) {
    animation-delay: calc(var(--tap-stagger) * 2);
    filter: brightness(90%);
    animation-name: tap-upper-3;
}

.vvs-hand__finger:nth-child(4) {
    animation-delay: calc(var(--tap-stagger) * 3);
    filter: brightness(100%);
    animation-name: tap-upper-4;
}

@keyframes tap-upper-1 {
    0%, 50%, 100% {
        transform: rotate(10deg) scale(0.4);
    }
    40% {
        transform: rotate(50deg) scale(0.4);
    }
}

@keyframes tap-upper-2 {
    0%, 50%, 100% {
        transform: rotate(10deg) scale(0.6);
    }
    40% {
        transform: rotate(50deg) scale(0.6);
    }
}

@keyframes tap-upper-3 {
    0%, 50%, 100% {
        transform: rotate(10deg) scale(0.8);
    }
    40% {
        transform: rotate(50deg) scale(0.8);
    }
}

@keyframes tap-upper-4 {
    0%, 50%, 100% {
        transform: rotate(10deg) scale(1);
    }
    40% {
        transform: rotate(50deg) scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .vvs-hand__finger {
        animation: none !important;
    }
}

/* ── Phone / tablet layout ── */
.sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    border: 0;
    padding: 0;
    margin: 0;
    background: rgba(10, 10, 16, 0.45);
    z-index: 95;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

body.sidebar-drawer-open .sidebar-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

body.nav-open {
    overflow: hidden;
}

body.nav-open .sticky-nav {
    z-index: 80;
}

body.nav-open::after {
    content: "";
    position: fixed;
    inset: 70px 0 0;
    background: rgba(10, 10, 16, 0.35);
    z-index: 55;
    animation: fadeIn 0.3s ease;
}

@media (max-width: 480px) {
    body.nav-open::after {
        inset: 64px 0 0;
    }
}

body.admin-page .sidebar-backdrop {
    z-index: 998;
}

@media (max-width: 720px) {
    .hero-section {
        padding: 72px 0 48px;
    }

    .hero-title {
        font-size: clamp(28px, 8vw, 40px);
        letter-spacing: -0.5px;
    }

    .hero-subtitle {
        font-size: 15px;
        margin-bottom: 24px;
    }

    .hero-actions .uiverse-btn {
        width: min(100%, 280px);
        justify-content: center;
    }

    .portal-section {
        padding: 56px 0;
    }

    .section-container {
        width: min(92%, 1100px);
    }

    .section-title {
        font-size: 26px;
    }

    .section-desc {
        font-size: 14px;
        margin-bottom: 28px;
    }

    .pricing-cards--uiverse {
        flex-direction: column;
        align-items: stretch;
        gap: 44px;
        padding: 8px 4px 20px;
    }

    .uiverse-card {
        flex: 1 1 auto;
        max-width: none;
        width: 100%;
        min-width: 0;
    }

    .uiverse-card:hover,
    .uiverse-card:active {
        transform: none;
        box-shadow: 8px 8px 0 var(--uv-shadow);
    }

    .uiverse-card__body {
        padding: 20px 18px 22px;
    }

    .uiverse-card__title-area {
        padding: 16px 18px;
        font-size: 17px;
    }

    .uiverse-card .feature-grid {
        grid-template-columns: 1fr 1fr;
        gap: 14px 12px;
    }

    .uiverse-card .feature-item,
    .uiverse-card .feature-item:hover,
    .uiverse-card .feature-item:active {
        transform: none;
    }

    .uiverse-card .feature-text {
        font-size: 14px;
        line-height: 1.35;
    }

    .uiverse-card__description {
        margin-bottom: 16px;
        font-size: 14px;
    }

    .uiverse-card__actions {
        flex-wrap: wrap;
        gap: 12px;
    }

    .plus-plans-inner {
        width: min(calc(100vw - 16px), 560px);
        max-height: 92dvh;
        padding: 40px 12px 16px;
    }

    .plus-plans-title {
        font-size: 18px;
        margin: 0 32px 14px;
    }

    .contact-showcase__grid {
        grid-template-columns: 1fr;
    }

    .auth-body {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 20px !important;
        padding: 16px !important;
    }

    .auth-intro {
        max-width: none !important;
        text-align: center !important;
        margin-bottom: 0 !important;
    }

    .auth-intro h1 {
        font-size: clamp(28px, 8vw, 40px) !important;
        letter-spacing: -0.5px !important;
        margin-bottom: 12px !important;
    }

    .auth-intro p {
        font-size: 15px !important;
    }

    .auth-card {
        max-width: none;
        width: 100%;
    }

    .chat-header {
        padding: 10px 12px;
    }

    .chat-header-title {
        font-size: 16px;
    }

    .composer {
        padding: 8px 12px calc(12px + env(safe-area-inset-bottom, 0px));
    }

    .composer-box {
        padding-left: 10px;
    }

    .mic-indicator-label {
        display: none;
    }

    .vvs-contact-popover {
        padding: 12px;
        align-items: flex-end;
    }

    .gcash-pay {
        width: min(100%, 420px);
    }
}

@media (max-width: 480px) {
    .auth-header {
        padding: 12px 16px;
    }

    .header-link-btn {
        padding: 6px 10px;
        font-size: 12px;
    }

    .pipeline-media-card,
    .pipeline-text-card {
        padding: 12px;
    }

    .maxton-breadcrumbs,
    .chat-header-right {
        gap: 6px;
    }
}

/* ── Device fluid layer: phone, tablet, laptop, desktop ── */
@media (max-width: 1366px) and (min-width: 1181px) {
    .nav-container {
        padding: 0 20px;
    }

    .nav-links {
        gap: 14px;
    }

    .nav-link {
        font-size: 12px;
        letter-spacing: 0.05em;
    }
}

@media (max-width: 1024px) {
    .portal-section {
        padding: 72px 0;
    }

    .section-container {
        width: min(94%, 1100px);
    }

    .section-title {
        font-size: clamp(26px, 4vw, 34px);
    }

    .hero-title {
        font-size: clamp(32px, 6vw, 48px);
    }

    .auth-body {
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 24px !important;
        padding: 20px 4vw !important;
    }

    .auth-intro {
        max-width: none !important;
        text-align: center !important;
        margin-bottom: 0 !important;
    }

    .auth-intro h1 {
        font-size: clamp(32px, 7vw, 48px) !important;
        letter-spacing: -0.8px !important;
        margin-bottom: 12px !important;
    }

    .auth-card {
        max-width: min(420px, 100%);
        width: 100%;
        margin-inline: auto;
    }

    .chat-header {
        padding: 10px 14px;
    }

    .section-panel {
        padding: 24px 16px;
    }

    .composer {
        padding: 10px 16px calc(16px + env(safe-area-inset-bottom, 0px));
    }

    .pipeline-video--large {
        min-height: 240px;
        max-height: min(52vh, 420px);
    }

    .plus-plans-inner {
        width: min(calc(100vw - 24px), 720px);
        max-height: min(90dvh, 720px);
        padding: 24px 16px 16px;
    }

    .uiverse-card {
        flex: 1 1 260px;
        max-width: 100%;
    }

    .pricing-cards--uiverse > .uiverse-card {
        flex: 0 0 auto;
        height: auto;
        width: min(100%, 360px);
        max-width: 360px;
    }
}

@media (max-width: 720px) {
    .pricing-cards--uiverse > .uiverse-card {
        width: 100%;
        max-width: none;
    }

    .pricing-cards--uiverse .uiverse-card__title-area {
        min-height: 58px;
        padding: 14px 58px 14px 18px;
        box-sizing: border-box;
    }

    .pricing-cards--uiverse .uiverse-card__tag {
        transform: none;
        z-index: 3;
        flex-shrink: 0;
        margin: 0;
        padding: 5px 10px;
        font-size: 11px;
        line-height: 1.1;
        letter-spacing: 0.08em;
        box-shadow: 2px 2px 0 var(--uv-ink);
    }

    .pricing-cards--uiverse .uiverse-card:hover .uiverse-card__tag,
    .pricing-cards--uiverse .uiverse-card:active .uiverse-card__tag {
        transform: none;
        box-shadow: 2px 2px 0 var(--uv-ink);
    }

    .pricing-cards--uiverse .uiverse-card__actions {
        flex-wrap: nowrap;
        align-items: center;
        gap: 12px;
        padding-top: 16px;
    }

    .pricing-cards--uiverse .uiverse-price {
        font-size: 26px;
        flex: 0 0 auto;
    }

    .pricing-cards--uiverse .uiverse-card__button {
        flex: 1 1 auto;
        min-width: 0;
        padding: 10px 12px;
        font-size: 11px;
        white-space: nowrap;
    }
}

@media (max-width: 768px) {
    .dashboard,
    .workspace-wrapper .dashboard {
        height: 100dvh;
        max-height: 100dvh;
    }

    .chat-header-title {
        font-size: 15px;
    }

    .suggestion-card,
    .card-grid > * {
        min-width: 0;
        max-width: 100%;
    }
}

@media (max-width: 360px) {
    .nav-auth .uiverse-btn {
        padding: 7px 10px;
        font-size: 11px;
    }

    .hero-title,
    .auth-intro h1 {
        font-size: clamp(24px, 9vw, 32px) !important;
    }

    .uiverse-card {
        border-width: 4px;
    }

    .composer-box {
        padding-left: 8px;
        gap: 4px;
    }
}

/* Touch phones and tablets have no hover. Play the same motion on press. */
@media (hover: none), (pointer: coarse) {
    .uiverse-card:hover,
    .uiverse-card:active {
        transform: translate(-6px, -6px) scale(1.02);
        box-shadow: 16px 16px 0 var(--uv-shadow);
    }

    .uiverse-card:hover .uiverse-card__pattern-grid,
    .uiverse-card:active .uiverse-card__pattern-grid,
    .uiverse-card:hover .uiverse-card__overlay-dots,
    .uiverse-card:active .uiverse-card__overlay-dots {
        opacity: 1;
    }

    .uiverse-card:hover .uiverse-card__tag,
    .uiverse-card:active .uiverse-card__tag {
        transform: rotate(-2deg) scale(1.1);
        box-shadow: 4px 4px 0 var(--uv-shadow);
    }

    .uiverse-card:hover .uiverse-card__accent-shape,
    .uiverse-card:active .uiverse-card__accent-shape {
        transform: rotate(55deg) scale(1.1);
    }

    .uiverse-card .feature-item:active {
        transform: translateX(5px);
    }

    .uiverse-card__button:hover,
    .uiverse-card__button:active {
        background: var(--uv-secondary-hover);
        transform: translate(-0.5px, -0.5px);
        box-shadow: 2.5px 2.5px 0 var(--uv-shadow);
    }

    .uiverse-card__button:hover::before,
    .uiverse-card__button:active::before {
        left: 100%;
    }

    .plus-plans-overlay .uiverse-card:hover,
    .plus-plans-overlay .uiverse-card:active {
        transform: translate(-3px, -3px);
        box-shadow: 9px 9px 0 var(--uv-shadow);
    }

    .feedback-modal .uiverse-card:hover,
    .feedback-modal .uiverse-card:active {
        transform: translate(-3px, -3px) scale(1.01);
    }

    .sidebar-nav-item:hover,
    .sidebar-nav-item:active,
    .maxton-menu-item:hover,
    .maxton-menu-item:active {
        transform: translateX(4px);
    }

    .maxton-icon-btn:active {
        transform: scale(1.08);
    }

    .uiverse-btn:hover,
    .uiverse-btn:active {
        color: var(--uiverse-text-hover);
        box-shadow: 0 0 20px rgba(224, 182, 148, 0.4);
    }

    .uiverse-btn:hover::before,
    .uiverse-btn:active::before {
        transform: scaleX(1);
    }

    .info-card:active,
    .admin-home-card:active,
    .pricing-card:active,
    .contact-card:active,
    .contact-tile:active {
        transform: translateY(-4px);
        border-color: var(--accent);
        box-shadow: var(--shadow-md);
    }

    .suggestion-card:active {
        border-color: var(--accent);
        transform: translateY(-2px);
        box-shadow: var(--shadow-sm);
    }

    .home-card:active {
        transform: translate(-3px, -3px);
        box-shadow: 14px 14px 0 #000;
    }

    .send-plane-btn:active {
        background: var(--accent-hover, #b07d52);
        transform: none;
    }

    .send-plane-btn:active .svg-wrapper {
        animation: send-plane-fly 0.6s ease-in-out infinite alternate;
    }

    .send-plane-btn:active svg {
        transform: translateX(1.2em) rotate(45deg) scale(1.1);
    }

    .send-plane-btn:active span {
        transform: translateX(5em);
    }

    .nav-link:active {
        transform: none;
    }
}

@media (pointer: coarse) {
    .chat-header-toggle,
    .nav-menu-btn,
    .maxton-icon-btn,
    .user-profile-btn,
    .send-plane-btn,
    .sendButton {
        min-width: 44px;
        min-height: 44px;
    }

    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}

#settingsAvatarPreview,
#settingsAvatarInitials,
#settingsModalAvatarPreview,
#settingsModalAvatarInitials {
    border: 2px solid #e0b694 !important;
    box-shadow: 0 0 0 2px rgba(224, 182, 148, 0.22);
    box-sizing: border-box;
}

/* Text size: most rules use px, so scale the workspace instead of the root font. */
html {
    --vvs-text-zoom: 1;
    --vvs-caption-scale: 1;
}

html[data-font-size="small"] { --vvs-text-zoom: 0.9; }
html[data-font-size="large"] { --vvs-text-zoom: 1.12; }
html[data-font-size="xlarge"] { --vvs-text-zoom: 1.25; }

html[data-font-size] .dashboard > .sidebar,
html[data-font-size] .dashboard > .main-panel,
html[data-font-size] .settings-modal__main,
html[data-font-size] .settings-modal__nav,
html[data-font-size] .user-dropdown-menu {
    zoom: var(--vvs-text-zoom);
}

html[data-caption-size="small"] { --vvs-caption-scale: 0.88; }
html[data-caption-size="large"] { --vvs-caption-scale: 1.3; }
html[data-caption-size="xlarge"] { --vvs-caption-scale: 1.6; }

html[data-caption-size] .sign-viewer__caption {
    font-size: calc(15px * var(--vvs-caption-scale));
}

html[data-caption-size] .sign-viewer--chat .sign-viewer__caption {
    font-size: calc(14px * var(--vvs-caption-scale));
}

html[data-caption-size] .sign-tile figcaption {
    font-size: calc(12px * var(--vvs-caption-scale));
}

html[data-caption-size] .pipeline-textarea {
    font-size: calc(14px * var(--vvs-caption-scale));
    line-height: 1.45;
}

@media (max-width: 640px) {
    html[data-caption-size] .sign-viewer__caption {
        font-size: calc(14px * var(--vvs-caption-scale));
    }

    html[data-caption-size] .sign-tile figcaption {
        font-size: calc(11px * var(--vvs-caption-scale));
    }

    html[data-font-size="large"],
    html[data-font-size="xlarge"] {
        --vvs-text-zoom: 1.08;
    }
}

.vvs-visual-alert {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: rgba(56, 189, 248, 0.22);
    opacity: 0;
    z-index: 4000;
}

.vvs-visual-alert.is-on {
    animation: vvs-visual-flash 0.7s ease;
}

@keyframes vvs-visual-flash {
    0% { opacity: 0; }
    20% { opacity: 1; }
    100% { opacity: 0; }
}

/* ── Burger (Uiverse.io by JulanDeAlb), no button plate ── */
.vvs-burger {
    cursor: pointer;
    color: var(--text-primary);
    background: transparent;
    border: 0;
    box-shadow: none;
}

[data-theme="dark"] .vvs-burger {
    color: #ffffff;
}

.vvs-burger svg.vvs-burger__icon {
    width: 28px;
    height: 28px;
    display: block;
    overflow: visible;
    background: transparent;
    transition: transform 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-toggle.vvs-burger svg.vvs-burger__icon,
.maxton-icon-btn.vvs-burger svg.vvs-burger__icon,
.chat-header-toggle.vvs-burger svg.vvs-burger__icon {
    width: 22px;
    height: 22px;
}

.vvs-burger__line {
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 3;
    transition: stroke-dasharray 600ms cubic-bezier(0.4, 0, 0.2, 1),
                stroke-dashoffset 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

.vvs-burger__line--tb {
    stroke-dasharray: 12 63;
}

.vvs-burger.is-open svg.vvs-burger__icon {
    transform: rotate(-45deg);
}

.vvs-burger.is-open .vvs-burger__line--tb {
    stroke-dasharray: 20 300;
    stroke-dashoffset: -32.42px;
}

/* ── Smooth sidebar open / close ── */
@media (min-width: 1025px) {
    .sidebar {
        transition: width 420ms cubic-bezier(0.4, 0, 0.2, 1),
                    min-width 420ms cubic-bezier(0.4, 0, 0.2, 1),
                    border-color 420ms ease;
    }

    .sidebar > * {
        min-width: 260px;
        transition: opacity 240ms ease 140ms;
    }

    .sidebar.collapsed > * {
        opacity: 0;
        transition: opacity 160ms ease;
    }

    body .maxton-sidebar {
        transition: margin-left 420ms cubic-bezier(0.4, 0, 0.2, 1),
                    transform 420ms cubic-bezier(0.4, 0, 0.2, 1);
    }
}

@media (max-width: 1024px) {
    .sidebar,
    .sidebar.collapsed,
    body .maxton-sidebar {
        transition: transform 420ms cubic-bezier(0.32, 0.72, 0, 1),
                    box-shadow 420ms ease;
    }

    .sidebar.collapsed:not(.is-drawer-open),
    body .maxton-sidebar:not(.is-drawer-open) {
        box-shadow: none;
    }

    .sidebar-backdrop {
        transition: opacity 380ms ease, visibility 380ms ease;
    }
}

@media (prefers-reduced-motion: reduce) {
    .vvs-burger svg.vvs-burger__icon,
    .vvs-burger__line,
    .menu__icon span,
    .sidebar,
    .sidebar > *,
    body .maxton-sidebar,
    .nav-links {
        transition: none !important;
    }
}

/* ── Email verification page ── */
.verify-body {
    padding: 24px 16px 48px;
}

.verify-card {
    max-width: 440px;
    padding: 36px 32px 28px;
    align-items: center;
    text-align: center;
}

.verify-card__icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin-bottom: 18px;
    border-radius: 20px;
    color: var(--accent);
    background: var(--accent-light);
    border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}

.verify-card__icon svg {
    width: 30px;
    height: 30px;
}

.verify-card__title {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.4px;
    color: var(--text-primary);
}

.verify-card__copy {
    margin: 0 0 24px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-secondary);
    overflow-wrap: anywhere;
}

.verify-card__copy strong {
    color: var(--text-primary);
    font-weight: 700;
}

.verify-form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
}

.verify-form .form-message {
    text-align: left;
}

.otp-boxes {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.otp-boxes__gap {
    width: 6px;
    height: 2px;
    border-radius: 2px;
    background: var(--border);
}

.otp-box {
    width: 48px;
    height: 56px;
    flex: 0 1 48px;
    min-width: 0;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font: 700 22px/1 var(--font);
    text-align: center;
    caret-color: var(--accent);
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.otp-box:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
    background: var(--bg-primary);
}

.otp-box.is-invalid {
    border-color: var(--error);
}

.verify-form__hint {
    margin: 0 0 20px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-tertiary);
}

.verify-form__submit {
    width: 100%;
}

.verify-form__resend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 4px 6px;
    margin-top: 16px;
    font-size: 13px;
    color: var(--text-secondary);
}

.verify-link {
    padding: 0;
    border: 0;
    background: none;
    color: var(--accent);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.verify-link:disabled {
    color: var(--text-tertiary);
    cursor: default;
}

.verify-form__timer {
    font-variant-numeric: tabular-nums;
    color: var(--text-tertiary);
}

.verify-form__actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.verify-secondary {
    min-height: 42px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: transparent;
    color: var(--text-primary);
    font: 600 13px/1.2 var(--font);
    cursor: pointer;
    transition: border-color var(--transition), color var(--transition), background var(--transition);
}

.verify-secondary:hover,
.verify-secondary:focus-visible {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-light);
}

@media (max-width: 420px) {
    .verify-card {
        padding: 28px 18px 22px;
    }

    .otp-boxes {
        gap: 6px;
    }

    .otp-box {
        height: 50px;
        font-size: 20px;
        border-radius: 10px;
    }

    .otp-boxes__gap {
        width: 4px;
    }
}

/* ── Dashboard reminder to verify email ── */
.verify-reminder {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 10px 16px 0;
    padding: 10px 12px 10px 14px;
    border: 1px solid rgba(245, 158, 11, 0.4);
    border-radius: 12px;
    background: rgba(245, 158, 11, 0.1);
    color: var(--text-primary);
    font-size: 13px;
    line-height: 1.4;
}

.verify-reminder__text {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
}

.verify-reminder__text strong {
    color: #f59e0b;
}

.verify-reminder__btn {
    flex-shrink: 0;
    padding: 7px 12px;
    border: 0;
    border-radius: 9px;
    background: var(--accent);
    color: #1a120c;
    font: 700 12px/1 var(--font);
    cursor: pointer;
}

.verify-reminder__close {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.verify-reminder__close:hover {
    background: var(--bg-hover);
}

.verify-reminder.is-locked,
.vvs-quota.is-locked {
    border-color: rgba(239, 68, 68, 0.45);
    background: rgba(239, 68, 68, 0.1);
}

.verify-reminder.is-locked .verify-reminder__text strong,
.vvs-quota.is-locked .vvs-quota__text strong,
.vvs-quota.is-locked .vvs-quota__icon {
    color: #ef4444;
}

/* ── Free-plan session bar ── */
.vvs-quota {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 16px 0;
    padding: 9px 10px 9px 14px;
    border: 1px solid rgba(217, 119, 6, 0.35);
    border-radius: 12px;
    background: rgba(217, 119, 6, 0.08);
    color: var(--text-primary);
    font-size: 13px;
    line-height: 1.4;
}

.vvs-quota__icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    color: var(--accent);
}

.vvs-quota__text {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
}

.vvs-quota__text strong {
    color: var(--accent);
}

.vvs-quota__btn {
    flex-shrink: 0;
    padding: 7px 14px;
    border: 0;
    border-radius: 9px;
    background: var(--accent);
    color: #1a120c;
    font: 700 12px/1 var(--font);
    cursor: pointer;
}

.vvs-quota__btn:hover {
    filter: brightness(1.08);
}

@media (max-width: 560px) {
    .vvs-quota,
    .verify-reminder {
        margin: 8px 10px 0;
        font-size: 12px;
        gap: 8px;
    }

    .vvs-quota__icon {
        display: none;
    }
}

/* ── Peso prices stay on one line ── */
.uiverse-price {
    white-space: nowrap;
    font-size: clamp(22px, 2.2vw + 10px, 28px);
}

.uiverse-price__period {
    white-space: normal;
}
