/* =========================================================
   MONARCH AI — METALLIC INTERFACE
   RESPONSIVE UI v12.0
========================================================= */


/* =========================================================
   RESET
========================================================= */

*,
*::before,
*::after {

    box-sizing: border-box;

}


html {

    width: 100%;
    min-height: 100%;
    background: #08090d;

}


body {

    margin: 0;

    width: 100%;
    min-width: 0;
    min-height: 100%;

    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background: #08090d;

    color: #f4f5f7;

    overflow-x: hidden;

    -webkit-text-size-adjust: 100%;
    text-rendering: optimizeLegibility;

}


button,
textarea,
input {

    font: inherit;

}


button {

    -webkit-tap-highlight-color: transparent;

}


textarea {

    -webkit-appearance: none;
    appearance: none;

}


/* =========================================================
   ROOT APPLICATION
========================================================= */

.monarch-app {

    --bg-main:
        #08090d;

    --bg-panel:
        #0d0f15;

    --bg-panel-2:
        #11131b;

    --surface:
        rgba(255,255,255,.045);

    --surface-strong:
        rgba(255,255,255,.075);

    --text:
        #f7f7fa;

    --muted:
        #979ba8;

    --line:
        rgba(255,255,255,.10);

    --accent:
        #b66cff;

    --accent-light:
        #e0c4ff;

    --accent-dark:
        #5d229b;

    --accent-rgb:
        182,108,255;

    --secondary:
        #ffffff;

    --danger:
        #ff5364;

    --online:
        #55ff9b;

    width: 100%;

    min-height:
        100vh;

    min-height:
        100dvh;

    min-height:
        -webkit-fill-available;

    background:
        radial-gradient(
            circle at 50% -10%,
            rgba(var(--accent-rgb), .13),
            transparent 38%
        ),
        linear-gradient(
            145deg,
            #050609 0%,
            var(--bg-main) 48%,
            #090a0f 100%
        );

    color:
        var(--text);

    position:
        relative;

    overflow:
        hidden;

}


/* =========================================================
   METALLIC PURPLE + BLACK
========================================================= */

.monarch-app[data-theme="metallic-purple-black"] {

    --accent:
        #bd73ff;

    --accent-light:
        #ead2ff;

    --accent-dark:
        #64239d;

    --accent-rgb:
        189,115,255;

    --secondary:
        #ffffff;

}


/* =========================================================
   METALLIC BLUE + GREEN
========================================================= */

.monarch-app[data-theme="metallic-blue-green"] {

    --accent:
        #52bfff;

    --accent-light:
        #b8efff;

    --accent-dark:
        #0872a8;

    --accent-rgb:
        82,191,255;

    --secondary:
        #55ff9c;

}


/* =========================================================
   METALLIC BLACK + WHITE
========================================================= */

.monarch-app[data-theme="metallic-black-white"] {

    --accent:
        #dce2e8;

    --accent-light:
        #ffffff;

    --accent-dark:
        #737b85;

    --accent-rgb:
        220,226,232;

    --secondary:
        #ffffff;

}


/* =========================================================
   METALLIC ORANGE
========================================================= */

.monarch-app[data-theme="metallic-orange"] {

    --accent:
        #ff9b3d;

    --accent-light:
        #ffd1a1;

    --accent-dark:
        #a34c09;

    --accent-rgb:
        255,155,61;

}


/* =========================================================
   METALLIC YELLOW
========================================================= */

.monarch-app[data-theme="metallic-yellow"] {

    --accent:
        #ffd84d;

    --accent-light:
        #fff1a3;

    --accent-dark:
        #a68100;

    --accent-rgb:
        255,216,77;

}


/* =========================================================
   METALLIC PINK
========================================================= */

.monarch-app[data-theme="metallic-pink"] {

    --accent:
        #ff72b7;

    --accent-light:
        #ffc0df;

    --accent-dark:
        #a32968;

    --accent-rgb:
        255,114,183;

}


/* =========================================================
   METALLIC GRAY
========================================================= */

