:root {
    --bg-color: #000000;
    --card-bg: rgba(10, 10, 10, 0.8);
    /* increased opacity for readability over matrix */
    --text-primary: #ffffff;
    --text-secondary: #aaaaaa;

    --brand-yellow: #FFFC00;
    --brand-green: #42f57b;
    --brand-text: #000000;

    --accent-primary: var(--brand-yellow);
    --border-color: #333333;
    --font-main: 'Inter', sans-serif;
    --modal-bg: rgba(10, 10, 10, 0.98);

    --hover-border: rgba(255, 252, 0, 0.88);
    --hover-border-soft: rgba(255, 252, 0, 0.62);
    --hover-glow: 0 0 16px rgba(255, 252, 0, 0.34);
    --hover-bg: rgba(255, 252, 0, 0.11);
    --hover-bg-strong: rgba(255, 252, 0, 0.16);
    --interactive-transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease, transform 0.18s ease, opacity 0.18s ease;

    /* Saved classic spaces viewport background — restore with .spaces-viewport-bg-classic on #spaces-viewport */
    --spaces-viewport-bg-classic:
        radial-gradient(circle at 22% 16%, rgba(255, 252, 0, 0.09), transparent 40%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(0, 0, 0, 0.22));
    --spaces-viewport-bg-landing-demo:
        linear-gradient(180deg, rgba(12, 16, 22, 0.94), rgba(6, 8, 12, 0.98)),
        repeating-linear-gradient(
            0deg,
            rgba(255, 255, 255, 0.018) 0,
            rgba(255, 255, 255, 0.018) 1px,
            transparent 1px,
            transparent 24px
        );
}

html[data-theme="light"] {
    color-scheme: light;
    --bg-color: #f4f4f0;
    --card-bg: rgba(255, 255, 255, 0.94);
    --text-primary: #141414;
    --text-secondary: #5f5f57;
    --border-color: #d4d4cc;
    --modal-bg: rgba(255, 255, 255, 0.98);
    --hover-border: rgba(154, 147, 0, 0.72);
    --hover-border-soft: rgba(154, 147, 0, 0.42);
    --hover-glow: 0 0 16px rgba(154, 147, 0, 0.16);
    --hover-bg: rgba(255, 252, 0, 0.18);
    --hover-bg-strong: rgba(255, 252, 0, 0.26);
    --spaces-viewport-bg-classic:
        radial-gradient(circle at 22% 16%, rgba(255, 252, 0, 0.12), transparent 40%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(236, 236, 230, 0.92));
    --spaces-viewport-bg-landing-demo:
        linear-gradient(180deg, rgba(248, 248, 244, 0.96), rgba(236, 236, 230, 0.98)),
        repeating-linear-gradient(
            0deg,
            rgba(20, 20, 20, 0.03) 0,
            rgba(20, 20, 20, 0.03) 1px,
            transparent 1px,
            transparent 24px
        );
}

html[data-theme="light"] #matrix {
    opacity: 0.12;
}

html[data-theme="light"].brand-arvis,
html[data-theme="light"].arvis-app-route {
    --brand-yellow: #141414;
    --brand-green: #166534;
    --accent-primary: #141414;
}

html[data-theme="light"] .nav-links a,
html[data-theme="light"] .nav-text-btn {
    color: var(--text-primary);
}

html[data-theme="light"] .settings-item,
html[data-theme="light"] .settings-section {
    background: rgba(255, 255, 255, 0.72);
    border-color: var(--border-color);
}

html[data-theme="light"] .settings-section-title,
html[data-theme="light"] .settings-item label {
    color: var(--text-secondary);
}

html[data-theme="light"] .settings-item div,
html[data-theme="light"] .settings-panel-head h3,
html[data-theme="light"] .ideas-bugs-header h3,
html[data-theme="light"] .user-stats-header h3 {
    color: var(--text-primary);
}

html[data-theme="light"] .settings-subtle,
html[data-theme="light"] .ideas-bugs-subtitle,
html[data-theme="light"] .user-stats-subtitle {
    color: var(--text-secondary);
}

html[data-theme="light"] .settings-input {
    background: rgba(255, 255, 255, 0.92);
    border-color: var(--border-color);
    color: var(--text-primary);
}

html[data-theme="light"] .playground-container {
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 24px 60px rgba(20, 20, 20, 0.12);
}

html[data-theme="light"] .agent-sidebar {
    background: rgba(248, 248, 244, 0.92);
}

html[data-theme="light"] .sidebar-title,
html[data-theme="light"] .sidebar-create-btn {
    color: #6b6400;
}

html[data-theme="light"] .sidebar-create-btn {
    border-color: rgba(154, 147, 0, 0.35);
    background: rgba(255, 252, 0, 0.12);
}

html[data-theme="light"] .sidebar-resizer {
    background: linear-gradient(180deg, rgba(20, 20, 20, 0.04), rgba(20, 20, 20, 0.02));
    border-color: rgba(20, 20, 20, 0.08);
}

html[data-theme="light"] .sidebar-resizer::after {
    background: rgba(20, 20, 20, 0.18);
}

html[data-theme="light"] .office-main-view {
    background-image: radial-gradient(circle at 50% 50%, rgba(255, 252, 0, 0.08) 0%, transparent 80%);
}

html[data-theme="light"] #office-canvas-host {
    border-color: var(--border-color);
    background:
        radial-gradient(circle at 25% 15%, rgba(255, 252, 0, 0.12), transparent 38%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(236, 236, 230, 0.92));
}

html[data-theme="light"] .office-chat-dock {
    background: rgba(255, 255, 255, 0.92);
    border-color: var(--border-color);
}

html[data-theme="light"] .office-chat-transcript {
    background: rgba(244, 244, 240, 0.92);
    border-color: var(--border-color);
}

html[data-theme="light"] .office-chat-empty,
html[data-theme="light"] .office-chat-line {
    color: var(--text-secondary);
}

html[data-theme="light"] .modal-content {
    background: var(--modal-bg);
    color: var(--text-primary);
    box-shadow: 0 24px 60px rgba(20, 20, 20, 0.16);
}

html[data-theme="light"] .clawground-boot-loader {
    background: rgba(244, 244, 240, 0.94);
}

html[data-theme="light"].brand-arvis .text-highlight,
html[data-theme="light"].arvis-app-route .text-highlight {
    color: #141414;
    text-shadow: none;
}

html[data-theme="light"] .agent-item,
html[data-theme="light"] .composer-shell,
html[data-theme="light"] .chat-composer,
html[data-theme="light"] .workspace-composer {
    background: rgba(255, 255, 255, 0.88);
    border-color: var(--border-color);
    color: var(--text-primary);
}

html[data-theme="light"] .agent-item h4,
html[data-theme="light"] .agent-item p,
html[data-theme="light"] .agent-sidebar-title,
html[data-theme="light"] .agent-sidebar-hint {
    color: var(--text-primary);
}

html[data-theme="light"] .agent-sidebar-hint {
    color: var(--text-secondary);
}

html[data-theme="light"] .chat-messages {
    background-image: radial-gradient(circle at 50% 50%, rgba(255, 252, 0, 0.06) 0%, transparent 80%);
}

html[data-theme="light"] .chat-input-area {
    background: rgba(255, 255, 255, 0.92);
}

html[data-theme="light"] .chat-input-area input,
html[data-theme="light"] textarea,
html[data-theme="light"] select {
    color: var(--text-primary);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Matrix Background Canvas */
#matrix {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    opacity: 0.35;
    /* Subtle enough to read text over */
    filter: drop-shadow(0 0 0 rgba(255, 252, 0, 0));
    transition: opacity 0.25s ease, filter 0.25s ease;
}

#matrix-pulse {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

#matrix-pulse::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(70vw, 760px);
    height: min(70vw, 760px);
    transform: translate(-50%, -50%) scale(0.92);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 252, 0, 0.2) 0%, rgba(255, 252, 0, 0.09) 36%, rgba(255, 252, 0, 0.03) 58%, transparent 74%);
    opacity: 0;
    filter: blur(6px);
}

body.matrix-thinking #matrix {
    opacity: 0.5;
    filter: drop-shadow(0 0 16px rgba(255, 252, 0, 0.55));
    animation: matrixThinkingGlow 1.05s ease-in-out infinite;
}

body.matrix-thinking #matrix-pulse {
    opacity: 1;
}

body.matrix-thinking #matrix-pulse::before {
    opacity: 0.55;
    animation: matrixPulseHalo 1.2s ease-in-out infinite;
}

@keyframes matrixThinkingGlow {
    0% {
        opacity: 0.44;
        filter: drop-shadow(0 0 10px rgba(255, 252, 0, 0.34));
    }

    50% {
        opacity: 0.56;
        filter: drop-shadow(0 0 19px rgba(255, 252, 0, 0.66));
    }

    100% {
        opacity: 0.44;
        filter: drop-shadow(0 0 10px rgba(255, 252, 0, 0.34));
    }
}

@keyframes matrixPulseHalo {
    0% {
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 0.34;
    }

    50% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.55;
    }

    100% {
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 0.34;
    }
}

/* Ensure content is above canvas */
.container {
    position: relative;
    z-index: 10;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Typography Highlights */
.text-highlight {
    color: var(--brand-yellow);
    font-weight: 800;
    text-shadow: 0 0 10px rgba(255, 252, 0, 0.3);
}

/* Navigation */
.navbar {
    padding: 1.5rem 0;
    position: absolute;
    width: 100%;
    top: 0;
    z-index: 50;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--brand-yellow);
    text-decoration: none;
    letter-spacing: -0.04em;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(255, 252, 0, 0.5);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 700;
}

.nav-links a:hover {
    color: var(--brand-yellow);
}

.nav-text-btn {
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    padding: 0;
    line-height: 1;
    cursor: pointer;
    font-family: inherit;
    font-variant-ligatures: none;
    text-transform: none;
    transition: var(--interactive-transition);
}

.nav-text-btn:hover {
    color: var(--brand-yellow);
}

.nav-text-btn.active {
    color: var(--brand-yellow);
    font-weight: 800;
}

.navbar .nav-text-btn.pro-visible {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.15rem;
    min-height: 2.15rem;
    padding: 0.38rem;
    border-radius: 10px;
    border: 1px solid transparent;
    box-sizing: border-box;
}

.navbar .nav-text-btn.pro-visible.active {
    background: rgba(255, 252, 0, 0.11);
    border-color: rgba(255, 252, 0, 0.52);
    box-shadow:
        0 0 0 1px rgba(255, 252, 0, 0.22),
        0 0 16px rgba(255, 252, 0, 0.2);
}

body.is-authenticated #user-stats-btn.stats-admin-visible {
    display: inline-flex !important;
}

#global-fullscreen-btn,
#calendar-btn,
#spaces-btn,
#todo-btn,
#files-btn,
#arvis-inbox-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    line-height: 1;
}

/* Deferred navbar features — remove .nav-deferred from the button to restore */
.nav-deferred {
    display: none !important;
}

#files-btn {
    color: #f0ebe3;
}

#files-btn .nav-files-icon {
    width: 1.15em;
    height: 1.15em;
    display: block;
}

#files-btn:hover,
#files-btn.active {
    color: #fffdf8;
    text-shadow: 0 0 10px rgba(240, 235, 227, 0.4);
}

#files-btn.active {
    background: rgba(240, 235, 227, 0.12);
    border-color: rgba(240, 235, 227, 0.48);
}

#settings-btn {
    font-size: 1.82rem;
}

#economy-btn {
    font-size: 1.12rem;
    color: #ffd700;
    font-weight: 900;
}

#economy-btn:hover,
#economy-btn.active {
    color: var(--brand-yellow);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.45);
}

#economy-btn.active {
    background: rgba(255, 215, 0, 0.14);
    border-color: rgba(255, 252, 0, 0.55);
}

#todo-btn {
    color: var(--brand-green);
    font-weight: 900;
}

#todo-btn:hover,
#todo-btn.active {
    color: #67ff98;
    text-shadow: 0 0 10px rgba(66, 245, 123, 0.45);
}

#todo-btn.active {
    background: rgba(66, 245, 123, 0.14);
    border-color: rgba(66, 245, 123, 0.55);
}

#content-planner-btn {
    color: var(--brand-yellow);
    font-weight: 800;
}

#content-planner-btn:hover,
#content-planner-btn.active {
    color: #fff6a8;
    text-shadow: 0 0 10px rgba(255, 252, 0, 0.45);
}

#content-planner-btn.active {
    background: rgba(255, 252, 0, 0.14);
    border-color: rgba(255, 252, 0, 0.55);
}

.navbar .nav-links [data-nav-item] {
    user-select: none;
}

.navbar .nav-links [data-nav-item].nav-dragging {
    opacity: 0.55;
    filter: saturate(0.82);
}

/* Hero */
.hero {
    padding: 12rem 0 6rem;
    text-align: center;
}

.hero h1 {
    font-size: 5rem;
    font-weight: 900;
    line-height: 0.95;
    margin-bottom: 2rem;
    letter-spacing: -0.04em;
    color: white;
}

.hero p.subtitle {
    font-size: 1.5rem;
    color: #cccccc;
    max-width: 600px;
    margin: 0 auto 3rem;
    font-weight: 500;
}

/* Buttons */
.cta-group {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 2.5rem;
    border-radius: 99px;
    font-weight: 800;
    font-size: 1.1rem;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-primary {
    background-color: var(--brand-yellow);
    color: var(--brand-text);
    box-shadow: 0 0 25px rgba(255, 252, 0, 0.5);
    /* Stronger glow */
}

.btn-primary:hover {
    transform: scale(1.05);
    background-color: white;
    box-shadow: 0 0 35px rgba(255, 255, 255, 0.6);
}

.btn-secondary {
    background: rgba(0, 0, 0, 0.5);
    /* Semi-transparent background */
    color: white;
    border: 2px solid white;
    backdrop-filter: blur(4px);
}

.btn-secondary:hover {
    background: white;
    color: black;
}

.btn-danger {
    background: rgba(255, 70, 70, 0.14);
    color: #ffb3b3;
    border: 1px solid rgba(255, 80, 80, 0.55);
}

.btn-danger:hover {
    background: rgba(255, 70, 70, 0.26);
    color: #ffd9d9;
}

.nav-highlight {
    background: var(--brand-yellow);
    color: black !important;
    padding: 0.5rem 1rem;
    border-radius: 99px;
    font-weight: 800 !important;
    text-transform: uppercase;
    font-size: 0.8rem !important;
    transition: var(--interactive-transition);
}

/* Maker Section */
.maker-section {
    padding: 6rem 0;
}

.maker-card {
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 252, 0, 0.2);
    border-radius: 40px;
    padding: 4rem;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}

.maker-header {
    text-align: center;
    margin-bottom: 3rem;
}

.maker-header h2 {
    font-size: 3rem;
    font-weight: 900;
}

.maker-header p {
    color: var(--text-secondary);
    font-weight: 500;
}

.creator-toggle {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.toggle-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #333;
    padding: 0.75rem 1.5rem;
    border-radius: 99px;
    color: white;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.toggle-btn.active {
    background: var(--brand-yellow);
    color: black;
    border-color: var(--brand-yellow);
    box-shadow: 0 0 15px rgba(255, 252, 0, 0.3);
}

.toggle-btn#toggle-claw.active {
    background: #FF3C00;
    border-color: #FF3C00;
    box-shadow: 0 0 15px rgba(255, 60, 0, 0.3);
}

.maker-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    color: var(--brand-yellow);
}

.form-group input,
.form-group textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid #333;
    padding: 1.25rem;
    border-radius: 15px;
    color: white;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.2s;
}

.form-group input:hover:not(:focus),
.form-group textarea:hover:not(:focus) {
    border-color: var(--hover-border-soft);
    background: rgba(255, 252, 0, 0.03);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--brand-yellow);
    background: rgba(255, 252, 0, 0.02);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.creator-result {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid #333;
    text-align: center;
    animation: fadeIn 0.5s ease-out;
}

.hidden {
    display: none !important;
}

.guest-visible.hidden,
.pro-visible.hidden {
    display: none !important;
}

/* Pro Dashboard Mode */
body.is-authenticated .guest-visible,
body.is-authenticated .hero,
body.is-authenticated .maker-section,
body.is-authenticated .use-cases-section,
body.is-authenticated .pricing-section {
    display: none !important;
}

/* JS controlled visibility failsafe */
body.is-authenticated #clawground {
    display: block !important;
}

body:not(.is-authenticated) .pro-visible {
    display: none !important;
}

.agent-item.add-new {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: 2px dashed rgba(255, 252, 0, 0.4);
    text-align: center;
    font-size: 1.5rem;
    color: var(--brand-yellow);
    opacity: 0.9;
    transition: all 0.3s ease;
}

.agent-item.add-new .add-new-label {
    font-size: 0.85rem;
    font-weight: 700;
}

.agent-item.add-new:hover {
    opacity: 1;
    background: rgba(255, 252, 0, 0.1);
    border-color: var(--brand-yellow);
    transform: translateY(-2px);
}

@keyframes inputPulse {
    0% {
        border-color: rgba(255, 252, 0, 0.2);
        box-shadow: 0 0 0px var(--brand-yellow);
    }

    50% {
        border-color: rgba(255, 252, 0, 1);
        box-shadow: 0 0 15px rgba(255, 252, 0, 0.4);
    }

    100% {
        border-color: rgba(255, 252, 0, 0.2);
        box-shadow: 0 0 0px var(--brand-yellow);
    }
}

.input-blink {
    animation: inputPulse 1.5s infinite ease-in-out !important;
}

.result-content h3 {
    color: var(--brand-yellow);
    margin-bottom: 1rem;
    font-style: italic;
    font-weight: 900;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

/* Use Cases Section */
.use-cases-section {
    padding: 6rem 0;
    background: linear-gradient(to bottom, #000, #111);
}

.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.use-case-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 3rem 2rem;
    border-radius: 30px;
    text-align: center;
    transition: all 0.3s ease;
}

.use-case-card:hover {
    background: rgba(255, 252, 0, 0.05);
    border-color: var(--brand-yellow);
    transform: translateY(-10px);
}

.use-case-image {
    font-size: 3rem;
    margin-bottom: 2rem;
    filter: drop-shadow(0 0 10px var(--brand-yellow));
}

.use-case-card h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: white;
}

.use-case-card p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
}

/* Ghost Avatar Glitch */
.ghost-avatar-container {
    width: 200px;
    height: 200px;
    margin: 0 auto 2rem;
    position: relative;
    background: rgba(255, 252, 0, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--brand-yellow);
    box-shadow: 0 0 30px rgba(255, 252, 0, 0.2);
    overflow: hidden;
}

.ghost-glitch {
    width: 100px;
    height: 100px;
    background: var(--brand-yellow);
    mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2C7.58 2 4 5.58 4 10v9h3v-2.12c0-.55.45-1 1-1s1 .45 1 1V21h6v-2.12c0-.55.45-1 1-1s1 .45 1 1V21h3v-9c0-4.42-3.58-8-8-8zm-3 9c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm6 0c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1z"/></svg>') center/contain no-repeat;
    -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2C7.58 2 4 5.58 4 10v9h3v-2.12c0-.55.45-1 1-1s1 .45 1 1V21h6v-2.12c0-.55.45-1 1-1s1 .45 1 1V21h3v-9c0-4.42-3.58-8-8-8zm-3 9c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm6 0c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1z"/></svg>') center/contain no-repeat;
    animation: glitchAnim 2s infinite linear alternate-reverse;
    filter: drop-shadow(0 0 15px var(--brand-yellow));
}

@keyframes glitchAnim {
    0% {
        transform: translate(0) scale(1);
        opacity: 1;
    }

    20% {
        transform: translate(-3px, 2px) scale(1.1);
        filter: hue-rotate(90deg);
    }

    40% {
        transform: translate(3px, -2px) scale(0.9);
        opacity: 0.8;
    }

    60% {
        transform: translate(-5px, -5px) scale(1.05);
        filter: contrast(2);
    }

    80% {
        transform: translate(5px, 5px) scale(0.95);
        opacity: 0.9;
    }

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

/* Claw Avatar Glitch */
.claw-avatar-container {
    width: 200px;
    height: 200px;
    margin: 0 auto 2rem;
    position: relative;
    background: rgba(255, 60, 0, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #FF3C00;
    box-shadow: 0 0 30px rgba(255, 60, 0, 0.2);
    overflow: hidden;
}

.claw-glitch {
    width: 80px;
    height: 80px;
    background: #FF3C00;
    mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2l2 2-2 2-2-2 2-2zm6 4c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zM6 6c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zm12 10c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zM6 16c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zm6 2l2 2-2 2-2-2 2-2z"/></svg>') center/contain no-repeat;
    -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2l2 2-2 2-2-2 2-2zm6 4c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zM6 6c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zm12 10c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zM6 16c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zm6 2l2 2-2 2-2-2 2-2z"/></svg>') center/contain no-repeat;
    animation: clawGlitch 1.5s infinite linear alternate-reverse;
    filter: drop-shadow(0 0 15px #FF3C00);
}

@keyframes clawGlitch {
    0% {
        transform: translate(0) rotate(0deg) scale(1);
        filter: hue-rotate(0deg);
    }

    33% {
        transform: translate(-5px, 3px) rotate(-10deg) scale(1.1);
        filter: hue-rotate(45deg);
        opacity: 0.8;
    }

    66% {
        transform: translate(5px, -3px) rotate(10deg) scale(0.9);
        filter: hue-rotate(-45deg);
        opacity: 0.9;
    }

    100% {
        transform: translate(0) rotate(0deg) scale(1);
        filter: hue-rotate(0deg);
    }
}

/* Features */
.features-section {
    padding: 4rem 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.feature-card {
    background: rgba(20, 20, 20, 0.85);
    /* Semi-transparent */
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 20px;
    transition: transform 0.2s;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--brand-yellow);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.feature-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
    font-weight: 800;
    color: white;
}

.feature-card p {
    color: #999;
    font-size: 0.95rem;
    line-height: 1.4;
    font-weight: 500;
}

/* Pricing */
.pricing-section {
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    letter-spacing: -0.03em;
}

.section-title {
    font-size: 3.5rem;
    font-weight: 900;
    text-align: center;
    margin-bottom: 3rem;
    letter-spacing: -0.03em;
    text-transform: uppercase;
}


.pricing-grid {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    max-width: 1240px;
    margin: 0 auto;
}

.pricing-card {
    background: rgba(17, 17, 17, 0.9);
    backdrop-filter: blur(16px);
    border: 2px solid #333;
    border-radius: 30px;
    padding: 2.5rem;
    width: 360px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.pricing-card.featured {
    border-color: var(--brand-yellow);
    background: rgba(0, 0, 0, 0.9);
    box-shadow: 0 0 20px rgba(255, 252, 0, 0.15);
}

.popular-tag {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--brand-yellow);
    color: black;
    padding: 0.5rem;
    text-align: center;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.card-header {
    margin-bottom: 2rem;
    margin-top: 1rem;
    text-align: center;
}

.card-header h3 {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    font-style: italic;
}

.price {
    font-size: 4rem;
    font-weight: 900;
    color: white;
    letter-spacing: -0.03em;
    line-height: 1;
}

.period {
    font-size: 1rem;
    color: #666;
    font-weight: 700;
    text-transform: uppercase;
}

.divider {
    height: 2px;
    background: #333;
    margin: 1.5rem 0;
}

.card-features li {
    margin-bottom: 1rem;
    color: #ccc;
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 1rem;
}

.check-icon {
    color: var(--brand-yellow);
    margin-right: 1rem;
    font-weight: 900;
    font-size: 1.2rem;
}

.btn-outline {
    background: transparent;
    border: 3px solid #333;
    color: white;
}

.pricing-card .btn {
    width: 100%;
}

.btn-outline:hover {
    border-color: white;
    background: white;
    color: black;
}

.full-width {
    width: 100%;
}

/* Footer */
/* Chat Specific Styles */
.chat-msg {
    margin-bottom: 0.8rem;
    padding: 0.8rem;
    border-radius: 8px;
    max-width: 85%;
    line-height: 1.4;
    font-size: 0.95rem;
    position: relative;
    animation: fadeInMsg 0.3s ease-out;
}

.chat-msg.system {
    color: #666;
    font-style: italic;
    background: transparent;
    padding: 0;
    margin-bottom: 1.5rem;
}

.chat-msg.user {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-msg.claw {
    background: rgba(255, 252, 0, 0.1);
    color: white;
    margin-right: auto;
    border-bottom-left-radius: 0;
    border: 1px solid rgba(255, 252, 0, 0.2);
}


.chat-msg.user::before {
    content: "YOU";
    display: block;
    font-size: 0.7rem;
    font-weight: 900;
    color: #888;
    margin-bottom: 0.3rem;
    letter-spacing: 0.05em;
}



.chat-msg .meta {
    display: block;
    font-size: 0.65rem;
    color: #555;
    margin-top: 0.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.chat-time {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.3);
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
}

.btn-update {
    background: #ffffff !important;
    color: #000000 !important;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

@keyframes fadeInMsg {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

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

/* Thinking Indicator */
.chat-msg.thinking {
    font-style: italic;
    color: var(--brand-yellow);
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding-left: 0 !important;
    margin-top: 5px !important;
    opacity: 0.8;
}

.thinking-dots {
    display: inline-flex;
    align-items: baseline;
    gap: 0;
    white-space: nowrap;
}

.thinking-dots::before {
    content: "Thinking";
    display: inline-block;
    white-space: nowrap;
    margin-right: 0.05em;
}

.thinking-dots::after {
    content: "";
    display: inline-block;
    min-width: 3ch;
    text-align: left;
    white-space: nowrap;
    animation: dotsCycle 1.2s steps(1, end) infinite;
}

@keyframes dotsCycle {
    0%,
    20% {
        content: "";
    }

    21%,
    45% {
        content: ".";
    }

    46%,
    70% {
        content: "..";
    }

    71%,
    95% {
        content: "...";
    }

    96%,
    100% {
        content: "";
    }
}

@keyframes thinkingPulse {
    0% {
        opacity: 0.4;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.4;
    }
}

/* Auth & Modal Styles */
.btn-login {
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border: 1px solid #444;
    border-radius: 8px;
    transition: all 0.2s;
}

.btn-login:hover {
    border-color: var(--brand-yellow);
    color: var(--brand-yellow);
}

.settings-btn {
    border-radius: 8px;
    border: 1px solid #444;
    background: transparent;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.2;
    padding: 0.5rem 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.settings-btn:hover {
    border-color: var(--brand-yellow);
    color: var(--brand-yellow);
    box-shadow: 0 0 16px rgba(255, 252, 0, 0.35);
}

.book-call-btn {
    font-size: 0.78rem;
    padding: 0.34rem 0.62rem;
    border-radius: 7px;
    line-height: 1.1;
}

.user-display {
    font-size: 0.85rem;
    color: #888;
    font-weight: 600;
}

.settings-item {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 0.7rem 0.85rem;
    margin-bottom: 0.5rem;
    background: rgba(255, 255, 255, 0.02);
}

.settings-section {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 0.75rem;
    margin-bottom: 0.8rem;
    background: rgba(255, 255, 255, 0.015);
}

.settings-section-title {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #b7b7b7;
    margin-bottom: 0.55rem;
}

.settings-item label {
    display: block;
    font-size: 0.68rem;
    color: #9a9a9a;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.settings-item div {
    font-size: 0.85rem;
    color: #e8e8e8;
    word-break: break-all;
}

.settings-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 0.75rem;
}

.settings-actions-compact {
    justify-content: flex-start;
    margin-top: 0.25rem;
}

.settings-actions .btn {
    min-height: 22px;
    padding: 0.45rem 0.72rem;
    font-size: 0.7rem;
    letter-spacing: 0.03em;
}

.settings-field-row {
    display: flex;
    gap: 0.55rem;
    margin: 0.45rem 0 0.45rem;
    align-items: center;
}

.settings-input {
    flex: 1;
    min-width: 0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: #fff;
    padding: 0.55rem 0.75rem;
    font-size: 0.82rem;
    transition: var(--interactive-transition);
}

.settings-input:hover:not(:focus) {
    border-color: var(--hover-border-soft);
    background: rgba(255, 252, 0, 0.03);
}

.settings-input:focus {
    outline: none;
    border-color: var(--brand-yellow);
    box-shadow: 0 0 0 2px rgba(255, 252, 0, 0.15);
}

#settings-completion-sound-file {
    color: #eaeaea;
}

#settings-completion-sound-file::file-selector-button,
#settings-completion-sound-file::-webkit-file-upload-button {
    background: #1b1b1b;
    color: #f5f5f5;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 8px;
    padding: 0.4rem 0.7rem;
    margin-right: 0.55rem;
    font-size: 0.74rem;
    font-weight: 700;
    cursor: pointer;
}

#settings-completion-sound-file::file-selector-button:hover,
#settings-completion-sound-file::-webkit-file-upload-button:hover {
    border-color: var(--brand-yellow);
    color: var(--brand-yellow);
}

.integration-list {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.45rem;
}

.integration-row {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.5rem;
}

.integration-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.76rem;
    color: #d5d5d5;
}

.integration-toggle input[type="checkbox"] {
    margin: 0;
}

.integration-target-input {
    min-width: 0;
}

.integration-save-row {
    margin-top: 0.3rem;
}

.settings-inline-btn {
    min-width: 104px;
    max-width: 180px;
    width: auto;
    white-space: nowrap;
    padding: 0.5rem 0.65rem;
    font-size: 0.68rem;
}

.settings-inline-btn.active {
    border-color: rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.12);
}

.settings-test-sound-btn {
    min-width: 88px;
    max-width: 132px;
    padding: 0.36rem 0.55rem;
    font-size: 0.62rem;
    letter-spacing: 0.03em;
}

.settings-feedback {
    font-size: 0.78rem;
    margin-bottom: 0.65rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 9px;
    padding: 0.45rem 0.6rem;
    color: #e7e7e7;
}

.settings-feedback.error {
    border-color: rgba(255, 100, 100, 0.45);
    color: #ffb1b1;
}

.settings-feedback.success {
    border-color: rgba(120, 255, 140, 0.4);
    color: #baffc4;
}

.booking-modal-content {
    width: min(94vw, 900px);
    max-width: 900px;
    max-height: 88vh;
    overflow-y: auto;
    padding: 2rem 1.6rem 1.2rem;
}

.booking-subtle {
    color: #a7a7a7;
    font-size: 0.78rem;
}

.booking-grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 0.9rem;
    margin-top: 0.7rem;
}

.booking-calendar-wrap,
.booking-form-wrap {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    padding: 0.7rem;
}

.booking-calendar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    margin-bottom: 0.55rem;
}

#booking-timezone-label {
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.booking-slots {
    display: grid;
    gap: 0.55rem;
    max-height: 50vh;
    overflow-y: auto;
    padding-right: 0.12rem;
}

.booking-day {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 0.55rem;
    background: rgba(15, 15, 15, 0.65);
}

