:root {
    color-scheme: light;
    --color-bg: #f5f7fb;
    --color-surface: #ffffff;
    --color-surface-soft: #fbfcff;
    --color-text: #172033;
    --color-muted: #697386;
    --color-border: #d9e0ea;
    --color-primary: #2266cc;
    --color-primary-dark: #1b55ad;
    --shadow-soft: 0 8px 22px rgba(23, 32, 51, 0.06);
    --color-success: #146c43;
    --color-success-bg: #edf8f1;
    --color-success-border: #b7e4c7;
    --color-error: #b42318;
    --color-error-bg: #fff1f0;
    --color-error-border: #ffccc7;
    --color-info-bg: #eef5ff;
    --color-info-border: #b8d5ff;
    --color-empty-bg: #f8fafc;
}

* {
    box-sizing: border-box;
}

body {
    display: flex;
    flex-direction: column;
    margin: 0;
    min-height: 100vh;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
}

img,
svg,
video {
    max-width: 100%;
}

a {
    color: inherit;
}

[hidden] {
    display: none !important;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
}

.site-header__inner,
.site-footer__inner,
.container {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 68px;
    padding: 10px 0;
}

.site-header__brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--color-primary);
    font-size: 20px;
    font-weight: 700;
    text-decoration: none;
}

.site-header__brand-mark {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--color-primary);
    color: #ffffff;
    font-size: 18px;
    line-height: 1;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
    color: var(--color-muted);
    font-size: 14px;
}

.site-nav a,
.site-nav__button {
    min-height: 36px;
    padding: 7px 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font: inherit;
    text-decoration: none;
}

.site-nav a:hover,
.site-nav__button:hover {
    background: var(--color-empty-bg);
    color: var(--color-primary);
}

.site-nav a.is-active {
    color: #2f49ff;
    border-bottom: 2px solid #4058ff;
    border-radius: 0;
    font-weight: 700;
}

.site-nav a:last-child,
.site-nav__button {
    color: var(--color-primary);
    font-weight: 700;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    white-space: nowrap;
}

.table-scroll {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-surface);
    -webkit-overflow-scrolling: touch;
}

.section {
    display: grid;
    gap: 14px;
}

.section--spaced {
    margin-top: 34px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.section-header h2 {
    margin: 0;
    font-size: 22px;
    line-height: 1.2;
}

.grid {
    display: grid;
    gap: 16px;
}

.grid--cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid--compact {
    gap: 12px;
}

.card {
    min-width: 0;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
}

.card--padded {
    padding: 16px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: var(--color-surface);
    color: var(--color-text);
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, opacity 0.16s ease;
}

.button:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.button--primary {
    min-height: 44px;
    border-color: var(--color-primary);
    background: var(--color-primary);
    color: #ffffff;
}

.button--primary:hover {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    color: #ffffff;
}

.button--small {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 14px;
}

.badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.badge--dark {
    background: #202938;
    color: #ffffff;
}

.badge--success {
    background: var(--color-success-bg);
    color: var(--color-success);
}

.badge--error {
    background: var(--color-error-bg);
    color: var(--color-error);
}

.badge--info {
    background: var(--color-info-bg);
    color: var(--color-primary);
}

.alert {
    margin: 0;
    padding: 14px 16px;
    background: var(--color-info-bg);
    border: 1px solid var(--color-info-border);
    border-radius: 8px;
    color: var(--color-muted);
    overflow-wrap: anywhere;
}

.alert[data-type="loading"],
.alert--loading {
    background: var(--color-info-bg);
    border-color: var(--color-info-border);
    color: var(--color-muted);
}

.alert[data-type="error"],
.alert--error {
    background: var(--color-error-bg);
    border-color: var(--color-error-border);
    color: var(--color-error);
}

.alert[data-type="success"],
.alert--success {
    background: var(--color-success-bg);
    border-color: var(--color-success-border);
    color: var(--color-success);
}

.alert[data-type="empty"],
.alert--empty {
    background: var(--color-empty-bg);
    color: var(--color-muted);
}

.closed-mode-notice {
    margin-bottom: 16px;
    border: 1px solid #fde68a;
    border-radius: 8px;
    background: #fffbeb;
    color: #92400e;
    padding: 10px 12px;
    font-size: 14px;
}

.container {
    flex: 1;
    padding: 36px 0 44px;
}

.page-title {
    margin: 0 0 10px;
    font-size: 30px;
    line-height: 1.16;
    letter-spacing: 0;
}

.page-subtitle {
    margin: 0;
    color: var(--color-muted);
    font-size: 16px;
    line-height: 1.55;
}

.home-hero {
    margin-bottom: 32px;
    padding: 26px 0 4px;
}

.home-error,
.state-message {
    margin-bottom: 24px;
    padding: 14px 16px;
    background: var(--color-info-bg);
    border: 1px solid var(--color-info-border);
    border-radius: 8px;
    color: var(--color-muted);
}

.home-section {
    margin-top: 38px;
}

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

.section-heading h2 {
    margin: 0;
    font-size: 22px;
    line-height: 1.2;
}

.person-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.person-grid > .empty-state,
.admin-card-grid > .empty-state,
.comment-list > .empty-state,
.resource-list > .empty-state,
.timeline-list > .empty-state {
    grid-column: 1 / -1;
}

.person-card {
    display: grid;
    grid-template-rows: auto 1fr;
    overflow: hidden;
    min-width: 0;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
}

.person-card__media {
    display: grid;
    place-items: center;
    aspect-ratio: 4 / 3;
    background: #e9eef6;
    color: var(--color-primary);
    font-size: 42px;
    font-weight: 700;
    text-decoration: none;
}

.person-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.person-card__body {
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 10px;
    padding: 14px;
}

.person-card__body h3 {
    margin: 0;
    font-size: 17px;
    line-height: 1.25;
}

.person-card__body h3 a {
    text-decoration: none;
}

.person-card__body h3 a:hover {
    color: var(--color-primary);
}

.person-card__summary {
    display: -webkit-box;
    min-height: 42px;
    margin: 0;
    overflow: hidden;
    color: var(--color-muted);
    font-size: 14px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.person-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-self: end;
    color: var(--color-muted);
    font-size: 13px;
}

.person-card__meta span:first-child {
    color: var(--color-primary);
    font-weight: 700;
}

.ranking-page {
    display: grid;
    gap: 28px;
    color: #111943;
}

.ranking-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 430px);
    gap: 28px;
    align-items: center;
    padding: 34px 18px 8px;
    background: linear-gradient(135deg, #fbfcff 0%, #f1f4ff 100%);
    border-radius: 24px;
}