.monarch-app[data-theme="metallic-gray"] {

    --accent:
        #aeb7c2;

    --accent-light:
        #f3f5f7;

    --accent-dark:
        #5f6974;

    --accent-rgb:
        174,183,194;

}


/* =========================================================
   METALLIC RED + BLUE
========================================================= */

.monarch-app[data-theme="metallic-red-blue"] {

    --accent:
        #ff4e59;

    --accent-light:
        #ffb5ba;

    --accent-dark:
        #9c1821;

    --accent-rgb:
        255,78,89;

    --secondary:
        #4dbbff;

}


/* =========================================================
   METALLIC RED + WHITE
========================================================= */

.monarch-app[data-theme="metallic-red-white"] {

    --accent:
        #ff4c55;

    --accent-light:
        #ffc2c5;

    --accent-dark:
        #9d151c;

    --accent-rgb:
        255,76,85;

    --secondary:
        #ffffff;

}


/* =========================================================
   METALLIC WHITE
========================================================= */

.monarch-app[data-theme="metallic-white"] {

    --accent:
        #ffffff;

    --accent-light:
        #ffffff;

    --accent-dark:
        #8c9299;

    --accent-rgb:
        255,255,255;

    --secondary:
        #d9dfe5;

}


/* =========================================================
   METALLIC SKY BLUE
========================================================= */

.monarch-app[data-theme="metallic-sky-blue"] {

    --accent:
        #64d8ff;

    --accent-light:
        #c4f3ff;

    --accent-dark:
        #1684a7;

    --accent-rgb:
        100,216,255;

}


/* =========================================================
   METALLIC BLUE + YELLOW
========================================================= */

.monarch-app[data-theme="metallic-blue-yellow"] {

    --accent:
        #3f9dff;

    --accent-light:
        #b8dcff;

    --accent-dark:
        #14559a;

    --accent-rgb:
        63,157,255;

    --secondary:
        #ffe15b;

}


/* =========================================================
   METALLIC LEMON
========================================================= */

.monarch-app[data-theme="metallic-lemon"] {

    --accent:
        #dfff3f;

    --accent-light:
        #f4ffab;

    --accent-dark:
        #819800;

    --accent-rgb:
        223,255,63;

}


/* =========================================================
   MAIN APP
========================================================= */

.main-app {

    width: 100%;

    min-height:
        100vh;

    min-height:
        100dvh;

    display:
        grid;

    grid-template-rows:
        auto auto minmax(0, 1fr) auto auto auto;

    position:
        relative;

    isolation:
        isolate;

}


/* =========================================================
   HEADER
========================================================= */

.monarch-header {

    width: 100%;

    min-width: 0;

    display:
        flex;

    align-items:
        center;

    justify-content:
        space-between;

    gap:
        16px;

    padding:
        max(14px, env(safe-area-inset-top))
        clamp(16px, 4vw, 34px)
        14px
        clamp(16px, 4vw, 34px);

    border-bottom:
        1px solid var(--line);

    background:
        linear-gradient(
            180deg,
            rgba(15,16,22,.94),
            rgba(8,9,13,.78)
        );

    backdrop-filter:
        blur(18px);

    -webkit-backdrop-filter:
        blur(18px);

    position:
        relative;

    z-index:
        10;

}


/* =========================================================
   BRAND
========================================================= */

.brand {

    display:
        flex;

    align-items:
        center;

    gap:
        11px;

    min-width:
        0;

}


.brand-icon {

    width:
        clamp(42px, 10vw, 52px);

    height:
        clamp(42px, 10vw, 52px);

    flex:
        0 0 auto;

    display:
        grid;

    place-items:
        center;

    border-radius:
        15px;

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,.15),
            rgba(var(--accent-rgb),.12) 45%,
            rgba(0,0,0,.48)
        );

    border:
        1px solid
        rgba(var(--accent-rgb),.42);

    box-shadow:
        inset 0 1px 1px rgba(255,255,255,.14),
        0 0 22px rgba(var(--accent-rgb),.16);

    font-size:
        clamp(21px, 5vw, 28px);

}