.booking-day-title {
    font-size: 0.74rem;
    color: #c2c2c2;
    margin-bottom: 0.45rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.booking-day-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.booking-slot-btn {
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.02);
    color: #f2f2f2;
    border-radius: 999px;
    padding: 0.34rem 0.62rem;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.booking-slot-btn:hover {
    border-color: rgba(255, 252, 0, 0.65);
    color: var(--brand-yellow);
}

.booking-slot-btn.selected {
    border-color: rgba(255, 252, 0, 0.78);
    background: rgba(255, 252, 0, 0.18);
    color: #fff;
    box-shadow: 0 0 0 1px rgba(255, 252, 0, 0.18) inset;
}

#booking-notes {
    min-height: 84px;
}

.booking-selected {
    margin-top: 0.55rem;
    color: #cfcfcf;
    font-size: 0.78rem;
    border: 1px dashed rgba(255, 255, 255, 0.16);
    border-radius: 10px;
    padding: 0.45rem 0.55rem;
}

.settings-subtle {
    margin-top: 0.15rem;
    font-size: 0.74rem;
    color: #a3a3a3;
    word-break: break-all;
}

.settings-panel {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
    display: flex;
    justify-content: center;
}

.settings-panel-wrap {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
}

.settings-panel-head h3 {
    margin: 0 0 1rem;
    font-size: 1.15rem;
    color: #f5f5f5;
}

.settings-panel-body {
    padding: 0;
}

.ideas-bugs-panel {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
    display: flex;
    justify-content: center;
}

.ideas-bugs-panel-wrap {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
}

.ideas-bugs-panel-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 900px) {
    .ideas-bugs-panel-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .ideas-bugs-list-section {
        padding-top: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
}

.ideas-bugs-compose-col {
    min-width: 0;
}

.ideas-bugs-header h3 {
    margin: 0 0 0.35rem;
    font-size: 1.15rem;
    color: #f5f5f5;
}

.ideas-bugs-subtitle {
    margin: 0 0 1rem;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.85rem;
    line-height: 1.45;
}

.user-stats-panel {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
    display: flex;
    justify-content: center;
}

.user-stats-panel-wrap {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
}

.user-stats-header h3 {
    margin: 0 0 0.35rem;
    font-size: 1.15rem;
    color: #f5f5f5;
}

.user-stats-subtitle {
    margin: 0 0 1rem;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.85rem;
    line-height: 1.45;
}

.user-stats-feedback {
    min-height: 1.1rem;
    margin-bottom: 0.75rem;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.82rem;
}

.user-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.user-stats-card {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.85rem 0.95rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.user-stats-card span {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.62);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.user-stats-card strong {
    font-size: 1.35rem;
    color: #fff8c2;
}

.user-stats-meta {
    margin: 0 0 1rem;
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.76rem;
}

.user-stats-charts {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.user-stats-charts .usage-chart {
    height: 220px;
}

.user-stats-table-wrap {
    overflow-x: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.user-stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
}

.user-stats-table th,
.user-stats-table td {
    padding: 0.55rem 0.7rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-align: left;
    vertical-align: top;
}

.user-stats-table th {
    color: rgba(255, 255, 255, 0.72);
    font-weight: 700;
    background: rgba(255, 255, 255, 0.03);
}

.user-stats-sub {
    margin-top: 0.2rem;
    font-size: 0.68rem;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.52);
    max-width: 28rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-stats-activity,
.user-stats-path {
    display: inline-block;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
}

.user-stats-activity {
    color: rgba(255, 252, 0, 0.82);
    font-size: 0.72rem;
}

.user-stats-path {
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.72rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.user-stats-table td {
    vertical-align: top;
}

.user-stats-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
}

.user-stats-actions .btn {
    padding: 0.4rem 0.85rem;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    box-shadow: 0 0 10px rgba(255, 252, 0, 0.28);
}

.user-stats-actions .btn-primary:hover {
    box-shadow: 0 0 14px rgba(255, 255, 255, 0.35);
    transform: scale(1.02);
}

.user-stats-section {
    margin-top: 1.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-stats-section-head h4 {
    margin: 0 0 0.25rem;
    font-size: 0.95rem;
    color: #f5f5f5;
}

.user-stats-section-head p {
    margin: 0 0 0.85rem;
    font-size: 0.74rem;
    color: rgba(255, 255, 255, 0.58);
    line-height: 1.4;
}

.user-stats-grid-waitlist {
    margin-bottom: 1rem;
}

.user-stats-waitlist-table td.user-stats-waitlist-email {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.74rem;
    word-break: break-all;
}

.user-stats-charts .usage-bar.waitlist-bar {
    background: linear-gradient(180deg, rgba(120, 196, 255, 0.95), rgba(66, 132, 255, 0.82));
}

.user-stats-charts .waitlist-growth-line {
    stroke: rgba(120, 196, 255, 0.95);
}

.user-stats-charts .waitlist-growth-area {
    fill: rgba(66, 132, 255, 0.18);
}

.user-stats-charts .waitlist-growth-dot {
    fill: rgba(120, 196, 255, 0.95);
}

.ideas-bugs-kind-toggle {
    display: inline-flex;
    gap: 0.45rem;
    margin-bottom: 1rem;
    padding: 0.22rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ideas-bugs-kind-btn {
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.72);
    border-radius: 999px;
    padding: 0.38rem 0.85rem;
    font-size: 0.78rem;
    cursor: pointer;
}

.ideas-bugs-kind-btn.active {
    background: rgba(255, 252, 0, 0.16);
    color: #fff8c2;
    box-shadow: inset 0 0 0 1px rgba(255, 252, 0, 0.35);
}

.ideas-bugs-label {
    display: block;
    margin: 0.55rem 0 0.28rem;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.72);
}

.ideas-bugs-input,
.ideas-bugs-textarea {
    width: 100%;
    box-sizing: border-box;
}

.ideas-bugs-textarea {
    min-height: 140px;
    resize: vertical;
}

.ideas-bugs-help {
    margin: 0.35rem 0 0;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.55);
}

.ideas-bugs-feedback {
    margin-top: 0.75rem;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.78);
}

.ideas-bugs-feedback.error {
    color: #ff8f8f;
}

.ideas-bugs-feedback.success {
    color: #b8f5b1;
}

.ideas-bugs-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.55rem;
    margin-top: 1rem;
}

.ideas-bugs-actions .btn {
    padding: 0.55rem 1.1rem;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.ideas-bugs-actions .btn-primary {
    box-shadow: 0 0 14px rgba(255, 252, 0, 0.4);
}

.ideas-bugs-actions .btn-primary:hover {
    box-shadow: 0 0 18px rgba(255, 255, 255, 0.45);
}

.ideas-bugs-actions .btn:not(.btn-primary) {
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.ideas-bugs-actions .btn:not(.btn-primary):hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: none;
}

.ideas-bugs-list-section {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    min-width: 0;
}

.ideas-bugs-list-head h3 {
    margin: 0 0 0.25rem;
    font-size: 0.95rem;
}

.ideas-bugs-list-sub {
    margin: 0 0 0.85rem;
    font-size: 0.74rem;
    color: rgba(255, 255, 255, 0.58);
    line-height: 1.4;
}

.ideas-bugs-list-loading,
.ideas-bugs-list-empty {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.62);
    padding: 0.35rem 0 0.65rem;
}

.ideas-bugs-list {
    display: grid;
    gap: 0.65rem;
}

.ideas-bugs-item {
    display: flex;
    gap: 0.7rem;
    align-items: flex-start;
    padding: 0.75rem 0.8rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.ideas-bugs-upvote-btn {
    flex: 0 0 auto;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    padding: 0.35rem 0.4rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.82);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ideas-bugs-upvote-btn:hover:not(:disabled) {
    background: rgba(255, 252, 0, 0.12);
    border-color: rgba(255, 252, 0, 0.35);
    color: #fff8c2;
}

.ideas-bugs-upvote-btn.voted {
    background: rgba(255, 252, 0, 0.18);
    border-color: rgba(255, 252, 0, 0.45);
    color: #fff8c2;
    cursor: default;
}

.ideas-bugs-upvote-btn:disabled {
    opacity: 0.65;
    cursor: wait;
}

.ideas-bugs-upvote-icon {
    font-size: 0.62rem;
    line-height: 1;
}

.ideas-bugs-upvote-count {
    margin-top: 0.18rem;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1;
}

.ideas-bugs-item-main {
    min-width: 0;
    flex: 1 1 auto;
}

.ideas-bugs-item-head {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.2rem;
}

.ideas-bugs-item-kind {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255, 252, 0, 0.85);
}

.ideas-bugs-item-date {
    font-size: 0.66rem;
    color: rgba(255, 255, 255, 0.45);
}

.ideas-bugs-item-title {
    margin: 0 0 0.28rem;
    font-size: 0.88rem;
    line-height: 1.3;
}

.ideas-bugs-item-body {
    margin: 0;
    font-size: 0.76rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.68);
    white-space: pre-wrap;
}

.ideas-bugs-item-screenshot-wrap {
    margin-top: 0.55rem;
}

.ideas-bugs-screenshot-link {
    display: inline-block;
    max-width: 100%;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.35);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.ideas-bugs-screenshot-link:hover {
    border-color: rgba(255, 252, 0, 0.45);
    box-shadow: 0 0 0 1px rgba(255, 252, 0, 0.18);
    transform: translateY(-1px);
}

.ideas-bugs-item-screenshot,
.ideas-bugs-screenshot-preview img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 180px;
    object-fit: contain;
}

.ideas-bugs-item.has-screenshot .ideas-bugs-item-screenshot {
    max-height: 160px;
}

.ideas-bugs-screenshot-preview {
    margin-top: 0.45rem;
}

.ideas-bugs-screenshot-preview img {
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.35);
}

.ideas-bugs-item.is-addressed {
    border-color: rgba(66, 245, 123, 0.22);
    background: rgba(66, 245, 123, 0.05);
}

.ideas-bugs-item-addressed {
    margin: 0.45rem 0 0;
    font-size: 0.72rem;
    line-height: 1.45;
    color: rgba(190, 255, 210, 0.88);
}

.ideas-bugs-item-addressed-badge {
    display: inline-block;
    margin-right: 0.35rem;
    padding: 0.08rem 0.38rem;
    border-radius: 999px;
    background: rgba(66, 245, 123, 0.18);
    border: 1px solid rgba(66, 245, 123, 0.35);
    color: #9be49b;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    vertical-align: middle;
}

.ideas-bugs-screenshot-wrap {
    margin-top: 0.35rem;
}

.ideas-bugs-screenshot-dropzone {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
    padding: 0.55rem 0.65rem;
    border: 1px dashed rgba(255, 255, 255, 0.16);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    transition: border-color 0.15s ease, background 0.15s ease;
}

.ideas-bugs-screenshot-dropzone.is-dragover {
    border-color: rgba(255, 252, 0, 0.55);
    background: rgba(255, 252, 0, 0.06);
}

.ideas-bugs-screenshot-name {
    font-size: 0.74rem;
    color: rgba(255, 255, 255, 0.72);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ideas-bugs-screenshot-btn,
.ideas-bugs-screenshot-clear {
    padding: 0.35rem 0.65rem;
    font-size: 0.76rem;
}

.todo-list {
    margin-top: 0.5rem;
    display: grid;
    gap: 0.5rem;
    max-height: 320px;
    overflow-y: auto;
}

#todo-modal .todo-modal-content {
    width: min(92vw, 760px);
    max-width: 760px;
    max-height: 86vh;
    overflow-y: auto;
    padding: 1.5rem 1.4rem 1.1rem;
    border-radius: 20px;
}

#todo-modal h2 {
    margin-bottom: 0.35rem;
}

.todo-compose-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 170px 185px auto;
    gap: 0.6rem;
    align-items: center;
    margin-bottom: 0.65rem;
}

.todo-task-input {
    min-width: 0;
}

.todo-assignee-select {
    min-width: 160px;
    -webkit-appearance: none;
    appearance: none;
    padding-right: 1.9rem;
    background-image: linear-gradient(45deg, transparent 50%, #b8b8b8 50%), linear-gradient(135deg, #b8b8b8 50%, transparent 50%);
    background-position: calc(100% - 15px) calc(50% - 3px), calc(100% - 9px) calc(50% - 3px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.todo-filter-row {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.65rem;
}

.todo-filter-row label {
    font-size: 0.7rem;
    color: #b8b8b8;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.todo-filter-select {
    min-width: 180px;
    max-width: 320px;
    -webkit-appearance: none;
    appearance: none;
    padding-right: 1.9rem;
    background-image: linear-gradient(45deg, transparent 50%, #b8b8b8 50%), linear-gradient(135deg, #b8b8b8 50%, transparent 50%);
    background-position: calc(100% - 15px) calc(50% - 3px), calc(100% - 9px) calc(50% - 3px);
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.todo-deadline-input {
    min-width: 0;
}

.todo-share-row {
    display: grid;
    grid-template-columns: auto minmax(180px, 280px);
    gap: 0.55rem 0.75rem;
    align-items: start;
    margin-bottom: 0.65rem;
}

.todo-share-row label {
    font-size: 0.7rem;
    color: #b8b8b8;
    letter-spacing: 0.04em;
    padding-top: 0.45rem;
}

.todo-share-select {
    min-height: 4.6rem;
}

.todo-share-hint {
    grid-column: 2;
    margin: 0;
    font-size: 0.68rem;
    color: #8f8f8f;
    line-height: 1.35;
}

.todo-shared-meta {
    color: #7c9cff;
    font-size: 0.72rem;
}

.todo-add-btn {
    min-width: 92px;
    padding: 0.55rem 0.9rem;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    background: var(--brand-green);
    color: #041b0a;
    border: 1px solid rgba(66, 245, 123, 0.88);
    box-shadow: 0 0 12px rgba(66, 245, 123, 0.28);
}

.todo-add-btn:hover {
    background: #67ff98;
    border-color: #67ff98;
    box-shadow: 0 0 14px rgba(103, 255, 152, 0.38);
}

.todo-item {
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    padding: 0.5rem 0.65rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}

.todo-item.done {
    opacity: 0.65;
}

.task-celebration-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2400;
}

.todo-item-main {
    min-width: 0;
}

.todo-item-main strong {
    display: block;
    font-size: 0.84rem;
    word-break: break-word;
}

.todo-item-main span {
    font-size: 0.7rem;
    color: #a5a5a5;
}

.todo-item-editor {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 160px 175px;
    gap: 0.45rem;
    width: 100%;
}

.todo-edit-input,
.todo-edit-assignee,
.todo-edit-deadline,
.todo-edit-share-with {
    width: 100%;
    min-width: 0;
    font-size: 0.78rem;
    padding: 0.42rem 0.58rem;
}

.todo-edit-share-row {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.45rem;
    align-items: center;
}

.todo-edit-share-row label {
    font-size: 0.68rem;
    color: #a5a5a5;
    white-space: nowrap;
}

.todo-item-actions {
    display: inline-flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.todo-item-actions .btn {
    padding: 0.35rem 0.6rem;
    font-size: 0.62rem;
}

.todo-modal-actions {
    justify-content: flex-end;
    margin-top: 0.85rem;
}

.todo-modal-actions .btn {
    min-width: 96px;
}

.edit-skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    max-height: 170px;
    overflow-y: auto;
    padding: 0.2rem 0.05rem;
}

.edit-skills-empty {
    color: #8d8d8d;
    font-size: 0.8rem;
}

.edit-skills-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    margin: 0.05rem 0 0.55rem;
}

.edit-skills-search-btn {
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(20, 20, 20, 0.92);
    color: #e6e6e6;
    border-radius: 999px;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.95rem;
}

.edit-skills-search-btn:hover {
    border-color: rgba(255, 252, 0, 0.45);
}

.edit-skills-search-input {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(20, 20, 20, 0.92);
    color: #f0f0f0;
    border-radius: 999px;
    padding: 0.45rem 0.75rem;
    font-size: 0.8rem;
    margin: 0 0 0.55rem;
}

.edit-skills-search-input.hidden {
    display: none;
}

.edit-skill-chip {
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(18, 18, 18, 0.9);
    color: #d8d8d8;
    border-radius: 999px;
    padding: 0.3rem 0.55rem;
    font-size: 0.74rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.edit-skill-chip:hover {
    border-color: rgba(255, 252, 0, 0.45);
}

.edit-skill-chip.selected {
    border-color: rgba(255, 252, 0, 0.75);
    color: #121212;
    background: rgba(255, 252, 0, 0.92);
}

.edit-skill-chip.disabled {
    opacity: 0.7;
    border-style: dashed;
}

.edit-skill-chip.add {
    border-style: dashed;
    border-color: rgba(255, 252, 0, 0.45);
    color: var(--brand-yellow);
    font-weight: 800;
}

.edit-skill-chip.add:hover {
    border-color: rgba(255, 252, 0, 0.75);
    background: rgba(255, 252, 0, 0.12);
}

.edit-skills-hint {
    margin-top: 0.45rem;
    color: #868686;
    font-size: 0.72rem;
}

.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.modal.hidden {
    display: none;
}

.modal-content {
    background-color: #111;
    padding: 3rem;
    border-radius: 30px;
    width: 100%;
    max-width: 450px;
    position: relative;
    border: 1px solid #333;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}

#edit-claw-modal .modal-content {
    width: min(92vw, 780px);
    max-width: 780px;
    max-height: 88vh;
    overflow-y: auto;
    padding: 2.25rem;
}

#create-claw-modal .modal-content {
    width: min(92vw, 780px);
    max-width: 780px;
    max-height: 88vh;
    overflow-y: auto;
    padding: 2.25rem;
}

#edit-claw-modal .form-group input[type="text"],
#edit-claw-modal .form-group textarea,
#edit-claw-modal .settings-input,
#create-claw-modal .form-group input[type="text"],
#create-claw-modal .form-group textarea,
#create-claw-modal .settings-input {
    width: 100%;
}

#edit-claw-modal .model-select,
#create-claw-modal .model-select {
    width: 100%;
    max-width: none;
    margin-left: 0;
    min-height: 46px;
    padding: 0.7rem 0.8rem;
    border-radius: 12px;
    font-size: 1rem;
}

#edit-claw-modal #edit-tts-rate {
    width: 100%;
    margin-top: 0.2rem;
}

#create-claw-modal #create-tts-rate {
    width: 100%;
    margin-top: 0.2rem;
}

#edit-claw-modal .edit-speech-group,
#create-claw-modal .edit-speech-group {
    gap: 0.4rem;
}

.claw-avatar-edit-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.claw-avatar-edit-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}

.claw-avatar-edit-actions .hidden {
    display: none !important;
}

.edit-claw-avatar-preview {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    object-fit: cover;
    border: 2px solid rgba(255, 252, 0, 0.45);
    background: rgba(255, 255, 255, 0.04);
    flex-shrink: 0;
}

.edit-claw-avatar-preview.is-generating {
    opacity: 0.55;
    filter: grayscale(0.2);
}

#edit-claw-modal .edit-speech-toggle-row,
#create-claw-modal .edit-speech-toggle-row {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0;
}

#edit-claw-modal #edit-claw-tts-enabled,
#create-claw-modal #create-claw-tts-enabled {
    width: 20px;
    height: 20px;
    margin: 0;
    accent-color: var(--brand-yellow);
}

#edit-claw-modal .settings-inline-btn,
#create-claw-modal .settings-inline-btn {
    max-width: none;
}

#edit-claw-modal .form-group textarea,
#create-claw-modal .form-group textarea {
    min-height: 110px;
}

#edit-claw-personality {
    resize: both;
    overflow: auto;
    min-height: 130px;
    max-height: 55vh;
}

#edit-claw-modal .edit-skills-list {
    max-height: 240px;
}

.close {
    position: absolute;
    right: 2rem;
    top: 1.5rem;
    color: #888;
    font-size: 2rem;
    cursor: pointer;
}

.auth-switch {
    text-align: center;
    margin-top: 1.5rem;
    color: #666;
    font-size: 0.9rem;
}

.auth-switch a {
    color: var(--brand-yellow);
    text-decoration: none;
    font-weight: 700;
}

/* Playground Section */
.playground-section {
    padding: 6rem 0;
    min-height: 80vh;
}

#clawground.playground-section {
    padding-top: 6rem;
}

body.is-authenticated #clawground.playground-section {
    padding-top: 0.65rem;
    padding-bottom: 0;
}

#clawground .section-title {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.playground-section.hidden {
    display: none;
}

.clawground-boot-loader {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.94);
    backdrop-filter: blur(10px);
}

.clawground-boot-loader.hidden {
    display: none;
}

.playground-section.boot-loading .playground-container {
    display: none;
}

.playground-section.boot-loading .container {
    max-width: none;
}

.playground-container {
    display: grid;
    grid-template-columns: var(--sidebar-width, 280px) 8px 1fr;
    gap: 0;
    background: rgba(15, 15, 15, 0.95);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    height: 85vh;
    min-height: 600px;
    overflow: hidden;
    box-shadow: 0 50px 100px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
}

.agent-sidebar {
    background: rgba(5, 5, 5, 0.5);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    container-type: inline-size;
    container-name: agent-sidebar;
}

.sidebar-resizer {
    width: 8px;
    cursor: col-resize;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
    user-select: none;
    touch-action: none;
}

.sidebar-resizer::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 2px;
    height: 36px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
}

.sidebar-resizer:hover::after,
body.sidebar-resizing .sidebar-resizer::after {
    background: rgba(255, 252, 0, 0.78);
    box-shadow: 0 0 10px rgba(255, 252, 0, 0.22);
}

body.sidebar-resizing,
body.sidebar-resizing * {
    cursor: col-resize !important;
}

.sidebar-header {
    padding: 2.2rem 2rem 1.2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.6rem;
}

.sidebar-tabs {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    width: auto;
}

.sidebar-title {
    color: #fffc9b;
    font-size: 0.8rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.sidebar-create-btn {
    border: 1px dashed rgba(255, 252, 0, 0.35);
    background: rgba(255, 255, 255, 0.02);
    color: #fffc9b;
    width: 30px;
    height: 30px;
    min-width: 30px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 900;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sidebar-create-btn:hover {
    border-color: rgba(255, 252, 0, 0.75);
    box-shadow: 0 0 12px rgba(255, 252, 0, 0.2);
}

.create-claw-modal-content {
    width: min(92vw, 560px);
}

.create-space-modal-content {
    width: min(92vw, 620px);
}

.create-space-agent-list {
    display: grid;
    gap: 0.48rem;
    max-height: 280px;
    overflow-y: auto;
    padding: 0.35rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.3);
}

.create-space-agent-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.4rem 0.45rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    color: #e6e6e6;
    cursor: pointer;
}

.create-space-agent-item input[type=\"checkbox\"] {
    accent-color: var(--brand-yellow);
}

.create-space-agent-item em {
    font-style: normal;
    font-size: 0.74rem;
    color: #a8a8a8;
    margin-left: 0.2rem;
}

.sidebar-tab-btn {
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.03);
    color: #d8d8d8;
    border-radius: 999px;
    padding: 0.38rem 0.75rem;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sidebar-tab-btn:hover {
    border-color: rgba(255, 252, 0, 0.6);
    color: #fff9bf;
}

.sidebar-tab-btn.active {
    border-color: rgba(255, 252, 0, 0.72);
    background: rgba(255, 252, 0, 0.14);
    color: #fffc9b;
    box-shadow: 0 0 12px rgba(255, 252, 0, 0.2);
}

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0.5;
    border-radius: 4px;
}

.btn-icon:hover {
    opacity: 1;
    color: var(--brand-yellow);
    background: rgba(255, 252, 0, 0.1);
}

.agents-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.85rem 0.65rem 0.85rem 0.85rem;
    scrollbar-gutter: stable;
}

.agent-sidebar.collapsed .agents-list {
    padding: 0.55rem 0.38rem;
    overflow-x: hidden;
    overscroll-behavior-x: contain;
    touch-action: pan-y;
}

.office-main-view {
    flex: 1;
    padding: 1rem;
    overflow: hidden;
    background-image: radial-gradient(circle at 50% 50%, rgba(255, 252, 0, 0.02) 0%, transparent 80%);
    position: relative;
}

#office-canvas-host {
    min-height: 520px;
    height: 100%;
    position: relative;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background:
        radial-gradient(circle at 25% 15%, rgba(255, 252, 0, 0.13), transparent 38%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(0, 0, 0, 0.2));
    overflow: hidden;
}

.office-chat-dock {
    position: absolute;
    left: 50%;
    bottom: 12px;
    transform: translateX(-50%);
    z-index: 14;
    width: min(92%, 900px);
    background: rgba(8, 8, 8, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.17);
    border-radius: 14px;
    padding: 0.5rem;
    backdrop-filter: blur(6px);
}

.office-chat-transcript {
    max-height: 78px;
    overflow-y: auto;
    border-radius: 10px;
    padding: 0.38rem 0.45rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 0.4rem;
    font-size: 0.68rem;
}

.office-chat-empty {
    color: rgba(255, 255, 255, 0.62);
}

.office-chat-line {
    margin-bottom: 0.2rem;
    color: #d8d8d8;
}

.office-chat-line.user {
    color: #fff4a2;
}

.office-chat-line.claw {
    color: #d6ffd9;
}

.office-chat-image {
    display: block;
    max-width: min(100%, 320px);
    margin-top: 0.45rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.office-chat-video {
    display: block;
    max-width: min(100%, 360px);
    margin-top: 0.45rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #000;
}

.spaces-zone-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    background: #000;
}

.office-chat-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto auto;
    gap: 0.42rem;
    align-items: center;
}

.office-chat-autocomplete {
    margin-top: 0.32rem;
    padding: 0 0.2rem;
    font-size: 0.66rem;
    color: rgba(255, 252, 0, 0.9);
    min-height: 0.8rem;
}

.office-chat-row input {
    width: 100%;
    background: rgba(8, 8, 8, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 999px;
    padding: 0.52rem 0.72rem;
    font-size: 0.78rem;
}

.office-chat-row input:focus {
    outline: none;
    border-color: rgba(255, 252, 0, 0.72);
    box-shadow: 0 0 0 2px rgba(255, 252, 0, 0.12);
}

.office-chat-send-btn,
#clawground-send-btn {
    background: var(--brand-yellow);
    color: var(--brand-text);
    border: 1px solid rgba(255, 252, 0, 0.88);
    box-shadow: 0 0 12px rgba(255, 252, 0, 0.35);
    font-weight: 800;
}

.clawground-send-btn {
    position: relative;
    overflow: visible;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-width: 72px;
}

.clawground-send-icon {
    display: none;
    font-size: 1rem;
    line-height: 1;
}

.clawground-send-label {
    line-height: 1;
}

.clawground-send-count {
    position: absolute;
    top: -7px;
    right: -7px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #101010;
    color: #fffc00;
    font-size: 0.62rem;
    line-height: 18px;
    text-align: center;
    font-weight: 800;
    border: 2px solid rgba(255, 252, 0, 0.92);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    pointer-events: none;
    box-sizing: border-box;
}

.clawground-send-count.hidden {
    display: none;
}

body.is-authenticated.spaces-mode-active #clawground #clawground-send-btn {
    min-width: 42px;
    width: 42px;
    height: 40px;
    padding: 0;
}

body.is-authenticated.spaces-mode-active #clawground #clawground-send-btn .clawground-send-label {
    display: none;
}

body.is-authenticated.spaces-mode-active #clawground #clawground-send-btn .clawground-send-icon {
    display: inline-flex;
}

.office-chat-send-btn {
    width: 38px;
    min-width: 38px;
    height: 36px;
    padding: 0;
    font-size: 1rem;
    line-height: 1;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.office-chat-stop-btn {
    width: 38px;
    min-width: 38px;
    height: 36px;
    padding: 0;
    font-size: 0.95rem;
    line-height: 1;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.office-chat-send-btn:hover:not(:disabled),
#clawground-send-btn:hover:not(:disabled) {
    background: #fff066;
    border-color: var(--brand-yellow);
    box-shadow: 0 0 16px rgba(255, 252, 0, 0.5);
    transform: translateY(-1px);
}

.office-chat-send-btn:active,
#clawground-send-btn:active {
    transform: translateY(1px);
}

.office-chat-send-btn:disabled,
#clawground-send-btn:disabled {
    opacity: 0.6;
    box-shadow: none;
}

.office-chat-mic-btn {
    width: 38px;
    min-width: 38px;
    height: 36px;
    padding: 0;
    font-size: 1rem;
    line-height: 1;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-width: 1px;
    border-color: rgba(255, 255, 255, 0.2);
}

.office-chat-mic-btn:hover {
    border-color: rgba(255, 252, 0, 0.75);
}

.office-chat-mic-btn.listening {
    border-color: rgba(0, 255, 170, 0.9);
    color: #00ff9c;
    background: rgba(6, 80, 54, 0.36);
    box-shadow: 0 0 12px rgba(0, 255, 170, 0.32);
}

.office-chat-hint {
    margin-top: 0.28rem;
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.64rem;
}

.office-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 12;
    display: inline-flex;
    gap: 0.4rem;
    background: rgba(7, 7, 7, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    padding: 0.3rem;
    backdrop-filter: blur(5px);
}

.office-control-btn {
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(18, 18, 18, 0.86);
    color: #fff;
    min-width: 42px;
    height: 34px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
}

.office-control-input {
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(18, 18, 18, 0.92);
    color: #fff;
    width: 64px;
    height: 34px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 800;
    text-align: center;
    outline: none;
    padding: 0 8px;
}

.office-control-input:focus {
    border-color: rgba(255, 252, 0, 0.75);
    box-shadow: 0 0 10px rgba(255, 252, 0, 0.2);
}

.office-control-btn:hover {
    border-color: var(--hover-border);
    background: var(--hover-bg);
    color: #fff9bf;
    box-shadow: var(--hover-glow);
}

.office-viewport {
    position: absolute;
    inset: 0;
    overflow: hidden;
    cursor: grab;
    touch-action: none;
}

.office-viewport.panning {
    cursor: grabbing;
}

.office-canvas {
    position: absolute;
    width: 8000px;
    height: 8000px;
    top: 0;
    left: 0;
    transform-origin: 0 0;
    will-change: transform;
}

.office-claw {
    position: absolute;
    transform: translate(-50%, -50%);
    min-width: 90px;
    max-width: 142px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 14px;
    background: rgba(8, 8, 8, 0.86);
    color: #fff;
    padding: 0.4rem 0.46rem;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
    touch-action: none;
    user-select: none;
    cursor: grab;
    overflow: visible;
}

.office-claw-avatar {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    display: block;
    margin-bottom: 0.24rem;
    object-fit: cover;
    position: relative;
}

.office-claw:hover {
    border-color: rgba(255, 252, 0, 0.75);
    box-shadow: 0 0 12px rgba(255, 252, 0, 0.25);
}

.office-claw.active {
    border-color: rgba(255, 252, 0, 0.95);
    background: rgba(255, 252, 0, 0.14);
}

.office-claw.talking {
    border-color: rgba(255, 252, 0, 0.98);
    box-shadow: 0 0 0 1px rgba(255, 252, 0, 0.35), 0 0 18px rgba(255, 252, 0, 0.36);
}

.office-claw.dragging {
    cursor: grabbing;
    z-index: 5;
    box-shadow: 0 0 16px rgba(255, 252, 0, 0.35);
}