.ranking-kicker {
    display: inline-grid;
    place-items: center;
    width: 56px;
    height: 56px;
    margin-bottom: 12px;
    border-radius: 18px;
    background: #efeaff;
    color: #5a42ff;
    font-size: 28px;
}

.ranking-hero h1 {
    margin: 0;
    font-size: 44px;
    line-height: 1.05;
}

.ranking-hero p {
    margin: 14px 0 0;
    color: #647097;
    font-size: 18px;
}

.ranking-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 22px;
}

.ranking-stats span,
.ranking-level,
.ranking-filters,
.ranking-board,
.ranking-cta {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(210, 216, 242, 0.9);
    box-shadow: 0 18px 45px rgba(56, 65, 122, 0.12);
    backdrop-filter: blur(12px);
}

.ranking-stats span {
    display: grid;
    gap: 4px;
    min-width: 150px;
    padding: 13px 18px;
    border-radius: 12px;
}

.ranking-stats small {
    color: #7580a6;
}

.ranking-level {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 20px;
    align-items: center;
    padding: 24px;
    border-radius: 22px;
}

.ranking-level__badge {
    display: grid;
    place-items: center;
    width: 78px;
    height: 78px;
    border-radius: 24px;
    background: linear-gradient(145deg, #343cff, #8d56ff);
    color: #ffffff;
    font-size: 34px;
    box-shadow: inset 0 0 0 5px rgba(255, 255, 255, 0.26), 0 16px 28px rgba(76, 48, 186, 0.28);
}

.ranking-level p,
.ranking-level small {
    margin: 0;
    color: #5f688c;
}

.ranking-level strong {
    display: block;
    margin: 4px 0 12px;
    font-size: 20px;
}

.ranking-level__bar {
    overflow: hidden;
    height: 12px;
    margin-bottom: 10px;
    border-radius: 999px;
    background: #e8eafb;
}

.ranking-level__bar span {
    display: block;
    width: 78%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #6d4cff, #3e55ff);
}

.ranking-filters {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px;
    border-radius: 14px;
}

.ranking-filters > div {
    display: flex;
    flex: 1;
    flex-wrap: wrap;
    gap: 10px;
}

.ranking-filters button {
    min-height: 46px;
    padding: 0 18px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #536088;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}

.ranking-filters button.is-active,
.ranking-filters button:hover {
    background: #ffffff;
    color: #3048ff;
    box-shadow: 0 10px 24px rgba(58, 67, 135, 0.13);
}

.ranking-podium {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: end;
    gap: 28px;
    margin-top: 10px;
    padding-top: 34px;
}

.ranking-podium-card {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 8px;
    min-height: 245px;
    padding: 44px 24px 24px;
    border: 2px solid #d8def6;
    border-radius: 28px 28px 8px 8px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(239, 242, 255, 0.62));
    box-shadow: 0 28px 48px rgba(54, 60, 120, 0.12);
}

.ranking-podium-card--gold {
    min-height: 305px;
    border-color: #f4c843;
    background: linear-gradient(180deg, rgba(255, 247, 204, 0.9), rgba(255, 237, 157, 0.4));
    box-shadow: 0 32px 54px rgba(180, 126, 18, 0.18);
}

.ranking-podium-card--silver {
    border-color: #b9c1db;
}

.ranking-podium-card--bronze {
    border-color: #dc9a7d;
    background: linear-gradient(180deg, rgba(255, 232, 223, 0.82), rgba(255, 243, 238, 0.55));
}

.ranking-medal {
    position: absolute;
    top: -34px;
    display: grid;
    place-items: center;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: linear-gradient(145deg, #ffe773, #f1aa19);
    color: #ffffff;
    font-size: 34px;
    font-weight: 800;
    box-shadow: inset 0 0 0 5px rgba(255, 255, 255, 0.36), 0 10px 22px rgba(181, 125, 14, 0.28);
}

.ranking-podium-card--silver .ranking-medal {
    background: linear-gradient(145deg, #eef1fb, #a7b0cf);
}

.ranking-podium-card--bronze .ranking-medal {
    background: linear-gradient(145deg, #f5c0a1, #c9784d);
}

.ranking-avatar,
.ranking-mini-avatar {
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    background: #eef2ff;
    color: #354cff;
    font-weight: 800;
}

.ranking-avatar {
    width: 92px;
    height: 92px;
    border: 4px solid currentColor;
    font-size: 34px;
}

.ranking-avatar img,
.ranking-mini-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ranking-podium-card h2,
.ranking-cta h2 {
    margin: 0;
    font-size: 22px;
}

.ranking-podium-card p,
.ranking-cta p {
    margin: 0;
    color: #6e789d;
}

.ranking-podium-card > strong {
    padding: 8px 18px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.78);
    font-size: 24px;
}

.ranking-podium-card strong span {
    font-size: 15px;
    font-weight: 600;
}

.ranking-podium-card small {
    padding: 5px 12px;
    border-radius: 999px;
    background: #6a58e9;
    color: #ffffff;
    font-weight: 700;
}

.ranking-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 20px;
}

.ranking-board,
.ranking-cta {
    border-radius: 18px;
}

.ranking-board {
    padding: 16px 20px;
}

.ranking-table {
    display: grid;
}

.ranking-row {
    display: grid;
    grid-template-columns: 82px minmax(170px, 1.2fr) minmax(170px, 1fr) 120px 170px 120px 90px;
    gap: 16px;
    align-items: center;
    min-height: 56px;
    border-bottom: 1px solid #e5e9f6;
    color: #111943;
    text-decoration: none;
}

.ranking-row span small {
    display: block;
    margin-top: 3px;
    color: #7a85a8;
    font-size: 12px;
}

.ranking-row--head {
    min-height: 38px;
    color: #7883a8;
    font-size: 13px;
}

.ranking-person {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.ranking-mini-avatar {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    font-size: 15px;
}

.ranking-approval {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 8px;
    align-items: center;
    color: #59658d;
}

.ranking-approval i {
    display: block;
    height: 4px;
    border-radius: 999px;
    background: #344cff;
}

.ranking-trend {
    font-weight: 800;
}

.ranking-trend--up {
    color: #13a450;
}

.ranking-trend--down {
    color: #e53e4f;
}

.ranking-trend--flat {
    color: #8992b4;
}

.ranking-cta {
    display: grid;
    gap: 14px;
    align-content: center;
    justify-items: center;
    padding: 28px 22px;
    text-align: center;
}

.ranking-cta__trophy {
    display: grid;
    place-items: center;
    width: 132px;
    height: 132px;
    border-radius: 36px;
    background: radial-gradient(circle at 50% 35%, #ffffff 0 10%, #eee9ff 46%, #dcd7ff 100%);
    font-size: 68px;
}

.empty-state {
    margin: 0;
    padding: 16px;
    background: var(--color-empty-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: var(--color-muted);
    overflow-wrap: anywhere;
}

.empty-state[data-type="loading"],
.state-message[data-type="loading"],
.profile-message[data-type="loading"] {
    background: var(--color-info-bg);
    border-color: var(--color-info-border);
    color: var(--color-muted);
}

.empty-state[data-type="error"],
.state-message[data-type="error"],
.profile-message[data-type="error"],
.home-error[data-type="error"] {
    background: var(--color-error-bg);
    border-color: var(--color-error-border);
    color: var(--color-error);
}

.empty-state[data-type="success"],
.state-message[data-type="success"],
.profile-message[data-type="success"] {
    background: var(--color-success-bg);
    border-color: var(--color-success-border);
    color: var(--color-success);
}

.empty-state[data-type="empty"],
.state-message[data-type="empty"],
.profile-message[data-type="empty"] {
    background: var(--color-empty-bg);
    color: var(--color-muted);
}

.profile-page {
    display: grid;
    gap: 24px;
}

.profile-message {
    padding: 16px;
    background: var(--color-info-bg);
    border: 1px solid var(--color-info-border);
    border-radius: 8px;
    color: var(--color-muted);
    overflow-wrap: anywhere;
}

.profile {
    display: grid;
    gap: 32px;
}

.profile-hero {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.profile-photo {
    display: grid;
    place-items: center;
    overflow: hidden;
    aspect-ratio: 1;
    background: #e9eef6;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: var(--color-primary);
    font-size: 64px;
    font-weight: 700;
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-main {
    display: grid;
    gap: 10px;
}

.profile-popular,
.profile-profession,
.profile-location,
.profile-summary {
    margin: 0;
    color: var(--color-muted);
}

.profile-summary {
    max-width: 760px;
    color: var(--color-text);
    font-size: 17px;
}

.mourning-badge {
    width: fit-content;
    padding: 5px 10px;
    background: #202938;
    border-radius: 999px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
}

.profile-section {
    display: grid;
    gap: 16px;
}

.profile-section h2 {
    margin: 0;
    font-size: 22px;
    line-height: 1.2;
}

.profile-text {
    padding: 18px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    white-space: pre-wrap;
}

.vote-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.vote-actions,
.profile-contribution-actions,
.timeline-vote {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.profile-v2 {
    gap: 24px;
}

.profile-v2-hero,
.profile-v2-card {
    border: 1px solid #d9def0;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 42px rgba(55, 64, 115, 0.09);
}

.profile-v2-hero {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr) 190px;
    gap: 34px;
    align-items: start;
    padding: 22px;
    background: linear-gradient(135deg, #ffffff 0%, #f7f8ff 62%, #f1ecff 100%);
}

.profile-v2-photo {
    display: grid;
    place-items: center;
    overflow: hidden;
    aspect-ratio: 0.9;
    border-radius: 18px;
    background: #e9eef8;
    color: var(--color-primary);
    font-size: 82px;
    font-weight: 800;
}

.profile-v2-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-v2-main {
    display: grid;
    gap: 14px;
    padding-top: 14px;
}

.profile-v2-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.profile-v2-chips span,
.profile-v2-hero .profile-v2-facts span:nth-child(4) {
    width: fit-content;
    padding: 5px 12px;
    border-radius: 999px;
    background: #eef0ff;
    color: #4357f1;
    font-size: 13px;
    font-weight: 800;
}

.profile-v2-main h1 {
    margin: 0;
    color: #071037;
    font-size: 52px;
    line-height: 1.04;
}

.profile-v2-fullname {
    margin: 0;
    color: #5b6689;
    font-size: 20px;
}

.profile-v2-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 18px;
    margin: 10px 0;
    color: #596585;
}

.profile-v2-facts span {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.profile-v2-facts i {
    flex: 0 0 auto;
    color: #2f63df;
    font-style: normal;
}

.profile-v2-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}

.profile-v2-popularity {
    display: grid;
    justify-items: center;
    gap: 6px;
    padding: 18px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 12px 28px rgba(90, 70, 170, 0.14);
    text-align: center;
}

.profile-v2-popularity span {
    font-size: 26px;
}

.profile-v2-popularity small {
    color: #315fe8;
    font-weight: 800;
}

.profile-v2-popularity strong {
    color: #071037;
    font-size: 30px;
}

.profile-v2-popularity em {
    color: #6b7598;
    font-style: normal;
    font-size: 13px;
}

.profile-v2-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 410px;
    gap: 22px;
}

.profile-v2-content,
.profile-v2-sidebar {
    display: grid;
    align-content: start;
    gap: 18px;
}

.profile-v2-card {
    padding: 22px;
}

.profile-v2-card h2 {
    margin: 0 0 12px;
    color: #10183d;
    font-size: 20px;
}

.profile-v2-summary {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 16px;
}

.profile-v2-summary p {
    margin: 0;
    color: #485477;
    line-height: 1.7;
}

.profile-v2-card-icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: #eef3ff;
    color: #2f63df;
    font-weight: 800;
}

.profile-v2-tabs-card {
    padding: 0;
    overflow: hidden;
}

.profile-v2-tabs {
    display: flex;
    overflow-x: auto;
    border-bottom: 1px solid #dfe4f1;
}

.profile-v2-tabs button {
    min-height: 58px;
    padding: 0 24px;
    border: 0;
    border-bottom: 3px solid transparent;
    background: transparent;
    color: #556181;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    white-space: nowrap;
}

.profile-v2-tabs button.is-active {
    border-color: #2f63df;
    color: #2f63df;
}

.profile-v2-tabs button span {
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #2f63df;
    color: #ffffff;
    font-size: 12px;
}

.profile-v2-tab-panel {
    padding: 24px;
}

.profile-v2-reading {
    color: #333f63;
    line-height: 1.75;
}

.profile-v2-reading p {
    margin: 0 0 14px;
}

.profile-v2-timeline-item,
.profile-v2-resource {
    display: grid;
    gap: 8px;
    padding: 16px 0;
    border-bottom: 1px solid #e3e7f2;
}

.profile-v2-timeline-item:last-child,
.profile-v2-resource:last-child {
    border-bottom: 0;
}

.profile-v2-timeline-item.is-selected {
    border-color: rgba(34, 197, 94, 0.55);
    background: rgba(34, 197, 94, 0.08);
}

.profile-v2-timeline-item img {
    width: min(220px, 100%);
    border-radius: 10px;
}

.profile-v2-timeline-item time,
.profile-v2-resource span {
    color: #687394;
}

.profile-v2-resource {
    color: #102050;
    text-decoration: none;
}

.profile-v2-feeling-head {
    display: grid;
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
}

.profile-v2-feeling-head span {
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: #d9f8e5;
    font-size: 25px;
}

.profile-v2-feeling-row {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr) 42px;
    gap: 10px;
    align-items: center;
    margin: 10px 0;
    color: #364160;
    font-size: 14px;
}

.profile-v2-feeling-row i {
    overflow: hidden;
    height: 6px;
    border-radius: 999px;
    background: #e4e7ef;
}

.profile-v2-feeling-row b {
    display: block;
    height: 100%;
    border-radius: inherit;
}

.profile-v2-card > small {
    color: #7a85a6;
}

.profile-v2-quick-info {
    display: grid;
    gap: 13px;
}

.profile-v2-quick-info div {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 12px;
    color: #4f5b7c;
}

.profile-v2-quick-info span {
    font-weight: 800;
}

.profile-v2-quick-info strong {
    font-weight: 600;
}

.profile-v2-inline-vote {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.profile-v2-inline-vote--card,
.timeline-vote__options {
    grid-template-columns: 1fr;
    margin-top: 10px;
}

.profile-v2-current-vote {
    color: #364160;
    font-weight: 800;
}

.profile-v2-contribution-actions {
    display: grid;
    gap: 8px;
}

.timeline-vote {
    margin-top: 14px;
}

.timeline-vote strong {
    color: #18233c;
}

.vote-button,
.button-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: var(--color-surface);
    color: var(--color-text);
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, opacity 0.16s ease;
}

.vote-button:hover,
.button-secondary:hover {
    background: var(--color-empty-bg);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.login-call {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    color: var(--color-muted);
}

.action-message {
    flex-basis: 100%;
    margin: 0;
    color: var(--color-success);
    font-size: 14px;
}

.action-message[data-type="error"] {
    color: var(--color-error);
}

.vote-item,
.resource-item,
.timeline-item {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
}

.vote-item {
    display: grid;
    gap: 6px;
    padding: 14px;
}

.vote-item span {
    color: var(--color-muted);
    font-size: 13px;
}

.vote-item strong {
    font-size: 22px;
}

.resource-list {
    display: grid;
    gap: 10px;
}

.resource-item {
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 14px;
    text-decoration: none;
}

.resource-item strong,
.timeline-item h3,
.comment-card strong {
    overflow-wrap: anywhere;
}

.resource-item:hover strong {
    color: var(--color-primary);
}

.resource-item span {
    overflow-wrap: anywhere;
    color: var(--color-muted);
    font-size: 14px;
}

.timeline-list {
    display: grid;
    gap: 12px;
}

.timeline-item {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr);
    gap: 16px;
    min-width: 0;
    padding: 16px;
}

.timeline-item time {
    color: var(--color-primary);
    font-weight: 700;
}

.timeline-item h3 {
    margin: 0 0 6px;
    font-size: 17px;
}

.timeline-item p {
    margin: 0;
    color: var(--color-muted);
}

.comment-form {
    display: grid;
    gap: 10px;
    padding: 16px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
}

.comment-form label {
    font-weight: 700;
}

.comment-form textarea,
.complaint-form select {
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    color: var(--color-text);
    font: inherit;
}

.comment-form textarea {
    min-height: 110px;
    padding: 10px 12px;
    resize: vertical;
}

.complaint-form select {
    min-height: 38px;
    padding: 7px 10px;
    background: var(--color-surface);
}

.comment-list {
    display: grid;
    gap: 12px;
}

.comment-card {
    display: grid;
    gap: 12px;
    min-width: 0;
    padding: 16px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
}

.comment-card__header,
.comment-card__meta,
.comment-actions,
.complaint-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.comment-card__header {
    justify-content: space-between;
}

.comment-card__header time,
.comment-card__meta {
    color: var(--color-muted);
    font-size: 14px;
}

.comment-card p {
    margin: 0;
    overflow-wrap: anywhere;
}

.admin-page,
.admin-content {
    display: grid;
    gap: 30px;
}

.my-profile-page,
.my-profile {
    display: grid;
    gap: 24px;
}

.contributions-page {
    display: grid;
    gap: 28px;
}

.contributions-content {
    display: grid;
    gap: 24px;
}

.contributions-hero {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    align-items: center;
    gap: 22px;
}

.contributions-hero__icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(145deg, #6aa4ff, #2563eb);
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.2);
    color: #ffffff;
    font-size: 30px;
}

.contributions-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.contribution-summary-card {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
}

.contribution-summary-card strong {
    display: block;
    color: var(--color-text);
    font-size: 20px;
    line-height: 1.1;
}

.contribution-summary-card span:last-child {
    display: block;
    margin-top: 4px;
    color: var(--color-muted);
    font-size: 13px;
}

.contribution-summary-card__icon,
.contribution-panel__icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    font-weight: 700;
}

.contribution-summary-card__icon--blue,
.contribution-panel__icon--vote,
.contribution-panel__icon--activity {
    background: #eef5ff;
    color: #2563eb;
}

.contribution-summary-card__icon--green,
.contribution-panel__icon--claim {
    background: #edf8f1;
    color: #15803d;
}

.contribution-summary-card__icon--orange,
.contribution-panel__icon--suggestion {
    background: #fff7ed;
    color: #c2410c;
}

.contribution-summary-card__icon--purple,
.contribution-panel__icon--comment {
    background: #f5f3ff;
    color: #7c3aed;
}

.contributions-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.contribution-panel {
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 14px;
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
}

.contribution-panel--wide {
    grid-column: 1 / -1;
}

.contribution-panel__header {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
}

.contribution-panel__header h2 {
    margin: 0;
    color: var(--color-text);
    font-size: 20px;
    line-height: 1.2;
}

.contribution-panel__header a {
    color: var(--color-primary);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.contribution-list,
.contribution-timeline {
    display: grid;
    gap: 12px;
}

.contribution-item,
.contribution-activity {
    display: grid;
    gap: 10px;
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: #ffffff;
}

.contribution-item {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
}

.contribution-item--stacked {
    grid-template-columns: 1fr;
}

.contribution-item__main {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 14px;
}

.contribution-item__title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.contribution-item strong,
.contribution-activity strong {
    color: var(--color-text);
    font-size: 15px;
}

.contribution-item p,
.contribution-activity small,
.contribution-item small {
    display: block;
    margin: 0;
    color: var(--color-muted);
}

.contribution-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 26px;
    padding: 4px 12px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
}

.contribution-status--success {
    border-color: var(--color-success-border);
    background: var(--color-success-bg);
    color: var(--color-success);
}

.contribution-status--warning {
    border-color: #fed7aa;
    background: #fff7ed;
    color: #9a3412;
}

.contribution-status--danger {
    border-color: var(--color-error-border);
    background: var(--color-error-bg);
    color: var(--color-error);
}

.contribution-arrow {
    color: var(--color-primary);
    font-size: 24px;
    line-height: 1;
    text-decoration: none;
}

.contribution-vote {
    grid-template-columns: 64px minmax(0, 1fr);
    align-items: start;
}

.contribution-avatar {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--color-info-bg);
    color: var(--color-primary);
    font-size: 24px;
    font-weight: 700;
}

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

.contribution-vote__body {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.contribution-vote__body a {
    width: fit-content;
    color: var(--color-primary);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.contribution-vote__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.contribution-vote__badges span {
    min-height: 26px;
    padding: 4px 10px;
    border-radius: 8px;
    background: var(--color-empty-bg);
    color: var(--color-text);
    font-size: 12px;
}

.contribution-empty {
    padding: 22px;
    border: 1px dashed var(--color-border);
    border-radius: 8px;
    background: var(--color-empty-bg);
    color: var(--color-muted);
    text-align: center;
}

.contribution-activity {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    align-items: center;
    color: inherit;
    text-decoration: none;
}

.contribution-activity__dot {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: var(--color-info-bg);
}

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

.biographies-hero {
    align-items: end;
    display: flex;
    justify-content: space-between;
}

.biographies-toolbar {
    align-items: end;
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(260px, 1fr) 240px;
}

.biographies-search,
.biographies-sort {
    display: grid;
    gap: 7px;
}

.biographies-search span,
.biographies-sort span {
    color: #687394;
    font-size: 13px;
    font-weight: 800;
}

.biographies-search input,
.biographies-sort select {
    background: #fff;
    border: 1px solid #dbe2ef;
    border-radius: 10px;
    color: #1d2742;
    min-height: 48px;
    padding: 0 14px;
}

.biographies-themes {
    overflow-x: auto;
}

.biographies-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.biography-card {
    background: #fff;
    border: 1px solid #e1e6f2;
    border-radius: 14px;
    color: inherit;
    display: grid;
    gap: 14px;
    padding: 14px;
    text-decoration: none;
}

.biography-card__photo {
    align-items: center;
    aspect-ratio: 4 / 3;
    background: #eef3fb;
    border-radius: 10px;
    color: #50607e;
    display: flex;
    font-size: 42px;
    font-weight: 900;
    justify-content: center;
    overflow: hidden;
}

.biography-card__photo img {
    height: 100%;
    object-fit: contain;
    object-position: center center;
    width: 100%;
}

.biography-card__body {
    display: grid;
    gap: 7px;
}

.biography-card__body strong {
    color: #18233c;
    font-size: 20px;
}

.biography-card__body small,
.biography-card__body em {
    color: #687394;
    font-style: normal;
}

.biography-card__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 5px 0;
}

.biography-card__stats b {
    background: #f3f6fb;
    border-radius: 999px;
    color: #2d3957;
    font-size: 12px;
    padding: 6px 9px;
}

.biographies-empty {
    background: #fff;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    grid-column: 1 / -1;
    padding: 36px 18px;
    text-align: center;
}

.biographies-load-more {
    display: flex;
    justify-content: center;
}

.my-profile-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.my-profile-item {
    display: grid;
    gap: 6px;
    min-width: 0;
    padding: 16px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
}

.my-profile-item span {
    color: var(--color-muted);
    font-size: 13px;
}

.my-profile-item strong {
    color: var(--color-text);
    font-size: 16px;
    overflow-wrap: anywhere;
}

.admin-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.admin-dashboard-card {
    display: grid;
    gap: 6px;
    color: var(--color-text);
    text-decoration: none;
}

.admin-dashboard-card:hover {
    border-color: var(--color-primary);
}

.admin-dashboard-card strong {
    font-size: 17px;
}

.admin-dashboard-card span {
    color: var(--color-muted);
    font-size: 14px;
}

.admin-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-muted);
    font-size: 14px;
    font-weight: 700;
}