.brand-text {

    min-width:
        0;

}


.brand-text h1 {

    margin:
        0;

    font-size:
        clamp(16px, 4vw, 21px);

    line-height:
        1;

    letter-spacing:
        .16em;

    font-weight:
        850;

    background:
        linear-gradient(
            110deg,
            #ffffff 0%,
            var(--accent-light) 38%,
            #ffffff 60%,
            var(--accent) 100%
        );

    -webkit-background-clip:
        text;

    background-clip:
        text;

    color:
        transparent;

}


.brand-text span {

    display:
        block;

    margin-top:
        5px;

    font-size:
        8px;

    letter-spacing:
        .28em;

    color:
        var(--muted);

    white-space:
        nowrap;

}


/* =========================================================
   HEADER ACTIONS
========================================================= */

.header-actions {

    display:
        flex;

    align-items:
        center;

    gap:
        clamp(8px, 2vw, 14px);

    flex:
        0 0 auto;

}


.header-status {

    display:
        flex;

    align-items:
        center;

    gap:
        7px;

    font-size:
        9px;

    letter-spacing:
        .13em;

    font-weight:
        800;

    color:
        var(--muted);

}


.status-dot {

    width:
        8px;

    height:
        8px;

    border-radius:
        50%;

    background:
        #ff4d5e;

    box-shadow:
        0 0 8px rgba(255,77,94,.65);

    transition:
        .25s ease;

}


.status-dot.online {

    background:
        var(--online);

    box-shadow:
        0 0 6px var(--online),
        0 0 14px rgba(85,255,155,.55);

}


.header-button {

    width:
        42px;

    height:
        42px;

    border:
        1px solid var(--line);

    border-radius:
        13px;

    background:
        rgba(255,255,255,.045);

    color:
        #f2f2f4;

    cursor:
        pointer;

    display:
        grid;

    place-items:
        center;

    font-size:
        18px;

    transition:
        transform .2s ease,
        border-color .2s ease,
        background .2s ease,
        box-shadow .2s ease;

}


.header-button:hover {

    border-color:
        rgba(var(--accent-rgb),.55);

    background:
        rgba(var(--accent-rgb),.08);

    box-shadow:
        0 0 18px rgba(var(--accent-rgb),.12);

}


.header-button:active {

    transform:
        scale(.94);

}


/* =========================================================
   WELCOME
========================================================= */

.monarch-welcome {

    width:
        min(900px, 100%);

    margin:
        0 auto;

    padding:
        clamp(22px, 5vw, 44px)
        clamp(18px, 5vw, 34px)
        clamp(10px, 2vw, 18px);

    text-align:
        center;

}


.welcome-symbol {

    width:
        clamp(52px, 13vw, 70px);

    height:
        clamp(52px, 13vw, 70px);

    margin:
        0 auto 14px;

    display:
        grid;

    place-items:
        center;

    border-radius:
        22px;

    background:
        linear-gradient(
            145deg,
            rgba(var(--accent-rgb),.18),
            rgba(255,255,255,.035),
            rgba(0,0,0,.5)
        );

    border:
        1px solid rgba(var(--accent-rgb),.38);

    box-shadow:
        inset 0 1px rgba(255,255,255,.16),
        0 0 30px rgba(var(--accent-rgb),.12);

    font-size:
        clamp(25px, 7vw, 36px);

}


.monarch-welcome h2 {

    margin:
        0;

    font-size:
        clamp(20px, 5vw, 30px);

    line-height:
        1.2;

    font-weight:
        800;

    background:
        linear-gradient(
            110deg,
            #ffffff,
            var(--accent-light),
            #ffffff
        );

    -webkit-background-clip:
        text;

    background-clip:
        text;

    color:
        transparent;

}


.monarch-welcome p {

    width:
        min(700px, 100%);

    margin:
        10px auto 0;

    color:
        var(--muted);

    font-size:
        clamp(12px, 2.7vw, 14px);

    line-height:
        1.65;

}


/* =========================================================
   CHAT CONTAINER
========================================================= */