.office-claw-name {
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.2;
}

.office-claw-bubble,
.office-claw-bubble.is-caption {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translateX(-50%);
    box-sizing: border-box;
    width: max-content;
    min-width: 96px;
    max-width: min(280px, 40vw);
    height: auto;
    max-height: none;
    padding: 0.52rem 0.72rem;
    border-radius: 12px;
    background: rgba(8, 8, 8, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #fff;
    font-size: 0.76rem;
    font-weight: 600;
    line-height: 1.42;
    text-align: center;
    letter-spacing: 0.01em;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
    pointer-events: auto;
    white-space: normal;
    display: block;
    overflow: visible;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: none;
    text-overflow: clip;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    -webkit-box-orient: unset;
}

.office-claw-bubble.talking {
    border-color: rgba(255, 252, 0, 0.95);
    box-shadow: 0 0 0 1px rgba(255, 252, 0, 0.34), 0 10px 24px rgba(255, 252, 0, 0.2);
    animation: officeBubblePulse 1s ease-in-out infinite;
    max-width: min(300px, 42vw);
}

@keyframes officeBubblePulse {
    0%, 100% { transform: translateX(-50%) scale(1); }
    50% { transform: translateX(-50%) scale(1.03); }
}

.office-claw-bubble::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
    border-width: 6px 6px 0 6px;
    border-style: solid;
    border-color: rgba(255, 255, 255, 0.22) transparent transparent transparent;
}

.office-bubble-detail {
    position: fixed;
    inset: 0;
    z-index: 1600;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.78);
    padding: 2.5vh 2vw;
}

.office-bubble-detail.hidden {
    display: none;
}

.office-bubble-detail-card {
    width: min(94vw, 1160px);
    min-height: min(76vh, 760px);
    max-height: 90vh;
    background: rgba(8, 8, 8, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 16px;
    padding: 1.1rem 1.2rem 1rem;
    position: relative;
    display: flex;
    flex-direction: column;
}

.office-bubble-detail-card h4 {
    margin: 0 0 0.8rem;
    color: var(--brand-yellow);
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding-right: 2.2rem;
}

.office-bubble-detail-card p,
.office-bubble-detail-card #office-bubble-detail-body {
    margin: 0;
    white-space: pre-wrap;
    color: #ececec;
    font-size: 0.96rem;
    line-height: 1.5;
    overflow-y: auto;
    flex: 1;
    padding-right: 0.35rem;
}

.office-bubble-detail-card .cover-letter-export-btn {
    margin-top: 0.9rem;
    align-self: flex-start;
}

.office-bubble-edit-btn {
    margin-top: 0.9rem;
    margin-right: 0.35rem;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(16, 16, 16, 0.85);
    color: #fff6a6;
    border-radius: 8px;
    padding: 0.32rem 0.56rem;
    font-size: 0.66rem;
    cursor: pointer;
}

.office-bubble-edit-btn:hover {
    border-color: rgba(255, 252, 0, 0.72);
}

.office-bubble-close {
    position: absolute;
    right: 12px;
    top: 8px;
    border: none;
    background: transparent;
    color: #bbb;
    font-size: 1.6rem;
    cursor: pointer;
    line-height: 1;
}

.office-empty {
    color: rgba(255, 255, 255, 0.6);
    border: 1px dashed rgba(255, 255, 255, 0.22);
    border-radius: 12px;
    padding: 0.8rem;
    font-size: 0.78rem;
    text-align: center;
}

.office-main-view.office-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(0, 0, 0, 0.96);
    padding: 1rem;
}

.office-main-view:fullscreen,
.office-main-view:-webkit-full-screen {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.98);
    padding: 1rem;
}

.office-main-view:fullscreen #office-canvas-host,
.office-main-view:-webkit-full-screen #office-canvas-host {
    height: calc(100vh - 2rem);
}

.office-main-view:fullscreen::backdrop,
.office-main-view:-webkit-full-screen::backdrop {
    background: #000;
}

.agent-item {
    padding: 1rem 0.85rem;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 0.5rem;
    border: 1px solid transparent;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.agent-sidebar.collapsed .agent-item {
    padding: 0.5rem;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.agent-sidebar.collapsed .agent-item-top {
    justify-content: center;
    width: 100%;
}

.agent-sidebar.collapsed .agent-title-wrap {
    justify-content: center;
}

.agent-sidebar.collapsed .agent-item h4,
.agent-sidebar.collapsed .agent-item p,
.agent-sidebar.collapsed .agent-item .agent-actions,
.agent-sidebar.collapsed .agent-item .agent-status-dot {
    display: none !important;
}

.agent-sidebar.collapsed .agent-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
}

.agent-sidebar.collapsed .agent-item.add-new {
    padding: 0.4rem;
}

.agent-sidebar.collapsed .agent-item.add-new .add-new-label {
    display: none;
}

.agent-sidebar.collapsed .agent-item.add-new span {
    font-size: 1.45rem;
    line-height: 1;
}

.agent-sidebar.collapsed .agent-item.add-new .add-new-label {
    display: none;
}

.agent-sidebar.collapsed .agent-item[data-hover-label] {
    position: relative;
}

.agent-sidebar.collapsed .agent-item[data-hover-label]::after {
    display: none !important;
}

.agent-hover-tooltip {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateY(-50%);
    max-width: min(46vw, 320px);
    background: rgba(7, 7, 7, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.24);
    color: #f4f4f4;
    padding: 0.32rem 0.52rem;
    border-radius: 8px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.14s ease, visibility 0.14s ease;
    z-index: 9999;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.agent-hover-tooltip.show {
    opacity: 1;
    visibility: visible;
}

.spaces-save-notice {
    position: fixed;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%) translateY(12px);
    max-width: min(92vw, 520px);
    padding: 10px 14px;
    border-radius: 10px;
    background: rgba(12, 12, 12, 0.96);
    border: 1px solid rgba(255, 252, 0, 0.35);
    color: #f5f5f5;
    font-size: 0.82rem;
    line-height: 1.35;
    text-align: center;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
    z-index: 21000;
}

.spaces-save-notice.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.spaces-save-notice.is-error {
    border-color: rgba(255, 96, 96, 0.55);
    color: #ffe9e9;
}

.ui-guide-overlay {
    position: fixed;
    inset: 0;
    z-index: 12040;
    pointer-events: auto;
    background: rgba(4, 8, 16, 0.18);
}

.ui-guide-ring {
    position: fixed;
    border: 2px solid var(--brand-yellow, #f5d90a);
    border-radius: 14px;
    box-shadow: 0 0 0 4px rgba(245, 217, 10, 0.28), 0 0 28px rgba(245, 217, 10, 0.42);
    animation: uiGuidePulse 1.35s ease-in-out infinite;
    pointer-events: none;
}

.ui-guide-callout {
    position: fixed;
    z-index: 12050;
    padding: 0.42rem 0.72rem;
    border-radius: 999px;
    background: rgba(10, 14, 24, 0.94);
    border: 1px solid rgba(245, 217, 10, 0.55);
    color: #fff7cf;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
    pointer-events: none;
}

.ui-guide-highlight {
    position: relative;
    z-index: 12045 !important;
}

@keyframes uiGuidePulse {
    0%, 100% {
        box-shadow: 0 0 0 4px rgba(245, 217, 10, 0.22), 0 0 18px rgba(245, 217, 10, 0.34);
    }
    50% {
        box-shadow: 0 0 0 7px rgba(245, 217, 10, 0.38), 0 0 32px rgba(245, 217, 10, 0.55);
    }
}

.agent-item:hover {
    border-color: var(--hover-border-soft);
    background: var(--hover-bg);
    box-shadow: var(--hover-glow);
}

.agent-item.active {
    background: rgba(255, 252, 0, 0.14);
    border-color: rgba(255, 252, 0, 0.6);
    box-shadow: inset 0 0 0 1px rgba(255, 252, 0, 0.28);
}

.agent-item h4 {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 0.2rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.agent-item p {
    font-size: 0.75rem;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agent-item-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.45rem;
    min-width: 0;
}

.agent-title-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
}

.agent-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.35);
    position: relative;
}

.agent-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00ff66;
    box-shadow: 0 0 8px rgba(0, 255, 102, 0.75);
    opacity: 1;
    transition: opacity 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.agent-status-dot.offline {
    background: #ff3f3f;
    box-shadow: 0 0 8px rgba(255, 63, 63, 0.75);
}

.agent-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex: 0 0 auto;
}

@container agent-sidebar (max-width: 280px) {
    .agent-item-top {
        flex-wrap: wrap;
    }

    .agent-actions {
        width: 100%;
        justify-content: flex-end;
        margin-top: 0.15rem;
    }
}

.agent-edit-btn,
.agent-delete-btn {
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: transparent;
    color: #aaa;
    border-radius: 9px;
    width: auto;
    min-width: 44px;
    height: 30px;
    padding: 0 0.55rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.agent-edit-btn:hover {
    border-color: rgba(255, 252, 0, 0.8);
    color: #fff799;
    background: rgba(255, 252, 0, 0.08);
}

.agent-delete-btn:hover {
    border-color: rgba(255, 80, 80, 0.8);
    color: #ff8a8a;
    background: rgba(255, 80, 80, 0.1);
}

.agent-edit-btn:disabled,
.agent-delete-btn:disabled {
    opacity: 0.55;
    cursor: wait;
}

.agent-item.draft {
    opacity: 0.5;
    background: repeating-linear-gradient(45deg,
            rgba(0, 0, 0, 0.1),
            rgba(0, 0, 0, 0.1) 10px,
            rgba(255, 255, 255, 0.02) 10px,
            rgba(255, 255, 255, 0.02) 20px);
}

.playground-main {
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.2);
    position: relative;
}

.clawground-loading-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(2px);
    transition: opacity 0.22s ease;
}

.clawground-loader-card {
    width: min(460px, 85%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    padding: 1rem 1rem 0.9rem;
    background: rgba(18, 18, 18, 0.9);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.clawground-loader-title {
    color: #fffc9b;
    font-size: 0.92rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-align: center;
}

.clawground-loader-status {
    display: none !important;
}

.clawground-loader-bar {
    position: relative;
    margin-top: 0.7rem;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    overflow: hidden;
}

.clawground-loader-fill {
    position: absolute;
    inset: 0;
    width: 45%;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(255, 252, 0, 0.2), rgba(255, 252, 0, 0.9), rgba(255, 252, 0, 0.2));
    animation: clawgroundLoaderSlide 1.35s ease-in-out infinite;
}

@keyframes clawgroundLoaderSlide {
    0% {
        transform: translateX(-120%);
    }

    100% {
        transform: translateX(240%);
    }
}

.chat-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    background: rgba(8, 8, 8, 0.55);
}

.chat-header-main {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    min-width: 0;
    flex: 1 1 180px;
}

.chat-header-role {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
}

.chat-header-edit-btn {
    flex: 0 0 auto;
    padding: 0.45rem 0.9rem;
    font-size: 0.76rem;
    border-radius: 999px;
    white-space: nowrap;
}

.chat-header-edit-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.chat-header-hint {
    flex: 1 1 100%;
    margin: 0;
    padding-left: calc(8px + 0.75rem);
    font-size: 0.68rem;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.42);
}

.agent-sidebar-head {
    padding: 0.7rem 0.75rem 0.45rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.agent-sidebar-title {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.82);
}

.agent-sidebar-hint {
    margin: 0.28rem 0 0;
    font-size: 0.62rem;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.42);
}

.agent-sidebar.collapsed .agent-sidebar-head {
    display: none;
}

body.is-authenticated.spaces-mode-active #clawground #playground-header,
body.is-authenticated #clawground #playground-header.playground-header-hidden,
html.brand-arvis body.is-authenticated #clawground #playground-header,
body.is-authenticated.brand-arvis #clawground #playground-header,
body.is-authenticated #clawground:has(#todo-panel:not(.hidden)) #playground-header,
body.is-authenticated #clawground:has(#content-planner-panel:not(.hidden)) #playground-header,
body.is-authenticated #clawground:has(#economy-panel:not(.hidden)) #playground-header,
body.is-authenticated #clawground:has(#calendar-panel:not(.hidden)) #playground-header,
body.is-authenticated #clawground:has(#usage-panel:not(.hidden)) #playground-header,
body.is-authenticated #clawground:has(#files-panel:not(.hidden)) #playground-header,
body.is-authenticated #clawground:has(#arvis-inbox-panel:not(.hidden)) #playground-header,
body.is-authenticated #clawground:has(#user-stats-panel:not(.hidden)) #playground-header,
body.is-authenticated #clawground:has(#ideas-bugs-panel:not(.hidden)) #playground-header,
body.is-authenticated #clawground:has(#settings-panel:not(.hidden)) #playground-header,
body.is-authenticated #clawground:has(#spaces-panel:not(.hidden)) #playground-header {
    display: none !important;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #00ff00;
    border-radius: 50%;
    box-shadow: 0 0 8px #00ff00;
    transition: background 0.3s, box-shadow 0.3s;
}

.status-dot.offline {
    background: #ff0000;
    box-shadow: 0 0 8px #ff0000;
}

#target-agent-name {
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    background-image: radial-gradient(circle at 50% 50%, rgba(255, 252, 0, 0.02) 0%, transparent 80%);
}

.chat-input-area {
    padding: 1.25rem 2rem;
    background: rgba(10, 10, 10, 0.5);
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex: 0 0 auto;
    min-height: 74px;
}

.chat-input-area input {
    flex: 1;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    padding: 0.8rem 1.25rem;
    color: #fff;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.chat-input-area input:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--brand-yellow);
    box-shadow: 0 0 15px rgba(255, 252, 0, 0.15);
    outline: none;
}

.usage-chart {
    height: 250px;
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
    padding-top: 1.5rem;
    padding-bottom: 2rem;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.usage-bar-wrapper {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    position: relative;
    z-index: 5;
    padding-bottom: 2px;
}

.usage-bar {
    width: 100%;
    background: linear-gradient(to top, var(--brand-yellow), #fff799);
    border-radius: 4px 4px 0 0;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(255, 252, 0, 0.15);
    min-height: 4px;
    /* Ensure even tiny values show up */
}

.usage-bar:hover {
    box-shadow: 0 0 25px rgba(255, 252, 0, 0.4);
    filter: brightness(1.2);
}

.usage-bar-label {
    position: absolute;
    bottom: -1.75rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.6rem;
    color: #666;
    white-space: nowrap;
    font-weight: 700;
}

.usage-grid-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.05);
    z-index: 1;
    pointer-events: none;
}

.usage-grid-label {
    position: absolute;
    right: 0;
    bottom: 2px;
    font-size: 0.65rem;
    color: #555;
    background: rgba(0, 0, 0, 0.6);
    padding: 1px 4px;
    border-radius: 4px;
    font-family: 'Roboto Mono', monospace;
}

.usage-grid-label {
    position: absolute;
    right: 0;
    bottom: 2px;
    font-size: 0.65rem;
    color: #888;
    font-weight: 800;
    background: rgba(10, 10, 10, 0.85);
    padding: 1px 4px;
    border-radius: 4px;
    z-index: 10;
    pointer-events: none;
}



footer {
    padding: 4rem 0;
    color: #666;
    text-align: center;
    font-weight: 700;
    font-size: 0.9rem;
    position: relative;
    z-index: 10;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 3rem;
    }

    .playground-container {
        grid-template-columns: 1fr;
        height: auto;
    }

    .sidebar-resizer {
        display: none;
    }

    .agent-sidebar {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        max-height: 300px;
    }

    .section-title {
        font-size: 2.5rem;
    }
}

/* Responsive hardening for Clawground chat window */
.playground-container>* {
    min-width: 0;
}

.playground-main {
    min-width: 0;
    min-height: 0;
}

.chat-messages {
    min-height: 0;
    overflow-wrap: break-word;
}

.chat-input-area {
    flex-wrap: wrap;
}

.chat-input-area .btn {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 0.7rem 1.25rem;
    font-size: 0.8rem;
}

.chat-stop-btn {
    border-width: 1px;
    border-color: rgba(255, 255, 255, 0.25);
    min-width: 80px;
    opacity: 0.95;
}

.chat-stop-btn:hover {
    border-color: rgba(255, 255, 255, 0.55);
}

.chat-attach-btn {
    border-width: 1px;
    border-color: rgba(255, 255, 255, 0.2);
    width: 40px;
    height: 40px;
    min-width: 40px;
    padding: 0;
    font-size: 1rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.chat-mic-btn {
    border-width: 1px;
    border-color: rgba(255, 255, 255, 0.2);
    width: 40px;
    height: 40px;
    min-width: 40px;
    padding: 0;
    font-size: 1rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.chat-mic-btn:hover {
    border-color: rgba(255, 252, 0, 0.75);
}

.chat-mic-btn.idle,
.office-chat-mic-btn.idle {
    border-color: rgba(255, 84, 84, 0.72);
    background: rgba(140, 18, 18, 0.24);
    color: #ffd0d0;
    box-shadow: 0 0 10px rgba(255, 80, 80, 0.22);
}

.chat-mic-btn.listening {
    border-color: rgba(0, 255, 170, 0.9);
    color: #b8ffe8;
    background: rgba(6, 80, 54, 0.36);
    box-shadow: 0 0 12px rgba(0, 255, 170, 0.32);
}

.chat-attach-btn:hover {
    border-color: rgba(255, 252, 0, 0.75);
}

.chat-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem 2rem 1rem;
    background: rgba(10, 10, 10, 0.5);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.chat-attachments:empty {
    display: none;
}

.attachment-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #f5f5f5;
    font-size: 0.72rem;
    max-width: min(420px, 88vw);
}

.attachment-chip .name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.attachment-chip .remove {
    border: none;
    background: transparent;
    color: #f5f5f5;
    cursor: pointer;
    font-size: 0.95rem;
    line-height: 1;
    padding: 0;
}

.attachment-chip .remove:hover {
    color: #ff8383;
}

@media (max-width: 1024px) {
    .playground-section {
        padding: 4rem 0;
    }

    .playground-container {
        grid-template-columns: var(--sidebar-width, 280px) 8px 1fr;
        height: min(72vh, 680px);
    }

    .chat-messages {
        padding: 1.25rem;
    }

    .chat-input-area {
        padding: 1rem;
    }

    .chat-input-area .btn {
        padding: 0.9rem 1.25rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .playground-container {
        grid-template-columns: 1fr;
        height: auto;
        min-height: calc(100vh - 180px);
        border-radius: 20px;
    }

    .sidebar-resizer {
        display: none;
    }

    .agent-sidebar {
        max-height: 220px;
    }

    .playground-main {
        min-height: 60vh;
    }

    .chat-header {
        padding: 0.85rem 1rem;
    }

    .chat-header-hint {
        padding-left: 0;
    }

    .chat-messages {
        padding: 1rem;
        gap: 1rem;
    }

    .chat-input-area {
        padding: 0.9rem;
        gap: 0.75rem;
    }

    .chat-input-area input {
        min-width: 0;
        padding: 0.85rem 1rem;
        font-size: 16px;
    }

    .chat-input-area .btn {
        width: 100%;
        padding: 0.9rem 1rem;
    }

    .chat-input-area .chat-attach-btn,
    .chat-input-area .chat-mic-btn {
        width: 40px;
        min-width: 40px;
        height: 40px;
        padding: 0;
    }

    #edit-claw-modal .modal-content {
        width: min(96vw, 96vw);
        max-height: 90vh;
        padding: 1.25rem;
        border-radius: 20px;
    }

    #edit-claw-modal .edit-skills-list {
        max-height: 200px;
    }

    .settings-field-row {
        flex-direction: column;
        align-items: stretch;
    }

    .settings-inline-btn {
        width: 100%;
        max-width: none;
    }

    .settings-actions .btn {
        width: 100%;
    }

    #todo-modal .todo-modal-content {
        width: min(96vw, 96vw);
        max-height: 90vh;
        padding: 1.05rem 0.95rem 0.95rem;
        border-radius: 16px;
    }

    #booking-modal .booking-modal-content {
        width: min(96vw, 96vw);
        max-height: 90vh;
        padding: 1.1rem 0.95rem 0.95rem;
        border-radius: 16px;
    }

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

    .booking-calendar-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .todo-compose-row {
        grid-template-columns: 1fr;
    }

    .todo-assignee-select {
        min-width: 0;
    }

    .todo-filter-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.35rem;
    }

    .todo-filter-select {
        min-width: 0;
        max-width: none;
    }

    .todo-add-btn {
        width: 100%;
    }

    .accounting-panel-head {
        flex-direction: column;
    }

    .accounting-compose-row {
        grid-template-columns: 1fr;
    }

    .accounting-split {
        grid-template-columns: 1fr;
    }

    .accounting-add-btn {
        width: auto;
        max-width: 88px;
        justify-self: start;
    }

    .content-compose-grid {
        grid-template-columns: 1fr;
    }

    .content-add-btn {
        width: 100%;
    }

    .todo-item-editor {
        grid-template-columns: 1fr;
    }

    .integration-row {
        grid-template-columns: 1fr;
    }

    .office-controls {
        right: 8px;
        top: 8px;
        gap: 0.3rem;
        padding: 0.22rem;
    }

    .office-control-btn {
        min-width: 36px;
        height: 30px;
        font-size: 0.66rem;
    }

    .office-chat-dock {
        width: calc(100% - 16px);
        left: 8px;
        right: 8px;
        transform: none;
        bottom: 8px;
        padding: 0.4rem;
    }

    .office-chat-transcript {
        max-height: 66px;
        font-size: 0.64rem;
    }

    .office-chat-row {
        grid-template-columns: 1fr auto auto auto;
    }

    .office-chat-mic-btn,
    .office-chat-stop-btn,
    .office-chat-send-btn {
        width: 38px;
        min-width: 38px;
        height: 36px;
        justify-self: end;
    }

    .office-claw-bubble {
        max-width: min(240px, 72vw);
        font-size: 0.66rem;
    }

    .calendar-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .calendar-grid-head,
    .calendar-grid {
        gap: 0.22rem;
    }

    .calendar-day {
        min-height: 52px;
        padding: 0.28rem;
    }

    .calendar-deadline-row {
        grid-template-columns: 1fr;
        gap: 0.18rem;
    }

    .calendar-deadline-meta {
        text-align: left;
    }

    .calendar-meeting-row {
        grid-template-columns: 1fr;
        gap: 0.18rem;
    }

    .calendar-gcal-wrap {
        flex-direction: column;
        align-items: flex-start;
    }

    .calendar-gcal-actions {
        flex-wrap: wrap;
    }
}


.edit-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1rem;
}

.edit-modal-actions .btn {
    padding: 0.8rem 1.25rem;
    font-size: 0.9rem;
}

#edit-claw-delete-btn {
    margin-right: auto;
}

.agent-model {
    font-size: 0.68rem !important;
    color: #8f8f8f !important;
    margin-top: 0.25rem;
}


.chat-clear-btn {
    margin-left: auto;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    color: #bdbdbd;
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chat-clear-btn:hover {
    border-color: rgba(255, 110, 110, 0.85);
    color: #ff9d9d;
    background: rgba(255, 80, 80, 0.1);
}

.chat-clear-btn:active {
    transform: translateY(1px);
}


.model-select {
    margin-left: 0.55rem;
    background: rgba(15, 15, 15, 0.95);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 0.25rem 0.4rem;
    font-size: 0.75rem;
    max-width: 320px;
    transition: var(--interactive-transition);
}

.model-select:hover:not(:focus) {
    border-color: var(--hover-border-soft);
    background: rgba(255, 252, 0, 0.04);
}


.usage-panel {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
}

.calendar-panel {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 1.25rem;
}

#clawground:has(#calendar-panel:not(.hidden)) .playground-main {
    min-height: 0;
}

#clawground:has(#calendar-panel:not(.hidden)) .calendar-panel {
    height: 100%;
}

.todo-panel {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
    display: flex;
    justify-content: center;
}

.todo-panel-wrap {
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
}

.todo-panel-head h3 {
    margin: 0 0 0.35rem;
    font-size: 1.15rem;
    color: #f5f5f5;
}

.todo-panel-subtitle {
    margin: 0 0 0.85rem;
    color: #999;
    font-size: 0.85rem;
}

.todo-list-heading {
    margin: 0.35rem 0 0.55rem;
    font-size: 0.82rem;
    color: #b8b8b8;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

#todo-panel .todo-list {
    max-height: none;
    min-height: 180px;
}

.economy-panel {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.economy-tab-bar {
    display: flex;
    gap: 0.35rem;
    padding: 0.85rem 1.25rem 0.65rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.economy-tab-btn {
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.04);
    color: #bdbdbd;
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    font-size: 0.78rem;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.economy-tab-btn:hover {
    color: #f0f0f0;
    border-color: rgba(255, 252, 0, 0.35);
}

.economy-tab-btn.active {
    color: #111;
    background: var(--accent-color, #fffc00);
    border-color: var(--accent-color, #fffc00);
}

.economy-panel .accounting-panel,
.economy-panel .revenue-panel {
    flex: 1;
    min-height: 0;
}

.accounting-panel {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
}

.accounting-panel-wrap {
    max-width: 1080px;
}

.accounting-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.85rem;
}

.accounting-panel-head h3 {
    margin: 0 0 0.35rem;
    font-size: 1.15rem;
    color: #f5f5f5;
}

.accounting-panel-subtitle {
    margin: 0;
    color: #999;
    font-size: 0.85rem;
    max-width: 520px;
}

.accounting-lunar-card {
    margin-bottom: 1rem;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
}

.accounting-lunar-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.accounting-lunar-head h4 {
    margin: 0;
    font-size: 0.95rem;
}

.accounting-lunar-subtitle {
    margin: 0.35rem 0 0;
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.78rem;
}

.accounting-lunar-actions {
    margin: 0;
}

.accounting-lunar-status {
    margin-top: 0.75rem;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.78rem;
}

.accounting-lunar-error {
    margin-top: 0.5rem;
    color: #ffb4b4;
    font-size: 0.78rem;
}

.accounting-lunar-account-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-top: 0.75rem;
}

.accounting-lunar-account-select {
    min-width: 180px;
}

.accounting-entry-row.lunar-entry {
    border-color: rgba(147, 197, 253, 0.22);
}

.accounting-source-badge {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.08rem 0.35rem;
    border-radius: 999px;
    background: rgba(147, 197, 253, 0.16);
    color: #dbeafe;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    vertical-align: middle;
}

.accounting-panel-controls {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.accounting-control-label {
    font-size: 0.7rem;
    color: #b8b8b8;
    letter-spacing: 0.04em;
}

.accounting-month-input,
.accounting-currency-select {
    min-width: 130px;
}

.accounting-compose-card {
    margin-top: 0.85rem;
    padding: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
}

.accounting-compose-card h4,
.accounting-list-head h4 {
    margin: 0 0 0.65rem;
    font-size: 0.82rem;
    color: #b8b8b8;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.accounting-compose-row {
    display: grid;
    grid-template-columns: 110px minmax(0, 1.4fr) 120px minmax(140px, 1fr) 145px 90px max-content;
    gap: 0.55rem;
    align-items: center;
}

.accounting-add-btn {
    width: auto;
    min-width: 64px;
    max-width: 88px;
    padding: 0.48rem 0.75rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: none;
    border-radius: 8px;
    box-shadow: none;
}

.accounting-add-btn:hover {
    transform: none;
    box-shadow: none;
}

.accounting-split {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.9fr);
    gap: 0.85rem;
    margin-top: 0.85rem;
}

.accounting-list-wrap,
.accounting-side-wrap {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.85rem;
}

.accounting-list-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.55rem;
}

.accounting-type-filter {
    min-width: 140px;
}

.accounting-entry-list {
    display: grid;
    gap: 0.5rem;
    max-height: 420px;
    overflow-y: auto;
}

.accounting-entry-row {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: center;
    padding: 0.65rem 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.28);
}

.accounting-entry-row.income {
    border-color: rgba(87, 255, 123, 0.25);
}

.accounting-entry-row.expense {
    border-color: rgba(255, 120, 120, 0.22);
}

.accounting-entry-main {
    min-width: 0;
    display: grid;
    gap: 0.18rem;
}

.accounting-entry-main strong {
    font-size: 0.88rem;
    color: #f2f2f2;
}

.accounting-entry-main span {
    font-size: 0.72rem;
    color: #a8a8a8;
}

.accounting-entry-side {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-shrink: 0;
}

.accounting-entry-amount {
    font-size: 0.88rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
}

.accounting-entry-row.income .accounting-entry-amount {
    color: #7dffb0;
}

.accounting-entry-row.expense .accounting-entry-amount {
    color: #ff9d9d;
}

.accounting-entry-delete {
    min-width: 34px;
    padding: 0.35rem 0.45rem;
}

.accounting-empty {
    color: #9a9a9a;
    font-size: 0.82rem;
    padding: 0.5rem 0;
}

.accounting-kpi-cell strong.positive {
    color: #7dffb0;
}

.accounting-kpi-cell strong.negative {
    color: #ff9d9d;
}

.content-planner-panel {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
}

.content-planner-wrap {
    max-width: 1080px;
}

.content-planner-head h3 {
    margin: 0 0 0.35rem;
    font-size: 1.15rem;
    color: #f5f5f5;
}

.content-planner-subtitle {
    margin: 0;
    color: #999;
    font-size: 0.85rem;
    max-width: 640px;
}

.content-planner-kpis {
    margin-top: 0.85rem;
}

.content-platform-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.45rem;
    margin-top: 0.85rem;
}

.content-platform-card {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
}

.content-platform-card.connected {
    border-color: rgba(87, 255, 123, 0.28);
}

.content-platform-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.content-platform-icon-svg {
    width: 16px;
    height: 16px;
    display: block;
}

.content-platform-icon-svg--sm {
    width: 12px;
    height: 12px;
}