.admin-filter select {
    min-height: 38px;
    padding: 7px 10px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: var(--color-surface);
    color: var(--color-text);
    font: inherit;
}

.profile-message[data-type="loading"] {
    background: var(--color-info-bg);
    border-color: var(--color-info-border);
    color: var(--color-muted);
}

.profile-message[data-type="error"] {
    background: var(--color-error-bg);
    border-color: var(--color-error-border);
    color: var(--color-error);
}

.profile-message[data-type="success"] {
    background: var(--color-success-bg);
    border-color: var(--color-success-border);
    color: var(--color-success);
}

.profile-message[data-type="empty"] {
    background: var(--color-empty-bg);
    color: var(--color-muted);
}

.admin-section {
    display: grid;
    gap: 14px;
}

.admin-card-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
}

.admin-table-wrap {
    min-width: 0;
}

.admin-table {
    min-width: 900px;
    font-size: 14px;
}

.admin-table th,
.admin-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--color-border);
    text-align: left;
    vertical-align: top;
}

.admin-table th {
    background: var(--color-empty-bg);
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 700;
}

.admin-table tbody tr:hover {
    background: #f9fbff;
}

.admin-table tbody tr:last-child td {
    border-bottom: 0;
}

.admin-table__text {
    display: block;
    min-width: 180px;
    max-width: 360px;
    white-space: normal;
    overflow-wrap: anywhere;
}

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

