/* ==========================================================================
   蓝伴语音厅排行榜 · Visual system
   ========================================================================== */

:root {
    --bg: #07101e;
    --bg-deep: #050c17;
    --surface: rgba(13, 25, 44, 0.82);
    --surface-strong: #0d1a2e;
    --surface-soft: rgba(255, 255, 255, 0.035);
    --line: rgba(151, 184, 231, 0.13);
    --line-strong: rgba(151, 184, 231, 0.24);
    --text: #eff6ff;
    --text-soft: #c9d8ec;
    --muted: #91a4bf;
    --subtle: #6a7e99;
    --accent: #63d7ff;
    --accent-blue: #6f9dff;
    --accent-violet: #b985ff;
    --gold: #ffd37c;
    --gold-deep: #e7a83f;
    --silver: #dbe9fb;
    --bronze: #efb38b;
    --danger: #ff8392;
    --success: #5bddb2;
    --warning: #ffc86b;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --radius-xl: 30px;
    --shadow-soft: 0 22px 70px rgba(0, 0, 0, 0.32);
    --shadow-card: 0 18px 50px rgba(1, 8, 20, 0.34);
    --gradient-brand: linear-gradient(135deg, #5ce1ff 0%, #7892ff 52%, #c387ff 100%);
    --gradient-button: linear-gradient(120deg, #60dfff 0%, #7e9bff 52%, #b986ff 100%);
    --max-width: 1180px;
    --font-sans: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
    --font-number: "SFMono-Regular", "Cascadia Code", "Segoe UI", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg-deep);
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 12% -10%, rgba(45, 103, 196, 0.2), transparent 38%),
        radial-gradient(circle at 92% 8%, rgba(118, 66, 190, 0.13), transparent 34%),
        var(--bg);
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

body.has-my-rank {
    padding-bottom: 106px;
}

h1,
h2,
h3,
h4,
p,
dl,
dd,
figure {
    margin: 0;
}

h1,
h2,
h3,
h4 {
    line-height: 1.25;
    letter-spacing: -0.02em;
}

a {
    color: inherit;
    text-decoration: none;
}

img,
svg {
    display: block;
}

img {
    max-width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
}

::selection {
    color: #07101e;
    background: var(--accent);
}

[hidden] {
    display: none !important;
}

:focus-visible {
    outline: 2px solid rgba(99, 215, 255, 0.9);
    outline-offset: 3px;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 2000;
    padding: 10px 16px;
    border-radius: 10px;
    background: #f1f8ff;
    color: #07101e;
    font-weight: 700;
    transform: translateY(-160%);
    transition: transform 0.2s ease;
}

.skip-link:focus {
    transform: translateY(0);
}

.scene {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.scene__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(10px);
    opacity: 0.7;
}

.scene__orb--one {
    width: 620px;
    height: 620px;
    top: -260px;
    left: -180px;
    background: radial-gradient(circle, rgba(52, 128, 236, 0.22), transparent 66%);
}

.scene__orb--two {
    width: 540px;
    height: 540px;
    right: -200px;
    top: 14%;
    background: radial-gradient(circle, rgba(155, 100, 255, 0.14), transparent 66%);
}

.scene__orb--three {
    width: 700px;
    height: 700px;
    bottom: -480px;
    left: 34%;
    background: radial-gradient(circle, rgba(36, 155, 202, 0.12), transparent 66%);
}

.scene__grid {
    position: absolute;
    inset: 0;
    opacity: 0.14;
    background-image:
        linear-gradient(rgba(137, 175, 226, 0.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(137, 175, 226, 0.12) 1px, transparent 1px);
    background-size: 78px 78px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent 78%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent 78%);
}

.noscript-note {
    position: relative;
    z-index: 500;
    padding: 10px 20px;
    color: #412701;
    background: #ffd37c;
    text-align: center;
    font-size: 13px;
}

.icon {
    width: 1.16em;
    height: 1.16em;
    flex: 0 0 auto;
}

.mono {
    font-family: var(--font-number);
    letter-spacing: 0.02em;
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #80cff2;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.eyebrow-line {
    width: 22px;
    height: 1px;
    background: linear-gradient(90deg, var(--accent), transparent);
}

.live-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 4px rgba(91, 221, 178, 0.1), 0 0 12px rgba(91, 221, 178, 0.75);
    animation: live-pulse 2.4s ease-in-out infinite;
}

.status-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 12px rgba(91, 221, 178, 0.8);
}

.mini-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    padding: 1px 6px;
    border: 1px solid rgba(255, 211, 124, 0.28);
    border-radius: 999px;
    color: var(--gold);
    background: rgba(255, 211, 124, 0.1);
    font-size: 9px;
    font-style: normal;
    font-weight: 700;
    line-height: 1.5;
    vertical-align: 1px;
    letter-spacing: 0.04em;
}

.manager-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border: 1px solid rgba(255, 211, 124, 0.25);
    border-radius: 999px;
    color: #ffdf9f;
    background: linear-gradient(135deg, rgba(255, 200, 98, 0.16), rgba(255, 255, 255, 0.03));
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
    line-height: 1.55;
    letter-spacing: 0.03em;
}

.manager-tag .icon {
    width: 11px;
    height: 11px;
}

.status-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.6;
    white-space: nowrap;
}

.status-tag--on {
    color: #8ff0d2;
    background: rgba(77, 216, 173, 0.1);
    border: 1px solid rgba(77, 216, 173, 0.18);
}

.status-tag--off {
    color: #c2cee0;
    background: rgba(165, 183, 210, 0.1);
    border: 1px solid rgba(165, 183, 210, 0.16);
}

.self-tag {
    display: inline-flex;
    align-items: center;
    padding: 1px 6px;
    border-radius: 999px;
    color: #9fe8ff;
    background: rgba(99, 215, 255, 0.12);
    font-size: 9px;
    font-weight: 700;
}

/* --------------------------------------------------------------------------
   Buttons & forms
   -------------------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: var(--text);
    background: transparent;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, opacity 0.18s ease, box-shadow 0.18s ease;
}

.btn .icon {
    width: 16px;
    height: 16px;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn--primary {
    color: #06101e;
    background: var(--gradient-button);
    border-color: rgba(255, 255, 255, 0.24);
    box-shadow: 0 10px 30px rgba(78, 155, 255, 0.2);
}

.btn--primary:hover {
    box-shadow: 0 14px 38px rgba(78, 155, 255, 0.32);
    filter: brightness(1.04);
}

.btn--ghost {
    color: var(--text-soft);
    background: rgba(255, 255, 255, 0.035);
    border-color: var(--line);
}

.btn--ghost:hover {
    color: var(--text);
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.06);
}

.btn--soft {
    color: #bcecff;
    background: rgba(99, 215, 255, 0.09);
    border-color: rgba(99, 215, 255, 0.18);
}

.btn--soft:hover {
    background: rgba(99, 215, 255, 0.14);
    border-color: rgba(99, 215, 255, 0.32);
}

.btn--danger-soft {
    color: #ffb4bd;
    background: rgba(255, 104, 122, 0.09);
    border-color: rgba(255, 113, 132, 0.2);
}

.btn--danger-soft:hover {
    background: rgba(255, 104, 122, 0.14);
    border-color: rgba(255, 113, 132, 0.36);
}

.btn--sm {
    min-height: 36px;
    padding: 7px 13px;
    border-radius: 10px;
    font-size: 12px;
}

.btn--sm .icon {
    width: 14px;
    height: 14px;
}

.btn--lg {
    min-height: 51px;
    padding: 14px 22px;
    border-radius: 14px;
    font-size: 14px;
}

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

.btn:disabled,
.btn.is-disabled {
    opacity: 0.45;
    pointer-events: none;
    transform: none;
    box-shadow: none;
}

.btn.is-submitting {
    opacity: 0.65;
}

.icon-button {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--muted);
    background: transparent;
    transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.icon-button .icon {
    width: 17px;
    height: 17px;
}

.icon-button:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

.icon-button--bordered {
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.025);
}

.icon-button--bordered:hover {
    border-color: var(--line-strong);
}

.logout-form {
    margin: 0;
    display: flex;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.field > label,
.filter-field > span,
.compact-score-grid label > span:first-child,
.score-field__period {
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 650;
    letter-spacing: 0.01em;
}

.field-hint {
    margin: 0;
    color: var(--subtle);
    font-size: 11.5px;
    line-height: 1.65;
}

.label-optional {
    margin-left: 4px;
    color: var(--subtle);
    font-size: 10px;
    font-weight: 500;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="email"],
select,
textarea {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--text);
    background-color: rgba(4, 12, 23, 0.56);
    font-size: 14px;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

textarea {
    min-height: 110px;
    padding: 12px 14px;
    resize: vertical;
}

input::placeholder,
textarea::placeholder {
    color: #5e718b;
}

input[type="text"]:hover,
input[type="password"]:hover,
input[type="number"]:hover,
input[type="search"]:hover,
select:hover,
textarea:hover {
    border-color: var(--line-strong);
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
select:focus,
textarea:focus {
    border-color: rgba(99, 215, 255, 0.55);
    background-color: rgba(5, 15, 29, 0.78);
    box-shadow: 0 0 0 3px rgba(99, 215, 255, 0.09);
}

input[type="number"] {
    font-family: var(--font-number);
    font-variant-numeric: tabular-nums;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

input[type="number"] {
    -moz-appearance: textfield;
}

select {
    padding-right: 38px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2389a0c0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
}

.input-shell {
    position: relative;
    display: flex;
    align-items: center;
}

.input-shell > .icon {
    position: absolute;
    left: 14px;
    z-index: 1;
    width: 16px;
    height: 16px;
    color: #7187a5;
    pointer-events: none;
}

.input-shell > input {
    padding-left: 41px;
}

.input-shell > input[type="password"],
.input-shell > input[type="text"] {
    padding-right: 62px;
}

.input-shell--search > input {
    padding-right: 14px;
}

.password-toggle {
    position: absolute;
    right: 10px;
    z-index: 1;
    padding: 4px 6px;
    border: 0;
    border-radius: 6px;
    color: var(--muted);
    background: transparent;
    font-size: 11px;
    font-weight: 600;
}

.password-toggle:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

.password-toggle[aria-pressed="true"] {
    color: var(--accent);
}

.form-stack {
    display: flex;
    flex-direction: column;
    gap: 17px;
}

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

.form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 2px;
}

.form-actions__note {
    margin-right: auto;
    color: var(--subtle);
    font-size: 11px;
}

.inline-alert {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 11px 13px;
    border: 1px solid rgba(255, 200, 107, 0.15);
    border-radius: 11px;
    color: #d9c397;
    background: rgba(255, 200, 107, 0.055);
    font-size: 11.5px;
    line-height: 1.7;
}

.inline-alert .icon {
    width: 15px;
    height: 15px;
    margin-top: 1px;
    color: var(--warning);
}

.file-native {
    width: 100%;
    padding: 8px;
    border: 1px dashed var(--line-strong);
    border-radius: 11px;
    color: var(--muted);
    background: rgba(4, 12, 23, 0.34);
    font-size: 11px;
}

.file-native::file-selector-button {
    margin-right: 10px;
    padding: 7px 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text-soft);
    background: rgba(255, 255, 255, 0.05);
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}

.check-field {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.022);
    cursor: pointer;
}

.check-field input {
    width: 16px;
    height: 16px;
    margin: 3px 0 0;
    accent-color: var(--accent);
    flex: 0 0 auto;
}

.check-field strong {
    display: block;
    color: var(--text-soft);
    font-size: 12px;
}

.check-field small {
    display: block;
    margin-top: 2px;
    color: var(--subtle);
    font-size: 11px;
    line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Shared file/avatar widgets
   -------------------------------------------------------------------------- */

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: #12233c;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.avatar--xs {
    width: 32px;
    height: 32px;
}

