:root {
    color-scheme: light;
    --bg: #fff6f9;
    --surface: rgb(255 255 255 / 0.86);
    --surface-strong: #ffffff;
    --surface-soft: rgb(255 247 251 / 0.72);
    --text: #181820;
    --muted: #6f6f78;
    --line: rgb(227 207 216 / 0.82);
    --accent: #f05d86;
    --accent-strong: #cc4b9a;
    --accent-deep: #7c3b8f;
    --accent-soft: #ffe9f0;
    --teal: #14696d;
    --danger: #c72d3d;
    --success: #168253;
    --warning: #bd7b22;
    --shadow: 0 18px 50px rgb(107 50 80 / 0.14);
    --shadow-soft: 0 10px 28px rgb(107 50 80 / 0.10);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: url("../images/main_bg.png") center / cover fixed no-repeat var(--bg);
    color: var(--text);
    font-family: Inter, Arial, Helvetica, sans-serif;
    font-size: 14px;
    line-height: 1.38;
    min-height: 100vh;
    padding-bottom: 42px;
}

a {
    color: var(--accent);
}

.app-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    padding: 16px;
    gap: 14px;
}

.app-layout.has-menu {
    grid-template-columns: 240px minmax(0, 1fr);
}

.side-menu {
    position: sticky;
    top: 16px;
    height: calc(100vh - 62px);
    padding: 12px;
    background: linear-gradient(180deg, rgb(255 255 255 / 0.94), rgb(255 248 251 / 0.88));
    border: 1px solid rgb(255 255 255 / 0.82);
    border-radius: 14px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
    display: grid;
    align-content: start;
    gap: 9px;
    overflow-x: hidden;
    overflow-y: auto;
}

.side-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--accent);
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 0;
}

.side-logo img {
    width: 36px;
    height: auto;
    max-height: 36px;
    border-radius: 10px;
    object-fit: contain;
}

.side-user {
    border: 1px solid rgb(255 211 225 / 0.8);
    border-radius: 12px;
    background: rgb(255 255 255 / 0.58);
    color: var(--muted);
    display: grid;
    gap: 4px;
    padding: 8px;
    font-size: 11px;
}

.side-avatar {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ffd2dc, #f06792 52%, #ba61c3);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 17px;
    font-weight: 900;
    box-shadow: 0 10px 20px rgb(240 93 134 / 0.25);
}

.side-user p {
    margin: 0;
}

.side-user strong {
    color: var(--text);
}

.side-nav {
    display: grid;
    gap: 2px;
}

.side-nav a,
.side-nav button,
.button {
    appearance: none;
    border: 1px solid transparent;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent-strong), #ff7f83);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 6px 11px;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 8px 18px rgb(240 93 134 / 0.20);
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.side-nav a,
.side-nav button {
    width: 100%;
    background: transparent;
    border-color: transparent;
    color: #3f3f48;
    justify-content: flex-start;
    min-height: 32px;
    padding: 5px 11px;
    font-size: 13px;
    display: flex;
    box-shadow: none;
}

.side-nav .menu-link-with-badge {
    justify-content: space-between;
}

.menu-badge {
    min-width: 22px;
    height: 22px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ff7b8e, #d75faf);
    color: #fff;
    display: inline-grid;
    place-items: center;
    font-size: 12px;
    line-height: 1;
    padding: 0 6px;
}

.side-nav a:hover,
.side-nav button:hover {
    background: rgb(255 235 243 / 0.9);
    border-color: rgb(248 152 181 / 0.5);
    color: var(--accent-strong);
    transform: translateX(2px);
}

.side-nav a.is-active,
.side-nav a.is-active:hover {
    background: linear-gradient(135deg, var(--accent-strong), #ff7f83);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 12px 24px rgb(240 93 134 / 0.24);
    transform: none;
}

.side-logout {
    margin-top: 8px;
}

.side-logout button {
    width: 100%;
}

.button-secondary {
    background: transparent;
    color: var(--accent);
    border-color: rgb(240 93 134 / 0.36);
    box-shadow: none;
}

.site-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 80;
    min-height: 34px;
    display: grid;
    place-items: center;
    padding: 7px 16px;
    background: linear-gradient(135deg, rgb(204 75 154 / 0.62), rgb(255 127 131 / 0.62));
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    text-align: center;
    box-shadow: 0 -8px 18px rgb(107 50 80 / 0.10);
    backdrop-filter: blur(4px);
}

.page-shell {
    width: min(100%, 1120px);
    margin: 0 auto 22px;
}

.hero,
.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: clamp(14px, 1.8vw, 22px);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}

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

.welcome-art-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
    max-width: 620px;
}