.content-platform-icon--instagram {
    background: linear-gradient(135deg, #833ab4 0%, #fd1d1d 52%, #fcb045 100%);
}

.content-platform-icon--tiktok {
    background: #010101;
    color: #fff;
}

.content-platform-icon--youtube {
    background: #ff0000;
}

.content-platform-icon--youtube .content-platform-icon-svg path:last-child {
    fill: #fff;
}

.content-platform-icon--linkedin {
    background: #0a66c2;
}

.content-platform-icon--facebook {
    background: #1877f2;
}

.content-platform-icon--snapchat {
    background: #fffc00;
    color: #000;
}

.content-platform-pill-icon {
    display: inline-grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 5px;
    color: #fff;
    flex-shrink: 0;
}

.content-platform-pill-icon.content-platform-icon--instagram {
    background: linear-gradient(135deg, #833ab4 0%, #fd1d1d 52%, #fcb045 100%);
}

.content-platform-pill-icon.content-platform-icon--tiktok {
    background: #010101;
}

.content-platform-pill-icon.content-platform-icon--youtube {
    background: #ff0000;
}

.content-platform-pill-icon.content-platform-icon--youtube .content-platform-icon-svg path:last-child {
    fill: #fff;
}

.content-platform-pill-icon.content-platform-icon--linkedin {
    background: #0a66c2;
}

.content-platform-pill-icon.content-platform-icon--facebook {
    background: #1877f2;
}

.content-platform-pill-icon.content-platform-icon--snapchat {
    background: #fffc00;
    color: #000;
}

.content-platform-meta {
    flex: 1;
    min-width: 0;
    display: grid;
    gap: 0.08rem;
}

.content-platform-meta strong {
    font-size: 0.76rem;
    color: #f2f2f2;
    line-height: 1.2;
}

.content-platform-meta span {
    font-size: 0.62rem;
    color: #a8a8a8;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.content-platform-btn {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    min-width: 24px;
    padding: 0;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(12, 12, 12, 0.88);
    color: #e8e8e8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--interactive-transition);
}

.content-platform-btn-icon {
    width: 12px;
    height: 12px;
    display: block;
}

.content-platform-btn--connect:hover {
    border-color: rgba(255, 252, 0, 0.72);
    color: var(--brand-yellow);
    box-shadow: var(--hover-glow);
}

.content-platform-btn--disconnect:hover {
    border-color: rgba(255, 110, 110, 0.75);
    color: #ff9d9d;
    background: rgba(255, 80, 80, 0.1);
}

.content-compose-card,
.content-queue-wrap {
    margin-top: 0.85rem;
    padding: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
}

.content-compose-card h4,
.content-queue-head h4 {
    margin: 0 0 0.65rem;
    font-size: 0.82rem;
    color: #b8b8b8;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.content-compose-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
}

.content-compose-grid .settings-input {
    padding: 0.38rem 0.55rem;
    font-size: 0.74rem;
    border-radius: 8px;
}

.content-post-caption {
    grid-column: 1 / -1;
    min-height: 68px;
    resize: vertical;
}

.content-media-sources-wrap {
    margin-top: 0.85rem;
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
}

.content-media-sources-head h4 {
    margin: 0 0 0.25rem;
    font-size: 0.78rem;
    color: #b8b8b8;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.content-media-sources-head p {
    margin: 0 0 0.55rem;
    color: #8f8f8f;
    font-size: 0.68rem;
}

.content-media-source-grid {
    margin-top: 0;
}

.content-platform-icon--google_drive {
    background: #fff;
}

.content-platform-icon--dropbox {
    background: #0061ff;
    color: #fff;
}

.content-media-block {
    grid-column: 1 / -1;
    display: grid;
    gap: 0.45rem;
}

.content-media-label {
    font-size: 0.68rem;
    color: #a8a8a8;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.content-media-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.content-media-btn {
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(12, 12, 12, 0.88);
    color: #ececec;
    border-radius: 999px;
    padding: 0.28rem 0.58rem;
    font-size: 0.64rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--interactive-transition);
}

.content-media-btn:hover {
    border-color: rgba(255, 252, 0, 0.65);
    color: var(--brand-yellow);
}

.content-post-media-input {
    grid-column: 1 / -1;
}

.content-media-preview.hidden {
    display: none;
}

.content-media-preview-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.55rem;
    align-items: center;
    padding: 0.45rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.28);
}

.content-media-preview-image,
.content-media-preview-video,
.content-post-media img,
.content-post-media video {
    width: 72px;
    height: 54px;
    object-fit: cover;
    border-radius: 8px;
    background: #111;
}

.content-media-preview-meta {
    display: grid;
    gap: 0.12rem;
    min-width: 0;
}

.content-media-preview-meta strong {
    font-size: 0.72rem;
    color: #f0f0f0;
}

.content-media-preview-meta span {
    font-size: 0.62rem;
    color: #9a9a9a;
}

.content-media-preview-clear {
    border: 0;
    background: transparent;
    color: #bbb;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}

.content-media-preview-clear:hover {
    color: #ff9d9d;
}

.content-post-media {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.15rem;
}

.content-post-media span {
    font-size: 0.62rem;
    color: #9a9a9a;
}

.content-platform-checks {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.32rem;
}

.content-platform-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.22rem 0.42rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    font-size: 0.66rem;
    color: #d8d8d8;
}

.content-add-btn {
    grid-column: 1 / -1;
    justify-self: start;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.42rem 0.82rem;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 999px;
    border: 1px solid rgba(66, 245, 123, 0.88);
    background: var(--brand-green);
    color: #041b0a;
    box-shadow: 0 0 10px rgba(66, 245, 123, 0.22);
    cursor: pointer;
    transition: var(--interactive-transition);
}

.content-add-btn:hover {
    background: #67ff98;
    border-color: #67ff98;
    box-shadow: 0 0 12px rgba(103, 255, 152, 0.32);
}

.content-queue-head {
    margin-bottom: 0.55rem;
}

.content-post-list {
    display: grid;
    gap: 0.55rem;
}

.content-post-row {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.28);
}

.content-post-row.status-ready {
    border-color: rgba(87, 255, 123, 0.25);
}

.content-post-row.status-scheduled {
    border-color: rgba(130, 205, 255, 0.25);
}

.content-post-main {
    min-width: 0;
    display: grid;
    gap: 0.2rem;
}

.content-post-main strong {
    color: #f2f2f2;
    font-size: 0.9rem;
}

.content-post-main span,
.content-post-main p {
    margin: 0;
    font-size: 0.74rem;
    color: #a8a8a8;
}

.content-post-main a {
    font-size: 0.72rem;
    color: #fffc00;
}

.content-post-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.content-post-status-badge {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #d8d8d8;
    padding: 0.2rem 0.45rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
}

.content-planner-empty {
    color: #9a9a9a;
    font-size: 0.82rem;
}

.spaces-panel {
    flex: 1;
    overflow: hidden;
    padding: 1rem;
}

.spaces-panel:fullscreen,
.spaces-panel:-webkit-full-screen {
    padding: 0.75rem;
    background: #050505;
}

.spaces-panel:fullscreen .spaces-shell,
.spaces-panel:-webkit-full-screen .spaces-shell {
    height: calc(100vh - 1.5rem);
    grid-template-columns: minmax(0, 1fr) 88px;
}

.spaces-panel:fullscreen .spaces-wrap,
.spaces-panel:-webkit-full-screen .spaces-wrap {
    grid-column: 1;
}

.files-panel {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.1rem;
}

.revenue-panel {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
}

.revenue-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.85rem;
}

.revenue-panel-head h3 {
    margin: 0;
    font-size: 1.15rem;
    color: #f5f5f5;
}

.revenue-panel-subtitle {
    margin: 0.35rem 0 0;
    font-size: 0.85rem;
    color: #9a9a9a;
}

.revenue-panel-subtitle a {
    color: #d6d6d6;
}

.revenue-panel-status,
.revenue-panel-empty {
    margin: 0.5rem 0 0.75rem;
    font-size: 0.85rem;
    color: #b8b8b8;
}

.revenue-chart-card {
    margin-top: 1rem;
}

.revenue-bar {
    background: linear-gradient(180deg, #ffd166 0%, #f4a261 100%);
}

.revenue-growth-card {
    margin-top: 1rem;
}

.revenue-growth-total {
    font-size: 0.82rem;
    color: #bdbdbd;
}

.revenue-growth-chart-wrap {
    width: 100%;
    min-height: 220px;
}

.revenue-growth-chart {
    width: 100%;
    height: 220px;
    display: block;
}

.revenue-growth-grid {
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 1;
}

.revenue-growth-axis,
.revenue-growth-x {
    fill: #9a9a9a;
    font-size: 11px;
}

.revenue-growth-area {
    fill: rgba(255, 209, 102, 0.16);
}

.revenue-growth-line {
    fill: none;
    stroke: #ffd166;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.revenue-growth-dot {
    fill: #f4a261;
    stroke: #fff3d6;
    stroke-width: 1.5;
}

.files-wrap {
    display: grid;
    gap: 0.75rem;
}

.files-loading-wrap {
    display: flex;
    justify-content: center;
    margin: 0.35rem 0 0.45rem;
}

.files-loading-wrap .clawground-loader-card {
    width: min(440px, 92%);
    padding: 0.85rem 0.9rem 0.8rem;
}

.files-head {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.6rem;
}

.files-head-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.files-view-toggle {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    overflow: hidden;
}

.files-view-btn {
    border: 0;
    background: rgba(12, 12, 12, 0.86);
    color: #ddd;
    font-size: 0.66rem;
    font-weight: 800;
    padding: 0.35rem 0.5rem;
    cursor: pointer;
}

.files-view-btn.active {
    background: rgba(255, 252, 0, 0.16);
    color: #fffc00;
}

.files-sort-select {
    min-width: 132px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(12, 12, 12, 0.86);
    color: #ededed;
    border-radius: 8px;
    padding: 0.32rem 0.42rem;
    font-size: 0.68rem;
    font-weight: 700;
}

.files-sort-select:focus {
    outline: none;
    border-color: rgba(255, 252, 0, 0.72);
    box-shadow: 0 0 0 1px rgba(255, 252, 0, 0.18);
}

.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.7rem;
}

.files-list {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 11px;
    overflow: hidden;
    background: rgba(7, 7, 7, 0.66);
}

.files-list-head,
.files-list-row {
    display: grid;
    grid-template-columns: 58px minmax(0, 1.9fr) minmax(90px, 0.9fr) minmax(90px, 0.9fr) minmax(145px, 1.2fr);
    align-items: center;
    gap: 0.5rem;
    padding: 0.46rem 0.62rem;
}

.files-list-head {
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.62rem;
    font-weight: 800;
    color: #ddd;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.files-list-row {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.files-list-row:first-of-type {
    border-top: 0;
}

.files-list-kind {
    width: 44px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    font-size: 0.6rem;
    font-weight: 900;
    color: #fffc00;
    padding: 0.2rem 0.26rem;
}

.files-list-name,
.files-list-type,
.files-list-size,
.files-list-date {
    min-width: 0;
    font-size: 0.7rem;
    color: #ddd;
}

.files-list-name {
    font-weight: 700;
}

.files-list-name span {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.files-list-date {
    color: #b5b5b5;
}

.files-list-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    justify-content: flex-end;
}

.files-list-delete {
    border: none;
    background: transparent;
    color: #888;
    font-size: 1rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
}

.files-list-delete:hover {
    background: rgba(255, 85, 85, 0.2);
    color: #ff5555;
}

.files-card {
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    background: rgba(8, 8, 8, 0.76);
    overflow: hidden;
    display: grid;
    grid-template-rows: 150px auto;
    min-height: 238px;
    cursor: pointer;
}

.files-card-preview {
    position: relative;
    background: rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.files-card-corner-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.files-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.files-card-model {
    width: 100%;
    height: 100%;
    --poster-color: rgba(0, 0, 0, 0);
    background: radial-gradient(circle at 50% 50%, rgba(255, 252, 0, 0.08), transparent 70%);
}

.files-card-placeholder {
    font-size: 0.92rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.72);
}

.files-card-body {
    padding: 0.58rem 0.62rem 0.62rem;
    display: grid;
    gap: 0.42rem;
}

.files-card-body h4 {
    margin: 0;
    font-size: 0.78rem;
    color: #f3f3f3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.files-card-title-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.files-card-title-row h4 {
    flex: 1;
}

.files-rename-btn {
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(15, 15, 15, 0.84);
    color: #d9d9d9;
    border-radius: 7px;
    padding: 0.2rem 0.4rem;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
}

.files-rename-btn:hover {
    border-color: rgba(255, 252, 0, 0.5);
    color: #fffc00;
}

.files-rename-input {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(12, 12, 12, 0.82);
    color: #fff;
    border-radius: 8px;
    padding: 0.3rem 0.45rem;
    font-size: 0.74rem;
    line-height: 1.25;
}

.files-rename-input:focus {
    outline: none;
    border-color: rgba(255, 252, 0, 0.72);
    box-shadow: 0 0 0 1px rgba(255, 252, 0, 0.2);
}

.files-rename-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.files-rename-actions .calendar-month-btn {
    padding: 0.26rem 0.48rem;
    font-size: 0.62rem;
}

.files-card-meta {
    font-size: 0.64rem;
    color: #b6b6b6;
    line-height: 1.35;
}

.files-card-open-corner {
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(12, 12, 12, 0.82);
    color: #fffc00;
    font-size: 0.98rem;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.files-card-open-corner:hover {
    border-color: rgba(255, 252, 0, 0.52);
    background: rgba(22, 22, 22, 0.92);
}

.files-card-delete-corner {
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 85, 85, 0.3);
    background: rgba(12, 12, 12, 0.82);
    color: #ff5555;
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
}

.files-card-delete-corner:hover {
    border-color: rgba(255, 85, 85, 0.7);
    background: rgba(60, 15, 15, 0.9);
    color: #ff8888;
}

.files-fullscreen-overlay {
    position: fixed;
    inset: 0;
    z-index: 20050;
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.96);
    box-sizing: border-box;
}

.files-fullscreen-overlay.hidden {
    display: none !important;
}

.files-fullscreen-overlay.is-native-fullscreen,
.files-fullscreen-overlay:fullscreen,
.files-fullscreen-overlay:-webkit-full-screen {
    background: #000;
}

.files-fullscreen-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(8, 8, 8, 0.92);
    flex: 0 0 auto;
}

.files-fullscreen-title-wrap {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.files-fullscreen-title {
    font-size: 0.92rem;
    color: #f3f3f3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.files-fullscreen-hint {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.55);
}

.files-fullscreen-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.files-fullscreen-stage {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    box-sizing: border-box;
}

.files-fullscreen-model {
    width: min(100%, 1400px);
    height: 100%;
    min-height: 320px;
    --poster-color: rgba(0, 0, 0, 0);
    background: radial-gradient(circle at 50% 35%, rgba(255, 252, 0, 0.08), rgba(0, 0, 0, 0.55));
}

.files-fullscreen-overlay.is-native-fullscreen .files-fullscreen-model,
.files-fullscreen-overlay:fullscreen .files-fullscreen-model,
.files-fullscreen-overlay:-webkit-full-screen .files-fullscreen-model {
    width: 100%;
    max-width: none;
}

.files-fullscreen-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.files-fullscreen-pdf,
.files-fullscreen-video {
    width: min(100%, 1200px);
    height: 100%;
    min-height: 320px;
    border: 0;
    border-radius: 8px;
    background: #111;
}

.files-fullscreen-fallback {
    text-align: center;
    color: rgba(255, 255, 255, 0.78);
    display: grid;
    gap: 12px;
    justify-items: center;
}

body.files-fullscreen-open {
    overflow: hidden;
}

.files-list-download-btn {
    min-width: 34px;
    text-align: center;
    font-size: 0.95rem;
    line-height: 1;
    padding: 0.36rem 0.45rem;
}

.files-preview-trigger {
    cursor: zoom-in;
}

.files-preview-modal-content {
    width: min(1200px, 94vw);
    max-width: 94vw;
    min-height: min(78vh, 760px);
    padding: 0.7rem;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 0.55rem;
}

.files-preview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}

.files-preview-head h3 {
    margin: 0;
    font-size: 0.92rem;
    color: #fffc00;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.files-preview-close {
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(12, 12, 12, 0.84);
    color: #fff;
    border-radius: 10px;
    width: 34px;
    height: 34px;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
}

.files-preview-close:hover {
    border-color: rgba(255, 252, 0, 0.56);
    color: #fffc00;
}

.files-preview-body {
    min-height: 0;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    background: rgba(5, 5, 5, 0.86);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.files-preview-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: rgba(0, 0, 0, 0.7);
}

.files-preview-model {
    width: 100%;
    height: 100%;
    min-height: min(70vh, 680px);
    --poster-color: rgba(0, 0, 0, 0);
    background: radial-gradient(circle at 50% 50%, rgba(255, 252, 0, 0.09), transparent 68%);
}

.spaces-shell {
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 88px;
    gap: 0.7rem;
}

#clawground .playground-container.agent-sidebar-hidden {
    grid-template-columns: 0 0 minmax(0, 1fr);
    gap: 0;
}

#clawground .playground-container.agent-sidebar-hidden .agent-sidebar,
#clawground .playground-container.agent-sidebar-hidden .sidebar-resizer {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-16px);
    width: 0;
    min-width: 0;
    max-width: 0;
    overflow: hidden;
    border: 0;
}

.spaces-board-controls,
.spaces-space-rail,
#clawground .agent-sidebar,
#clawground .sidebar-resizer {
    transition: transform 0.24s ease, opacity 0.24s ease, box-shadow 0.24s ease;
}

.spaces-wrap {
    grid-column: 1;
}

.spaces-space-rail {
    grid-column: 2;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    background: rgba(6, 6, 6, 0.55);
    padding: 0.55rem 0.42rem;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 0.55rem;
    position: relative;
    z-index: 2200;
}

.spaces-space-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.48rem;
    overflow-y: auto;
    overflow-x: visible;
    padding-right: 2px;
}

.spaces-space-circle {
    position: relative;
}

.spaces-space-circle {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(20, 20, 20, 0.88);
    color: #efefef;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    cursor: pointer;
    box-sizing: border-box;
    flex-shrink: 0;
    padding: 0;
}

.global-hover-tooltip {
    position: fixed;
    left: -9999px;
    top: -9999px;
    z-index: 2147483647;
    background: rgba(8, 8, 8, 0.98);
    color: #fffc9f;
    border: 1px solid rgba(255, 252, 0, 0.45);
    border-radius: 7px;
    padding: 0.28rem 0.5rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.2;
    white-space: nowrap;
    max-width: min(72vw, 360px);
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}

.global-hover-tooltip.nav-icon-tooltip {
    padding: 0.34rem 0.62rem;
    font-size: 0.72rem;
    border-radius: 8px;
    letter-spacing: 0.03em;
    text-transform: none;
}

.spaces-space-circle:hover {
    border-color: rgba(255, 252, 0, 0.72);
    color: #fff8be;
}

.spaces-space-circle.active {
    border-color: rgba(255, 252, 0, 0.78);
    color: #111;
    background: rgba(255, 252, 0, 0.12);
    box-shadow: 0 0 12px rgba(255, 252, 0, 0.22);
}

.spaces-space-circle.has-cover {
    overflow: hidden;
    color: transparent;
    background: rgba(20, 20, 20, 0.88);
}

.spaces-space-circle.has-cover.active {
    background: rgba(20, 20, 20, 0.88);
}

.spaces-space-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 50%;
    transform: scale(1.24);
    pointer-events: none;
}

.spaces-space-create {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 0.2rem;
}

.spaces-space-create #spaces-create-btn {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    font-size: 1.55rem;
    line-height: 1;
    font-weight: 700;
    padding: 0;
}

.spaces-wrap {
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 0.55rem;
}

.spaces-timeline-dock {
    min-height: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(34, 34, 36, 0.98) 0%, rgba(22, 22, 24, 0.98) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 8px 22px rgba(0, 0, 0, 0.28);
    overflow: hidden;
}

.spaces-timeline-toolbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.55rem;
    padding: 0.38rem 0.5rem;
}

.spaces-timeline-transport {
    display: inline-flex;
    align-items: center;
    gap: 0.18rem;
}

.spaces-timeline-btn {
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(12, 12, 14, 0.92);
    color: #d8d8dc;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    font-size: 0.68rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.spaces-timeline-btn:hover:not(:disabled) {
    border-color: rgba(79, 195, 247, 0.65);
    color: #9fe8ff;
    background: rgba(79, 195, 247, 0.08);
}

.spaces-timeline-btn:disabled {
    opacity: 0.35;
    cursor: default;
}

.spaces-timeline-track-wrap {
    min-width: 0;
}

.spaces-timeline-track {
    position: relative;
    height: 54px;
    border-radius: 8px;
    background: rgba(8, 8, 10, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    touch-action: none;
    cursor: ew-resize;
}

.spaces-timeline-rail {
    position: absolute;
    left: 10px;
    right: 10px;
    top: 18px;
    height: 2px;
    background: linear-gradient(90deg, rgba(79, 195, 247, 0.15), rgba(255, 171, 64, 0.35), rgba(79, 195, 247, 0.15));
    border-radius: 999px;
}

.spaces-timeline-events {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: stretch;
    gap: 2px;
    padding: 6px 8px 4px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
}

.spaces-timeline-event {
    position: relative;
    flex: 1 0 72px;
    max-width: 140px;
    min-width: 56px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    background: rgba(18, 18, 20, 0.92);
    color: #c9c9cf;
    cursor: pointer;
    padding: 0.2rem 0.28rem 0.15rem;
    text-align: left;
    overflow: hidden;
}

.spaces-timeline-event-bar {
    display: block;
    height: 4px;
    border-radius: 999px;
    background: var(--tl-color, #4fc3f7);
    margin-bottom: 0.22rem;
    box-shadow: 0 0 8px color-mix(in srgb, var(--tl-color, #4fc3f7) 55%, transparent);
}

.spaces-timeline-event-label {
    display: block;
    font-size: 0.58rem;
    font-weight: 700;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.spaces-timeline-event.is-past {
    opacity: 0.72;
}

.spaces-timeline-event.is-active {
    border-color: rgba(255, 171, 64, 0.85);
    background: linear-gradient(180deg, rgba(255, 171, 64, 0.18), rgba(18, 18, 20, 0.95));
    color: #fff2d6;
    box-shadow: 0 0 0 1px rgba(255, 171, 64, 0.25), 0 0 14px rgba(255, 171, 64, 0.18);
}

.spaces-timeline-playhead {
    position: absolute;
    top: 4px;
    bottom: 4px;
    width: 2px;
    margin-left: -1px;
    background: #ffab40;
    box-shadow: 0 0 10px rgba(255, 171, 64, 0.75);
    pointer-events: none;
    z-index: 3;
    transition: left 0.04s linear;
}

body.spaces-timeline-scrubbing .spaces-timeline-playhead {
    transition: none;
}

.spaces-timeline-playhead::before {
    content: "";
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: #ffab40;
    box-shadow: 0 0 8px rgba(255, 171, 64, 0.8);
}

.spaces-timeline-scrub {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: ew-resize;
    z-index: 4;
}

.spaces-timeline-empty {
    align-self: center;
    margin: 0 auto;
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 600;
    letter-spacing: 0.02em;
}

.spaces-timeline-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.08rem;
    min-width: 88px;
}

.spaces-timeline-meta-label {
    font-size: 0.66rem;
    font-weight: 700;
    color: #f0f0f2;
    max-width: 160px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: right;
}

.spaces-timeline-meta-count {
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(79, 195, 247, 0.9);
}

.spaces-panel.spaces-canvas-fullscreen .spaces-timeline-dock {
    border-radius: 0 0 8px 8px;
}

.spaces-board-controls {
    display: flex;
    align-items: center;
    gap: 0.42rem;
    flex-wrap: wrap;
    width: 100%;
    position: relative;
    z-index: 16;
}

.spaces-members-menu {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: auto;
    flex-shrink: 0;
}

.spaces-members-btn {
    position: relative;
}

.spaces-members-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--brand-green, #42f57b);
    color: #0a0a0a;
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    pointer-events: none;
}

.spaces-members-badge.hidden {
    display: none;
}

.spaces-members-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: auto;
    z-index: 40;
    min-width: 260px;
    max-width: min(320px, 88vw);
    padding: 0.55rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(12, 12, 12, 0.96);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(10px);
}

.spaces-members-dropdown.hidden {
    display: none;
}

.spaces-members-dropdown-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.2rem 0.35rem 0.55rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 0.45rem;
}

.spaces-members-dropdown-head strong {
    font-size: 0.82rem;
    color: #f4f4f4;
}

.spaces-members-dropdown-head span {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.55);
    white-space: nowrap;
}

.spaces-members-section + .spaces-members-section {
    margin-top: 0.55rem;
    padding-top: 0.55rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.spaces-members-section-label {
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    margin: 0 0.35rem 0.35rem;
}

.spaces-members-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.55rem;
    padding: 0.42rem 0.35rem;
    border-radius: 8px;
}

.spaces-members-row:hover {
    background: rgba(255, 255, 255, 0.04);
}

.spaces-members-row.is-peer.is-locatable {
    cursor: pointer;
}

.spaces-members-row.is-peer.is-locatable:hover,
.spaces-members-row.is-peer.is-locatable:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    outline: none;
    box-shadow: inset 0 0 0 1px rgba(255, 252, 0, 0.22);
}

.spaces-members-row.is-peer[aria-disabled="true"] {
    opacity: 0.72;
    cursor: default;
}

.spaces-members-row.is-peer[aria-disabled="true"]:hover {
    background: transparent;
    box-shadow: none;
}

