﻿:root {
    --bg: #0d1220;
    --panel: rgba(26, 32, 45, 0.8);
    --panel-soft: rgba(30, 37, 54, 0.84);
    --line: rgba(255, 255, 255, 0.16);
    --text: #eef4ff;
    --muted: #b8c2d8;
    --green: #22c55e;
    --gold: #f5c06a;
    --aqua: #56c7ff;
    --mx: 50%;
    --my: 40%;
    --px: 0px;
    --py: 0px;
    --tilt-x: 0deg;
    --tilt-y: 0deg;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Space Grotesk', sans-serif;
    color: var(--text);
    background: linear-gradient(155deg, #102140 0%, #19263f 36%, #32243a 100%);
}

.savanna-bg {
    position: fixed;
    inset: 0;
    z-index: -2;
    background: linear-gradient(155deg, #102140 0%, #19263f 36%, #32243a 100%);
}

.savanna-bg::before {
    content: '';
    position: absolute;
    inset: -3%;
    background: url('/assets/background2.png') center/cover no-repeat;
    opacity: 0.42;
    transform: translate(var(--px), var(--py)) scale(1.05);
    transition: transform 180ms ease-out;
}

.savanna-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 18% 85%, rgba(245, 182, 66, 0.2), transparent 34%),
                radial-gradient(circle at 85% 15%, rgba(41, 182, 246, 0.2), transparent 32%),
                linear-gradient(180deg, rgba(14, 20, 32, 0.3) 0%, rgba(12, 16, 26, 0.6) 100%);
}

.pattern-overlay {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image: linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 44px 44px;
    transform: translate(calc(var(--px) * -0.25), calc(var(--py) * -0.25));
    transition: transform 200ms ease-out;
}

.container {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 16px;
}

