body.command {
    --ink: #f3f0e8;
    --mist: #d7e4c8;
    --signal: #d6ff3e;
    --signal-ink: #14180d;
    --glass: rgba(7, 12, 8, 0.5);
    --line: rgba(214, 255, 62, 0.28);
    background: #070807;
    color: var(--ink);
    font-family: "Sora", sans-serif;
    overflow: hidden;
}

html[data-theme="light"] body.command {
    --ink: #1a4d2e;
    --mist: #2d5a27;
    --signal: #1a4d2e;
    --signal-ink: #f5f5dc;
    --glass: rgba(245, 245, 220, 0.62);
    --line: rgba(26, 77, 46, 0.38);
    background: #f5f5dc;
}

html[data-theme="light"] body.command .main-content {
    background: rgba(245, 245, 220, 0.22);
}

html[data-theme="light"] body.command .field-veil {
    background: radial-gradient(ellipse at center, transparent 28%, rgba(245, 245, 220, 0.42) 100%);
}

html[data-theme="light"] body.command .sidebar-item:hover .default-text,
html[data-theme="light"] body.command .sidebar-item:hover .hover-text,
html[data-theme="light"] body.command .sidebar-item:focus-within .default-text,
html[data-theme="light"] body.command .sidebar-item:focus-within .hover-text {
    color: #f5f5dc;
}

html[data-theme="light"] body.command .hover-description {
    background: rgba(245, 245, 220, 0.92);
    border: 1px solid rgba(26, 77, 46, 0.55);
    box-shadow: 0 16px 32px rgba(26, 77, 46, 0.12);
}

html[data-theme="light"] body.command .hover-description h2,
html[data-theme="light"] body.command .hover-description p {
    color: #1a4d2e;
}

html[data-theme="light"] body.command .grain {
    background: repeating-linear-gradient(
        to bottom,
        rgba(26, 77, 46, 0.14) 0px,
        rgba(26, 77, 46, 0.14) 1px,
        transparent 2px,
        transparent 4px
    );
}

body.command,
body.command .sidebar-item .default-text,
body.command .sidebar-item .hover-text,
body.command .char,
html[data-theme="light"] body.command .char,
html[data-theme="light"] body.command .sidebar-item .default-text,
html[data-theme="light"] body.command .sidebar-item .hover-text {
    color: var(--ink);
}

#field {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    display: block;
}

body.command .field-veil {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        radial-gradient(ellipse at center, transparent 30%, rgba(5, 8, 6, 0.55) 100%);
}

body.command .grain {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.28;
    background: repeating-linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.28) 0px,
        rgba(0, 0, 0, 0.28) 1px,
        transparent 2px,
        transparent 4px
    );
}

body.command .main-content .theme-controls {
    position: static;
    top: auto;
    right: auto;
    z-index: 2;
    gap: 0.25rem;
    align-items: center;
}