.chat-container {

    width:
        100%;

    min-height:
        0;

    overflow:
        hidden;

    padding:
        0 clamp(10px, 4vw, 34px);

}


.chat {

    width:
        min(920px, 100%);

    height:
        100%;

    min-height:
        90px;

    margin:
        0 auto;

    overflow-y:
        auto;

    overflow-x:
        hidden;

    padding:
        10px 4px 18px;

    scroll-behavior:
        smooth;

    scrollbar-width:
        thin;

    scrollbar-color:
        rgba(var(--accent-rgb),.35)
        transparent;

}


.chat::-webkit-scrollbar {

    width:
        5px;

}


.chat::-webkit-scrollbar-track {

    background:
        transparent;

}


.chat::-webkit-scrollbar-thumb {

    background:
        rgba(var(--accent-rgb),.35);

    border-radius:
        20px;

}


/* =========================================================
   MESSAGES
========================================================= */

.message {

    width:
        100%;

    display:
        flex;

    align-items:
        flex-end;

    gap:
        9px;

    margin:
        0 0 14px;

    animation:
        messageIn .25s ease both;

}


@keyframes messageIn {

    from {

        opacity:
            0;

        transform:
            translateY(7px);

    }

    to {

        opacity:
            1;

        transform:
            translateY(0);

    }

}


.message.user {

    justify-content:
        flex-end;

}


.message.monarch {

    justify-content:
        flex-start;

}


.avatar {

    width:
        34px;

    height:
        34px;

    flex:
        0 0 34px;

    display:
        grid;

    place-items:
        center;

    border-radius:
        11px;

    background:
        linear-gradient(
            145deg,
            rgba(var(--accent-rgb),.16),
            rgba(255,255,255,.035)
        );

    border:
        1px solid rgba(var(--accent-rgb),.35);

    box-shadow:
        0 0 16px rgba(var(--accent-rgb),.10);

    font-size:
        17px;

}


.bubble {

    max-width:
        min(78%, 700px);

    min-width:
        0;

    padding:
        12px 15px;

    border:
        1px solid rgba(var(--accent-rgb),.38);

    border-radius:
        17px;

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,.065),
            rgba(var(--accent-rgb),.025) 48%,
            rgba(0,0,0,.28)
        );

    box-shadow:
        inset 0 1px rgba(255,255,255,.10),
        0 0 16px rgba(var(--accent-rgb),.07);

    backdrop-filter:
        blur(12px);

    -webkit-backdrop-filter:
        blur(12px);

    overflow:
        hidden;

}


.message.user .bubble {

    border-color:
        rgba(255,255,255,.17);

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,.075),
            rgba(255,255,255,.025)
        );

}


.message-name {

    margin:
        0 0 5px;

    font-size:
        8px;

    letter-spacing:
        .19em;

    font-weight:
        850;

    color:
        var(--accent-light);

}


.message-content {

    color:
        #e9ebef;

    font-size:
        clamp(13px, 3.4vw, 15px);

    line-height:
        1.58;

    overflow-wrap:
        anywhere;

}


.message-content code {

    padding:
        2px 5px;

    border-radius:
        5px;

    background:
        rgba(0,0,0,.38);

    color:
        var(--accent-light);

}


.message-content pre {

    max-width:
        100%;

    overflow-x:
        auto;

    padding:
        12px;

    border:
        1px solid var(--line);

    border-radius:
        10px;

    background:
        rgba(0,0,0,.38);

}


/* =========================================================
   THINKING
========================================================= */

.thinking-message {

    width:
        min(920px, calc(100% - clamp(20px, 8vw, 68px)));

    margin:
        0 auto;

    padding:
        0 0 8px;

}


.thinking-message[hidden] {

    display:
        none !important;

}


.thinking-message .bubble {

    padding:
        10px 14px;

}


.thinking-message .message-content {

    color:
        var(--muted);

}


.dots {

    display:
        inline-block;

    width:
        18px;

    overflow:
        hidden;

    vertical-align:
        bottom;

    animation:
        thinkingDots 1.25s steps(4, end) infinite;

}


