html,
body {
    height: 100%;
}

:root {
    --bg: #ffffff;
    --bg-accent: #ffffff;
    --bg-panel: #e2e8f0;
    --surface: #ffffff;
    --surface-alt: #f9fbfc;
    --text: #0f172a;
    --muted: #5b6474;
    --bg-muted: #eef1f6;
    --accent: #24b070;
    --accent-soft: #e5f6ed;
    --accent-strong: #11935a;
    --accent-dark: #0e7a4a;
    --event-accent: #2e8bea;
    --event-accent-soft: #e1efff;
    --clan-accent: #f97316;
    --clan-accent-soft: #fef0e0;
    --group-accent: #8b5cf6;
    --group-accent-soft: #f3e8ff;
    --profile-accent: var(--accent);
    --profile-accent-soft: var(--accent-soft);
    --danger: #e75b4a;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-panel: 1rem;
    --layout-navbar-height: clamp(3.5rem, 8vw, 4.75rem);
    --layout-footer-height: clamp(3.5rem, 8vw, 4.75rem);
    --page-padding: clamp(0.75rem, 2vw, 1.5rem);
    font-family: 'Inter', 'Segoe UI', sans-serif;
}

* {
    box-sizing: border-box;
}

.material-symbols-rounded {
    font-family: 'Material Symbols Rounded';
    font-weight: normal;
    font-style: normal;
    font-size: 1em;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.material-symbols-rounded--filled {
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

body {
    margin: 0;
    background: var(--surface);
    color: var(--text);
    min-height: 100vh;
    padding: var(--page-padding);
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.layout {
    display: flex;
    align-items: stretch;
    width: min(1600px, calc(100% - (var(--page-padding) * 2)));
    margin: 0 auto;
    background: var(--surface);
    border-radius: 20px;
    border: 1px solid rgba(15, 23, 42, 0.04);
    box-shadow: 0 24px 45px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    min-height: calc(100vh - clamp(2.5rem, 5vw, 4.5rem));
}

.layout__main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--surface);
    padding: var(--page-padding);
    gap: clamp(0.75rem, 1.6vw, 1.5rem);
}

.body--chat {
    padding-top: 0;
    padding-bottom: 0;
}

.body--chat .layout {
    min-height: 100vh;
}

.body--chat .layout__main {
    padding-top: 0;
    padding-bottom: 0;
    min-height: 100vh;
}

.body--chat .main--chat {
    height: 100%;
}

@media (max-width: 900px) {
    :root {
        --page-padding: 1rem;
    }

    .layout {
        flex-direction: column;
        border-radius: 20px;
        min-height: auto;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--bg-panel);
        padding: 1.25rem 1.5rem;
    }

    .layout__main {
        padding: 1.25rem;
    }
}

@media (max-width: 640px) {
    :root {
        --page-padding: 0.75rem;
    }

    .menu__icon {
        width: 36px;
        height: 36px;
    }

    .sidebar {
        padding: 1.15rem;
    }
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #238048;
}

.container {
    width: min(1400px, 100%);
    margin: 0 auto;
}

.container--page {
    padding: clamp(1.25rem, 3vw, 2rem) clamp(1rem, 4vw, 2rem);
    box-sizing: border-box;
}

.page-header {
    display: grid;
    gap: 0.75rem;
    margin-bottom: clamp(1.5rem, 4vw, 2.5rem);
}

.page-title {
    margin: 0;
    font-size: clamp(1.75rem, 4vw, 2.4rem);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.page-subtitle {
    margin: 0;
    max-width: 42rem;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.6;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: clamp(1.25rem, 3vw, 2rem);
}

.card__title {
    margin: 0 0 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.card__description {
    margin: 0 0 0.75rem;
    color: var(--muted);
    line-height: 1.55;
}

.card__details {
    margin: 0;
    font-weight: 600;
    color: var(--accent-dark);
}

.sidebar {
    flex-shrink: 0;
    width: 255px;
    background: var(--surface);
    border-right: 1px solid var(--bg-panel);
    display: flex;
    padding: 24px 18px;
}

.sidebar__inner {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 16px;
}

.sidebar-search {
    position: relative;
    padding: 0;
}

.sidebar-search__input {
    width: 100%;
    padding: 0.65rem 2.5rem 0.65rem 0.9rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: var(--radius-sm);
    background: #f3f5f8;
    color: var(--muted);
    font-size: 0.95rem;
    font-weight: 500;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.sidebar-search__input:focus {
    outline: none;
    border-color: rgba(36, 176, 112, 0.4);
    box-shadow: 0 0 0 3px rgba(36, 176, 112, 0.15);
    background: #ffffff;
}

.sidebar-search__button {
    position: absolute;
    top: 50%;
    right: 1.25rem;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: color 0.2s ease;
}

.sidebar-search__button:hover,
.sidebar-search__button:focus-visible {
    color: var(--accent);
    outline: none;
}

.sidebar-search__button .material-symbols-rounded {
    font-size: 1.1rem;
}

.sidebar__brand {
    padding: 0;
}

.sidebar__brand .logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    background: rgba(36, 176, 112, 0.08);
    border: 1px solid rgba(36, 176, 112, 0.18);
    color: var(--accent-strong);
    font-size: 1.1rem;
    font-weight: 700;
}

.sidebar__brand .logo::before {
    content: '🌿';
    font-size: 1.6rem;
}

.navbar {
    background: var(--surface);
    border-bottom: 1px solid var(--bg-panel);
    box-shadow: 0 18px 40px rgba(47, 157, 91, 0.08);
}

.navbar__content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.1rem 0;
}

.logo {
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text);
}


.navbar__actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.menu {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.menu--primary {
    align-items: stretch;
}

.menu a {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0.65rem 0.9rem;
    border-radius: var(--radius-sm);
    color: var(--muted);
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid transparent;
    transition: background 0.2s ease, color 0.2s ease, border 0.2s ease, transform 0.2s ease;
}

.menu a:hover,
.menu a:focus-visible {
    background: rgba(36, 176, 112, 0.12);
    color: var(--accent-strong);
    border-color: rgba(36, 176, 112, 0.25);
    outline: none;
    transform: translateY(-1px);
}

.menu--sidebar a {
    width: 100%;
}

.menu__icon {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    min-width: 20px;
    align-self: flex-start;
    color: inherit;
    transition: color 0.2s ease;
}

.menu__icon .material-symbols-rounded {
    font-size: 1.4rem;
}

.menu a:hover .menu__icon,
.menu a:focus-visible .menu__icon {
    color: var(--accent-strong);
}

.menu__link-text {
    position: relative;
    z-index: 1;
}

.menu__link--with-badge {
    padding-right: 3.5rem;
}

.menu__badge {
    position: absolute;
    top: 50%;
    right: 1.25rem;
    transform: translateY(-50%);
    min-width: 1.75rem;
    height: 1.5rem;
    padding: 0 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8rem;
    line-height: 1;
    color: #ffffff;
    background: #0f172a;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.25);
}

.menu__badge:empty {
    display: none;
}

.menu--sidebar .menu__link--with-badge {
    padding-right: 3.5rem;
}

.menu--sidebar .menu__badge {
    top: 50%;
    right: 1.25rem;
    transform: translateY(-50%);
}

.menu__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1rem;
    background: var(--accent);
    color: #ffffff;
    font-weight: 600;
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 18px rgba(36, 176, 112, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.menu__button--full {
    width: 100%;
}

.menu__button:hover,
.menu__button:focus-visible {
    background: var(--accent-strong);
    color: #ffffff;
    outline: none;
    transform: translateY(-1px);
    box-shadow: 0 16px 26px rgba(36, 176, 112, 0.25);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--bg-panel);
    border-radius: var(--radius-sm);
    background: var(--surface-alt);
    text-decoration: none;
    color: inherit;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.sidebar-user:hover,
.sidebar-user:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(36, 176, 112, 0.3);
    box-shadow: 0 24px 40px rgba(15, 23, 42, 0.15);
}

.sidebar-user__avatar {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    box-shadow: 0 10px 25px rgba(36, 176, 112, 0.3);
    --avatar-size: 48px;
    --avatar-badge-size: calc(var(--avatar-size) * 0.45);
}

.sidebar-user__avatar-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.sidebar-user__avatar-fallback {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--accent);
    color: #ffffff;
    display: grid;
    place-items: center;
    font-weight: 600;
    text-transform: uppercase;
    font-size: calc(42px * 0.36);
    line-height: 1;
    letter-spacing: 0.08em;
}

.sidebar-user__info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sidebar-user__info--single {
    justify-content: center;
}

.sidebar-user__name {
    font-weight: 600;
    color: var(--text);
}

.sidebar-user__meta {
    font-size: 0.85rem;
    color: var(--muted);
}

.sidebar-user__link {
    font-size: 0.9rem;
    color: var(--muted);
}

.sidebar-user__link:hover,
.sidebar-user__link:focus-visible {
    color: var(--accent);
}

.sidebar__actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.sidebar__action-form {
    margin: 0;
}

.sidebar__action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: var(--radius-md);
    background: var(--surface);
    color: var(--text);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
    padding: 0.65rem 1rem;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
}

.sidebar__action:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

.sidebar__action:hover,
.sidebar__action:focus-visible {
    box-shadow: 0 20px 35px rgba(15, 23, 42, 0.12);
    transform: translateY(-2px);
}

.sidebar__action-text {
    font-weight: 600;
}

.sidebar__action--settings {
    background: rgba(36, 176, 112, 0.08);
    color: var(--accent-strong);
    border-color: rgba(36, 176, 112, 0.25);
}

.sidebar__action--logout {
    background: var(--accent);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 18px 36px rgba(36, 176, 112, 0.3);
}

.sidebar__action--logout:hover,
.sidebar__action--logout:focus-visible {
    background: var(--accent-strong);
}

.main {
    flex: 1;
}

.main--discovery {
    padding: 0;
    display: flex;
    min-height: 0;
    height: 100%;
    align-items: stretch;
    overflow: hidden;
    background: var(--surface);
}

.discovery-layout {
    width: 100%;
    max-width: min(1180px, 100%);
    margin: 0 auto;
    padding: clamp(0.75rem, 2vw, 1.5rem);
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.discovery-layout .messages {
    width: min(1280px, 96vw);
    margin: 1.5rem auto 0;
}

.footer {
    border-top: 1px solid var(--bg-panel);
    background: rgba(255, 255, 255, 0.92);
    padding: clamp(1.5rem, 4vw, 2.25rem) 0;
    backdrop-filter: blur(6px);
}

.footer__content {
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.main--landing {
    background: var(--surface);
}

.landing {
    display: flex;
    flex-direction: column;
    gap: clamp(3.5rem, 7vw, 4.5rem);
    padding: clamp(2.2rem, 6vw, 3.5rem) 0 clamp(3.2rem, 7vw, 4.5rem);
}

.landing :where(.container) {
    padding-left: var(--page-padding);
    padding-right: var(--page-padding);
    box-sizing: border-box;
}

.landing section h2 {
    margin-top: 0;
    font-size: clamp(2rem, 3vw, 2.6rem);
}

.landing__hero {
    position: relative;
}

.landing__hero::before {
    content: none;
}

.landing__hero-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: clamp(2rem, 4vw, 3.5rem);
    align-items: center;
}

.landing__hero-text h1 {
    font-size: clamp(2.6rem, 4.6vw, 3.6rem);
    margin-bottom: 1.2rem;
}

.landing__hero-text p {
    color: var(--muted);
    max-width: 34rem;
    line-height: 1.7;
}

.landing__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: rgba(47, 157, 91, 0.12);
    color: var(--accent);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.8rem;
    margin-bottom: 1.25rem;
    border-radius: var(--radius-sm);
}

.landing__hero-actions {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.landing__stats-card {
    margin-top: 2.4rem;
    padding: clamp(1.6rem, 3vw, 2rem);
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(47, 157, 91, 0.18);
    box-shadow: 0 28px 65px rgba(27, 67, 44, 0.18);
    border-radius: var(--radius-lg);
    display: grid;
    gap: 1.4rem;
}

.landing__stats-title {
    font-size: 0.85rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--accent);
}

.landing__stats {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1.5rem;
}

.landing__stats li {
    min-width: 120px;
    display: grid;
    gap: 0.25rem;
}

.landing__stats strong {
    display: block;
    font-size: clamp(1.9rem, 3vw, 2.5rem);
}

.landing__stats span {
    color: var(--muted);
}

.landing__hero-visual {
    display: flex;
    justify-content: center;
}

.landing__hero-card {
    background: var(--surface);
    padding: clamp(1.8rem, 3vw, 2.4rem);
    border: 1px solid rgba(47, 157, 91, 0.25);
    box-shadow: 0 40px 80px rgba(27, 67, 44, 0.18);
    max-width: 360px;
    border-radius: var(--radius-lg);
}

.landing__hero-card h3 {
    margin-top: 0;
}

.landing__hero-card p {
    color: var(--muted);
    margin-bottom: 2rem;
}

.landing__hero-timeline {
    display: grid;
    gap: 1.4rem;
}

.landing__timeline-item {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 1rem;
}

.landing__timeline-icon {
    width: 48px;
    height: 48px;
    background: var(--accent-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    border-radius: var(--radius-md);
}

.landing__timeline-icon .material-symbols-rounded {
    font-size: 1.65rem;
}

.landing__timeline-item h4 {
    margin: 0;
}

.landing__timeline-item p {
    margin: 0.25rem 0 0;
    color: var(--muted);
}

.landing__benefits {
    position: relative;
}

.landing__benefits::before {
    content: "";
    position: absolute;
    inset: -3rem 10% -4rem;
    background: var(--surface);
    opacity: 0.7;
    filter: blur(90px);
    z-index: -1;
}

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

.landing__benefit-card {
    background: var(--surface);
    padding: 1.8rem;
    border: 1px solid rgba(47, 157, 91, 0.18);
    backdrop-filter: blur(4px);
    box-shadow: 0 35px 60px rgba(27, 67, 44, 0.12);
    border-radius: var(--radius-lg);
}

.landing__benefit-card p {
    color: var(--muted);
}

.landing__steps {
    background: var(--surface);
    padding: clamp(2.5rem, 5vw, 3.5rem) 0;
}

.landing__steps-list {
    margin: 2.5rem 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 1.5rem;
}

.landing__steps-list li {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.5rem;
    align-items: start;
    background: var(--surface);
    padding: 1.8rem;
    border: 1px solid var(--bg-panel);
    box-shadow: 0 30px 55px rgba(47, 157, 91, 0.15);
    border-radius: var(--radius-panel);
}

.landing__step-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent);
}

.landing__steps-list p {
    color: var(--muted);
    margin: 0.4rem 0 0;
}

.landing__community-grid {
    display: grid;
    gap: clamp(2rem, 4vw, 3rem);
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    align-items: center;
}

.landing__community p {
    color: var(--muted);
}

.landing__community-list {
    margin: 1.75rem 0 0;
    padding-left: 1.5rem;
    color: var(--muted);
}

.landing__testimonial {
    background: var(--surface);
    padding: clamp(1.8rem, 4vw, 2.4rem);
    border: 1px solid rgba(47, 157, 91, 0.18);
    box-shadow: 0 40px 70px rgba(27, 67, 44, 0.16);
    border-radius: var(--radius-panel);
}

.landing__testimonial blockquote {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.7;
}

.landing__testimonial cite {
    display: block;
    margin-top: 1.4rem;
    color: var(--accent);
    font-style: normal;
    font-weight: 600;
}

.landing__cta {
    padding-bottom: 0;
}

