:root {
    --bg: #f5f6ef;
    --surface: #ffffff;
    --surface-muted: #eef3e7;
    --ink: #1c2424;
    --muted: #64706b;
    --line: #d8ded4;
    --teal: #1f6f68;
    --teal-dark: #174b47;
    --coral: #e66a55;
    --yellow: #f4c95d;
    --blue: #4f8cc9;
    --danger: #b93c32;
    --success: #32724c;
    --shadow: 0 18px 45px rgba(28, 36, 36, .08);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100%;
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0;
}

body.is-guest {
    min-height: 100vh;
    min-height: 100dvh;
    background-color: #172124;
    background-image: url("/assets/img/R.webp");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
}

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

a:hover {
    text-decoration: underline;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.app-main {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0;
}

.app-main--full {
    width: 100%;
    max-width: none;
    padding: 18px 20px 24px;
}

.app-main.app-main--full {
    width: 100%;
}

.account-menu {
    position: fixed;
    top: 22px;
    right: 22px;
    z-index: 1300;
    --account-dropdown-width: min(280px, calc(100vw - 32px));
    width: var(--account-dropdown-width);
}

.account-menu__toggle {
    position: relative;
    z-index: 2;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    gap: 3px;
    border: 1px solid rgba(255, 255, 255, .36);
    border-radius: 8px;
    padding: 8px;
    margin-left: auto;
    background: rgba(17, 30, 34, .48);
    box-shadow: 0 14px 36px rgba(10, 20, 22, .24);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
}

.account-menu.is-open .account-menu__toggle {
    transform: translate(-8px, 12px);
}

.account-menu__toggle span {
    display: block;
    width: 15px;
    height: 2px;
    border-radius: 999px;
    background: #ffffff;
}

.account-menu__toggle:hover,
.account-menu.is-open .account-menu__toggle {
    background: rgba(31, 111, 104, .72);
}

.account-menu__dropdown {
    position: absolute;
    top: 0;
    right: 0;
    width: var(--account-dropdown-width);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .34);
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(255, 255, 255, .2), rgba(17, 30, 34, .5));
    box-shadow: 0 24px 70px rgba(10, 20, 22, .34);
    color: #ffffff;
    transform-origin: top right;
    animation: account-menu-expand .14s ease-out;
    backdrop-filter: blur(22px) saturate(150%);
    -webkit-backdrop-filter: blur(22px) saturate(150%);
}

@keyframes account-menu-expand {
    from {
        opacity: 0;
        transform: scale(.88);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.account-menu__profile {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 11px;
    align-items: center;
    padding: 12px 58px 12px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, .18);
}

.account-menu__profile img {
    width: 46px;
    height: 46px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, .64);
    border-radius: 8px;
    background: #ffffff;
}

.account-menu__profile strong,
.account-menu__profile span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-menu__profile strong {
    color: #ffffff;
    font-size: .94rem;
    font-weight: 900;
}

.account-menu__profile span {
    color: rgba(255, 255, 255, .68);
    font-size: .78rem;
    font-weight: 700;
}

.account-menu__item {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: center;
    width: 100%;
    min-height: 42px;
    border: 0;
    padding: 0 12px;
    background: transparent;
    color: #ffffff;
    font-size: .9rem;
    font-weight: 800;
    text-align: left;
    text-decoration: none;
}

.account-menu__item:hover {
    background: rgba(255, 255, 255, .12);
    text-decoration: none;
}

.account-menu__logout {
    margin: 0;
    border-top: 1px solid rgba(255, 255, 255, .16);
}

.account-menu__item--danger {
    background: rgba(185, 60, 50, .82);
    color: #ffffff;
    font-weight: 900;
}

.account-menu__item--danger .account-menu__icon {
    color: #ffffff;
}

.account-menu__item--danger:hover {
    background: rgba(160, 42, 34, .92);
}

.account-menu__icon {
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    color: #ffd86b;
    font-size: .95rem;
}