.admin-card {
    display: grid;
    gap: 12px;
    min-width: 0;
    padding: 16px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
}

.admin-card h3 {
    margin: 0;
    font-size: 17px;
    line-height: 1.25;
}

.admin-field-list {
    display: grid;
    gap: 8px;
}

.admin-field {
    display: grid;
    gap: 2px;
}

.admin-field span {
    color: var(--color-muted);
    font-size: 13px;
}

.admin-field strong {
    overflow-wrap: anywhere;
    font-size: 14px;
    font-weight: 700;
}

.admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 4px;
}

.admin-action-button {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 14px;
}

.admin-check-list {
    display: grid;
    gap: 6px;
}

.admin-check {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.admin-modal {
    width: min(520px, calc(100% - 32px));
    border: 0;
    border-radius: 8px;
    padding: 0;
    background: transparent;
}

.admin-modal::backdrop {
    background: rgba(15, 23, 42, 0.54);
}

.admin-modal__panel {
    display: grid;
    gap: 16px;
    padding: 22px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
}

.admin-modal__panel h2 {
    margin: 0;
    font-size: 20px;
}

.auth-page {
    display: grid;
    place-items: start center;
    min-height: calc(100vh - 186px);
}

.auth-panel {
    width: min(420px, 100%);
    padding: 30px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
}

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

.auth-form {
    display: grid;
    gap: 16px;
    margin-top: 24px;
    min-width: 0;
}

.auth-form--grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-form--grid .form-message,
.auth-form--grid .button-primary {
    grid-column: 1 / -1;
}

.auth-switch {
    margin: 18px 0 0;
    color: var(--color-muted);
    font-size: 14px;
    text-align: center;
}

.auth-switch a {
    color: var(--color-primary);
    font-weight: 700;
    text-decoration: none;
}

.auth-switch a:hover {
    text-decoration: underline;
}

.form-field--full {
    grid-column: 1 / -1;
}

.form-field {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.form-field label {
    font-size: 14px;
    font-weight: 700;
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: var(--color-surface);
    color: var(--color-text);
    font: inherit;
    font-size: 16px;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    border-color: var(--color-primary);
    outline: 2px solid rgba(34, 102, 204, 0.16);
    outline-offset: 0;
}

.form-field textarea {
    resize: vertical;
}

.rich-editor {
    display: grid;
    gap: 0;
    min-width: 0;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: var(--color-surface);
    overflow: hidden;
}

.rich-editor__source {
    display: none;
}

.rich-editor__toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px;
    background: var(--color-surface-soft);
    border-bottom: 1px solid var(--color-border);
}

.rich-editor__button {
    min-height: 32px;
    padding: 5px 9px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background: var(--color-surface);
    color: var(--color-text);
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
}

.rich-editor__button:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.rich-editor__surface {
    min-height: 140px;
    padding: 12px;
    overflow-x: auto;
    font-size: 16px;
    outline: none;
}

.rich-editor__surface:focus {
    box-shadow: inset 0 0 0 2px rgba(34, 102, 204, 0.16);
}

.rich-editor__surface table {
    width: 100%;
    margin: 8px 0;
    border-collapse: collapse;
}

.rich-editor__surface th,
.rich-editor__surface td {
    padding: 8px;
    border: 1px solid var(--color-border);
    text-align: left;
    white-space: normal;
}

.form-field [aria-invalid="true"] {
    border-color: var(--color-error);
}

.field-message {
    color: var(--color-error);
    font-size: 13px;
}

.field-message[data-type="success"] {
    color: var(--color-success);
}

.field-message[data-type="loading"] {
    color: var(--color-muted);
}

.photo-upload-preview {
    width: 112px;
    aspect-ratio: 1;
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-empty-bg);
}

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