.welcome-art-grid img {
    width: 100%;
    max-height: 260px;
    border: 1px solid rgb(255 255 255 / 0.88);
    border-radius: 14px;
    box-shadow: var(--shadow-soft);
    display: block;
    object-fit: cover;
}

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

h1 {
    font-size: clamp(28px, 2.8vw, 38px);
    letter-spacing: 0;
}

h2 {
    font-size: 19px;
}

p {
    margin: 0 0 10px;
}

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

.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;
}

.welcome-title-image {
    width: min(100%, 720px);
    height: auto;
    display: block;
    margin: 0 0 14px;
}

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

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

.field {
    display: grid;
    gap: 6px;
}

.field-label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.check-status {
    min-height: 20px;
    font-size: 14px;
    font-weight: 700;
    text-align: right;
}

.check-ok {
    color: var(--success);
}

.check-bad {
    color: var(--danger);
}

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

label {
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    min-height: 36px;
    border: 1px solid rgb(225 204 213 / 0.92);
    border-radius: 10px;
    padding: 7px 10px;
    background: rgb(255 255 255 / 0.88);
    color: var(--text);
    font: inherit;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgb(240 93 134 / 0.15);
    outline: 0;
}

textarea {
    resize: vertical;
}

.checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.checkbox input {
    width: 18px;
    min-height: 18px;
    margin-top: 4px;
}

.actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.flash {
    border-radius: 14px;
    margin-bottom: 16px;
    padding: 12px 14px;
    background: rgb(255 255 255 / 0.9);
    border: 1px solid var(--line);
}

.flash-success {
    border-color: #9cc7aa;
    color: var(--success);
}

.flash-danger {
    border-color: #d7a0a0;
    color: var(--danger);
}

.flash-warning {
    border-color: #d9c27a;
    color: var(--warning);
}

.error-list {
    border: 1px solid #d7a0a0;
    border-radius: 6px;
    background: #fff5f5;
    color: var(--danger);
    padding: 12px 16px;
}

.profile-list {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 10px 16px;
}

.profile-list dt {
    color: var(--muted);
    font-weight: 700;
}

.profile-list dd {
    margin: 0;
}

.photo-manager {
    margin-top: 24px;
}

.photo-slots {
    display: grid;
    grid-template-columns: repeat(5, minmax(150px, 1fr));
    gap: 18px;
}

.photo-rules {
    border: 1px solid #e0a15a;
    border-radius: 16px;
    background: rgb(255 247 232 / 0.86);
    padding: 16px;
}

.photo-rules h3 {
    margin-bottom: 8px;
}

.photo-rules ul {
    margin: 6px 0 10px 20px;
}

.photo-rule-confirm {
    font-size: 14px;
}

.photo-slot {
    display: grid;
    gap: 10px;
    align-content: start;
}

.photo-frame {
    aspect-ratio: 4 / 3;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgb(255 250 252 / 0.82);
    display: grid;
    place-items: center;
    overflow: hidden;
    color: var(--muted);
    font-weight: 700;
}

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

.file-button {
    border: 1px dashed rgb(240 93 134 / 0.55);
    border-radius: 12px;
    cursor: pointer;
    color: var(--accent);
    display: grid;
    min-height: 42px;
    place-items: center;
    padding: 8px;
    text-align: center;
}

.file-button input {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

.crop-modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgb(0 0 0 / 0.58);
    display: grid;
    place-items: center;
    padding: 24px;
}

.crop-modal[hidden] {
    display: none;
}

.crop-dialog {
    width: min(100%, 760px);
    max-height: calc(100vh - 48px);
    overflow: auto;
    background: var(--surface-strong);
    border-radius: 18px;
    padding: 20px;
    display: grid;
    gap: 14px;
}

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

.icon-button {
    width: 36px;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}

.crop-stage {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
    overflow: hidden;
    touch-action: none;
}

.crop-size-controls {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    justify-self: center;
}

.crop-size-controls .button {
    min-width: 44px;
    padding: 6px 12px;
}

.publish-confirmation {
    flex-basis: 100%;
    color: var(--muted);
    margin: 0;
}

.crop-stage canvas {
    display: block;
    max-width: 100%;
    height: auto;
}

.crop-box {
    position: absolute;
    border: 2px solid #fff;
    box-shadow: 0 0 0 999px rgb(0 0 0 / 0.35), 0 0 0 1px rgb(0 0 0 / 0.5) inset;
    cursor: move;
    touch-action: none;
}

.vote-toolbar {
    margin-bottom: 10px;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
}

.home-dashboard {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 272px;
    grid-template-areas:
        "vote side"
        "stats recent"
        "forum about";
    gap: 12px;
}