@keyframes thinkingDots {

    0% {
        width: 0;
    }

    25% {
        width: 5px;
    }

    50% {
        width: 10px;
    }

    75% {
        width: 15px;
    }

    100% {
        width: 0;
    }

}


/* =========================================================
   QUICK TOPICS
========================================================= */

.quick-topics {

    width:
        min(920px, 100%);

    margin:
        0 auto;

    padding:
        7px clamp(12px, 4vw, 34px);

    display:
        grid;

    grid-template-columns:
        repeat(auto-fit, minmax(115px, 1fr));

    gap:
        8px;

}


.topic {

    min-width:
        0;

    min-height:
        38px;

    padding:
        8px 11px;

    border:
        1px solid var(--line);

    border-radius:
        12px;

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,.055),
            rgba(255,255,255,.018)
        );

    color:
        #c9cdd5;

    font-size:
        11px;

    font-weight:
        650;

    cursor:
        pointer;

    transition:
        .2s ease;

}


.topic:hover {

    border-color:
        rgba(var(--accent-rgb),.42);

    color:
        var(--accent-light);

    background:
        rgba(var(--accent-rgb),.07);

    transform:
        translateY(-1px);

}


.topic:active {

    transform:
        scale(.97);

}


/* =========================================================
   INPUT
========================================================= */

.input-area {

    width:
        min(920px, 100%);

    margin:
        0 auto;

    padding:
        8px clamp(12px, 4vw, 34px)
        max(10px, env(safe-area-inset-bottom));

}


.input-wrapper {

    width:
        100%;

    min-height:
        58px;

    display:
        flex;

    align-items:
        flex-end;

    gap:
        8px;

    padding:
        8px;

    border:
        1px solid rgba(var(--accent-rgb),.30);

    border-radius:
        18px;

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,.065),
            rgba(255,255,255,.025)
        );

    box-shadow:
        inset 0 1px rgba(255,255,255,.09),
        0 0 24px rgba(var(--accent-rgb),.07);

    backdrop-filter:
        blur(18px);

    -webkit-backdrop-filter:
        blur(18px);

}


#userInput {

    flex:
        1 1 auto;

    min-width:
        0;

    max-height:
        150px;

    resize:
        none;

    overflow-y:
        auto;

    border:
        0;

    outline:
        0;

    background:
        transparent;

    color:
        #f4f5f7;

    padding:
        9px 8px;

    line-height:
        1.45;

    font-size:
        14px;

}


#userInput::placeholder {

    color:
        #777c88;

}


.input-actions {

    display:
        flex;

    align-items:
        center;

    gap:
        6px;

    flex:
        0 0 auto;

}


.voice-button,
.send-button {

    width:
        40px;

    height:
        40px;

    flex:
        0 0 40px;

    border:
        1px solid var(--line);

    border-radius:
        12px;

    display:
        grid;

    place-items:
        center;

    cursor:
        pointer;

    transition:
        .2s ease;

}


.voice-button {

    background:
        rgba(255,255,255,.035);

    color:
        #d9dce2;

}


.send-button {

    background:
        linear-gradient(
            145deg,
            var(--accent-light),
            var(--accent)
        );

    border-color:
        rgba(255,255,255,.24);

    color:
        #09090d;

    font-weight:
        900;

    box-shadow:
        0 0 15px rgba(var(--accent-rgb),.18);

}


.voice-button:hover {

    border-color:
        rgba(var(--accent-rgb),.48);

    background:
        rgba(var(--accent-rgb),.09);

}


.voice-button.active {

    border-color:
        var(--accent);

    background:
        rgba(var(--accent-rgb),.14);

    box-shadow:
        0 0 18px rgba(var(--accent-rgb),.25);

}


.send-button:hover {

    transform:
        translateY(-1px);

    box-shadow:
        0 0 24px rgba(var(--accent-rgb),.35);

}


.voice-button:active,
.send-button:active {

    transform:
        scale(.93);

}


/* =========================================================
   FOOTER
========================================================= */