.spaces-members-avatar {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    font-weight: 700;
    color: color-mix(in srgb, var(--member-color, #42f57b) 88%, #ffffff);
    background: color-mix(in srgb, var(--member-color, #42f57b) 34%, transparent);
    border: 1px solid color-mix(in srgb, var(--member-color, #42f57b) 56%, transparent);
    box-shadow: 0 0 12px color-mix(in srgb, var(--member-color, #42f57b) 22%, transparent);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.spaces-members-row.is-self .spaces-members-avatar {
    color: #0d0d0d;
    background: var(--member-color, #42f57b);
    border-color: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.spaces-members-copy {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.spaces-members-copy strong {
    font-size: 0.8rem;
    color: #f2f2f2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.spaces-members-copy span {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.52);
}

.spaces-members-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    flex-shrink: 0;
}

.spaces-members-dot.online {
    background: color-mix(in srgb, var(--member-color, #42f57b) 72%, transparent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--member-color, #42f57b) 22%, transparent);
}

.spaces-members-access,
.spaces-members-empty {
    font-size: 0.76rem;
    color: rgba(255, 255, 255, 0.68);
    padding: 0.2rem 0.35rem 0.35rem;
    line-height: 1.35;
}

.spaces-share-corner {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 25;
    width: 34px;
    height: 34px;
    min-width: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    border-radius: 8px;
    background: rgba(10, 10, 10, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #f2f2f2;
    overflow: visible;
}

.spaces-share-corner:hover {
    color: var(--brand-green);
    border-color: rgba(66, 245, 123, 0.45);
}

.spaces-share-icon {
    width: 16px;
    height: 16px;
    display: block;
}

#spaces-share-modal.spaces-share-popover {
    display: block;
    background: transparent;
    backdrop-filter: none;
    pointer-events: auto;
    z-index: 2500;
}

#spaces-share-modal.spaces-share-popover.hidden {
    display: none;
}

#spaces-share-modal.spaces-share-popover .spaces-share-modal-content {
    position: fixed;
    left: 0;
    top: 0;
    margin: 0;
    padding: 1rem 1.05rem 1.1rem;
    width: min(420px, calc(100vw - 24px));
    max-width: min(420px, calc(100vw - 24px));
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(8, 8, 8, 0.98);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 252, 0, 0.12);
    pointer-events: auto;
    z-index: 2600;
}

#spaces-share-modal.spaces-share-popover .spaces-share-modal-content h2 {
    margin: 0 2rem 0.35rem 0;
    font-size: 1.05rem;
}

#spaces-share-modal.spaces-share-popover .spaces-share-modal-content .settings-subtle {
    margin-bottom: 0.75rem;
    font-size: 0.78rem;
    line-height: 1.35;
}

#spaces-share-modal.spaces-share-popover .spaces-share-modal-content .close {
    right: 0.55rem;
    top: 0.45rem;
    width: 30px;
    height: 30px;
    line-height: 26px;
    text-align: center;
    font-size: 1.35rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(16, 16, 16, 0.92);
}

#spaces-share-modal.spaces-share-popover .spaces-share-modal-content .form-group {
    margin-bottom: 0.65rem;
}

#spaces-share-modal.spaces-share-popover .edit-modal-actions {
    margin-top: 0.55rem;
}

.spaces-share-modal-content {
    max-width: 520px;
}

.spaces-share-link-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.55rem;
    align-items: center;
}

.spaces-share-link-row input {
    width: 100%;
}

.spaces-share-copy-btn {
    flex: 0 0 auto;
    padding: 0.45rem 0.85rem;
    min-height: 36px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: none;
    border-radius: 8px;
    box-shadow: none;
    white-space: nowrap;
}

.spaces-share-copy-btn:hover {
    transform: none;
    box-shadow: 0 0 0 1px rgba(255, 252, 0, 0.35);
}

.spaces-share-access-select {
    width: 100%;
}

.spaces-share-feedback {
    min-height: 1.2rem;
    margin-top: 0.35rem;
}

.spaces-collab-cursors {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 120;
}

.spaces-collab-presence {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 121;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    pointer-events: none;
}

.spaces-collab-presence.hidden {
    display: none;
}

.spaces-collab-presence-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 0.45rem;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--collab-color, #42f57b) 72%, transparent);
    background: color-mix(in srgb, var(--collab-color, #42f57b) 42%, rgba(12, 14, 20, 0.88));
    color: color-mix(in srgb, var(--collab-color, #42f57b) 90%, #ffffff);
    font-size: 0.72rem;
    font-weight: 800;
    font-family: inherit;
    line-height: 1;
    box-shadow:
        0 0 16px color-mix(in srgb, var(--collab-color, #42f57b) 34%, transparent),
        0 2px 10px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    pointer-events: auto;
}

.spaces-collab-presence-chip.is-locatable {
    cursor: pointer;
}

.spaces-collab-presence-chip.is-locatable:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--collab-color, #42f57b) 88%, #ffffff);
}

.spaces-collab-presence-chip:disabled {
    opacity: 0.72;
    cursor: default;
}

.spaces-collab-cursor {
    position: absolute;
    transform: translate(-2px, -2px);
    color: var(--collab-color, #42f57b);
    filter:
        drop-shadow(0 0 8px color-mix(in srgb, var(--collab-color, #42f57b) 48%, transparent))
        drop-shadow(0 2px 5px rgba(0, 0, 0, 0.5));
    transition: left 0.08s linear, top 0.08s linear;
    will-change: left, top;
}

.spaces-collab-cursor svg {
    width: 20px;
    height: 24px;
    display: block;
    opacity: 0.92;
}

.spaces-collab-cursor-label {
    display: inline-block;
    margin-left: 14px;
    margin-top: -2px;
    padding: 0.16rem 0.55rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--collab-color, #42f57b) 48%, rgba(12, 14, 20, 0.82));
    border: 1px solid color-mix(in srgb, var(--collab-color, #42f57b) 72%, transparent);
    color: color-mix(in srgb, var(--collab-color, #42f57b) 92%, #ffffff);
    font-size: 0.68rem;
    font-weight: 700;
    white-space: nowrap;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow:
        0 0 14px color-mix(in srgb, var(--collab-color, #42f57b) 28%, transparent),
        0 2px 8px rgba(0, 0, 0, 0.35);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

body.spaces-collab-view-only .spaces-canvas > * {
    pointer-events: none;
}

body.spaces-collab-view-only .spaces-board-controls .spaces-mode-toggle:not(#spaces-nav-btn),
body.spaces-collab-view-only .spaces-board-controls .spaces-draw-control,
body.spaces-collab-view-only #spaces-clear-draw-btn,
body.spaces-collab-view-only #spaces-remove-zone,
body.spaces-collab-view-only #spaces-mark-btn,
body.spaces-collab-view-only #spaces-draw-btn,
body.spaces-collab-view-only #spaces-text-btn,
body.spaces-collab-view-only #spaces-sheet-btn,
body.spaces-collab-view-only #spaces-doc-btn,
body.spaces-collab-view-only #spaces-deck-btn,
body.spaces-collab-view-only #spaces-erase-btn {
    opacity: 0.45;
    pointer-events: none;
}

.spaces-mode-toggle {
    position: relative;
    min-width: 42px;
    width: 42px;
    height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    color: #bdbdbd;
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(10, 10, 10, 0.9);
    transition: border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.spaces-mode-toggle.active,
.spaces-mode-toggle[aria-pressed="true"] {
    color: #111;
    border-color: rgba(255, 252, 0, 0.95);
    background: linear-gradient(180deg, rgba(255, 252, 0, 0.98), rgba(245, 221, 0, 0.98));
    box-shadow: 0 0 0 1px rgba(255, 252, 0, 0.28), 0 0 14px rgba(255, 252, 0, 0.32);
    transform: translateY(-1px);
}

.spaces-draw-control {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 10px;
    background: rgba(10, 10, 10, 0.72);
    padding: 0.22rem 0.38rem;
    color: #d6d6d6;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: var(--interactive-transition);
}

.spaces-draw-control input[type="color"] {
    width: 24px;
    height: 24px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 6px;
    background: transparent;
    padding: 0;
    cursor: pointer;
    touch-action: none;
}

.spaces-draw-width-control input[type="range"] {
    width: 86px;
}

.spaces-draw-control input[type="range"] {
    touch-action: none;
    cursor: ew-resize;
}

.spaces-text-size-control input[type="range"] {
    width: 88px;
}

.spaces-text-font-control select {
    min-width: 138px;
    max-width: 180px;
    height: 26px;
    border-radius: 7px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(12, 12, 12, 0.9);
    color: #f2f2f2;
    font-size: 0.72rem;
    padding: 0 0.35rem;
}

.spaces-text-font-control select option {
    font-size: 0.82rem;
    line-height: 1.35;
    padding: 0.2rem 0.35rem;
    background: #12141c;
    color: #f2f2f2;
}

.spaces-font-btn {
    min-width: 52px;
    height: 26px;
    padding: 0 0.45rem;
    font-size: 0.66rem;
}

.spaces-icon-btn {
    min-width: 28px;
    width: 28px;
    height: 26px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    line-height: 1;
}

.spaces-board-controls > .spaces-icon-btn {
    min-width: 42px;
    width: 42px;
    height: 34px;
    font-size: 0.9rem;
}

.spaces-board-controls .spaces-removebg-btn {
    min-width: auto;
    width: auto;
    height: 34px;
    padding: 0 0.62rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #fff8c2;
    border-color: rgba(255, 252, 0, 0.42);
    background: rgba(255, 252, 0, 0.1);
    flex-shrink: 0;
}

.spaces-board-controls .spaces-removebg-btn:hover {
    background: rgba(255, 252, 0, 0.2);
    color: #fffce8;
}

.spaces-board-controls .spaces-removebg-btn.is-busy {
    opacity: 0.65;
    pointer-events: none;
}

#spaces-draw-width-value {
    min-width: 34px;
    text-align: right;
    color: #fff6a6;
    font-weight: 800;
    letter-spacing: 0.01em;
    text-transform: none;
}

.spaces-viewport.spaces-immersive-env {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: background-image 0.8s ease, background-color 0.8s ease;
}

.spaces-viewport.spaces-env-universe {
    background-color: #02020a;
    background-image:
        radial-gradient(ellipse at 18% 14%, rgba(120, 90, 255, 0.28), transparent 48%),
        radial-gradient(ellipse at 82% 78%, rgba(40, 120, 255, 0.18), transparent 42%),
        radial-gradient(circle at 50% 120%, rgba(255, 252, 0, 0.05), transparent 55%),
        linear-gradient(180deg, #03030f 0%, #010106 100%);
}

.spaces-viewport.spaces-env-ocean {
    background-color: #03131f;
    background-image:
        radial-gradient(ellipse at 30% 10%, rgba(80, 200, 255, 0.22), transparent 45%),
        linear-gradient(180deg, #04283f 0%, #010a12 100%);
}

.spaces-viewport.spaces-env-forest {
    background-color: #07140d;
    background-image:
        radial-gradient(ellipse at 40% 0%, rgba(120, 220, 120, 0.18), transparent 50%),
        linear-gradient(180deg, #0d2418 0%, #040a07 100%);
}

.spaces-viewport.spaces-env-beach {
    background-color: #1a2838;
    background-image: linear-gradient(180deg, #4a90c2 0%, #f2d2a0 42%, #0d3d56 100%);
}

.spaces-viewport.spaces-env-desert {
    background-color: #2a1a0d;
    background-image: linear-gradient(180deg, #f0c27b 0%, #8b5a2b 55%, #3a2414 100%);
}

.spaces-viewport.spaces-env-aurora {
    background-color: #020812;
    background-image:
        radial-gradient(ellipse at 50% 0%, rgba(80, 255, 180, 0.22), transparent 55%),
        radial-gradient(ellipse at 30% 20%, rgba(120, 80, 255, 0.18), transparent 45%),
        linear-gradient(180deg, #041018 0%, #010408 100%);
}

.spaces-viewport.spaces-env-city {
    background-color: #0a0d14;
    background-image:
        radial-gradient(ellipse at 50% 100%, rgba(255, 200, 80, 0.12), transparent 50%),
        linear-gradient(180deg, #111827 0%, #020409 100%);
}

.spaces-viewport.spaces-env-scene {
    background-color: #0a0d14;
    background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0.35));
}

.spaces-viewport {
    position: relative;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    overflow: hidden;
    min-height: 0;
    height: 100%;
    background: var(--spaces-viewport-bg-landing-demo);
    cursor: grab;
    touch-action: none;
}

.spaces-viewport.spaces-viewport-bg-classic {
    background: var(--spaces-viewport-bg-classic);
}

.spaces-viewport-starfield {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    --star-parallax-x: 0px;
    --star-parallax-y: 0px;
}

.spaces-starfield-depth {
    position: absolute;
    inset: -4%;
    width: 108%;
    height: 108%;
    will-change: transform;
}

.spaces-starfield-depth-far {
    opacity: 0.82;
    transform: translate3d(
        calc(var(--star-parallax-x) * 0.12),
        calc(var(--star-parallax-y) * 0.12),
        0
    );
    animation: spacesStarfieldDriftFar 28s ease-in-out infinite alternate;
}

.spaces-starfield-depth-mid {
    opacity: 0.92;
    transform: translate3d(
        calc(var(--star-parallax-x) * 0.28),
        calc(var(--star-parallax-y) * 0.28),
        0
    );
}

.spaces-starfield-depth-near {
    opacity: 0.96;
    transform: translate3d(
        calc(var(--star-parallax-x) * 0.48),
        calc(var(--star-parallax-y) * 0.48),
        0
    );
    mix-blend-mode: screen;
}

.spaces-viewport.spaces-immersive-env .spaces-viewport-starfield {
    opacity: 0.72;
    visibility: visible;
}

.spaces-viewport.spaces-immersive-env.spaces-env-universe .spaces-viewport-starfield,
.spaces-viewport.spaces-immersive-env.spaces-env-aurora .spaces-viewport-starfield,
.spaces-viewport.spaces-immersive-env.spaces-env-scene .spaces-viewport-starfield {
    opacity: 0.9;
}

.spaces-viewport.spaces-immersive-env.spaces-env-ocean .spaces-viewport-starfield {
    opacity: 0.35;
}

.spaces-viewport.spaces-immersive-env.spaces-env-forest .spaces-viewport-starfield,
.spaces-viewport.spaces-immersive-env.spaces-env-beach .spaces-viewport-starfield,
.spaces-viewport.spaces-immersive-env.spaces-env-desert .spaces-viewport-starfield,
.spaces-viewport.spaces-immersive-env.spaces-env-city .spaces-viewport-starfield {
    opacity: 0.16;
}

.spaces-starfield-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.spaces-starfield-twinkles,
.spaces-starfield-sparkles {
    position: absolute;
    inset: 0;
    transform: translate3d(
        calc(var(--star-parallax-x) * 0.36),
        calc(var(--star-parallax-y) * 0.36),
        0
    );
}

.spaces-star-twinkle {
    position: absolute;
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 4px rgba(196, 220, 255, 0.75);
    transform: translate(-50%, -50%);
    animation: spacesStarTwinkle ease-in-out infinite;
    opacity: 0.16;
}

.spaces-star-twinkle.warm {
    background: rgba(255, 244, 210, 0.95);
    box-shadow: 0 0 5px rgba(255, 220, 160, 0.55);
}

.spaces-star-twinkle.cool {
    background: rgba(196, 220, 255, 0.95);
    box-shadow: 0 0 6px rgba(140, 180, 255, 0.65);
}

.spaces-star-sparkle {
    position: absolute;
    width: 10px;
    height: 10px;
    transform: translate(-50%, -50%) scale(var(--sparkle-scale, 0.75));
    animation: spacesStarSparkle ease-in-out infinite;
    opacity: 0.22;
}

.spaces-star-sparkle::before,
.spaces-star-sparkle::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0));
    border-radius: 999px;
}

.spaces-star-sparkle::before {
    width: 1px;
    height: 10px;
}

.spaces-star-sparkle::after {
    width: 10px;
    height: 1px;
}

.spaces-star-sparkle.warm::before,
.spaces-star-sparkle.warm::after {
    background: linear-gradient(180deg, rgba(255, 244, 210, 0), rgba(255, 236, 190, 0.95), rgba(255, 244, 210, 0));
}

@keyframes spacesStarfieldDriftFar {
    0% {
        transform: translate3d(
            calc(var(--star-parallax-x) * 0.12 - 3px),
            calc(var(--star-parallax-y) * 0.12 - 2px),
            0
        );
    }
    100% {
        transform: translate3d(
            calc(var(--star-parallax-x) * 0.12 + 3px),
            calc(var(--star-parallax-y) * 0.12 + 2px),
            0
        );
    }
}

@keyframes spacesStarTwinkle {
    0%, 100% {
        opacity: 0.08;
        transform: translate(-50%, -50%) scale(0.65);
    }
    45% {
        opacity: 0.95;
        transform: translate(-50%, -50%) scale(1.2);
    }
}

@keyframes spacesStarSparkle {
    0%, 100% {
        opacity: 0.08;
        transform: translate(-50%, -50%) scale(calc(var(--sparkle-scale, 0.75) * 0.7)) rotate(0deg);
    }
    40% {
        opacity: 0.92;
        transform: translate(-50%, -50%) scale(calc(var(--sparkle-scale, 0.75) * 1.15)) rotate(18deg);
    }
    70% {
        opacity: 0.35;
        transform: translate(-50%, -50%) scale(calc(var(--sparkle-scale, 0.75) * 0.95)) rotate(-12deg);
    }
}

.spaces-viewport.nav-mode {
    cursor: grab;
}

.spaces-viewport.nav-mode:active {
    cursor: grabbing;
}

.spaces-viewport.nav-mode {
    cursor: grab;
}

.spaces-viewport.nav-mode:active {
    cursor: grabbing;
}

.spaces-viewport.draw-mode {
    cursor: crosshair;
}

.spaces-viewport.text-mode {
    cursor: text;
}

.spaces-viewport.text-mode .spaces-draw-layer {
    pointer-events: none;
}

.spaces-viewport.drop-ready {
    border-color: rgba(255, 252, 0, 0.85);
    box-shadow: inset 0 0 0 2px rgba(255, 252, 0, 0.28), 0 0 24px rgba(255, 252, 0, 0.24);
}

.spaces-viewport.nav-mode {
    cursor: grab;
}

.spaces-viewport.nav-mode:active {
    cursor: grabbing;
}

.spaces-fullscreen-corner {
    position: absolute;
    top: 10px;
    right: 50px;
    z-index: 25;
    pointer-events: auto;
}

#clawground .playground-container.spaces-canvas-fullscreen-target {
    position: relative;
    grid-template-columns: minmax(0, 1fr);
}

#clawground .playground-container.spaces-canvas-fullscreen-target .playground-main {
    grid-column: 1;
    min-width: 0;
    position: relative;
    padding-bottom: 0;
}

#clawground .playground-container.spaces-canvas-fullscreen-target .agent-sidebar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width, 280px);
    z-index: 2200;
    transform: translateX(calc(-100% + 10px));
    opacity: 0;
    pointer-events: none;
    border-right: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(5, 5, 5, 0.9);
}

#clawground .playground-container.spaces-canvas-fullscreen-target .sidebar-resizer {
    display: none;
}

#clawground .playground-container.spaces-canvas-fullscreen-target.spaces-fs-show-left .agent-sidebar {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

.spaces-panel.spaces-canvas-fullscreen {
    padding: 0;
}

.spaces-panel.spaces-canvas-fullscreen .spaces-shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
}

.spaces-panel.spaces-canvas-fullscreen .spaces-wrap {
    grid-template-rows: minmax(0, 1fr);
    gap: 0;
}

.spaces-panel.spaces-canvas-fullscreen .spaces-viewport {
    border-radius: 0;
    border: 0;
}

.spaces-panel.spaces-canvas-fullscreen .spaces-board-controls {
    position: absolute;
    left: 14px;
    top: 12px;
    z-index: 2300;
    transform: translateY(-140%);
    opacity: 0;
    pointer-events: none;
    background: rgba(6, 6, 6, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    padding: 0.42rem 0.46rem;
}

.spaces-panel.spaces-canvas-fullscreen .spaces-space-rail {
    position: absolute;
    right: 12px;
    top: 12px;
    bottom: 12px;
    width: 88px;
    z-index: 2300;
    transform: translateX(125%);
    opacity: 0;
    pointer-events: none;
}

#clawground .playground-container.spaces-canvas-fullscreen-target.spaces-fs-show-top .spaces-panel.spaces-canvas-fullscreen .spaces-board-controls {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

#clawground .playground-container.spaces-canvas-fullscreen-target.spaces-fs-show-right .spaces-panel.spaces-canvas-fullscreen .spaces-space-rail {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

#clawground .playground-container.spaces-canvas-fullscreen-target .chat-input-area {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2250;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(8, 8, 8, 0.92);
    backdrop-filter: blur(8px);
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
    padding: 0.85rem 1rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -12px 28px rgba(0, 0, 0, 0.35);
    transition: transform 0.18s ease, opacity 0.18s ease;
}

#clawground .playground-container.spaces-canvas-fullscreen-target.spaces-fs-show-bottom .chat-input-area {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

body.is-authenticated.spaces-mode-active #clawground #clawground-input-area {
    display: flex;
    visibility: visible;
    opacity: 1;
    margin-top: auto;
    flex: 0 0 auto;
    position: sticky;
    bottom: 0;
    z-index: 50;
    width: 100%;
    padding: 0.85rem 1.25rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
    background: rgba(8, 8, 8, 0.94);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.35);
}

body.is-authenticated.spaces-mode-active #clawground #clawground-send-btn {
    background: #fffc00;
    background-color: #fffc00;
    color: #000;
    border: 1px solid rgba(255, 252, 0, 0.88);
    box-shadow: 0 0 12px rgba(255, 252, 0, 0.35);
}

body.is-authenticated.spaces-mode-active #clawground #clawground-send-btn:hover:not(:disabled) {
    background: #fff066;
    background-color: #fff066;
    border-color: #fffc00;
    box-shadow: 0 0 16px rgba(255, 252, 0, 0.5);
}

body.is-authenticated.spaces-mode-active #clawground .playground-main {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
}

body.is-authenticated.spaces-mode-active #clawground .spaces-panel {
    flex: 1 1 auto;
    min-height: 0;
    padding: 0.5rem 0.5rem 0;
}

#spaces-share-presence,
.spaces-share-presence {
    display: none !important;
}

#spaces-members-menu,
.spaces-members-menu {
    display: none !important;
}

body.is-authenticated.spaces-mode-active footer {
    display: none;
}

.spaces-canvas {
    --spaces-bubble-counter-scale: 1;
    position: absolute;
    top: 0;
    left: 0;
    width: 120000px;
    height: 120000px;
    transform-origin: 0 0;
    will-change: transform;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 88px 88px, 88px 88px;
}

.spaces-draw-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: auto;
}

.spaces-draw-reticle {
    position: absolute;
    left: 0;
    top: 0;
    width: 10px;
    height: 10px;
    border: 2px solid #fffc00;
    border-radius: 999px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 40;
    opacity: 0.95;
}

.spaces-draw-reticle.spaces-reticle-erase {
    border-style: dashed;
    background: rgba(255, 100, 100, 0.12);
}

.spaces-stroke {
    cursor: grab;
}

.spaces-stroke:active {
    cursor: grabbing;
}

.spaces-stroke {
    pointer-events: stroke;
    cursor: pointer;
}

.spaces-stroke.selected {
    stroke: #ffffff !important;
    filter: drop-shadow(0 0 4px rgba(255, 252, 0, 0.82));
}

/* Text mode: Canva-style plain text, no panel/box */
.spaces-note {
    position: absolute;
    min-width: 80px;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    font-size: 1rem;
    line-height: 1.4;
    cursor: grab;
    user-select: none;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    box-shadow: none;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    z-index: 16;
    pointer-events: auto;
}

.spaces-note.selected {
    outline: 1px dashed rgba(255, 252, 0, 0.5);
    outline-offset: 1px;
}

.spaces-note.is-placeholder {
    opacity: 0.45;
}

.spaces-note-editor {
    position: absolute;
    min-width: 80px;
    padding: 0.2rem 0.3rem;
    border: none;
    border-radius: 0;
    background: transparent;
    font-size: 1rem;
    line-height: 1.4;
    box-shadow: none;
    z-index: 24;
    pointer-events: auto;
    user-select: text;
    overflow-wrap: break-word;
    resize: none;
    overflow: hidden;
    outline: 1px solid rgba(255, 252, 0, 0.4);
    outline-offset: 2px;
}

.spaces-note-editor:focus {
    outline-color: rgba(255, 252, 0, 0.8);
}

.spaces-zone {
    position: absolute;
    border: 1px solid transparent;
    border-radius: 10px;
    overflow: hidden;
    background: transparent;
    cursor: grab;
}

.spaces-zone.selected {
    border-style: solid;
    border-color: rgba(255, 252, 0, 0.95);
    box-shadow: inset 0 0 0 1px rgba(255, 252, 0, 0.3), 0 0 16px rgba(255, 252, 0, 0.22);
    background: rgba(255, 252, 0, 0.12);
}

.spaces-zone:active {
    cursor: grabbing;
}

.spaces-zone-draft {
    pointer-events: none;
    border-style: dashed;
    background: rgba(255, 252, 0, 0.08);
}

.spaces-selection-marquee {
    border-color: rgba(120, 180, 255, 0.95);
    background: rgba(120, 180, 255, 0.12);
    box-shadow: 0 0 0 1px rgba(120, 180, 255, 0.25);
}

.spaces-zone-prompt-target {
    pointer-events: auto;
    border-style: dashed;
    border-color: rgba(255, 252, 0, 0.92);
    background: rgba(255, 252, 0, 0.1);
    box-shadow: inset 0 0 0 1px rgba(255, 252, 0, 0.28);
    cursor: grab;
}

.spaces-zone-prompt-target:active {
    cursor: grabbing;
}

.spaces-zone-prompt-target.selected {
    border-color: rgba(255, 252, 0, 0.98);
    box-shadow: inset 0 0 0 1px rgba(255, 252, 0, 0.36), 0 0 16px rgba(255, 252, 0, 0.26);
}

.spaces-zone-task {
    background: rgba(255, 252, 0, 0.06);
    padding: 0.42rem 0.48rem;
    color: #f3f3f3;
    font-size: 0.68rem;
    line-height: 1.3;
    white-space: pre-wrap;
}

.spaces-zone-image {
    background: transparent;
    overflow: visible;
}

.spaces-zone-visual {
    position: absolute;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow:
        0 18px 48px rgba(0, 0, 0, 0.42),
        inset 0 0 0 1px rgba(255, 252, 0, 0.08);
    pointer-events: none;
    transform-origin: center center;
}

.spaces-zone-visual.demo-visual-enter {
    animation: spacesDemoVisualEnter 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes spacesDemoVisualEnter {
    from {
        opacity: 0;
        transform: scale(0.86);
        filter: blur(10px);
    }
    to {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
}

.spaces-zone-visual-shimmer {
    position: absolute;
    inset: -40%;
    background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.14) 50%, transparent 65%);
    animation: spacesVisualShimmer 4.8s ease-in-out infinite;
    pointer-events: none;
}

.spaces-zone-visual-glow {
    position: absolute;
    inset: 0;
    box-shadow: inset 0 0 60px rgba(255, 252, 0, 0.08);
    pointer-events: none;
}

@keyframes spacesVisualShimmer {
    0%, 100% { transform: translateX(-18%) rotate(8deg); opacity: 0.35; }
    50% { transform: translateX(18%) rotate(8deg); opacity: 0.75; }
}

.spaces-visual-universe {
    background-color: #02020a;
    background-image:
        radial-gradient(ellipse at 18% 14%, rgba(120, 90, 255, 0.42), transparent 48%),
        radial-gradient(ellipse at 82% 78%, rgba(40, 120, 255, 0.28), transparent 42%),
        radial-gradient(circle at 50% 120%, rgba(255, 252, 0, 0.08), transparent 55%),
        linear-gradient(180deg, #03030f 0%, #010106 100%);
}

.spaces-visual-aurora {
    background-color: #020812;
    background-image:
        radial-gradient(ellipse at 50% 0%, rgba(80, 255, 180, 0.34), transparent 55%),
        radial-gradient(ellipse at 30% 20%, rgba(120, 80, 255, 0.28), transparent 45%),
        linear-gradient(180deg, #041018 0%, #010408 100%);
}

.spaces-visual-scene {
    background-color: #0a0d14;
    background-image:
        radial-gradient(ellipse at 50% 0%, rgba(255, 252, 0, 0.12), transparent 52%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.35));
}

.spaces-visual-ocean {
    background-color: #03131f;
    background-image:
        radial-gradient(ellipse at 30% 10%, rgba(80, 200, 255, 0.3), transparent 45%),
        linear-gradient(180deg, #04283f 0%, #010a12 100%);
}

.spaces-zone-port {
    position: absolute;
    top: 50%;
    width: 10px;
    height: 10px;
    margin-top: -5px;
    border-radius: 50%;
    background: rgba(255, 252, 0, 0.92);
    box-shadow: 0 0 0 2px rgba(14, 16, 22, 0.95);
    z-index: 3;
    opacity: 0;
    transform: scale(0.65);
    pointer-events: none;
    transition: opacity 0.14s ease, transform 0.14s ease, background 0.14s ease, box-shadow 0.14s ease;
}

.spaces-zone-port-in {
    left: -5px;
}

.spaces-zone-port-out {
    right: -5px;
}

.spaces-canvas-connectors-layer,
.spaces-canvas-connectors-preview {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 7;
    overflow: visible;
}

.spaces-canvas-connectors-preview {
    z-index: 20;
}

.spaces-canvas-connector {
    fill: none;
    stroke: rgba(255, 252, 0, 0.62);
    stroke-width: 2.5;
    pointer-events: stroke;
    cursor: pointer;
    vector-effect: non-scaling-stroke;
}

.spaces-canvas-connector-image {
    fill: none;
    stroke: rgba(255, 252, 0, 0.78);
    stroke-width: 2.5;
    pointer-events: stroke;
    cursor: pointer;
    vector-effect: non-scaling-stroke;
}

.spaces-canvas-connector.selected,
.spaces-canvas-connector-image.selected {
    stroke: #fffc00;
    stroke-width: 4.5;
    filter: drop-shadow(0 0 8px rgba(255, 252, 0, 0.9));
}

.spaces-canvas-connector:hover,
.spaces-canvas-connector-image:hover,
.spaces-deck-connector:hover {
    stroke: rgba(255, 252, 0, 0.92);
    stroke-width: 3.5;
}

.spaces-canvas-connector-preview {
    stroke: rgba(255, 252, 0, 0.9);
    stroke-dasharray: 6 4;
}

.spaces-canvas-connector-preview-disconnect {
    stroke: rgba(255, 140, 120, 0.95);
    stroke-dasharray: 4 5;
}

.spaces-canvas-port.port-attached {
    opacity: 1;
    transform: scale(1);
    background: #fffc00;
    box-shadow: 0 0 0 2px rgba(14, 16, 22, 0.95), 0 0 8px rgba(255, 252, 0, 0.7);
}

.spaces-canvas-connector-dot {
    fill: rgba(255, 252, 0, 0.92);
    stroke: rgba(14, 16, 22, 0.9);
    stroke-width: 1;
    pointer-events: none;
}

.spaces-canvas-connector-dot.selected {
    fill: #fffc00;
    stroke: #fff8c2;
    filter: drop-shadow(0 0 5px rgba(255, 252, 0, 0.95));
}

.spaces-zone-title-wrap {
    position: absolute;
    z-index: 8;
    display: flex;
    align-items: center;
    gap: 0.22rem;
    max-width: 100%;
}

.spaces-zone-title {
    border: 1px solid rgba(255, 252, 0, 0.5);
    background: rgba(12, 12, 12, 0.94);
    color: #fff3a8;
    border-radius: 8px;
    padding: 0.18rem 0.42rem;
    font-size: 0.62rem;
    line-height: 1.35;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: default;
}

.spaces-zone-title-edit {
    border: 1px solid rgba(255, 252, 0, 0.5);
    background: rgba(12, 12, 12, 0.94);
    color: #fff3a8;
    border-radius: 8px;
    padding: 0.14rem 0.34rem;
    font-size: 0.62rem;
    line-height: 1.2;
    cursor: pointer;
}

.spaces-zone-title:hover {
    border-color: rgba(255, 252, 0, 0.78);
    color: #fffce3;
}

.spaces-zone-title-edit:hover {
    border-color: rgba(255, 252, 0, 0.78);
    color: #fffce3;
}

.spaces-zone-title.selected {
    border-color: rgba(255, 252, 0, 0.96);
    color: #fffce3;
    box-shadow: 0 0 0 1px rgba(255, 252, 0, 0.28), 0 0 14px rgba(255, 252, 0, 0.2);
}

.spaces-zone-title-editor {
    border: 1px solid rgba(255, 252, 0, 0.78);
    background: rgba(12, 12, 12, 0.96);
    color: #fffce3;
    border-radius: 8px;
    padding: 0.18rem 0.42rem;
    font-size: 0.62rem;
    line-height: 1.35;
    width: 100%;
    min-width: 140px;
    max-width: 420px;
    outline: none;
}

.spaces-zone-title-editor:focus {
    border-color: rgba(255, 252, 0, 0.98);
    box-shadow: 0 0 0 1px rgba(255, 252, 0, 0.32), 0 0 14px rgba(255, 252, 0, 0.18);
}

.spaces-zone-title-edit.selected {
    border-color: rgba(255, 252, 0, 0.96);
    color: #fffce3;
    box-shadow: 0 0 0 1px rgba(255, 252, 0, 0.28), 0 0 14px rgba(255, 252, 0, 0.2);
}

.spaces-zone-prompt {
    position: absolute;
    left: 8px;
    right: 8px;
    top: 8px;
    z-index: 3;
    border: 1px solid rgba(255, 252, 0, 0.42);
    background: rgba(12, 12, 12, 0.9);
    color: #fff8c0;
    font-size: 0.64rem;
    line-height: 1.35;
    padding: 0.28rem 0.36rem;
    border-radius: 8px;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.16s ease, transform 0.16s ease;
    pointer-events: none;
}

.spaces-zone:hover .spaces-zone-prompt {
    opacity: 1;
    transform: translateY(0);
}

.spaces-link-card {
    position: absolute;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(8, 8, 8, 0.9);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.32);
    padding: 0.46rem 0.52rem 0.5rem;
    color: #f2f2f2;
    cursor: grab;
    overflow: hidden;
    z-index: 14;
    user-select: none;
}

.spaces-link-card.selected {
    border-color: rgba(255, 252, 0, 0.72);
    box-shadow: 0 0 0 1px rgba(255, 252, 0, 0.3), 0 10px 24px rgba(0, 0, 0, 0.45);
}

.spaces-link-card-head {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.42rem;
    margin-bottom: 0.3rem;
}

.spaces-link-favicon {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    object-fit: cover;
}

.spaces-link-favicon-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.04);
    font-size: 0.58rem;
}

.spaces-link-site {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: #cfcfcf;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.spaces-link-open {
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #fffc00;
    text-decoration: none;
    border: 1px solid rgba(255, 252, 0, 0.45);
    border-radius: 999px;
    padding: 0.12rem 0.42rem;
    background: rgba(255, 252, 0, 0.08);
    cursor: pointer;
    pointer-events: auto;
}

.spaces-link-open:hover {
    background: rgba(255, 252, 0, 0.18);
}

.spaces-link-image-wrap {
    width: 100%;
    height: 74px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 0.34rem;
    position: relative;
}

.spaces-link-image-wrap-youtube {
    height: 118px;
}

.spaces-link-play-badge {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.62);
    color: #fff;
    font-size: 0.72rem;
    line-height: 1;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
    border: none;
    padding: 0;
    pointer-events: auto;
    cursor: pointer;
    z-index: 2;
}

.spaces-link-play-badge:hover {
    background: rgba(0, 0, 0, 0.78);
    transform: translate(-50%, -50%) scale(1.06);
}

.spaces-link-youtube-embed-wrap.is-playing {
    cursor: default;
}

.spaces-link-youtube-embed {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    pointer-events: auto;
    background: #000;
}

.spaces-link-card-youtube .spaces-link-title {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.spaces-link-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.spaces-link-title {
    font-size: 0.72rem;
    font-weight: 800;
    color: #fff7bc;
    line-height: 1.25;
    margin-bottom: 0.22rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.spaces-link-desc {
    font-size: 0.62rem;
    line-height: 1.3;
    color: rgba(239, 239, 239, 0.86);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.spaces-link-loading {
    margin-top: 0.24rem;
    font-size: 0.58rem;
    color: rgba(255, 255, 255, 0.62);
}

.spaces-sheet-card {
    position: absolute;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 12px;
    background: rgba(8, 10, 14, 0.94);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.42);
    overflow: hidden;
    min-width: 220px;
    min-height: 160px;
    box-sizing: border-box;
}

.spaces-sheet-card.selected {
    border-color: rgba(255, 252, 0, 0.72);
    box-shadow: 0 0 0 1px rgba(255, 252, 0, 0.3), 0 10px 24px rgba(0, 0, 0, 0.45);
}

.spaces-sheet-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.35rem 0.45rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    cursor: grab;
}

.spaces-sheet-toolbar:active {
    cursor: grabbing;
}

.spaces-sheet-title {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.88);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.spaces-sheet-toolbar-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    flex-shrink: 0;
}

.spaces-sheet-toolbar-btn {
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.86);
    border-radius: 6px;
    padding: 0.12rem 0.38rem;
    font-size: 0.58rem;
    line-height: 1.2;
    cursor: pointer;
}

.spaces-sheet-toolbar-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.16rem 0.28rem;
    min-width: 26px;
    min-height: 24px;
}

.spaces-sheet-toolbar-icon {
    width: 14px;
    height: 14px;
    display: block;
    pointer-events: none;
}

.spaces-sheet-toolbar-btn:hover {
    border-color: rgba(255, 252, 0, 0.45);
    color: #fff8c2;
}

.spaces-sheet-body,
.spaces-sheet-scroll {
    flex: 1 1 auto;
    overflow: auto;
    min-height: 0;
    padding: 0.25rem;
}

.spaces-sheet-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 0.62rem;
}

.spaces-sheet-table th,
.spaces-sheet-table td {
    border: 1px solid rgba(255, 255, 255, 0.14);
    padding: 0;
    vertical-align: middle;
}

.spaces-sheet-table tbody td {
    min-width: 0;
}

.spaces-sheet-table thead th {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.72);
    font-weight: 600;
    text-align: center;
    height: 22px;
    position: relative;
}

.spaces-sheet-col-header {
    overflow: visible;
}

.spaces-sheet-col-label,
.spaces-sheet-row-label-text {
    display: block;
    pointer-events: none;
    user-select: none;
}

.spaces-sheet-col-resizer {
    position: absolute;
    top: 0;
    right: -4px;
    width: 8px;
    height: 100%;
    cursor: col-resize;
    z-index: 3;
    touch-action: none;
}

.spaces-sheet-col-resizer::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    transform: translateX(-50%);
    background: transparent;
    transition: background 0.12s ease;
}

.spaces-sheet-col-resizer:hover::after,
body.spaces-sheet-col-resizing .spaces-sheet-col-resizer::after {
    background: rgba(255, 252, 0, 0.72);
    box-shadow: 0 0 6px rgba(255, 252, 0, 0.25);
}

.spaces-sheet-corner {
    width: 28px;
    min-width: 28px;
}

.spaces-sheet-corner-col {
    width: 28px;
}

.spaces-sheet-row-label {
    width: 28px;
    min-width: 28px;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.72);
    font-weight: 600;
    position: relative;
    overflow: visible;
}