.home-vote-panel {
    grid-area: vote;
}

.home-side {
    grid-area: side;
    align-self: start;
}

.quick-stats {
    grid-area: stats;
}

.recent-panel {
    grid-area: recent;
}

.forum-preview {
    grid-area: forum;
}

.home-about {
    grid-area: about;
    position: relative;
    overflow: hidden;
}

.home-about::after {
    content: "";
    position: absolute;
    right: -28px;
    bottom: -34px;
    width: 180px;
    height: 140px;
    background: url("../images/main_bg.png") right bottom / 520px auto no-repeat;
    opacity: 0.32;
    pointer-events: none;
}

.mini-panel {
    padding: 14px;
}

.mini-panel h2 {
    font-size: 15px;
    margin-bottom: 6px;
}

.mini-panel-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.mini-panel-head h2 {
    margin: 0;
}

.mini-panel-head a {
    color: var(--accent);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.welcome-panel {
    background: linear-gradient(145deg, rgb(255 255 255 / 0.90), rgb(255 233 242 / 0.82));
}

.welcome-panel .button {
    width: 100%;
    margin-top: 4px;
}

.daily-top-list,
.activity-list,
.forum-preview-list,
.stat-list {
    display: grid;
    gap: 8px;
}

.daily-top-row,
.activity-row,
.forum-preview-row {
    display: grid;
    align-items: center;
    gap: 7px;
    color: var(--text);
    text-decoration: none;
}

.daily-top-row {
    grid-template-columns: 22px 26px minmax(0, 1fr) auto;
}

.daily-top-row img {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 6px 14px rgb(107 50 80 / 0.16);
}

.daily-top-row strong,
.activity-row strong,
.forum-preview-row strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.daily-top-row span:last-child {
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}

.rank-badge {
    width: 19px;
    height: 19px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ffd85d, #ff8e5f);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 11px;
    font-weight: 900;
}

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

.stat-list div {
    display: grid;
    gap: 2px;
    border-radius: 12px;
    background: rgb(255 255 255 / 0.62);
    border: 1px solid rgb(255 255 255 / 0.86);
    padding: 8px;
}

.stat-list strong {
    color: var(--accent-strong);
    font-size: 19px;
    line-height: 1;
}

.stat-list span,
.activity-row span,
.activity-row small,
.forum-preview-row span,
.forum-preview-row small {
    color: var(--muted);
    font-size: 12px;
}

.activity-row {
    grid-template-columns: 28px minmax(58px, auto) minmax(0, 1fr) auto;
}

.activity-avatar {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ffd2dc, #f06792 52%, #ba61c3);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 900;
}

.forum-preview-row {
    grid-template-columns: minmax(0, 1fr) auto;
    border-bottom: 1px solid var(--line);
    padding-bottom: 9px;
}

.forum-preview-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.forum-preview-row span {
    grid-column: 1;
}

.forum-preview-row small {
    grid-column: 2;
    grid-row: 1 / span 2;
    min-width: 28px;
    text-align: right;
}

.home-about ul {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 8px;
    margin: 12px 0 0;
    padding-left: 18px;
    font-weight: 700;
}

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

.vote-card {
    display: grid;
    gap: 8px;
    background: rgb(255 255 255 / 0.84);
    border: 1px solid rgb(255 255 255 / 0.92);
    border-radius: 14px;
    padding: 8px;
    box-shadow: var(--shadow-soft);
}

.vote-card button {
    appearance: none;
    border: 0;
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
    padding: 0;
    overflow: hidden;
}

.vote-card img {
    width: 100%;
    height: clamp(190px, 21vw, 235px);
    aspect-ratio: auto;
    border-radius: 12px;
    border: 1px solid rgb(255 255 255 / 0.9);
    object-fit: cover;
    display: block;
    margin: 0 auto;
}

.vote-name {
    font-size: 16px;
    font-weight: 700;
}

.vote-info {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 8px;
    width: 100%;
    margin: 0;
}

.vote-details {
    color: var(--muted);
    display: grid;
    gap: 3px;
    font-size: 11px;
    line-height: 1.25;
    text-align: right;
}

.report-button {
    appearance: none;
    border: 1px solid rgb(240 93 134 / 0.22);
    border-radius: 10px;
    background: rgb(255 255 255 / 0.68);
    color: var(--danger);
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    min-height: 32px;
    padding: 6px 10px;
    text-decoration: none;
}

.report-button:hover {
    background: var(--accent-soft);
}

.report-status {
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

.messages-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
    align-items: end;
    gap: 18px;
}

.message-start {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 10px;
}

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

.conversation-list {
    border-right: 1px solid var(--line);
    padding-right: 16px;
    display: grid;
    align-content: start;
    gap: 10px;
}

.conversation-list-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.conversation-link {
    border: 1px solid var(--line);
    border-radius: 16px;
    color: var(--text);
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    text-decoration: none;
}

.conversation-delete {
    min-height: 100%;
    padding: 6px 9px;
    font-size: 12px;
}

.conversation-link span {
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
}

.conversation-panel {
    display: grid;
    gap: 16px;
    min-width: 0;
}

.conversation-topbar,
.message-report-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 16px;
}