.form-message {
    margin: 0;
    padding: 12px 14px;
    background: var(--color-error-bg);
    border: 1px solid var(--color-error-border);
    border-radius: 8px;
    color: var(--color-error);
    font-size: 14px;
}

.form-message[data-type="success"],
.action-message[data-type="success"] {
    background: var(--color-success-bg);
    border-color: var(--color-success-border);
    color: var(--color-success);
}

.form-message[data-type="loading"],
.form-message[data-type="info"],
.action-message[data-type="info"],
.action-message[data-type="loading"] {
    background: var(--color-info-bg);
    border-color: var(--color-info-border);
    color: var(--color-muted);
}

.form-message[data-type="empty"],
.action-message[data-type="empty"] {
    background: var(--color-empty-bg);
    color: var(--color-muted);
}

.form-message[data-type="error"],
.action-message[data-type="error"] {
    background: var(--color-error-bg);
    border-color: var(--color-error-border);
    color: var(--color-error);
}

.action-message {
    padding: 10px 12px;
    background: var(--color-info-bg);
    border: 1px solid var(--color-info-border);
    border-radius: 8px;
}

.participation-limit-note {
    margin: 8px 0 0;
    color: var(--color-muted);
    font-size: 14px;
    line-height: 1.4;
}

.button-primary {
    min-height: 44px;
    border: 1px solid var(--color-primary);
    border-radius: 6px;
    background: var(--color-primary);
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}