.landing__cta-box {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    background: linear-gradient(135deg, #2f9d5b, #1f7a43);
    color: #ffffff;
    padding: clamp(2.5rem, 6vw, 3.5rem);
    box-shadow: 0 45px 90px rgba(27, 67, 44, 0.3);
    border-radius: var(--radius-panel);
}

.landing__cta-box h2 {
    margin: 0 0 0.5rem;
}

.landing__cta-box p {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
}

.landing__cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

@media (max-width: 900px) {
    .landing__steps-list li {
        grid-template-columns: 1fr;
    }

    .landing__step-number {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 48px;
        height: 48px;
        background: var(--accent-soft);
    }
}

@media (max-width: 768px) {
    .landing {
        gap: 3.5rem;
        padding-bottom: 4rem;
    }

    .landing__hero-card {
        margin: 0 auto;
    }

    .landing__stats {
        gap: 1.2rem;
    }

    .landing__cta-box {
        text-align: center;
        align-items: center;
    }

    .landing__cta-actions {
        justify-content: center;
    }
}

@media (max-width: 520px) {
    .landing__badge {
        font-size: 0.7rem;
        letter-spacing: 0.08em;
    }

    .landing__hero-card {
        padding: 1.6rem;
    }
}

.button {
    background: var(--accent);
    color: #ffffff;
    padding: 0.75rem 1.4rem;
    border: none;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: none;
    letter-spacing: 0.02em;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    box-shadow: 0 14px 26px rgba(47, 157, 91, 0.25);
}

.button:hover {
    transform: translateY(-2px);
    text-decoration: none;
    background: var(--accent-strong);
    box-shadow: 0 16px 32px rgba(47, 157, 91, 0.25);
}

.button--outline {
    background: var(--surface);
    color: var(--accent);
    border: 2px solid var(--accent);
}

.button--outline:hover {
    background: var(--accent);
    color: #ffffff;
    box-shadow: 0 18px 36px rgba(47, 157, 91, 0.25);
}

.button--event {
    background: #2f6dff;
    color: #ffffff;
    box-shadow: 0 18px 36px rgba(47, 109, 255, 0.3);
}

.button--event:hover {
    background: #2656d8;
    color: #ffffff;
    box-shadow: 0 24px 48px rgba(47, 109, 255, 0.35);
}

.button--clan {
    background: var(--clan-accent);
    color: #ffffff;
    box-shadow: 0 18px 36px rgba(249, 115, 22, 0.28);
}

.button--clan:hover {
    background: #db6a13;
    color: #ffffff;
    box-shadow: 0 24px 48px rgba(249, 115, 22, 0.32);
}

.button--ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid rgba(0, 0, 0, 0.15);
    box-shadow: none;
}

.button--ghost:hover {
    background: rgba(0, 0, 0, 0.06);
    color: var(--text);
}

.profile--clan .profile__hero .button {
    background: var(--clan-accent);
    box-shadow: 0 18px 36px rgba(179, 71, 0, 0.28);
}

.profile--clan .profile__hero .button:hover {
    box-shadow: 0 20px 40px rgba(179, 71, 0, 0.32);
}

.profile--clan .profile__hero .button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.profile--clan .profile__hero .button--outline {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.7);
    box-shadow: none;
}

.profile--clan .profile__hero .button--outline:hover {
    background: rgba(255, 255, 255, 0.24);
    border-color: rgba(255, 255, 255, 0.85);
}

.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 1100;
}

.modal--open {
    display: flex;
}

.modal[hidden] {
    display: none !important;
}

.modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(31, 47, 37, 0.55);
    backdrop-filter: blur(4px);
}

.modal__dialog {
    position: relative;
    background: var(--surface);
    border-radius: 1rem;
    box-shadow: 0 32px 80px rgba(31, 47, 37, 0.25);
    padding: clamp(1.5rem, 3vw, 2rem);
    width: min(520px, 100%);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    z-index: 1;
}

.modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    border: none;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
}

.modal__close:hover,
.modal__close:focus-visible {
    color: var(--accent);
    outline: none;
}

.modal__header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-right: 2.5rem;
}

.modal__title {
    margin: 0;
    font-size: clamp(1.3rem, 3vw, 1.6rem);
}

.modal__description {
    margin: 0;
    color: var(--muted);
}

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

.modal__field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.modal__field-label {
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
}

.modal__textarea {
    min-height: 140px;
    resize: vertical;
}

.modal__actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.modal__actions .button {
    flex: 1 1 auto;
}

.modal__feedback {
    margin-top: -0.5rem;
}

.profile-photo-cropper {
    position: relative;
    width: 100%;
    max-width: 480px;
    max-height: min(70vh, 520px);
    margin: 0 auto 1.5rem;
    background-color: var(--color-surface-muted, #f5f5f5);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 12px;
}

.profile-photo-cropper__canvas {
    width: 100%;
    height: 100%;
}

.profile-photo-cropper__canvas img {
    display: block;
    width: 100%;
    max-width: 100%;
}

.clan-join-feedback {
    margin-top: 1rem;
}

.clan-join-feedback .message {
    margin: 0;
}

@media (max-width: 540px) {
    .modal__dialog {
        width: 100%;
    }

    .modal__actions {
        flex-direction: column;
    }

    .modal__actions .button {
        width: 100%;
    }
}

.profile--clan .profile__hero .button--outline:disabled {
    border-color: rgba(255, 255, 255, 0.5);
}

.card,
.panel,
.info-card {
    background: var(--surface);
    border: 1px solid var(--bg-panel);
    padding: clamp(1.35rem, 2.3vw, 1.85rem);
    box-shadow: 0 28px 45px rgba(47, 157, 91, 0.08);
    border-radius: var(--radius-md);
}

.card h3,
.card h4,
.info-card h2 {
    margin-top: 0;
}

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

.detail {
    display: grid;
    gap: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--bg-panel);
    padding: 1.5rem;
    box-shadow: 0 32px 60px rgba(47, 157, 91, 0.12);
    border-radius: var(--radius-lg);
}

.detail__header h1 {
    margin-bottom: 0.25rem;
}

.detail--with-sidebar {
    padding: 1.75rem;
}

.detail__header--split {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.detail__subtitle {
    margin: 0.35rem 0 0;
}

.detail__location {
    display: grid;
    gap: 1.25rem;
}

.detail__location-list {
    display: grid;
    gap: 1rem;
    margin: 0;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.detail__section {
    display: grid;
    gap: 0.75rem;
}

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

.detail__grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    align-items: start;
}

.detail__section--primary {
    display: grid;
    gap: 1.5rem;
}

.detail__figure {
    margin: 0;
    justify-self: start;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(31, 47, 37, 0.18);
    max-width: 280px;
}

.detail__figure--event {
    width: 180px;
    height: 180px;
    max-width: none;
    background: var(--event-accent-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.detail__figure--event .detail__photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail__photo {
    display: block;
    width: 100%;
    height: auto;
}

.detail__photo--placeholder {
    display: grid;
    place-items: center;
    min-height: 220px;
    color: #1f2f25;
    font-size: 3rem;
    font-weight: 700;
    text-transform: uppercase;
}

.detail__figure--event .detail__photo--placeholder {
    width: 100%;
    height: 100%;
    min-height: 0;
    background: transparent;
    color: var(--event-accent);
    font-size: 2.75rem;
}

.clan-detail__aside {
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
    display: grid;
    gap: 1.5rem;
}

.clan-sidebar-card {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    display: grid;
    gap: 1rem;
    box-shadow: none;
}

.clan-sidebar-card + .clan-sidebar-card {
    border-top: 1px solid rgba(31, 47, 37, 0.08);
    padding-top: 1.5rem;
    margin-top: 1rem;
}

.clan-sidebar-card__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
}

.clan-sidebar-card__title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.clan-sidebar-card__actions {
    display: grid;
    gap: 0.5rem;
}

.clan-sidebar-card__actions form {
    margin: 0;
}

.clan-sidebar-card__actions .button {
    width: 100%;
}

.clan-sidebar-card__note {
    margin: 0;
}

.clan-summary {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    align-items: start;
}

.clan-summary__figure {
    margin: 0;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid rgba(31, 47, 37, 0.08);
    display: grid;
    place-items: center;
    justify-self: start;
}

.clan-summary__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.clan-summary__placeholder {
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent);
}

.clan-summary__content {
    display: grid;
    gap: 0.5rem;
}

.clan-summary__creator {
    margin: 0;
    color: var(--muted);
}

.clan-summary__description {
    display: grid;
    gap: 0.5rem;
    line-height: 1.6;
}

.clan-summary__placeholder-text {
    margin: 0;
}

.clan-summary__stats {
    display: grid;
    gap: 0.25rem;
    margin: 0;
}

.clan-summary__stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(31, 47, 37, 0.08);
}

.clan-summary__stat:last-child {
    border-bottom: none;
}

.clan-summary__stat dt {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(31, 47, 37, 0.6);
}

.clan-summary__stat dd {
    margin: 0;
    font-weight: 600;
    font-size: 1rem;
}

.clan-participants {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.25rem;
}

.clan-participants__item {
    border-bottom: 1px solid rgba(31, 47, 37, 0.08);
}

.clan-participants__item:last-child {
    border-bottom: none;
}

.clan-participants__link {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.75rem;
    align-items: center;
    padding: 0.5rem 0;
    color: inherit;
    text-decoration: none;
    border-radius: 0.75rem;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.clan-participants__link:hover,
.clan-participants__link:focus-visible {
    background: rgba(47, 157, 91, 0.08);
}

.clan-participants__info {
    display: grid;
    gap: 0.25rem;
}

.clan-participants__name {
    font-weight: 600;
}

.clan-participants__badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.clan-participants__meta {
    font-size: 0.85rem;
    color: var(--muted);
}

.clan-participants--card {
    margin: 1rem 0 0;
}

.profile--clan .clan-participants__badge {
    background: var(--clan-accent-soft);
    color: var(--clan-accent);
}

.chip--soft {
    border-color: rgba(189, 229, 203, 0.6);
    background: rgba(189, 229, 203, 0.3);
}

.clan-feed {
    display: grid;
    gap: 1.5rem;
    margin-top: 1.25rem;
}

.clan-feed__header {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.clan-feed__hint {
    font-size: 0.9rem;
    color: var(--muted);
}

.clan-feed__notice {
    margin: 0;
}

.clan-feed__list {
    display: grid;
    gap: 0;
}

.post-composer {
    display: grid;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--surface);
    border-radius: 0.9rem;
    border: 1px solid rgba(31, 47, 37, 0.08);
    box-shadow: none;
}

.post-composer__row {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
    padding: 0.5rem;
    border: 1px solid var(--bg-panel);
    border-radius: 0.85rem;
    background: var(--surface);
    box-shadow: none;
}

.post-composer__tags {
    display: grid;
    gap: 0.5rem;
}

.post-composer__tags-label {
    font-weight: 600;
}

.post-composer__tags-hint {
    font-size: 0.85rem;
    color: rgba(31, 47, 37, 0.65);
}

.post-composer__attach {
    display: flex;
    align-items: center;
}

.post-composer__attach .chat-widget__attach-toggle {
    border-radius: 0.75rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.post-composer__attach .chat-widget__attach-toggle:not(:disabled):hover,
.post-composer__attach .chat-widget__attach-toggle:not(:disabled):focus-visible {
    background: rgba(47, 157, 91, 0.14);
    color: var(--accent);
    outline: none;
}

.post-composer__row .chat-widget__input {
    background: transparent;
    border-radius: 0.65rem;
    padding: 0.65rem 0.85rem;
    box-shadow: inset 0 0 0 1px rgba(31, 47, 37, 0.08);
    transition: box-shadow 0.2s ease;
}

.post-composer__row .chat-widget__input:focus {
    box-shadow: inset 0 0 0 1px rgba(47, 157, 91, 0.65);
}

.post-composer__send {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.post-composer__send .chat-widget__send-icon {
    color: inherit;
}

.post-composer__send:hover,
.post-composer__send:focus-visible {
    background: var(--accent-strong, #1f6f3d);
    transform: translateY(-1px);
    outline: none;
}

.post-composer__errors {
    display: grid;
    gap: 0.35rem;
}

.post-composer__draft-attachments {
    padding: 0;
}

.post-composer__draft-attachments .chat-widget__draft-attachment {
    max-width: 100%;
}

.clan-post {
    background: var(--surface);
    padding: 1rem 1.1rem;
    border: 1px solid rgba(31, 47, 37, 0.08);
    border-radius: var(--radius-panel);
    box-shadow: 0 25px 45px rgba(31, 47, 37, 0.08);
    display: grid;
    gap: 0.75rem;
}

.clan-post__tags {
    margin-top: -0.25rem;
    gap: 0.35rem;
}

.clan-post__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
}

.clan-post__author {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.clan-post__author-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.clan-post__title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
}

.clan-post__date {
    font-size: 0.8rem;
    color: var(--muted);
    white-space: nowrap;
}

.clan-post__content {
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.5;
}

.clan-post__content > *:first-child {
    margin-top: 0;
}

.clan-post__content > *:last-child {
    margin-bottom: 0;
}

.clan-post__figure {
    margin: 0.75rem 0 0;
    overflow: hidden;
    border-radius: var(--radius-md);
}

.clan-post__image {
    width: 100%;
    display: block;
    object-fit: cover;
}

.clan-post__media {
    margin-top: 0.75rem;
    border-radius: 0.75rem;
    overflow: hidden;
}

.clan-post__video {
    width: 100%;
    display: block;
    background: #000;
}

.clan-post__file {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(31, 47, 37, 0.12);
    background: rgba(31, 47, 37, 0.03);
    color: inherit;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    margin-top: 0.75rem;
}

.clan-post__file:hover {
    border-color: rgba(47, 157, 91, 0.35);
    background: rgba(189, 229, 203, 0.35);
}

.clan-post__footer {
    margin-top: 0.75rem;
}

.clan-post__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.clan-post__action {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(31, 47, 37, 0.12);
    background: transparent;
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.clan-post__action:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.clan-post__action:not(:disabled):hover {
    background: var(--accent-soft);
    color: var(--accent);
    border-color: rgba(47, 157, 91, 0.45);
}

.clan-post__action--active {
    background: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
}

.clan-post__action--active:not(:disabled):hover {
    background: #238048;
    border-color: #238048;
}

.clan-post__action-icon {
    font-size: 1rem;
    line-height: 1;
}

.clan-post__action-label {
    line-height: 1;
}

.clan-post__action-count {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.clan-events {
    display: grid;
    gap: 1rem;
}

.detail__section--stacked {
    gap: 0.75rem;
}

.detail__text {
    display: grid;
    gap: 0.75rem;
    line-height: 1.65;
}

.detail__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.5rem;
}

.detail__list--spacious {
    gap: 0.75rem;
}

.detail__footer {
    display: grid;
    gap: 0.75rem;
}

.detail__hint {
    margin: 0;
}

.detail__aside {
    background: var(--surface-alt);
    border: 1px solid var(--bg-panel);
    padding: 1.5rem;
    display: grid;
    gap: 1.5rem;
    box-shadow: 0 18px 36px rgba(47, 157, 91, 0.08);
}

.detail__stats {
    display: grid;
    gap: 1rem;
    margin: 0;
}

.detail__stat {
    display: grid;
    gap: 0.25rem;
}

.detail__stat dt {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.85rem;
    color: var(--muted);
}

.detail__stat dd {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
}

.detail__actions {
    display: grid;
    gap: 0.75rem;
}

.auth,
.dashboard,
.list {
    display: grid;
}

.list__map {
    background: var(--surface);
    gap: 1.25rem;
    position: relative;
}

.list__map-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1rem 1.5rem;
}

.tag-filter {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.tag-filter__field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: min(320px, 100%);
}

.tag-filter__label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--muted);
}

.tag-filter__actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag-filter__error {
    color: var(--danger);
    font-size: 0.8rem;
}

.list__map-heading h1,
.list__map-heading h2 {
    margin: 0;
    font-size: clamp(1.35rem, 3vw, 1.65rem);
}

.list__map-heading p {
    margin: 0.35rem 0 0;
    max-width: 520px;
}

.list__map-canvas {
    position: relative;
    width: 100%;
    height: clamp(260px, 50vh, 420px);
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(31, 47, 37, 0.06);
}

.main--community-map {
    padding: 0;
    display: flex;
    min-height: 0;
    height: 100%;
    overflow: hidden;
}

.community-map-layout {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    width: 100%;
    padding: 0;
}

.community-map {
    position: relative;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.community-map .list__map {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    padding: 0;
}

.community-map__canvas {
    flex: 1;
    height: 100%;
}

.community-map .list__map-heading {
    position: relative;
    inset: auto;
    z-index: 2;
    max-width: none;
    padding: 1.25rem 1.5rem;
    margin: 1rem 1.5rem 0;
    box-shadow: 0 12px 24px rgba(31, 47, 37, 0.12);
}

.community-map__filters-card {
    position: relative;
    margin: 1rem 1.5rem 1rem;
    z-index: 2;
    max-width: 100%;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(6px);
    box-shadow: 0 24px 48px rgba(31, 47, 37, 0.18);
}

.list__map-canvas--empty::after {
    content: "На карте пока нет отметок";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 0.75rem 1.5rem;
    box-shadow: 0 16px 32px rgba(31, 47, 37, 0.18);
    font-weight: 600;
    color: var(--muted);
    text-align: center;
    pointer-events: none;
}

.list-map__marker {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
    pointer-events: auto;
}

.list-map__marker-avatar {
    --list-map-avatar-size: 56px;
    width: var(--list-map-avatar-size);
    height: var(--list-map-avatar-size);
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.9);
    overflow: hidden;
    display: grid;
    place-items: center;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    background: var(--accent);
    color: #ffffff;
    box-shadow: 0 16px 36px rgba(31, 47, 37, 0.22);
    font-size: clamp(14px, calc(var(--list-map-avatar-size) * 0.32), 20px);
    line-height: 1.05;
}

.list-map__marker-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.list-map__marker-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.list-map__marker-avatar--fallback {
    background: var(--accent);
}

.list-map__marker--event .list-map__marker-avatar {
    background: var(--event-accent);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.95);
}