.monarch-footer {

    width:
        100%;

    display:
        flex;

    justify-content:
        center;

    align-items:
        center;

    flex-wrap:
        wrap;

    gap:
        7px;

    padding:
        8px 14px
        max(9px, env(safe-area-inset-bottom));

    color:
        #656a75;

    font-size:
        7px;

    letter-spacing:
        .16em;

    text-align:
        center;

}


/* =========================================================
   SETTINGS BACKDROP
========================================================= */

.settings-backdrop {

    position:
        fixed;

    inset:
        0;

    z-index:
        50;

    background:
        rgba(0,0,0,.62);

    backdrop-filter:
        blur(5px);

    -webkit-backdrop-filter:
        blur(5px);

}


.settings-backdrop[hidden] {

    display:
        none !important;

}


/* =========================================================
   SETTINGS PANEL
========================================================= */

.settings-panel {

    position:
        fixed;

    z-index:
        60;

    top:
        0;

    right:
        0;

    width:
        min(430px, 100%);

    height:
        100vh;

    height:
        100dvh;

    max-height:
        100dvh;

    overflow-y:
        auto;

    padding:
        max(18px, env(safe-area-inset-top))
        max(18px, env(safe-area-inset-right))
        max(18px, env(safe-area-inset-bottom))
        max(18px, env(safe-area-inset-left));

    background:
        linear-gradient(
            145deg,
            #11131a,
            #08090d
        );

    border-left:
        1px solid var(--line);

    box-shadow:
        -15px 0 50px rgba(0,0,0,.42);

    animation:
        panelIn .25s ease both;

}


.settings-panel[hidden] {

    display:
        none !important;

}


@keyframes panelIn {

    from {

        opacity:
            0;

        transform:
            translateX(25px);

    }

    to {

        opacity:
            1;

        transform:
            translateX(0);

    }

}


/* =========================================================
   SETTINGS HEADER
========================================================= */

.settings-header {

    display:
        flex;

    align-items:
        center;

    justify-content:
        space-between;

    gap:
        12px;

    padding-bottom:
        18px;

    border-bottom:
        1px solid var(--line);

}


.settings-header h2 {

    margin:
        0;

    font-size:
        19px;

}


.close-button {

    width:
        40px;

    height:
        40px;

    border:
        1px solid var(--line);

    border-radius:
        11px;

    background:
        rgba(255,255,255,.04);

    color:
        #fff;

    cursor:
        pointer;

}


/* =========================================================
   SETTINGS SECTIONS
========================================================= */

.settings-section {

    padding:
        19px 0;

    border-bottom:
        1px solid var(--line);

}


.settings-section h3 {

    margin:
        0 0 14px;

    font-size:
        13px;

    color:
        var(--accent-light);

}


.setting-row {

    display:
        flex;

    justify-content:
        space-between;

    align-items:
        center;

    gap:
        20px;

}


.setting-row strong {

    display:
        block;

    font-size:
        13px;

}


.setting-row small {

    display:
        block;

    margin-top:
        4px;

    color:
        var(--muted);

    font-size:
        11px;

    line-height:
        1.4;

}


/* =========================================================
   SWITCH
========================================================= */

.switch {

    position:
        relative;

    width:
        48px;

    height:
        27px;

    flex:
        0 0 auto;

}


.switch input {

    opacity:
        0;

    width:
        0;

    height:
        0;

}


.slider {

    position:
        absolute;

    inset:
        0;

    cursor:
        pointer;

    border-radius:
        30px;

    background:
        #292c34;

    border:
        1px solid var(--line);

    transition:
        .25s ease;

}


.slider::before {

    content:
        "";

    position:
        absolute;

    width:
        19px;

    height:
        19px;

    left:
        3px;

    top:
        3px;

    border-radius:
        50%;

    background:
        #dfe2e7;

    transition:
        .25s ease;

}


.switch input:checked + .slider {

    background:
        rgba(var(--accent-rgb),.28);

    border-color:
        rgba(var(--accent-rgb),.55);

}