.spaces-sheet-row-resizer {
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 100%;
    height: 8px;
    cursor: row-resize;
    z-index: 3;
    touch-action: none;
}

.spaces-sheet-row-resizer::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    transform: translateY(-50%);
    background: transparent;
    transition: background 0.12s ease;
}

.spaces-sheet-row-resizer:hover::after,
body.spaces-sheet-row-resizing .spaces-sheet-row-resizer::after {
    background: rgba(255, 252, 0, 0.72);
    box-shadow: 0 0 6px rgba(255, 252, 0, 0.25);
}

body.spaces-sheet-col-resizing,
body.spaces-sheet-col-resizing * {
    cursor: col-resize !important;
    user-select: none !important;
}

body.spaces-sheet-row-resizing,
body.spaces-sheet-row-resizing * {
    cursor: row-resize !important;
    user-select: none !important;
}

.spaces-sheet-cell-input {
    width: 100%;
    height: 22px;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.92);
    padding: 0 0.35rem;
    font: inherit;
    outline: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.spaces-sheet-cell-input:focus {
    background: rgba(255, 252, 0, 0.08);
    box-shadow: inset 0 0 0 1px rgba(255, 252, 0, 0.45);
}

.spaces-sheet-cell-input.is-active-cell {
    background: rgba(255, 252, 0, 0.14);
    box-shadow: inset 0 0 0 2px rgba(255, 252, 0, 0.78);
}

.spaces-sheet-cell-input.is-selected-cell {
    background: rgba(255, 252, 0, 0.06);
    box-shadow: inset 0 0 0 1px rgba(255, 252, 0, 0.32);
}

.spaces-viewport.sheet-mode {
    cursor: crosshair;
}

.spaces-viewport.sheet-mode .spaces-draw-layer {
    pointer-events: none;
}

.spaces-doc-card {
    position: absolute;
    z-index: 6;
    display: flex;
    flex-direction: column;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28), 0 1px 0 rgba(255, 255, 255, 0.6) inset;
    overflow: hidden;
    box-sizing: border-box;
}

.spaces-doc-card.selected {
    box-shadow: 0 0 0 2px rgba(255, 252, 0, 0.72), 0 12px 32px rgba(0, 0, 0, 0.32);
}

.spaces-doc-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.42rem 0.65rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    background: linear-gradient(180deg, #fafafa 0%, #f3f3f3 100%);
    cursor: grab;
    flex-shrink: 0;
    user-select: none;
}

.spaces-doc-header:active {
    cursor: grabbing;
}

.spaces-doc-title {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: rgba(0, 0, 0, 0.55);
}

.spaces-doc-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 1rem 1.1rem 1.25rem;
    color: #1a1a1a;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 0.95rem;
    line-height: 1.65;
    outline: none;
    white-space: pre-wrap;
    word-break: break-word;
    background: #ffffff;
}

.spaces-doc-body:empty::before {
    content: 'Start writing...';
    color: rgba(0, 0, 0, 0.28);
    pointer-events: none;
}

.spaces-doc-body:focus {
    outline: none;
}

.spaces-viewport.doc-mode {
    cursor: crosshair;
}

.spaces-viewport.doc-mode .spaces-draw-layer {
    pointer-events: none;
}

.spaces-deck-toolbar-float {
    position: absolute;
    z-index: 7;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.32rem 0.45rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(12, 14, 20, 0.92);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.38);
    cursor: grab;
    backdrop-filter: blur(8px);
    max-width: min(92vw, 640px);
    transform: translateY(calc(-100% - var(--deck-toolbar-gap, 12px)));
    transform-origin: top left;
    pointer-events: auto;
}

.spaces-deck-toolbar-float:active {
    cursor: grabbing;
}

.spaces-deck-toolbar-float.selected {
    border-color: rgba(255, 252, 0, 0.55);
    box-shadow: 0 0 0 1px rgba(255, 252, 0, 0.28), 0 8px 22px rgba(0, 0, 0, 0.42);
}

.spaces-deck-title {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.88);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 9rem;
    cursor: text;
    border-radius: 4px;
    padding: 0.08rem 0.28rem;
    margin: -0.08rem 0.12rem -0.08rem -0.28rem;
}

.spaces-deck-title:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.spaces-deck-title:focus {
    outline: 1px solid rgba(255, 252, 0, 0.45);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    max-width: min(16rem, 42vw);
    overflow: visible;
    text-overflow: clip;
}

.spaces-deck-toolbar-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    flex-shrink: 0;
}

.spaces-deck-toolbar-btn {
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.86);
    border-radius: 6px;
    padding: 0.18rem 0.42rem;
    font-size: 0.62rem;
    line-height: 1.2;
    cursor: pointer;
}

.spaces-deck-toolbar-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 252, 0, 0.35);
}

.spaces-deck-play-btn {
    color: rgba(255, 252, 0, 0.95);
    border-color: rgba(255, 252, 0, 0.35);
}

.spaces-deck-generate-btn {
    border-color: rgba(120, 180, 255, 0.35);
}

.spaces-deck-connectors-layer {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 8;
    overflow: visible;
}

.spaces-deck-slide {
    position: absolute;
    z-index: 6;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    cursor: grab;
    overflow: visible;
    box-sizing: border-box;
}

.spaces-deck-slide-canvas {
    position: relative;
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 9;
    background: #111111;
    border-radius: 4px;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.08) inset,
        0 8px 28px rgba(0, 0, 0, 0.42),
        0 0 0 1px rgba(0, 0, 0, 0.12);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    container-type: inline-size;
}

.spaces-deck-slide.is-selected .spaces-deck-slide-bg-image {
    pointer-events: auto;
    cursor: grab;
}

.spaces-deck-slide-bg-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    z-index: 0;
}

.spaces-deck-slide-port {
    position: absolute;
    top: 50%;
    width: 10px;
    height: 10px;
    margin-top: -5px;
    border-radius: 50%;
    background: rgba(255, 252, 0, 0.92);
    box-shadow: 0 0 0 2px rgba(14, 16, 22, 0.95);
    pointer-events: none;
    z-index: 2;
    opacity: 0;
    transform: scale(0.65);
    transition: opacity 0.14s ease, transform 0.14s ease, background 0.14s ease, box-shadow 0.14s ease;
}

.spaces-zone-image:hover .spaces-zone-port,
.spaces-deck-slide:hover .spaces-deck-slide-port,
.spaces-canvas-port.port-hover,
.spaces-canvas-port.port-active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.spaces-canvas-port {
    cursor: crosshair;
    z-index: 12;
}

.spaces-canvas-port:hover,
.spaces-canvas-port.port-hover,
.spaces-canvas-port.port-active {
    background: #fffc00;
    box-shadow: 0 0 0 2px rgba(14, 16, 22, 0.95), 0 0 10px rgba(255, 252, 0, 0.75);
    transform: scale(1.15);
}

body.spaces-connection-dragging .spaces-zone-image:hover .spaces-zone-port,
body.spaces-connection-dragging .spaces-deck-slide:hover .spaces-deck-slide-port,
body.spaces-connection-dragging .spaces-canvas-port.port-hover,
body.spaces-connection-dragging .spaces-canvas-port.port-active {
    opacity: 1;
    pointer-events: auto;
}

.spaces-deck-slide-port-in {
    left: -5px;
}

.spaces-deck-slide-port-out {
    right: -5px;
}

.spaces-deck-connector {
    fill: none;
    stroke: rgba(255, 252, 0, 0.62);
    stroke-width: 2.5;
    stroke-linecap: round;
    pointer-events: stroke;
    cursor: pointer;
    vector-effect: non-scaling-stroke;
}

.spaces-deck-connector.selected {
    stroke: #fffc00;
    stroke-width: 4.5;
    filter: drop-shadow(0 0 8px rgba(255, 252, 0, 0.9));
}

.spaces-deck-connector-dot {
    fill: rgba(255, 252, 0, 0.95);
    stroke: rgba(14, 16, 22, 0.9);
    stroke-width: 1;
    pointer-events: none;
}

.spaces-deck-connector-dot.selected {
    fill: #fffc00;
    stroke: #fff8c2;
    filter: drop-shadow(0 0 5px rgba(255, 252, 0, 0.95));
}

.spaces-deck-slide:active {
    cursor: grabbing;
}

.spaces-deck-slide.selected .spaces-deck-slide-canvas {
    box-shadow:
        0 0 0 2px rgba(255, 252, 0, 0.72),
        0 12px 32px rgba(0, 0, 0, 0.48);
}

.spaces-deck-slide.swap-source {
    opacity: 0.88;
    z-index: 4;
}

.spaces-deck-slide.swap-target {
    z-index: 3;
}

.spaces-deck-slide.swap-target .spaces-deck-slide-canvas {
    box-shadow:
        0 0 0 2px rgba(255, 252, 0, 0.95),
        0 12px 32px rgba(0, 0, 0, 0.48);
}

.spaces-deck-slide.swap-target .spaces-deck-slide-canvas::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 4px;
    width: calc(var(--swap-progress, 0) * 1%);
    background: linear-gradient(90deg, #fffc00, #ffe566);
    border-radius: 4px 4px 0 0;
    pointer-events: none;
    z-index: 6;
}

.spaces-deck-slide.swap-target::after {
    content: 'Hold to swap';
    position: absolute;
    left: 50%;
    bottom: 10px;
    transform: translateX(-50%);
    padding: 0.18rem 0.45rem;
    border-radius: 999px;
    font-size: 0.58rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #111;
    background: rgba(255, 252, 0, 0.92);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28);
    pointer-events: none;
    z-index: 7;
    white-space: nowrap;
}

.spaces-deck-slide-elements {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.spaces-deck-slide-elements .spaces-deck-slide-element {
    pointer-events: auto;
}

.spaces-deck-element-toolbar {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.18rem;
    border-radius: 8px;
    background: rgba(18, 20, 28, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
    pointer-events: auto;
    max-width: calc(100% - 0.7rem);
    flex-wrap: wrap;
    justify-content: flex-end;
}

.spaces-deck-el-tool {
    border: 0;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.9);
    width: 1.55rem;
    height: 1.55rem;
    border-radius: 6px;
    font-size: 0.72rem;
    line-height: 1;
    cursor: pointer;
}

.spaces-deck-el-tool:hover {
    background: rgba(255, 252, 0, 0.18);
    color: #fff8c2;
}

.spaces-deck-el-tool-danger:hover {
    background: rgba(255, 96, 96, 0.22);
    color: #ffc9c9;
}

.spaces-deck-el-tool-accent {
    font-size: 0.82rem;
}

.spaces-deck-el-tool-divider {
    width: 1px;
    height: 1.1rem;
    background: rgba(255, 255, 255, 0.16);
    margin: 0 0.08rem;
}

.spaces-deck-el-tool.is-disabled,
.spaces-deck-el-tool:disabled {
    opacity: 0.38;
    cursor: default;
    pointer-events: none;
}

.spaces-deck-slide-bg-toolbar {
    position: absolute;
    left: 0.35rem;
    bottom: 0.35rem;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 0.22rem;
    padding: 0.18rem 0.28rem;
    border-radius: 8px;
    background: rgba(18, 20, 28, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
    pointer-events: auto;
}

.spaces-deck-slide-title.is-text-target,
.spaces-deck-slide-body.is-text-target,
.spaces-deck-el-label.is-text-target {
    outline: 1px dashed rgba(255, 252, 0, 0.55);
    outline-offset: 2px;
}

.spaces-text-target-label {
    margin-left: 0.28rem;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255, 252, 0, 0.88);
}

.spaces-text-target-label.hidden {
    display: none;
}

.spaces-deck-slide-text-toolbar {
    position: absolute;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    bottom: calc(100% + 0.35rem);
    top: auto;
    z-index: 8;
    display: none;
    align-items: center;
    gap: 0.22rem;
    padding: 0.14rem 0.22rem;
    border-radius: 8px;
    background: rgba(18, 20, 28, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
    pointer-events: auto;
    width: max-content;
    max-width: min(100%, 18rem);
    flex-wrap: nowrap;
}

.spaces-deck-slide.slide-text-focus .spaces-deck-slide-text-toolbar,
.spaces-deck-slide.slide-deck-text-target .spaces-deck-slide-text-toolbar {
    display: inline-flex;
}

.spaces-deck-text-align-control {
    align-items: center;
    gap: 0.35rem;
}

.spaces-deck-text-margin-control,
.spaces-deck-text-margin-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    min-width: 0;
}

.spaces-deck-text-margin-control input[type="range"],
.spaces-deck-text-margin-wrap input[type="range"] {
    width: 72px;
    min-width: 72px;
}

.spaces-deck-text-margin-value {
    min-width: 2.4rem;
    font-size: 0.62rem;
    color: rgba(255, 255, 255, 0.72);
    text-align: right;
}

.spaces-deck-text-align-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    padding: 2px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.spaces-deck-text-align-btn {
    width: 1.05rem;
    height: 1.05rem;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.spaces-deck-text-align-btn:hover {
    background: rgba(255, 252, 0, 0.12);
    border-color: rgba(255, 252, 0, 0.25);
}

.spaces-deck-text-align-btn.active {
    background: rgba(255, 252, 0, 0.28);
    border-color: rgba(255, 252, 0, 0.65);
    box-shadow: 0 0 0 1px rgba(255, 252, 0, 0.35);
}

.spaces-deck-text-align-dot {
    width: 0.28rem;
    height: 0.28rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
}

.spaces-deck-text-align-btn.active .spaces-deck-text-align-dot {
    background: #fffc00;
}

.spaces-deck-text-size-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    min-width: 6.8rem;
    padding: 0 0.1rem;
}

.spaces-deck-text-size-input {
    width: 4.2rem;
    height: 0.35rem;
    margin: 0;
    accent-color: #fffc00;
    cursor: pointer;
}

.spaces-deck-text-size-value {
    min-width: 2.2rem;
    font-size: 0.62rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.78);
    text-align: right;
}

.spaces-deck-el-label-size-wrap {
    min-width: 7.2rem;
}

.spaces-deck-bg-label {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.62);
    padding: 0 0.1rem;
}

.spaces-deck-bg-color-wrap {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.spaces-deck-bg-color-input {
    width: 1.35rem;
    height: 1.35rem;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    touch-action: none;
}

.spaces-deck-bg-opacity-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    min-width: 7.5rem;
    padding: 0 0.15rem;
}

.spaces-deck-bg-opacity-input {
    width: 4.5rem;
    height: 0.35rem;
    margin: 0;
    accent-color: #fffc00;
    cursor: pointer;
}

.spaces-deck-bg-opacity-value {
    min-width: 2rem;
    font-size: 0.62rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.78);
    text-align: right;
}

.spaces-deck-bg-swatch {
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    cursor: pointer;
    padding: 0;
}

.spaces-deck-bg-swatch.active,
.spaces-deck-bg-swatch:hover {
    box-shadow: 0 0 0 2px rgba(255, 252, 0, 0.72);
}

.spaces-deck-slide-canvas.has-dark-bg .spaces-deck-slide-title,
.spaces-deck-slide-canvas.has-dark-bg .spaces-deck-slide-body {
    color: #ffffff;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

.spaces-deck-slide-canvas.has-dark-bg .spaces-deck-slide-body {
    color: rgba(255, 255, 255, 0.9);
}

.spaces-deck-presenter-slide.has-dark-bg .spaces-deck-presenter-slide-content h2,
.spaces-deck-presenter-slide.has-dark-bg .spaces-deck-presenter-slide-content p,
.spaces-deck-presenter-slide.has-dark-bg .spaces-deck-presenter-body {
    color: #ffffff;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

.spaces-deck-presenter-slide.has-dark-bg .spaces-deck-presenter-slide-content p {
    color: rgba(255, 255, 255, 0.92);
}

.spaces-deck-slide-element {
    position: absolute;
    z-index: 2;
    box-sizing: border-box;
    cursor: grab;
}

.spaces-deck-slide-element.selected {
    z-index: 3;
}

.spaces-deck-slide-element:active {
    cursor: grabbing;
}

.spaces-deck-el-shape {
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    border: 2px solid #1a73e8;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem;
}

.spaces-deck-el-box {
    border-radius: 6px;
}

.spaces-deck-el-ellipse {
    border-radius: 999px;
}

.spaces-deck-el-diamond {
    border-radius: 4px;
    transform: rotate(45deg);
}

.spaces-deck-el-diamond .spaces-deck-el-label {
    transform: rotate(-45deg);
}

.spaces-deck-el-text {
    background: rgba(255, 255, 255, 0.92);
    border-style: dashed;
}

.spaces-deck-el-image {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(0, 0, 0, 0.12);
    overflow: hidden;
    padding: 0;
}

.spaces-deck-el-image.is-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.04);
}

.spaces-deck-slide-element.selected[data-element-type="image"] .spaces-deck-el-image-media {
    pointer-events: auto;
    cursor: grab;
}

.spaces-deck-el-image-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
    user-select: none;
}

.spaces-deck-el-image-placeholder {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(0, 0, 0, 0.38);
    user-select: none;
}

.spaces-deck-el-tool.is-busy {
    opacity: 0.55;
    cursor: wait;
}

.spaces-deck-el-label {
    width: 100%;
    min-height: 1em;
    text-align: center;
    font-size: clamp(0.62rem, 2.2cqw, 0.82rem);
    line-height: 1.25;
    color: #202124;
    outline: none;
    word-break: break-word;
    cursor: text;
    user-select: text;
    pointer-events: auto;
}

.spaces-deck-el-label:empty::before {
    content: 'Text';
    color: rgba(32, 33, 36, 0.45);
}

.spaces-deck-el-resize {
    position: absolute;
    right: -5px;
    bottom: -5px;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    background: #fffc00;
    border: 1px solid rgba(0, 0, 0, 0.35);
    cursor: nwse-resize;
    z-index: 2;
}

.spaces-deck-slide-element.selected .spaces-deck-el-shape,
.spaces-deck-slide-element.selected.spaces-deck-el-arrow {
    box-shadow: 0 0 0 2px rgba(255, 252, 0, 0.75);
}

.spaces-deck-el-arrow {
    background: transparent;
    border: none;
    overflow: visible;
}

.spaces-deck-el-arrow-svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.spaces-deck-presenter-elements {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.spaces-deck-presenter-elements .spaces-deck-slide-element {
    cursor: default;
}

.spaces-deck-presenter-elements .spaces-deck-el-resize,
.spaces-deck-presenter-elements .spaces-deck-element-toolbar {
    display: none;
}

.spaces-deck-presenter-elements .spaces-deck-el-label {
    pointer-events: none;
}

.spaces-deck-presenter-elements .spaces-deck-el-image-media {
    pointer-events: none;
}

.spaces-deck-slide.slide-editing .spaces-deck-slide-text-layer:not(.is-free-text) {
    outline: none;
}

.spaces-deck-slide.slide-editing .spaces-deck-slide-text-field:not(.is-positioned) {
    outline: 1px dashed rgba(66, 133, 244, 0.28);
    outline-offset: 3px;
    border-radius: 4px;
}

.spaces-deck-slide.slide-text-focus .spaces-deck-slide-text-field:has(.spaces-deck-slide-title:focus, .spaces-deck-slide-body:focus) {
    z-index: 6;
    outline: 2px solid rgba(255, 252, 0, 0.55);
    outline-offset: -2px;
}

.spaces-deck-slide-text-layer {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0.45rem;
    padding: var(--deck-text-margin, clamp(0.65rem, 6%, 1.35rem));
    box-sizing: border-box;
    pointer-events: none;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
}

.spaces-deck-slide:has(.spaces-deck-slide-bg-image) .spaces-deck-slide-text-layer:not(.is-free-text):not([class*="text-layout-v-"]) {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(0, 0, 0, 0.52) 100%);
    justify-content: flex-end;
}

.spaces-deck-slide-text-layer.text-layout-v-start {
    justify-content: flex-start;
}

.spaces-deck-slide-text-layer.text-layout-v-center {
    justify-content: center;
}

.spaces-deck-slide-text-layer.text-layout-v-end {
    justify-content: flex-end;
}

.spaces-deck-slide-text-layer.text-layout-h-start {
    align-items: flex-start;
}

.spaces-deck-slide-text-layer.text-layout-h-center {
    align-items: center;
}

.spaces-deck-slide-text-layer.text-layout-h-end {
    align-items: flex-end;
}

.spaces-deck-slide-text-layer.text-layout-h-center .spaces-deck-slide-title,
.spaces-deck-slide-text-layer.text-layout-h-center .spaces-deck-slide-body,
.spaces-deck-slide-text-layer.text-layout-h-end .spaces-deck-slide-title,
.spaces-deck-slide-text-layer.text-layout-h-end .spaces-deck-slide-body {
    text-align: inherit;
}

.spaces-deck-slide.selected .spaces-deck-slide-text-layer {
    z-index: 5;
}

.spaces-deck-slide-text-layer.is-free-text {
    display: block;
    padding: 0;
    background: none;
    pointer-events: none;
    overflow: visible;
}

.spaces-deck-slide-text-field {
    position: relative;
    width: max-content;
    max-width: min(100%, 78%);
    align-self: flex-start;
    pointer-events: auto;
    touch-action: none;
    box-sizing: border-box;
}

.spaces-deck-slide-text-field[data-deck-text-field="body"] {
    max-width: min(62%, 32rem);
}

.spaces-deck-slide.selected .spaces-deck-slide-text-field {
    cursor: grab;
    outline: 1px dashed rgba(255, 252, 0, 0.35);
    outline-offset: 2px;
    border-radius: 6px;
}

.spaces-deck-slide-text-field.is-text-dragging {
    cursor: grabbing;
    z-index: 8;
    outline-color: rgba(255, 252, 0, 0.72);
}

.spaces-deck-slide-text-field.is-positioned {
    position: absolute;
    z-index: 3;
    width: max-content;
    max-width: min(100%, calc(100% - (var(--deck-text-margin, 24px) * 2)));
    max-height: calc(100% - (var(--deck-text-margin, 24px) * 2));
    height: auto;
    padding: 0;
    box-sizing: border-box;
}

.spaces-deck-slide-text-field[data-deck-text-field="body"].is-positioned {
    max-width: min(62%, 32rem);
}

.spaces-deck-slide-text-grip {
    display: none !important;
}

.spaces-deck-slide-content-grip,
.spaces-deck-el-drag-grip {
    display: block;
    position: absolute;
    top: -0.7rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    width: 2rem;
    height: 1.1rem;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.18);
    background: rgba(255, 252, 0, 0.92);
    color: #1a1a1a;
    font-size: 0.62rem;
    line-height: 1.05rem;
    text-align: center;
    cursor: grab;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    user-select: none;
    opacity: 0;
    pointer-events: auto;
    touch-action: none;
}

.spaces-deck-slide.selected .spaces-deck-slide-text-grip,
.spaces-deck-slide.selected .spaces-deck-slide-text-field:hover .spaces-deck-slide-text-grip,
.spaces-deck-slide-content.is-positioned .spaces-deck-slide-content-grip,
.spaces-deck-slide-element.selected .spaces-deck-el-drag-grip {
    opacity: 1;
}

.spaces-deck-slide-text-grip:active,
.spaces-deck-slide-content-grip:active,
.spaces-deck-el-drag-grip:active {
    cursor: grabbing;
}

.spaces-deck-slide-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.55rem;
    width: 100%;
    height: 100%;
    padding: clamp(0.65rem, 6%, 1.35rem) clamp(0.75rem, 7%, 1.6rem);
    box-sizing: border-box;
}

.spaces-deck-slide:has(.spaces-deck-slide-bg-image) .spaces-deck-slide-content {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(0, 0, 0, 0.52) 100%);
    justify-content: flex-end;
}

.spaces-deck-slide:has(.spaces-deck-slide-bg-image) .spaces-deck-slide-title,
.spaces-deck-slide:has(.spaces-deck-slide-bg-image) .spaces-deck-slide-body {
    color: #ffffff;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
}

.spaces-deck-slide.is-reference-visual .spaces-deck-slide-content,
.spaces-deck-slide.is-reference-visual .spaces-deck-slide-text-layer,
.spaces-deck-slide.is-reference-visual .spaces-deck-slide-elements {
    display: none;
}

.spaces-deck-slide.is-reference-visual .spaces-deck-slide-bg-image {
    object-fit: contain;
    background: #0a0f1a;
}

.spaces-deck-slide-title,
.spaces-deck-slide-body {
    width: max-content;
    max-width: 100%;
    display: block;
    color: #1a1a1a;
    line-height: 1.35;
    padding: 0;
    border: none;
    background: transparent;
    outline: none;
    min-height: 1.1rem;
    white-space: pre-wrap;
    word-break: break-word;
    text-align: left;
    cursor: text;
    user-select: text;
    -webkit-user-select: text;
}

.spaces-deck-slide.selected:not(.slide-text-focus) .spaces-deck-slide-text-field .spaces-deck-slide-title,
.spaces-deck-slide.selected:not(.slide-text-focus) .spaces-deck-slide-text-field .spaces-deck-slide-body {
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}

.spaces-deck-slide.slide-text-dragging .spaces-deck-slide-title,
.spaces-deck-slide.slide-text-dragging .spaces-deck-slide-body,
.spaces-deck-slide-text-field.is-text-dragging .spaces-deck-slide-title,
.spaces-deck-slide-text-field.is-text-dragging .spaces-deck-slide-body {
    cursor: grabbing;
    user-select: none;
    -webkit-user-select: none;
}

.spaces-deck-slide-title b,
.spaces-deck-slide-title strong,
.spaces-deck-slide-body b,
.spaces-deck-slide-body strong,
.spaces-deck-el-label b,
.spaces-deck-el-label strong,
.spaces-doc-body b,
.spaces-doc-body strong {
    font-weight: 800;
}

.spaces-deck-slide-title {
    font-weight: 600;
    font-size: var(--deck-title-font-size, clamp(14px, 4.2cqw, 34px));
    line-height: 1.2;
}

.spaces-deck-slide-body {
    color: #3d3d3d;
    flex: 0 0 auto;
    max-height: none;
    overflow: visible;
    font-size: var(--deck-body-font-size, clamp(11px, 2.6cqw, 22px));
}

.spaces-deck-slide-title:focus,
.spaces-deck-slide-body:focus {
    outline: none;
    background: rgba(66, 133, 244, 0.08);
    border-radius: 4px;
}

.spaces-deck-slide-title:empty::before,
.spaces-deck-slide-body:empty::before {
    content: attr(aria-label);
    color: rgba(0, 0, 0, 0.28);
    pointer-events: none;
}

.spaces-deck-slide-canvas.has-dark-bg .spaces-deck-slide-title:empty::before,
.spaces-deck-slide-canvas.has-dark-bg .spaces-deck-slide-body:empty::before {
    color: rgba(255, 255, 255, 0.34);
}

.spaces-viewport.deck-mode {
    cursor: crosshair;
}

.spaces-search-popover {
    position: fixed;
    z-index: 13050;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 0.7rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(12, 14, 20, 0.97);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(10px);
}

.spaces-search-popover.hidden {
    display: none;
}

.spaces-search-popover-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0 0.1rem;
}

.spaces-search-popover-title {
    font-size: 0.78rem;
    font-weight: 650;
    color: rgba(255, 252, 0, 0.92);
}

.spaces-search-popover-hint {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    padding: 0.08rem 0.35rem;
}

.spaces-search-input {
    width: 100%;
    box-sizing: border-box;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 0.86rem;
    padding: 0.55rem 0.65rem;
    outline: none;
}

.spaces-search-input:focus {
    border-color: rgba(255, 252, 0, 0.45);
    box-shadow: 0 0 0 1px rgba(255, 252, 0, 0.18);
}

.spaces-search-input::placeholder {
    color: rgba(255, 255, 255, 0.38);
}

.spaces-search-results {
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
    overflow: auto;
}

.spaces-search-empty {
    padding: 0.65rem 0.45rem;
    font-size: 0.78rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.55);
}

.spaces-search-result {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    border: 1px solid transparent;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
    text-align: left;
    padding: 0.45rem 0.5rem;
    cursor: pointer;
}

.spaces-search-result:hover,
.spaces-search-result.active {
    border-color: rgba(255, 252, 0, 0.28);
    background: rgba(255, 252, 0, 0.08);
}

.spaces-search-result-icon {
    width: 1.35rem;
    text-align: center;
    font-size: 0.82rem;
    opacity: 0.9;
}

.spaces-search-result-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.08rem;
}

.spaces-search-result-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.94);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.spaces-search-result-sub {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.52);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.spaces-search-result-type {
    font-size: 0.62rem;
    color: rgba(255, 252, 0, 0.78);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.spaces-viewport.deck-mode .spaces-draw-layer {
    pointer-events: none;
}

.spaces-deck-presenter {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: flex;
    flex-direction: column;
    background: radial-gradient(circle at 20% 10%, rgba(40, 44, 62, 0.95), rgba(8, 10, 16, 0.98));
    color: #fff;
}

.spaces-deck-presenter-chrome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.35);
}

.spaces-deck-presenter-meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.72);
}

.spaces-deck-presenter-meta strong {
    color: rgba(255, 252, 0, 0.95);
    font-size: 0.92rem;
}