.list-map__marker--profile .list-map__marker-avatar {
    background: var(--accent);
}

.list-map__marker--clan .list-map__marker-avatar {
    background: var(--clan-accent);
}

.list-map__marker--emergency .list-map__marker-avatar {
    background: #c62828;
    border-color: rgba(255, 255, 255, 0.95);
}

.list-map__marker--emergency .list-map__marker-pin {
    background: #c62828;
}

.list-map__marker-pin {
    width: 14px;
    height: 14px;
    transform: rotate(45deg);
    background: var(--accent);
    border: 3px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 18px rgba(31, 47, 37, 0.2);
}

.list-map__marker--event .list-map__marker-pin {
    background: var(--event-accent);
}

.list-map__marker--profile .list-map__marker-pin {
    background: var(--accent);
}

.list-map__marker--clan .list-map__marker-pin {
    background: var(--clan-accent);
}

.list-map__popup {
    font-family: inherit;
    color: var(--text);
    min-width: 220px;
}

.list-map__popup-title {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
}

.list-map__popup-link {
    color: var(--accent);
    font-weight: 600;
}

.list-map__popup-link:hover {
    color: #238048;
}

.community-map__heading {
    align-items: flex-start;
}

.community-map__filters-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 0 1.5rem;
    padding: 1rem 1.5rem;
    background: rgba(31, 47, 37, 0.05);
    border-radius: 1.25rem;
}

.community-map__filters {
    display: inline-flex;
    gap: 0.75rem;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 999px;
}

.community-map__filter { 
    display: inline-flex;
    gap: 0.4rem;
    align-items: center;
    font-weight: 600;
    color: var(--text);
}

.community-map__filter input {
    accent-color: var(--accent);
}

.community-map__filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.35rem;
    min-width: 1.75rem;
    height: 1.75rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: rgba(31, 47, 37, 0.08);
    font-size: 0.85rem;
    color: var(--muted);
}

.community-map__city-filter {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    color: var(--text);
}

.community-map__city-filter-label {
    white-space: nowrap;
}

.community-map__city-select {
    min-width: 180px;
    padding: 0.5rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(31, 47, 37, 0.15);
    background: #fff;
    color: var(--text);
    font: inherit;
    outline: none;
}

.community-map__city-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(52, 168, 83, 0.18);
}

.community-map__city-select option {
    color: var(--text);
}

@media (max-width: 1024px) {
    .community-map .list__map-heading {
        max-width: none;
    }
}

.list-map__popup-subtitle {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.list-map__popup-details {
    margin: 0.35rem 0 0;
    font-size: 0.9rem;
    color: var(--text);
}

.list__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
}

.list__header p {
    margin: 0;
    max-width: 520px;
}

.list__grid {
    display: grid;
    gap: clamp(1.25rem, 2.5vw, 1.75rem);
    padding: clamp(1rem, 3vw, 2rem);
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
}