.switch input:checked + .slider::before {

    transform:
        translateX(21px);

    background:
        var(--accent-light);

    box-shadow:
        0 0 10px rgba(var(--accent-rgb),.45);

}


/* =========================================================
   THEME GRID
========================================================= */

.theme-grid {

    display:
        grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap:
        8px;

}


.theme-option {

    min-width:
        0;

    min-height:
        58px;

    display:
        flex;

    align-items:
        center;

    gap:
        8px;

    padding:
        9px;

    text-align:
        left;

    border:
        1px solid var(--line);

    border-radius:
        11px;

    background:
        rgba(255,255,255,.035);

    color:
        #c8ccd3;

    font-size:
        10px;

    cursor:
        pointer;

    transition:
        .2s ease;

}


.theme-option:hover,
.theme-option.active {

    border-color:
        rgba(var(--accent-rgb),.52);

    background:
        rgba(var(--accent-rgb),.075);

    color:
        #fff;

}


.theme-preview {

    width:
        27px;

    height:
        27px;

    flex:
        0 0 27px;

    border-radius:
        8px;

    border:
        1px solid rgba(255,255,255,.24);

    box-shadow:
        inset 0 1px rgba(255,255,255,.25);

}


/* =========================================================
   THEME PREVIEWS
========================================================= */

.metallic-purple {

    background:
        linear-gradient(
            135deg,
            #16101d,
            #bd73ff,
            #5b267e
        );

}


.metallic-blue-green {

    background:
        linear-gradient(
            135deg,
            #07151d,
            #4dbdff,
            #32cf85
        );

}


.metallic-black-white {

    background:
        linear-gradient(
            135deg,
            #050505,
            #ffffff,
            #555b63
        );

}


.metallic-orange {

    background:
        linear-gradient(
            135deg,
            #211208,
            #ff9b3d,
            #873900
        );

}


.metallic-yellow {

    background:
        linear-gradient(
            135deg,
            #241e05,
            #ffd84d,
            #887000
        );

}


.metallic-pink {

    background:
        linear-gradient(
            135deg,
            #240d19,
            #ff72b7,
            #8b255c
        );

}


.metallic-gray {

    background:
        linear-gradient(
            135deg,
            #181b20,
            #c2c9d0,
            #5c626b
        );

}


.metallic-red-blue {

    background:
        linear-gradient(
            135deg,
            #300b0e,
            #ff4e59,
            #3d9fff
        );

}


.metallic-red-white {

    background:
        linear-gradient(
            135deg,
            #350a0d,
            #ff4c55,
            #ffffff
        );

}


.metallic-white {

    background:
        linear-gradient(
            135deg,
            #696e74,
            #ffffff,
            #aeb4ba
        );

}


.metallic-sky-blue {

    background:
        linear-gradient(
            135deg,
            #071b25,
            #64d8ff,
            #1684a7
        );

}


.metallic-blue-yellow {

    background:
        linear-gradient(
            135deg,
            #07152d,
            #3f9dff 52%,
            #ffe15b
        );

}


.metallic-lemon {

    background:
        linear-gradient(
            135deg,
            #1b2105,
            #dfff3f,
            #758800
        );

}


/* =========================================================
   PROFILE
========================================================= */

.profile-card {

    display:
        flex;

    align-items:
        center;

    gap:
        11px;

    padding:
        12px;

    border:
        1px solid var(--line);

    border-radius:
        13px;

    background:
        rgba(255,255,255,.035);

}


.profile-avatar {

    width:
        40px;

    height:
        40px;

    display:
        grid;

    place-items:
        center;

    border-radius:
        12px;

    background:
        rgba(var(--accent-rgb),.10);

    border:
        1px solid rgba(var(--accent-rgb),.32);

}


.profile-info {

    min-width:
        0;

}


.profile-info strong,
.profile-info small {

    display:
        block;

    overflow:
        hidden;

    text-overflow:
        ellipsis;

    white-space:
        nowrap;

}


.profile-info strong {

    font-size:
        12px;

}


.profile-info small {

    margin-top:
        3px;

    color:
        var(--muted);

    font-size:
        10px;

}