.spaces-deck-presenter-controls {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.spaces-deck-presenter-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem 3rem;
    text-align: center;
    max-width: 960px;
    margin: 0 auto;
}

.spaces-deck-presenter-stage {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 2rem 2rem;
    background: radial-gradient(circle at 50% 20%, rgba(48, 52, 68, 0.55), rgba(8, 10, 16, 0.2));
}

.spaces-deck-presenter-slide {
    position: relative;
    width: min(92vw, 1120px);
    aspect-ratio: 16 / 9;
    background: #000000;
    border-radius: 6px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.08);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spaces-deck-presenter-design-surface {
    position: relative;
    flex-shrink: 0;
    transform-origin: center center;
    overflow: hidden;
    border-radius: 6px;
}

.spaces-deck-presenter-design-surface .spaces-deck-slide-title,
.spaces-deck-presenter-design-surface .spaces-deck-slide-body,
.spaces-deck-presenter-design-surface .spaces-deck-el-label {
    pointer-events: none;
    cursor: default;
    user-select: none;
}

.spaces-deck-presenter-design-surface .spaces-deck-slide-element {
    pointer-events: none;
    cursor: default;
}

.spaces-deck-presenter-design-surface .spaces-deck-el-drag-grip,
.spaces-deck-presenter-design-surface .spaces-deck-el-resize {
    display: none !important;
}

.spaces-deck-presenter-bg-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.spaces-deck-presenter-slide-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
    width: 100%;
    height: 100%;
    padding: clamp(1.5rem, 5vw, 3rem);
    box-sizing: border-box;
    text-align: left;
}

.spaces-deck-presenter-slide:has(.spaces-deck-presenter-bg-image) .spaces-deck-presenter-slide-content:not([class*="text-layout-v-"]) {
    justify-content: flex-end;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0.55) 100%);
}

.spaces-deck-presenter-slide-content.text-layout-v-start {
    justify-content: flex-start;
}

.spaces-deck-presenter-slide-content.text-layout-v-center {
    justify-content: center;
}

.spaces-deck-presenter-slide-content.text-layout-v-end {
    justify-content: flex-end;
}

.spaces-deck-presenter-slide-content.text-layout-h-start {
    align-items: flex-start;
}

.spaces-deck-presenter-slide-content.text-layout-h-center {
    align-items: center;
}

.spaces-deck-presenter-slide-content.text-layout-h-end {
    align-items: flex-end;
}

.spaces-deck-presenter-slide-content.is-positioned {
    position: absolute;
    z-index: 3;
    width: calc(100% - 1.5rem);
    max-width: calc(100% - 1.5rem);
    max-height: calc(100% - 1.5rem);
    height: auto;
    padding: clamp(0.65rem, 6%, 1.35rem) clamp(0.75rem, 7%, 1.6rem);
    box-sizing: border-box;
    justify-content: flex-start;
    gap: 0.55rem;
}

.spaces-deck-presenter-text-layer {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.spaces-deck-presenter-text-layer.is-free-text {
    pointer-events: none;
}

.spaces-deck-presenter-text-field.is-positioned {
    position: absolute;
    z-index: 3;
    margin: 0;
    max-width: calc(100% - 1.5rem);
    box-sizing: border-box;
    text-align: left;
}

.spaces-deck-presenter-body h2,
.spaces-deck-presenter-slide-content h2 {
    margin: 0;
    font-size: clamp(1.6rem, 4vw, 2.6rem);
    color: #1a1a1a;
    line-height: 1.15;
}

.spaces-deck-presenter-slide:has(.spaces-deck-presenter-bg-image) .spaces-deck-presenter-slide-content h2 {
    color: #ffffff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

.spaces-deck-presenter-body p,
.spaces-deck-presenter-slide-content p,
.spaces-deck-presenter-body {
    margin: 0;
    font-size: clamp(1rem, 2.2vw, 1.35rem);
    line-height: 1.55;
    color: #3d3d3d;
    max-width: none;
}

.spaces-deck-presenter-slide:has(.spaces-deck-presenter-bg-image) .spaces-deck-presenter-slide-content p,
.spaces-deck-presenter-slide:has(.spaces-deck-presenter-bg-image) .spaces-deck-presenter-body,
.spaces-deck-presenter-slide:has(.spaces-deck-presenter-bg-image) .spaces-deck-presenter-text-field {
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

.spaces-deck-presenter-image {
    max-width: min(420px, 80vw);
    max-height: 240px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

body.spaces-deck-presenting {
    overflow: hidden;
}

.spaces-deck-presenter.spaces-deck-presenter-immersive,
.spaces-deck-presenter:fullscreen,
.spaces-deck-presenter:-webkit-full-screen {
    background: #000;
}

.spaces-deck-presenter.spaces-deck-presenter-immersive .spaces-deck-presenter-chrome,
.spaces-deck-presenter:fullscreen .spaces-deck-presenter-chrome,
.spaces-deck-presenter:-webkit-full-screen .spaces-deck-presenter-chrome {
    display: none !important;
}

.spaces-deck-presenter.spaces-deck-presenter-immersive .spaces-deck-presenter-stage,
.spaces-deck-presenter:fullscreen .spaces-deck-presenter-stage,
.spaces-deck-presenter:-webkit-full-screen .spaces-deck-presenter-stage {
    flex: 1;
    padding: 0;
    background: #000;
}

.spaces-deck-presenter.spaces-deck-presenter-immersive .spaces-deck-presenter-slide,
.spaces-deck-presenter:fullscreen .spaces-deck-presenter-slide,
.spaces-deck-presenter:-webkit-full-screen .spaces-deck-presenter-slide {
    width: min(100vw, calc(100vh * 16 / 9));
    height: min(100vh, calc(100vw * 9 / 16));
    max-width: 100vw;
    max-height: 100vh;
    border-radius: 0;
    box-shadow: none;
}

.spaces-deck-presenter.spaces-deck-presenter-immersive .spaces-deck-presenter-design-surface,
.spaces-deck-presenter:fullscreen .spaces-deck-presenter-design-surface,
.spaces-deck-presenter:-webkit-full-screen .spaces-deck-presenter-design-surface {
    border-radius: 0;
}

.spaces-deck-presenter-slide.is-reference-visual .spaces-deck-presenter-bg-image {
    object-fit: contain;
}

.spaces-deck-presenter-slide.is-reference-visual .spaces-deck-presenter-slide-content,
.spaces-deck-presenter-slide.is-reference-visual .spaces-deck-presenter-text-layer {
    display: none;
}

.spaces-deck-presenter [data-presenter-fullscreen].active {
    border-color: rgba(255, 252, 0, 0.55);
    color: rgba(255, 252, 0, 0.95);
}

.spaces-zone-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: inherit;
    pointer-events: none;
    -webkit-user-drag: none;
    user-select: none;
}

.spaces-zone-image img[draggable="true"] {
    -webkit-user-drag: element;
    cursor: grab;
}

.spaces-deck-slide-canvas.spaces-image-drop-target {
    outline: 2px dashed rgba(255, 252, 0, 0.72);
    outline-offset: -2px;
    background: rgba(255, 252, 0, 0.06);
}

.spaces-eraser-reticle {
    position: absolute;
    z-index: 11;
    border: 1.5px solid rgba(255, 88, 88, 0.9);
    border-radius: 999px;
    background: rgba(255, 90, 90, 0.12);
    box-shadow: 0 0 0 1px rgba(255, 90, 90, 0.22), 0 0 18px rgba(255, 90, 90, 0.18);
    pointer-events: none;
}

.spaces-mark-free-draft {
    stroke: rgba(255, 252, 0, 0.98);
    stroke-width: 3.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 6px rgba(255, 252, 0, 0.34));
    pointer-events: none;
}

.spaces-mark-free-target {
    fill: rgba(255, 252, 0, 0.08);
    stroke: rgba(255, 252, 0, 0.98);
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 6px rgba(255, 252, 0, 0.26));
    pointer-events: none;
}

.spaces-claw-token {
    --spaces-claw-avatar-size: 152px;
    position: absolute;
    transform: translate(-50%, -50%);
    border: none;
    border-radius: 0;
    background: transparent;
    color: #fff;
    padding: 0;
    cursor: grab;
    user-select: none;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.55rem;
    z-index: 8;
}

.spaces-claw-token-figure {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    overflow: visible;
}

.spaces-claw-token-avatar {
    width: var(--spaces-claw-avatar-size);
    height: var(--spaces-claw-avatar-size);
    border-radius: 999px;
    border: 4px solid rgba(255, 255, 255, 0.24);
    object-fit: cover;
    display: block;
    position: relative;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.spaces-claw-token:hover .spaces-claw-token-avatar {
    border-color: rgba(255, 252, 0, 0.58);
    box-shadow: 0 0 10px rgba(255, 252, 0, 0.22);
}

.spaces-claw-token.active .spaces-claw-token-avatar {
    border-color: rgba(255, 252, 0, 0.95);
    box-shadow: 0 0 0 2px rgba(255, 252, 0, 0.32), 0 0 16px rgba(255, 252, 0, 0.34);
}

.spaces-claw-token.active .spaces-claw-token-name {
    display: block;
    color: #fffc9f;
}

.spaces-claw-token-bubble,
.spaces-claw-token-bubble.is-caption {
    position: absolute;
    left: 50%;
    bottom: calc(100% + (12px * var(--spaces-bubble-counter-scale, 1)));
    transform: translateX(-50%) scale(var(--spaces-bubble-counter-scale, 1));
    transform-origin: 50% calc(100% + 6px);
    box-sizing: border-box;
    width: fit-content;
    min-width: 118px;
    max-width: min(288px, 42vw);
    height: auto;
    max-height: none;
    padding: 0.62rem 0.84rem;
    border-radius: 14px;
    background: rgba(8, 8, 8, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #fff;
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.42;
    text-align: center;
    letter-spacing: 0.01em;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
    pointer-events: auto;
    cursor: pointer;
    user-select: none;
    z-index: 3;
    white-space: normal;
    display: block;
    overflow: visible;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: none;
    text-overflow: clip;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    -webkit-box-orient: unset;
}

.spaces-claw-token-bubble.talking {
    border-color: rgba(255, 252, 0, 0.95);
    box-shadow: 0 0 0 1px rgba(255, 252, 0, 0.3), 0 8px 18px rgba(255, 252, 0, 0.2);
    animation: spacesBubbleTalkingPulse 1s ease-in-out infinite;
    max-width: min(304px, 44vw);
}

@keyframes spacesBubbleTalkingPulse {
    0%, 100% {
        box-shadow: 0 0 0 1px rgba(255, 252, 0, 0.3), 0 8px 18px rgba(255, 252, 0, 0.2);
    }
    50% {
        box-shadow: 0 0 0 2px rgba(255, 252, 0, 0.45), 0 10px 22px rgba(255, 252, 0, 0.28);
    }
}

.spaces-claw-token-bubble::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
    border-width: 8px 8px 0 8px;
    border-style: solid;
    border-color: rgba(255, 255, 255, 0.22) transparent transparent transparent;
}

.spaces-claw-token-name {
    display: none;
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.2;
    width: 100%;
    text-align: center;
}

.spaces-remove-zone {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 12;
    width: 40px;
    height: 40px;
    border: 1px dashed rgba(255, 110, 110, 0.55);
    color: #ffb9b9;
    background: rgba(40, 10, 10, 0.45);
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(3px);
}

.spaces-remove-zone-icon {
    width: 19px;
    height: 19px;
    display: block;
}

.spaces-remove-zone.hot {
    border-color: rgba(255, 84, 84, 0.9);
    background: rgba(72, 12, 12, 0.72);
    color: #ffdede;
    box-shadow: 0 0 14px rgba(255, 80, 80, 0.28);
}

.spaces-remove-zone-inline {
    position: static;
    width: 42px;
    height: 34px;
    margin-left: 0.22rem;
    border-style: solid;
    border-color: rgba(255, 110, 110, 0.72);
    background: rgba(40, 10, 10, 0.62);
    font-size: 1rem;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    border-radius: 999px;
}

.spaces-mark-prompt {
    position: absolute;
    z-index: 20;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(8, 8, 8, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 10px;
    padding: 0.34rem 0.4rem;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.34);
}

.spaces-mark-prompt input {
    width: 280px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(20, 20, 20, 0.96);
    color: #fff;
    border-radius: 8px;
    padding: 0.35rem 0.48rem;
    font-size: 0.72rem;
}

#spaces-mark-attach-btn {
    min-width: 56px;
}

.spaces-mark-prompt input:focus {
    outline: none;
    border-color: rgba(255, 252, 0, 0.7);
}

.spaces-tray {
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    background: rgba(6, 6, 6, 0.62);
    padding: 0.52rem 0.58rem;
    display: grid;
    gap: 0.4rem;
}

.spaces-tray-title {
    font-size: 0.64rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.7);
}

.spaces-tray-list {
    display: flex;
    align-items: center;
    gap: 0.38rem;
    flex-wrap: wrap;
}

.spaces-tray-chip {
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(16, 16, 16, 0.92);
    color: #f2f2f2;
    border-radius: 999px;
    padding: 0.26rem 0.56rem;
    font-size: 0.67rem;
    font-weight: 700;
    cursor: grab;
}

.spaces-tray-chip:hover {
    border-color: rgba(255, 252, 0, 0.72);
    color: #fff8bc;
}

@media (max-width: 980px) {
    .spaces-mark-prompt input {
        width: 200px;
    }
}

.calendar-wrap {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: relative;
    width: 100%;
    max-width: none;
}

.calendar-head {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}

.calendar-head h3 {
    margin: 0;
    font-size: 0.92rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #fff4ad;
}

.calendar-month-nav {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.calendar-month-btn {
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(12, 12, 12, 0.9);
    color: #ddd;
    border-radius: 999px;
    padding: 0.25rem 0.55rem;
    font-size: 0.66rem;
    font-weight: 800;
    cursor: pointer;
    transition: var(--interactive-transition);
}

.calendar-month-btn:hover {
    border-color: rgba(255, 252, 0, 0.6);
    color: #fff7be;
    background: rgba(255, 252, 0, 0.08);
    box-shadow: var(--hover-glow);
}

.calendar-month-icon-btn {
    min-width: 28px;
    width: 28px;
    height: 28px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    line-height: 1;
}

.calendar-month-label {
    font-size: 0.78rem;
    color: #fff;
    font-weight: 700;
    min-width: 132px;
    text-align: center;
}

.calendar-grid-head {
    flex-shrink: 0;
}

.calendar-grid-head,
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.35rem;
}

.calendar-grid {
    flex: 1;
    min-height: 0;
    grid-auto-rows: 1fr;
    align-content: stretch;
}

.calendar-grid-head span {
    color: #fff;
    font-size: 0.64rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-align: center;
}

.calendar-day {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    min-height: 3.25rem;
    height: 100%;
    padding: 0.35rem;
    text-align: left;
    color: #f3f3f3;
    transition: var(--interactive-transition);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.calendar-day:not(.empty) {
    cursor: pointer;
}

.calendar-day:not(.empty):hover {
    border-color: rgba(255, 252, 0, 0.55);
    background: rgba(255, 252, 0, 0.07);
    box-shadow: 0 0 14px rgba(255, 252, 0, 0.14);
    transform: translateY(-1px);
}

.calendar-day:focus-visible {
    outline: 2px solid rgba(255, 252, 0, 0.8);
    outline-offset: 1px;
}

.calendar-day-popover {
    position: absolute;
    z-index: 20;
    width: min(420px, 78vw);
    background: rgba(7, 7, 7, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.4);
    padding: 0.62rem;
}

.calendar-day-popover h5 {
    margin: 0 0 0.45rem;
    font-size: 0.75rem;
    color: #fff4ad;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.calendar-day-popover-section {
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
    margin-top: 0.38rem;
}

.calendar-day-popover-section strong {
    font-size: 0.65rem;
    color: #bfbfbf;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.calendar-day-popover-row {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 0.32rem 0.42rem;
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.25rem;
}

.calendar-day-popover-row.done {
    opacity: 0.65;
}

.calendar-day-popover-main {
    font-size: 0.73rem;
    color: #efefef;
    flex: 1 1 auto;
    min-width: 0;
}

.calendar-day-popover-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex: 1 1 100%;
}

.calendar-day-popover-meta {
    font-size: 0.64rem;
    color: #a8a8a8;
    flex: 1 1 auto;
    min-width: 0;
}

.calendar-day-popover-done-btn {
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 6px;
    background: rgba(12, 12, 12, 0.78);
    color: #fff8be;
    cursor: pointer;
}

.calendar-day-popover-done-btn:hover {
    border-color: rgba(255, 252, 0, 0.72);
}

.calendar-day-popover-empty {
    font-size: 0.69rem;
    color: #8f8f8f;
    padding: 0.18rem 0;
}

.calendar-day-detail-modal {
    position: fixed;
    inset: 0;
    z-index: 2500;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.calendar-day-detail-card {
    width: min(640px, 92vw);
    max-height: min(78vh, 760px);
    overflow: auto;
    background: rgba(8, 8, 8, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
    padding: 0.78rem;
    position: relative;
}

.calendar-day-detail-card.calendar-day-view-card {
    width: min(920px, 96vw);
    max-height: min(88vh, 900px);
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #101114;
}

.calendar-day-view-content {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1 1 auto;
}

.calendar-day-view-head {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 2.5rem 0.7rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
}

.calendar-day-view-nav {
    display: inline-flex;
    gap: 0.35rem;
    flex-shrink: 0;
    padding-top: 0.15rem;
}

.calendar-day-view-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #f3f3f3;
}

.calendar-day-view-sub {
    margin: 0.2rem 0 0;
    font-size: 0.76rem;
    color: #9a9a9a;
}

.calendar-day-allday {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 0.5rem;
    align-items: start;
    padding: 0.55rem 0.85rem 0.55rem 0.65rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
}

.calendar-day-allday-label {
    font-size: 0.62rem;
    color: #8d8d8d;
    text-align: right;
    padding-top: 0.35rem;
}

.calendar-day-allday-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    min-height: 1.6rem;
}

.calendar-day-allday-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    max-width: 100%;
    padding: 0.28rem 0.55rem;
    border-radius: 6px;
    font-size: 0.72rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
}

.calendar-day-allday-chip.meeting {
    border-color: rgba(66, 133, 244, 0.45);
    background: rgba(66, 133, 244, 0.18);
    color: #dcebff;
}

.calendar-day-allday-chip.task {
    border-color: rgba(255, 252, 0, 0.35);
    background: rgba(255, 252, 0, 0.12);
    color: #fff8c2;
}

.calendar-day-allday-chip.done {
    opacity: 0.55;
    text-decoration: line-through;
}

.calendar-day-allday-chip-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-day-allday-chip-actions {
    display: inline-flex;
    gap: 0.35rem;
    flex-shrink: 0;
}

.calendar-day-allday-empty {
    font-size: 0.72rem;
    color: #7d7d7d;
    padding: 0.2rem 0;
}

.calendar-day-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    background: #0c0d10;
}

.calendar-day-grid {
    display: grid;
    grid-template-columns: 64px 1fr;
    position: relative;
}

.calendar-day-hours {
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
}

.calendar-day-grid-hour {
    position: relative;
    box-sizing: border-box;
}

.calendar-day-grid-hour-label {
    position: absolute;
    top: -0.45rem;
    right: 0.45rem;
    font-size: 0.62rem;
    color: #8a8a8a;
    white-space: nowrap;
}

.calendar-day-grid-line {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.calendar-day-events-layer {
    position: relative;
    background:
        repeating-linear-gradient(
            to bottom,
            rgba(255, 255, 255, 0.05) 0,
            rgba(255, 255, 255, 0.05) 1px,
            transparent 1px,
            transparent 52px
        );
}

.calendar-day-events-interactive {
    cursor: crosshair;
    touch-action: none;
}

.calendar-day-event.draft {
    background: rgba(66, 133, 244, 0.14);
    border-left-color: #8ab4f8;
    border: 1px dashed rgba(138, 180, 248, 0.85);
    border-left-width: 3px;
    pointer-events: none;
    z-index: 2;
}

.calendar-event-create-popover {
    position: absolute;
    z-index: 5;
    width: min(300px, calc(100% - 16px));
    padding: 0.65rem 0.7rem 0.7rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(14, 16, 22, 0.98);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    box-sizing: border-box;
}

.calendar-event-create-label {
    display: block;
    font-size: 0.62rem;
    color: rgba(255, 255, 255, 0.62);
    margin-bottom: 0.2rem;
}

.calendar-event-create-title {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    color: #f2f2f2;
    font-size: 0.82rem;
    padding: 0.42rem 0.5rem;
    margin-bottom: 0.35rem;
}

.calendar-event-create-title:focus {
    outline: none;
    border-color: rgba(255, 252, 0, 0.55);
    box-shadow: 0 0 0 1px rgba(255, 252, 0, 0.22);
}

.calendar-event-create-when,
.calendar-event-create-date {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.82);
    margin-bottom: 0.35rem;
}

.calendar-event-create-time-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.35rem;
}

.calendar-event-create-time {
    flex: 1 1 0;
    min-width: 0;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    color: #f2f2f2;
    font-size: 0.78rem;
    padding: 0.38rem 0.45rem;
    color-scheme: dark;
}

.calendar-event-create-time:focus {
    outline: none;
    border-color: rgba(255, 252, 0, 0.55);
    box-shadow: 0 0 0 1px rgba(255, 252, 0, 0.22);
}

.calendar-event-create-time-sep {
    flex: 0 0 auto;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.55);
}

.calendar-event-create-hint {
    margin: 0 0 0.55rem;
    font-size: 0.62rem;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.55);
}

.calendar-event-create-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.35rem;
}

.calendar-event-create-save {
    border-color: rgba(66, 133, 244, 0.55);
    color: #9ec1ff;
}

.calendar-day-grid-empty {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    color: #7a7a7a;
    pointer-events: none;
}

.calendar-day-event {
    position: absolute;
    left: 6px;
    right: 8px;
    box-sizing: border-box;
    border-radius: 6px;
    padding: 0.28rem 0.45rem;
    overflow: hidden;
    border-left: 3px solid transparent;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.28);
}

.calendar-day-event.meeting {
    background: rgba(66, 133, 244, 0.22);
    border-left-color: #4285f4;
    color: #e8f1ff;
}

.calendar-day-event.task {
    background: rgba(255, 252, 0, 0.16);
    border-left-color: #fffc00;
    color: #fff8c2;
}

.calendar-day-event.done {
    opacity: 0.55;
}

.calendar-day-event-title {
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-day-event-meta {
    margin-top: 0.12rem;
    font-size: 0.62rem;
    opacity: 0.88;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-day-event-actions {
    margin-top: 0.18rem;
    display: flex;
    gap: 0.35rem;
    align-items: center;
}

.calendar-day-event-link {
    font-size: 0.62rem;
    color: #9ec5ff;
    text-decoration: none;
}

.calendar-day-event-link:hover {
    color: #fff;
    text-decoration: underline;
}

.calendar-day-now-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: #ea4335;
    z-index: 3;
    pointer-events: none;
}

.calendar-day-now-dot {
    position: absolute;
    left: -5px;
    top: -4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ea4335;
}

.calendar-day-view-card .calendar-day-detail-close {
    z-index: 4;
    right: 12px;
    top: 10px;
}

.calendar-day-detail-close {
    position: absolute;
    right: 10px;
    top: 8px;
    border: 0;
    background: transparent;
    color: #bcbcbc;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
}

.calendar-day-detail-close:hover {
    color: #fffc00;
}

.calendar-day.empty {
    min-height: 0;
    pointer-events: none;
    border-style: dashed;
    opacity: 0.35;
}

.calendar-day.has-deadlines {
    border-color: rgba(255, 252, 0, 0.45);
    box-shadow: inset 0 0 0 1px rgba(255, 252, 0, 0.12);
}

.calendar-day.has-meetings {
    border-color: rgba(130, 205, 255, 0.45);
    box-shadow: inset 0 0 0 1px rgba(130, 205, 255, 0.12);
}

.calendar-day.today {
    border-color: rgba(87, 255, 123, 0.6);
}

.calendar-day-num {
    font-weight: 800;
    font-size: 0.76rem;
}

.calendar-day-sub {
    margin-top: 0.22rem;
    font-size: 0.62rem;
    color: #d1d1d1;
}

.calendar-day-task {
    margin-top: 0.18rem;
    font-size: 0.58rem;
    line-height: 1.25;
    color: #fffc00;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-deadline-row.undated .calendar-deadline-when {
    color: #9a9a9a;
}

.calendar-list-wrap {
    flex-shrink: 0;
    margin-top: 0.35rem;
    max-height: min(28vh, 220px);
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 0.62rem;
}

.calendar-list-wrap h4 {
    margin: 0 0 0.45rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #bdbdbd;
}

.calendar-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.calendar-gcal-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.55rem 0.62rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
}

.calendar-gcal-status {
    font-size: 0.72rem;
    font-weight: 700;
    color: #ddd;
}

.calendar-gcal-status.connected {
    color: #9effb2;
}

.calendar-gcal-status.disconnected {
    color: #ffb6b6;
}

.calendar-gcal-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.calendar-gcal-error {
    font-size: 0.68rem;
    color: #ff9a9a;
}

.calendar-deadline-row {
    display: grid;
    grid-template-columns: 130px 1fr 140px;
    gap: 0.45rem;
    align-items: baseline;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 0.35rem;
}

.calendar-deadline-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.calendar-deadline-row.done {
    opacity: 0.6;
}

.calendar-deadline-when {
    font-size: 0.68rem;
    color: #ffef8a;
}

.calendar-deadline-text {
    font-size: 0.76rem;
    color: #f2f2f2;
}

.calendar-deadline-meta {
    font-size: 0.67rem;
    color: #9f9f9f;
    text-align: right;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.42rem;
}

.calendar-deadline-done-btn {
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(12, 12, 12, 0.78);
    color: #fff8be;
    border-radius: 8px;
    padding: 0.14rem 0.48rem;
    font-size: 0.63rem;
    line-height: 1.25;
    cursor: pointer;
}

.calendar-deadline-done-btn:hover {
    border-color: rgba(255, 252, 0, 0.72);
}

.calendar-meeting-row {
    display: grid;
    grid-template-columns: 130px 1fr 90px;
    gap: 0.45rem;
    align-items: baseline;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 0.35rem;
}

.calendar-meeting-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.calendar-meeting-row a {
    color: var(--brand-yellow);
    text-decoration: underline;
    font-size: 0.66rem;
}

.calendar-meeting-loc {
    color: #a3a3a3;
    font-size: 0.67rem;
}

.calendar-empty {
    color: #8f8f8f;
    font-size: 0.74rem;
}

.usage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.8rem;
    margin-bottom: 0.9rem;
}

.usage-card,
.usage-chart-card,
.usage-table-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 0.9rem;
}

.usage-card h4,
.usage-chart-card h4,
.usage-table-card h4 {
    font-size: 0.72rem;
    color: #9a9a9a;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.usage-card strong {
    font-size: 1.15rem;
}

.usage-chart {
    height: 130px;
    display: flex;
    align-items: flex-end;
    gap: 0.35rem;
}

.usage-estimator {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
    margin-bottom: 0.8rem;
}

.usage-estimator-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.usage-estimator-group label {
    font-size: 0.66rem;
    color: #9a9a9a;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.usage-estimator-group input {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(12, 12, 12, 0.9);
    color: #fff;
    border-radius: 8px;
    padding: 0.45rem 0.5rem;
    font-size: 0.82rem;
}

.usage-estimator-note {
    grid-column: 1 / -1;
    font-size: 0.78rem;
    color: #bdbdbd;
}

.usage-chart-head {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* Changed from space-between */
    gap: 1rem;
    margin-bottom: 0.35rem;
}

.usage-chart-head h4 {
    margin-bottom: 0;
}

.usage-range-tabs {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.usage-scope-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
    margin-bottom: 0.65rem;
    flex-wrap: wrap;
}

.usage-scope-tabs {
    flex-shrink: 0;
}

.usage-scope-select {
    min-width: 180px;
    max-width: 100%;
    background: rgba(0, 0, 0, 0.58);
    color: #f3f3f3;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 10px;
    padding: 0.38rem 0.55rem;
    font-size: 0.78rem;
    font-weight: 700;
}

.usage-scope-select:focus {
    outline: none;
    border-color: rgba(255, 252, 0, 0.75);
    box-shadow: 0 0 0 2px rgba(255, 252, 0, 0.12);
}

.usage-range-btn {
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(12, 12, 12, 0.9);
    color: #b5b5b5;
    border-radius: 999px;
    padding: 0.22rem 0.55rem;
    font-size: 0.66rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: all 0.18s ease;
}

.usage-range-btn:hover {
    color: #fff;
    border-color: rgba(255, 252, 0, 0.55);
}

.usage-range-btn.active {
    color: #111;
    background: var(--brand-yellow);
    border-color: var(--brand-yellow);
    box-shadow: 0 0 12px rgba(255, 252, 0, 0.35);
}

/* Usage bar height is controlled by JS inline height */

.usage-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 0.6rem;
    padding: 0.35rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.84rem;
}

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

.usage-head {
    color: #9a9a9a;
    text-transform: uppercase;
    font-size: 0.68rem;
    letter-spacing: 0.05em;
}

.usage-empty {
    color: #8a8a8a;
    font-size: 0.84rem;
    padding: 0.3rem 0;
}

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

    .usage-chart-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .chat-glb-viewer {
        min-width: 0;
        max-width: 100%;
        height: 220px;
    }
}

/* Chat Message Deletion */
.message {
    position: relative;
    max-width: 80%;
    width: fit-content;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.5;
    word-wrap: break-word;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.message.user {
    align-self: flex-end;
    background: rgba(255, 252, 0, 0.1);
    border: 1px solid rgba(255, 252, 0, 0.2);
    border-right: 3px solid var(--brand-yellow);
    border-bottom-right-radius: 2px;
}

.message.claw {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 3px solid rgba(255, 255, 255, 0.3);
    border-bottom-left-radius: 2px;
}

.message.claw img,
.chat-agent-image {
    max-width: min(100%, 320px);
    height: auto;
}

.message.system {
    align-self: center;
    background: transparent;
    border: none;
    box-shadow: none;
    color: #666;
    font-size: 0.8rem;
    font-style: italic;
    max-width: 100%;
}

.chat-glb-viewer-wrap {
    margin-top: 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    background: rgba(10, 10, 10, 0.6);
    padding: 0.45rem;
}

.chat-glb-viewer {
    width: 100%;
    min-width: 260px;
    max-width: min(62vw, 560px);
    height: 280px;
    border-radius: 10px;
    background: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.35));
    display: block;
    overflow: hidden;
}

.chat-glb-open {
    display: inline-block;
    margin-top: 0.4rem;
    color: var(--brand-yellow);
    text-decoration: underline;
    font-size: 0.74rem;
}

.cover-letter-export-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.65rem;
    padding: 0.34rem 0.62rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 252, 0, 0.46);
    background: rgba(255, 252, 0, 0.08);
    color: #fff8b8;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
}