.button-primary:hover {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
}

.button:disabled,
.button-primary:disabled,
.button-secondary:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

.site-footer {
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    color: var(--color-muted);
}

.site-footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 0;
    font-size: 14px;
}

.site-footer__brand {
    color: var(--color-text);
    font-weight: 700;
}

.site-footer__text {
    text-align: right;
}

.user-home {
    position: relative;
    display: grid;
    gap: 26px;
    min-height: calc(100vh - 178px);
    padding: 34px 0 12px;
}

.user-home::before {
    content: "";
    position: fixed;
    inset: 69px 0 0;
    z-index: -1;
    background: #f6f8fc;
}

.home-vote-heading {
    justify-self: center;
    display: grid;
    gap: 6px;
    width: min(100%, 880px);
    text-align: center;
}

.theme-filter {
    justify-self: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    width: min(100%, 980px);
}

.theme-filter__button {
    min-height: 38px;
    padding: 8px 13px;
    border: 1px solid #d4dbea;
    border-radius: 999px;
    background: #ffffff;
    color: #26314f;
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
}

.theme-filter__button.is-active {
    border-color: #5356ff;
    background: #eceeff;
    color: #3337d4;
}

.vote-status-pill {
    justify-self: center;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    max-width: 100%;
    min-height: 54px;
    padding: 11px 28px;
    border: 1px solid #d5dcec;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 12px 26px rgba(53, 69, 112, 0.08);
    color: #121832;
    font-size: 17px;
}