.conversation-actions,
.message-report-head .actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.message-thread {
    border: 1px solid var(--line);
    border-radius: 16px;
    display: grid;
    gap: 10px;
    max-height: 520px;
    overflow: auto;
    padding: 14px;
}

.message-bubble {
    border: 1px solid var(--line);
    border-radius: 16px;
    max-width: min(78%, 620px);
    padding: 10px 12px;
}

.message-own {
    justify-self: end;
    background: #eef8f6;
}

.message-other {
    justify-self: start;
    background: #fff;
}

.message-meta {
    color: var(--muted);
    display: flex;
    font-size: 12px;
    gap: 8px;
    justify-content: space-between;
    margin-bottom: 6px;
}

.message-compose,
.report-conversation {
    display: grid;
    gap: 10px;
}

.report-conversation summary {
    color: var(--danger);
    cursor: pointer;
    font-weight: 700;
}

.userlist-filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    align-items: end;
}

.userlist-filters .checkbox {
    align-self: center;
}

.userlist-summary {
    color: var(--muted);
    font-size: 14px;
}

.userlist-table-wrap {
    overflow-x: auto;
}

.userlist-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: rgb(255 255 255 / 0.66);
    border: 1px solid var(--line);
    border-radius: 16px;
    overflow: hidden;
}

.userlist-table th,
.userlist-table td {
    border-bottom: 1px solid var(--line);
    padding: 10px;
    text-align: left;
    vertical-align: middle;
}

.userlist-table th {
    color: var(--muted);
    font-size: 13px;
}

.userlist-photo {
    width: 62px;
    height: 46px;
    border: 1px solid var(--line);
    border-radius: 10px;
    display: grid;
    place-items: center;
    object-fit: cover;
}

.userlist-photo-empty {
    color: var(--muted);
    font-size: 11px;
    text-align: center;
}

.userlist-message-button {
    min-height: 32px;
    padding: 6px 10px;
    white-space: nowrap;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.ban-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgb(0 0 0 / 0.62);
    display: grid;
    place-items: center;
    padding: 24px;
}

.ban-modal[hidden] {
    display: none;
}

.ban-dialog {
    width: min(100%, 520px);
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--line);
    padding: 28px;
    box-shadow: 0 20px 70px rgb(0 0 0 / 0.24);
}

.ban-dialog h2 {
    color: var(--danger);
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgb(0 0 0 / 0.5);
    display: grid;
    place-items: center;
    padding: 24px;
}

.modal-backdrop[hidden] {
    display: none;
}

.confirm-dialog {
    width: min(100%, 460px);
    border-radius: 18px;
    background: #fff;
    padding: 24px;
    display: grid;
    gap: 14px;
}

.admin-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

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

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

.admin-photo-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(110px, 1fr));
    gap: 16px;
}

.admin-photo-card {
    display: grid;
    gap: 8px;
}

.admin-photo-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    border: 1px solid var(--line);
    border-radius: 12px;
    object-fit: cover;
}

.message-report-list {
    display: grid;
    gap: 18px;
}

.message-report-card {
    border: 1px solid var(--line);
    border-radius: 16px;
    display: grid;
    gap: 14px;
    padding: 16px;
}

.admin-thread {
    background: #fafbf9;
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 10px;
    max-height: 360px;
    overflow: auto;
    padding: 12px;
}

.admin-message-line {
    border-bottom: 1px solid var(--line);
    display: grid;
    gap: 4px;
    padding-bottom: 8px;
}

.admin-message-line:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.admin-message-line span,
.admin-message-line em {
    color: var(--muted);
    font-size: 12px;
}

.top10-sections {
    display: grid;
    gap: 34px;
}

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

.top10-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(110px, 1fr));
    gap: 16px;
}

.top10-card {
    position: relative;
    display: grid;
    gap: 7px;
    align-content: start;
    text-align: center;
}

.top10-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    border: 1px solid var(--line);
    border-radius: 14px;
    object-fit: cover;
    background: #f0f0ea;
}