/* =========================================================
   SETTINGS BUTTONS
========================================================= */

.settings-button,
.danger-button {

    width:
        100%;

    min-height:
        43px;

    margin-top:
        12px;

    border:
        1px solid var(--line);

    border-radius:
        11px;

    cursor:
        pointer;

    font-weight:
        700;

}


.settings-button {

    background:
        rgba(var(--accent-rgb),.10);

    color:
        var(--accent-light);

}


.danger-button {

    background:
        rgba(255,70,85,.07);

    color:
        #ff858d;

    border-color:
        rgba(255,70,85,.20);

}


.settings-description {

    color:
        var(--muted);

    font-size:
        10px;

    line-height:
        1.5;

}


.settings-version {

    margin:
        0;

    text-align:
        center;

    color:
        #666b75;

    font-size:
        9px;

    letter-spacing:
        .15em;

}


/* =========================================================
   FOCUS ACCESSIBILITY
========================================================= */

button:focus-visible,
textarea:focus-visible {

    outline:
        2px solid rgba(var(--accent-rgb),.7);

    outline-offset:
        2px;

}


/* =========================================================
   SMALL PHONES
========================================================= */

@media (max-width: 420px) {

    .monarch-header {

        padding-left:
            12px;

        padding-right:
            12px;

    }


    .brand-text h1 {

        font-size:
            15px;

    }


    .brand-text span {

        font-size:
            7px;

    }


    .header-status {

        font-size:
            8px;

    }


    .header-button {

        width:
            39px;

        height:
            39px;

    }


    .bubble {

        max-width:
            84%;

        padding:
            10px 12px;

    }


    .quick-topics {

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

    }


    .theme-grid {

        grid-template-columns:
            1fr;

    }

}


/* =========================================================
   VERY SMALL PHONES
========================================================= */

@media (max-width: 340px) {

    .header-status {

        display:
            none;

    }


    .brand {

        gap:
            7px;

    }


    .monarch-welcome {

        padding-top:
            16px;

    }


    .monarch-welcome p {

        font-size:
            11px;

    }


    .quick-topics {

        grid-template-columns:
            1fr 1fr;

    }


    .topic {

        font-size:
            10px;

    }

}


/* =========================================================
   LANDSCAPE PHONES
========================================================= */

@media (max-height: 520px) and (orientation: landscape) {

    .monarch-welcome {

        padding:
            12px 20px 5px;

    }


    .welcome-symbol {

        display:
            none;

    }


    .monarch-welcome p {

        display:
            none;

    }


    .monarch-welcome h2 {

        font-size:
            18px;

    }


    .quick-topics {

        padding-top:
            4px;

    }


    .monarch-footer {

        display:
            none;

    }

}


/* =========================================================
   TABLETS
========================================================= */

@media (min-width: 600px) {

    .monarch-header {

        padding-top:
            max(18px, env(safe-area-inset-top));

    }


    .chat {

        padding-left:
            10px;

        padding-right:
            10px;

    }


    .bubble {

        padding:
            14px 17px;

    }


    .message-content {

        font-size:
            15px;

    }

}


/* =========================================================
   DESKTOP
========================================================= */

@media (min-width: 1024px) {

    .main-app {

        width:
            min(1180px, 100%);

        margin:
            0 auto;

        border-left:
            1px solid rgba(255,255,255,.035);

        border-right:
            1px solid rgba(255,255,255,.035);

        box-shadow:
            0 0 80px rgba(0,0,0,.25);

    }


    .monarch-welcome {

        padding-top:
            38px;

    }


    .quick-topics {

        grid-template-columns:
            repeat(5, minmax(0, 1fr));

    }

}


/* =========================================================
   LARGE DESKTOP
========================================================= */

@media (min-width: 1440px) {

    .main-app {

        width:
            min(1280px, 100%);

    }

}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {

        scroll-behavior:
            auto !important;

        animation-duration:
            .01ms !important;

        animation-iteration-count:
            1 !important;

        transition-duration:
            .01ms !important;

    }

}