:root {
    --bg: #f4f6fb;
    --card: #ffffff;
    --line: #e4e9f2;
    --text: #1d2433;
    --muted: #6f7b90;
    --accent: #2f6df6;
    --accent-soft: #eaf1ff;
    --radius: 18px;
    --shadow: 0 8px 24px rgba(27, 39, 71, 0.08);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

body {
    min-height: 100vh;
}

.page {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    padding: 16px 14px 28px;
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.topbar {
    display: flex;
    align-items: center;
    min-height: 32px;
    margin-bottom: 10px;
    padding: 0 2px;
}

.back-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    text-decoration: none;
    background: transparent;
    margin-right: 4px;
    flex: 0 0 auto;
}

.back-button:active {
    opacity: 0.6;
}

.icon-back {
    width: 18px;
    height: 18px;
    border-left: 2px solid var(--text);
    border-bottom: 2px solid var(--text);
    transform: rotate(45deg);
}

.icon-forward {
    width: 18px;
    height: 18px;
    border-right: 2px solid var(--text);
    border-top: 2px solid var(--text);
    transform: rotate(45deg);
    display: inline-block;
}

.user-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
}

.avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #dce7ff, #c6d8ff);
    color: #2c4c98;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    overflow: hidden;
    flex: 0 0 52px;
}

.avatar-small {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    font-size: 15px;
}

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

.user-title {
    font-size: 14px;
    color: var(--muted);
}

.user-name {
    margin-top: 4px;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
}

.user-subtitle {
    margin-top: 4px;
    font-size: 14px;
    color: var(--muted);
    line-height: 1.35;
}

.section {
    margin-top: 18px;
}

.section-title {
    margin: 0 0 10px;
    padding: 0 4px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--muted);
    letter-spacing: 0.04em;
}

.group-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.group-item,
.group-placeholder {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    min-height: 72px;
}

.group-item {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.group-item:active {
    transform: scale(0.995);
}

.group-main {
    min-width: 0;
    flex: 1 1 auto;
}

.group-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.group-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 17px;
    font-weight: 700;
}

.group-subtitle {
    margin-top: 4px;
    color: var(--muted);
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.group-badge {
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.group-arrow {
    margin-left: auto;
    color: #8b97ad;
    font-size: 22px;
    line-height: 1;
}

.footer {
    margin-top: 24px;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
}

.skeleton-item {
    position: relative;
    overflow: hidden;
}

.skeleton-item::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.65), transparent);
    animation: shimmer 1.4s infinite;
}

.skeleton-line,
.skeleton-circle {
    background: #e8edf5;
}

.skeleton-line {
    height: 12px;
    border-radius: 999px;
}

.skeleton-line-title {
    width: 62%;
}

.skeleton-line-subtitle {
    width: 44%;
    margin-top: 10px;
}

.skeleton-circle {
    border-radius: 50%;
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}