.settings-modal,
.profile-modal {
    position: absolute;
    top: 0;
    right: calc(100% + 10px);
    z-index: 1;
    width: min(420px, calc(100vw - 32px));
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .34);
    border-radius: 8px;
    padding: 18px;
    background: linear-gradient(135deg, rgba(255, 255, 255, .18), rgba(17, 30, 34, .54));
    box-shadow: 0 28px 80px rgba(10, 20, 22, .42);
    color: #ffffff;
    transform-origin: top right;
    animation: settings-modal-expand .16s ease-out;
    backdrop-filter: blur(24px) saturate(155%);
    -webkit-backdrop-filter: blur(24px) saturate(155%);
}

.profile-modal {
    display: grid;
    gap: 14px;
}

.settings-modal[hidden],
.profile-modal[hidden] {
    display: none;
}

@keyframes settings-modal-expand {
    from {
        opacity: 0;
        transform: translateX(12px) scale(.94);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.settings-modal__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.settings-modal__top .eyebrow {
    color: #ffd86b;
}

.settings-modal__top h2 {
    color: #ffffff;
}

.settings-modal__close {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 8px;
    background: rgba(255, 255, 255, .12);
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1;
}

.settings-modal__close:hover {
    background: rgba(255, 255, 255, .22);
}

.settings-modal__form {
    display: grid;
    gap: 12px;
}

.settings-modal label {
    color: rgba(255, 255, 255, .82);
    font-size: .9rem;
}

.settings-modal input,
.settings-modal textarea {
    min-height: 38px;
    border-color: rgba(255, 255, 255, .34);
    background: rgba(255, 255, 255, .78);
}

.settings-modal textarea {
    min-height: 90px;
    resize: vertical;
}

.settings-modal .primary-button {
    min-height: 40px;
}

.settings-modal__status {
    margin: 0;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 8px;
    padding: 9px 10px;
    background: rgba(255, 255, 255, .12);
    color: #ffffff;
    font-size: .88rem;
    font-weight: 800;
}

.settings-modal__status.is-error {
    border-color: rgba(255, 120, 105, .45);
    background: rgba(185, 60, 50, .22);
}

.settings-modal__status.is-success {
    border-color: rgba(137, 240, 223, .4);
    background: rgba(31, 111, 104, .28);
}

.profile-modal__identity {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
}

.profile-modal__identity img {
    width: 76px;
    height: 76px;
    object-fit: cover;
    border: 3px solid #ffd86b;
    border-radius: 8px;
    background: #ffffff;
}

.profile-modal__identity h3,
.profile-modal__identity p,
.profile-modal__bio {
    margin: 0;
}

.profile-modal__identity h3 {
    overflow: hidden;
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-modal__identity p {
    overflow: hidden;
    color: rgba(255, 255, 255, .72);
    font-size: .9rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-modal__bio {
    min-height: 52px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 8px;
    padding: 10px;
    background: rgba(255, 255, 255, .1);
    color: rgba(255, 255, 255, .84);
    font-size: .9rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.profile-modal__stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.profile-modal__stats article {
    display: grid;
    align-content: center;
    min-height: 86px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 8px;
    padding: 10px;
    background: rgba(255, 255, 255, .1);
}

.profile-modal__stats strong,
.profile-modal__stats span {
    overflow-wrap: anywhere;
}

.profile-modal__stats strong {
    color: #ffd86b;
    font-size: 1.15rem;
    font-weight: 900;
    line-height: 1.2;
}

.profile-modal__stats span {
    color: rgba(255, 255, 255, .72);
    font-size: .78rem;
    font-weight: 800;
}

.auth-shell {
    position: relative;
    display: grid;
    min-height: calc(100vh - 132px);
    overflow: hidden;
    padding: 42px 20px;
    place-items: center;
}

.app-main--full > .auth-shell {
    min-height: 100vh;
    min-height: 100dvh;
    margin: -18px -20px -24px;
}

.auth-bg-image {
    display: none;
}

.auth-backdrop {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(115deg, rgba(20, 34, 37, .68), rgba(20, 34, 37, .24) 48%, rgba(230, 106, 85, .28)),
        rgba(18, 25, 27, .18);
}

.auth-modal {
    position: relative;
    z-index: 1;
    width: min(430px, 100%);
    border: 1px solid rgba(255, 255, 255, .42);
    border-radius: 8px;
    padding: 30px;
    background: rgba(255, 255, 255, .18);
    box-shadow: 0 24px 70px rgba(10, 20, 22, .32);
    color: #ffffff;
    backdrop-filter: blur(22px) saturate(150%);
}

.auth-modal--reset {
    width: min(460px, 100%);
}

.auth-modal--wide {
    width: min(540px, 100%);
}

.auth-modal.is-hidden {
    display: none;
}

.auth-modal .eyebrow {
    color: #ffd27a;
}

.auth-modal label {
    color: rgba(255, 255, 255, .86);
}

.auth-modal input,
.auth-modal select {
    border-color: rgba(255, 255, 255, .34);
    background: rgba(255, 255, 255, .72);
}

.auth-modal a,
.auth-modal .text-button {
    color: #fff3c4;
}

.auth-card,
.profile-card,
.metric-card,
.settings-form,
.chat-stream {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.auth-card {
    width: min(430px, 100%);
    padding: 30px;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--coral);
    font-size: .82rem;
    font-weight: 700;
    text-transform: uppercase;
}

h1,
h2 {
    margin: 0;
    line-height: 1.15;
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.25rem;
}

.stacked-form,
.settings-form {
    display: grid;
    gap: 16px;
    margin-top: 22px;
}

label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    background: #ffffff;
    color: var(--ink);
}

textarea {
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    outline: 3px solid rgba(79, 140, 201, .2);
    border-color: var(--blue);
}

select {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
    background-position: calc(100% - 18px) 19px, calc(100% - 12px) 19px;
    background-repeat: no-repeat;
    background-size: 6px 6px, 6px 6px;
}

.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 8px;
    padding: 0 18px;
    border: 1px solid transparent;
    font-weight: 700;
}

.primary-button {
    background: var(--teal);
    color: #ffffff;
}

.primary-button:hover {
    background: var(--teal-dark);
    text-decoration: none;
}

.secondary-button {
    background: var(--surface-muted);
    color: var(--ink);
    border-color: var(--line);
}

.secondary-button:hover {
    background: #e1ead8;
}

.form-footer {
    margin: 18px 0 0;
    color: var(--muted);
}

.auth-modal .form-footer {
    color: rgba(255, 255, 255, .82);
}

.modal-copy {
    margin: 12px 0 0;
    color: rgba(255, 255, 255, .82);
}

.form-footer--actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.text-button {
    border: 0;
    padding: 0;
    background: transparent;
    font-weight: 700;
}

.text-button:hover {
    text-decoration: underline;
}

.alert {
    margin-top: 18px;
    border-radius: 8px;
    padding: 12px 14px;
    border: 1px solid currentColor;
}

.alert p {
    margin: 0;
}

.alert p + p {
    margin-top: 6px;
}

.alert-error {
    color: var(--danger);
    background: #fff0ee;
}

.alert-success {
    color: var(--success);
    background: #edf7ef;
}

.form-error {
    grid-column: 1 / -1;
    margin: 0;
    border: 1px solid rgba(185, 60, 50, .24);
    border-radius: 8px;
    padding: 8px 10px;
    background: #fff0ee;
    color: var(--danger);
    font-size: .9rem;
    font-weight: 700;
}

.password-checker {
    display: grid;
    gap: 12px;
    border: 1px solid rgba(255, 255, 255, .34);
    border-radius: 8px;
    padding: 14px;
    background: rgba(255, 255, 255, .16);
    color: #ffffff;
    box-shadow: 0 16px 34px rgba(10, 20, 22, .16);
    --strength-color: var(--danger);
    --strength-width: 8%;
}

.password-checker[data-strength="fair"] {
    --strength-color: var(--yellow);
    --strength-width: 50%;
}

.password-checker[data-strength="good"] {
    --strength-color: var(--blue);
    --strength-width: 75%;
}

.password-checker[data-strength="strong"] {
    --strength-color: var(--success);
    --strength-width: 100%;
}

.password-checker__topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: .9rem;
    font-weight: 800;
}

.password-checker__topline strong {
    color: var(--strength-color);
}

.password-checker__track {
    overflow: hidden;
    height: 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .28);
}

.password-checker__track span {
    display: block;
    width: var(--strength-width);
    height: 100%;
    border-radius: inherit;
    background: var(--strength-color);
    transition: width .18s ease, background-color .18s ease;
}

.password-rules {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.password-rules li {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, .76);
    font-size: .86rem;
    font-weight: 700;
}

.password-rules li::before {
    content: "";
    display: grid;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .42);
    border-radius: 999px;
    color: #ffffff;
    font-size: .72rem;
    line-height: 1;
}