.cover-letter-export-btn:hover {
    border-color: rgba(255, 252, 0, 0.76);
    background: rgba(255, 252, 0, 0.16);
    color: #fff;
}

.accounting-dashboard-card {
    margin-top: 0.72rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(255, 252, 0, 0.06), rgba(10, 10, 10, 0.74));
    padding: 0.7rem;
}

.accounting-dashboard-title {
    color: #fffc9b;
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.accounting-dashboard-subtitle {
    margin-top: 0.16rem;
    color: #d5d5d5;
    font-size: 0.68rem;
}

.accounting-kpi-grid {
    margin-top: 0.52rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
    gap: 0.42rem;
}

.accounting-kpi-cell {
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.36);
    padding: 0.42rem 0.5rem;
    display: grid;
    gap: 0.14rem;
}

.accounting-kpi-cell span {
    color: #b8b8b8;
    font-size: 0.62rem;
}

.accounting-kpi-cell strong {
    color: #fff;
    font-size: 0.78rem;
}

.accounting-breakdown {
    margin-top: 0.58rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 0.45rem;
}

.accounting-breakdown h5 {
    margin: 0 0 0.3rem;
    font-size: 0.64rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #d8d8d8;
}

.accounting-vat-box {
    margin-top: 0.62rem;
    border: 1px solid rgba(255, 252, 0, 0.26);
    border-radius: 10px;
    background: rgba(255, 252, 0, 0.05);
    padding: 0.46rem 0.5rem;
}

.accounting-vat-box h5 {
    margin: 0 0 0.32rem;
    font-size: 0.64rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #fff4a8;
}

.accounting-breakdown-row {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.68rem;
    color: #d7d7d7;
    margin-bottom: 0.2rem;
}

.accounting-breakdown-row strong {
    color: #f2f2f2;
}

.accounting-alerts,
.accounting-notes {
    margin-top: 0.54rem;
    border-left: 2px solid rgba(255, 252, 0, 0.44);
    padding-left: 0.45rem;
}

.accounting-alerts p,
.accounting-notes p {
    margin: 0 0 0.18rem;
    font-size: 0.65rem;
    color: #d0d0d0;
}

.chat-glb-viewer-wrap.error .chat-glb-open {
    color: #ff9d9d;
}

.message:hover .msg-delete-btn {
    opacity: 1;
}

.msg-delete-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    background: #ff4444;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 14px;
    line-height: 18px;
    text-align: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s, transform 0.1s;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.msg-delete-btn:hover {
    transform: scale(1.1);
    background: #ff0000;
}


.auth-oauth-btn {
    margin-top: 10px;
}

.auth-or {
    margin: 10px 0 4px;
    text-align: center;
    color: #8c8c8c;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.usage-wallet-wrap {
    margin-top: 14px;
}

.usage-wallet-card {
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 14px;
    background: rgba(0, 0, 0, 0.22);
}

.usage-wallet-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: baseline;
}

.usage-wallet-head h4 {
    margin: 0;
}

.usage-wallet-head span {
    color: #a7a7a7;
    font-size: 0.78rem;
}

.usage-wallet-balance {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 8px 0 10px;
}

.usage-wallet-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
}
.usage-wallet-topup-btn {
    padding: 6px 12px;
    font-size: 0.78rem;
    line-height: 1.1;
}
.usage-wallet-amount-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 2px 0 10px;
}
.usage-wallet-amount-wrap label {
    font-size: 0.72rem;
    color: #9f9f9f;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.usage-wallet-amount-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: #fff;
    padding: 8px 10px;
    font-size: 0.84rem;
    width: 140px;
}
.usage-wallet-amount-input:focus {
    outline: none;
    border-color: var(--brand-yellow);
    box-shadow: 0 0 0 2px rgba(255, 252, 0, 0.15);
}

.usage-wallet-note {
    color: #c1c1c1;
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.usage-wallet-error {
    color: #ff7b7b;
    font-size: 0.84rem;
    margin-bottom: 8px;
}

.usage-wallet-tx-list {
    display: grid;
    gap: 6px;
}

.usage-wallet-tx {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    color: #ddd;
}

.usage-wallet-empty {
    color: #8f8f8f;
    font-size: 0.82rem;
}

.spellchase-dashboard-summary {
    margin-top: 0.35rem;
}

.spellchase-dashboard-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.spellchase-metric {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 0.75rem;
}

.spellchase-metric span {
    display: block;
    font-size: 0.75rem;
    color: #9a9a9a;
    margin-bottom: 0.35rem;
}

.spellchase-metric strong {
    font-size: 1rem;
    color: #f5f5f5;
}

.spellchase-dashboard-actions {
    margin-top: 0.75rem;
}

.spellchase-dashboard-table-wrap {
    margin-top: 0.85rem;
    overflow-x: auto;
}

.spellchase-dashboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.spellchase-dashboard-table th,
.spellchase-dashboard-table td {
    padding: 0.55rem 0.45rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-align: left;
    color: #ddd;
}

.spellchase-dashboard-table th {
    color: #aaa;
    font-weight: 600;
}

.spellchase-dashboard-empty,
.spellchase-dashboard-error {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: #b8b8b8;
}

.spellchase-dashboard-error {
    color: #ff8f8f;
}

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

/* Auth Clawground hard-fit: keep top sidebar header + bottom input always visible */
body.is-authenticated {
    min-height: 100dvh;
}

body.is-authenticated .container {
    max-width: none;
    width: 100%;
    padding-left: clamp(8px, 1.1vw, 18px);
    padding-right: clamp(8px, 1.1vw, 18px);
}

body.is-authenticated .navbar {
    position: sticky;
    top: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    padding: 0.75rem 0;
}

body.is-authenticated .navbar .container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

body.is-authenticated .navbar .logo {
    grid-column: 1;
    justify-self: start;
    margin-left: 5mm;
}

body.arvis-landing-demo .navbar .container,
body.spaces-guest-view .navbar .container {
    max-width: none;
    width: 100%;
    margin: 0;
    padding-left: clamp(8px, 1.1vw, 18px);
    padding-right: clamp(8px, 1.1vw, 18px);
}

body.arvis-landing-demo .navbar .logo,
body.spaces-guest-view .navbar .logo {
    margin-left: 5mm;
}

body.is-authenticated .navbar .nav-links {
    grid-column: 3;
    justify-self: end;
    gap: 0.85rem;
    padding-right: clamp(6px, 0.8vw, 14px);
}

body.is-authenticated #clawground.playground-section {
    padding: 0.65rem 0.25rem 0;
    min-height: calc(100dvh - 64px);
}

body.is-authenticated #clawground .container {
    display: flex;
    height: calc(100dvh - 72px);
    min-height: 0;
}

body.is-authenticated #clawground .playground-container {
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: none;
}

body.is-authenticated #clawground .playground-main,
body.is-authenticated #clawground .agent-sidebar,
body.is-authenticated #clawground .chat-messages {
    min-height: 0;
}

body.is-authenticated #clawground .playground-main {
    display: flex;
    flex-direction: column;
}

body.is-authenticated #clawground .chat-input-area {
    margin-top: auto;
    flex-shrink: 0;
}

@media (max-width: 1024px) {
    body.is-authenticated #clawground .container {
        height: calc(100dvh - 84px);
    }
}

@media (max-width: 768px) {
    body.is-authenticated #clawground .container {
        height: calc(100dvh - 78px);
    }

    body.is-authenticated #clawground .playground-container {
        height: 100%;
        min-height: 0;
    }

    body.is-authenticated #clawground .agent-sidebar {
        max-height: 34dvh;
    }

    body.is-authenticated #clawground .playground-main {
        min-height: 0;
    }
}

/* Mobile auth: keep chat input row compact and inside viewport */
@media (max-width: 768px) {
    body.is-authenticated #clawground .chat-input-area {
        flex-wrap: nowrap;
        padding: 0.65rem;
        gap: 0.5rem;
    }

    body.is-authenticated #clawground .chat-input-area input {
        padding: 0.72rem 0.9rem;
        font-size: 16px;
    }

    body.is-authenticated #clawground .chat-input-area .btn {
        width: auto;
        padding: 0.72rem 0.86rem;
        font-size: 0.76rem;
    }

    body.is-authenticated #clawground .chat-input-area .chat-attach-btn,
    body.is-authenticated #clawground .chat-input-area .chat-mic-btn {
        min-width: 40px;
        width: 40px;
        height: 40px;
        padding: 0;
    }

    body.is-authenticated #clawground .chat-input-area .chat-stop-btn {
        min-width: 74px;
    }

    body.is-authenticated.spaces-mode-active #clawground #clawground-input-area {
        padding: 0.65rem 0.75rem calc(0.65rem + env(safe-area-inset-bottom, 0px));
    }
}

/* Final clamp for tiny viewport rounding + anchor jumps */
body.is-authenticated #clawground {
    scroll-margin-top: 96px;
}

@media (max-width: 768px) {
    body.is-authenticated #clawground .container {
        height: calc(100dvh - 82px);
    }
}

.agent-avatar.is-thinking,
.office-claw-avatar.is-thinking,
.spaces-claw-token-avatar.is-thinking {
    box-shadow: 0 0 0 2px rgba(255, 252, 0, 0.28), 0 0 14px rgba(255, 252, 0, 0.35);
    animation: clawThinkingPulse 1.1s ease-in-out infinite;
}

.agent-avatar.is-thinking::after,
.office-claw-avatar.is-thinking::after,
.spaces-claw-token-avatar.is-thinking::after {
    content: '';
    position: absolute;
    right: -5px;
    top: -5px;
    width: 11px;
    height: 11px;
    border: 2px solid rgba(255, 252, 0, 0.92);
    border-right-color: transparent;
    border-radius: 50%;
    background: rgba(8, 8, 8, 0.9);
    box-shadow: 0 0 8px rgba(255, 252, 0, 0.28);
    animation: clawThinkingSpin 0.8s linear infinite;
}

.spaces-claw-token-avatar.is-thinking::after {
    right: -8px;
    top: -8px;
    width: 28px;
    height: 28px;
    border-width: 3px;
}

@keyframes clawThinkingSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes clawThinkingPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.04); }
}

.reminder-popup {
    position: fixed;
    right: 20px;
    bottom: 22px;
    z-index: 1900;
    min-width: 260px;
    max-width: min(92vw, 420px);
    border: 1px solid rgba(255, 252, 0, 0.62);
    border-radius: 12px;
    background: rgba(10, 10, 10, 0.96);
    color: #f3f3f3;
    padding: 0.65rem 0.8rem 0.72rem;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45), 0 0 22px rgba(255, 252, 0, 0.16);
}

.reminder-popup-title {
    font-size: 0.74rem;
    font-weight: 800;
    color: var(--brand-yellow);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.32rem;
}

.reminder-popup-body {
    font-size: 0.88rem;
    line-height: 1.35;
    padding-right: 1.2rem;
}

.reminder-popup-close {
    position: absolute;
    right: 8px;
    top: 6px;
    width: 24px;
    height: 24px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(22, 22, 22, 0.9);
    color: #f0f0f0;
    border-radius: 8px;
    cursor: pointer;
    line-height: 1;
}

.office-summary-thread {
    display: grid;
    gap: 0.5rem;
}

.office-summary-line {
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(14, 14, 14, 0.82);
    border-radius: 10px;
    padding: 0.5rem 0.6rem;
}

.office-summary-line.user {
    border-color: rgba(255, 252, 0, 0.38);
    background: rgba(34, 30, 2, 0.42);
}

.office-summary-speaker {
    font-size: 0.67rem;
    font-weight: 800;
    color: var(--brand-yellow);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.24rem;
}

.office-summary-text {
    font-size: 0.9rem;
    line-height: 1.4;
    color: #ececec;
    white-space: pre-wrap;
}

/* --- Interactive hover polish --- */
@media (hover: hover) and (pointer: fine) {
    .nav-links a:hover,
    .nav-text-btn:hover {
        color: var(--brand-yellow);
        text-shadow: 0 0 12px rgba(255, 252, 0, 0.35);
    }

    .nav-highlight:hover {
        transform: translateY(-1px) scale(1.03);
        box-shadow: 0 0 22px rgba(255, 252, 0, 0.55);
    }

    .close:hover {
        color: var(--brand-yellow);
        border-color: var(--hover-border-soft);
        background: var(--hover-bg);
        box-shadow: var(--hover-glow);
    }

    .toggle-btn:not(.active):hover {
        border-color: var(--hover-border-soft);
        background: var(--hover-bg);
        color: #fff9bf;
        box-shadow: var(--hover-glow);
    }

    .create-space-agent-item:hover {
        border-color: var(--hover-border-soft);
        background: var(--hover-bg);
        box-shadow: var(--hover-glow);
    }

    .agent-item:not(.active):hover {
        border-color: var(--hover-border-soft);
        background: var(--hover-bg);
        box-shadow: var(--hover-glow);
    }

    .office-control-btn:hover,
    .office-control-input:hover:not(:focus) {
        border-color: var(--hover-border);
        background: var(--hover-bg);
        color: #fff9bf;
        box-shadow: var(--hover-glow);
    }

    .edit-skills-search-input:hover:not(:focus) {
        border-color: var(--hover-border-soft);
        background: var(--hover-bg);
    }

    .edit-skills-search-btn:hover,
    .office-bubble-edit-btn:hover {
        background: var(--hover-bg-strong);
        border-color: var(--hover-border-soft);
        box-shadow: var(--hover-glow);
    }

    .todo-item:hover {
        border-color: var(--hover-border-soft);
        background: var(--hover-bg);
        box-shadow: var(--hover-glow);
    }

    .todo-filter-select:hover:not(:focus),
    .todo-assignee-select:hover:not(:focus),
    .todo-deadline-input:hover:not(:focus),
    .todo-edit-input:hover:not(:focus),
    .todo-edit-assignee:hover:not(:focus),
    .todo-edit-deadline:hover:not(:focus),
    .accounting-month-input:hover:not(:focus),
    .accounting-currency-select:hover:not(:focus),
    .accounting-type-filter:hover:not(:focus),
    .files-sort-select:hover:not(:focus),
    .model-select:hover:not(:focus),
    .spaces-text-font-control select:hover:not(:focus) {
        border-color: var(--hover-border-soft);
        background: var(--hover-bg);
        box-shadow: var(--hover-glow);
    }

    .files-view-btn:hover:not(.active) {
        background: var(--hover-bg-strong);
        color: #fff9bf;
        box-shadow: var(--hover-glow);
    }

    .files-list-row:hover {
        background: var(--hover-bg);
        box-shadow: inset 0 0 0 1px rgba(255, 252, 0, 0.18);
    }

    .files-card:hover {
        border-color: var(--hover-border-soft);
        box-shadow: var(--hover-glow);
        transform: translateY(-2px);
    }

    .content-platform-card:hover {
        border-color: var(--hover-border-soft);
        background: var(--hover-bg);
        box-shadow: var(--hover-glow);
    }

    .content-platform-pill:hover {
        border-color: var(--hover-border-soft);
        background: var(--hover-bg);
        color: #fff9bf;
    }

    .content-platform-btn--connect:hover {
        border-color: var(--hover-border);
        color: var(--brand-yellow);
        background: var(--hover-bg);
        box-shadow: var(--hover-glow);
    }

    .content-add-btn:hover,
    .accounting-add-btn:hover {
        border-color: var(--hover-border);
        background: var(--hover-bg-strong);
        box-shadow: var(--hover-glow);
    }

    .accounting-entry-row:hover {
        border-color: var(--hover-border-soft);
        background: var(--hover-bg);
        box-shadow: inset 0 0 0 1px rgba(255, 252, 0, 0.14);
    }

    .spaces-share-corner:hover,
    .spaces-fullscreen-corner:hover {
        border-color: var(--hover-border-soft);
        color: var(--brand-yellow);
        background: var(--hover-bg);
        box-shadow: var(--hover-glow);
    }

    .spaces-mode-toggle:not(.active):not([aria-pressed="true"]):hover,
    .calendar-month-btn:hover {
        border-color: var(--hover-border);
        color: #fff9bf;
        background: var(--hover-bg);
        box-shadow: var(--hover-glow);
    }

    .spaces-draw-control:hover {
        border-color: var(--hover-border-soft);
        background: var(--hover-bg);
        color: #fff9bf;
        box-shadow: var(--hover-glow);
    }

    .spaces-draw-control input[type="color"]:hover {
        border-color: var(--hover-border-soft);
        box-shadow: var(--hover-glow);
    }

    .spaces-space-circle:not(.active):hover {
        border-color: var(--hover-border);
        color: #fff8be;
        background: var(--hover-bg);
        box-shadow: var(--hover-glow);
    }

    .spaces-remove-zone:hover,
    .spaces-remove-zone-inline:hover {
        border-color: rgba(255, 110, 110, 0.75);
        background: rgba(255, 80, 80, 0.14);
        box-shadow: 0 0 16px rgba(255, 90, 90, 0.28);
    }

    .calendar-day:not(.empty):hover {
        border-color: var(--hover-border-soft);
        background: var(--hover-bg-strong);
        box-shadow: var(--hover-glow);
        transform: translateY(-1px);
    }

    .calendar-day-popover-row:hover,
    .calendar-deadline-row:hover,
    .calendar-meeting-row:hover {
        border-color: var(--hover-border-soft);
        background: var(--hover-bg);
        box-shadow: var(--hover-glow);
    }

    .calendar-deadline-done-btn:hover,
    .calendar-day-popover-done-btn:hover,
    .calendar-day-detail-close:hover,
    .reminder-popup-close:hover {
        border-color: var(--hover-border-soft);
        background: var(--hover-bg-strong);
        color: var(--brand-yellow);
        box-shadow: var(--hover-glow);
    }

    .chat-input-area .btn-primary:hover,
    #clawground-send-btn:hover:not(:disabled) {
        transform: translateY(-1px) scale(1.03);
        background: #fff066;
        box-shadow: 0 0 24px rgba(255, 252, 0, 0.55);
    }

    .chat-mic-btn:hover:not(.listening),
    .chat-attach-btn:hover,
    .office-chat-mic-btn:hover:not(.listening) {
        border-color: var(--hover-border);
        background: var(--hover-bg);
        box-shadow: var(--hover-glow);
    }

    .form-group input:hover:not(:focus),
    .form-group textarea:hover:not(:focus),
    .settings-input:hover:not(:focus),
    #clawground textarea:hover:not(:focus),
    #clawground input[type="text"]:hover:not(:focus),
    #clawground input[type="email"]:hover:not(:focus),
    #clawground input[type="password"]:hover:not(:focus),
    #clawground input[type="month"]:hover:not(:focus),
    #clawground input[type="date"]:hover:not(:focus),
    #clawground input[type="number"]:hover:not(:focus),
    #clawground select:hover:not(:focus) {
        border-color: var(--hover-border-soft);
        background: var(--hover-bg);
        box-shadow: var(--hover-glow);
    }
}

.toggle-btn:not(.active):hover {
    border-color: var(--hover-border-soft);
    background: var(--hover-bg);
    color: #fff9bf;
}

.create-space-agent-item {
    transition: var(--interactive-transition);
}

.create-space-agent-item:hover {
    border-color: var(--hover-border-soft);
    background: rgba(255, 252, 0, 0.05);
}

.office-control-btn,
.office-control-input {
    transition: var(--interactive-transition);
}

.office-control-input:hover:not(:focus) {
    border-color: var(--hover-border-soft);
    background: rgba(255, 252, 0, 0.04);
}

.edit-skills-search-btn,
.edit-skills-search-input {
    transition: var(--interactive-transition);
}

.edit-skills-search-input:hover:not(:focus) {
    border-color: var(--hover-border-soft);
    background: rgba(255, 252, 0, 0.04);
}

.edit-skills-search-btn:hover {
    background: rgba(255, 252, 0, 0.08);
    box-shadow: var(--hover-glow);
}

.todo-item,
.todo-filter-select,
.todo-assignee-select,
.todo-deadline-input,
.todo-edit-input,
.todo-edit-assignee,
.todo-edit-deadline {
    transition: var(--interactive-transition);
}

.todo-item:hover {
    border-color: rgba(255, 252, 0, 0.35);
    background: rgba(255, 252, 0, 0.03);
}

.todo-filter-select:hover:not(:focus),
.todo-assignee-select:hover:not(:focus),
.todo-deadline-input:hover:not(:focus),
.todo-edit-input:hover:not(:focus),
.todo-edit-assignee:hover:not(:focus),
.todo-edit-deadline:hover:not(:focus) {
    border-color: var(--hover-border-soft);
    background: rgba(255, 252, 0, 0.03);
}

.files-view-btn,
.files-sort-select,
.files-list-row,
.files-card {
    transition: var(--interactive-transition);
}

.files-view-btn:hover:not(.active) {
    background: rgba(255, 252, 0, 0.08);
    color: #fff9bf;
}

.files-sort-select:hover:not(:focus) {
    border-color: var(--hover-border-soft);
    background: rgba(255, 252, 0, 0.04);
}

.files-list-row:hover {
    background: rgba(255, 252, 0, 0.05);
}

.files-card:hover {
    border-color: rgba(255, 252, 0, 0.45);
    box-shadow: 0 0 18px rgba(255, 252, 0, 0.12);
    transform: translateY(-2px);
}

.spaces-share-corner {
    transition: var(--interactive-transition);
    cursor: pointer;
}

.spaces-share-corner:hover {
    box-shadow: var(--hover-glow);
    background: rgba(66, 245, 123, 0.1);
}

.spaces-mode-toggle:not(.active):not([aria-pressed="true"]):hover {
    border-color: rgba(255, 252, 0, 0.55);
    color: #fff9bf;
    box-shadow: var(--hover-glow);
}

.spaces-text-font-control select {
    transition: var(--interactive-transition);
}

.spaces-text-font-control select:hover:not(:focus) {
    border-color: var(--hover-border-soft);
    background: rgba(255, 252, 0, 0.05);
}

.calendar-day-popover-row,
.calendar-deadline-row,
.calendar-meeting-row {
    transition: var(--interactive-transition);
}

.calendar-day-popover-row:hover,
.calendar-deadline-row:hover,
.calendar-meeting-row:hover {
    border-color: rgba(255, 252, 0, 0.35);
    background: rgba(255, 252, 0, 0.04);
}

.calendar-deadline-done-btn,
.calendar-day-popover-done-btn {
    transition: var(--interactive-transition);
}

.calendar-deadline-done-btn:hover,
.calendar-day-popover-done-btn:hover {
    background: rgba(255, 252, 0, 0.1);
    box-shadow: var(--hover-glow);
}

.calendar-day-detail-close {
    transition: var(--interactive-transition);
}

.calendar-day-detail-close:hover {
    background: rgba(255, 252, 0, 0.08);
    box-shadow: var(--hover-glow);
}

.reminder-popup-close {
    transition: var(--interactive-transition);
}

.reminder-popup-close:hover {
    border-color: var(--hover-border);
    color: var(--brand-yellow);
    box-shadow: var(--hover-glow);
}

.content-platform-card,
.content-platform-pill,
.accounting-entry-row,
.spaces-fullscreen-corner,
.spaces-remove-zone,
.spaces-remove-zone-inline {
    transition: var(--interactive-transition);
}

.close {
    transition: var(--interactive-transition);
}

@media (prefers-reduced-motion: reduce) {
    .calendar-day:not(.empty):hover,
    .files-card:hover,
    .spaces-mode-toggle.active,
    .spaces-mode-toggle[aria-pressed="true"] {
        transform: none;
    }
}

html:not(.brand-arvis):not(.arvis-app-route) .arvis-only-nav {
    display: none !important;
}

#arvis-inbox-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.08rem;
    color: #4a86c8;
}

#arvis-inbox-btn .nav-inbox-icon {
    width: 1.42em;
    height: 1.42em;
    display: block;
    overflow: visible;
}

#arvis-inbox-btn .nav-inbox-post,
#arvis-inbox-btn .nav-inbox-body,
#arvis-inbox-btn .nav-inbox-roof,
#arvis-inbox-btn .nav-inbox-flag-pole {
    fill: currentColor;
}

#arvis-inbox-btn .nav-inbox-base {
    fill: currentColor;
    opacity: 0.45;
}

#arvis-inbox-btn .nav-inbox-slot {
    fill: rgba(0, 0, 0, 0.35);
}

#arvis-inbox-btn .nav-inbox-flag {
    fill: #e53935;
}

#arvis-inbox-btn:hover,
#arvis-inbox-btn.active {
    color: #6aa0dc;
    text-shadow: 0 0 10px rgba(74, 134, 200, 0.45);
}

#arvis-inbox-btn:hover .nav-inbox-flag,
#arvis-inbox-btn.active .nav-inbox-flag {
    fill: #ff5a52;
}

#arvis-inbox-btn.active {
    background: rgba(142, 200, 255, 0.14);
    border-color: rgba(142, 200, 255, 0.55);
}

.arvis-inbox-panel {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.1rem 1.25rem;
}

.arvis-inbox-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    min-height: 100%;
}

.arvis-inbox-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.arvis-inbox-head h3 {
    margin: 0;
    font-size: 1.15rem;
    color: #f5f5f5;
}

.arvis-inbox-subtitle {
    margin: 0.2rem 0 0;
    font-size: 0.82rem;
    color: #9a9a9a;
}

.arvis-inbox-auth {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    max-width: 360px;
}

.arvis-inbox-auth label {
    font-size: 0.82rem;
    color: #bdbdbd;
}

.arvis-inbox-auth .btn {
    align-self: flex-start;
    padding: 0.55rem 1.1rem;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.arvis-inbox-auth .btn-primary {
    box-shadow: 0 0 14px rgba(255, 252, 0, 0.4);
}

.arvis-inbox-auth .btn-primary:hover {
    box-shadow: 0 0 18px rgba(255, 255, 255, 0.45);
}

.arvis-inbox-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.arvis-inbox-item-wrap {
    display: flex;
    align-items: stretch;
    gap: 0.45rem;
}

.arvis-inbox-item {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    padding: 0.75rem 0.85rem;
    color: #f0f0f0;
    cursor: pointer;
}

.arvis-inbox-item:hover,
.arvis-inbox-item.active {
    border-color: rgba(255, 252, 0, 0.45);
    background: rgba(255, 252, 0, 0.08);
}

.arvis-inbox-item-subject {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.arvis-inbox-item-meta {
    font-size: 0.78rem;
    color: #a8a8a8;
    margin-bottom: 0.35rem;
}

.arvis-inbox-item-preview {
    font-size: 0.82rem;
    color: #c8c8c8;
    line-height: 1.35;
}

.arvis-inbox-delete-btn {
    flex: 0 0 auto;
    align-self: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid rgba(255, 80, 80, 0.35);
    border-radius: 8px;
    background: rgba(255, 80, 80, 0.08);
    color: #ff8a8a;
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
}

.arvis-inbox-delete-btn:hover {
    background: rgba(255, 80, 80, 0.18);
    border-color: rgba(255, 80, 80, 0.65);
    color: #ffb4b4;
}

.arvis-inbox-detail-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.arvis-inbox-delete-selected-btn {
    padding: 0.45rem 0.85rem;
    font-size: 0.78rem;
}

.arvis-inbox-detail {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 0.9rem 1rem;
    background: rgba(0, 0, 0, 0.35);
}

.arvis-inbox-detail-head {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.arvis-inbox-detail-subject {
    margin: 0;
    font-size: 1.05rem;
    color: #fff;
}

.arvis-inbox-detail-meta {
    margin: 0.35rem 0 0;
    font-size: 0.8rem;
    color: #a8a8a8;
}

.arvis-inbox-detail-body {
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.88rem;
    line-height: 1.45;
    color: #e8e8e8;
}

.arvis-inbox-error {
    color: #ff8a8a;
    font-size: 0.84rem;
}

body.spaces-guest-view {
    min-height: 100dvh;
}

body.spaces-guest-view .guest-visible,
body.spaces-guest-view .hero,
body.spaces-guest-view .maker-section,
body.spaces-guest-view .use-cases-section,
body.spaces-guest-view .pricing-section {
    display: none !important;
}

body.spaces-guest-view #clawground {
    display: block !important;
}

body.spaces-guest-view #clawground.playground-section {
    padding: 0.65rem 0.25rem 0;
    min-height: calc(100dvh - 64px);
}

body.spaces-guest-view #clawground .container {
    display: flex;
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 0;
    height: calc(100dvh - 72px);
    min-height: 0;
}

body.spaces-guest-view #clawground .playground-container {
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

body.spaces-guest-view #clawground .playground-main {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
}

body.spaces-guest-view.spaces-mode-active #clawground .spaces-panel,
body.spaces-guest-view.spaces-mode-active #clawground #spaces-panel {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    padding: 0.5rem 0.5rem 0;
}

body.spaces-guest-view #clawground #clawground-input-area,
body.spaces-guest-view #clawground-input-area {
    display: none !important;
}

body.spaces-guest-view #spaces-share-btn,
body.spaces-guest-view #spaces-create-btn {
    display: none !important;
}

body.spaces-guest-view #clawground .agent-sidebar {
    display: none !important;
}

.spaces-guest-banner {
    position: fixed;
    left: 50%;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: min(920px, calc(100vw - 24px));
    padding: 12px 16px;
    border-radius: 14px;
    background: rgba(8, 12, 10, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

.spaces-guest-banner.hidden {
    display: none;
}

.spaces-guest-banner-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.spaces-guest-banner-copy strong {
    color: #fff;
    font-size: 0.92rem;
}

.spaces-guest-banner-copy span {
    color: #bdbdbd;
    font-size: 0.82rem;
    line-height: 1.35;
}

body.spaces-collab-guest.spaces-collab-view-only .spaces-board-controls .spaces-mode-toggle:not(#spaces-nav-btn) {
    cursor: pointer;
}

body.spaces-collab-guest.spaces-collab-view-only[data-spaces-collab-access-mode="edit"] .spaces-board-controls .spaces-mode-toggle:not(#spaces-nav-btn),
body.spaces-collab-guest.spaces-collab-view-only[data-spaces-collab-access-mode="edit"] #spaces-clear-draw-btn,
body.spaces-collab-guest.spaces-collab-view-only[data-spaces-collab-access-mode="edit"] #spaces-remove-zone,
body.spaces-collab-guest.spaces-collab-view-only[data-spaces-collab-access-mode="edit"] #spaces-mark-btn,
body.spaces-collab-guest.spaces-collab-view-only[data-spaces-collab-access-mode="edit"] #spaces-draw-btn,
body.spaces-collab-guest.spaces-collab-view-only[data-spaces-collab-access-mode="edit"] #spaces-text-btn,
body.spaces-collab-guest.spaces-collab-view-only[data-spaces-collab-access-mode="edit"] #spaces-sheet-btn,
body.spaces-collab-guest.spaces-collab-view-only[data-spaces-collab-access-mode="edit"] #spaces-doc-btn,
body.spaces-collab-guest.spaces-collab-view-only[data-spaces-collab-access-mode="edit"] #spaces-deck-btn,
body.spaces-collab-guest.spaces-collab-view-only[data-spaces-collab-access-mode="edit"] #spaces-erase-btn {
    pointer-events: auto;
    opacity: 0.72;
}