.top10-rank {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: rgb(255 255 255 / 0.92);
    border: 1px solid var(--line);
    display: grid;
    place-items: center;
    font-size: 13px;
    font-weight: 700;
}

.top10-name {
    font-weight: 700;
}

.top10-votes {
    color: var(--muted);
    font-size: 13px;
}

.section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.forum-category-list,
.forum-thread-list,
.forum-post-list {
    display: grid;
    gap: 12px;
}

.forum-category-card,
.forum-thread-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px;
    color: var(--text);
    text-decoration: none;
    background: rgb(255 255 255 / 0.78);
    box-shadow: var(--shadow-soft);
}

.forum-category-card:hover,
.forum-thread-row:hover {
    border-color: var(--accent);
}

.forum-category-announcements {
    border-color: #e0a15a;
    background: #fff2df;
}

.forum-category-introductions {
    border-color: #9cc7aa;
    background: #eef8f0;
}

.forum-category-dating {
    border-color: #dea6b7;
    background: #fff0f5;
}

.forum-category-photo-tips {
    border-color: #99b9d8;
    background: #eff6ff;
}

.forum-category-culture {
    border-color: #b9a3da;
    background: #f6f1ff;
}

.forum-category-offtopic {
    border-color: #d7c681;
    background: #fff9dc;
}

.forum-category-support {
    border-color: #8fc7c9;
    background: #ecfbfb;
}

.forum-category-card strong,
.forum-thread-row strong {
    display: block;
    font-size: 22px;
}

.forum-category-card small,
.forum-thread-row small,
.forum-stats {
    color: var(--muted);
}

.forum-stats {
    min-width: 90px;
    text-align: right;
}

.forum-post {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px;
    background: rgb(255 255 255 / 0.82);
}

.forum-post-main,
.forum-post-author-reply {
    border-color: #e0a15a;
    background: #fff2df;
}

.forum-post-main {
    padding: 18px;
}

.forum-post-reply {
    margin-left: 58px;
}

.forum-post header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 10px;
}

.forum-post p {
    margin-bottom: 0;
}

.admin-forum-grid {
    display: grid;
    grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
    gap: 24px;
    align-items: start;
}

.about-page {
    max-width: 1120px;
}

.about-copy {
    display: grid;
    gap: 8px;
    max-width: 920px;
    font-size: 18px;
    line-height: 1.58;
}

.about-copy p {
    margin: 0;
}

.about-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 10px;
}

.about-meta div {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px;
    background: #f9faf6;
}

.about-meta strong,
.about-meta span {
    display: block;
}

.about-meta strong {
    margin-bottom: 6px;
}

@media (max-width: 760px) {
    .hero,
    .grid,
    .welcome-art-grid,
    .vote-grid,
    .messages-header,
    .message-start,
    .messages-layout,
    .userlist-filters {
        grid-template-columns: 1fr;
    }

    .section-head,
    .forum-category-card,
    .forum-thread-row {
        display: grid;
    }

    .forum-stats {
        min-width: 0;
        text-align: left;
    }

    .forum-post-reply {
        margin-left: 0;
    }

    .admin-forum-grid {
        grid-template-columns: 1fr;
    }

    .about-meta {
        grid-template-columns: 1fr;
    }

    .conversation-list {
        border-right: 0;
        border-bottom: 1px solid var(--line);
        padding: 0 0 16px;
    }

    .message-bubble {
        max-width: 100%;
    }

    .app-layout {
        display: grid;
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .app-layout.has-menu {
        grid-template-columns: 1fr;
    }

    .side-menu {
        position: static;
        height: auto;
        border-right: 1px solid var(--line);
        border-bottom: 1px solid var(--line);
        padding: 16px 18px;
    }

    .side-logo img {
        width: 48px;
        max-height: 48px;
    }

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

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

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

    .vote-toolbar {
        display: grid;
        align-items: stretch;
    }

    .home-dashboard {
        grid-template-columns: 1fr;
        grid-template-areas:
            "vote"
            "side"
            "stats"
            "recent"
            "forum"
            "about";
    }

    .stat-list,
    .activity-row {
        grid-template-columns: 1fr;
    }

    .activity-avatar {
        display: none;
    }
}

@media (min-width: 761px) and (max-width: 1180px) {
    .home-dashboard {
        grid-template-columns: 1fr;
        grid-template-areas:
            "vote"
            "side"
            "stats"
            "recent"
            "forum"
            "about";
    }

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

.admin-login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.admin-login-shell {
    width: min(460px, 100%);
}

.admin-login-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 32px;
}

.admin-login-card h1 {
    font-size: 34px;
    margin-bottom: 18px;
}