.password-rules li.is-met {
    color: #ffffff;
}

.password-rules li.is-met::before {
    content: "✓";
    border-color: var(--strength-color);
    background: var(--strength-color);
}

.page-section {
    display: grid;
    gap: 22px;
}

.page-section--narrow {
    width: min(720px, 100%);
    margin: 0 auto;
}

.section-heading {
    display: grid;
    gap: 4px;
}

.profile-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(170px, .8fr) minmax(220px, 1fr);
    gap: 16px;
}

.profile-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px;
}

.profile-card p {
    margin: 6px 0 0;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.profile-avatar {
    width: 86px;
    height: 86px;
    object-fit: cover;
    border-radius: 8px;
    border: 3px solid var(--yellow);
}

.metric-card {
    display: grid;
    align-content: center;
    gap: 4px;
    min-height: 130px;
    padding: 22px;
}

.metric-number {
    color: var(--teal);
    font-size: 2rem;
    font-weight: 800;
}

.metric-number--compact {
    font-size: 1.35rem;
    line-height: 1.2;
}

.metric-label {
    color: var(--muted);
    font-weight: 700;
}

.settings-form {
    padding: 22px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.chat-app {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
    background-color: #172124;
    background-image:
        linear-gradient(115deg, rgba(13, 25, 30, .28), rgba(13, 25, 30, .06) 46%, rgba(230, 106, 85, .18)),
        url("/assets/img/main_city.webp");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.app-main--full > .chat-app {
    margin: -18px -20px -24px;
}

.map-zone,
.map-viewport {
    position: absolute;
    inset: 0;
}

.map-zone {
    min-width: 0;
}

.map-viewport {
    overflow: hidden;
    background-color: #172124;
    background-image:
        linear-gradient(115deg, rgba(13, 25, 30, .28), rgba(13, 25, 30, .06) 46%, rgba(230, 106, 85, .18)),
        url("/assets/img/main_city.webp");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    overscroll-behavior: contain;
}

.map-surface {
    position: relative;
    display: grid;
    grid-template-columns: repeat(100, minmax(0, 1fr));
    grid-template-rows: repeat(100, minmax(0, 1fr));
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    background-color: #172124;
    background-image:
        linear-gradient(115deg, rgba(13, 25, 30, .28), rgba(13, 25, 30, .06) 46%, rgba(230, 106, 85, .18)),
        url("/assets/img/main_city.webp");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.map-surface::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: radial-gradient(circle at 50% 45%, rgba(255, 255, 255, .05), rgba(10, 20, 22, .2) 72%);
    pointer-events: none;
}

.map-grid {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(100, 1fr);
    grid-template-rows: repeat(100, 1fr);
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, .16) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, .16) 1px, transparent 1px);
    background-size: 1% 1%;
    opacity: .22;
    pointer-events: none;
}