.header {
    margin-top: 14px;
    border: 1px solid rgba(120, 200, 255, 0.32);
    border-radius: 22px;
    background:
        linear-gradient(130deg, rgba(22, 35, 62, 0.7), rgba(36, 25, 55, 0.64)),
        rgba(245, 248, 255, 0.06);
    backdrop-filter: blur(16px) saturate(1.2);
    padding: 10px 12px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
    align-items: center;
    box-shadow:
        0 18px 44px -30px rgba(8, 19, 42, 0.92),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.brand {
    color: #f9fbff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-shadow: 0 6px 22px rgba(0, 0, 0, 0.35);
}

.brand-main {
    font-weight: 800;
    font-size: 25px;
    letter-spacing: 0.03em;
    background: linear-gradient(120deg, #f6fbff, #cde4ff 50%, #ffffff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-accent {
    font-weight: 800;
    font-size: 17px;
    letter-spacing: 0.12em;
    color: var(--gold);
    position: relative;
}

.brand-accent::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 2px;
    border-radius: 99px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    opacity: 0.9;
}

.nav {
    justify-self: center;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px;
    border-radius: 999px;
    border: 1px solid rgba(150, 220, 255, 0.28);
    background: rgba(9, 13, 22, 0.56);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.nav a {
    color: #c4d7f6;
    text-decoration: none;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 14px;
    border: 1px solid transparent;
    transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.nav a:hover,
.nav a:first-child {
    color: #ffffff;
    background: linear-gradient(130deg, rgba(85, 162, 255, 0.28), rgba(255, 255, 255, 0.1));
    border-color: rgba(158, 220, 255, 0.34);
    transform: translateY(-1px);
}

.head-actions {
    display: flex;
    gap: 8px;
}

.btn-ghost,
.btn-green {
    position: relative;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 15px;
    border-radius: 12px;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 200ms ease, box-shadow 200ms ease, filter 200ms ease;
}

.btn-ghost {
    color: #f5fbff;
    border: 1px solid rgba(133, 211, 255, 0.44);
    background: linear-gradient(130deg, rgba(62, 161, 255, 0.28), rgba(255, 255, 255, 0.12));
    box-shadow: 0 12px 24px -20px rgba(44, 139, 255, 0.7);
}

.btn-green {
    color: #fff;
    background: linear-gradient(135deg, #3de185, #20be66);
    border: 1px solid rgba(39, 204, 108, 0.75);
    box-shadow: 0 12px 24px -20px rgba(22, 176, 92, 0.92);
}

.btn-ghost:hover,
.btn-green:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
}

.btn-ghost:active,
.btn-green:active {
    transform: translateY(0);
}

.hero {
    max-width: 620px;
    margin: 22px auto 0;
    text-align: center;
}

.hero-copy {
    margin: 0 auto 12px;
}

.hero-copy span {
    display: inline-flex;
    border: 1px solid rgba(245, 192, 106, 0.22);
    border-radius: 999px;
    background: rgba(245, 192, 106, 0.08);
    color: #ffe4b8;
    padding: 4px 9px;
    font-size: 11px;
    font-weight: 800;
}

.hero h1 {
    max-width: 580px;
    margin: 8px auto 0;
    font-size: 34px;
    line-height: 1.08;
    text-shadow: 0 8px 28px rgba(4, 8, 18, 0.5);
}

.hero p {
    margin: 8px auto 0;
    max-width: 470px;
    color: #d4ddf0;
    font-size: 15px;
    line-height: 1.35;
}

.hero.chat-open {
    max-width: 760px;
    margin-top: 18px;
}

.hero.chat-open .hero-copy {
    display: none;
}

.exchange-card {
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: linear-gradient(160deg, rgba(33, 42, 60, 0.78), rgba(26, 31, 47, 0.82));
    border-radius: 24px;
    padding: 14px;
    text-align: left;
    box-shadow: 0 22px 48px -36px rgba(4, 10, 24, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.28);
    overflow: visible;
    backdrop-filter: blur(12px);
    transform: perspective(1200px) rotateX(var(--tilt-y)) rotateY(var(--tilt-x));
    transition: transform 220ms ease, box-shadow 220ms ease;
}

.exchange-card::before,
.exchange-card::after {
    content: '';
    position: absolute;
    pointer-events: none;
    z-index: 0;
    opacity: 0.62;
}

.exchange-card::before {
    width: 170px;
    height: 170px;
    right: -70px;
    top: -80px;
    border-radius: 48% 52% 57% 43%;
    background: radial-gradient(circle at var(--mx) var(--my), rgba(86, 199, 255, 0.5), rgba(86, 199, 255, 0));
}

.exchange-card::after {
    width: 180px;
    height: 160px;
    left: -70px;
    bottom: -90px;
    border-radius: 54% 46% 43% 57%;
    background: radial-gradient(circle at 60% 40%, rgba(245, 192, 106, 0.26), rgba(245, 192, 106, 0));
}

.tabs {
    --blob-shift: 0%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 14px;
    position: relative;
    padding: 5px;
    border-radius: 14px;
    overflow: hidden;
    isolation: isolate;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.16);
    z-index: 1;
}

.tab-blob {
    position: absolute;
    left: 4px;
    top: 4px;
    bottom: 4px;
    width: calc(50% - 6px);
    border-radius: 10px;
    background:
        radial-gradient(120% 120% at 20% 20%, rgba(255, 255, 255, 0.5), transparent 55%),
        linear-gradient(125deg, rgba(44, 208, 113, 0.95), rgba(33, 173, 92, 0.95));
    box-shadow:
        0 10px 20px -14px rgba(21, 158, 84, 0.9),
        inset 0 1px 0 rgba(255, 255, 255, 0.45);
    transform: translateX(var(--blob-shift));
    transition: transform 420ms cubic-bezier(0.22, 1, 0.36, 1),
                background 280ms ease,
                box-shadow 280ms ease;
    z-index: 0;
}

.tabs.sell .tab-blob {
    background:
        radial-gradient(120% 120% at 20% 20%, rgba(255, 255, 255, 0.45), transparent 55%),
        linear-gradient(125deg, rgba(78, 179, 255, 0.96), rgba(39, 122, 247, 0.94));
    box-shadow:
        0 10px 20px -14px rgba(48, 121, 255, 0.95),
        inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.tabs.splash .tab-blob::after {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    opacity: 0;
    animation: blobSplash 520ms ease-out;
}

.tab {
    min-height: 42px;
    border-radius: 14px;
    border: 1px solid transparent;
    background: transparent;
    color: #d0d8eb;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: transform 180ms ease, background-color 180ms ease;
    position: relative;
    z-index: 1;
}

.tab:hover {
    transform: translateY(-1px) scale(1.01);
}

.tab.active {
    color: #fff;
    background: transparent;
}

.field {
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.field.menu-open {
    z-index: 240;
}

.field label {
    display: block;
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
}

.field input {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    background: rgba(12, 16, 26, 0.38);
    color: #fff;
    padding: 12px;
    font: inherit;
    font-size: 22px;
    font-weight: 700;
    outline: none;
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.field input:focus {
    border-color: rgba(110, 205, 255, 0.74);
    box-shadow: 0 0 0 3px rgba(86, 199, 255, 0.14);
    transform: translateY(-1px);
}

.currency-pill {
    min-width: 86px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.08);
    font-weight: 700;
}

.asset-wrap {
    position: relative;
    z-index: 12;
}

.asset-wrap.open {
    z-index: 260;
}

.asset-select {
    min-width: 118px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font: inherit;
    font-weight: 700;
    padding: 10px 38px 10px 14px;
    cursor: pointer;
    transition: border-color 180ms ease, background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.asset-select:hover,
.asset-wrap.open .asset-select {
    border-color: rgba(86, 199, 255, 0.62);
    background: rgba(86, 199, 255, 0.12);
    box-shadow: 0 14px 26px -22px rgba(86, 199, 255, 0.95);
    transform: translateY(-1px);
}

.asset-icon {
    display: inline-grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 50%;
    background: rgba(245, 192, 106, 0.16);
    color: var(--gold);
    font-size: 14px;
}

.asset-options {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 280;
    width: min(238px, calc(100vw - 34px));
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 18px;
    background:
        radial-gradient(circle at 18% 0%, rgba(245, 192, 106, 0.18), transparent 38%),
        linear-gradient(155deg, rgba(31, 41, 61, 0.98), rgba(13, 18, 30, 0.96));
    box-shadow: 0 26px 58px -30px rgba(0, 0, 0, 0.92), inset 0 1px 0 rgba(255, 255, 255, 0.18);
    padding: 8px;
    backdrop-filter: blur(18px);
    pointer-events: auto;
}

.asset-options[hidden] {
    display: none;
}

.asset-options button {
    width: 100%;
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 0 9px;
    border: 1px solid transparent;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.035);
    color: #fff;
    padding: 12px 10px;
    text-align: left;
    cursor: pointer;
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.asset-options button:hover,
.asset-options button[aria-selected="true"] {
    border-color: rgba(245, 192, 106, 0.38);
    background: rgba(245, 192, 106, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

.asset-options span {
    grid-row: 1 / 3;
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 50%;
    background: rgba(245, 192, 106, 0.15);
    color: var(--gold);
    font-weight: 800;
}

.asset-options b {
    font-size: 15px;
}

.asset-options small {
    color: var(--muted);
    font-size: 12px;
}

.expand {
    position: absolute;
    right: 10px;
    top: 10px;
    pointer-events: none;
    color: #d0d8eb;
}

.swap-hint {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: #c7d1e7;
    font: inherit;
    padding: 8px 10px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.swap-hint:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px -22px rgba(95, 173, 255, 0.9);
    filter: saturate(1.08);
}

.vip-toggle {
    width: 100%;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    margin: 4px 0 10px;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(245, 192, 106, 0.22);
    border-radius: 14px;
    background: rgba(245, 192, 106, 0.07);
    color: #fff;
    padding: 9px 11px;
    font: inherit;
    cursor: pointer;
    transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
    text-align: left;
}

.vip-toggle:hover {
    border-color: rgba(245, 192, 106, 0.48);
    background: rgba(245, 192, 106, 0.12);
    transform: translateY(-1px);
}

.vip-toggle.active {
    border-color: rgba(245, 192, 106, 0.68);
    background: linear-gradient(120deg, rgba(245, 192, 106, 0.2), rgba(86, 199, 255, 0.1));
    box-shadow: 0 16px 32px -26px rgba(245, 192, 106, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.vip-switch {
    width: 42px;
    height: 24px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(5, 9, 18, 0.42);
    padding: 3px;
    transition: background 180ms ease, border-color 180ms ease;
}

.vip-switch i {
    display: block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #c9d3e8;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.32);
    transition: transform 180ms ease, background 180ms ease;
}

.vip-toggle.active .vip-switch {
    border-color: rgba(245, 192, 106, 0.56);
    background: rgba(245, 192, 106, 0.32);
}

.vip-toggle.active .vip-switch i {
    transform: translateX(18px);
    background: var(--gold);
}

.vip-copy b {
    display: block;
    color: #fff3d6;
    font-size: 13px;
    line-height: 1.1;
}

.vip-copy small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.25;
}

.network-field[hidden] {
    display: none;
}

.network-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.network-option {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.065);
    color: #fff;
    font: inherit;
    font-weight: 800;
    padding: 11px 12px;
    cursor: pointer;
    text-align: left;
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.network-option:hover {
    transform: translateY(-1px);
    border-color: rgba(86, 199, 255, 0.42);
}

.network-option.active {
    border-color: rgba(245, 192, 106, 0.58);
    background: rgba(245, 192, 106, 0.14);
    box-shadow: inset 3px 0 0 var(--gold);
}

.promo-box {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    padding: 12px;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.promo-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 14px;
    color: #e3e9f6;
    margin: 6px 0;
}

.promo-row.total {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
    color: #fff;
    font-weight: 700;
}

.promo-row.vip-fee {
    color: #ffe4b8;
}

.promo-row.muted-row {
    color: var(--muted);
}

.anim-value {
    font-variant-numeric: tabular-nums;
    transition: text-shadow 180ms ease;
}

.anim-value.bump {
    text-shadow: 0 0 14px rgba(255, 255, 255, 0.35);
}

.submit-btn {
    width: 100%;
    min-height: 46px;
    border-radius: 12px;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.submit-btn {
    border: none;
    background: linear-gradient(120deg, #29c76c, #17a958);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 14px 26px -20px rgba(24, 185, 96, 0.92);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 30px -20px rgba(24, 185, 96, 0.95);
}

.result {
    display: none;
    margin-top: 8px;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 13px;
}

.result.ok {
    display: block;
    border: 1px solid rgba(34, 197, 94, 0.6);
    background: rgba(34, 197, 94, 0.15);
}

.result.err {
    display: block;
    border: 1px solid rgba(239, 68, 68, 0.6);
    background: rgba(239, 68, 68, 0.14);
}

.restore-order {
    margin-top: 9px;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 13px;
    background: rgba(5, 9, 18, 0.22);
    padding: 9px 10px;
}

.restore-order summary {
    cursor: pointer;
    color: #ffe4b8;
    font-size: 13px;
    font-weight: 900;
}

.restore-order input {
    width: 100%;
    margin-top: 8px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 11px;
    background: rgba(5, 9, 18, 0.36);
    color: #fff;
    font: inherit;
    padding: 9px 10px;
    outline: none;
}

.restore-order button {
    width: 100%;
    margin-top: 8px;
    border: 1px solid rgba(245, 192, 106, 0.28);
    border-radius: 11px;
    background: rgba(245, 192, 106, 0.12);
    color: #ffe4b8;
    font: inherit;
    font-size: 13px;
    font-weight: 900;
    padding: 9px 10px;
    cursor: pointer;
}

.restore-order small {
    display: block;
    margin-top: 7px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.3;
}

.inline-order {
    width: 100%;
    max-width: 860px;
    min-width: 0;
    margin: 0 auto;
    border: 1px solid rgba(120, 200, 255, 0.28);
    border-radius: 18px;
    background:
        linear-gradient(145deg, rgba(17, 29, 51, 0.8), rgba(34, 25, 51, 0.72)),
        rgba(255, 255, 255, 0.06);
    box-shadow: 0 18px 42px -30px rgba(0, 0, 0, 0.86), inset 0 1px 0 rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(18px) saturate(1.15);
    padding: 10px;
    animation: orderIn 220ms ease-out;
    overflow: hidden;
}

.inline-order[hidden] {
    display: none;
}

.deal-chat-header {
    position: relative;
    margin: -10px -10px 10px;
    padding: 15px 16px 12px;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(circle at 5% 0%, rgba(53, 189, 243, 0.12), transparent 28%),
        radial-gradient(circle at 90% 20%, rgba(245, 184, 63, 0.11), transparent 34%),
        linear-gradient(145deg, rgba(22, 38, 64, 0.96), rgba(16, 25, 45, 0.98));
}

.deal-chat-header::before {
    content: "";
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(245, 184, 63, 0.35), rgba(53, 189, 243, 0.22), transparent);
}

.chat-header-topline {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
}

.chat-brand-block {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 11px;
}

.chat-brand-mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid rgba(245, 184, 63, 0.34);
    border-radius: 14px;
    color: #121824;
    font-size: 12px;
    font-weight: 900;
    background: linear-gradient(135deg, #ffe2a3, var(--gold));
    box-shadow: 0 10px 28px rgba(245, 184, 63, 0.18);
}

.chat-brand-kicker {
    margin-bottom: 4px;
    color: var(--gold);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.deal-chat-header h2 {
    margin: 0;
    overflow: hidden;
    color: #f5f7fb;
    font-size: 21px;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-header-actions {
    display: flex;
    gap: 7px;
}

.chat-header-actions button {
    height: 40px;
    padding: 0 11px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    font: inherit;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.chat-header-actions .material-symbols-outlined {
    font-size: 18px;
}

.chat-ghost-btn {
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #c8d4e5;
    background: rgba(255, 255, 255, 0.045);
}

.chat-ghost-btn:hover {
    border-color: rgba(53, 189, 243, 0.36);
    color: #fff;
    background: rgba(53, 189, 243, 0.07);
}

.chat-refresh-btn {
    border: 1px solid rgba(245, 184, 63, 0.34);
    color: #111827;
    background: linear-gradient(135deg, var(--gold), #ffe2a3);
    box-shadow: 0 10px 26px rgba(245, 184, 63, 0.16);
}

.chat-refresh-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(245, 184, 63, 0.22);
}

.chat-refresh-btn.spin .material-symbols-outlined {
    animation: chatSpin 0.7s linear;
}

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

.chat-status-shell {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    margin-top: 13px;
    border: 1px solid rgba(245, 184, 63, 0.18);
    border-radius: 17px;
    background: linear-gradient(135deg, rgba(245, 184, 63, 0.08), rgba(53, 189, 243, 0.05), rgba(255, 255, 255, 0.025));
    padding: 10px;
}

.chat-status-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-status-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid rgba(245, 184, 63, 0.24);
    border-radius: 13px;
    color: var(--gold);
    background: rgba(245, 184, 63, 0.11);
}

.chat-status-icon .material-symbols-outlined {
    font-size: 22px;
}

.chat-status-copy {
    min-width: 0;
}

.chat-status-copy .inline-status {
    display: block;
    margin: 0 0 4px;
    border: 0;
    background: transparent;
    color: var(--muted);
    padding: 0;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.chat-status-copy strong {
    display: block;
    overflow: hidden;
    color: #f5f7fb;
    font-size: 15px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-status-pill {
    display: flex;
    align-items: center;
    gap: 7px;
    border: 1px solid rgba(245, 184, 63, 0.32);
    border-radius: 999px;
    background: rgba(245, 184, 63, 0.09);
    color: #ffe2a3;
    padding: 8px 11px;
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
}

.chat-status-pill i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 16px rgba(245, 184, 63, 0.75);
}

.chat-deal-stats {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 11px;
}

.chat-deal-stats div {
    min-width: 0;
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 13px;
    background: rgba(7, 17, 31, 0.34);
    padding: 9px 10px;
}

.chat-deal-stats span {
    display: block;
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.chat-deal-stats strong {
    display: block;
    margin-top: 5px;
    overflow: hidden;
    color: #f5f7fb;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-deal-stats .gold {
    color: #ffe2a3;
}

.chat-progress-line {
    --progress-width: 0%;
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    align-items: center;
    height: 18px;
    margin-top: 12px;
}

.chat-progress-line::before {
    content: "";
    position: absolute;
    left: 7%;
    right: 7%;
    top: 50%;
    height: 2px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.chat-progress-fill {
    position: absolute;
    left: 7%;
    top: 50%;
    width: var(--progress-width);
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, #24d18f, #35bdf3, var(--gold));
    box-shadow: 0 0 18px rgba(53, 189, 243, 0.3);
}

.chat-progress-step {
    position: relative;
    z-index: 1;
    justify-self: center;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
}

.chat-progress-step.done {
    background: #24d18f;
    box-shadow: 0 0 13px rgba(36, 209, 143, 0.4);
}

.chat-progress-step.active {
    width: 14px;
    height: 14px;
    background: var(--gold);
    box-shadow: 0 0 0 6px rgba(245, 184, 63, 0.12), 0 0 18px rgba(245, 184, 63, 0.65);
}

.inline-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.inline-status {
    display: inline-flex;
    border-radius: 999px;
    border: 1px solid rgba(245, 192, 106, 0.24);
    background: rgba(245, 192, 106, 0.1);
    color: #ffe4b8;
    padding: 3px 7px;
    font-size: 10px;
    font-weight: 800;
}

.inline-head h2 {
    margin: 5px 0 0;
    font-size: 18px;
    line-height: 1.1;
}

.inline-refresh {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 9px;
    cursor: pointer;
}

.inline-stage {
    margin: 8px 0;
    border: 1px solid rgba(245, 192, 106, 0.18);
    border-left: 3px solid var(--gold);
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(245, 192, 106, 0.12), rgba(86, 199, 255, 0.055));
    color: #ffe4b8;
    padding: 7px 9px;
    font-size: 13px;
    line-height: 1.25;
}

.inline-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.inline-details:empty {
    display: none;
}

.inline-kv {
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.045);
    padding: 9px 10px;
    min-width: 0;
}

.inline-kv.wide {
    grid-column: 1 / -1;
}

.inline-kv b {
    display: block;
    color: var(--gold);
    font-size: 12px;
    margin-bottom: 4px;
}

.inline-kv span {
    overflow-wrap: anywhere;
}

.inline-messages {
    height: min(430px, calc(100vh - 430px));
    min-height: 250px;
    max-height: 430px;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(245, 192, 106, 0.52) rgba(255, 255, 255, 0.04);
    padding-right: 3px;
    scroll-behavior: smooth;
}

.inline-messages .message-row {
    animation: messageIn 180ms ease-out both;
}

.message-row {
    display: flex;
    align-items: flex-end;
    gap: 7px;
    margin-bottom: 8px;
}

.message-row.operator {
    justify-content: flex-start;
}

.message-row.client {
    justify-content: flex-end;
}

.message-avatar {
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: linear-gradient(135deg, #ffe2a3, var(--gold));
    color: #141a22;
    font-size: 8px;
    font-weight: 900;
    box-shadow: 0 8px 20px rgba(245, 192, 106, 0.16);
}

.message-stack {
    max-width: min(78%, 430px);
    min-width: 0;
}

.message-label {
    margin: 0 0 3px 4px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
}

.client-label {
    margin-right: 4px;
    text-align: right;
}

.message-bubble {
    position: relative;
    border-radius: 14px;
    padding: 8px 10px 7px;
    font-size: 13px;
    line-height: 1.36;
    overflow-wrap: anywhere;
    word-break: break-word;
    box-shadow: 0 5px 16px rgba(0, 0, 0, 0.14);
}

.inline-messages::-webkit-scrollbar {
    width: 6px;
}

.inline-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 999px;
}

.inline-messages::-webkit-scrollbar-thumb {
    background: rgba(245, 192, 106, 0.46);
    border-radius: 999px;
}

.operator-bubble,
.receipt-message {
    border: 1px solid rgba(98, 137, 177, 0.18);
    border-bottom-left-radius: 4px;
    background: linear-gradient(145deg, rgba(26, 48, 76, 0.95), rgba(20, 40, 63, 0.95));
    color: #f7f9fc;
    transform-origin: 0 100%;
}

.operator-bubble::before,
.receipt-message::before {
    content: "";
    position: absolute;
    left: -6px;
    bottom: 0;
    width: 10px;
    height: 10px;
    background: rgba(20, 40, 63, 0.95);
    clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

.client-bubble {
    border-bottom-right-radius: 4px;
    background: linear-gradient(135deg, var(--gold), #ffd36f);
    color: #141a22;
    font-weight: 700;
    transform-origin: 100% 100%;
}

.client-bubble::after {
    content: "";
    position: absolute;
    right: -6px;
    bottom: 0;
    width: 10px;
    height: 10px;
    background: #ffd36f;
    clip-path: polygon(0 0, 100% 100%, 0 100%);
}

.receipt-message {
    padding: 0;
    overflow: hidden;
}

.receipt-title {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 11px 9px;
    border-bottom: 1px solid rgba(113, 150, 190, 0.14);
    background: linear-gradient(135deg, rgba(245, 192, 106, 0.1), rgba(86, 199, 255, 0.04));
}

.receipt-icon {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid rgba(245, 192, 106, 0.3);
    border-radius: 10px;
    color: var(--gold);
    background: rgba(245, 192, 106, 0.08);
}

.receipt-icon .material-symbols-outlined {
    font-size: 19px;
}

.receipt-title span {
    display: block;
    color: var(--gold);
    font-size: 9px;
    font-weight: 900;
}

.receipt-title strong {
    display: block;
    margin-top: 2px;
    font-size: 13px;
}

.receipt-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 9px;
}

.receipt-item {
    min-width: 0;
    border: 1px solid rgba(113, 150, 190, 0.14);
    border-radius: 10px;
    background: rgba(6, 16, 28, 0.34);
    padding: 7px 8px;
}

.receipt-item span {
    display: block;
    margin-bottom: 3px;
    color: var(--muted);
    font-size: 9px;
}

.receipt-item b {
    display: block;
    color: #fff;
    font-size: 12px;
    overflow-wrap: anywhere;
}

.receipt-item.vip {
    border-color: rgba(245, 192, 106, 0.28);
    background: rgba(245, 192, 106, 0.08);
}

.receipt-item.vip span,
.receipt-item.vip b {
    color: #ffe2a3;
}

.receipt-item.wallet {
    grid-column: 1 / -1;
}

.system-copy {
    margin: 0;
    padding: 0 11px 8px;
    color: #dbe6f2;
    font-size: 12px;
}

.message-time {
    margin-top: 5px;
    color: var(--muted);
    font-size: 9px;
    text-align: right;
}

.receipt-message .message-time {
    padding: 0 11px 8px;
    margin-top: 0;
}

.client-time {
    color: rgba(20, 26, 34, 0.58);
}

.client-time span {
    margin-left: 3px;
    color: #146894;
    font-size: 10px;
    letter-spacing: -3px;
}

.inline-composer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 38px;
    gap: 6px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.inline-composer.locked {
    opacity: 0.72;
}

.inline-composer.locked textarea,
.inline-composer.locked button {
    cursor: not-allowed;
}

.quick-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    overflow-x: auto;
    scrollbar-width: none;
}

.quick-actions::-webkit-scrollbar {
    display: none;
}

.quick-actions button {
    flex: 0 0 auto;
    border: 1px solid rgba(245, 192, 106, 0.22);
    border-radius: 999px;
    background: rgba(245, 192, 106, 0.07);
    color: #ffe4b8;
    font: inherit;
    font-size: 11px;
    font-weight: 800;
    padding: 7px 10px;
    cursor: pointer;
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.quick-actions button:hover {
    border-color: rgba(245, 192, 106, 0.5);
    background: rgba(245, 192, 106, 0.13);
    transform: translateY(-1px);
}

.quick-actions button:disabled {
    opacity: 0.55;
    cursor: default;
    transform: none;
}

.quick-actions button[hidden] {
    display: none;
}

.register-prompt {
    margin-top: 8px;
    border: 1px solid rgba(245, 192, 106, 0.22);
    border-radius: 12px;
    background: rgba(245, 192, 106, 0.08);
    padding: 9px 10px;
}

.register-prompt b,
.register-prompt span {
    display: block;
}

.register-prompt b {
    color: #fff3d6;
    font-size: 13px;
}

.register-prompt span {
    margin: 3px 0 8px;
    color: var(--muted);
    font-size: 12px;
}

.register-prompt button,
.client-actions button,
.client-profile-head button {
    border: 1px solid rgba(245, 192, 106, 0.28);
    border-radius: 10px;
    background: rgba(245, 192, 106, 0.12);
    color: #ffe4b8;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    padding: 8px 10px;
    cursor: pointer;
}

.client-cabinet {
    position: fixed;
    inset: 0;
    z-index: 20;
    display: grid;
    place-items: center;
    background: rgba(3, 8, 16, 0.58);
    backdrop-filter: blur(10px);
    padding: 14px;
}

.client-cabinet[hidden] {
    display: none;
}

.client-panel {
    width: min(680px, 100%);
    max-height: min(720px, calc(100vh - 28px));
    overflow: auto;
    position: relative;
    border: 1px solid rgba(120, 200, 255, 0.24);
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(17, 29, 51, 0.96), rgba(24, 20, 39, 0.96));
    box-shadow: 0 28px 70px -36px rgba(0, 0, 0, 0.95);
    padding: 20px;
}

.client-close {
    position: absolute;
    right: 12px;
    top: 10px;
    width: 30px;
    height: 30px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}

.client-auth h2,
.client-profile h2 {
    margin: 0;
    color: #fff3d6;
}

.client-auth p {
    margin: 7px 0 12px;
    color: var(--muted);
    font-size: 13px;
}

.auth-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(5, 9, 18, 0.28);
    padding: 4px;
}

.auth-tabs button {
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 12px;
    font-weight: 900;
    padding: 8px;
    cursor: pointer;
}

.auth-tabs button.active {
    background: linear-gradient(135deg, rgba(245, 192, 106, 0.22), rgba(86, 199, 255, 0.1));
    color: #ffe4b8;
    box-shadow: inset 0 0 0 1px rgba(245, 192, 106, 0.24);
}

.client-auth input {
    width: 100%;
    margin-bottom: 8px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    background: rgba(5, 9, 18, 0.36);
    color: #fff;
    font: inherit;
    padding: 10px 11px;
    outline: none;
}

.client-auth input[hidden] {
    display: none;
}

.captcha-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
    border: 1px solid rgba(245, 192, 106, 0.18);
    border-radius: 12px;
    background: rgba(245, 192, 106, 0.07);
    padding: 8px 9px;
}

.captcha-row span {
    display: block;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.captcha-row b {
    color: #fff3d6;
    font-size: 15px;
}

.captcha-row button {
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    color: #dce8f8;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    padding: 8px 9px;
    cursor: pointer;
}

.hp-field {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.client-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.client-actions button[hidden] {
    display: none;
}

.client-status {
    min-height: 18px;
    color: #ffb4b4;
    font-size: 12px;
}

.client-security {
    display: block;
    margin-top: 9px;
    color: rgba(184, 194, 216, 0.78);
    font-size: 11px;
    line-height: 1.35;
}

.client-profile-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
    padding-right: 42px;
}

.client-profile-head span {
    color: var(--gold);
    font-size: 11px;
    font-weight: 900;
}

.client-profile h3 {
    margin: 0 0 8px;
    color: #fff3d6;
    font-size: 14px;
}

.client-orders {
    display: grid;
    gap: 8px;
}

.client-order {
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.045);
    padding: 9px 10px;
}

.client-order button {
    margin-top: 8px;
    border: 1px solid rgba(245, 192, 106, 0.28);
    border-radius: 10px;
    background: rgba(245, 192, 106, 0.12);
    color: #ffe4b8;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    padding: 7px 9px;
    cursor: pointer;
}

.client-order b {
    display: block;
    color: #fff;
    font-size: 13px;
}

.client-order span {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.inline-composer textarea {
    min-height: 38px;
    max-height: 96px;
    resize: none;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(245, 192, 106, 0.42) rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    background: rgba(10, 14, 24, 0.4);
    color: #fff;
    padding: 9px 10px;
    font-size: 13px;
    font: inherit;
    outline: none;
}

.inline-composer textarea::-webkit-scrollbar {
    width: 6px;
}

.inline-composer textarea::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.035);
    border-radius: 999px;
}

.inline-composer textarea::-webkit-scrollbar-thumb {
    background: rgba(245, 192, 106, 0.42);
    border-radius: 999px;
}

.inline-composer textarea:focus {
    border-color: rgba(86, 199, 255, 0.62);
}

.inline-composer button {
    border: none;
    border-radius: 12px;
    background: linear-gradient(120deg, #29c76c, #17a958);
    color: #fff;
    cursor: pointer;
}

@keyframes sweep {
    0% { transform: translateX(-120%); }
    55% { transform: translateX(120%); }
    100% { transform: translateX(120%); }
}

@keyframes blobSplash {
    0% {
        opacity: 0.55;
        transform: scale(0.78);
    }
    100% {
        opacity: 0;
        transform: scale(1.08);
    }
}

@keyframes orderIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes messageIn {
    from {
        opacity: 0;
        transform: translateY(5px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 980px) {
    .nav { display: none; }
    .brand { font-size: 20px; }
    .hero h1 { font-size: 30px; }
    .hero p { font-size: 14px; }
}

@media (max-width: 680px) {
    .container { padding: 0 10px; }
    .header { border-radius: 14px; padding: 8px; }
    .head-actions a { padding: 8px 10px; font-size: 12px; }
    .hero { margin-top: 14px; }
    .hero-copy { margin-bottom: 10px; }
    .hero h1 { font-size: 24px; }
    .hero p { font-size: 13px; }
    .exchange-card { border-radius: 26px; padding: 12px; }
    .field input { font-size: 18px; border-radius: 14px; }
    .deal-chat-header { padding: 13px 12px 11px; }
    .chat-header-topline { grid-template-columns: 1fr; }
    .chat-brand-mark { width: 40px; height: 40px; border-radius: 12px; }
    .deal-chat-header h2 { font-size: 16px; }
    .chat-header-actions { display: grid; grid-template-columns: 1fr 1fr; }
    .chat-header-actions button { justify-content: center; }
    .chat-status-shell { grid-template-columns: 1fr; }
    .chat-status-copy strong { white-space: normal; font-size: 14px; }
    .chat-status-pill { justify-content: center; }
    .chat-deal-stats { grid-template-columns: 1fr 1fr; }
    .inline-messages { height: min(390px, calc(100vh - 460px)); min-height: 220px; }
    .inline-head { flex-direction: column; }
    .inline-refresh { width: 100%; justify-content: center; }
    .inline-details { grid-template-columns: 1fr; }
    .summary-grid { grid-template-columns: 1fr; }
    .asset-options { right: auto; left: 0; width: 190px; }
    .client-cabinet { padding: 8px; align-items: stretch; }
    .client-panel { width: 100%; max-height: calc(100dvh - 16px); padding: 44px 14px 14px; border-radius: 16px; }
    .client-close { top: 8px; right: 8px; z-index: 2; }
    .client-profile-head { align-items: flex-start; padding-right: 0; }
    .client-profile-head button { margin-right: 38px; }
}

@media (max-width: 760px) {
    body.chat-session-open {
        position: fixed;
        inset: 0;
        width: 100%;
        height: 100%;
        overflow: hidden;
    }

    body.chat-session-open .container {
        position: fixed;
        inset: 0;
        max-width: none;
        height: auto;
        display: flex;
        flex-direction: column;
        gap: 8px;
        overflow: hidden;
        padding: max(6px, env(safe-area-inset-top)) 8px max(6px, env(safe-area-inset-bottom));
    }

    body.chat-session-open .header {
        flex: 0 0 auto;
        margin-top: 0;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px;
        border-radius: 14px;
        padding: 7px 8px;
    }

    body.chat-session-open .brand-main {
        font-size: 18px;
    }

    body.chat-session-open .brand-accent {
        font-size: 12px;
    }

    body.chat-session-open .head-actions {
        gap: 6px;
    }

    body.chat-session-open .head-actions .btn-ghost {
        display: none;
    }

    body.chat-session-open .head-actions .btn-green {
        min-height: 34px;
        padding: 7px 10px;
        border-radius: 10px;
        font-size: 12px;
    }

    body.chat-session-open .hero.chat-open {
        width: 100%;
        max-width: none;
        flex: 1 1 auto;
        min-height: 0;
        display: flex;
        margin: 0;
    }

    body.chat-session-open .inline-order {
        height: 100%;
        min-height: 0;
        display: flex;
        flex-direction: column;
        border-radius: 16px;
        padding: 8px;
    }

    body.chat-session-open .deal-chat-header {
        flex: 0 0 auto;
        margin: -8px -8px 8px;
        padding: 10px 10px 8px;
    }

    body.chat-session-open .chat-header-topline {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px;
        align-items: center;
    }

    body.chat-session-open .chat-brand-mark {
        width: 34px;
        height: 34px;
        border-radius: 10px;
        font-size: 10px;
    }

    body.chat-session-open .chat-brand-kicker {
        margin-bottom: 2px;
        font-size: 8px;
    }

    body.chat-session-open .deal-chat-header h2 {
        font-size: 14px;
    }

    body.chat-session-open .chat-header-actions {
        display: flex;
        gap: 5px;
    }

    body.chat-session-open .chat-header-actions button {
        width: 34px;
        height: 34px;
        padding: 0;
        justify-content: center;
    }

    body.chat-session-open .chat-header-actions button {
        font-size: 0;
    }

    body.chat-session-open .chat-header-actions .material-symbols-outlined {
        font-size: 18px;
    }

    body.chat-session-open .chat-status-shell {
        grid-template-columns: 1fr;
        gap: 7px;
        margin-top: 8px;
        padding: 8px;
        border-radius: 13px;
    }

    body.chat-session-open .chat-status-icon {
        width: 30px;
        height: 30px;
        border-radius: 10px;
    }

    body.chat-session-open .chat-status-icon .material-symbols-outlined {
        font-size: 18px;
    }

    body.chat-session-open .chat-status-copy .inline-status {
        font-size: 8px;
        margin-bottom: 2px;
    }

    body.chat-session-open .chat-status-copy strong {
        font-size: 12px;
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    body.chat-session-open .chat-status-pill {
        width: fit-content;
        padding: 5px 8px;
        font-size: 10px;
    }

    body.chat-session-open .chat-deal-stats {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 5px;
        margin-top: 8px;
    }

    body.chat-session-open .chat-deal-stats div {
        border-radius: 10px;
        padding: 6px 6px;
    }

    body.chat-session-open .chat-deal-stats span {
        font-size: 7px;
    }

    body.chat-session-open .chat-deal-stats strong {
        margin-top: 3px;
        font-size: 10px;
    }

    body.chat-session-open .chat-progress-line {
        height: 14px;
        margin-top: 7px;
    }

    body.chat-session-open .inline-messages {
        flex: 1 1 auto;
        height: auto;
        min-height: 0;
        max-height: none;
        padding-right: 2px;
    }

    body.chat-session-open .quick-actions,
    body.chat-session-open .register-prompt,
    body.chat-session-open .inline-composer {
        flex: 0 0 auto;
    }

    body.chat-session-open .quick-actions {
        display: flex;
        gap: 6px;
        overflow-x: auto;
        padding-top: 7px;
        scrollbar-width: none;
    }

    body.chat-session-open .quick-actions::-webkit-scrollbar {
        display: none;
    }

    body.chat-session-open .quick-actions[hidden] {
        display: none;
    }

    body.chat-session-open .quick-actions button {
        width: auto;
        min-width: max-content;
        margin-top: 0;
        padding: 8px 10px;
        border-radius: 999px;
        font-size: 12px;
    }

    body.chat-session-open .register-prompt {
        margin-top: 6px;
    }

    body.chat-session-open .inline-composer {
        grid-template-columns: minmax(0, 1fr) 42px;
        gap: 7px;
        margin-top: 7px;
    }

    body.chat-session-open .inline-composer textarea {
        min-height: 42px;
        max-height: 82px;
        border-radius: 13px;
        padding: 10px 11px;
        font-size: 14px;
    }

    body.chat-session-open .inline-composer button {
        height: 42px;
        border-radius: 13px;
    }

    body.chat-session-open .message-stack {
        max-width: min(84%, 430px);
    }
}

@media (max-width: 390px) {
    body.chat-session-open .chat-deal-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.chat-session-open .chat-status-pill {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .savanna-bg::before,
    .pattern-overlay,
    .exchange-card {
        transform: none !important;
        transition: none !important;
    }
}