.avatar--sm {
    width: 38px;
    height: 38px;
}

.avatar-upload {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
}

.avatar-upload--compact {
    padding: 11px;
}

.avatar-upload__preview img {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.avatar-upload__preview--hall img {
    border-radius: 18px;
}

.avatar-upload__copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
    min-width: 0;
}

.avatar-upload__copy p {
    color: var(--subtle);
    font-size: 11px;
    line-height: 1.6;
}

.avatar-upload__button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 11px;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--text-soft);
    background: rgba(255, 255, 255, 0.04);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease;
}

.avatar-upload__button:hover {
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.07);
}

.avatar-upload__button .icon {
    width: 13px;
    height: 13px;
}

.avatar-upload .file-native {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    opacity: 0;
    border: 0;
}

.current-avatar-note {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--subtle);
    font-size: 11px;
}

.current-avatar-note img {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid var(--line);
}

/* --------------------------------------------------------------------------
   Panels, headers, generic fragments
   -------------------------------------------------------------------------- */

.panel {
    position: relative;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.008)),
        var(--surface);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.panel__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 22px;
}

.panel__head--wrap {
    flex-wrap: wrap;
}

.panel__head h2 {
    margin-top: 4px;
    font-size: 22px;
}

.panel__lead {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.7;
}

.panel__lead strong {
    color: var(--text-soft);
}

.panel__icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: 11px;
    color: #83d6f5;
    background: rgba(99, 215, 255, 0.06);
}

.panel__icon .icon {
    width: 17px;
    height: 17px;
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin: 34px 0 18px;
}

.section-heading h2 {
    margin-top: 4px;
    font-size: 25px;
}

.section-heading__meta {
    color: var(--subtle);
    font-size: 12px;
}

.empty-inline {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 44px 22px;
    text-align: center;
}

.empty-inline > .icon {
    width: 30px;
    height: 30px;
    margin-bottom: 12px;
    color: var(--subtle);
}

.empty-inline h3 {
    margin-bottom: 5px;
    color: var(--text-soft);
    font-size: 16px;
}

.empty-inline p {
    margin-bottom: 17px;
    color: var(--subtle);
    font-size: 12px;
}

.empty-inline--large {
    min-height: 270px;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 64px 28px;
    text-align: center;
}

.empty-state__icon {
    display: grid;
    place-items: center;
    width: 66px;
    height: 66px;
    margin-bottom: 18px;
    border: 1px solid rgba(99, 215, 255, 0.16);
    border-radius: 20px;
    color: #7edaff;
    background: rgba(99, 215, 255, 0.06);
}

.empty-state__icon .icon {
    width: 28px;
    height: 28px;
}

.empty-state h2 {
    margin-bottom: 6px;
    font-size: 23px;
}

.empty-state p {
    max-width: 420px;
    margin-bottom: 22px;
    color: var(--muted);
    font-size: 13px;
}

/* --------------------------------------------------------------------------
   Toasts
   -------------------------------------------------------------------------- */

.toast-stack {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    gap: 9px;
    width: min(380px, calc(100vw - 32px));
    pointer-events: none;
}

.page-rank .toast-stack:not(.toast-stack--bottom),
.page-console .toast-stack:not(.toast-stack--bottom) {
    top: 92px;
}

.toast-stack--bottom {
    top: auto;
    bottom: 22px;
}

body.has-my-rank .toast-stack--bottom {
    bottom: 104px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 12px 12px 14px;
    border: 1px solid var(--line-strong);
    border-left: 3px solid #87a4c8;
    border-radius: 12px;
    background: rgba(10, 21, 37, 0.94);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.36);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: var(--text-soft);
    font-size: 12px;
    line-height: 1.55;
    pointer-events: auto;
    animation: toast-in 0.26s ease both;
}

.toast.is-leaving {
    animation: toast-out 0.22s ease both;
}

.toast--success {
    border-left-color: var(--success);
}

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

.toast--warning {
    border-left-color: var(--warning);
}

.toast--info {
    border-left-color: var(--accent);
}

.toast__icon {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    border-radius: 7px;
    color: var(--accent);
    background: rgba(99, 215, 255, 0.08);
}

.toast--success .toast__icon {
    color: var(--success);
    background: rgba(91, 221, 178, 0.08);
}

.toast--error .toast__icon {
    color: #ff9eaa;
    background: rgba(255, 131, 146, 0.09);
}

.toast__icon .icon {
    width: 13px;
    height: 13px;
}

.toast__dot {
    width: 6px;
    height: 6px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--accent);
}

.toast__message {
    flex: 1;
    min-width: 0;
}

.toast__close {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 7px;
    color: var(--subtle);
    background: transparent;
    flex: 0 0 auto;
}

.toast__close:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}

.toast__close .icon {
    width: 13px;
    height: 13px;
}

/* --------------------------------------------------------------------------
   Dialogs
   -------------------------------------------------------------------------- */

.app-dialog {
    width: min(560px, calc(100vw - 28px));
    max-height: min(92vh, 900px);
    padding: 0;
    border: 1px solid var(--line-strong);
    border-radius: 22px;
    color: var(--text);
    background:
        radial-gradient(circle at 100% 0, rgba(79, 100, 212, 0.16), transparent 38%),
        #0b1829;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.56);
    overflow: hidden;
}

.app-dialog--wide {
    width: min(960px, calc(100vw - 28px));
}

.app-dialog::backdrop {
    background: rgba(2, 7, 15, 0.76);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.app-dialog[open] {
    animation: dialog-in 0.24s ease both;
}

.dialog-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 26px 18px;
    border-bottom: 1px solid var(--line);
}

.dialog-head h2 {
    margin-top: 3px;
    font-size: 23px;
}

.dialog-body {
    max-height: calc(min(92vh, 900px) - 96px);
    padding: 22px 26px 26px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.dialog-intro {
    margin-bottom: 19px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.7;
}

.dialog-intro strong {
    color: var(--text-soft);
}

.dialog-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 4px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

/* --------------------------------------------------------------------------
   Public site · header, hero
   -------------------------------------------------------------------------- */

.rank-app {
    position: relative;
    min-height: 100vh;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    border-bottom: 1px solid rgba(151, 184, 231, 0.09);
    background: rgba(6, 14, 26, 0.72);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    width: min(var(--max-width), calc(100% - 56px));
    min-height: 78px;
    margin: 0 auto;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

.brand-mark {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(169, 213, 255, 0.28);
    border-radius: 13px;
    background:
        radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.28), transparent 32%),
        linear-gradient(145deg, rgba(82, 221, 255, 0.18), rgba(131, 120, 255, 0.22) 58%, rgba(197, 126, 255, 0.12));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 8px 30px rgba(86, 151, 255, 0.15);
    overflow: hidden;
}

.brand-mark::after {
    content: "";
    position: absolute;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(97, 209, 255, 0.22);
    filter: blur(12px);
}

.brand-mark span {
    position: relative;
    z-index: 1;
    width: 3px;
    border-radius: 99px;
    background: linear-gradient(to top, #63d7ff, #c0a3ff);
    box-shadow: 0 0 8px rgba(99, 215, 255, 0.5);
}

.brand-mark span:nth-child(1) {
    height: 9px;
}

.brand-mark span:nth-child(2) {
    height: 19px;
}

.brand-mark span:nth-child(3) {
    height: 27px;
}

.brand-mark span:nth-child(4) {
    height: 16px;
}

.brand-mark span:nth-child(5) {
    height: 8px;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.brand-copy strong {
    font-size: 19px;
    font-weight: 750;
    line-height: 1.2;
    letter-spacing: 0.13em;
}

.brand-copy small {
    color: #7589a5;
    font-family: var(--font-number);
    font-size: 7px;
    line-height: 1.4;
    letter-spacing: 0.16em;
}

.brand--large .brand-mark {
    width: 50px;
    height: 50px;
    border-radius: 15px;
}

.brand--large .brand-copy strong {
    font-size: 22px;
}

.brand--large .brand-copy small {
    font-size: 8px;
}

.brand--compact .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 11px;
}

.brand--compact .brand-copy strong {
    font-size: 17px;
}

.brand--compact .brand-copy small {
    font-size: 6.5px;
}

.site-header__actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.live-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 9px;
    border: 1px solid rgba(91, 221, 178, 0.16);
    border-radius: 999px;
    color: #94aabc;
    font-family: var(--font-number);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.13em;
}

.session-user {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 4px 11px 4px 4px;
    border: 1px solid transparent;
    border-radius: 999px;
    transition: background 0.18s ease, border-color 0.18s ease;
}

.session-user:hover {
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.035);
}

.session-user__copy {
    display: flex;
    flex-direction: column;
    gap: 0;
    line-height: 1.35;
}

.session-user__copy strong {
    max-width: 150px;
    overflow: hidden;
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.session-user__copy small {
    color: var(--subtle);
    font-size: 9px;
}

.rank-main {
    width: min(var(--max-width), calc(100% - 56px));
    margin: 0 auto;
    padding: 64px 0 72px;
}

.rank-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 390px;
    align-items: center;
    gap: 60px;
    min-height: 330px;
}

.rank-hero__copy {
    max-width: 650px;
}

.rank-hero .eyebrow {
    margin-bottom: 19px;
    color: #88ccea;
}

.rank-hero h1 {
    margin: 0;
    font-size: clamp(42px, 5.2vw, 69px);
    font-weight: 750;
    line-height: 1.13;
    letter-spacing: -0.055em;
}

.rank-hero h1 span {
    color: transparent;
    background: linear-gradient(100deg, #fff 8%, #9fe9ff 45%, #b9acff 88%);
    -webkit-background-clip: text;
    background-clip: text;
    text-shadow: 0 0 60px rgba(105, 191, 255, 0.13);
}

.rank-hero__lead {
    max-width: 500px;
    margin-top: 20px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.85;
}

.rank-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-top: 28px;
    color: #869bb8;
    font-size: 11px;
}