.avatar {
    position: relative;
    z-index: 3;
    align-self: center;
    display: grid;
    justify-items: center;
    justify-self: center;
    width: 82px;
    min-height: 92px;
    transform: translateY(-18px);
    transition: transform .16s ease;
    pointer-events: none;
    user-select: none;
}

.avatar img {
    width: 62px;
    height: 62px;
    object-fit: cover;
    border: 3px solid #ffffff;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 10px 20px rgba(28, 36, 36, .18);
}

.avatar.is-current img {
    border-color: var(--yellow);
    box-shadow: 0 0 0 4px rgba(244, 201, 93, .35), 0 10px 20px rgba(28, 36, 36, .18);
}

.avatar-name {
    max-width: 120px;
    margin-top: 5px;
    border-radius: 8px;
    padding: 2px 7px;
    background: rgba(255, 255, 255, .9);
    color: var(--ink);
    font-size: .78rem;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.avatar-bubble {
    position: absolute;
    bottom: 86px;
    left: 50%;
    max-width: 210px;
    min-width: 58px;
    transform: translateX(-50%);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px 10px;
    background: #ffffff;
    color: var(--ink);
    font-size: .86rem;
    font-weight: 700;
    line-height: 1.3;
    overflow-wrap: anywhere;
    box-shadow: 0 10px 26px rgba(28, 36, 36, .12);
}

.avatar-bubble::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -7px;
    width: 12px;
    height: 12px;
    transform: translateX(-50%) rotate(45deg);
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: #ffffff;
}