.vote-status-pill__icon,
.vote-next-note__icon {
    color: #4c55ff;
    font-size: 25px;
    line-height: 1;
}

.vote-status-pill span:last-child {
    color: #5360ff;
}

.vote-status-pill span:last-child::before {
    content: "•";
    margin-right: 13px;
    color: #8d96bd;
}

.vote-profile-card {
    display: grid;
    grid-template-columns: minmax(280px, 410px) minmax(0, 1fr);
    gap: 42px;
    align-items: center;
    width: min(100%, 1060px);
    margin: 0 auto;
    padding: 22px;
    border: 1px solid #d9dfeb;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 26px 70px rgba(27, 39, 80, 0.13);
}

.vote-profile-card__photo {
    display: grid;
    place-items: center;
    overflow: hidden;
    aspect-ratio: 0.66;
    min-height: 500px;
    border-radius: 14px;
    background: #eef2fb;
    box-shadow: 0 16px 34px rgba(16, 25, 56, 0.15);
    color: #4c55ff;
    font-size: 92px;
    font-weight: 800;
}

.vote-profile-card__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vote-profile-card__content {
    display: grid;
    gap: 24px;
    min-width: 0;
    padding-right: 18px;
}

.vote-person-heading h1 {
    margin: 0;
    color: #070b2b;
    font-size: 60px;
    line-height: 1.02;
    letter-spacing: 0;
}

.vote-person-heading p {
    margin: 8px 0 0;
    color: #687396;
    font-size: 21px;
}

.vote-person-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    margin: 0;
    padding: 0 0 25px;
    border-bottom: 1px solid #d8deea;
}

.vote-person-facts div {
    display: grid;
    gap: 3px;
    min-width: 0;
    padding: 0 24px;
    border-left: 1px solid #d8deea;
}

.vote-person-facts div:first-child {
    padding-left: 0;
    border-left: 0;
}

.vote-person-facts dt {
    height: 1px;
    margin: -1px;
    overflow: hidden;
    position: absolute;
    width: 1px;
}

.vote-person-facts dd {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    margin: 0;
    color: #27304f;
    font-weight: 700;
    line-height: 1.25;
}

.vote-person-facts dd span {
    flex: 0 0 auto;
    font-size: 28px;
}

.vote-question h2 {
    margin: 0;
    color: #080d2d;
    font-size: 30px;
    line-height: 1.2;
}

.vote-question p {
    margin: 5px 0 0;
    color: #6c789e;
    font-size: 17px;
}

.vote-options {
    display: grid;
    grid-template-columns: repeat(5, minmax(94px, 1fr));
    gap: 14px;
}

.vote-option {
    display: grid;
    grid-template-rows: auto 1fr auto;
    justify-items: center;
    gap: 9px;
    min-height: 172px;
    padding: 18px 12px 15px;
    border: 1px solid #d9dfeb;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 11px 24px rgba(30, 43, 88, 0.08);
    color: #11172f;
    cursor: pointer;
    font: inherit;
    text-align: center;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.vote-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(30, 43, 88, 0.13);
}

.vote-option:disabled {
    cursor: wait;
    opacity: 0.7;
}

.vote-option__icon {
    font-size: 43px;
    line-height: 1;
}

.vote-option__label {
    display: flex;
    align-items: center;
    min-height: 46px;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.22;
}

.vote-option strong {
    font-size: 28px;
    line-height: 1;
}

.vote-option--compact {
    align-items: center;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    grid-template-rows: none;
    justify-items: start;
    min-height: 54px;
    padding: 10px 12px;
    text-align: left;
}

.vote-option--compact .vote-option__icon,
.vote-option--compact strong {
    font-size: 22px;
}

.vote-option--compact .vote-option__label {
    min-height: 0;
    font-size: 14px;
}

.vote-option--love {
    border-color: #ff8ba5;
    background: #fff6f8;
}

.vote-option--love strong {
    color: #ea2f58;
}

.vote-option--like {
    border-color: #86cd97;
    background: #f3fff5;
}

.vote-option--like strong {
    color: #169a31;
}

.vote-option--neutral strong {
    color: #7d879f;
}

.vote-option--dislike {
    border-color: #f4bf82;
    background: #fff9ef;
}

.vote-option--dislike strong {
    color: #f07412;
}

.vote-option--hate {
    border-color: #ff8fa5;
    background: #fff5f6;
}

.vote-option--hate strong {
    color: #de2849;
}

.vote-profile-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    min-height: 52px;
    width: min(100%, 440px);
    padding: 12px 18px;
    border: 2px solid #5d5bff;
    border-radius: 10px;
    background: #ffffff;
    color: #5255ff;
    font-size: 19px;
    font-weight: 800;
    text-decoration: none;
}

.vote-profile-link:hover {
    background: #f6f7ff;
}

.vote-next-note {
    justify-self: center;
    display: flex;
    align-items: center;
    gap: 18px;
    width: min(760px, 100%);
    padding: 18px 34px;
    border: 1px solid #d9dfeb;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.74);
    box-shadow: 0 12px 30px rgba(34, 49, 95, 0.08);
}

.vote-next-note__icon {
    display: inline-grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #e6e7ff;
}

.vote-next-note p {
    display: grid;
    gap: 2px;
    margin: 0;
}

.vote-next-note strong {
    color: #141a34;
    font-size: 17px;
}

.vote-next-note span:last-child {
    color: #7882a4;
    font-size: 16px;
}

.vote-empty-state {
    grid-column: 1 / -1;
    display: grid;
    justify-items: center;
    gap: 12px;
    padding: 54px 24px;
    text-align: center;
}

.vote-empty-state > span {
    display: inline-grid;
    place-items: center;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: #eaf8ee;
    color: #16833a;
    font-size: 30px;
    font-weight: 800;
}

.vote-empty-state h1 {
    max-width: 700px;
    margin: 0;
    color: #070b2b;
    font-size: 32px;
    line-height: 1.18;
}

.vote-empty-state p {
    margin: 0 0 12px;
    color: #6c789e;
    font-size: 17px;
}