.card--list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.people-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: clamp(0.85rem, 1.8vw, 1.25rem);
    border-color: rgba(47, 157, 91, 0.18);
    box-shadow: 0 28px 48px rgba(31, 47, 37, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.people-card:hover,
.people-card:focus-within {
    transform: translateY(-6px);
    border-color: rgba(47, 157, 91, 0.32);
    box-shadow: 0 36px 65px rgba(31, 47, 37, 0.16);
}

.people-card__header {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: clamp(1rem, 2.2vw, 1.4rem);
    align-items: center;
}

.people-card__visual .avatar {
    width: clamp(64px, 8vw, 84px);
    height: clamp(64px, 8vw, 84px);
}

.people-card__titles {
    display: grid;
    gap: 0.35rem;
    align-content: start;
}

.people-card__name {
    margin: 0;
    font-size: clamp(1.2rem, 2.4vw, 1.45rem);
    line-height: 1.15;
}

.people-card__name a {
    color: inherit;
}

.people-card__name a:hover,
.people-card__name a:focus-visible {
    color: var(--accent);
}

.people-card__location,
.event-card__location,
.clan-card__location {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.people-card__location-icon,
.event-card__location-icon,
.clan-card__location-icon {
    font-size: 1.15em;
    line-height: 1;
}

.people-card__profession {
    margin: 0;
    font-size: 0.95rem;
}

.people-card__profession--muted {
    color: var(--muted);
    font-size: 0.9rem;
}

.people-card__section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.people-card__section-title {
    font-size: 0.8rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
}

.people-card__tags {
    gap: 0.35rem;
}

.people-card__description {
    font-size: 0.98rem;
    line-height: 1.6;
}

.people-card__description--placeholder {
    color: var(--muted);
    font-size: 0.9rem;
}

.people-card__footer {
    align-items: center;
    gap: clamp(0.75rem, 2vw, 1.25rem);
}

.people-card__contacts {
    display: grid;
    gap: 0.35rem;
    color: var(--muted);
    font-size: 0.95rem;
}

.people-card__contact {
    display: flex;
    align-items: baseline;
    gap: 0.45rem;
}

.people-card__contact-label {
    font-weight: 600;
    color: var(--text);
}

.people-card__contact-value {
    word-break: break-word;
}

.event-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: clamp(0.85rem, 1.8vw, 1.25rem);
    border-color: rgba(47, 109, 255, 0.18);
    box-shadow: 0 24px 45px rgba(31, 47, 37, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.event-card:hover,
.event-card:focus-within {
    transform: translateY(-6px);
    border-color: rgba(47, 109, 255, 0.32);
    box-shadow: 0 32px 56px rgba(31, 47, 37, 0.16);
}

.event-card__header {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: clamp(1rem, 2vw, 1.5rem);
    align-items: center;
}

.event-card__titles {
    display: grid;
    gap: 0.35rem;
    align-content: start;
}

.event-card__title {
    margin: 0;
}

.event-card__host {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.event-card__chip {
    margin-top: 0.5rem;
}

.event-card__visual .avatar {
    width: clamp(64px, 8vw, 84px);
    height: clamp(64px, 8vw, 84px);
}

.event-card__section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.event-card__section-title {
    font-size: 0.8rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
}

.event-card__facts {
    display: grid;
    gap: 0.35rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.event-card__fact {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: baseline;
    color: var(--muted);
    font-size: 0.95rem;
}

.event-card__fact-label {
    font-weight: 600;
    color: var(--text);
}

.event-card__fact-value {
    min-width: 0;
    flex: 1 1 auto;
}

.event-card__description {
    font-size: 0.98rem;
    line-height: 1.6;
}

.event-card__description--placeholder {
    color: var(--muted);
    font-size: 0.9rem;
}

.event-card__footer {
    align-items: center;
    gap: clamp(0.75rem, 2vw, 1.25rem);
}

.event-card__contacts {
    display: grid;
    gap: 0.35rem;
    color: var(--muted);
    font-size: 0.95rem;
    min-width: 0;
}

.event-card__contact-label {
    font-weight: 600;
    color: var(--text);
}

.event-card__contact-value {
    word-break: break-word;
}

.clan-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: clamp(0.85rem, 1.8vw, 1.25rem);
    border-color: rgba(249, 115, 22, 0.18);
    box-shadow: 0 24px 45px rgba(31, 47, 37, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.clan-card--highlight {
    border-color: rgba(76, 201, 127, 0.6);
    box-shadow: 0 32px 64px rgba(76, 201, 127, 0.24);
}

.clan-card--highlight::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 2px rgba(76, 201, 127, 0.3);
    pointer-events: none;
}

.clan-card:hover,
.clan-card:focus-within {
    transform: translateY(-6px);
    border-color: rgba(249, 115, 22, 0.32);
    box-shadow: 0 32px 56px rgba(31, 47, 37, 0.16);
}

.clan-card--highlight:hover,
.clan-card--highlight:focus-within {
    border-color: rgba(76, 201, 127, 0.72);
    box-shadow: 0 36px 72px rgba(76, 201, 127, 0.32);
}

.clan-card__header {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: clamp(1rem, 2vw, 1.5rem);
    align-items: center;
}

.clan-card__titles {
    display: grid;
    gap: 0.35rem;
    align-content: start;
}

.clan-card__name {
    margin: 0;
}

.clan-card__owner {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.clan-card__chip {
    margin-top: 0.5rem;
}

.clan-card__visual .avatar {
    width: clamp(64px, 8vw, 84px);
    height: clamp(64px, 8vw, 84px);
}

.clan-card__description {
    font-size: 0.98rem;
    line-height: 1.6;
}

.clan-card__description--placeholder {
    color: var(--muted);
    font-size: 0.9rem;
}

.clan-card__footer {
    align-items: center;
    gap: clamp(0.75rem, 2vw, 1.25rem);
}

.clan-card__status {
    color: var(--muted);
    font-size: 0.95rem;
}

.clan-card__status a {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: rgba(148, 163, 184, 0.4);
}

.clan-card__status a:hover,
.clan-card__status a:focus-visible {
    color: var(--clan-accent);
    text-decoration-color: currentColor;
}

.clan-card__action {
    margin: 0;
}

.card__header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
}

.card__header--with-media {
    flex-direction: row;
    align-items: flex-start;
}

.card__visual {
    flex: 0 0 auto;
}

.avatar {
    --avatar-size: 64px;
    --avatar-fallback-background: var(--accent);
    --avatar-fallback-color: #ffffff;
    width: var(--avatar-size);
    height: var(--avatar-size);
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: transparent;
    --avatar-shadow-elevation: 0 10px 20px rgba(31, 47, 37, 0.18);
    --avatar-glow-ring: 0 0 0 3px rgba(47, 157, 91, 0.25);
    --avatar-glow-soft: 0 0 14px rgba(47, 157, 91, 0.45);
    box-shadow: var(--avatar-shadow-elevation), var(--avatar-glow-ring), var(--avatar-glow-soft);
    overflow: visible;
    align-self: flex-start;
    font-size: calc(var(--avatar-size) * 0.42);
    line-height: 1;
    position: relative;
}

.avatar--small {
    --avatar-size: 40px;
    --avatar-shadow-elevation: 0 6px 12px rgba(31, 47, 37, 0.12);
    font-size: calc(var(--avatar-size) * 0.32);
}

.avatar__clan-badge {
    --avatar-badge-size: calc(var(--avatar-size) * 0.45);
    --avatar-badge-ring: 2px;
    --avatar-badge-shadow-y: 6px;
    --avatar-badge-shadow-blur: 16px;
    position: absolute;
    top: 0;
    right: 0;
    transform: translate(25%, -25%);
    width: var(--avatar-badge-size);
    height: var(--avatar-badge-size);
    border-radius: 999px;
    background: #ffffff;
    display: grid;
    place-items: center;
    overflow: hidden;
    box-shadow:
        0 0 0 var(--avatar-badge-ring) #ffffff,
        0 var(--avatar-badge-shadow-y) var(--avatar-badge-shadow-blur) rgba(31, 47, 37, 0.22);
}

.avatar--small .avatar__clan-badge,
.sidebar-user__avatar .avatar__clan-badge {
    --avatar-badge-size: calc(var(--avatar-size, 40px) * 0.38);
    --avatar-badge-ring: clamp(1px, calc(var(--avatar-badge-size) * 0.12), 2px);
    --avatar-badge-shadow-y: clamp(3px, calc(var(--avatar-badge-size) * 0.3), 6px);
    --avatar-badge-shadow-blur: clamp(5px, calc(var(--avatar-badge-size) * 0.6), 12px);
    transform: translate(32%, -32%);
}

.avatar__clan-badge-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}

.avatar__clan-badge-fallback {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    background: var(--clan-accent);
    color: #ffffff;
    font-weight: 600;
    font-size: calc(var(--avatar-badge-size) * 0.48);
    text-transform: uppercase;
    border-radius: 50%;
    box-sizing: border-box;
    line-height: 1;
}

.avatar__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}

.avatar__image[hidden] {
    display: none;
}

.avatar__image:not([hidden])[src=''],
.avatar__image:not([hidden]):not([src]) {
    display: none;
}

.avatar__fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: inherit;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--avatar-fallback-color, #ffffff);
    background: var(--avatar-fallback-background, var(--accent));
    border-radius: 50%;
    line-height: 1;
}

.avatar__fallback[hidden] {
    display: none;
}

.avatar--event {
    --avatar-fallback-background: var(--event-accent);
    --avatar-fallback-color: #ffffff;
    --avatar-glow-ring: 0 0 0 3px rgba(47, 109, 255, 0.25);
    --avatar-glow-soft: 0 0 14px rgba(47, 109, 255, 0.45);
}

.avatar--person {
    --avatar-fallback-background: var(--accent);
    --avatar-fallback-color: #ffffff;
    --avatar-glow-ring: 0 0 0 3px rgba(47, 157, 91, 0.25);
    --avatar-glow-soft: 0 0 14px rgba(47, 157, 91, 0.45);
}

.avatar--clan {
    --avatar-fallback-background: var(--clan-accent);
    --avatar-fallback-color: #ffffff;
    --avatar-glow-ring: 0 0 0 3px rgba(249, 115, 22, 0.25);
    --avatar-glow-soft: 0 0 14px rgba(249, 115, 22, 0.5);
}

.chip--clan {
    border-color: rgba(249, 115, 22, 0.35);
    background: var(--clan-accent-soft);
    color: var(--clan-accent);
}

.chip--event {
    border-color: rgba(47, 109, 255, 0.35);
    background: var(--event-accent-soft);
    color: var(--event-accent);
}

.list--clans .card__titles a,
.list--clans .card__footer a:not(.button) {
    color: var(--clan-accent);
}

.list--clans .card__titles a:hover,
.list--clans .card__titles a:focus-visible,
.list--clans .card__footer a:not(.button):hover,
.list--clans .card__footer a:not(.button):focus-visible {
    color: #ea580c;
}

.list--events .card__titles a,
.list--events .card__footer a:not(.button) {
    color: var(--event-accent);
}

.list--events .card__titles a:hover,
.list--events .card__titles a:focus-visible,
.list--events .card__footer a:not(.button):hover,
.list--events .card__footer a:not(.button):focus-visible {
    color: #1f4fd4;
}

.card__chip {
    margin-top: 0.5rem;
}

.card__titles {
    min-width: 0;
}

.card__titles h2 {
    margin: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.card__titles p {
    margin: 0.35rem 0 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    border: 1px solid #bde5cb;
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
    letter-spacing: 0.02em;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}

.chip--clan {
    border-color: rgba(249, 115, 22, 0.32);
    background: var(--clan-accent-soft);
    color: var(--clan-accent);
}

.card__meta {
    margin: 0;
    color: var(--muted);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.card__description {
    margin: 0;
    line-height: 1.6;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.card__contacts {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    color: var(--muted);
    font-size: 0.95rem;
    min-width: 0;
}

.card__contacts span,
.card__contacts a {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.card__footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
}

.card__footer .button {
    flex-shrink: 0;
}

.tabs {
    background: var(--surface);
    border: 1px solid var(--bg-panel);
    overflow: hidden;
    box-shadow: 0 24px 45px rgba(47, 157, 91, 0.08);
    border-radius: var(--radius-panel);
}

.tabs__headers {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

.tabs__button {
    background: transparent;
    color: var(--muted);
    padding: 1rem;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.tabs__button:hover {
    background: var(--accent-soft);
    color: var(--accent);
}

.tabs__button--active {
    background: var(--accent);
    color: #ffffff;
}

.tab {
    display: none;
    padding: 1.5rem;
}

.tab--active {
    display: block;
}

.form {
    display: grid;
    gap: 1rem;
}


.auth-page {
    background: linear-gradient(135deg, #e7f5ec 0%, #f5fbf7 55%, #ffffff 100%);
}

.auth-page .layout {
    min-height: 100vh;
}

.auth-page .layout__main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1.5rem, 5vw, 3.5rem);
    background: transparent;
}

.auth-page .main {
    width: 100%;
    display: flex;
    justify-content: center;
}

.auth-layout {
    width: min(640px, 100%);
    margin: 0 auto;
    padding: 0;
}

.auth {
    display: grid;
    gap: clamp(1.5rem, 4vw, 2.5rem);
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(219, 232, 224, 0.8);
    border-radius: 28px;
    box-shadow: 0 30px 60px rgba(31, 47, 37, 0.15);
    padding: clamp(1.75rem, 5vw, 2.75rem);
}

.auth__panel {
    display: block;
}

.auth__panel-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.auth__panel-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--accent-dark);
    font-weight: 600;
}

.auth__panel-link--muted {
    color: var(--muted);
    font-weight: 500;
}

.auth__panel-link:hover {
    color: var(--accent);
}

.auth__switcher {
    width: 100%;
    background: var(--surface);
    border: 1px solid rgba(219, 232, 224, 0.9);
    border-radius: 24px;
    padding: clamp(1.6rem, 4vw, 2.2rem);
    box-shadow: 0 22px 50px rgba(31, 47, 37, 0.14);
}

.auth__switcher-buttons {
    display: inline-flex;
    background: var(--surface-alt);
    padding: 0.3rem;
    gap: 0.3rem;
    margin-bottom: clamp(1.6rem, 3vw, 2.2rem);
}

.auth__switcher-button {
    border: none;
    padding: 0.65rem 1.4rem;
    background: transparent;
    color: var(--muted);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.auth__switcher-button--active {
    background: #2f9d5b;
    color: #ffffff;
    box-shadow: 0 18px 36px rgba(47, 157, 91, 0.28);
}

.auth__cards {
    position: relative;
}

.auth-card {
    display: grid;
    gap: 1.2rem;
    transition: opacity 0.25s ease, transform 0.3s ease;
}

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

.auth-card--active {
    opacity: 1;
    transform: translateY(0);
}

.auth-card h2 {
    margin: 0;
    font-size: 1.75rem;
}

.auth-card__subtitle {
    margin: 0;
    color: var(--muted);
    font-size: 0.98rem;
    line-height: 1.5;
}

.form--auth {
    background: var(--surface-alt);
    padding: 1.6rem;
    border: 1px solid rgba(219, 232, 224, 0.9);
    border-radius: 20px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.form__field {
    display: grid;
    gap: 0.45rem;
}

.form__label {
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text);
}

.form__control .input,
.form__control input[type="password"] {
    width: 100%;
}

.form__hint {
    color: var(--muted);
    font-size: 0.85rem;
}

.form__alert {
    padding: 0.75rem 1rem;
    background: rgba(231, 91, 74, 0.1);
    color: var(--danger);
    font-weight: 500;
}

.form__error {
    color: var(--danger);
    font-size: 0.85rem;
}

.form__hint--error {
    color: #c62828;
}

.form__fieldset {
    display: grid;
    gap: 0.5rem;
}

.form__option {
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
    font-weight: 600;
}

.register-wizard {
    display: grid;
    gap: 1.5rem;
}

.register-wizard__progress {
    position: relative;
    background: rgba(47, 157, 91, 0.12);
    height: 8px;
    overflow: hidden;
}

.register-wizard__progress-bar {
    display: block;
    height: 100%;
    width: var(--progress, 25%);
    background: linear-gradient(90deg, #2f9d5b 0%, #52c07b 100%);
    transition: width 0.35s ease;
}

.register-wizard__step-indicator {
    display: flex;
    justify-content: space-between;
    margin-top: 0.85rem;
    font-size: 0.85rem;
    color: var(--muted);
}

.register-wizard__slides {
    position: relative;
    min-height: 260px;
}

.register-wizard__slide {
    display: none;
    background: var(--surface);
    border: 1px solid rgba(219, 232, 224, 0.9);
    border-radius: 20px;
    padding: clamp(1.6rem, 4vw, 2.2rem);
    box-shadow: 0 28px 60px rgba(31, 47, 37, 0.12);
    animation: swipe-in 0.45s ease;
}

.register-wizard__slide--active {
    display: grid;
    gap: 1rem;
}

.register-wizard__emoji {
    font-size: 2.4rem;
}

.register-wizard__title {
    margin: 0;
    font-size: 1.4rem;
}

.register-wizard__description {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.register-wizard__actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.register-wizard__actions-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.register-wizard__actions .button {
    min-width: 120px;
}

.form__field--floating .form__control .input,
.form__field--floating .form__control input {
    padding: 0.85rem 1.1rem;
    background: var(--surface-alt);
    border: 1px solid var(--bg-panel);
}

.form__field--floating .form__control .input:focus,
.form__field--floating .form__control input:focus {
    background: #ffffff;
}

.button--primary {
    background: var(--accent);
    color: #ffffff;
    text-transform: none;
    letter-spacing: 0.02em;
    box-shadow: 0 18px 36px rgba(47, 157, 91, 0.25);
}

.button--primary:hover {
    background: #238048;
}

.button--secondary {
    background: rgba(47, 157, 91, 0.12);
    color: var(--accent);
    text-transform: none;
    letter-spacing: 0.02em;
    box-shadow: none;
}

.button--secondary:hover {
    background: rgba(47, 157, 91, 0.18);
}

.button--soft {
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--bg-panel);
    box-shadow: none;
    text-transform: none;
    letter-spacing: 0.02em;
}

.button--soft:hover {
    background: var(--surface-alt);
    color: var(--text);
}

.button--soft:disabled {
    opacity: 0.6;
    cursor: default;
    transform: none;
}

.chat-create {
    max-width: 720px;
    margin: 0 auto;
    display: grid;
    gap: 1.5rem;
    padding: clamp(1.5rem, 4vw, 2.5rem) 1.5rem;
}

.chat-create__title {
    margin: 0;
    font-size: clamp(1.4rem, 3vw, 1.8rem);
}

.chat-create__description {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.chat-create__form {
    display: grid;
    gap: 1.25rem;
    background: var(--surface-alt);
    border: 1px solid var(--bg-panel);
    padding: clamp(1.5rem, 4vw, 2rem);
    box-shadow: 0 12px 32px rgba(25, 49, 32, 0.08);
}

.chat-create__actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.chat-create__empty {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

@keyframes swipe-in {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 640px) {
    .auth {
        padding: 1.25rem;
        border-radius: 20px;
    }

    .auth__switcher {
        padding: 1.25rem;
    }

    .auth__switcher-buttons {
        width: 100%;
    }

    .auth__switcher-button {
        flex: 1;
    }

    .register-wizard__slides {
        min-height: 0;
    }

    .register-wizard__slide {
        padding: 1.2rem;
    }

    .register-wizard__actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .register-wizard__actions-right {
        width: 100%;
    }

    .register-wizard__actions-right .button,
    .register-wizard__actions .button {
        width: 100%;
    }
}

.form__field span {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.input,
.textarea,
select.input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--bg-panel);
    background: var(--surface);
    color: var(--text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input:focus,
.textarea:focus,
select.input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(47, 157, 91, 0.2);
}

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

.error {
    color: var(--danger);
    font-size: 0.85rem;
}

.messages {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.message {
    padding: 0.75rem 1rem;
    border-left: 4px solid var(--accent);
    background: var(--surface);
    box-shadow: 0 12px 28px rgba(47, 157, 91, 0.08);
}

.message--error {
    border-color: var(--danger);
}

.list .card {
    margin: 0;
}

@media (max-width: 640px) {
    .navbar__content {
        flex-direction: column;
        gap: 1rem;
    }

    .menu {
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero__actions {
        flex-direction: column;
    }
}

@media (max-width: 900px) {
    .detail__grid {
        grid-template-columns: 1fr;
    }

    .detail__aside {
        padding: 1.25rem;
    }

    .clan-detail__aside {
        padding: 0;
    }

    .clan-summary {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 720px) {
    .list__header {
        flex-direction: column;
        align-items: flex-start;
    }

    .list__map {
        padding: 0 1rem 1rem;
    }

    .community-map__filters-card {
        position: relative;
        inset: auto;
        transform: none;
        width: auto;
        max-width: none;
        padding: 1rem 1.25rem;
        flex-direction: column;
        align-items: stretch;
        margin: 1rem 1rem 0;
        box-shadow: 0 12px 24px rgba(31, 47, 37, 0.12);
    }

    .community-map__filters {
        justify-content: space-between;
    }

    .community-map__city-filter {
        justify-content: space-between;
    }

    .community-map__city-select {
        width: 100%;
        min-width: 0;
    }

    .list__map-canvas {
        height: clamp(220px, 60vh, 340px);
    }

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

    .people-card__header,
    .event-card__header,
    .clan-card__header {
        grid-template-columns: minmax(0, 1fr);
        gap: 1rem;
    }

    .people-card__visual,
    .event-card__visual,
    .clan-card__visual {
        justify-self: start;
    }

    .card__footer {
        flex-direction: column;
        align-items: stretch;
    }

    .card__footer .button {
        width: 100%;
        text-align: center;
    }

    .detail__header--split {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 720px) {
    .community-map .list__map {
        padding: 0 1rem 1rem;
    }

    .community-map .list__map-heading {
        position: relative;
        inset: auto;
        max-width: none;
        padding: 1rem 1.25rem;
        margin: 1rem 0 0;
        box-shadow: 0 12px 24px rgba(31, 47, 37, 0.12);
    }

    .community-map__filters-card {
        position: relative;
        inset: auto;
        transform: none;
        width: auto;
        max-width: none;
        padding: 1rem 1.25rem;
        flex-direction: column;
        align-items: stretch;
        margin: 1rem 0 0;
        box-shadow: 0 12px 24px rgba(31, 47, 37, 0.12);
    }

    .community-map__filters {
        justify-content: space-between;
        width: 100%;
    }

    .community-map__filters-card .community-map__filters {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .community-map__city-filter {
        justify-content: space-between;
    }

    .community-map__city-select {
        width: 100%;
        min-width: 0;
    }

    .community-map__canvas {
        height: 100%;
    }
}

.chat-widget__toggle {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    width: 3.5rem;
    height: 3.5rem;
    background: var(--accent);
    color: #ffffff;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    box-shadow: 0 22px 35px rgba(47, 157, 91, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.chat-widget {
    --chat-widget-rooms-width: 220px;
    --chat-widget-width: min(520px, 90vw);
    --chat-widget-height: min(600px, 70vh);
    position: fixed;
    right: 1.5rem;
    bottom: 5.5rem;
    width: var(--chat-widget-width);
    min-width: 320px;
    max-width: 96vw;
    height: var(--chat-widget-height);
    min-height: 360px;
    max-height: 90vh;
    background: var(--surface);
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1000;
}

.chat-widget--hidden {
    display: none;
}

.main--chat {
    background: var(--surface);
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-page__wrapper {
    width: 100%;
    max-width: min(1120px, 100%);
    margin: 0 auto;
    padding: clamp(0.75rem, 2vw, 1.5rem);
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.chat-page__wrapper > .messages {
    flex: 0 0 auto;
}

.chat-page {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    flex: 1;
    min-height: 0;
    max-height: 100vh;
    height: 100%;
}

.chat-page__content {
    display: flex;
    justify-content: center;
    flex: 1;
    min-height: 0;
    align-items: stretch;
    height: 100%;
}

.chat-page .chat-widget {
    position: static;
    width: 100%;
    max-width: none;
    min-width: 0;
    height: 100%;
    max-height: none;
    margin: 0;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
}

.chat-page .chat-widget__body {
    grid-template-columns: minmax(220px, 320px) 1fr;
    column-gap: 1.25rem;
    flex: 1;
    min-height: 0;
}

.chat-page .chat-widget--info-open .chat-widget__body {
    grid-template-columns: minmax(220px, 320px) 1fr minmax(220px, 300px);
}

.chat-page .chat-widget__rooms {
    border-right: none;
    height: 100%;
    min-height: 0;
}

.chat-page .chat-widget__conversation {
    border-left: none;
    padding-left: 0;
    height: 100%;
    overflow: hidden;
    min-height: 0;
}

.chat-page .chat-widget__info {
    border-left: none;
}

@media (max-width: 900px) {
    .chat-page__wrapper {
        padding: 1.5rem 1rem 2.5rem;
    }

    .chat-page .chat-widget {
        height: auto;
    }

    .chat-page .chat-widget__body {
        grid-template-columns: 1fr;
        row-gap: 1rem;
    }

    .chat-page .chat-widget--info-open .chat-widget__body {
        grid-template-columns: 1fr;
    }

    .chat-page .chat-widget__rooms {
        border-right: none;
        border-bottom: 1px solid var(--bg-panel);
    }

    .chat-page .chat-widget__conversation {
        border-left: none;
        padding-left: 0;
        height: auto;
        overflow: visible;
    }

    .chat-page .chat-widget__info {
        border-left: none;
        border-top: none;
        padding: 0;
        box-shadow: none;
    }
}

.chat-widget__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    background: var(--surface);
}

.chat-widget__title {
    margin: 0;
    font-size: 1rem;
}

.chat-widget__info-button {
    background: var(--surface);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 6px;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    color: var(--muted);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.chat-widget__info-button:hover,
.chat-widget__info-button:focus-visible {
    background: var(--accent-soft);
    color: var(--accent-dark);
    border-color: var(--accent);
    outline: none;
}

.chat-widget__info-button[aria-expanded="true"] {
    background: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
}

.chat-widget__body {
    display: grid;
    grid-template-columns: minmax(180px, var(--chat-widget-rooms-width)) 0.5rem 1fr;
    column-gap: 1rem;
    flex: 1;
    min-height: 0;
}

.chat-widget--info-open .chat-widget__body {
    grid-template-columns: minmax(180px, var(--chat-widget-rooms-width)) 0.5rem 1fr minmax(200px, 280px);
}

.chat-widget__rooms {
    border-right: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--surface);
    min-height: 0;
    width: 100%;
}

.chat-widget__rooms-actions {
    flex: 0 0 auto;
}

.chat-widget__rooms-list {
    flex: 1 1 auto;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-height: 0;
}


.chat-widget__info {
    display: none;
    flex-direction: column;
    gap: 1.25rem;
    padding: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--bg-panel);
    border-radius: 1rem;
    box-shadow: none;
    overflow-y: auto;
    min-height: 0;
    margin: 0;
}

.chat-widget--info-open .chat-widget__info {
    display: flex;
}

.chat-widget__info-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0 0 0.5rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.chat-widget__info-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0;
    margin-top: 0;
}

.chat-widget__info-placeholder {
    margin: 0;
    color: rgba(95, 114, 102, 0.9);
    font-size: 0.85rem;
    line-height: 1.5;
}

.chat-widget__info-content {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 0;
}

.chat-widget__info-summary {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: var(--bg-muted);
    border: 1px solid var(--bg-panel);
    border-radius: 1rem;
    color: inherit;
    text-decoration: none;
}

.chat-widget__info-summary:hover,
.chat-widget__info-summary:focus {
    text-decoration: none;
}

.chat-widget__info-summary--link {
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.chat-widget__info-summary--link:hover,
.chat-widget__info-summary--link:focus-visible {
    background: #fff;
    box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.08);
    outline: none;
}

.chat-widget__info-avatar {
    --chat-info-avatar-size: 3.25rem;
    --avatar-size: var(--chat-info-avatar-size);
    width: var(--chat-info-avatar-size);
    height: var(--chat-info-avatar-size);
    border-radius: 50%;
    overflow: visible;
    flex-shrink: 0;
    background: var(--chat-avatar-bg, rgba(47, 157, 91, 0.12));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--chat-avatar-fg, var(--accent-dark));
    font-weight: 600;
    font-size: calc(var(--chat-info-avatar-size) * 0.42);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1;
    position: relative;
}

.chat-widget__info-avatar--empty {
    background: var(--chat-avatar-empty-bg, rgba(47, 157, 91, 0.08));
}

.chat-widget__info-avatar--profile {
    --chat-avatar-bg: var(--profile-accent);
    --chat-avatar-empty-bg: var(--profile-accent-soft);
    --chat-avatar-fg: #ffffff;
}

.chat-widget__info-avatar--event {
    --chat-avatar-bg: var(--event-accent);
    --chat-avatar-empty-bg: var(--event-accent-soft);
    --chat-avatar-fg: #ffffff;
}

.chat-widget__info-avatar--clan {
    --chat-avatar-bg: var(--clan-accent);
    --chat-avatar-empty-bg: var(--clan-accent-soft);
    --chat-avatar-fg: #ffffff;
}

.chat-widget__info-avatar--group {
    --chat-avatar-bg: var(--group-accent);
    --chat-avatar-empty-bg: var(--group-accent-soft);
    --chat-avatar-fg: #ffffff;
}

.chat-widget__info-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.chat-widget__info-avatar-initials {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: inherit;
    color: inherit;
    line-height: 1;
}

.chat-widget__info-summary-texts {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.chat-widget__info-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--accent-dark);
    letter-spacing: 0.02em;
}

.chat-widget__info-header .chat-widget__info-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--muted);
    font-weight: 700;
}

.chat-widget__info-summary .chat-widget__info-title {
    font-size: 1.05rem;
    color: var(--text);
}

.chat-widget__info-subtitle {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(31, 47, 37, 0.7);
}

.chat-widget__info-meta {
    margin: 0;
    font-size: 0.75rem;
    color: rgba(37, 111, 69, 0.9);
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.chat-widget__info-details {
    list-style: none;
    margin: 0;
    padding: 0.75rem 1rem;
    display: grid;
    gap: 0.65rem;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(47, 157, 91, 0.12);
    border-radius: 0.9rem;
}

.chat-widget__info-detail {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.chat-widget__info-detail-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(95, 114, 102, 0.9);
    font-weight: 600;
}

.chat-widget__info-detail-value {
    font-size: 0.9rem;
    color: var(--text);
    font-weight: 500;
}

.chat-widget__participants {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    border-top: none;
    margin-top: 0;
    padding: 1rem;
    background: rgba(236, 246, 239, 0.55);
    border: 1px solid rgba(47, 157, 91, 0.14);
    border-radius: 1rem;
}

.chat-widget__participants-title {
    margin: 0;
    padding: 0;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(37, 111, 69, 0.8);
    font-weight: 700;
}

.chat-widget__participants-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.chat-widget__participant {
    padding: 0.5rem 0.75rem;
    border-top: none;
    border-bottom: none;
    background: rgba(255, 255, 255, 0.9);
    gap: 0.65rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(219, 232, 224, 0.9);
}

.chat-widget__participant:hover,
.chat-widget__participant:focus-visible {
    background: rgba(236, 246, 239, 0.9);
    border-color: rgba(47, 157, 91, 0.18);
}

.chat-widget__resizer {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: col-resize;
    background: var(--accent-soft);
    transition: background 0.2s ease;
    touch-action: none;
}

.chat-widget__resizer::before {
    content: "";
    width: 2px;
    height: 60%;
    background: rgba(47, 157, 91, 0.35);
}

.chat-widget__resizer:hover,
.chat-widget--resizing .chat-widget__resizer {
    background: rgba(47, 157, 91, 0.18);
}

.chat-widget__size-handle {
    position: absolute;
    top: -0.6rem;
    left: -0.6rem;
    width: 1.75rem;
    height: 1.75rem;
    background: var(--surface);
    border: 1px solid var(--bg-panel);
    box-shadow: 0 14px 24px rgba(47, 157, 91, 0.15);
    cursor: nwse-resize;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    touch-action: none;
    z-index: 5;
}

.chat-widget__size-handle::before {
    content: "";
    width: 0.75rem;
    height: 0.75rem;
    background-image: repeating-linear-gradient(135deg, currentColor 0, currentColor 1px, transparent 1px, transparent 3px);
}

.chat-widget__size-handle:hover,
.chat-widget--resizing .chat-widget__size-handle {
    background: var(--accent);
    border-color: var(--accent);
    color: #ffffff;
}

.chat-widget__placeholder {
    margin: 0 1rem 1rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.chat-widget__room {
    background: transparent;
    border: none;
    color: inherit;
    text-align: left;
    padding: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: background 0.2s ease, transform 0.2s ease;
}

.chat-widget__room:focus-visible {
    outline: 2px solid rgba(47, 157, 91, 0.6);
    outline-offset: 2px;
}

.chat-widget__room:hover,
.chat-widget__room--active {
    background: var(--accent-soft);
}

.chat-widget__room--unread .chat-widget__room-title {
    color: var(--text);
    font-weight: 700;
}

.chat-widget__room--readonly {
    opacity: 0.75;
}

.chat-widget__room-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.35rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.chat-widget__room-avatar {
    --chat-room-avatar-size: 2.75rem;
    --avatar-size: var(--chat-room-avatar-size);
    width: var(--chat-room-avatar-size);
    height: var(--chat-room-avatar-size);
    border-radius: 50%;
    overflow: visible;
    background: var(--chat-avatar-bg, var(--bg-muted));
    color: var(--chat-avatar-fg, var(--accent));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    flex-shrink: 0;
    font-size: calc(var(--chat-room-avatar-size) * 0.42);
    line-height: 1;
    position: relative;
}

.chat-widget__room-avatar--profile {
    --chat-avatar-bg: var(--profile-accent);
    --chat-avatar-fg: #ffffff;
}

.chat-widget__room-avatar--event {
    --chat-avatar-bg: var(--event-accent);
    --chat-avatar-fg: #ffffff;
}

.chat-widget__room-avatar--clan {
    --chat-avatar-bg: var(--clan-accent);
    --chat-avatar-fg: #ffffff;
}

.chat-widget__room-avatar--group {
    --chat-avatar-bg: var(--group-accent);
    --chat-avatar-fg: #ffffff;
}

.chat-widget__room-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}

.chat-widget__room-avatar-placeholder {
    font-size: inherit;
    color: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    line-height: 1;
}

.chat-widget__room-avatar-initials {
    font-size: inherit;
    color: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    line-height: 1;
}

.chat-widget__room-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
    flex: 1;
    min-width: 0;
}

.chat-widget__room-subtitle {
    font-size: 0.8rem;
    color: var(--muted);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-widget__room-title {
    font-weight: 600;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-widget__room-meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    width: 100%;
}

.chat-widget__room-last {
    font-size: 0.85rem;
    color: var(--muted);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
    flex: 1;
    min-width: 0;
}

.chat-widget__room-last--empty {
    color: var(--text-muted);
}

.chat-widget__room-unread {
    background: var(--accent);
    color: #fff;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    padding: 0.2rem 0.45rem;
    min-width: 1.5rem;
    text-align: center;
}

.chat-widget__conversation {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    min-height: 0;
}

.chat-widget__conversation--readonly {
    background: linear-gradient(180deg, rgba(15, 27, 18, 0.16), transparent 28%), var(--surface);
}

.chat-widget__conversation--readonly .chat-widget__form,
.chat-widget__conversation--readonly .chat-widget__draft-attachments {
    opacity: 0.6;
    pointer-events: none;
}

.chat-widget__messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: grid;
    gap: 0.75rem;
    align-content: start;
    align-items: start;
    min-height: 0;
}

.chat-widget__message {
    display: flex;
}

.chat-widget__message--request {
    justify-content: flex-start;
}

.chat-widget__request {
    display: grid;
    gap: 0.75rem;
    width: min(420px, 100%);
    background: var(--surface-alt);
    border: 1px solid var(--bg-panel);
    border-radius: 0.9rem;
    padding: 1rem 1.1rem;
    box-shadow: 0 12px 24px rgba(31, 47, 37, 0.08);
}

.chat-widget__request-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chat-widget__request-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-muted);
    color: var(--accent-dark);
    font-weight: 600;
    text-decoration: none;
}

.chat-widget__request-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.chat-widget__request-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 1;
    min-width: 0;
}

.chat-widget__request-author {
    font-weight: 600;
    color: var(--text);
    font-size: 0.95rem;
    line-height: 1.2;
}

.chat-widget__request-author a {
    color: inherit;
}

.chat-widget__request-author a:hover,
.chat-widget__request-author a:focus-visible {
    text-decoration: underline;
}

.chat-widget__request-meta {
    font-size: 0.8rem;
    color: var(--muted);
}

.chat-widget__request-status {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: var(--bg-muted);
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.chat-widget__request-status--pending {
    background: var(--accent-soft);
    color: var(--accent-dark);
}

.chat-widget__request-status--accepted {
    background: rgba(47, 157, 91, 0.15);
    color: var(--accent-dark);
}

.chat-widget__request-status--declined {
    background: rgba(231, 91, 74, 0.15);
    color: var(--danger);
}

.chat-widget__request-text {
    background: #ffffff;
    border-radius: 0.75rem;
    border: 1px solid var(--bg-panel);
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
    color: var(--text);
    white-space: pre-wrap;
    word-break: break-word;
}

.chat-widget__request-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.chat-widget__request-button {
    padding: 0.55rem 1.2rem;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.chat-widget__request-button:disabled {
    opacity: 0.6;
    cursor: default;
}

.chat-widget__request-button--accept {
    background: var(--accent);
    color: #ffffff;
    box-shadow: 0 8px 16px rgba(47, 157, 91, 0.25);
}

.chat-widget__request-button--accept:hover:not(:disabled),
.chat-widget__request-button--accept:focus-visible:not(:disabled) {
    background: var(--accent-dark);
    outline: none;
}

.chat-widget__request-button--decline {
    background: transparent;
    color: var(--danger);
    border: 1px solid var(--danger);
}

.chat-widget__request-button--decline:hover:not(:disabled),
.chat-widget__request-button--decline:focus-visible:not(:disabled) {
    background: rgba(231, 91, 74, 0.12);
    outline: none;
}

.chat-widget__request-footer {
    display: flex;
    justify-content: flex-end;
}

.chat-widget__message--system {
    justify-content: center;
}

.chat-widget__message--own {
    justify-content: flex-end;
}

.chat-widget__system-text {
    font-size: 0.85rem;
    color: var(--muted);
    text-align: center;
}

.chat-widget__bubble {
    background: var(--surface-alt);
    padding: 0.75rem 0.9rem;
    max-width: 80%;
    display: grid;
    gap: 0.35rem;
}

.chat-widget__message--own .chat-widget__bubble {
    background: var(--accent);
    color: #ffffff;
}

.chat-widget__message--own .chat-widget__text {
    color: #ffffff;
}

.chat-widget__message--own .chat-widget__meta {
    color: rgba(255, 255, 255, 0.75);
}

.chat-widget__text {
    white-space: pre-wrap;
    word-break: break-word;
}

.chat-widget__meta {
    font-size: 0.75rem;
    color: var(--muted);
    text-align: right;
}

.chat-widget__form {
    border-top: 1px solid var(--bg-panel);
    padding: 0;
    display: flex;
    align-items: flex-end;
}

.chat-widget__draft-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem 1rem 0;
}

.chat-widget__draft-attachment {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem 0.35rem 0.35rem;
    border-radius: 0.75rem;
    background: var(--surface);
    border: 1px solid var(--bg-panel);
    box-shadow: 0 4px 12px rgba(15, 35, 24, 0.08);
    max-width: 100%;
}

.chat-widget__draft-attachment-preview {
    flex: 0 0 auto;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.6rem;
    overflow: hidden;
    background: var(--bg-panel);
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-widget__draft-attachment-preview img,
.chat-widget__draft-attachment-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-widget__draft-attachment-preview--file {
    color: var(--accent);
    font-size: 1.25rem;
}

.chat-widget__draft-attachment-name {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.875rem;
    color: var(--text);
    line-height: 1.3;
    word-break: break-word;
}

.chat-widget__draft-attachment-remove {
    border: 0;
    background: none;
    color: var(--muted);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 999px;
    flex: 0 0 auto;
}

.chat-widget__draft-attachment-remove:hover,
.chat-widget__draft-attachment-remove:focus-visible {
    color: var(--accent);
    outline: none;
    background: rgba(47, 157, 91, 0.1);
}

.chat-widget__draft-attachment-remove .material-symbols-rounded {
    font-size: 1.25rem;
    line-height: 1;
}

.chat-widget__form--disabled {
    opacity: 0.6;
}

.chat-widget__form--uploading {
    position: relative;
}

.chat-widget__form--uploading::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.35);
    pointer-events: none;
    border-radius: 0.75rem;
}

.chat-widget__attach {
    position: relative;
    z-index: 10;
}

.chat-widget__attach-toggle {
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    background: var(--surface);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.chat-widget__attach-toggle:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    box-shadow: none;
}

.chat-widget__attach-toggle:not(:disabled):hover,
.chat-widget__attach-toggle:not(:disabled):focus-visible {
    outline: none;
}

.chat-widget__attach-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.chat-widget__attach-menu {
    position: absolute;
    bottom: calc(100% + 0.5rem);
    left: 50%;
    transform: translateX(-50%);
    display: none;
    flex-direction: column;
    gap: 0.25rem;
    background: var(--surface);
    border: 1px solid var(--bg-panel);
    border-radius: 0.75rem;
    padding: 0.5rem;
    box-shadow: 0 18px 32px rgba(16, 24, 40, 0.18);
    z-index: 20;
}

.chat-widget__attach-menu.chat-widget__attach-menu--open {
    display: flex;
}

.chat-widget__attach-option {
    background: none;
    border: none;
    padding: 0.4rem 0.75rem;
    border-radius: 0.5rem;
    text-align: left;
    font: inherit;
    color: var(--text);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.chat-widget__attach-option:hover,
.chat-widget__attach-option:focus-visible {
    background: rgba(47, 157, 91, 0.12);
    outline: none;
}

.chat-widget__input {
    flex: 1;
    resize: none;
    padding: 0.75rem;
    border: 0;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    min-height: 2.75rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
}

.chat-widget__input:focus {
    outline: none;
    border-color: var(--accent);
}

.chat-widget__send {
    background: transparent;
    color: #333;
    border: none;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chat-widget__send:hover:not(:disabled) {
}

.chat-widget__send:disabled {
    cursor: not-allowed;
    opacity: 0.6;
    box-shadow: none;
}

.chat-widget__send-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.chat-widget__attachments {
    display: grid;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.chat-widget__attachments--collage {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-flow: dense;
    grid-auto-rows: minmax(7.5rem, auto);
    gap: 0.25rem;
    max-width: min(320px, 70vw);
}

.chat-widget__attachment {
    overflow: hidden;
    border-radius: 0.75rem;
}

.chat-widget__attachment--collage-item {
    position: relative;
    border-radius: 0.75rem;
}

.chat-widget__attachment--clickable {
    cursor: zoom-in;
}

.chat-widget__attachment--clickable:focus,
.chat-widget__attachment--clickable:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.chat-widget__attachment img,
.chat-widget__attachment video {
    display: block;
    width: 100%;
    max-width: min(320px, 70vw);
    border-radius: 0.75rem;
}

.chat-widget__attachments--collage .chat-widget__attachment--collage-item img {
    height: 100%;
    max-width: none;
    border-radius: inherit;
    object-fit: cover;
}

.chat-widget__attachments--collage[data-collage-count="2"] .chat-widget__attachment--collage-item,
.chat-widget__attachments--collage[data-collage-count="4"] .chat-widget__attachment--collage-item,
.chat-widget__attachments--collage[data-collage-count="4"] .chat-widget__attachment--collage-item:nth-child(n + 5) {
    aspect-ratio: 1;
}

.chat-widget__attachments--collage[data-collage-count="3"] .chat-widget__attachment--collage-item:first-child {
    grid-column: span 2;
    aspect-ratio: 16 / 9;
}

.chat-widget__attachments--collage[data-collage-count="3"] .chat-widget__attachment--collage-item:not(:first-child) {
    aspect-ratio: 1;
}

.chat-widget__attachments--collage[data-collage-total] .chat-widget__attachment--collage-item:nth-child(n + 5) {
    aspect-ratio: 1;
}

.chat-widget__attachment--file {
    background: var(--surface);
    border: 1px solid var(--bg-panel);
    padding: 0.6rem 0.85rem;
}

.chat-widget__attachment-link {
    color: var(--accent);
    text-decoration: none;
    word-break: break-word;
}

.chat-widget__attachment-link:hover,
.chat-widget__attachment-link:focus-visible {
    text-decoration: underline;
    outline: none;
}

.chat-widget--resizing {
    cursor: var(--chat-widget-resize-cursor, col-resize);
    user-select: none;
}

.chat-widget--resizing * {
    cursor: inherit;
}

.media-viewer-open {
    overflow: hidden;
}

.media-viewer[hidden] {
    display: none;
}

.media-viewer {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: 1000;
}

.media-viewer__dialog {
    position: relative;
    max-width: min(90vw, 960px);
    max-height: 90vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: #fff;
}

.media-viewer__close {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    color: inherit;
    border-radius: 999px;
    padding: 0.25rem;
    cursor: pointer;
}

.media-viewer__close:hover,
.media-viewer__close:focus-visible {
    background: rgba(255, 255, 255, 0.2);
    outline: none;
}

.media-viewer__content {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.media-viewer__image-wrapper {
    justify-self: center;
    max-width: 100%;
    max-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-viewer__image {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 1rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.media-viewer__nav {
    border: none;
    background: rgba(0, 0, 0, 0.5);
    color: inherit;
    border-radius: 50%;
    width: 2.75rem;
    height: 2.75rem;
    display: grid;
    place-items: center;
    cursor: pointer;
}

.media-viewer__nav:hover,
.media-viewer__nav:focus-visible {
    background: rgba(255, 255, 255, 0.2);
    outline: none;
}

.media-viewer__nav--hidden {
    visibility: hidden;
}

.media-viewer__footer {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.875rem;
}

.media-viewer__caption {
    margin: 0;
    flex: 1;
    color: rgba(255, 255, 255, 0.85);
}

.media-viewer__counter {
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 640px) {
    .media-viewer {
        padding: 1rem;
    }

    .media-viewer__content {
        gap: 0.5rem;
    }

    .media-viewer__nav {
        width: 2.25rem;
        height: 2.25rem;
    }

    .media-viewer__image {
        border-radius: 0.75rem;
    }
}

@media (max-width: 720px) {
    .chat-widget__body {
        grid-template-columns: 1fr;
    }

    .chat-widget--info-open .chat-widget__body {
        grid-template-columns: 1fr;
    }

    .chat-widget__rooms {
        display: none;
    }

    .chat-widget__resizer {
        display: none;
    }

    .chat-widget__size-handle {
        display: none;
    }

    .chat-widget {
        --chat-widget-width: min(360px, 92vw);
        --chat-widget-height: min(520px, 80vh);
        min-width: min(360px, 92vw);
        min-height: min(360px, 60vh);
    }

    .chat-widget__info {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(300px, 86vw);
        max-width: 100%;
        box-shadow: -12px 0 32px rgba(23, 35, 32, 0.12);
        z-index: 5;
    }
}

.discovery {
    flex: 1;
    width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: clamp(0.5rem, 2vh, 2rem);
    background: var(--surface);
}

.discovery__stage {
    position: relative;
    background: var(--surface);
    --discovery-actions-size: clamp(3.25rem, 8vw, 4.25rem);
    --discovery-actions-gap: clamp(0.75rem, 2vh, 1.5rem);
    --discovery-stage-padding: clamp(1rem, 3vh, 2.25rem);
    padding: var(--discovery-stage-padding);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--discovery-actions-gap);
    width: min(1024px, 100%);
    min-height: clamp(360px, 68vh, 640px);
    max-height: min(680px, 100%);
    border-radius: var(--radius-panel);
    border: 1px solid rgba(15, 23, 42, 0.06);
}

.discovery__card {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;
    min-height: 0;
    align-self: stretch;
    position: relative;
}

.discovery-card {
    width: min(860px, 100%);
    height: clamp(420px, 62vh, 620px);
    background: var(--surface);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    border-radius: var(--radius-panel);
    border: 1px solid var(--bg-panel);
}

.discovery-card--event {
    background: var(--surface);
}

.discovery-card__visual {
    background: var(--bg-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    grid-row: 1 / 2;
    grid-column: 1 / 2;
    min-height: 0;
    overflow: hidden;
    align-self: stretch;
    position: relative;
}

.discovery-card__visual img {
    width: clamp(160px, 48%, 260px);
    aspect-ratio: 1;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: none;
}

.discovery-card--event .discovery-card__visual {
    background: var(--bg-muted);
}

.discovery-card__placeholder {
    width: clamp(160px, 48%, 240px);
    aspect-ratio: 1;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    color: var(--accent);
    font-size: clamp(2.75rem, 6vw, 3.75rem);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.18);
}

.discovery-card__placeholder--event {
    background: rgba(255, 255, 255, 0.88);
    color: #2360a3;
}

.discovery-card__content {
    padding: clamp(1.75rem, 4vw, 2.5rem);
    display: flex;
    flex-direction: column;
    gap: clamp(1rem, 2vh, 1.5rem);
    grid-row: 1 / 2;
    grid-column: 2 / 3;
    min-width: 0;
    min-height: 0;
    background: var(--surface);
}

.discovery-card__content-scroll {
    display: grid;
    gap: 1rem;
    min-height: 0;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.discovery-card__header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.discovery-card__title {
    margin: 0;
    font-size: clamp(1.6rem, 4vw, 2rem);
}

.discovery-card__meta {
    color: var(--muted);
    font-size: 0.95rem;
}

.discovery-card__description {
    margin: 0;
    color: var(--text);
    line-height: 1.6;
}

.discovery-card__section {
    margin-top: 1.25rem;
}

.discovery-card__section-title {
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0 0 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
}

.discovery-card__clans {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.discovery-card__clan {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.discovery-card__clan-name {
    color: inherit;
    font-weight: 600;
    text-decoration: none;
}

.discovery-card__clan-name:hover,
.discovery-card__clan-name:focus-visible {
    color: var(--accent);
    text-decoration: underline;
}

.discovery-card__clan-role {
    font-size: 0.8rem;
    color: var(--muted);
}

.discovery-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.discovery-card__tag {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    background: var(--accent-soft);
    font-size: 0.85rem;
    color: var(--accent);
}

.discovery-card__footer {
    display: flex;
    justify-content: flex-start;
    margin-top: auto;
}

.discovery__actions {
    width: min(820px, 100%);
    display: flex;
    gap: var(--discovery-actions-gap);
    justify-content: center;
    align-items: center;
    margin-top: auto;
}

.discovery__button {
    border: 1px solid var(--bg-panel);
    width: clamp(3.25rem, 8vw, 4.25rem);
    height: clamp(3.25rem, 8vw, 4.25rem);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1.5rem, 4vw, 1.85rem);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    box-shadow: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease, background-color 0.2s ease;
}

.discovery__actions .discovery__button {
    border-radius: 50%;
}

.discovery__button:hover:not(:disabled),
.discovery__button:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
    outline: none;
}

.discovery__button:disabled {
    cursor: not-allowed;
    filter: grayscale(0.35);
    box-shadow: none;
}

.discovery__button span[aria-hidden="true"] {
    line-height: 1;
}

.discovery__button-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: clamp(1.5rem, 4vw, 1.85rem);
    height: clamp(1.5rem, 4vw, 1.85rem);
}

.discovery__button-icon .material-symbols-rounded {
    font-size: inherit;
}

.discovery__button--contact {
    background: var(--accent);
    border-color: var(--accent);
    color: #ffffff;
}

.discovery__button--pass {
    background: var(--bg-muted);
    color: var(--muted);
}

.discovery__button--refresh {
    background: var(--surface);
    color: var(--accent-dark);
}

.discovery__button--secondary {
    background: var(--surface);
}

.discovery__empty {
    text-align: center;
    margin: 0;
    max-width: 420px;
}

.discovery__contact {
    position: absolute;
    inset: 0;
    background: rgba(28, 55, 41, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    backdrop-filter: blur(6px);
    border-radius: inherit;
}

.discovery__contact[hidden] {
    display: none !important;
}

.discovery__contact-content {
    background: var(--surface);
    padding: clamp(1.5rem, 4vw, 2.5rem);
    max-width: 420px;
    text-align: center;
    box-shadow: 0 24px 56px rgba(31, 47, 37, 0.24);
    border-radius: var(--radius-panel);
}

.discovery__contact-content h2 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: clamp(1.6rem, 4vw, 2rem);
}

.discovery__contact-content p {
    margin: 0 0 1.5rem;
    color: var(--muted);
}

.discovery__contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.profile {
    display: grid;
    gap: clamp(2rem, 5vw, 3rem);
}

.profile__hero {
    position: relative;
    padding: clamp(1.75rem, 4vw, 3rem);
    background: radial-gradient(120% 180% at 10% 10%, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0) 42%),
        linear-gradient(135deg, #2f9d5b 0%, #238048 45%, #134327 100%);
    color: #ffffff;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(19, 50, 33, 0.35);
    border-radius: var(--radius-panel);
}

.profile--event .profile__hero {
    background: radial-gradient(140% 200% at 15% 15%, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 38%),
        linear-gradient(135deg, #2f6dff 0%, #234fdc 45%, #162a7b 100%);
}

.profile--clan .profile__hero {
    background: radial-gradient(140% 200% at 15% 15%, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 42%),
        linear-gradient(135deg, #f97316 0%, #ef6c00 45%, #b34700 100%);
}

.profile--event .profile__badge {
    background: rgba(255, 255, 255, 0.24);
}

.profile--event .profile__subtitle {
    color: rgba(255, 255, 255, 0.88);
}

.profile__card {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: clamp(1.75rem, 4vw, 3rem);
}

.profile__photo-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    min-width: 180px;
}

.avatar--xl {
    --avatar-size: clamp(160px, 28vw, 220px);
    width: var(--avatar-size);
    height: var(--avatar-size);
    border: 6px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 24px 48px rgba(6, 24, 12, 0.45);
}

.profile__photo-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    width: clamp(160px, 28vw, 220px);
    max-width: 100%;
}

.profile__photo-actions .button {
    width: 100%;
}

.profile__photo-upload {
    position: relative;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    overflow: hidden;
    cursor: pointer;
    text-align: center;
}

.profile__photo-remove {
    width: 100%;
}

.profile__photo-input-wrapper {
    display: contents;
}

.profile__photo-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 1;
}

.profile__photo-hint {
    font-size: 0.9rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.78);
}

.profile__photo-clear {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.profile__info {
    flex: 1 1 320px;
    display: grid;
    gap: 1rem;
    min-width: 0;
}

.profile__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.85rem;
    background: rgba(255, 255, 255, 0.18);
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 600;
}

.profile__badge a {
    color: inherit;
}

.profile__badge--clan {
    gap: 0.5rem;
    font-size: 0.9rem;
    letter-spacing: 0;
    text-transform: none;
}

.profile__badge-clan {
    font-weight: 600;
}

.profile__badge-role {
    font-weight: 500;
    font-size: 0.85rem;
    letter-spacing: 0.02em;
    text-transform: none;
    opacity: 0.9;
}

.profile__badge-separator {
    opacity: 0.6;
    font-size: 0.6rem;
}

.profile__title {
    margin: 0;
    font-size: clamp(2.1rem, 4vw, 2.9rem);
}

.profile__subtitle {
    margin: 0;
    font-size: clamp(1.05rem, 2.2vw, 1.25rem);
    color: rgba(255, 255, 255, 0.82);
    max-width: 460px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.profile__summary {
    display: grid;
    gap: 0.4rem;
}

.profile__name {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: baseline;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.profile__age {
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.18);
    font-size: 1rem;
}

.profile__location {
    margin: 0;
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.82);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.profile__bio {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.6;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.profile__bio--muted {
    color: rgba(255, 255, 255, 0.72);
}

.profile__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.profile__tags--inline {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.35rem;
}

.profile__tags--inline .profile__tag {
    background: var(--surface-alt);
    color: var(--accent);
}

.profile__tag {
    padding: 0.4rem 0.85rem;
    background: rgba(255, 255, 255, 0.16);
    font-weight: 600;
    letter-spacing: 0.04em;
}

.profile__stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin: 1rem 0 0;
}

.profile__stat {
    display: grid;
    gap: 0.35rem;
}

.profile__stat-label {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.68);
}

.profile__stat-number {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2rem);
    font-weight: 700;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.profile__stat-number--compact {
    font-size: clamp(1.1rem, 2.4vw, 1.45rem);
    font-weight: 600;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.profile__stat-number--compact a {
    color: inherit;
    text-decoration: underline;
}

.profile__stat-placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.profile__content {
    display: grid;
    gap: clamp(1.5rem, 4vw, 2.5rem);
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    align-items: start;
    padding: 0 1.1rem;
}

.profile__album-card {
    background: var(--surface);
    padding: clamp(1.35rem, 3vw, 2.1rem);
    border-radius: 1.5rem;
    box-shadow: 0 24px 48px rgba(31, 47, 37, 0.12);
    display: grid;
    gap: clamp(1rem, 2vw, 1.5rem);
    grid-column: 1 / -1;
}

.profile--event .profile__album-card {
    box-shadow: 0 24px 48px rgba(47, 109, 255, 0.18);
}

.profile--clan .profile__album-card {
    box-shadow: 0 24px 48px rgba(179, 71, 0, 0.18);
}

.profile__album-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.profile__album-title {
    margin: 0;
    font-size: clamp(1.35rem, 3vw, 1.8rem);
}

.profile__album-counter {
    font-weight: 600;
    color: var(--muted);
}

.profile__album-empty {
    margin: 0;
    color: var(--muted);
}

.photo-carousel {
    position: relative;
    display: grid;
    gap: 1rem;
}

.photo-carousel__viewport {
    overflow-x: auto;
    overflow-y: hidden;
    border-radius: 1.25rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    background: var(--surface-alt);
    padding: 0.75rem 0;
}

.photo-carousel__viewport::-webkit-scrollbar {
    display: none;
}

.photo-carousel__track {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    gap: 1rem;
}

.photo-carousel__slide {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    scroll-snap-align: start;
}

.photo-carousel__preview {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
}

.photo-carousel__preview:focus-visible {
    outline: none;
}

.photo-carousel__image {
    display: block;
    height: clamp(180px, 24vw, 280px);
    width: auto;
    max-width: min(100%, clamp(180px, 30vw, 360px));
    object-fit: contain;
    border-radius: 1.25rem;
    box-shadow: 0 24px 48px rgba(31, 47, 37, 0.16);
    transition: transform 0.2s ease;
}

.photo-carousel__preview:hover .photo-carousel__image,
.photo-carousel__preview:focus-visible .photo-carousel__image {
    transform: translateY(-2px);
}

.photo-carousel__preview-icon {
    position: absolute;
    right: 0.75rem;
    bottom: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.58);
    color: #ffffff;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.photo-carousel__preview:hover .photo-carousel__preview-icon,
.photo-carousel__preview:focus-visible .photo-carousel__preview-icon {
    transform: scale(1.05);
    opacity: 0.92;
}

.photo-carousel__controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
}

.photo-carousel__nav {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    border: none;
    background: rgba(47, 157, 91, 0.12);
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.photo-carousel__nav:hover:not(:disabled),
.photo-carousel__nav:focus-visible:not(:disabled) {
    background: rgba(47, 157, 91, 0.18);
    transform: translateY(-1px);
}

.photo-carousel__nav:disabled {
    opacity: 0.32;
    cursor: not-allowed;
}

.profile--event .photo-carousel__nav {
    background: rgba(47, 109, 255, 0.12);
    color: #2f6dff;
}

.profile--event .photo-carousel__nav:hover:not(:disabled),
.profile--event .photo-carousel__nav:focus-visible:not(:disabled) {
    background: rgba(47, 109, 255, 0.2);
}

.profile--clan .photo-carousel__nav {
    background: rgba(249, 115, 22, 0.12);
    color: #ef6c00;
}

.profile--clan .photo-carousel__nav:hover:not(:disabled),
.profile--clan .photo-carousel__nav:focus-visible:not(:disabled) {
    background: rgba(249, 115, 22, 0.2);
}

.photo-carousel__status {
    font-weight: 600;
    color: var(--muted);
}

.photo-carousel__dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.photo-carousel__dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    border: none;
    background: rgba(47, 157, 91, 0.2);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.photo-carousel__dot--active {
    background: var(--accent);
    transform: scale(1.2);
}

.profile--event .photo-carousel__dot {
    background: rgba(47, 109, 255, 0.2);
}

.profile--event .photo-carousel__dot--active {
    background: #2f6dff;
}

.profile--clan .photo-carousel__dot {
    background: rgba(249, 115, 22, 0.2);
}

.profile--clan .photo-carousel__dot--active {
    background: #ef6c00;
}

.photo-carousel--single .photo-carousel__dots {
    display: none;
}

.photo-carousel__upload {
    border-top: 1px solid var(--bg-panel);
    padding-top: 1rem;
    display: grid;
    gap: 0.75rem;
}

.photo-carousel__upload-label {
    font-weight: 600;
}

.photo-carousel__upload-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.photo-carousel__upload-input {
    flex: 1 1 220px;
}

.photo-carousel__upload-button {
    flex: 0 0 auto;
}

.photo-carousel__hint {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

@media (max-width: 900px) {
    .profile__content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .profile__album-card {
        padding: 1.15rem;
    }

    .photo-carousel__image {
        height: clamp(160px, 54vw, 220px);
        max-width: min(100%, clamp(160px, 60vw, 260px));
    }

    .photo-carousel__controls {
        justify-content: space-between;
    }

    .photo-carousel__nav {
        width: 2.6rem;
        height: 2.6rem;
    }
}

.profile__form-card,
.profile__events-card,
.profile__contacts-card,
.profile__clans-card,
.profile__achievements-card {
    background: var(--surface);
    padding: clamp(1.5rem, 3vw, 2.25rem);
    box-shadow: 0 24px 48px rgba(31, 47, 37, 0.12);
}

.profile__form-card h2,
.profile__form-card p,
.profile__form-card form {
    margin: 0;
}

.profile__form-hint {
    color: var(--muted);
    margin-top: 0.35rem !important;
}

.profile__form {
    margin-top: 1.5rem;
    display: grid;
    gap: 1.5rem;
}

.profile__form-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr);
}

.profile__form-field {
    background: var(--surface-alt);
    padding: 1rem 1.25rem;
    border: 1px solid var(--bg-panel);
    gap: 0.6rem;
    box-shadow: inset 0 0 0 1px rgba(47, 157, 91, 0.06);
}

.profile__form-field small {
    color: var(--muted);
}

.profile__form-field .input,
.profile__form-field .textarea,
.profile__form-field select.input {
    border: 1px solid transparent;
    background: var(--surface);
    box-shadow: 0 8px 20px rgba(31, 47, 37, 0.06);
}

.profile__checkbox {
    width: auto;
    height: auto;
    align-self: flex-start;
    margin-top: 0.25rem;
}

.tag-input {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.tag-input__body {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
    padding: 0.6rem 0.75rem;
    background: var(--surface);
    border: 1px solid rgba(31, 47, 37, 0.14);
    min-height: 2.75rem;
    border-radius: 0.85rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    cursor: text;
}

.tag-input__body:hover {
    border-color: rgba(31, 47, 37, 0.28);
}

.tag-input__body--focused {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(47, 157, 91, 0.18);
}

.tag-input--open .tag-input__body {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(47, 157, 91, 0.18);
}

.tag-input__body--filled {
    background: var(--surface-alt);
}

.tag-input__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tag-input__dropdown {
    position: absolute;
    z-index: 15;
    top: calc(100% + 0.35rem);
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1px solid rgba(31, 47, 37, 0.12);
    border-radius: 1rem;
    box-shadow: 0 20px 36px rgba(31, 47, 37, 0.16);
    padding: 0.35rem;
}

.tag-input__options {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 18rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.tag-input__option {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.55rem 0.85rem;
    border-radius: 0.7rem;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    color: inherit;
}

.tag-input__option:hover,
.tag-input__option:focus {
    background: rgba(47, 157, 91, 0.1);
    color: var(--accent);
}

.tag-input__option--active {
    background: rgba(47, 157, 91, 0.18);
    color: var(--accent);
    box-shadow: inset 0 0 0 1px rgba(47, 157, 91, 0.4);
}

.tag-input__option--create {
    font-weight: 600;
}

.profile__feed-card {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}


.profile__composer-form {
    display: grid;
    gap: 0.75rem;
}

.profile__feed-card--event {
    background: var(--surface);
    padding: clamp(1.5rem, 3vw, 2.25rem);
    box-shadow: 0 24px 48px rgba(31, 47, 37, 0.12);
    border-radius: var(--radius-panel);
}

.profile__feed-card--tasks {
    gap: 1.25rem;
    grid-column: 1 / -1;
}

.event-tasks {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.event-tasks__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.event-tasks__title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 600;
}

.event-tasks__feedback {
    margin: 0;
}

.event-tasks__feedback[hidden] {
    display: none !important;
}

.event-tasks__scroller {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.event-tasks__scroller::-webkit-scrollbar {
    height: 6px;
}

.event-tasks__scroller::-webkit-scrollbar-thumb {
    background: rgba(47, 157, 91, 0.35);
    border-radius: 999px;
}

.event-tasks__column {
    flex: 0 0 18.5rem;
    background: var(--surface-alt);
    border: 1px solid rgba(31, 47, 37, 0.08);
    border-radius: var(--radius-panel);
    display: flex;
    flex-direction: column;
    max-height: 28rem;
    box-shadow: 0 18px 36px rgba(31, 47, 37, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.event-tasks__column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 1rem 1.1rem 0.5rem;
}

.event-tasks__column-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
}

.event-tasks__column-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    background: rgba(47, 157, 91, 0.12);
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 600;
}

.event-tasks__column-body {
    flex: 1;
    padding: 0.85rem 1.1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow-y: auto;
    max-height: 24rem;
    transition: background 0.2s ease, border 0.2s ease;
}

.event-tasks__column-body--dragover {
    background: rgba(47, 157, 91, 0.08);
    box-shadow: inset 0 0 0 1px rgba(47, 157, 91, 0.3);
}

.event-task-card {
    background: var(--surface);
    border: 1px solid rgba(31, 47, 37, 0.08);
    border-radius: 1rem;
    padding: 0.85rem 1rem;
    display: grid;
    gap: 0.5rem;
    box-shadow: 0 14px 24px rgba(31, 47, 37, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.event-task-card:hover,
.event-task-card:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 20px 32px rgba(31, 47, 37, 0.16);
}

.event-task-card--readonly {
    cursor: default;
}

.event-task-card--dragging {
    opacity: 0.65;
    transform: scale(0.98);
    box-shadow: 0 12px 24px rgba(31, 47, 37, 0.2);
}

.event-task-card__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.event-task-card__description {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.4;
}

.event-task-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--muted);
}

.event-task-card__assignee {
    font-weight: 600;
    color: var(--accent);
}

.profile__feed-card--clan {
    background: var(--surface);
    padding: clamp(1.5rem, 3vw, 2.25rem);
    box-shadow: 0 24px 48px rgba(179, 71, 0, 0.12);
    border-radius: var(--radius-panel);
}

.clan-events {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: clamp(0.85rem, 2vw, 1.25rem);
}

.clan-events__item {
    border: 1px solid rgba(47, 109, 255, 0.12);
    background: var(--surface);
    border-radius: var(--radius-panel);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.clan-events__link {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: clamp(1rem, 2vw, 1.5rem);
    align-items: center;
    padding: clamp(1rem, 2.5vw, 1.5rem);
    color: inherit;
    text-decoration: none;
}

.clan-events__item:hover,
.clan-events__item:focus-within {
    transform: translateY(-2px);
    box-shadow: 0 18px 32px rgba(31, 47, 37, 0.12);
    border-color: rgba(47, 109, 255, 0.24);
}

.clan-events__link:focus-visible {
    outline: none;
}

.clan-events__link:focus-visible .clan-events__cta {
    box-shadow: 0 0 0 3px rgba(47, 109, 255, 0.24);
}

.clan-events__media {
    display: flex;
    align-items: center;
    justify-content: center;
}

.clan-events__avatar {
    --avatar-size: clamp(64px, 12vw, 84px);
    width: var(--avatar-size);
    height: var(--avatar-size);
    border: 4px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 20px 36px rgba(47, 109, 255, 0.18);
}

.clan-events__content {
    display: grid;
    gap: 0.65rem;
}

.clan-events__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.clan-events__title {
    margin: 0;
    font-size: 1.05rem;
    color: var(--text);
}

.clan-events__date {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: var(--event-accent-soft);
    color: var(--event-accent);
    font-size: 0.9rem;
    font-weight: 600;
}

.clan-events__meta {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--muted);
    font-size: 0.95rem;
}

.clan-events__meta .material-symbols-rounded {
    font-size: 1.1rem;
}

.clan-events__description {
    margin: 0;
    color: var(--text);
    line-height: 1.55;
}

.clan-events__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    background: rgba(47, 109, 255, 0.1);
    color: var(--event-accent);
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease;
}

.clan-events__item:hover .clan-events__cta,
.clan-events__item:focus-within .clan-events__cta {
    background: var(--event-accent);
    color: #ffffff;
}

.clan-events__cta .material-symbols-rounded {
    font-size: 1.1rem;
}

@media (max-width: 720px) {
    .clan-events__link {
        grid-template-columns: auto 1fr;
        grid-template-rows: auto auto;
    }

    .clan-events__cta {
        grid-column: 1 / -1;
        justify-self: flex-start;
        margin-top: 0.75rem;
    }
}

.profile__main-column {
    display: grid;
    gap: clamp(1.5rem, 3vw, 2rem);
}

.profile__clan-text {
    display: grid;
    gap: 1rem;
    color: var(--text);
    line-height: 1.65;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.profile__event-text {
    display: grid;
    gap: 1rem;
    color: var(--text);
    line-height: 1.65;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.profile__feed-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.profile__feed-header h2 {
    margin: 0 1.1rem;
}

.profile__feed-list {
    display: grid;
    gap: 0;
}

.profile__post .clan-post__author-info {
    gap: 0.35rem;
}

.profile__post-clan {
    display: block;
    font-size: 0.875rem;
    color: var(--muted);
}

.profile__post-clan a {
    color: inherit;
    text-decoration: underline;
}

.profile__post-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--muted);
}

.profile__post-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.profile__post-note {
    margin: 0.25rem 0 0.65rem;
    font-size: 0.85rem;
    color: var(--muted);
}

.profile__feed-empty {
    margin: 0;
}

.news-feed {
    display: grid;
    gap: clamp(1.5rem, 3vw, 2.5rem);
}

.news-feed__header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
}

.news-feed__intro {
    max-width: 36rem;
}

.news-feed__intro h1 {
    margin: 0;
    font-size: clamp(1.75rem, 4vw, 2.25rem);
}

.news-feed__intro p {
    margin: 0.35rem 0 0;
    line-height: 1.6;
}

.news-feed__filter {
    margin-left: auto;
    max-width: min(420px, 100%);
}

.news-feed__list {
    display: grid;
    gap: 1.5rem;
}

.news-feed__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.35rem 0 0;
    padding: 0;
    list-style: none;
}

.news-feed__badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    background: rgba(47, 157, 91, 0.12);
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.news-feed__badge--clan {
    background: rgba(47, 109, 255, 0.15);
    color: #2f6dff;
}

.news-feed__badge--event {
    background: rgba(255, 139, 46, 0.15);
    color: #ff8b2e;
}

.news-feed__empty {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
}

.news-feed__author-link {
    color: inherit;
    text-decoration: none;
}

.news-feed__author-link:hover,
.news-feed__author-link:focus {
    text-decoration: underline;
}

@media (max-width: 720px) {
    .news-feed__header {
        flex-direction: column;
        align-items: stretch;
    }

    .news-feed__filter {
        margin-left: 0;
        width: 100%;
    }
}

.tag-input__control-wrapper {
    flex: 1;
    min-width: 150px;
}

.tag-input__control {
    width: 100%;
    border: none;
    background: transparent;
    font: inherit;
    color: inherit;
    padding: 0.35rem 0.25rem;
}

.tag-input__control:focus {
    outline: none;
}

.tag-input__control::placeholder {
    color: rgba(31, 47, 37, 0.45);
}

.tag-input__tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    background: linear-gradient(135deg, rgba(47, 157, 91, 0.18), rgba(47, 157, 91, 0.08));
    color: var(--accent);
    border: 1px solid rgba(47, 157, 91, 0.25);
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.tag-input__tag-label {
    white-space: nowrap;
}

.tag-input__remove {
    border: none;
    background: rgba(47, 157, 91, 0.2);
    color: inherit;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1;
    padding: 0;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease;
}

.tag-input__remove:hover {
    background: var(--danger);
    color: #ffffff;
}

.tag-input__hint {
    color: var(--muted);
    font-size: 0.85rem;
}

.profile__form-field .input:focus,
.profile__form-field .textarea:focus,
.profile__form-field select.input:focus {
    border-color: var(--accent);
}

.profile__location-card {
    background: var(--surface-alt);
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--bg-panel);
    box-shadow: inset 0 0 0 1px rgba(47, 157, 91, 0.06);
    display: grid;
    gap: 1.25rem;
}

.profile__location-card-title {
    margin: 0;
    font-size: clamp(1.1rem, 2.4vw, 1.3rem);
    font-weight: 700;
}

.profile__location-card-description {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.profile__location-card-header {
    display: grid;
    gap: 0.35rem;
}

.profile__location-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.profile__location-widget {
    display: grid;
    gap: 0.75rem;
    background: var(--surface);
    padding: 1.25rem;
    border: 1px solid var(--bg-panel);
    box-shadow: 0 18px 38px rgba(31, 47, 37, 0.12);
}

.profile__location-map {
    width: 100%;
    min-height: 260px;
    overflow: hidden;
    box-shadow: 0 16px 32px rgba(31, 47, 37, 0.12);
}

.profile__location-map .leaflet-control-attribution {
    background: transparent;
    border: none;
    box-shadow: none;
    color: var(--muted);
}

.profile__location-map .leaflet-control-attribution a {
    color: inherit;
    text-decoration: underline;
}

/* Ограничиваем встроенные leaflet-изображения, чтобы иконки аварий в пинах не разъезжались */
.leaflet-container .leaflet-marker-pane img,
.leaflet-container .leaflet-shadow-pane img {
    width: 70% !important;
    height: 70% !important;
    max-width: 70% !important;
    max-height: 70% !important;
    object-fit: contain;
    display: block;
}

.location-marker {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.location-marker__pin {
    display: block;
    width: 24px;
    height: 24px;
    background: linear-gradient(180deg, #1f2f25 0%, #2f9d5b 100%);
    transform: rotate(45deg) translateY(2px);
    box-shadow: 0 6px 16px rgba(31, 47, 37, 0.28);
}

.profile__location-actions {
    display: grid;
    gap: 0.75rem;
}

.profile__location-search {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.profile__location-search .input {
    flex: 1 1 220px;
}

.profile__location-feedback {
    margin: 0;
    font-size: 0.9rem;
    color: var(--muted);
}

.profile__location-feedback[data-state="error"] {
    color: var(--danger);
}

.profile__location-feedback[data-state="success"] {
    color: var(--accent);
}

.profile__submit {
    justify-self: flex-start;
    margin-top: 0.5rem;
}

.profile__sidebar {
    display: grid;
    gap: clamp(1.25rem, 3vw, 1.75rem);
    align-content: start;
    align-items: start;
}

.profile__achievements-card {
    background: linear-gradient(145deg, rgba(47, 157, 91, 0.16), rgba(47, 157, 91, 0.04));
    border-radius: 1.25rem;
}

.profile__achievements-card--empty {
    background: var(--surface);
    border: 1px dashed rgba(47, 157, 91, 0.32);
}

.profile__achievements-header {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin-bottom: 1.2rem;
}

.profile__achievements-header h3 {
    margin: 0;
}

.profile__achievements-meta {
    margin: 0;
    font-size: 0.9rem;
    color: var(--muted);
}

.achievements-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.9rem;
}

.achievements-list__item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.9rem;
    align-items: center;
}

.achievement-badge {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: rgba(47, 157, 91, 0.14);
    display: grid;
    place-items: center;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(47, 157, 91, 0.18);
}

.achievement-badge__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.achievement-badge__fallback {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.achievement-badge__content {
    display: grid;
    gap: 0.25rem;
}

.achievement-badge__name {
    font-weight: 600;
}

.achievement-badge__description {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.achievements-list__empty {
    margin: 0;
    color: var(--muted);
}

.profile__events-card {
    background: linear-gradient(140deg, rgba(47, 157, 91, 0.14), rgba(47, 157, 91, 0.04));
}

.profile__events-card h3 {
    margin-top: 0;
    margin-bottom: 0.25rem;
}

.profile__events-count {
    margin: 0;
    font-size: clamp(2.4rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--accent);
}

.profile__events-caption {
    margin: 0 0 1.25rem;
    color: var(--muted);
}

.profile__actions {
    display: grid;
    gap: 0.75rem;
}

.profile__actions--inline {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.profile__actions--stacked {
    margin-top: 1rem;
}

.profile__clans-card h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.profile__clans-list {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
    display: grid;
    gap: 0.85rem;
}

.profile__clans-item {
    display: grid;
    gap: 0.2rem;
    padding: 0.85rem 1rem;
    background: var(--surface-alt);
}

.profile__clans-name {
    font-weight: 600;
    color: var(--text);
}

.profile__clans-role {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
}

.profile__clans-meta {
    font-size: 0.9rem;
    color: var(--muted);
}

.profile__clans-empty {
    margin: 0 0 1rem;
    color: var(--muted);
}

.profile__user-events-card h3 {
    margin-top: 0;
}

.profile__user-events-list {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
    display: grid;
    gap: 0.85rem;
}

.profile__user-events-item {
    padding: 0.85rem 1rem;
    background: var(--surface-alt);
}

.profile__user-event-name {
    display: inline-flex;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.35rem;
}

.profile__user-event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    font-size: 0.85rem;
    color: var(--muted);
}

.profile__user-event-meta-item {
    display: inline-flex;
    align-items: center;
}

.profile__user-event-meta-item + .profile__user-event-meta-item::before {
    content: "•";
    margin-right: 0.35rem;
    color: var(--muted);
}

.profile__user-events-empty {
    margin: 0 0 1rem;
    color: var(--muted);
}

.profile__contacts-card h3 {
    margin-top: 0;
}

.profile__contacts-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.profile__contacts-header h3 {
    margin: 0;
}

.profile__contact-list {
    list-style: none;
    margin: 1rem 0;
    padding: 0;
    display: grid;
    gap: 0.75rem;
}

.profile__contact-item {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: var(--surface-alt);
}

.profile__contact-label {
    font-weight: 600;
    color: var(--text);
}

.profile__contact-value {
    color: var(--muted);
    text-align: right;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.profile__contacts-hint {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.profile__contacts-hint--pending {
    color: rgba(255, 255, 255, 0.72);
}

.profile__contacts-hint--message {
    margin-top: 0.5rem;
}

.profile-contact-feedback {
    margin-top: 1rem;
}

.profile-contact-feedback .message {
    margin: 0;
}

.profile__contacts-card--clan {
    display: grid;
    gap: 1rem;
}

.profile__contacts-card--clan .profile__contact-item {
    background: rgba(249, 115, 22, 0.08);
    border: 1px solid rgba(249, 115, 22, 0.12);
}

.profile__contacts-card--clan .profile__contact-label {
    color: var(--clan-accent);
}

.profile__contacts-card--clan .profile__contact-value {
    color: var(--text);
}

.profile__contacts-card--clan .chip {
    justify-self: flex-start;
}

.profile__contacts-card--event {
    display: grid;
    gap: 1rem;
}

.profile__event-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.75rem;
}

.profile__event-list li {
    background: var(--surface-alt);
    padding: 0.75rem 1rem;
    border-radius: 0.9rem;
    color: var(--text);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.profile__event-list li.muted,
.profile__event-list li[data-response-empty] {
    background: none;
    padding: 0;
}

.profile__event-list--spacious li {
    padding: 1rem 1.15rem;
}

.profile__event-list--compact {
    gap: 0.6rem;
}

.profile__event-list--compact li {
    padding: 0.7rem 0.85rem;
}

.profile__event-response {
    display: grid;
    gap: 0.75rem;
}

.profile__event-response-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem;
    color: var(--muted);
}

.profile__event-response-meta strong {
    color: var(--text);
}

.profile__event-response-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.profile__event-responses {
    display: grid;
    gap: 1.25rem;
}

.profile__event-responses h4 {
    margin: 0;
    font-size: 1rem;
}

.profile__hint {
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.95rem;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.profile--event .profile__hint {
    color: rgba(255, 255, 255, 0.78);
}

.profile--clan .profile__hint {
    color: rgba(255, 255, 255, 0.85);
}

@media (max-width: 960px) {
    .profile__content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .profile__hero {
        padding: 1.5rem;
    }

    .profile__card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .profile__info {
        align-items: center;
    }

    .profile__tags {
        justify-content: center;
    }

    .profile__stats {
        width: 100%;
    }

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

    .profile__contact-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .profile__contact-value {
        text-align: left;
    }
}

@media (max-width: 720px) {
    .discovery {
        min-height: auto;
        align-items: stretch;
        padding: 1rem;
    }

    .discovery__stage {
        padding: 1.25rem;
        min-height: auto;
        width: 100%;
        max-height: none;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .discovery__intro {
        text-align: left;
    }

    .discovery__actions {
        gap: 1.25rem;
        width: 100%;
    }

    .discovery-card {
        width: 100%;
        height: auto;
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }

    .discovery-card__visual {
        min-height: 220px;
        order: 0;
        grid-column: 1 / -1;
    }

    .discovery-card__content {
        grid-column: 1 / -1;
        grid-row: auto;
    }

    .discovery-card__content-scroll {
        overflow: visible;
        padding-right: 0;
    }
}

@media (min-width: 1024px) {
    .discovery {
    }

    .discovery__stage {
        width: min(1080px, 92vw);
        min-height: clamp(520px, 70vh, 720px);
    }
}

@media (max-width: 1023px) {
    .discovery-card {
        width: min(680px, 100%);
        height: clamp(380px, 58vh, 540px);
        grid-template-columns: minmax(180px, 0.95fr) minmax(0, 1fr);
        grid-template-rows: minmax(0, 1fr);
    }

    .discovery-card__placeholder {
        width: clamp(120px, 50%, 200px);
    }
}

.notifications {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    padding: 3rem 0;
}

.notifications__header {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 48rem;
}

.notifications__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.9rem;
    font-size: 0.8rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--accent);
    background: rgba(47, 157, 91, 0.12);
    box-shadow: inset 0 0 0 1px rgba(47, 157, 91, 0.15);
}

.notifications__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.notifications__item {
    position: relative;
    display: flex;
    gap: 1.5rem;
    padding: 1.75rem 1.75rem;
    background: var(--surface);
    border: 1px solid rgba(47, 157, 91, 0.12);
    box-shadow: 0 24px 55px rgba(31, 47, 37, 0.1);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.notifications__item:hover {
    transform: translateY(-3px);
    box-shadow: 0 30px 65px rgba(31, 47, 37, 0.14);
}

.notifications__glow {
    position: absolute;
    inset: -40% -20% -40% -20%;
    background: radial-gradient(circle at top left, rgba(47, 157, 91, 0.18), transparent 55%),
        radial-gradient(circle at bottom right, rgba(61, 123, 246, 0.16), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.notifications__item:hover .notifications__glow,
.notifications__item--unread .notifications__glow {
    opacity: 1;
}

.notifications__item--unread {
    border-color: rgba(61, 123, 246, 0.28);
    box-shadow: 0 36px 80px rgba(61, 123, 246, 0.18);
}

.notifications__icon-wrapper {
    position: relative;
    z-index: 1;
    width: 3.25rem;
    height: 3.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(47, 157, 91, 0.12), rgba(47, 157, 91, 0.32));
    box-shadow: 0 10px 30px rgba(47, 157, 91, 0.25);
}

.notifications__icon-wrapper--contact_approved {
    background: linear-gradient(135deg, rgba(47, 157, 91, 0.2), rgba(47, 157, 91, 0.45));
    box-shadow: 0 12px 32px rgba(47, 157, 91, 0.28);
}
.notifications__icon-wrapper--contact_request {
    background: linear-gradient(135deg, rgba(255, 170, 43, 0.2), rgba(255, 138, 0, 0.4));
    box-shadow: 0 12px 32px rgba(255, 153, 0, 0.24);
}
.notifications__icon-wrapper--post_like {
    background: linear-gradient(135deg, rgba(237, 78, 104, 0.18), rgba(237, 78, 104, 0.4));
    box-shadow: 0 12px 32px rgba(237, 78, 104, 0.24);
}
.notifications__icon-wrapper--community_update {
    background: linear-gradient(135deg, rgba(77, 181, 255, 0.18), rgba(77, 181, 255, 0.38));
    box-shadow: 0 12px 32px rgba(77, 181, 255, 0.22);
}

.notifications__icon-wrapper--message {
    background: linear-gradient(135deg, rgba(61, 123, 246, 0.2), rgba(105, 154, 255, 0.38));
    box-shadow: 0 12px 32px rgba(61, 123, 246, 0.22);
}

.notifications__icon {
    font-size: 1.75rem;
    color: #1f2f25;
}

.notifications__icon-wrapper--contact_approved .notifications__icon {
    color: #2f9d5b;
}
.notifications__icon-wrapper--contact_request .notifications__icon {
    color: #ff8a00;
}
.notifications__icon-wrapper--post_like .notifications__icon {
    color: #ed4e68;
}
.notifications__icon-wrapper--community_update .notifications__icon {
    color: #2f6cf0;
}

.notifications__icon-wrapper--message .notifications__icon {
    color: #2f6cf0;
}

.notifications__content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.notifications__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.notifications__meta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.notifications__type {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.8rem;
    color: #4c5a4f;
}

.notifications__type--contact_approved {
    color: #2f9d5b;
}
.notifications__type--contact_request {
    color: #ff8a00;
}
.notifications__type--post_like {
    color: #ed4e68;
}
.notifications__type--community_update {
    color: #2f6cf0;
}

.notifications__type--message {
    color: #2f6cf0;
}

.notifications__badge {
    padding: 0.25rem 0.6rem;
    background: rgba(47, 157, 91, 0.14);
    color: #1f2f25;
    font-weight: 600;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.notifications__time {
    font-size: 0.85rem;
    color: #6d7a71;
    white-space: nowrap;
}

.notifications__title {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: #1f2f25;
}

.notifications__body {
    margin: 0;
    color: #4f5c52;
    line-height: 1.6;
}

.notifications__link {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.4rem;
    background: linear-gradient(135deg, #2f9d5b, #238048);
    color: #ffffff;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.78rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.notifications__link:hover,
.notifications__link:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 14px 32px rgba(35, 128, 72, 0.32);
}

.notifications__empty {
    font-size: 1rem;
    color: var(--muted);
}

.notification-toast-stack {
    position: fixed;
    right: clamp(1rem, 4vw, 2.5rem);
    bottom: clamp(1rem, 4vw, 2.5rem);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 1200;
    pointer-events: none;
}

.notification-toast {
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
    padding: 1rem 1.25rem 1rem 1.1rem;
    min-width: min(22rem, calc(100vw - 3rem));
    max-width: min(26rem, calc(100vw - 3rem));
    color: #f8fbff;
    background: rgba(8, 20, 32, 0.88);
    border-radius: 1rem;
    border: 1px solid rgba(248, 251, 255, 0.12);
    backdrop-filter: blur(18px);
    box-shadow: 0 20px 65px rgba(5, 9, 20, 0.45);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: auto;
}

.notification-toast--visible {
    opacity: 1;
    transform: translateY(0);
}

.notification-toast__icon-wrapper {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(47, 157, 91, 0.45), rgba(61, 123, 246, 0.45));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.notification-toast__icon {
    color: #ffffff;
    font-size: 1.4rem;
}

.notification-toast__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.notification-toast__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
}

.notification-toast__type {
    color: rgba(255, 255, 255, 0.9);
}

.notification-toast__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
}

.notification-toast__body {
    margin: 0;
    font-size: 0.92rem;
    color: rgba(248, 251, 255, 0.85);
}

.notification-toast__link {
    align-self: flex-start;
    color: #9cd8ff;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.notification-toast__link:hover,
.notification-toast__link:focus-visible {
    color: #ffffff;
    border-color: currentColor;
}

.notification-toast__close {
    margin-left: 0.5rem;
    margin-top: -0.4rem;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    padding: 0.15rem;
    border-radius: 999px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.notification-toast__close:hover,
.notification-toast__close:focus-visible {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.08);
}

.notification-toast__close .material-symbols-rounded {
    font-size: 1.1rem;
}

.notification-toast__time {
    color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 900px) {
    .notifications__item {
        flex-direction: column;
        padding: 1.5rem;
    }

    .notifications__icon-wrapper {
        width: 3rem;
        height: 3rem;
    }

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

    .notifications__time {
        font-size: 0.8rem;
    }
}

@media (max-width: 640px) {
    .notifications {
        padding: 2rem 0;
    }

    .notifications__title {
        font-size: 1.15rem;
    }

    .notification-toast-stack {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
        align-items: flex-end;
    }

    .notification-toast {
        width: 100%;
        min-width: auto;
        max-width: 100%;
    }
}

@media (max-width: 1024px) {
    body {
        overflow: auto;
    }

    .layout {
        height: auto;
    }

    .layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--bg-panel);
        height: auto;
    }

    .sidebar__inner {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        height: auto;
    }

    .layout__main {
        height: auto;
        overflow: visible;
    }

.menu--primary {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.menu--sidebar a {
    width: auto;
}
}

.contacts-nav {
    display: flex;
    gap: 0.75rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.contacts-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    border: 1px solid transparent;
    background-color: var(--color-surface);
    color: inherit;
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.contacts-nav__link:hover,
.contacts-nav__link:focus {
    border-color: var(--color-border);
    background-color: var(--color-surface-hover);
}

.contacts-nav__link--active {
    border-color: var(--color-primary);
    background-color: rgba(var(--color-primary-rgb), 0.1);
}

.contacts-nav__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    padding: 0 0.5rem;
    border-radius: 999px;
    background-color: var(--color-primary);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.5;
}

.contacts-card {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.contacts-card__header {
    gap: 1.25rem;
}

.contacts-card__visual .avatar {
    width: 4rem;
    height: 4rem;
}

.contacts-card__titles {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contacts-card__name {
    margin: 0;
}

.contacts-card__name a {
    color: inherit;
    text-decoration: none;
}

.contacts-card__name a:hover,
.contacts-card__name a:focus {
    text-decoration: underline;
}

.contacts-card__location {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin: 0;
}

.contacts-card__since {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin: 0;
}

.contacts-card__details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.contacts-card__methods {
    display: grid;
    gap: 0.75rem;
    margin: 0;
}

.contacts-card__method {
    display: grid;
    gap: 0.25rem;
}

.contacts-card__method dt {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
}

.contacts-card__method dd {
    margin: 0;
    font-size: 0.95rem;
}

.contacts-card__hint {
    margin: 0;
    color: var(--color-text-muted);
}

.contacts-card__message {
    margin: 0.5rem 0 0;
    padding: 0.75rem 1rem;
    background-color: var(--bg-muted);
    border-radius: 0.75rem;
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.45;
    white-space: pre-wrap;
}

.contacts-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.contacts-empty {
    margin: 2rem 0;
    color: var(--color-text-muted);
    text-align: center;
}

@media (max-width: 640px) {
    .sidebar__inner {
        flex-direction: column;
        align-items: stretch;
    }

    .menu--primary {
        flex-direction: column;
        align-items: stretch;
    }

    .menu--sidebar a,
    .sidebar-user,
    .menu__button--full {
        width: 100%;
    }
}