.rank-hero__meta > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.rank-hero__meta .icon {
    width: 13px;
    height: 13px;
    color: #6fbedf;
}

.rank-hero__visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 330px;
    isolation: isolate;
}

.rank-hero__visual::before {
    content: "";
    position: absolute;
    width: 270px;
    height: 270px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(83, 151, 255, 0.16), transparent 67%);
    filter: blur(8px);
}

.hero-orbit {
    position: absolute;
    border: 1px solid rgba(120, 165, 239, 0.13);
    border-radius: 50%;
}

.hero-orbit::before,
.hero-orbit::after {
    content: "";
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #a7e8ff;
    box-shadow: 0 0 12px rgba(128, 226, 255, 0.9);
}

.hero-orbit--outer {
    width: 332px;
    height: 332px;
    transform: rotate(-16deg);
    animation: orbit-spin 32s linear infinite;
}

.hero-orbit--outer::before {
    top: 24px;
    left: 74px;
}

.hero-orbit--outer::after {
    right: 25px;
    bottom: 96px;
    background: #b9a5ff;
}

.hero-orbit--inner {
    width: 240px;
    height: 240px;
    border-style: dashed;
    opacity: 0.8;
    animation: orbit-spin-reverse 26s linear infinite;
}

.hero-orbit--inner::before {
    top: 74px;
    right: 9px;
}

.hero-orbit--inner::after {
    left: 22px;
    bottom: 68px;
    background: #ffd891;
}

.hero-medallion {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 158px;
    height: 158px;
    border: 1px solid rgba(161, 205, 255, 0.25);
    border-radius: 50%;
    color: #bcefff;
    background:
        radial-gradient(circle at 38% 25%, rgba(124, 214, 255, 0.22), transparent 34%),
        linear-gradient(145deg, rgba(23, 47, 82, 0.92), rgba(13, 27, 52, 0.96));
    box-shadow:
        inset 0 0 40px rgba(76, 157, 255, 0.11),
        0 0 0 12px rgba(89, 155, 255, 0.035),
        0 24px 70px rgba(0, 0, 0, 0.3);
}

.hero-medallion .icon {
    width: 43px;
    height: 43px;
    color: #c4f1ff;
    filter: drop-shadow(0 0 10px rgba(101, 213, 255, 0.38));
}

.hero-medallion span {
    color: #769cc2;
    font-family: var(--font-number);
    font-size: 7px;
    letter-spacing: 0.28em;
}

.hero-wave {
    position: absolute;
    bottom: 32px;
    left: 50%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
    width: 230px;
    height: 46px;
    transform: translateX(-50%);
    opacity: 0.46;
}

.hero-wave span {
    width: 3px;
    height: var(--h);
    border-radius: 999px;
    background: linear-gradient(to top, rgba(106, 145, 255, 0.1), #76dfff);
    animation: sound-wave 2.2s ease-in-out infinite alternate;
}

.hero-wave span:nth-child(2n) {
    animation-delay: -0.7s;
}

.hero-wave span:nth-child(3n) {
    animation-delay: -1.2s;
}

.hero-wave span:nth-child(5n) {
    animation-delay: -0.35s;
}

.hero-spark {
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #9deaff;
    box-shadow: 0 0 18px rgba(136, 229, 255, 0.85);
    opacity: 0.75;
}

.hero-spark--one {
    top: 54px;
    left: 54px;
}

.hero-spark--two {
    right: 34px;
    top: 126px;
    width: 4px;
    height: 4px;
    background: #d0b6ff;
}

.hero-spark--three {
    left: 72px;
    bottom: 76px;
    width: 3px;
    height: 3px;
    background: #ffd38a;
}

/* --------------------------------------------------------------------------
   Public site · leaderboard
   -------------------------------------------------------------------------- */

.rank-board {
    margin-top: 54px;
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background:
        radial-gradient(circle at 88% 0, rgba(113, 82, 186, 0.12), transparent 33%),
        linear-gradient(160deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.005)),
        rgba(9, 19, 34, 0.78);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

.rank-board__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.rank-board__title h2 {
    margin-top: 3px;
    font-size: 30px;
    letter-spacing: -0.045em;
}

.rank-board__title h2 span {
    color: #b9f0ff;
}

.period-tabs {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: rgba(4, 12, 22, 0.55);
}

.period-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    min-width: 86px;
    padding: 7px 15px 6px;
    border: 1px solid transparent;
    border-radius: 9px;
    color: #8397b2;
    background: transparent;
    transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.period-tab:hover {
    color: var(--text-soft);
    background: rgba(255, 255, 255, 0.035);
}

.period-tab.is-active {
    color: #f4fbff;
    border-color: rgba(99, 215, 255, 0.2);
    background:
        linear-gradient(135deg, rgba(99, 215, 255, 0.14), rgba(127, 119, 255, 0.14));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.period-tab__label {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
}

.period-tab__hint {
    color: #536984;
    font-family: var(--font-number);
    font-size: 6.5px;
    font-weight: 600;
    letter-spacing: 0.14em;
}

.period-tab.is-active .period-tab__hint {
    color: #6fa9c4;
}

.rank-board__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 24px;
    padding-bottom: 17px;
    border-bottom: 1px solid rgba(151, 184, 231, 0.09);
}

.rank-board__count {
    display: flex;
    align-items: baseline;
    gap: 6px;
    color: var(--subtle);
    font-size: 11px;
}

.count-number {
    color: #cbe5f7;
    font-family: var(--font-number);
    font-size: 15px;
    font-weight: 700;
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #7690ad;
    font-size: 10px;
}

.live-indicator .live-dot {
    width: 5px;
    height: 5px;
}

.live-indicator.is-syncing .live-dot {
    background: var(--accent);
    box-shadow: 0 0 0 4px rgba(99, 215, 255, 0.08);
}

.live-indicator.has-error {
    color: #dca7a1;
}

.live-indicator.has-error .live-dot {
    background: var(--danger);
    box-shadow: 0 0 0 4px rgba(255, 131, 146, 0.08);
    animation: none;
}

.live-time {
    color: #4f647d;
    font-family: var(--font-number);
    font-size: 9px;
}

.poll-notice {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 12px 0 0;
    padding: 10px 13px;
    border: 1px solid rgba(255, 131, 146, 0.15);
    border-radius: 10px;
    color: #e6bcb8;
    background: rgba(255, 131, 146, 0.055);
    font-size: 11px;
}

.poll-notice .icon {
    width: 14px;
    height: 14px;
    color: var(--danger);
}

.rank-list-head {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr) 220px 118px;
    gap: 18px;
    padding: 15px 20px 8px;
    color: #4f627a;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.rank-list-head span:nth-child(3) {
    padding-left: 2px;
}

.rank-list-head span:last-child {
    text-align: right;
}

.rank-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rank-row {
    position: relative;
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr) 220px 118px;
    align-items: center;
    gap: 18px;
    min-height: 90px;
    padding: 14px 20px;
    border: 1px solid transparent;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.017);
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
    border-color: rgba(151, 184, 231, 0.13);
    background: rgba(255, 255, 255, 0.032);
}

.rank-row--gold {
    border-color: rgba(255, 206, 115, 0.22);
    background:
        linear-gradient(90deg, rgba(255, 191, 76, 0.115), rgba(255, 200, 105, 0.018) 46%, rgba(255, 255, 255, 0.014));
    box-shadow: inset 3px 0 0 rgba(255, 210, 125, 0.8), 0 8px 40px rgba(184, 124, 23, 0.04);
}

.rank-row--silver {
    border-color: rgba(205, 224, 251, 0.16);
    background:
        linear-gradient(90deg, rgba(196, 219, 255, 0.085), rgba(255, 255, 255, 0.015) 46%, rgba(255, 255, 255, 0.012));
    box-shadow: inset 3px 0 0 rgba(211, 229, 252, 0.58);
}

.rank-row--bronze {
    border-color: rgba(233, 169, 125, 0.16);
    background:
        linear-gradient(90deg, rgba(223, 147, 98, 0.09), rgba(255, 255, 255, 0.015) 46%, rgba(255, 255, 255, 0.012));
    box-shadow: inset 3px 0 0 rgba(236, 167, 118, 0.56);
}

.rank-position {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    min-width: 0;
}

.rank-position__label {
    color: #4d6179;
    font-family: var(--font-number);
    font-size: 6.5px;
    font-weight: 700;
    letter-spacing: 0.14em;
}

.rank-position__number {
    color: #8c9eb6;
    font-family: var(--font-number);
    font-size: 26px;
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.08em;
    font-variant-numeric: tabular-nums;
}