@media (max-width: 980px) {
    .ranking-hero,
    .ranking-main {
        grid-template-columns: 1fr;
    }

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

    .ranking-podium {
        grid-template-columns: 1fr;
    }

    .ranking-podium-card,
    .ranking-podium-card--gold {
        min-height: 245px;
    }

    .ranking-row,
    .ranking-row--head {
        grid-template-columns: 70px minmax(170px, 1.2fr) minmax(170px, 1fr) 120px 160px 110px 90px;
        width: 890px;
    }

    .vote-profile-card {
        grid-template-columns: 1fr;
        max-width: 680px;
        gap: 28px;
    }

    .vote-profile-card__photo {
        width: min(100%, 440px);
        min-height: 0;
        margin: 0 auto;
        aspect-ratio: 0.78;
    }

    .vote-profile-card__content {
        padding-right: 0;
    }

    .vote-person-heading h1 {
        font-size: 46px;
    }

    .vote-options {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .grid--cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .person-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .biographies-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-hero {
        grid-template-columns: 220px minmax(0, 1fr);
    }

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

    .profile-v2-photo {
        width: min(100%, 360px);
    }

    .profile-v2-popularity {
        justify-items: start;
        text-align: left;
    }

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

    .my-profile-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .site-header__inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
        padding: 12px 0;
    }

    .site-nav {
        justify-content: flex-start;
        width: 100%;
    }
}

@media (max-width: 760px) {
    .ranking-hero h1 {
        font-size: 34px;
    }

    .ranking-podium {
        gap: 46px;
    }

    .ranking-podium-card,
    .ranking-podium-card--gold {
        min-height: 230px;
    }

    .ranking-row,
    .ranking-row--head {
        grid-template-columns: 56px minmax(150px, 1fr) 150px 110px 150px 100px 80px;
        width: 800px;
    }

    .user-home {
        gap: 18px;
        padding-top: 18px;
    }

    .vote-status-pill {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        width: 100%;
        padding: 12px 16px;
        border-radius: 14px;
        font-size: 15px;
    }

    .vote-status-pill span:last-child {
        grid-column: 2;
    }

    .vote-status-pill span:last-child::before {
        content: "";
        margin: 0;
    }

    .vote-profile-card {
        padding: 14px;
        border-radius: 20px;
    }

    .vote-person-heading h1 {
        font-size: 38px;
    }

    .vote-person-heading p {
        font-size: 18px;
    }

    .vote-person-facts {
        grid-template-columns: 1fr;
        gap: 12px;
        padding-bottom: 20px;
    }

    .vote-person-facts div,
    .vote-person-facts div:first-child {
        padding: 0;
        border-left: 0;
    }

    .vote-question h2 {
        font-size: 25px;
    }

    .vote-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .vote-option {
        min-height: 150px;
    }

    .vote-profile-link {
        width: 100%;
    }

    .vote-next-note {
        align-items: flex-start;
        padding: 16px;
    }

    .site-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        gap: 8px;
    }

    .site-nav a,
    .site-nav__button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 40px;
        padding: 8px 10px;
        border: 1px solid var(--color-border);
        border-radius: 6px;
        background: var(--color-surface);
        text-align: center;
    }

    .container {
        padding: 24px 0 34px;
    }

    .page-title {
        font-size: 25px;
    }

    .page-subtitle {
        font-size: 15px;
    }

    .section-heading,
    .section-header,
    .admin-heading,
    .comment-card__header {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .profile-hero,
    .timeline-item {
        grid-template-columns: 1fr;
    }

    .profile-photo {
        width: min(100%, 320px);
    }

    .profile-v2-main h1 {
        font-size: 38px;
    }

    .profile-v2-facts,
    .profile-v2-inline-vote {
        grid-template-columns: 1fr;
    }

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

    .profile-v2-quick-info div,
    .profile-v2-feeling-row {
        grid-template-columns: 1fr;
    }

    .contributions-grid,
    .admin-card-grid,
    .auth-form--grid,
    .biographies-grid,
    .biographies-toolbar,
    .grid--two,
    .grid--three {
        grid-template-columns: 1fr;
    }

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

    .contributions-hero {
        grid-template-columns: 52px minmax(0, 1fr);
        gap: 14px;
    }

    .contributions-hero__icon {
        width: 52px;
        height: 52px;
        border-radius: 14px;
        font-size: 24px;
    }

    .contribution-panel {
        padding: 14px;
    }

    .contribution-panel__header {
        grid-template-columns: 40px minmax(0, 1fr);
    }

    .contribution-panel__header a {
        grid-column: 2;
    }

    .contribution-item,
    .contribution-item__main,
    .contribution-vote,
    .contribution-activity {
        grid-template-columns: 1fr;
    }

    .contribution-avatar {
        width: 56px;
        height: 56px;
    }

    .auth-panel {
        padding: 22px;
    }

    .site-footer__inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .site-footer__text {
        text-align: left;
    }
}

@media (max-width: 560px) {
    .vote-profile-card__photo {
        width: 100%;
        aspect-ratio: 0.76;
    }

    .vote-profile-card__content {
        gap: 20px;
    }

    .vote-person-heading h1 {
        font-size: 34px;
    }

    .vote-options {
        grid-template-columns: 1fr;
    }

    .vote-option {
        grid-template-columns: auto minmax(0, 1fr) auto;
        grid-template-rows: 1fr;
        min-height: 78px;
        justify-items: start;
        text-align: left;
    }

    .vote-option__icon {
        font-size: 34px;
    }

    .vote-option__label {
        min-height: 0;
        font-size: 17px;
    }

    .vote-empty-state {
        padding: 34px 10px;
    }

    .vote-empty-state h1 {
        font-size: 25px;
    }

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

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

    .site-header__inner,
    .site-footer__inner,
    .container {
        width: min(100% - 20px, 1120px);
    }

    .auth-panel {
        padding: 18px;
    }

    .home-hero {
        padding-top: 10px;
    }

    .profile,
    .admin-page,
    .admin-content,
    .my-profile-page,
    .contributions-page {
        gap: 22px;
    }

    .vote-actions,
    .profile-contribution-actions,
    .timeline-vote,
    .comment-actions,
    .complaint-form,
    .admin-filter,
    .admin-actions,
    .login-call {
        align-items: stretch;
        flex-direction: column;
    }

    .vote-button,
    .button,
    .button-secondary,
    .button-primary,
    .admin-action-button,
    .admin-filter select,
    .complaint-form select {
        width: 100%;
    }

    .vote-summary,
    .my-profile-grid {
        grid-template-columns: 1fr;
    }

    .site-nav a,
    .site-nav__button {
        min-height: 42px;
    }
}

@media (max-width: 380px) {
    .site-nav {
        grid-template-columns: 1fr;
    }
}