body.command .theme-toggle {
    background: var(--glass);
    border: 1px solid var(--line);
    color: var(--ink);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

body.command .theme-toggle:hover,
body.command .theme-toggle:focus-visible {
    box-shadow: 0 0 0 1px var(--signal), 0 0 22px rgba(214, 255, 62, 0.45);
}

body.command .theme-toggle:focus-visible,
body.command .nav-toggle:focus-visible,
body.command .sidebar-item a:focus-visible {
    outline: 2px solid var(--ink);
    outline-offset: 3px;
}

body.command .nav-toggle {
    display: none;
}

body.command .layout {
    position: relative;
    z-index: 2;
    height: 100vh;
    height: 100dvh;
    box-sizing: border-box;
    padding: 18px;
    gap: 14px;
    background: transparent;
}

body.command .main-content::before,
body.command .main-content::after {
    display: none;
}

body.command .sidebar,
body.command .main-content {
    border: 1px solid var(--line);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
}

body.command .sidebar {
    background: var(--glass);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

body.command .main-content {
    background: rgba(7, 12, 8, 0.18);
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
}

body.command .sidebar {
    width: min(320px, 34vw);
    align-items: stretch;
    justify-content: flex-start;
    padding: 1.1rem 0.9rem 1.2rem;
    overflow: auto;
}

body.command .panel-chrome {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin: 0 0 0.9rem;
    padding: 0 0.7rem 0.75rem;
    border-bottom: 1px solid var(--line);
    font-family: "Martian Mono", ui-monospace, monospace;
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    color: var(--mist);
}

body.command .main-content .panel-chrome {
    position: absolute;
    top: 0.45rem;
    left: 0.85rem;
    right: 0.45rem;
    margin: 0;
    align-items: center;
    padding-bottom: 0.45rem;
}

body.command .main-content .theme-toggle {
    width: 36px;
    height: 36px;
    background: transparent;
    box-shadow: none;
}

body.command .live::before {
    content: "";
    display: inline-block;
    width: 0.45rem;
    height: 0.45rem;
    margin-right: 0.4rem;
    border-radius: 50%;
    background: var(--signal);
    box-shadow: 0 0 10px var(--signal);
}

body.command .sidebar-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

body.command .sidebar-item {
    animation: command-rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

body.command .sidebar-item:nth-child(1) { animation-delay: 0.04s; }
body.command .sidebar-item:nth-child(2) { animation-delay: 0.08s; }
body.command .sidebar-item:nth-child(3) { animation-delay: 0.12s; }
body.command .sidebar-item:nth-child(4) { animation-delay: 0.16s; }
body.command .sidebar-item:nth-child(5) { animation-delay: 0.2s; }
body.command .sidebar-item:nth-child(6) { animation-delay: 0.24s; }
body.command .sidebar-item:nth-child(7) { animation-delay: 0.28s; }

body.command .sidebar-item a {
    position: relative;
    overflow: hidden;
    justify-content: flex-start;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(214, 255, 62, 0.16);
    background: rgba(255, 255, 255, 0.03);
    transition: border-color 0.2s linear, transform 0.2s ease, box-shadow 0.2s linear;
}

body.command .sidebar-item a::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--signal);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 0;
}

body.command .sidebar-item .default-text,
body.command .sidebar-item .hover-text {
    position: relative;
    z-index: 1;
    font-family: "Sora", sans-serif;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: -0.03em;
}

@media (hover: hover) {
    body.command .sidebar-item:hover {
        background: transparent;
        text-shadow: none;
    }

    body.command .sidebar-item:hover a,
    body.command .sidebar-item:focus-within a {
        border-color: var(--signal);
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
    }

    body.command .sidebar-item:hover a::before,
    body.command .sidebar-item:focus-within a::before {
        transform: scaleX(1);
    }

    body.command .sidebar-item:hover .default-text,
    body.command .sidebar-item:hover .hover-text,
    body.command .sidebar-item:focus-within .default-text,
    body.command .sidebar-item:focus-within .hover-text {
        color: var(--signal-ink);
    }
}

body.command .main-content {
    position: relative;
    margin: 0;
    padding: 4.5rem 2rem 2rem;
}

body.command .display-name {
    font-family: "Sora", sans-serif;
    font-weight: 500;
    font-size: clamp(2.2rem, 5vw, 4.6rem);
    letter-spacing: -0.04em;
    line-height: 0.9;
    text-align: center;
    max-width: 100%;
}

body.command .char {
    color: var(--ink);
}

body.command .large-char {
    font-size: 1em;
}

body.command .baroque-char {
    color: var(--signal) !important;
    text-shadow: 0 8px 24px rgba(0, 0, 0, 0.45) !important;
}

body.command .hover-description {
    max-width: 36rem;
    padding: 1.4rem 1.5rem 1.5rem;
    text-align: left;
    background: rgba(5, 8, 6, 0.55);
    border: 1px solid var(--line);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

body.command .hover-description h2 {
    margin: 0 0 0.7rem;
    font-family: "Sora", sans-serif;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 500;
    letter-spacing: -0.04em;
    color: var(--ink);
}

body.command .hover-description p {
    margin: 0;
    max-width: 52ch;
    color: var(--mist);
    font-size: 1.05rem;
    line-height: 1.55;
}

@keyframes command-rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}

@media (max-width: 768px) {
    html.command-root,
    body.command,
    body.command .layout {
        height: 100dvh;
        max-height: 100dvh;
        overflow: hidden;
    }

    body.command .layout {
        display: block;
        width: 100%;
        box-sizing: border-box;
        padding: 8px;
    }

    body.command .main-content {
        display: flex;
        flex-direction: column;
        width: 100%;
        height: 100%;
        max-height: 100%;
        min-height: 0;
        box-sizing: border-box;
        overflow: hidden;
        padding: 0.7rem 0.7rem 0;
    }

    body.command .main-content .panel-chrome {
        position: relative;
        top: auto;
        left: auto;
        right: auto;
        width: 100%;
        flex-shrink: 0;
        box-sizing: border-box;
    }

    body.command .main-content .theme-toggle {
        width: 32px;
        height: 32px;
        flex-shrink: 0;
    }

    body.command #default-display {
        flex: 1 1 auto;
        min-height: 0;
        max-width: 100%;
        overflow: hidden;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        align-content: center;
        justify-content: center;
    }

    body.command #hover-display:not(.hidden) {
        flex: 1 1 auto;
        min-height: 0;
        max-width: 100%;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    body.command #hover-display.hidden {
        display: none;
    }

    body.command #default-display {
        font-size: clamp(1.6rem, 8vw, 2.4rem);
        white-space: normal;
    }

    body.command .nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        z-index: 40;
        flex-shrink: 0;
        width: calc(100% + 1.4rem);
        margin: 0.4rem -0.7rem 0;
        border: 0;
        border-radius: 0;
        background: var(--signal);
        color: var(--signal-ink);
        font-family: "Sora", sans-serif;
        font-size: 0.95rem;
        font-weight: 600;
        letter-spacing: -0.03em;
        padding: 0.85rem 1rem;
        box-shadow: none;
    }

    body.command .sidebar {
        position: fixed;
        z-index: 35;
        left: 8px;
        right: 8px;
        bottom: 8px;
        width: auto;
        height: 75dvh;
        max-height: 75dvh;
        padding: 0.7rem 0.7rem 3.4rem;
        box-sizing: border-box;
        overflow: hidden;
        transform: translateY(110%);
        transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
    }

    body.command.nav-open .sidebar {
        transform: translateY(0);
    }

    body.command .sidebar-list {
        flex: 1 1 auto;
        min-height: 0;
        overflow: hidden;
        justify-content: stretch;
        gap: 0.35rem;
    }

    body.command .sidebar-item {
        flex: 1 1 0;
        min-height: 0;
        display: flex;
    }

    body.command .sidebar-item a {
        flex: 1;
        align-items: center;
        padding: 0.2rem 0.75rem;
    }

    body.command .sidebar-item .hover-text {
        display: none !important;
    }

    body.command .sidebar-item .default-text {
        display: block !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.command .sidebar-item,
    body.command .sidebar {
        animation: none;
        transition: none;
    }
}