.chat-dock {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    height: clamp(180px, 22vh, 230px);
    min-height: 0;
    overflow: hidden;
    border-top: 1px solid rgba(255, 255, 255, .34);
    background: rgba(17, 30, 34, .62);
    box-shadow: 0 -22px 70px rgba(10, 20, 22, .38);
    color: #ffffff;
    backdrop-filter: blur(22px) saturate(150%);
    -webkit-backdrop-filter: blur(22px) saturate(150%);
}

.chat-stream {
    position: relative;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: #ffffff;
}

.online-panel {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    min-width: 0;
    min-height: 0;
    border-left: 1px solid rgba(255, 255, 255, .28);
    background: rgba(255, 255, 255, .1);
}

.online-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 32px;
    padding: 0 10px;
    border-bottom: 1px solid rgba(255, 255, 255, .2);
    color: rgba(255, 255, 255, .9);
    font-size: .78rem;
    font-weight: 800;
}

.online-panel__header strong {
    display: grid;
    min-width: 22px;
    height: 20px;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    color: #ffffff;
    font-size: .72rem;
}

.online-list {
    display: grid;
    align-content: start;
    gap: 2px;
    min-height: 0;
    overflow: auto;
    padding: 7px 10px;
    scrollbar-color: rgba(255, 255, 255, .42) transparent;
}

.online-user {
    position: relative;
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: center;
    gap: 7px;
    min-height: 26px;
    padding: 1px 0;
    background: transparent;
}

.online-user::before {
    content: "";
    position: absolute;
    left: 16px;
    top: 3px;
    width: 7px;
    height: 7px;
    border: 2px solid rgba(17, 30, 34, .9);
    border-radius: 999px;
    background: #5ce08a;
}

.online-user.is-current {
    color: #89f0df;
}

.online-user img {
    width: 22px;
    height: 22px;
    object-fit: cover;
    border-radius: 6px;
    background: #ffffff;
}