.rank-row--gold .rank-position__number {
    color: transparent;
    background: linear-gradient(145deg, #fff1c4 5%, #ffd37c 48%, #dca13c);
    -webkit-background-clip: text;
    background-clip: text;
    filter: drop-shadow(0 0 15px rgba(255, 197, 86, 0.26));
}

.rank-row--silver .rank-position__number {
    color: transparent;
    background: linear-gradient(145deg, #ffffff, #dceaff 48%, #aebfd9);
    -webkit-background-clip: text;
    background-clip: text;
}

.rank-row--bronze .rank-position__number {
    color: transparent;
    background: linear-gradient(145deg, #ffe1c7, #efb38b 50%, #c7865f);
    -webkit-background-clip: text;
    background-clip: text;
}

.rank-row--gold .rank-position__label {
    color: #b48b48;
}

.rank-row--silver .rank-position__label {
    color: #8b9db6;
}

.rank-row--bronze .rank-position__label {
    color: #9d7a60;
}

.rank-person {
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 0;
}

.rank-avatar {
    position: relative;
    flex: 0 0 auto;
    width: 58px;
    height: 58px;
    padding: 2px;
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(127, 174, 234, 0.45), rgba(255, 255, 255, 0.04));
}

.rank-row--gold .rank-avatar {
    background: linear-gradient(145deg, #ffe7ac, rgba(255, 188, 55, 0.18));
}

.rank-row--silver .rank-avatar {
    background: linear-gradient(145deg, #eef6ff, rgba(168, 194, 222, 0.14));
}

.rank-row--bronze .rank-avatar {
    background: linear-gradient(145deg, #f3c6a4, rgba(186, 121, 75, 0.15));
}

.rank-avatar > img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background: #0e1b2e;
}

.rank-avatar__shine {
    position: absolute;
    inset: 2px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 20%, rgba(255, 255, 255, 0.28), transparent 31%);
    pointer-events: none;
}

.rank-person__text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    min-width: 0;
}

.rank-person__name-line {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.rank-person__name {
    overflow: hidden;
    color: #ebf4ff;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: -0.01em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-row--gold .rank-person__name {
    color: #fff6df;
}

.rank-person__sub {
    color: #586d86;
    font-size: 9px;
    letter-spacing: 0.025em;
}

.rank-hall {
    display: inline-flex;
    align-items: center;
    justify-self: start;
    gap: 8px;
    max-width: 100%;
    padding: 6px 11px 6px 6px;
    border: 1px solid rgba(151, 184, 231, 0.09);
    border-radius: 999px;
    background: rgba(4, 13, 25, 0.38);
}

.rank-hall__avatar {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    border-radius: 7px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.rank-hall__name {
    overflow: hidden;
    color: #91a7c1;
    font-size: 11px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.rank-score {
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 3px;
    color: #d8eaff;
    font-family: var(--font-number);
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.rank-score strong {
    font-size: 25px;
    font-weight: 650;
    line-height: 1;
    letter-spacing: -0.05em;
}

.rank-score span {
    color: #5f7791;
    font-family: var(--font-sans);
    font-size: 9px;
    font-weight: 600;
}

.rank-row--gold .rank-score strong {
    color: #ffe1a0;
    text-shadow: 0 0 24px rgba(255, 201, 100, 0.14);
}

.rank-row--silver .rank-score strong {
    color: #edf5ff;
}

.rank-row--bronze .rank-score strong {
    color: #ffd2b3;
}

.rank-panel.is-switching .rank-list {
    opacity: 0.55;
    transition: opacity 0.18s ease;
}

.rank-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 290px;
    padding: 36px 20px;
    text-align: center;
}

.rank-empty__icon {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    margin-bottom: 16px;
    border: 1px solid rgba(99, 215, 255, 0.14);
    border-radius: 18px;
    color: #87dfff;
    background: rgba(99, 215, 255, 0.055);
}

.rank-empty__icon .icon {
    width: 25px;
    height: 25px;
}

.rank-empty h3 {
    margin-bottom: 6px;
    color: var(--text-soft);
    font-size: 19px;
}

.rank-empty p {
    max-width: 390px;
    color: var(--subtle);
    font-size: 12px;
}

.rank-board__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid rgba(151, 184, 231, 0.08);
    color: #52657c;
    font-size: 9px;
}

.rank-board__foot > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.rank-board__foot .icon {
    width: 12px;
    height: 12px;
}

.board-unit {
    font-family: var(--font-number);
    letter-spacing: 0.08em;
}

.site-footer {
    border-top: 1px solid rgba(151, 184, 231, 0.07);
}

.site-footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: min(var(--max-width), calc(100% - 56px));
    margin: 0 auto;
    padding: 24px 0 34px;
    color: #4e6077;
    font-size: 10px;
}

.footer-brand {
    color: #71859d;
    font-weight: 600;
    letter-spacing: 0.04em;
}

/* --------------------------------------------------------------------------
   Public site · my rank bar
   -------------------------------------------------------------------------- */

.my-rank {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 80;
    border-top: 1px solid rgba(129, 172, 235, 0.17);
    background:
        linear-gradient(90deg, rgba(12, 26, 46, 0.94), rgba(12, 23, 43, 0.9) 55%, rgba(20, 27, 55, 0.92));
    box-shadow: 0 -18px 50px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

.my-rank__inner {
    display: grid;
    grid-template-columns: auto auto auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 16px;
    width: min(var(--max-width), calc(100% - 56px));
    min-height: 78px;
    margin: 0 auto;
}

.my-rank__caption {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding-right: 18px;
    border-right: 1px solid var(--line);
    color: #8dabc8;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.my-rank__icon {
    display: grid;
    place-items: center;
    width: 27px;
    height: 27px;
    border-radius: 9px;
    color: var(--gold);
    background: rgba(255, 211, 124, 0.08);
}

.my-rank__icon .icon {
    width: 14px;
    height: 14px;
}

.my-rank__rank {
    display: flex;
    align-items: baseline;
    min-width: 54px;
    color: transparent;
    font-family: var(--font-number);
    font-size: 27px;
    font-weight: 650;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    background: linear-gradient(120deg, #fff, #a8e9ff 55%, #c4aaff);
    -webkit-background-clip: text;
    background-clip: text;
}

.my-rank__hash {
    margin-right: 1px;
    font-size: 12px;
    opacity: 0.48;
}

.my-rank__avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(164, 202, 255, 0.24);
}

.my-rank__identity {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.my-rank__identity strong {
    overflow: hidden;
    color: #e8f3ff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.my-rank__identity > span {
    overflow: hidden;
    color: #6f839d;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.my-rank__score {
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 3px;
    min-width: 100px;
    color: #dff5ff;
    font-family: var(--font-number);
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.my-rank__score strong {
    font-size: 23px;
    font-weight: 650;
    line-height: 1;
    letter-spacing: -0.04em;
}

.my-rank__score span {
    color: #627893;
    font-family: var(--font-sans);
    font-size: 9px;
    font-weight: 600;
}

.my-rank__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 11px;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: #9bb3cc;
    font-size: 10px;
    font-weight: 600;
    transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.my-rank__link:hover {
    color: var(--text);
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.04);
}

.my-rank__link .icon {
    width: 13px;
    height: 13px;
}

/* --------------------------------------------------------------------------
   Auth pages
   -------------------------------------------------------------------------- */

.auth-page {
    display: flex;
    align-items: stretch;
    min-height: 100vh;
    padding: 26px;
}

.auth-frame {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    width: min(1180px, 100%);
    min-height: 700px;
    margin: auto;
    border: 1px solid rgba(151, 184, 231, 0.14);
    border-radius: 30px;
    background: rgba(8, 17, 31, 0.78);
    box-shadow: 0 38px 120px rgba(0, 0, 0, 0.42);
    overflow: hidden;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

.auth-showcase {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px;
    border-right: 1px solid rgba(151, 184, 231, 0.1);
    background:
        radial-gradient(circle at 15% 18%, rgba(64, 158, 255, 0.2), transparent 39%),
        radial-gradient(circle at 90% 80%, rgba(136, 77, 228, 0.16), transparent 40%),
        linear-gradient(145deg, rgba(11, 29, 53, 0.8), rgba(7, 15, 28, 0.6));
    overflow: hidden;
}

.auth-showcase::before {
    content: "";
    position: absolute;
    top: -210px;
    right: -170px;
    width: 490px;
    height: 490px;
    border: 1px solid rgba(137, 184, 255, 0.11);
    border-radius: 50%;
    box-shadow: 0 0 0 64px rgba(108, 146, 255, 0.025), 0 0 0 130px rgba(108, 146, 255, 0.018);
    pointer-events: none;
}

.auth-showcase::after {
    content: "";
    position: absolute;
    bottom: -120px;
    left: -80px;
    width: 330px;
    height: 330px;
    border: 1px dashed rgba(123, 179, 255, 0.11);
    border-radius: 50%;
    pointer-events: none;
}

.auth-showcase .brand {
    position: relative;
    z-index: 1;
}

.auth-showcase__middle {
    position: relative;
    z-index: 1;
    max-width: 500px;
    margin-block: auto;
    padding: 52px 0 40px;
}

.auth-showcase__middle .eyebrow {
    margin-bottom: 20px;
}

.auth-showcase h1 {
    margin-bottom: 22px;
    font-size: clamp(40px, 4.6vw, 61px);
    font-weight: 700;
    line-height: 1.16;
    letter-spacing: -0.055em;
}

.auth-showcase h1 em {
    color: transparent;
    background: linear-gradient(100deg, #acecff, #a6bcff 52%, #d3b0ff);
    -webkit-background-clip: text;
    background-clip: text;
    font-style: normal;
}

.auth-showcase__lead {
    max-width: 430px;
    color: #8fa6c1;
    font-size: 13px;
    line-height: 1.9;
}

.auth-signature {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #6f849f;
    font-size: 10px;
    letter-spacing: 0.02em;
}

.auth-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 46px;
    background:
        radial-gradient(circle at 100% 0, rgba(66, 99, 194, 0.09), transparent 38%),
        rgba(6, 14, 26, 0.38);
}

.auth-card {
    width: min(430px, 100%);
    margin: 0 auto;
}

.auth-card__badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 22px;
    padding: 5px 11px;
    border: 1px solid rgba(99, 215, 255, 0.14);
    border-radius: 999px;
    color: #8ac8dc;
    background: rgba(99, 215, 255, 0.055);
    font-size: 9px;
    font-weight: 650;
    letter-spacing: 0.08em;
}

.auth-card__badge > span {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px rgba(99, 215, 255, 0.65);
}

.auth-card h2 {
    margin-bottom: 8px;
    font-size: 34px;
    font-weight: 720;
    letter-spacing: -0.04em;
}

.auth-intro {
    margin-bottom: 28px;
    color: #8195ae;
    font-size: 13px;
    line-height: 1.75;
}

.auth-note {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-top: 24px;
    padding-top: 19px;
    border-top: 1px solid var(--line);
    color: #61758d;
    font-size: 10.5px;
    line-height: 1.75;
}

.auth-note .icon {
    width: 14px;
    height: 14px;
    margin-top: 1px;
    color: #6b9bae;
}

.auth-note code {
    color: #8fa7ba;
    font-family: var(--font-number);
    font-size: 0.95em;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 23px 0 15px;
    color: #586c84;
    font-size: 9px;
    white-space: nowrap;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: var(--line);
}

.auth-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 11px;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #9fb5cc;
    font-size: 11px;
    font-weight: 600;
    transition: color 0.18s ease;
}

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

.text-link .icon {
    width: 13px;
    height: 13px;
}

.auth-help {
    color: #566a82;
    font-size: 10px;
}

.auth-copyright {
    width: min(430px, 100%);
    margin: 36px auto 0;
    color: #41546c;
    font-size: 9px;
    text-align: center;
    letter-spacing: 0.03em;
}

.showcase-wave {
    display: flex;
    align-items: flex-end;
    gap: 5px;
    width: 260px;
    height: 76px;
    margin-top: 36px;
    opacity: 0.55;
}

.showcase-wave span {
    width: 4px;
    height: var(--h);
    border-radius: 999px;
    background: linear-gradient(to top, rgba(99, 215, 255, 0.04), #8be9ff 65%, #c3a4ff);
    animation: sound-wave 2.4s ease-in-out infinite alternate;
}

.showcase-wave span:nth-child(2n) {
    animation-delay: -0.8s;
}

.showcase-wave span:nth-child(3n) {
    animation-delay: -1.4s;
}

.showcase-podium {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    width: 300px;
    height: 165px;
    margin-top: 32px;
    padding: 0 10px;
}

.showcase-podium__bar {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 84px;
    padding-top: 12px;
    border: 1px solid var(--line);
    border-bottom: 0;
    border-radius: 14px 14px 0 0;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.06));
}

.showcase-podium__bar--gold {
    height: 145px;
    border-color: rgba(255, 211, 124, 0.22);
    background: linear-gradient(to top, rgba(255, 211, 124, 0.015), rgba(255, 211, 124, 0.09));
}

.showcase-podium__bar--silver {
    height: 112px;
    border-color: rgba(219, 233, 251, 0.16);
}

.showcase-podium__bar--bronze {
    height: 88px;
    border-color: rgba(239, 179, 139, 0.18);
    background: linear-gradient(to top, rgba(239, 179, 139, 0.01), rgba(239, 179, 139, 0.055));
}

.showcase-podium__rank {
    color: #53657b;
    font-family: var(--font-number);
    font-size: 8px;
    letter-spacing: 0.14em;
}

.showcase-podium__bar--gold .showcase-podium__rank {
    color: #b99554;
}

.showcase-podium__avatar {
    width: 39px;
    height: 39px;
    margin-top: 10px;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 38%, rgba(195, 231, 255, 0.38) 0 8%, transparent 9%),
        radial-gradient(circle at 50% 104%, rgba(195, 231, 255, 0.25) 0 37%, transparent 38%),
        linear-gradient(145deg, #1c3d5e, #111f39);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.018);
}

.showcase-podium__bar--gold .showcase-podium__avatar {
    border-color: rgba(255, 211, 124, 0.3);
    background:
        radial-gradient(circle at 50% 38%, rgba(255, 232, 187, 0.58) 0 8%, transparent 9%),
        radial-gradient(circle at 50% 104%, rgba(255, 222, 158, 0.34) 0 37%, transparent 38%),
        linear-gradient(145deg, #5a4524, #1c2434);
}

/* Error page */
.error-page .auth-frame {
    min-height: 600px;
}

.auth-showcase--error .auth-showcase__middle {
    padding-top: 30px;
}

.error-card {
    text-align: left;
}

.error-card__icon {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    margin-bottom: 22px;
    border: 1px solid rgba(99, 215, 255, 0.16);
    border-radius: 18px;
    color: #9ee4ff;
    background: rgba(99, 215, 255, 0.06);
}

.error-card__icon .icon {
    width: 25px;
    height: 25px;
}

.error-card__status {
    margin-bottom: 7px;
    color: #536b85;
    font-family: var(--font-number);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.error-card h2 {
    margin-bottom: 10px;
    font-size: 31px;
}

.error-card > p {
    color: #8b9fb7;
    font-size: 13px;
    line-height: 1.8;
}

.error-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}

.debug-detail {
    max-height: 220px;
    margin-top: 20px;
    padding: 12px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: #c5d6ea;
    background: rgba(0, 0, 0, 0.25);
    font-size: 10px;
    line-height: 1.6;
    white-space: pre-wrap;
}

/* --------------------------------------------------------------------------
   Console shell
   -------------------------------------------------------------------------- */

.console-topbar {
    position: sticky;
    top: 0;
    z-index: 70;
    border-bottom: 1px solid rgba(151, 184, 231, 0.09);
    background: rgba(6, 14, 26, 0.79);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

.console-topbar__inner {
    display: flex;
    align-items: center;
    gap: 25px;
    width: min(var(--max-width), calc(100% - 56px));
    min-height: 70px;
    margin: 0 auto;
}

.console-nav {
    display: flex;
    align-items: center;
    gap: 2px;
}

.console-nav__link {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 11px;
    border: 1px solid transparent;
    border-radius: 9px;
    color: #8397b1;
    font-size: 11px;
    font-weight: 600;
    transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.console-nav__link .icon {
    width: 15px;
    height: 15px;
    opacity: 0.78;
}

.console-nav__link:hover {
    color: var(--text-soft);
    background: rgba(255, 255, 255, 0.035);
}

.console-nav__link.is-active {
    color: #d8f5ff;
    border-color: rgba(99, 215, 255, 0.13);
    background: rgba(99, 215, 255, 0.07);
}

.console-nav__link.is-active .icon {
    color: var(--accent);
    opacity: 1;
}

.console-user {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.console-user__identity {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.console-user__text {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
    line-height: 1.4;
}

.console-user__text strong {
    max-width: 130px;
    overflow: hidden;
    color: var(--text-soft);
    font-size: 11px;
    font-weight: 650;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.console-user__text span {
    max-width: 150px;
    overflow: hidden;
    color: var(--subtle);
    font-size: 9px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.console-main {
    width: min(var(--max-width), calc(100% - 56px));
    margin: 0 auto;
    padding: 42px 0 68px;
}

.console-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 29px;
}

.console-heading h1 {
    margin-top: 8px;
    font-size: clamp(33px, 3.6vw, 43px);
    font-weight: 720;
    letter-spacing: -0.045em;
}

.console-heading__lead {
    margin-top: 8px;
    color: #8397b1;
    font-size: 12.5px;
    line-height: 1.75;
}

.console-heading__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    padding-bottom: 6px;
}

.console-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: min(var(--max-width), calc(100% - 56px));
    margin: 0 auto;
    padding: 23px 0 34px;
    border-top: 1px solid rgba(151, 184, 231, 0.08);
    color: #4f627a;
    font-size: 9.5px;
}

/* --------------------------------------------------------------------------
   Me page
   -------------------------------------------------------------------------- */

.me-layout {
    display: grid;
    grid-template-columns: minmax(270px, 330px) minmax(0, 1fr);
    align-items: start;
    gap: 22px;
}

.profile-summary {
    position: sticky;
    top: 96px;
    padding: 31px 26px;
    overflow: hidden;
    text-align: center;
}

.profile-summary__glow {
    position: absolute;
    top: -130px;
    left: 50%;
    width: 300px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(83, 140, 255, 0.18), transparent 67%);
    transform: translateX(-50%);
    pointer-events: none;
}

.profile-summary__avatar-wrap {
    position: relative;
    display: inline-block;
    margin-bottom: 16px;
}

.profile-summary__avatar {
    width: 112px;
    height: 112px;
    padding: 3px;
    border: 1px solid rgba(157, 205, 255, 0.27);
    border-radius: 50%;
    object-fit: cover;
    background: #0c1a2e;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.3);
}

.profile-summary__badge {
    position: absolute;
    right: -7px;
    bottom: 4px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 4px 8px;
    border: 1px solid rgba(255, 211, 124, 0.28);
    border-radius: 999px;
    color: #ffdf9f;
    background: #19243a;
    font-size: 9px;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.profile-summary__badge .icon {
    width: 10px;
    height: 10px;
}

.profile-summary h2 {
    margin-bottom: 2px;
    font-size: 25px;
    font-weight: 720;
}

.profile-summary__role {
    color: #7087a2;
    font-size: 10px;
}

.profile-facts {
    margin-top: 23px;
    padding-top: 4px;
    border-top: 1px solid var(--line);
    text-align: left;
}

.profile-facts > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(151, 184, 231, 0.07);
}

.profile-facts dt {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--subtle);
    font-size: 10px;
    white-space: nowrap;
}

.profile-facts dt .icon {
    width: 12px;
    height: 12px;
}

.profile-facts dd {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    overflow: hidden;
    color: #adc2d9;
    font-size: 11px;
    text-align: right;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.profile-facts dd img {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    object-fit: cover;
}

.profile-summary__scores {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    margin-top: 20px;
    padding: 12px 0;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: rgba(4, 12, 23, 0.25);
}

.profile-summary__scores > div {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: center;
    gap: 1px;
    border-right: 1px solid var(--line);
}

.profile-summary__scores > div:last-child {
    border-right: 0;
}

.profile-summary__scores span {
    width: 100%;
    color: var(--subtle);
    font-size: 8px;
}

.profile-summary__scores strong {
    color: #d8ecff;
    font-family: var(--font-number);
    font-size: 17px;
    font-weight: 600;
    line-height: 1.35;
}

.profile-summary__scores small {
    color: #5f748c;
    font-size: 8px;
}

.profile-summary__updated {
    margin-top: 12px;
    color: #51647b;
    font-size: 9px;
}

.me-forms {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.me-forms .panel {
    padding: 26px 28px;
}

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

.score-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: rgba(4, 12, 23, 0.24);
    cursor: text;
    transition: border-color 0.18s ease, background 0.18s ease;
}

.score-field:focus-within {
    border-color: rgba(99, 215, 255, 0.35);
    background: rgba(7, 18, 34, 0.5);
}

.score-field__input {
    display: flex;
    align-items: baseline;
    gap: 3px;
}

.score-editor .score-field__input input {
    height: 43px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #eaf7ff;
    font-family: var(--font-number);
    font-size: 25px;
    font-weight: 550;
    line-height: 1;
    letter-spacing: -0.04em;
    box-shadow: none;
}

.score-editor .score-field__input input:focus {
    box-shadow: none;
    background: transparent;
}

.score-field__input > span {
    color: #647b95;
    font-size: 10px;
}

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

.compact-score-grid label {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.compact-score-grid .score-field__input {
    gap: 4px;
}

.compact-score-grid input {
    height: 40px;
    padding: 0 8px;
    font-size: 14px;
    text-align: right;
}

.compact-score-grid .score-field__input > span {
    flex: 0 0 auto;
    font-size: 9px;
}

/* --------------------------------------------------------------------------
   Manage page
   -------------------------------------------------------------------------- */

.hall-banner {
    display: flex;
    align-items: center;
    gap: 26px;
    padding: 25px 28px;
    background:
        radial-gradient(circle at 0 0, rgba(67, 139, 255, 0.14), transparent 35%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.008)),
        var(--surface);
}

.hall-banner__identity {
    display: flex;
    align-items: center;
    gap: 17px;
    min-width: 0;
}

.hall-banner__avatar {
    width: 76px;
    height: 76px;
    flex: 0 0 auto;
    border: 1px solid rgba(160, 203, 255, 0.2);
    border-radius: 20px;
    object-fit: cover;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.hall-banner h2 {
    margin-top: 2px;
    font-size: 27px;
    letter-spacing: -0.035em;
}

.hall-banner__meta {
    margin-top: 4px;
    color: var(--subtle);
    font-size: 10px;
}

.hall-banner__stats {
    display: flex;
    gap: 32px;
    margin-left: auto;
    padding: 2px 8px;
}

.hall-banner__stats > div {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.hall-banner__stats strong {
    color: #e2f2ff;
    font-family: var(--font-number);
    font-size: 22px;
    font-weight: 600;
    line-height: 1.2;
}

.hall-banner__stats small {
    margin-left: 2px;
    color: #6d829a;
    font-size: 9px;
}

.hall-banner__stats span {
    color: var(--subtle);
    font-size: 9px;
}

.hall-banner__edit {
    flex: 0 0 auto;
}

.mini-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.mini-stat {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 15px 17px;
    border-radius: 14px;
}

.mini-stat__icon {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: #86d6f3;
    background: rgba(99, 215, 255, 0.045);
}

.mini-stat__icon .icon {
    width: 14px;
    height: 14px;
}

.mini-stat > div {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.mini-stat > div > span {
    color: var(--subtle);
    font-size: 9px;
    white-space: nowrap;
}

.mini-stat strong {
    color: #dbeeff;
    font-family: var(--font-number);
    font-size: 17px;
    font-weight: 600;
    line-height: 1.35;
}

.mini-stat strong small {
    margin-left: 2px;
    color: #61758d;
    font-family: var(--font-sans);
    font-size: 8px;
    font-weight: 400;
}

.mini-stat__text {
    overflow: hidden;
    font-family: var(--font-sans) !important;
    font-size: 12px !important;
    font-weight: 650 !important;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.score-panel {
    margin-top: 22px;
    padding: 26px 28px;
}

.score-table {
    display: flex;
    flex-direction: column;
}

.score-table__head {
    display: grid;
    grid-template-columns: minmax(230px, 1.45fr) repeat(3, minmax(96px, 0.62fr)) 52px;
    gap: 14px;
    padding: 0 4px 9px;
    color: #50647c;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.score-row {
    display: grid;
    grid-template-columns: minmax(230px, 1.45fr) repeat(3, minmax(96px, 0.62fr)) 52px;
    align-items: center;
    gap: 14px;
    padding: 14px 4px;
    border-top: 1px solid rgba(151, 184, 231, 0.08);
}

.score-row__person {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.score-row__identity {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.score-row__identity > span {
    color: #566b84;
    font-size: 9px;
}

.score-row__name {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    min-width: 0;
}

.score-row__name strong {
    max-width: 170px;
    overflow: hidden;
    color: #dceefc;
    font-size: 13px;
    font-weight: 650;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.table-score-input {
    position: relative;
    display: flex;
    align-items: center;
}

.table-score-input input {
    height: 42px;
    padding: 0 30px 0 11px;
    font-size: 14px;
    font-weight: 600;
    text-align: right;
}

.table-score-input__unit {
    position: absolute;
    right: 11px;
    color: #5c7189;
    font-size: 9px;
    pointer-events: none;
}

.mobile-label {
    display: none;
}

.score-row__tools {
    display: flex;
    justify-content: flex-end;
}

.score-save-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 7px;
    padding-top: 19px;
    border-top: 1px solid var(--line);
}

.score-save-bar > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--subtle);
    font-size: 9.5px;
}

.score-save-bar > span .icon {
    width: 12px;
    height: 12px;
}

/* --------------------------------------------------------------------------
   Admin · overview & halls
   -------------------------------------------------------------------------- */

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

.stat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 19px;
}

.stat-card__icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: #83daff;
    background: rgba(99, 215, 255, 0.05);
}

.stat-card__icon .icon {
    width: 18px;
    height: 18px;
}

.stat-card__body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.stat-card__label {
    color: var(--subtle);
    font-size: 9px;
}

.stat-card strong {
    color: #e4f4ff;
    font-family: var(--font-number);
    font-size: 24px;
    font-weight: 600;
    line-height: 1.25;
}

.stat-card strong small {
    margin-left: 2px;
    color: #637991;
    font-family: var(--font-sans);
    font-size: 9px;
    font-weight: 500;
}

.stat-card__meta {
    overflow: hidden;
    color: #4f637b;
    font-size: 8.5px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

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

.admin-hall-card {
    padding: 21px;
}

.admin-hall-card__head {
    display: flex;
    align-items: flex-start;
    gap: 13px;
}

.admin-hall-card__avatar {
    width: 58px;
    height: 58px;
    flex: 0 0 auto;
    border: 1px solid rgba(158, 199, 250, 0.16);
    border-radius: 16px;
    object-fit: cover;
}

.admin-hall-card__title {
    min-width: 0;
    flex: 1;
}

.admin-hall-card__title .eyebrow {
    color: #597089;
    font-size: 7px;
    letter-spacing: 0.12em;
}

.admin-hall-card__title h3 {
    margin-top: 2px;
    overflow: hidden;
    color: #e3f0fd;
    font-size: 18px;
    font-weight: 680;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.admin-hall-card__title > span {
    display: block;
    margin-top: 2px;
    color: #53677f;
    font-size: 8.5px;
}

.admin-hall-card__head > .icon-button {
    flex: 0 0 auto;
}

.hall-manager-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 16px;
    padding: 8px 10px;
    border: 1px solid rgba(151, 184, 231, 0.08);
    border-radius: 9px;
    background: rgba(4, 12, 23, 0.23);
}

.hall-manager-line__label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #6e839b;
    font-size: 9px;
}

.hall-manager-line__label .icon {
    width: 12px;
    height: 12px;
    color: #b69b68;
}

.hall-manager-line__person {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.hall-manager-line__person img {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
}

.hall-manager-line__person strong {
    overflow: hidden;
    color: #b8cadd;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.hall-manager-line__empty {
    color: #52667e;
    font-size: 9px;
}

.admin-hall-card__stats {
    display: flex;
    gap: 26px;
    margin-top: 13px;
    padding: 10px 2px 13px;
    border-bottom: 1px solid rgba(151, 184, 231, 0.075);
}

.admin-hall-card__stats > div {
    display: flex;
    flex-direction: column;
}

.admin-hall-card__stats strong {
    color: #cfe5f8;
    font-family: var(--font-number);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
}

.admin-hall-card__stats small {
    margin-left: 2px;
    color: #627890;
    font-size: 8px;
}

.admin-hall-card__stats span {
    color: #566a82;
    font-size: 8px;
}

.admin-hall-card__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 14px;
}

/* --------------------------------------------------------------------------
   Admin · filters and anchors table
   -------------------------------------------------------------------------- */

.filter-panel {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    padding: 16px 18px;
    border-radius: 16px;
}

.filter-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 140px;
    flex: 0 1 auto;
}

.filter-field select,
.filter-field .input-shell input {
    height: 40px;
    border-radius: 10px;
    font-size: 12px;
}

.filter-field--search {
    min-width: 210px;
    flex: 1;
}

.filter-actions {
    display: flex;
    gap: 7px;
    margin-left: auto;
}

.filter-actions .btn {
    height: 40px;
}

.admin-anchor-panel {
    margin-top: 16px;
    padding: 24px 26px;
}

.anchor-table__head {
    display: grid;
    grid-template-columns: minmax(180px, 1.35fr) minmax(120px, 0.85fr) minmax(160px, 1fr) 120px 84px;
    gap: 16px;
    padding: 0 13px 9px;
    color: #4e6179;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.anchor-row {
    display: grid;
    grid-template-columns: minmax(180px, 1.35fr) minmax(120px, 0.85fr) minmax(160px, 1fr) 120px 84px;
    align-items: center;
    gap: 16px;
    padding: 12px 13px;
    border-top: 1px solid rgba(151, 184, 231, 0.075);
    border-radius: 10px;
    transition: background 0.18s ease;
}

.anchor-row:hover {
    background: rgba(255, 255, 255, 0.025);
}

.anchor-row__person {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.anchor-row__identity {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.anchor-row__identity h3 {
    overflow: hidden;
    color: #dceafb;
    font-size: 13px;
    font-weight: 630;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.anchor-row__identity > span {
    overflow: hidden;
    color: #566a81;
    font-family: var(--font-number);
    font-size: 8.5px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.anchor-row__hall {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.anchor-row__hall img {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    border-radius: 6px;
    object-fit: cover;
}

.anchor-row__hall span {
    overflow: hidden;
    color: #8da2b9;
    font-size: 10px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.anchor-row__scores {
    display: flex;
    align-items: center;
    gap: 12px;
}

.anchor-row__scores > span {
    display: inline-flex;
    align-items: baseline;
    gap: 2px;
}

.anchor-row__scores small {
    color: #5b6e86;
    font-size: 8px;
}

.anchor-row__scores strong {
    color: #c5d9ed;
    font-family: var(--font-number);
    font-size: 12px;
    font-weight: 500;
}

.anchor-row__scores em {
    color: #4f637b;
    font-family: var(--font-sans);
    font-size: 7px;
    font-style: normal;
}

.anchor-row__tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.anchor-row__actions {
    display: flex;
    justify-content: flex-end;
}

.anchor-row__actions .btn {
    width: 100%;
}

/* --------------------------------------------------------------------------
   Admin · manage anchor dialog
   -------------------------------------------------------------------------- */

.manage-anchor-hero {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--line);
}

.manage-anchor-hero__avatar {
    width: 68px;
    height: 68px;
    flex: 0 0 auto;
    border: 1px solid rgba(159, 205, 255, 0.21);
    border-radius: 50%;
    object-fit: cover;
}

.manage-anchor-hero__text {
    min-width: 0;
}

.manage-anchor-hero__name {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
}

.manage-anchor-hero__name h3 {
    color: #edf7ff;
    font-size: 22px;
    font-weight: 680;
    letter-spacing: -0.025em;
}

.manage-anchor-hero__text p {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 3px;
    color: #6a7f97;
    font-family: var(--font-number);
    font-size: 9px;
}

.manage-anchor-hero__text p i {
    width: 2px;
    height: 2px;
    border-radius: 50%;
    background: #586b83;
}

.manage-anchor-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 17px;
}

.dialog-section {
    padding: 17px;
    border: 1px solid rgba(151, 184, 231, 0.1);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.019);
}

.dialog-section__head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
}

.dialog-section__index {
    color: #52657d;
    font-family: var(--font-number);
    font-size: 8px;
    letter-spacing: 0.08em;
}

.dialog-section__head h4 {
    color: #cfe2f4;
    font-size: 13px;
    font-weight: 650;
}

.dialog-section .field > label,
.dialog-section .compact-score-grid label > span:first-child {
    font-size: 11px;
}

.dialog-section input,
.dialog-section select {
    height: 40px;
    border-radius: 9px;
    font-size: 12px;
}

.dialog-section .btn--sm {
    align-self: flex-start;
}

.dialog-section__note {
    margin-top: 10px;
    color: #53677f;
    font-size: 9px;
    line-height: 1.6;
}

.permission-callout {
    padding: 10px 11px;
    border: 1px solid rgba(151, 184, 231, 0.1);
    border-radius: 9px;
    background: rgba(4, 12, 23, 0.25);
}

.permission-callout__title {
    display: block;
    margin-bottom: 2px;
    color: #c0d3e5;
    font-size: 11px;
    font-weight: 650;
}

.permission-callout p {
    color: #657a92;
    font-size: 9px;
    line-height: 1.65;
}

/* --------------------------------------------------------------------------
   Admin · security
   -------------------------------------------------------------------------- */

.security-layout {
    display: grid;
    grid-template-columns: minmax(270px, 340px) minmax(0, 1fr);
    align-items: start;
    gap: 22px;
}

.security-card {
    padding: 28px;
}

.security-card__icon {
    display: grid;
    place-items: center;
    width: 53px;
    height: 53px;
    margin-bottom: 18px;
    border: 1px solid rgba(99, 215, 255, 0.17);
    border-radius: 15px;
    color: #97e5ff;
    background: rgba(99, 215, 255, 0.055);
}

.security-card__icon .icon {
    width: 23px;
    height: 23px;
}

.security-card h2 {
    margin-top: 3px;
    font-size: 24px;
}

.security-card__lead {
    margin-top: 8px;
    color: var(--muted);
    font-size: 11.5px;
    line-height: 1.8;
}

.security-facts {
    margin-top: 22px;
    border-top: 1px solid var(--line);
}

.security-facts > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(151, 184, 231, 0.07);
}

.security-facts dt {
    color: var(--subtle);
    font-size: 10px;
}

.security-facts dd {
    color: #c3d5e7;
    font-size: 11px;
}

.security-tip {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 20px;
    padding: 11px;
    border: 1px solid rgba(255, 200, 107, 0.12);
    border-radius: 10px;
    color: #8d7c60;
    background: rgba(255, 200, 107, 0.035);
    font-size: 9.5px;
    line-height: 1.7;
}

.security-tip .icon {
    width: 13px;
    height: 13px;
    margin-top: 1px;
    color: #b9995f;
}

.security-form-card {
    padding: 28px 30px;
}

.security-form-card .form-stack {
    max-width: 620px;
}

/* --------------------------------------------------------------------------
   Animations
   -------------------------------------------------------------------------- */

@keyframes live-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.55;
        transform: scale(0.82);
    }
}

@keyframes sound-wave {
    from {
        transform: scaleY(0.48);
        opacity: 0.48;
    }
    to {
        transform: scaleY(1);
        opacity: 1;
    }
}

@keyframes orbit-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes orbit-spin-reverse {
    from {
        transform: rotate(360deg);
    }
    to {
        transform: rotate(0deg);
    }
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(-7px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toast-out {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-5px) scale(0.985);
    }
}

@keyframes dialog-in {
    from {
        opacity: 0;
        transform: translateY(9px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ==========================================================================
   Responsive layout
   ========================================================================== */

@media (max-width: 1060px) {
    .rank-hero {
        grid-template-columns: minmax(0, 1fr) 310px;
        gap: 25px;
    }

    .rank-hero__visual {
        height: 300px;
        transform: scale(0.88);
    }

    .rank-list-head,
    .rank-row {
        grid-template-columns: 62px minmax(0, 1fr) 190px 105px;
        gap: 13px;
    }

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

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

    .anchor-table__head,
    .anchor-row {
        grid-template-columns: minmax(160px, 1.2fr) minmax(110px, 0.8fr) minmax(150px, 0.9fr) 112px 78px;
        gap: 11px;
    }
}

@media (max-width: 920px) {
    .site-header__inner,
    .console-topbar__inner,
    .rank-main,
    .console-main,
    .site-footer__inner,
    .console-footer,
    .my-rank__inner {
        width: calc(100% - 40px);
    }

    .rank-hero {
        display: block;
        min-height: auto;
        padding: 15px 0 4px;
    }

    .rank-hero__copy {
        max-width: 680px;
    }

    .rank-hero__visual {
        display: none;
    }

    .rank-board {
        margin-top: 34px;
    }

    .me-layout {
        grid-template-columns: 1fr;
    }

    .profile-summary {
        position: relative;
        top: auto;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
        gap: 5px 20px;
        text-align: left;
    }

    .profile-summary__avatar-wrap {
        grid-row: 1 / 4;
        margin: 0 4px 0 0;
    }

    .profile-summary__avatar {
        width: 92px;
        height: 92px;
    }

    .profile-summary h2 {
        margin-top: 1px;
    }

    .profile-summary__role {
        margin-top: 1px;
    }

    .profile-facts {
        grid-column: 1 / -1;
        margin-top: 17px;
    }

    .profile-summary__scores {
        grid-column: 1 / -1;
        margin-top: 4px;
    }

    .profile-summary__updated {
        grid-column: 1 / -1;
        margin-top: 0;
        text-align: right;
    }

    .hall-banner {
        flex-wrap: wrap;
        gap: 17px;
    }

    .hall-banner__identity {
        flex: 1 1 100%;
    }

    .hall-banner__stats {
        margin-left: 0;
        flex: 1 1 auto;
    }

    .hall-banner__edit {
        margin-left: auto;
    }

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

    .security-layout {
        grid-template-columns: 1fr;
    }

    .security-facts {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0 18px;
    }

    .security-facts > div {
        align-items: flex-start;
        flex-direction: column;
        gap: 2px;
    }

    .console-topbar__inner {
        flex-wrap: wrap;
        padding: 12px 0 8px;
        gap: 10px 18px;
    }

    .console-nav {
        order: 3;
        width: 100%;
        overflow-x: auto;
        padding-bottom: 3px;
        scrollbar-width: none;
    }

    .console-nav::-webkit-scrollbar {
        display: none;
    }

    .console-nav__link {
        white-space: nowrap;
    }

    .console-user {
        gap: 4px;
    }

    .anchor-table__head {
        display: none;
    }

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

    .anchor-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 9px 13px;
        padding: 14px;
        border: 1px solid rgba(151, 184, 231, 0.1);
        border-radius: 13px;
        background: rgba(255, 255, 255, 0.017);
    }

    .anchor-row__person {
        grid-column: 1;
        grid-row: 1;
    }

    .anchor-row__hall {
        grid-column: 1;
        grid-row: 2;
    }

    .anchor-row__scores {
        grid-column: 1 / -1;
        grid-row: 3;
        padding-top: 8px;
        border-top: 1px solid rgba(151, 184, 231, 0.075);
    }

    .anchor-row__tags {
        grid-column: 2;
        grid-row: 1 / 3;
        align-self: center;
        justify-content: flex-end;
    }

    .anchor-row__actions {
        grid-column: 1 / -1;
        grid-row: 4;
    }

    .anchor-row__actions .btn {
        width: 100%;
    }

    .manage-anchor-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    body {
        font-size: 14px;
    }

    .site-header__inner,
    .console-topbar__inner,
    .rank-main,
    .console-main,
    .site-footer__inner,
    .console-footer,
    .my-rank__inner {
        width: calc(100% - 28px);
    }

    .site-header__inner {
        min-height: 68px;
        gap: 12px;
    }

    .brand-mark {
        width: 38px;
        height: 38px;
        border-radius: 11px;
    }

    .brand-copy strong {
        font-size: 17px;
    }

    .brand-copy small {
        font-size: 6px;
    }

    .live-pill {
        display: none;
    }

    .session-user {
        padding-right: 2px;
    }

    .session-user__copy strong {
        max-width: 95px;
        font-size: 11px;
    }

    .session-user__copy small {
        display: none;
    }

    .header-console-link span {
        display: none;
    }

    .header-console-link {
        width: 36px;
        padding: 0;
        min-height: 36px;
    }

    .rank-main {
        padding: 36px 0 52px;
    }

    .rank-hero h1 {
        font-size: clamp(37px, 10vw, 50px);
        letter-spacing: -0.06em;
    }

    .rank-hero__lead {
        margin-top: 14px;
        font-size: 12.5px;
        line-height: 1.8;
    }

    .rank-hero .eyebrow {
        margin-bottom: 14px;
        font-size: 8.5px;
        letter-spacing: 0.16em;
    }

    .rank-hero__meta {
        margin-top: 20px;
        gap: 7px 13px;
        font-size: 9.5px;
    }

    .rank-board {
        margin-top: 28px;
        padding: 18px 12px;
        border-radius: 20px;
    }

    .rank-board__head {
        align-items: stretch;
        gap: 16px;
        padding: 0 3px;
    }

    .rank-board__title h2 {
        font-size: 25px;
    }

    .period-tabs {
        width: 100%;
        padding: 3px;
    }

    .period-tab {
        min-width: 0;
        flex: 1;
        padding: 7px 6px 6px;
    }

    .period-tab__label {
        font-size: 12px;
    }

    .rank-board__toolbar {
        margin-top: 16px;
        padding: 0 3px 13px;
        gap: 10px;
    }

    .rank-board__count {
        font-size: 10px;
    }

    .count-number {
        font-size: 14px;
    }

    .live-indicator {
        gap: 6px;
        font-size: 9px;
    }

    .live-time {
        display: none;
    }

    .poll-notice {
        margin: 10px 3px 0;
    }

    .rank-list-head {
        display: none;
    }

    .rank-list {
        gap: 6px;
    }

    .rank-row {
        grid-template-columns: 34px minmax(0, 1fr) auto;
        grid-template-areas:
            "rank person score"
            "rank hall score";
        gap: 4px 10px;
        min-height: 0;
        padding: 12px 12px;
        border-radius: 13px;
    }

    .rank-position {
        grid-area: rank;
        align-self: center;
        padding-right: 4px;
    }

    .rank-position__label {
        font-size: 5.5px;
    }

    .rank-position__number {
        font-size: 22px;
    }

    .rank-person {
        grid-area: person;
        gap: 10px;
    }

    .rank-avatar {
        width: 45px;
        height: 45px;
    }

    .rank-person__name {
        font-size: 14px;
    }

    .rank-person__sub {
        font-size: 7.5px;
    }

    .rank-hall {
        grid-area: hall;
        margin-left: 55px;
        padding: 2px 7px 2px 3px;
        border: 0;
        border-radius: 6px;
        background: transparent;
    }

    .rank-hall__avatar {
        width: 16px;
        height: 16px;
        border-radius: 5px;
    }

    .rank-hall__name {
        font-size: 9px;
    }

    .rank-score {
        grid-area: score;
        align-self: center;
        min-width: 50px;
    }

    .rank-score strong {
        font-size: 20px;
    }

    .rank-score span {
        font-size: 8px;
    }

    .manager-tag {
        padding: 1px 5px;
        font-size: 8px;
    }

    .manager-tag .icon {
        width: 9px;
        height: 9px;
    }

    .rank-empty {
        min-height: 260px;
    }

    .rank-board__foot {
        gap: 9px;
        margin: 17px 3px 0;
        font-size: 8px;
        line-height: 1.6;
    }

    .site-footer__inner {
        flex-wrap: wrap;
        gap: 4px 16px;
        padding: 19px 0 27px;
        font-size: 8.5px;
    }

    .my-rank__inner {
        grid-template-columns: auto auto auto minmax(0, 1fr) auto;
        gap: 8px;
        min-height: 69px;
    }

    .my-rank__caption {
        grid-column: 1;
        gap: 5px;
        padding-right: 0;
        border-right: 0;
        font-size: 9px;
    }

    .my-rank__icon {
        width: 23px;
        height: 23px;
    }

    .my-rank__rank {
        grid-column: 2;
        min-width: 30px;
        font-size: 21px;
    }

    .my-rank__avatar {
        grid-column: 3;
        width: 32px;
        height: 32px;
    }

    .my-rank__identity {
        grid-column: 4;
    }

    .my-rank__identity strong {
        font-size: 12px;
    }

    .my-rank__identity > span {
        font-size: 8px;
    }

    .my-rank__score {
        grid-column: 5;
        min-width: 61px;
    }

    .my-rank__score strong {
        font-size: 19px;
    }

    .my-rank__link {
        display: none;
    }

    body.has-my-rank {
        padding-bottom: 82px;
    }

    .toast-stack {
        top: 10px;
        right: 10px;
        width: calc(100vw - 20px);
    }

    .page-rank .toast-stack:not(.toast-stack--bottom),
    .page-console .toast-stack:not(.toast-stack--bottom) {
        top: 78px;
    }

    .toast-stack--bottom {
        top: auto;
        bottom: 12px;
    }

    body.has-my-rank .toast-stack--bottom {
        bottom: 80px;
    }

    .toast {
        font-size: 11px;
    }

    .auth-page {
        padding: 10px;
    }

    .auth-frame {
        display: block;
        min-height: 0;
        border-radius: 22px;
    }

    .auth-showcase {
        display: block;
        min-height: 0;
        padding: 21px 20px 18px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .auth-showcase::before,
    .auth-showcase::after,
    .auth-showcase__middle,
    .auth-signature {
        display: none;
    }

    .auth-showcase .brand--large .brand-mark {
        width: 42px;
        height: 42px;
        border-radius: 12px;
    }

    .auth-showcase .brand--large .brand-copy strong {
        font-size: 19px;
    }

    .auth-panel {
        padding: 28px 19px 25px;
    }

    .auth-card h2 {
        font-size: 29px;
    }

    .auth-intro {
        margin-bottom: 22px;
        font-size: 12px;
    }

    .auth-copyright {
        margin-top: 27px;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .avatar-upload {
        gap: 13px;
        padding: 11px;
    }

    .avatar-upload__preview img {
        width: 68px;
        height: 68px;
    }

    .avatar-upload__copy p {
        font-size: 10px;
    }

    .console-topbar__inner {
        padding: 10px 0 7px;
        gap: 8px 13px;
    }

    .console-user__text {
        display: none;
    }

    .console-user__identity .avatar {
        width: 30px;
        height: 30px;
    }

    .console-nav {
        gap: 2px;
    }

    .console-nav__link {
        padding: 7px 9px;
        font-size: 10px;
    }

    .console-main {
        padding: 27px 0 48px;
    }

    .console-heading {
        display: block;
        margin-bottom: 22px;
    }

    .console-heading h1 {
        margin-top: 6px;
        font-size: 32px;
    }

    .console-heading__lead {
        font-size: 11.5px;
    }

    .console-heading__actions {
        margin-top: 15px;
        padding-bottom: 0;
    }

    .console-footer {
        flex-wrap: wrap;
        gap: 4px 15px;
        padding: 18px 0 26px;
        font-size: 8.5px;
    }

    .me-forms .panel,
    .score-panel,
    .admin-anchor-panel,
    .security-form-card,
    .security-card,
    .profile-summary {
        padding: 19px;
    }

    .profile-summary {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        gap: 2px 15px;
    }

    .profile-summary__avatar-wrap {
        grid-row: 1 / 4;
    }

    .profile-summary__avatar {
        width: 76px;
        height: 76px;
    }

    .profile-summary h2 {
        font-size: 22px;
    }

    .profile-summary__badge {
        right: -8px;
        bottom: -1px;
        font-size: 8px;
    }

    .profile-facts {
        margin-top: 14px;
    }

    .profile-summary__scores {
        margin-top: 1px;
    }

    .profile-summary__updated {
        text-align: left;
    }

    .score-editor {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .score-field {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 8px 12px;
    }

    .score-field__input input {
        width: 100%;
        min-width: 84px;
        text-align: right;
        font-size: 22px;
    }

    .score-field__input {
        flex: 1;
        justify-content: flex-end;
    }

    .form-actions {
        justify-content: stretch;
    }

    .form-actions .btn {
        width: 100%;
    }

    .form-actions__note {
        width: 100%;
        margin-right: 0;
        text-align: right;
    }

    .panel__head {
        gap: 14px;
        margin-bottom: 18px;
    }

    .panel__head h2 {
        font-size: 20px;
    }

    .panel__head .btn {
        align-self: flex-start;
    }

    .hall-banner {
        padding: 19px;
    }

    .hall-banner__avatar {
        width: 60px;
        height: 60px;
        border-radius: 16px;
    }

    .hall-banner h2 {
        font-size: 23px;
    }

    .hall-banner__meta {
        font-size: 9px;
    }

    .hall-banner__stats {
        gap: 25px;
        padding: 3px 0;
    }

    .hall-banner__stats strong {
        font-size: 19px;
    }

    .hall-banner__edit {
        margin-left: 0;
    }

    .mini-stats {
        gap: 8px;
        margin-top: 8px;
    }

    .mini-stat {
        padding: 12px;
    }

    .score-table__head {
        display: none;
    }

    .score-row {
        grid-template-columns: repeat(3, minmax(0, 1fr)) 38px;
        gap: 9px;
        padding: 16px 2px;
    }

    .score-row__person {
        grid-column: 1 / -1;
    }

    .score-row__tools {
        align-self: end;
    }

    .table-score-input {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }

    .table-score-input input {
        height: 40px;
        padding: 0 25px 0 8px;
        font-size: 13px;
    }

    .table-score-input__unit {
        right: 8px;
        font-size: 8px;
    }

    .mobile-label {
        display: block;
        color: #5d7189;
        font-size: 8px;
    }

    .score-save-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .score-save-bar .btn {
        width: 100%;
    }

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

    .stat-card {
        gap: 10px;
        padding: 14px;
    }

    .stat-card__icon {
        width: 34px;
        height: 34px;
        border-radius: 10px;
    }

    .stat-card strong {
        font-size: 20px;
    }

    .stat-card__meta {
        display: none;
    }

    .hall-grid {
        gap: 10px;
    }

    .admin-hall-card {
        padding: 16px;
    }

    .admin-hall-card__avatar {
        width: 48px;
        height: 48px;
        border-radius: 13px;
    }

    .admin-hall-card__actions {
        justify-content: stretch;
    }

    .admin-hall-card__actions .btn {
        flex: 1;
    }

    .section-heading {
        margin: 25px 0 14px;
    }

    .section-heading h2 {
        font-size: 22px;
    }

    .filter-panel {
        padding: 13px;
    }

    .filter-field {
        min-width: 0;
        flex: 1 1 135px;
    }

    .filter-field--search {
        flex: 1 1 100%;
    }

    .filter-actions {
        width: 100%;
        margin-left: 0;
    }

    .filter-actions .btn {
        flex: 1;
    }

    .admin-anchor-panel {
        padding: 16px;
    }

    .anchor-table {
        grid-template-columns: 1fr;
    }

    .security-facts {
        display: block;
    }

    .security-facts > div {
        flex-direction: row;
        align-items: center;
    }

    .app-dialog,
    .app-dialog--wide {
        width: calc(100vw - 20px);
        max-height: 94dvh;
        border-radius: 18px;
    }

    .dialog-head {
        padding: 17px 18px 14px;
    }

    .dialog-head h2 {
        font-size: 20px;
    }

    .dialog-body {
        max-height: calc(94dvh - 79px);
        padding: 17px 18px 19px;
    }

    .dialog-section {
        padding: 14px;
    }

    .compact-score-grid {
        grid-template-columns: 1fr;
    }

    .manage-anchor-hero__avatar {
        width: 54px;
        height: 54px;
    }

    .manage-anchor-hero__name h3 {
        font-size: 19px;
    }

    .current-avatar-note {
        font-size: 10px;
    }

    .empty-state {
        padding: 45px 20px;
    }

    .empty-state h2 {
        font-size: 20px;
    }

    .empty-state p {
        font-size: 12px;
    }

    .error-page .auth-frame {
        min-height: 0;
    }

    .error-card h2 {
        font-size: 27px;
    }

    .error-card__icon {
        width: 48px;
        height: 48px;
        margin-bottom: 18px;
    }

    .error-card__actions .btn {
        flex: 1;
    }

    .debug-detail {
        font-size: 9px;
    }
}

@media (max-width: 430px) {
    .brand-copy small {
        display: none;
    }

    .site-header__actions {
        gap: 4px;
    }

    .session-user__copy {
        display: none;
    }

    .session-user {
        padding: 2px;
        border-color: var(--line);
    }

    .logout-form .icon-button {
        width: 32px;
        height: 32px;
    }

    .header-console-link {
        display: none;
    }

    .rank-hero h1 {
        font-size: 34px;
    }

    .rank-board {
        padding: 16px 9px;
    }

    .period-tab {
        padding: 7px 4px 6px;
    }

    .period-tab__hint {
        display: none;
    }

    .rank-row {
        grid-template-columns: 30px minmax(0, 1fr) auto;
        gap: 5px 8px;
        padding: 11px 10px;
    }

    .rank-position__label {
        display: none;
    }

    .rank-position__number {
        font-size: 20px;
    }

    .rank-avatar {
        width: 41px;
        height: 41px;
    }

    .rank-hall {
        margin-left: 51px;
    }

    .rank-score strong {
        font-size: 18px;
    }

    .score-row {
        grid-template-columns: repeat(3, minmax(0, 1fr)) 34px;
        gap: 7px;
    }

    .score-row__identity > span {
        font-size: 8px;
    }

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

    .stat-card__icon {
        display: none;
    }

    .stat-card strong {
        font-size: 20px;
    }

    .mini-stats {
        grid-template-columns: 1fr 1fr;
    }

    .mini-stat__icon {
        display: none;
    }

    .my-rank__identity > span {
        max-width: 150px;
    }

    .my-rank__identity strong {
        max-width: 160px;
    }

    .auth-card h2 {
        font-size: 27px;
    }

    .auth-showcase {
        padding: 17px;
    }

    .auth-panel {
        padding: 24px 16px 22px;
    }

    .auth-panel .btn--lg {
        min-height: 47px;
    }

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

    .console-heading__actions > :only-child {
        grid-column: 1 / -1;
    }

    .console-heading__actions .btn {
        width: 100%;
    }

    .console-nav__link {
        padding: 7px 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}