.online-user span {
    overflow: hidden;
    color: #ffffff;
    font-size: .78rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.online-user.is-current span {
    color: #89f0df;
}

.online-empty {
    margin: 0;
    color: rgba(255, 255, 255, .68);
    font-size: .78rem;
    font-weight: 700;
}

.message-list {
    display: grid;
    align-content: start;
    gap: 1px;
    min-height: 0;
    overflow: auto;
    padding: 8px 10px 6px;
    font-size: .86rem;
    line-height: 1.35;
    scrollbar-color: rgba(255, 255, 255, .42) transparent;
}

.message-item {
    padding: 1px 0;
    color: #ffffff;
}

.message-item.is-current {
    color: #fff6cd;
}

.message-row {
    min-height: 18px;
}

.message-body {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
}

.message-author {
    color: #ffd86b;
    font-weight: 900;
    text-shadow: 0 0 12px rgba(255, 216, 107, .36);
}

.message-item.is-current .message-author {
    color: #89f0df;
    text-shadow: 0 0 12px rgba(137, 240, 223, .34);
}

.message-copy {
    color: rgba(255, 255, 255, .92);
}

.message-time {
    display: inline-block;
    margin-right: 6px;
    color: rgba(255, 255, 255, .72);
    font-size: .72rem;
    font-weight: 800;
    white-space: nowrap;
}

.message-text {
    margin: 0;
    overflow-wrap: anywhere;
    color: rgba(255, 255, 255, .76);
}

.message-form {
    position: relative;
    display: grid;
    gap: 6px;
    padding: 7px 10px 9px;
    border-top: 1px solid rgba(255, 255, 255, .22);
}

.message-input-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px;
    align-items: center;
}

.emoji-button {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .34);
    border-radius: 8px;
    background: rgba(255, 255, 255, .18);
    box-shadow: 0 10px 22px rgba(10, 20, 22, .12);
}

.emoji-button:hover {
    background: rgba(255, 255, 255, .3);
}

.message-form input {
    min-height: 34px;
    border-color: rgba(255, 255, 255, .34);
    padding: 6px 10px;
    background: rgba(255, 255, 255, .78);
    font-size: .86rem;
}

.message-form .primary-button {
    min-height: 34px;
    padding-inline: 12px;
    font-size: .84rem;
}

.emoji-picker-panel {
    position: absolute;
    right: 74px;
    bottom: 52px;
    z-index: 1100;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .34);
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(10, 20, 22, .34);
}

.emoji-picker-panel.is-hidden {
    display: none;
}

.emoji-picker-panel emoji-picker {
    width: 320px;
    height: 340px;
}

.error-page {
    display: grid;
    justify-items: start;
    gap: 14px;
    width: min(620px, 100%);
    margin: 80px auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 28px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.error-page p {
    margin: 0;
    color: var(--muted);
}

@media (max-width: 900px) {
    .app-main--full {
        padding-inline: 12px;
    }

    .app-main--full > .auth-shell {
        margin: -18px -12px -24px;
    }

    .app-main--full > .chat-app {
        margin: -18px -12px -24px;
    }

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

    .chat-dock {
        grid-template-columns: minmax(0, 1fr) 220px;
        height: 220px;
    }
}

@media (max-width: 560px) {
    .app-main {
        width: min(100% - 20px, 1120px);
    }

    .auth-modal,
    .auth-card,
    .settings-form {
        padding: 20px;
    }

    .auth-shell {
        padding: 26px 14px;
    }

    .profile-card {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .chat-dock {
        grid-template-columns: 1fr;
        height: 280px;
    }

    .online-panel {
        display: none;
    }

    .message-input-row {
        grid-template-columns: minmax(0, 1fr) auto auto;
        gap: 6px;
    }

    .message-form .primary-button {
        padding-inline: 12px;
    }

    .emoji-picker-panel {
        right: 0;
    }

    .emoji-picker-panel emoji-picker {
        width: min(320px, calc(100vw - 48px));
        height: 320px;
    }
}

@media (max-width: 760px) {
    .profile-modal,
    .settings-modal {
        top: calc(100% + 10px);
        right: 0;
        transform-origin: top right;
    }
}
