:root {
    --night: #17213d;
    --night-2: #26345c;
    --blue: #5369b0;
    --blue-2: #7187d1;
    --ice: #72d7e9;
    --ice-soft: #dff8fb;
    --lavender: #dcd8ff;
    --pink: #f2acc8;
    --cream: #fffaf4;
    --paper: #ffffff;
    --silver: #eef1f8;
    --ink: #202942;
    --muted: #6f7891;
    --line: #dfe4f1;
    --success: #51b79b;
    --danger: #d46d88;
    --shadow: 0 18px 55px rgba(37, 48, 86, 0.13);
    --shadow-soft: 0 10px 28px rgba(50, 62, 105, 0.09);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at 8% 13%, rgba(114, 215, 233, 0.18), transparent 22rem),
        radial-gradient(circle at 92% 17%, rgba(220, 216, 255, 0.34), transparent 24rem),
        linear-gradient(180deg, #fbfcff 0, #f6f7fc 50%, #fffaf5 100%);
    font-family: "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
}

button,
input,
select {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

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

img {
    max-width: 100%;
}

.shell {
    width: min(calc(100% - 48px), 1180px);
    margin-inline: auto;
}

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

.decor-star,
.decor-paw {
    position: absolute;
    color: rgba(83, 105, 176, 0.14);
    font-weight: 900;
}

.star-one { top: 140px; left: 4%; font-size: 44px; transform: rotate(14deg); }
.star-two { top: 520px; right: 5%; font-size: 64px; transform: rotate(-12deg); }
.paw-one { top: 330px; left: 1.5%; font-size: 22px; box-shadow: 13px -11px 0 -4px rgba(83, 105, 176, 0.14), 23px 1px 0 -5px rgba(83, 105, 176, 0.14); }
.paw-two { top: 760px; right: 2%; font-size: 28px; box-shadow: 15px -13px 0 -5px rgba(83, 105, 176, 0.14), 27px 1px 0 -6px rgba(83, 105, 176, 0.14); }

.site-header {
    position: sticky;
    z-index: 20;
    top: 0;
    display: flex;
    min-height: 78px;
    align-items: center;
    justify-content: space-between;
    padding: 10px max(24px, calc((100vw - 1180px) / 2));
    border-bottom: 1px solid rgba(223, 228, 241, 0.8);
    background: rgba(251, 252, 255, 0.88);
    box-shadow: 0 8px 28px rgba(39, 49, 84, 0.05);
    backdrop-filter: blur(18px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
}

.brand-mark {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border: 2px solid rgba(255, 255, 255, 0.78);
    border-radius: 17px 17px 17px 7px;
    color: white;
    background: linear-gradient(145deg, var(--blue), #354780);
    box-shadow: 0 8px 18px rgba(83, 105, 176, 0.28);
    font-size: 23px;
    transform: rotate(-4deg);
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    color: var(--night);
    font-size: 19px;
    letter-spacing: 0.03em;
}

.brand small {
    margin-top: 2px;
    color: var(--blue);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.18em;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 5px;
    border: 1px solid rgba(223, 228, 241, 0.9);
    border-radius: 17px;
    background: rgba(255, 255, 255, 0.74);
}

.main-nav a {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 14px;
    border-radius: 12px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
    transition: 160ms ease;
}

.main-nav a:hover {
    color: var(--blue);
    background: var(--silver);
}

.main-nav a.active {
    color: white;
    background: linear-gradient(135deg, var(--blue), #3c4e89);
    box-shadow: 0 7px 16px rgba(83, 105, 176, 0.24);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 9px;
}

.captain-entry {
    display: inline-flex;
    min-height: 43px;
    align-items: center;
    gap: 7px;
    padding: 8px 13px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: #8790a5;
    background: rgba(255, 255, 255, 0.76);
    font-size: 12px;
    font-weight: 800;
    transition: 160ms ease;
}

.captain-entry em {
    font-style: normal;
}

.captain-entry:hover,
.captain-entry.active {
    color: var(--blue);
    border-color: #c8d2eb;
    background: white;
    box-shadow: var(--shadow-soft);
}

.hero {
    position: relative;
    display: grid;
    min-height: 530px;
    align-items: center;
    gap: 42px;
    margin-top: 34px;
    padding: 66px 74px;
    overflow: hidden;
    border-radius: 38px;
    color: white;
    background:
        radial-gradient(circle at 78% 24%, rgba(114, 215, 233, 0.27), transparent 21rem),
        linear-gradient(135deg, #192441 0%, #2c3d72 54%, #5069af 100%);
    box-shadow: 0 24px 70px rgba(31, 43, 80, 0.24);
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
}

.hero::before,
.hero::after {
    position: absolute;
    content: "";
    pointer-events: none;
}

.hero::before {
    width: 340px;
    height: 340px;
    right: -75px;
    top: -105px;
    border: 42px solid rgba(120, 219, 236, 0.1);
    border-radius: 50%;
}

.hero::after {
    width: 190px;
    height: 72px;
    left: 40%;
    bottom: -43px;
    border-radius: 50%;
    background: rgba(239, 174, 207, 0.12);
    transform: rotate(-8deg);
}

.hero-copy {
    position: relative;
    z-index: 2;
}

.eyebrow,
.section-kicker {
    color: var(--ice);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.16em;
}

.eyebrow span {
    color: var(--pink);
}

.hero h1 {
    margin: 16px 0 12px;
    font-size: clamp(46px, 5vw, 68px);
    line-height: 1.06;
    letter-spacing: -0.035em;
}

.hero h1 span {
    color: #e6fbff;
    text-shadow: 0 4px 0 rgba(114, 215, 233, 0.18);
}

.hero-slogan {
    margin: 0;
    color: #ffd3e4;
    font-size: 18px;
    font-weight: 800;
}

.hero-description {
    max-width: 570px;
    margin: 14px 0 24px;
    color: rgba(243, 247, 255, 0.74);
    font-size: 13px;
    line-height: 1.9;
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: 13px;
    color: rgba(255, 255, 255, 0.62);
    font-size: 11px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    color: #efffff;
    background: rgba(255, 255, 255, 0.08);
}

.status-pill i,
.state-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #72e6bf;
    box-shadow: 0 0 0 4px rgba(114, 230, 191, 0.15);
}

.hero-jump {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
    padding: 12px 17px;
    border-radius: 13px;
    color: var(--night);
    background: linear-gradient(135deg, #fdfdff, #c9f4fb);
    box-shadow: 0 9px 22px rgba(5, 16, 43, 0.2);
    font-size: 12px;
    font-weight: 850;
    transition: transform 160ms ease;
}

.hero-jump:hover {
    transform: translateY(-2px);
}

.hero-jump b {
    color: var(--blue);
    font-size: 16px;
}

.mascot-stage {
    position: relative;
    z-index: 2;
    width: min(100%, 340px);
    justify-self: center;
    padding-bottom: 30px;
    animation: mascot-float 4.8s ease-in-out infinite;
}

.hero-sparkles {
    position: absolute;
    z-index: 1;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.hero-sparkles i {
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ice);
    box-shadow: 0 0 14px rgba(114, 215, 233, 0.8);
    animation: sparkle 3.2s ease-in-out infinite;
}

.hero-sparkles i::before,
.hero-sparkles i::after {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 99px;
    background: inherit;
    content: "";
    transform: translate(-50%, -50%);
}

.hero-sparkles i::before { width: 22px; height: 2px; }
.hero-sparkles i::after { width: 2px; height: 22px; }
.hero-sparkles i:nth-child(1) { top: 12%; left: 46%; animation-delay: -0.8s; }
.hero-sparkles i:nth-child(2) { top: 27%; right: 5%; animation-delay: -2.1s; transform: scale(0.7); }
.hero-sparkles i:nth-child(3) { bottom: 12%; left: 48%; animation-delay: -1.4s; transform: scale(0.55); }
.hero-sparkles i:nth-child(4) { top: 8%; right: 36%; animation-delay: -2.7s; transform: scale(0.45); }

.mascot-portrait {
    position: relative;
    z-index: 2;
    aspect-ratio: 1;
    overflow: hidden;
    border: 9px solid rgba(255, 255, 255, 0.94);
    border-radius: 44% 44% 48% 48% / 42% 42% 53% 53%;
    background: var(--silver);
    box-shadow: 0 24px 60px rgba(5, 13, 39, 0.35), 0 0 0 2px rgba(114, 215, 233, 0.32);
    transform: rotate(2deg);
}

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

.mascot-ears {
    position: absolute;
    z-index: 1;
    top: -42px;
    display: flex;
    width: 100%;
    justify-content: space-around;
}

.mascot-ears i {
    width: 92px;
    height: 104px;
    border: 7px solid rgba(255, 255, 255, 0.92);
    border-radius: 78% 12% 52% 38%;
    background: linear-gradient(135deg, #c9d0e1 35%, #2a3456 36%);
    transform: rotate(36deg);
}

.mascot-ears i:last-child {
    transform: scaleX(-1) rotate(36deg);
}

.mascot-label {
    position: absolute;
    z-index: 4;
    right: -14px;
    bottom: 7px;
    padding: 11px 18px;
    border: 3px solid white;
    border-radius: 16px 16px 16px 5px;
    color: var(--night);
    background: linear-gradient(135deg, #f7f4ff, #cdf6fb);
    box-shadow: var(--shadow-soft);
    transform: rotate(-3deg);
}

.mascot-label span,
.mascot-label strong {
    display: block;
}

.mascot-label span {
    color: var(--blue);
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 0.16em;
}

.mascot-label strong {
    margin-top: 2px;
    font-size: 14px;
}

.mascot-bubble {
    position: absolute;
    z-index: 5;
    display: grid;
    place-items: center;
    border: 3px solid rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    box-shadow: 0 12px 25px rgba(11, 20, 53, 0.25);
    font-weight: 900;
}

.bubble-points {
    top: 7%;
    right: -42px;
    width: 62px;
    height: 62px;
    color: #30467f;
    background: var(--pink);
    transform: rotate(9deg);
}

.bubble-paw {
    left: -40px;
    bottom: 22%;
    width: 56px;
    height: 56px;
    background: var(--blue);
    transform: rotate(-9deg);
}

.notice {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 18px;
    padding: 14px 18px;
    border: 1px solid #c9d7ef;
    border-radius: 16px;
    color: #445b8d;
    background: #eef5ff;
    font-size: 12px;
}

.notice-icon {
    display: grid;
    width: 26px;
    height: 26px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    color: white;
    background: var(--blue);
    font-weight: 900;
}

.notice p {
    display: inline;
    margin-left: 8px;
    color: var(--muted);
}

.metrics {
    display: grid;
    gap: 14px;
    margin-top: 18px;
    grid-template-columns: 1.35fr repeat(3, 1fr);
}

.metric-card {
    position: relative;
    min-height: 150px;
    padding: 24px;
    overflow: hidden;
    border: 1px solid rgba(220, 226, 239, 0.9);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-soft);
}

.metric-card::after {
    position: absolute;
    right: -22px;
    bottom: -24px;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: var(--silver);
    content: "";
}

.metric-featured {
    color: white;
    border: 0;
    background: linear-gradient(145deg, var(--blue), #34467f);
}

.metric-featured::before,
.podium-card.first::before {
    position: absolute;
    z-index: 3;
    top: -45%;
    left: -80%;
    width: 42%;
    height: 190%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
    content: "";
    pointer-events: none;
    transform: rotate(18deg);
    animation: card-shine 6.5s ease-in-out infinite;
}

.metric-featured::after {
    background: rgba(114, 215, 233, 0.16);
}

.metric-icon,
.metric-emoji {
    position: absolute;
    z-index: 2;
    top: 19px;
    right: 19px;
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 13px;
    background: var(--silver);
    font-size: 17px;
    transform: rotate(4deg);
}

.metric-featured .metric-emoji {
    background: rgba(255, 255, 255, 0.13);
}

.metric-label,
.metric-card strong,
.metric-card small {
    position: relative;
    z-index: 2;
    display: block;
}

.metric-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.metric-featured .metric-label {
    color: rgba(255, 255, 255, 0.7);
}

.metric-card strong {
    margin-top: 14px;
    font-size: 32px;
    letter-spacing: -0.03em;
}

.metric-card small {
    margin-top: 5px;
    color: #9ba3b8;
    font-size: 8px;
    font-weight: 850;
    letter-spacing: 0.14em;
}

.metric-featured small {
    color: var(--ice);
}

.ranking-section {
    padding: 82px 0 88px;
}

.section-heading,
.dashboard-topline {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.section-heading h2,
.dashboard-topline h2 {
    margin: 8px 0 0;
    color: var(--night);
    font-size: clamp(29px, 3.7vw, 43px);
    letter-spacing: -0.035em;
}

.section-heading p {
    margin: 9px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.section-kicker {
    color: var(--blue);
}

.button {
    display: inline-flex;
    min-height: 43px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 16px;
    border: 0;
    border-radius: 13px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 850;
    transition: transform 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
}

.button:hover:not(:disabled) {
    transform: translateY(-2px);
}

.button:disabled {
    cursor: wait;
    opacity: 0.62;
}

.button-primary {
    color: white;
    background: linear-gradient(135deg, var(--blue), #40538f);
    box-shadow: 0 8px 18px rgba(83, 105, 176, 0.24);
}

.button-dark {
    color: white;
    background: var(--night);
    box-shadow: 0 8px 18px rgba(23, 33, 61, 0.18);
}

.button-light,
.button-ghost {
    border: 1px solid var(--line);
    color: var(--blue);
    background: white;
    box-shadow: var(--shadow-soft);
}

.button-ghost {
    box-shadow: none;
}

.button-wide {
    width: 100%;
}

.podium {
    display: grid;
    align-items: end;
    gap: 15px;
    margin-top: 30px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.podium-card {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 140px;
    align-items: center;
    gap: 16px;
    padding: 22px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-soft);
}

.podium-card.first {
    min-height: 164px;
    border-color: #c7d5fb;
    background: linear-gradient(145deg, #f2f5ff, #e4fbff);
    box-shadow: 0 17px 42px rgba(62, 78, 135, 0.15);
}

.podium-card::after {
    position: absolute;
    right: -20px;
    bottom: -35px;
    color: rgba(83, 105, 176, 0.06);
    content: "★";
    font-size: 110px;
}

.podium-rank {
    position: absolute;
    top: 12px;
    right: 16px;
    color: rgba(83, 105, 176, 0.15);
    font-size: 32px;
    font-weight: 900;
}

.avatar-wrap {
    position: relative;
    display: inline-grid;
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
    place-items: center;
    overflow: hidden;
    border: 3px solid white;
    border-radius: 17px 17px 17px 6px;
    background: linear-gradient(145deg, #dce6ff, #d9f8fb);
    box-shadow: 0 5px 14px rgba(55, 71, 123, 0.15);
}

.podium-card .avatar-wrap {
    width: 66px;
    height: 66px;
    border-radius: 22px 22px 22px 8px;
}

.avatar,
.avatar-fallback {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.avatar {
    z-index: 2;
    display: block;
    object-fit: cover;
}

.avatar-fallback {
    z-index: 1;
    display: grid;
    place-items: center;
    color: #425994;
    font-size: 17px;
    font-weight: 900;
}

.podium-info {
    position: relative;
    z-index: 2;
    min-width: 0;
}

.podium-info strong,
.podium-info span,
.podium-info small {
    display: block;
}

.podium-info strong {
    overflow: hidden;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.podium-info span {
    margin-top: 7px;
    color: var(--blue);
    font-size: 24px;
    font-weight: 900;
}

.podium-info small {
    color: var(--muted);
    font-size: 9px;
}

.board-card {
    margin-top: 18px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
}

.mobile-ranking-list,
.load-more-button {
    display: none;
}

@keyframes mascot-float {
    0%, 100% { transform: translateY(0) rotate(0); }
    50% { transform: translateY(-7px) rotate(0.8deg); }
}

@keyframes sparkle {
    0%, 100% { opacity: 0.2; transform: scale(0.45) rotate(0deg); }
    50% { opacity: 1; transform: scale(1) rotate(45deg); }
}

@keyframes card-shine {
    0%, 66%, 100% { left: -80%; opacity: 0; }
    72% { opacity: 1; }
    86% { left: 145%; opacity: 0; }
}

@keyframes card-rise {
    from { opacity: 0; transform: translateY(12px) scale(0.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.board-toolbar {
    display: grid;
    gap: 10px;
    padding: 16px;
    border-bottom: 1px solid var(--line);
    background: #fbfcff;
    grid-template-columns: minmax(240px, 1fr) 180px 180px;
}

.field {
    position: relative;
    display: block;
}

.field input,
.field select,
.password-wrap input {
    width: 100%;
    height: 44px;
    border: 1px solid #d8deec;
    border-radius: 12px;
    outline: none;
    color: var(--ink);
    background: white;
    font-size: 12px;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.field input {
    padding: 0 13px 0 40px;
}

.field select {
    padding: 0 32px 0 13px;
}

.field input:focus,
.field select:focus,
.password-wrap input:focus {
    border-color: var(--blue-2);
    box-shadow: 0 0 0 4px rgba(83, 105, 176, 0.11);
}

.field-icon {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 14px;
    color: var(--blue);
    font-size: 18px;
    transform: translateY(-50%);
}

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

table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
}

th,
td {
    padding: 14px 16px;
    border-bottom: 1px solid #edf0f6;
    text-align: left;
    white-space: nowrap;
}

th {
    color: #8a93a8;
    background: #f8f9fd;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.08em;
}

td {
    color: #5f6880;
    font-size: 11px;
}

tbody tr {
    transition: background 140ms ease;
}

tbody tr:hover {
    background: #f7f9ff;
}

.number-cell {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.monthly-value {
    color: var(--blue);
    font-weight: 900;
}

.growth {
    color: var(--success);
    font-weight: 850;
}

.power-value {
    color: #7356ad;
    font-weight: 850;
}

.rank-badge {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 10px;
    color: #7e879d;
    background: var(--silver);
    font-size: 11px;
    font-weight: 900;
}

.rank-badge.top {
    color: white;
    background: linear-gradient(145deg, var(--blue), #394d88);
}

.player-cell {
    display: flex;
    min-width: 180px;
    align-items: center;
    gap: 11px;
}

.player-cell strong,
.player-cell small {
    display: block;
}

.player-cell strong {
    max-width: 150px;
    overflow: hidden;
    color: var(--ink);
    font-size: 12px;
    text-overflow: ellipsis;
}

.player-cell small {
    margin-top: 3px;
    color: #a1a8b8;
    font-size: 9px;
}

.title-tag {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    color: #536495;
    background: #edf1fc;
    font-size: 9px;
    font-weight: 800;
}

.empty-state {
    padding: 65px 24px;
    text-align: center;
}

.empty-state span {
    display: block;
    margin-bottom: 10px;
    font-size: 33px;
}

.empty-state strong {
    font-size: 14px;
}

.empty-state p {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 11px;
}

.board-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 17px;
    color: #9ba2b3;
    background: #fbfcff;
    font-size: 9px;
}

.site-footer {
    display: flex;
    width: min(calc(100% - 48px), 1180px);
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 auto;
    padding: 25px 0 34px;
    border-top: 1px solid var(--line);
    color: #9ca4b6;
    font-size: 10px;
}

.tech-support {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.tech-support img {
    width: 27px;
    height: 27px;
    object-fit: cover;
    border: 2px solid white;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(58, 66, 102, 0.12);
}

.admin-hero {
    position: relative;
    display: flex;
    min-height: 265px;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    margin-top: 34px;
    padding: 45px 64px;
    overflow: hidden;
    border-radius: 32px;
    background:
        radial-gradient(circle at 80% 20%, rgba(114, 215, 233, 0.42), transparent 17rem),
        linear-gradient(135deg, #f4f6ff, #e2f7fb 57%, #dedaff);
    box-shadow: var(--shadow);
}

.admin-hero::after {
    position: absolute;
    right: 19%;
    bottom: -125px;
    width: 230px;
    height: 230px;
    border: 34px solid rgba(83, 105, 176, 0.07);
    border-radius: 50%;
    content: "";
}

.admin-hero-copy {
    position: relative;
    z-index: 2;
}

.eyebrow-dark {
    color: var(--blue);
}

.admin-hero h1 {
    margin: 12px 0 8px;
    color: var(--night);
    font-size: clamp(39px, 5vw, 56px);
    letter-spacing: -0.04em;
}

.admin-hero p {
    max-width: 550px;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.8;
}

.admin-mascot-mini {
    position: relative;
    z-index: 2;
    width: 160px;
    flex: 0 0 auto;
}

.admin-mascot-mini img {
    display: block;
    width: 142px;
    height: 142px;
    margin-left: auto;
    object-fit: cover;
    border: 7px solid white;
    border-radius: 50% 50% 50% 19%;
    box-shadow: 0 15px 32px rgba(53, 67, 116, 0.19);
    transform: rotate(4deg);
}

.admin-mascot-mini span {
    position: absolute;
    right: 2px;
    bottom: -4px;
    padding: 8px 12px;
    border: 2px solid white;
    border-radius: 11px 11px 11px 4px;
    color: white;
    background: var(--blue);
    box-shadow: var(--shadow-soft);
    font-size: 9px;
    font-weight: 850;
    transform: rotate(-3deg);
}

.admin-shell {
    min-height: 520px;
    padding: 42px 0 90px;
}

.toast {
    max-width: 900px;
    margin: 0 auto 16px;
    padding: 13px 16px;
    border: 1px solid #e7bfd0;
    border-radius: 14px;
    color: #8b4961;
    background: #fff0f6;
    font-size: 12px;
    font-weight: 750;
}

.toast.success {
    border-color: #aee0d1;
    color: #26715c;
    background: #eafaf5;
}

.login-panel {
    display: grid;
    max-width: 900px;
    min-height: 430px;
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: white;
    box-shadow: var(--shadow);
    grid-template-columns: 0.86fr 1.14fr;
}

.login-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.72);
    background:
        radial-gradient(circle at 50% 30%, rgba(114, 215, 233, 0.25), transparent 13rem),
        linear-gradient(145deg, var(--night), #374b86);
    font-size: 10px;
    letter-spacing: 0.15em;
}

.login-visual::before {
    position: absolute;
    width: 260px;
    height: 260px;
    border: 34px solid rgba(255, 255, 255, 0.04);
    border-radius: 50%;
    content: "";
}

.login-visual img {
    position: relative;
    z-index: 2;
    display: block;
    width: 145px;
    height: 145px;
    object-fit: cover;
    border: 7px solid rgba(255, 255, 255, 0.94);
    border-radius: 50% 50% 50% 17%;
    box-shadow: 0 16px 35px rgba(5, 12, 35, 0.3);
    transform: rotate(-3deg);
}

.login-visual strong,
.login-visual small {
    position: relative;
    z-index: 2;
}

.login-visual small {
    letter-spacing: 0.05em;
}

.lock-mark {
    position: absolute;
    z-index: 3;
    right: calc(50% - 85px);
    top: calc(50% - 55px);
    display: grid;
    width: 45px;
    height: 45px;
    place-items: center;
    border: 3px solid white;
    border-radius: 50%;
    background: var(--pink);
    box-shadow: 0 8px 18px rgba(12, 18, 43, 0.25);
    font-size: 19px;
    transform: rotate(8deg);
}

.login-form {
    align-self: center;
    padding: 50px 58px;
}

.login-form h2 {
    margin: 10px 0 12px;
    color: var(--night);
    font-size: 29px;
    letter-spacing: -0.03em;
}

.login-form > p {
    margin: 0 0 27px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.8;
}

.input-label {
    display: block;
    margin-bottom: 8px;
    font-size: 11px;
    font-weight: 850;
}

.password-wrap {
    position: relative;
    margin-bottom: 15px;
}

.password-wrap input {
    padding: 0 70px 0 14px;
}

.password-wrap button {
    position: absolute;
    top: 50%;
    right: 7px;
    padding: 7px 10px;
    border: 0;
    border-radius: 9px;
    color: var(--blue);
    background: #edf1fc;
    cursor: pointer;
    font-size: 10px;
    font-weight: 850;
    transform: translateY(-50%);
}

.admin-dashboard {
    max-width: 960px;
    margin: 0 auto;
}

.admin-grid {
    display: grid;
    gap: 18px;
    margin-top: 25px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.snowflake-form {
    position: relative;
    z-index: 2;
    margin-top: 26px;
}

.snowflake-form input {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: 1px solid #d8deec;
    border-radius: 11px;
    outline: none;
    color: var(--ink);
    background: white;
    font-size: 11px;
}

.snowflake-form input:focus {
    border-color: var(--blue-2);
    box-shadow: 0 0 0 4px rgba(83, 105, 176, 0.11);
}

.snowflake-id-row {
    display: grid;
    gap: 7px;
    grid-template-columns: minmax(0, 1fr) auto;
}

.snowflake-player-state {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 11px 0 14px;
    padding: 11px;
    border-radius: 12px;
    background: #eff6ff;
}

.snowflake-player-state > span {
    font-size: 20px;
}

.snowflake-player-state strong,
.snowflake-player-state small {
    display: block;
}

.snowflake-player-state strong {
    font-size: 10px;
}

.snowflake-player-state small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 8px;
}

.snowflake-form > .button {
    margin-top: 12px;
}

.admin-card {
    position: relative;
    min-height: 330px;
    padding: 29px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 23px;
    background: white;
    box-shadow: var(--shadow-soft);
}

.admin-card::after {
    position: absolute;
    right: -44px;
    bottom: -48px;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: var(--silver);
    content: "";
}

.card-number {
    position: absolute;
    top: 15px;
    right: 20px;
    color: rgba(83, 105, 176, 0.08);
    font-size: 63px;
    font-weight: 900;
    line-height: 1;
}

.admin-card-heading {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-icon {
    display: grid;
    width: 47px;
    height: 47px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 15px 15px 15px 6px;
    color: white;
    background: linear-gradient(145deg, var(--blue), #40538d);
    box-shadow: 0 7px 16px rgba(83, 105, 176, 0.22);
    font-size: 19px;
}

.admin-card-heading h3,
.admin-card-heading p {
    margin: 0;
}

.admin-card-heading h3 {
    color: var(--night);
    font-size: 16px;
}

.admin-card-heading p {
    margin-top: 4px;
    color: var(--muted);
    font-size: 10px;
}

.token-state {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 42px 0 34px;
    padding: 17px;
    border-radius: 14px;
    background: #eefaf6;
}

.token-state strong,
.token-state small {
    display: block;
}

.token-state strong {
    font-size: 12px;
}

.token-state small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 9px;
}

.token-state.offline {
    background: #fff0f5;
}

.token-state.offline .state-dot {
    background: var(--danger);
    box-shadow: 0 0 0 4px rgba(212, 109, 136, 0.14);
}

.sync-summary {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
    font-size: 11px;
}

.sync-summary:first-of-type {
    margin-top: 36px;
}

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

.sync-card .button {
    position: relative;
    z-index: 2;
    margin-top: 23px;
}

.qr-panel {
    display: grid;
    align-items: center;
    gap: 40px;
    margin-top: 18px;
    padding: 34px 42px;
    border: 1px solid #cfdcf3;
    border-radius: 23px;
    background: linear-gradient(145deg, #f6f8ff, #ecfbfd);
    box-shadow: var(--shadow-soft);
    grid-template-columns: 1fr 220px;
}

.qr-copy h3 {
    margin: 8px 0 10px;
    color: var(--night);
    font-size: 26px;
}

.qr-copy p {
    max-width: 520px;
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.8;
}

.qr-actions {
    display: flex;
    gap: 9px;
    margin-top: 20px;
}

.qr-frame {
    display: grid;
    width: 210px;
    height: 210px;
    place-items: center;
    padding: 12px;
    border: 1px solid #d4dced;
    border-radius: 20px;
    background: white;
    box-shadow: 0 12px 28px rgba(51, 66, 112, 0.13);
}

.qr-frame img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Member identity decorations */
.title-tag.role-captain {
    color: #7d5708;
    background: linear-gradient(135deg, #fff1b9, #ffe1a0);
    box-shadow: inset 0 0 0 1px rgba(193, 139, 26, 0.18);
}

.title-tag.role-vice {
    color: #3d579a;
    background: linear-gradient(135deg, #dce8ff, #d8f7ff);
    box-shadow: inset 0 0 0 1px rgba(83, 105, 176, 0.15);
}

.title-tag.role-elite {
    color: #7251a1;
    background: linear-gradient(135deg, #eee4ff, #f9e5ff);
    box-shadow: inset 0 0 0 1px rgba(129, 93, 178, 0.14);
}

tbody tr.role-captain { background: linear-gradient(90deg, rgba(255, 241, 185, 0.3), transparent 45%); }
tbody tr.role-vice { background: linear-gradient(90deg, rgba(220, 232, 255, 0.35), transparent 45%); }
tbody tr.role-elite { background: linear-gradient(90deg, rgba(238, 228, 255, 0.32), transparent 45%); }

/* Personal center */
.profile-hero {
    position: relative;
    display: flex;
    min-height: 245px;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    margin-top: 34px;
    padding: 45px 62px;
    overflow: hidden;
    border-radius: 32px;
    background:
        radial-gradient(circle at 83% 26%, rgba(255,255,255,0.72), transparent 10rem),
        linear-gradient(135deg, #e5edff, #dff9fc 55%, #f2e8ff);
    box-shadow: var(--shadow);
}

.profile-hero::before {
    position: absolute;
    right: 16%;
    bottom: -145px;
    width: 250px;
    height: 250px;
    border: 38px solid rgba(83, 105, 176, 0.07);
    border-radius: 50%;
    content: "";
}

.profile-hero h1 {
    position: relative;
    margin: 9px 0;
    color: var(--night);
    font-size: clamp(39px, 5vw, 55px);
    letter-spacing: -0.04em;
}

.profile-hero p {
    position: relative;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.profile-hero-paw {
    position: relative;
    z-index: 2;
    display: grid;
    width: 130px;
    height: 130px;
    flex: 0 0 auto;
    place-items: center;
    border: 7px solid white;
    border-radius: 50% 50% 50% 20%;
    background: linear-gradient(145deg, var(--blue), #394c87);
    box-shadow: 0 18px 38px rgba(53, 67, 116, 0.22);
    font-size: 52px;
    transform: rotate(5deg);
    animation: mascot-float 4.8s ease-in-out infinite;
}

.profile-shell {
    min-height: 520px;
    padding: 34px 0 88px;
}

.member-login-panel {
    display: grid;
    max-width: 980px;
    min-height: 420px;
    margin: 0 auto;
    align-items: center;
    gap: 30px;
    padding: 48px 52px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: white;
    box-shadow: var(--shadow);
    grid-template-columns: minmax(0, 1fr) 280px;
}

.member-login-copy h2 {
    margin: 10px 0 12px;
    color: var(--night);
    font-size: 31px;
    letter-spacing: -0.03em;
}

.member-login-copy > p {
    max-width: 530px;
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.85;
}

.scan-steps {
    display: grid;
    gap: 8px;
    margin: 23px 0;
    padding: 0;
    list-style: none;
}

.scan-steps li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #606b83;
    font-size: 11px;
}

.scan-steps b {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 8px;
    color: white;
    background: var(--blue);
    font-size: 9px;
}

.member-qr-card,
.member-qr-placeholder {
    min-height: 300px;
    padding: 22px;
    border: 1px solid #d8e0f0;
    border-radius: 22px;
    background: linear-gradient(145deg, #f7f9ff, #edfbfd);
    text-align: center;
}

.member-qr-card strong {
    display: block;
    margin: 11px 0;
    font-size: 11px;
}

.member-qr-frame {
    display: grid;
    width: 210px;
    height: 210px;
    margin: 0 auto;
    place-items: center;
    padding: 11px;
    border-radius: 18px;
    background: white;
    box-shadow: var(--shadow-soft);
}

.member-qr-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.member-qr-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: #8490aa;
}

.member-qr-placeholder span {
    font-size: 46px;
    animation: sparkle 3.2s ease-in-out infinite;
}

.member-qr-placeholder strong,
.member-qr-placeholder small {
    display: block;
}

.member-qr-placeholder strong {
    margin-top: 11px;
    color: #56617a;
    font-size: 12px;
}

.member-qr-placeholder small {
    margin-top: 5px;
    font-size: 9px;
}

.member-dashboard {
    max-width: 980px;
    margin: 0 auto;
}

.profile-identity-card {
    position: relative;
    display: grid;
    align-items: center;
    gap: 18px;
    padding: 24px 27px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 25px;
    background: linear-gradient(135deg, white, #f3f7ff);
    box-shadow: var(--shadow);
    grid-template-columns: auto minmax(0, 1fr) auto auto;
}

.profile-avatar-wrap {
    position: relative;
    display: grid;
    width: 88px;
    height: 88px;
    place-items: center;
    overflow: hidden;
    border: 5px solid white;
    border-radius: 30px 30px 30px 10px;
    color: #415994;
    background: linear-gradient(145deg, #dce6ff, #d9f8fb);
    box-shadow: 0 9px 22px rgba(55, 71, 123, 0.16);
    font-size: 27px;
    font-weight: 900;
}

.profile-avatar-wrap img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-role-chip {
    display: inline-flex;
    padding: 5px 10px;
    border-radius: 999px;
    color: #536495;
    background: #edf1fc;
    font-size: 9px;
    font-weight: 850;
}

.profile-role-chip[data-role="1"] { color: #7d5708; background: #fff1b9; }
.profile-role-chip[data-role="2"] { color: #3d579a; background: #dce8ff; }
.profile-role-chip[data-role="4"] { color: #7251a1; background: #eee4ff; }

.profile-identity-copy h2,
.profile-identity-copy p {
    margin: 0;
}

.profile-identity-copy h2 {
    margin-top: 7px;
    color: var(--night);
    font-size: 25px;
}

.profile-identity-copy p {
    margin-top: 4px;
    color: #929aad;
    font-size: 10px;
}

.snowflake-balance {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 17px;
    border: 1px solid #cdddf3;
    border-radius: 17px;
    background: linear-gradient(145deg, #e9f7ff, #eef0ff);
}

.snowflake-balance > span {
    font-size: 25px;
}

.snowflake-balance small,
.snowflake-balance strong {
    display: block;
}

.snowflake-balance small { color: #70809f; font-size: 8px; }
.snowflake-balance strong { margin-top: 2px; color: var(--blue); font-size: 20px; }

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

.profile-stat {
    min-height: 135px;
    padding: 21px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: white;
    box-shadow: var(--shadow-soft);
}

.profile-stat.primary {
    color: white;
    border: 0;
    background: linear-gradient(145deg, var(--blue), #394c86);
}

.profile-stat span,
.profile-stat strong,
.profile-stat small {
    display: block;
}

.profile-stat span { color: var(--muted); font-size: 10px; }
.profile-stat strong { margin-top: 12px; color: var(--night); font-size: 25px; }
.profile-stat small { margin-top: 5px; color: #9aa2b5; font-size: 8px; }
.profile-stat.primary span { color: rgba(255,255,255,0.7); }
.profile-stat.primary strong { color: white; }
.profile-stat.primary small { color: var(--ice); }

.profile-note-card {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-top: 16px;
    padding: 18px 21px;
    border: 1px solid #d8e0ef;
    border-radius: 18px;
    background: #f7f9fe;
}

.profile-note-card > span { font-size: 24px; }
.profile-note-card div { min-width: 0; flex: 1; }
.profile-note-card strong { font-size: 11px; }
.profile-note-card p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }

/* Shop construction page */
.shop-shell {
    position: relative;
    display: grid;
    min-height: 590px;
    align-items: center;
    gap: 60px;
    margin-top: 34px;
    margin-bottom: 82px;
    padding: 70px 76px;
    overflow: hidden;
    border-radius: 36px;
    color: white;
    background:
        radial-gradient(circle at 78% 25%, rgba(114, 215, 233, 0.25), transparent 20rem),
        linear-gradient(135deg, #18233f, #344982 58%, #596fb5);
    box-shadow: 0 24px 70px rgba(31, 43, 80, 0.24);
    grid-template-columns: minmax(0, 1fr) 340px;
}

.shop-copy,
.shop-construction {
    position: relative;
    z-index: 2;
}

.shop-copy h1 {
    margin: 13px 0 10px;
    font-size: clamp(48px, 6vw, 70px);
    letter-spacing: -0.05em;
}

.shop-copy > p {
    max-width: 520px;
    margin: 0;
    color: rgba(255,255,255,0.68);
    font-size: 13px;
    line-height: 1.8;
}

.construction-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 24px 0;
    padding: 9px 13px;
    border: 1px solid rgba(255,255,255,0.13);
    border-radius: 999px;
    color: #e8fbff;
    background: rgba(255,255,255,0.08);
    font-size: 10px;
    font-weight: 800;
}

.construction-pill span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--pink);
    box-shadow: 0 0 0 4px rgba(242,172,200,0.12);
}

.shop-construction {
    padding: 38px 30px;
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 28px;
    background: rgba(255,255,255,0.1);
    box-shadow: 0 22px 48px rgba(7,15,43,0.23);
    text-align: center;
    backdrop-filter: blur(12px);
}

.shop-box {
    position: relative;
    display: grid;
    width: 150px;
    height: 150px;
    margin: 0 auto 22px;
    place-items: center;
    border: 7px solid rgba(255,255,255,0.86);
    border-radius: 35px 35px 35px 12px;
    background: linear-gradient(145deg, #dff8fb, #dcd8ff);
    box-shadow: 0 18px 35px rgba(5,14,40,0.25);
    font-size: 47px;
    transform: rotate(-4deg);
    animation: mascot-float 4.8s ease-in-out infinite;
}

.shop-box b {
    position: absolute;
    right: -13px;
    bottom: -12px;
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border: 4px solid white;
    border-radius: 50%;
    color: white;
    background: var(--pink);
    font-size: 20px;
}

.shop-construction > strong {
    color: var(--ice);
    font-size: 11px;
    letter-spacing: 0.17em;
}

.shop-construction > p {
    margin: 8px 0 0;
    color: rgba(255,255,255,0.65);
    font-size: 10px;
}

.shop-snow i {
    position: absolute;
    color: rgba(255,255,255,0.11);
    font-style: normal;
    animation: sparkle 4s ease-in-out infinite;
}

.shop-snow i:nth-child(1) { top: 11%; left: 52%; font-size: 33px; }
.shop-snow i:nth-child(2) { right: 4%; bottom: 8%; font-size: 58px; animation-delay: -1.7s; }
.shop-snow i:nth-child(3) { left: 4%; bottom: 5%; font-size: 25px; animation-delay: -2.8s; }

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

[hidden] {
    display: none !important;
}

@media (max-width: 920px) {
    .hero {
        min-height: 470px;
        padding: 54px 46px;
        grid-template-columns: minmax(0, 1.15fr) minmax(235px, 0.85fr);
    }

    .mascot-stage {
        width: 260px;
    }

    .mascot-ears i {
        width: 72px;
        height: 86px;
    }

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

    .metric-featured {
        grid-column: span 2;
    }

    .board-toolbar {
        grid-template-columns: 1fr 1fr;
    }

    .search-field {
        grid-column: 1 / -1;
    }

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

    .snowflake-card {
        grid-column: 1 / -1;
    }
}

@media (max-width: 680px) {
    .shell {
        width: min(calc(100% - 24px), 1180px);
    }

    .site-header {
        min-height: 68px;
        padding-inline: 12px;
    }

    .brand {
        gap: 7px;
    }

    .brand-mark {
        width: 40px;
        height: 40px;
        border-radius: 14px 14px 14px 6px;
        font-size: 19px;
    }

    .brand strong {
        max-width: 125px;
        overflow: hidden;
        font-size: 14px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .brand small {
        display: none;
    }

    .main-nav {
        gap: 2px;
        padding: 3px;
        border-radius: 13px;
    }

    .main-nav a {
        gap: 4px;
        padding: 7px 8px;
        border-radius: 10px;
        font-size: 10px;
    }

    .main-nav a span {
        display: none;
    }

    .hero {
        display: flex;
        min-height: 0;
        align-items: stretch;
        flex-direction: column;
        gap: 74px;
        margin-top: 12px;
        padding: 38px 26px 30px;
        border-radius: 26px;
    }

    .hero h1 {
        font-size: 42px;
    }

    .hero-slogan {
        font-size: 15px;
    }

    .hero-description {
        font-size: 12px;
    }

    .hero-meta {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .hero-jump {
        margin-top: 18px;
    }

    .mascot-stage {
        width: min(77vw, 280px);
        align-self: center;
    }

    .bubble-points {
        right: -24px;
    }

    .bubble-paw {
        left: -25px;
    }

    .mascot-label {
        right: -7px;
    }

    .notice {
        align-items: flex-start;
    }

    .notice p {
        display: block;
        margin: 3px 0 0;
    }

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

    .metric-card {
        min-height: 136px;
        padding: 20px 17px;
    }

    .metric-card strong {
        font-size: 26px;
    }

    .metric-featured {
        grid-column: 1 / -1;
    }

    .metric-card:last-child {
        grid-column: 1 / -1;
    }

    .ranking-section {
        padding: 60px 0 66px;
    }

    .section-heading,
    .dashboard-topline {
        align-items: flex-start;
        flex-direction: column;
    }

    .section-heading h2,
    .dashboard-topline h2 {
        font-size: 30px;
    }

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

    .podium-card,
    .podium-card.first {
        min-height: 108px;
    }

    .podium-card.first {
        order: -1;
    }

    .board-toolbar {
        grid-template-columns: 1fr;
    }

    .search-field {
        grid-column: auto;
    }

    .board-footer,
    .site-footer {
        align-items: center;
        flex-direction: column;
    }

    .site-footer {
        width: calc(100% - 24px);
        text-align: center;
    }

    .admin-hero {
        min-height: 235px;
        margin-top: 12px;
        padding: 32px 26px;
        border-radius: 25px;
    }

    .admin-hero h1 {
        font-size: 38px;
    }

    .admin-hero p {
        max-width: 220px;
        font-size: 11px;
    }

    .admin-mascot-mini {
        position: absolute;
        right: 14px;
        bottom: 18px;
        width: 105px;
    }

    .admin-mascot-mini img {
        width: 92px;
        height: 92px;
    }

    .admin-mascot-mini span {
        font-size: 7px;
    }

    .login-panel {
        grid-template-columns: 1fr;
    }

    .login-visual {
        min-height: 220px;
        padding: 25px 0 18px;
    }

    .login-visual img {
        width: 112px;
        height: 112px;
    }

    .lock-mark {
        right: calc(50% - 68px);
        top: 79px;
        width: 39px;
        height: 39px;
    }

    .login-form {
        padding: 36px 25px;
    }

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

    .qr-panel {
        padding: 28px 23px;
        grid-template-columns: 1fr;
    }

    .qr-frame {
        width: min(210px, 100%);
        justify-self: center;
    }

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

/* Mobile-first compact experience */
@media (max-width: 680px) {
    body {
        padding-bottom: calc(76px + env(safe-area-inset-bottom));
        background:
            radial-gradient(circle at 90% 7%, rgba(220, 216, 255, 0.42), transparent 16rem),
            linear-gradient(180deg, #f9fbff 0, #f6f7fc 62%, #fffaf6 100%);
    }

    .shell {
        width: calc(100% - 20px);
    }

    .site-header {
        position: relative;
        min-height: 58px;
        justify-content: center;
        padding: 8px 10px;
        background: rgba(251, 252, 255, 0.96);
        backdrop-filter: none;
    }

    .brand-mark {
        width: 36px;
        height: 36px;
        border-radius: 13px 13px 13px 5px;
        font-size: 17px;
    }

    .brand strong {
        max-width: none;
        font-size: 15px;
    }

    .brand small {
        display: block;
        font-size: 8px;
    }

    .main-nav {
        position: fixed;
        z-index: 40;
        right: 12px;
        bottom: calc(10px + env(safe-area-inset-bottom));
        left: 12px;
        display: grid;
        padding: 5px;
        border: 1px solid rgba(212, 219, 236, 0.9);
        border-radius: 20px;
        background: rgba(255, 255, 255, 0.9);
        box-shadow: 0 14px 38px rgba(30, 42, 78, 0.2);
        backdrop-filter: blur(18px);
        grid-template-columns: 1fr 1fr;
    }

    .main-nav a {
        min-height: 46px;
        justify-content: center;
        gap: 7px;
        padding: 8px;
        border-radius: 15px;
        font-size: 12px;
    }

    .main-nav a span {
        display: inline;
        font-size: 15px;
    }

    .hero {
        position: relative;
        display: block;
        min-height: 272px;
        margin-top: 10px;
        padding: 29px 18px 22px;
        overflow: hidden;
        border-radius: 25px;
    }

    .hero::before {
        width: 190px;
        height: 190px;
        right: -82px;
        top: -65px;
        border-width: 25px;
    }

    .hero-copy {
        width: calc(100% - 104px);
    }

    .eyebrow {
        font-size: 8px;
        letter-spacing: 0.12em;
        white-space: nowrap;
    }

    .hero h1 {
        margin: 12px 0 8px;
        font-size: clamp(29px, 8.7vw, 36px);
        line-height: 1.08;
    }

    .hero-slogan {
        max-width: 190px;
        font-size: 12px;
        line-height: 1.55;
    }

    .hero-description,
    .hero-jump,
    .hero-meta .muted,
    .mascot-label {
        display: none;
    }

    .hero-meta {
        margin-top: 17px;
    }

    .status-pill {
        gap: 6px;
        padding: 7px 10px;
        font-size: 9px;
    }

    .status-pill i {
        width: 6px;
        height: 6px;
    }

    .mascot-stage {
        position: absolute;
        right: 12px;
        bottom: 25px;
        width: 118px;
        padding: 0;
    }

    .mascot-portrait {
        border-width: 5px;
        border-radius: 43% 43% 48% 48% / 42% 42% 53% 53%;
        box-shadow: 0 15px 30px rgba(5, 13, 39, 0.32), 0 0 0 1px rgba(114, 215, 233, 0.3);
    }

    .mascot-ears {
        top: -19px;
    }

    .mascot-ears i {
        width: 37px;
        height: 43px;
        border-width: 4px;
    }

    .mascot-bubble {
        border-width: 2px;
    }

    .bubble-points {
        top: 2px;
        right: -5px;
        width: 38px;
        height: 38px;
        font-size: 10px;
    }

    .bubble-paw {
        left: -9px;
        bottom: 9px;
        width: 34px;
        height: 34px;
        font-size: 13px;
    }

    .hero-sparkles i:nth-child(1) { top: 13%; left: 56%; }
    .hero-sparkles i:nth-child(2) { top: 31%; right: 4%; }
    .hero-sparkles i:nth-child(3) { bottom: 8%; left: 56%; }

    .notice {
        gap: 10px;
        margin-top: 9px;
        padding: 11px 12px;
        border-radius: 14px;
        font-size: 10px;
        line-height: 1.5;
    }

    .notice-icon {
        width: 22px;
        height: 22px;
        font-size: 10px;
    }

    .metrics {
        gap: 8px;
        margin-top: 9px;
        grid-template-columns: 1fr 1fr;
    }

    .metric-card,
    .metric-featured,
    .metric-card:last-child {
        min-height: 102px;
        padding: 15px;
        grid-column: auto;
        border-radius: 18px;
    }

    .metric-icon,
    .metric-emoji {
        top: 12px;
        right: 12px;
        width: 30px;
        height: 30px;
        border-radius: 10px;
        font-size: 13px;
    }

    .metric-label {
        padding-right: 27px;
        font-size: 10px;
    }

    .metric-card strong {
        margin-top: 11px;
        font-size: clamp(20px, 6.2vw, 26px);
    }

    .metric-card small {
        display: none;
    }

    .ranking-section {
        padding: 40px 0 44px;
    }

    .section-heading {
        display: grid;
        align-items: center;
        gap: 10px;
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .section-heading h2 {
        margin-top: 5px;
        font-size: 25px;
        line-height: 1.2;
    }

    .section-heading p {
        display: none;
    }

    .section-kicker {
        font-size: 8px;
    }

    .section-heading .button {
        width: 42px;
        min-height: 42px;
        padding: 0;
        overflow: hidden;
        border-radius: 14px;
        color: transparent;
        font-size: 0;
    }

    .section-heading .button span {
        color: var(--blue);
        font-size: 20px;
    }

    .podium {
        display: flex;
        align-items: stretch;
        gap: 9px;
        margin: 18px -10px 0;
        padding: 0 10px 10px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }

    .podium::-webkit-scrollbar {
        display: none;
    }

    .podium-card,
    .podium-card.first {
        min-width: 0;
        min-height: 104px;
        flex: 0 0 min(48vw, 178px);
        gap: 10px;
        padding: 16px 13px;
        border-radius: 18px;
        scroll-snap-align: start;
    }

    .podium-card.first {
        order: -1;
    }

    .podium-card .avatar-wrap {
        width: 50px;
        height: 50px;
        border-width: 2px;
        border-radius: 17px 17px 17px 6px;
    }

    .podium-rank {
        top: 8px;
        right: 10px;
        font-size: 23px;
    }

    .podium-info {
        min-width: 0;
    }

    .podium-info strong {
        max-width: 82px;
        font-size: 11px;
    }

    .podium-info span {
        margin-top: 5px;
        font-size: 18px;
    }

    .podium-info small {
        font-size: 7px;
    }

    .board-card {
        margin-top: 6px;
        overflow: visible;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    .board-toolbar {
        position: sticky;
        z-index: 12;
        top: 6px;
        display: grid;
        gap: 7px;
        margin: 0 -3px;
        padding: 8px;
        border: 1px solid rgba(220, 226, 239, 0.85);
        border-radius: 17px;
        background: rgba(250, 251, 255, 0.9);
        box-shadow: 0 10px 25px rgba(36, 49, 86, 0.1);
        backdrop-filter: blur(15px);
        grid-template-columns: 1fr 1fr;
    }

    .search-field {
        grid-column: 1 / -1;
    }

    .field input,
    .field select {
        height: 40px;
        border-radius: 11px;
        font-size: 11px;
    }

    .table-wrap {
        overflow: visible;
    }

    .table-wrap table {
        display: none;
    }

    .mobile-ranking-list {
        display: grid;
        gap: 8px;
        padding: 10px 0 2px;
    }

    .mobile-player-card {
        position: relative;
        padding: 13px;
        overflow: hidden;
        border: 1px solid rgba(221, 226, 239, 0.95);
        border-radius: 18px;
        background: rgba(255, 255, 255, 0.94);
        box-shadow: 0 7px 18px rgba(49, 62, 105, 0.07);
        animation: card-rise 340ms both;
        animation-delay: calc(var(--entry-index) * 32ms);
        transition: transform 140ms ease, border-color 140ms ease;
    }

    .mobile-player-card:active {
        border-color: #b9c6e9;
        transform: scale(0.985);
    }

    .mobile-player-top {
        display: grid;
        min-width: 0;
        align-items: center;
        gap: 9px;
        grid-template-columns: 28px 44px minmax(0, 1fr) auto;
    }

    .mobile-rank {
        display: grid;
        width: 28px;
        height: 28px;
        place-items: center;
        border-radius: 10px;
        color: #7d879e;
        background: var(--silver);
        font-size: 10px;
        font-weight: 900;
    }

    .mobile-rank.top {
        color: white;
        background: linear-gradient(145deg, var(--blue), #394d88);
        box-shadow: 0 5px 12px rgba(83, 105, 176, 0.2);
    }

    .mobile-player-card .avatar-wrap {
        width: 44px;
        height: 44px;
        border-width: 2px;
        border-radius: 15px 15px 15px 5px;
    }

    .mobile-player-identity {
        min-width: 0;
    }

    .mobile-player-identity strong,
    .mobile-player-identity span {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-player-identity strong {
        color: var(--ink);
        font-size: 12px;
    }

    .mobile-player-identity span {
        margin-top: 4px;
        color: #99a1b4;
        font-size: 8px;
    }

    .mobile-monthly {
        min-width: 58px;
        text-align: right;
    }

    .mobile-monthly strong,
    .mobile-monthly small {
        display: block;
    }

    .mobile-monthly strong {
        color: var(--blue);
        font-size: 16px;
        letter-spacing: -0.03em;
    }

    .mobile-monthly small {
        margin-top: 2px;
        color: #a1a8b9;
        font-size: 7px;
    }

    .mobile-player-stats {
        display: grid;
        gap: 6px;
        margin-top: 10px;
        padding: 9px 2px 0 37px;
        border-top: 1px solid #eef1f7;
        grid-template-columns: 0.7fr 0.75fr 0.9fr 1fr;
    }

    .mobile-player-stats > span {
        min-width: 0;
    }

    .mobile-player-stats small,
    .mobile-player-stats strong {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-player-stats small {
        color: #a2a9ba;
        font-size: 7px;
    }

    .mobile-player-stats strong {
        margin-top: 3px;
        color: #59627a;
        font-size: 10px;
    }

    .mobile-player-stats .mobile-growth strong {
        color: var(--success);
    }

    .mobile-player-stats .mobile-power strong {
        color: #7356ad;
    }

    .load-more-button:not([hidden]) {
        display: flex;
        width: 100%;
        min-height: 46px;
        align-items: center;
        justify-content: center;
        gap: 7px;
        margin-top: 9px;
        border: 1px solid #d9e0f0;
        border-radius: 15px;
        color: var(--blue);
        background: rgba(255, 255, 255, 0.9);
        box-shadow: 0 7px 18px rgba(49, 62, 105, 0.06);
        font-size: 11px;
        font-weight: 850;
    }

    .board-footer {
        margin-top: 8px;
        padding: 9px 4px;
        border-radius: 12px;
        background: transparent;
        font-size: 8px;
    }

    .site-footer {
        width: calc(100% - 20px);
        padding: 21px 0 6px;
        font-size: 8px;
    }

    .admin-hero {
        min-height: 168px;
        margin-top: 10px;
        padding: 24px 20px;
        border-radius: 23px;
    }

    .admin-hero h1 {
        margin-top: 8px;
        font-size: 30px;
    }

    .admin-hero p {
        max-width: 205px;
        font-size: 9px;
        line-height: 1.6;
    }

    .admin-mascot-mini {
        right: 10px;
        bottom: 15px;
        width: 85px;
    }

    .admin-mascot-mini img {
        width: 78px;
        height: 78px;
        border-width: 4px;
    }

    .admin-mascot-mini span {
        right: -2px;
        padding: 6px 8px;
        font-size: 6px;
    }

    .admin-shell {
        min-height: 0;
        padding: 17px 0 42px;
    }

    .login-panel {
        min-height: 0;
        border-radius: 22px;
    }

    .login-visual {
        display: grid;
        min-height: 128px;
        align-content: center;
        justify-content: stretch;
        gap: 2px 14px;
        padding: 17px 25px;
        grid-template-columns: 76px 1fr;
        grid-template-rows: auto auto;
    }

    .login-visual img {
        width: 76px;
        height: 76px;
        border-width: 4px;
        grid-row: 1 / 3;
    }

    .login-visual strong {
        align-self: end;
        font-size: 10px;
    }

    .login-visual small {
        align-self: start;
        font-size: 8px;
    }

    .lock-mark {
        top: 63px;
        right: auto;
        left: 82px;
        width: 32px;
        height: 32px;
        border-width: 2px;
        font-size: 14px;
    }

    .login-form {
        padding: 27px 21px;
    }

    .login-form h2 {
        font-size: 24px;
    }

    .login-form > p {
        margin-bottom: 20px;
        font-size: 10px;
    }

    .admin-card {
        min-height: 290px;
        padding: 23px;
        border-radius: 20px;
    }

    .qr-panel {
        padding: 24px 19px;
    }
}

/* Elite roster */
.elite-hero {
    position: relative;
    display: grid;
    min-height: 360px;
    align-items: center;
    gap: 40px;
    margin-top: 34px;
    padding: 58px 70px;
    overflow: hidden;
    border-radius: 36px;
    color: white;
    background:
        radial-gradient(circle at 80% 30%, rgba(126, 226, 239, 0.25), transparent 19rem),
        linear-gradient(135deg, #1a2442 0%, #344b87 57%, #7562ad 100%);
    box-shadow: 0 22px 55px rgba(38, 53, 101, 0.18);
    grid-template-columns: minmax(0, 1fr) 280px;
}

.elite-hero::before,
.elite-hero::after {
    position: absolute;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 50%;
    content: "";
}

.elite-hero::before { width: 280px; height: 280px; right: -80px; top: -95px; }
.elite-hero::after { width: 190px; height: 190px; left: 42%; bottom: -135px; }

.elite-hero-copy {
    position: relative;
    z-index: 2;
}

.elite-hero h1 {
    margin: 16px 0 12px;
    font-size: clamp(42px, 5vw, 66px);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.elite-hero h1 span { color: #bdefff; }

.elite-hero-copy > p {
    max-width: 560px;
    margin: 0;
    color: rgba(255,255,255,0.72);
    font-size: 13px;
    line-height: 1.8;
}

.elite-sync-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 24px;
}

.elite-hero .status-pill {
    color: #d8f8ff;
    background: rgba(255,255,255,0.1);
}

.elite-hero .muted { color: rgba(255,255,255,0.54); }

.elite-gem {
    position: relative;
    z-index: 2;
    display: grid;
    width: 220px;
    height: 220px;
    place-items: center;
    justify-self: center;
    border: 1px solid rgba(255,255,255,0.24);
    border-radius: 50% 50% 48% 52% / 52% 44% 56% 48%;
    background: rgba(255,255,255,0.1);
    box-shadow: inset 0 0 40px rgba(173, 239, 255, 0.12), 0 22px 55px rgba(13, 22, 55, 0.24);
    backdrop-filter: blur(10px);
    animation: mascot-float 5s ease-in-out infinite;
}

.elite-gem > span { font-size: 88px; filter: drop-shadow(0 12px 18px rgba(9, 19, 50, 0.28)); }
.elite-gem i { position: absolute; color: #c8f6ff; font-style: normal; animation: sparkle 3s ease-in-out infinite; }
.elite-gem i:nth-of-type(1) { top: 18px; right: 27px; }
.elite-gem i:nth-of-type(2) { bottom: 24px; left: 21px; animation-delay: -1s; }
.elite-gem i:nth-of-type(3) { top: 54px; left: -8px; animation-delay: -2s; }

.elite-rule-section,
.elite-rosters {
    margin-top: 24px;
}

.elite-section-heading,
.elite-roster-panel > header,
.elite-roster-panel > header > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.elite-section-heading h2,
.elite-roster-panel h2 {
    margin: 5px 0 0;
    color: var(--ink);
    font-size: 27px;
}

.elite-rule-note {
    padding: 8px 12px;
    border-radius: 999px;
    color: #6073ad;
    background: #edf2ff;
    font-size: 10px;
    font-weight: 850;
}

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

.elite-rule-card {
    position: relative;
    min-height: 165px;
    padding: 22px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255,255,255,0.86);
    box-shadow: var(--shadow-soft);
}

.elite-rule-card::after {
    position: absolute;
    right: -18px;
    bottom: -27px;
    color: rgba(83, 105, 176, 0.06);
    font-size: 78px;
    content: "✦";
}

.elite-rule-card.monthly { background: linear-gradient(145deg, #fff, #faf7ff); }
.elite-rule-icon { display: block; font-size: 23px; }
.elite-rule-card small { display: block; margin-top: 13px; color: var(--blue); font-size: 9px; font-weight: 900; letter-spacing: 0.12em; }
.elite-rule-card strong { display: block; margin-top: 6px; color: var(--ink); font-size: 15px; }
.elite-rule-card p { margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }

.elite-rosters {
    display: grid;
    align-items: start;
    gap: 18px;
    margin-bottom: 48px;
    grid-template-columns: 1fr 1fr;
}

.elite-roster-panel {
    padding: 25px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(255,255,255,0.88);
    box-shadow: var(--shadow-soft);
}

.formal-panel { border-top: 4px solid #7562ad; }
.rotating-panel { border-top: 4px solid #70cfe0; }

.elite-roster-panel > header { gap: 12px; }
.elite-roster-panel > header > div { justify-content: flex-start; gap: 12px; }
.elite-roster-panel > header > strong { color: var(--blue); font-size: 20px; }
.elite-roster-mark { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 15px; color: white; background: linear-gradient(145deg, #6656a1, #8a73c4); box-shadow: 0 8px 18px rgba(93, 73, 157, 0.22); }
.rotating-panel .elite-roster-mark { background: linear-gradient(145deg, #5cabc5, #78d5df); }
.elite-roster-panel h2 { font-size: 22px; }
.elite-roster-description { min-height: 42px; margin: 14px 0 16px; color: var(--muted); font-size: 10px; line-height: 1.65; }

.elite-member-grid { display: grid; gap: 10px; }

.elite-member-card {
    padding: 15px;
    border: 1px solid #e8ebf4;
    border-radius: 19px;
    background: #fbfcff;
    transition: transform 150ms ease, border-color 150ms ease;
}

.elite-member-card:hover { border-color: #cbd3e9; transform: translateY(-2px); }
.elite-member-card.suspended { border-style: dashed; background: #f7f8fb; filter: saturate(0.7); }
.elite-member-top { display: grid; align-items: center; gap: 10px; grid-template-columns: 48px minmax(0, 1fr) auto; }
.elite-avatar-wrap { position: relative; display: grid; width: 48px; height: 48px; place-items: center; overflow: hidden; border: 2px solid white; border-radius: 16px 16px 16px 6px; color: white; background: linear-gradient(145deg, var(--blue), #7b66ad); box-shadow: 0 6px 14px rgba(47, 61, 108, 0.15); }
.elite-avatar-wrap img { width: 100%; height: 100%; object-fit: cover; }
.elite-avatar-fallback { font-size: 17px; font-weight: 900; }
.elite-member-identity { min-width: 0; }
.elite-member-identity strong,
.elite-member-identity small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.elite-member-identity strong { color: var(--ink); font-size: 13px; }
.elite-member-identity small { margin-top: 4px; color: #a0a7b8; font-size: 8px; }
.elite-status-badge { padding: 6px 8px; border-radius: 999px; color: #67529b; background: #eee9fb; font-size: 8px; font-weight: 900; }
.rotating .elite-status-badge { color: #337e92; background: #e2f7fa; }
.suspended .elite-status-badge { color: #8a7280; background: #f1e9ed; }
.elite-member-stats { display: grid; gap: 7px; margin-top: 12px; padding-top: 11px; border-top: 1px solid #edf0f6; grid-template-columns: repeat(3, 1fr); }
.elite-member-stats span { min-width: 0; }
.elite-member-stats small,
.elite-member-stats strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.elite-member-stats small { color: #a2a9b9; font-size: 7px; }
.elite-member-stats strong { margin-top: 3px; color: #59627a; font-size: 11px; }
.elite-member-footer { margin-top: 11px; color: #8a92a5; font-size: 8px; }
.elite-member-footer > span { display: flex; justify-content: space-between; }
.elite-member-footer b { color: var(--blue); }
.elite-member-footer > i { display: block; height: 5px; margin-top: 6px; overflow: hidden; border-radius: 999px; background: #e9edf6; }
.elite-member-footer em { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), #79d7e2); }
.elite-empty { display: flex; min-height: 130px; align-items: center; justify-content: center; flex-direction: column; gap: 9px; border: 1px dashed #dce1ed; border-radius: 18px; color: #9aa2b5; background: #fafbfe; }
.elite-empty span { font-size: 24px; }
.elite-empty strong { font-size: 10px; }

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

@media (max-width: 680px) {
    .elite-hero {
        min-height: 230px;
        margin-top: 10px;
        padding: 28px 18px;
        border-radius: 25px;
        grid-template-columns: minmax(0, 1fr) 92px;
    }

    .elite-hero h1 { margin: 11px 0 8px; font-size: 31px; }
    .elite-hero-copy > p { max-width: 235px; font-size: 9px; line-height: 1.6; }
    .elite-sync-row { align-items: flex-start; flex-direction: column; gap: 7px; margin-top: 15px; }
    .elite-gem { width: 86px; height: 86px; }
    .elite-gem > span { font-size: 39px; }
    .elite-gem i { font-size: 8px; }
    .elite-section-heading h2 { font-size: 20px; }
    .elite-rule-note { padding: 6px 8px; font-size: 8px; }
    .elite-rule-grid { gap: 8px; margin-top: 10px; grid-template-columns: 1fr 1fr; }
    .elite-rule-card { min-height: 142px; padding: 15px; border-radius: 17px; }
    .elite-rule-icon { font-size: 19px; }
    .elite-rule-card small { margin-top: 9px; font-size: 7px; }
    .elite-rule-card strong { font-size: 11px; line-height: 1.4; }
    .elite-rule-card p { font-size: 8px; }
    .elite-rosters { gap: 10px; margin-top: 12px; margin-bottom: 28px; }
    .elite-roster-panel { padding: 17px; border-radius: 22px; }
    .elite-roster-mark { width: 37px; height: 37px; border-radius: 13px; }
    .elite-roster-panel h2 { font-size: 18px; }
    .elite-roster-panel > header > strong { font-size: 15px; }
    .elite-roster-description { min-height: 0; margin: 10px 0 12px; font-size: 8px; }
    .elite-member-card { padding: 13px; border-radius: 17px; }
    .elite-member-top { grid-template-columns: 43px minmax(0, 1fr) auto; }
    .elite-avatar-wrap { width: 43px; height: 43px; border-radius: 14px 14px 14px 5px; }
    .elite-member-stats strong { font-size: 10px; }
}

@media (max-width: 680px) {
    .header-actions {
        position: static;
    }

    .main-nav {
        grid-template-columns: repeat(5, 1fr);
    }

    .main-nav a {
        gap: 4px;
        font-size: 10px;
    }

    .main-nav a span {
        font-size: 13px;
    }

    .captain-entry {
        position: absolute;
        z-index: 4;
        top: 11px;
        right: 10px;
        min-height: 36px;
        padding: 0;
        width: 36px;
        justify-content: center;
        border-radius: 12px;
        font-size: 14px;
    }

    .captain-entry em {
        display: none;
    }

    .podium {
        display: grid;
        align-items: stretch;
        gap: 7px;
        margin: 18px 0 10px;
        padding: 0;
        overflow: visible;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .podium-card,
    .podium-card.first {
        min-width: 0;
        min-height: 126px;
        align-items: center;
        flex: initial;
        flex-direction: column;
        gap: 6px;
        padding: 13px 7px 10px;
        text-align: center;
    }

    .podium-card .avatar-wrap {
        width: 43px;
        height: 43px;
        border-radius: 15px 15px 15px 5px;
    }

    .podium-rank {
        top: 6px;
        right: 7px;
        font-size: 18px;
    }

    .podium-info {
        width: 100%;
    }

    .podium-info strong {
        max-width: 100%;
        font-size: 9px;
    }

    .podium-info span {
        margin-top: 3px;
        font-size: 14px;
    }

    .podium-info small {
        font-size: 6px;
    }

    .mobile-player-card.role-captain {
        border-color: #efd68b;
        background: linear-gradient(135deg, #fffdf5, #fff7d9);
        box-shadow: 0 8px 22px rgba(178, 132, 24, 0.11);
    }

    .mobile-player-card.role-vice {
        border-color: #bfcdef;
        background: linear-gradient(135deg, #ffffff, #edf4ff);
    }

    .mobile-player-card.role-elite {
        border-color: #d8c4ef;
        background: linear-gradient(135deg, #ffffff, #f7efff);
    }

    .mobile-player-card.role-captain::after,
    .mobile-player-card.role-vice::after,
    .mobile-player-card.role-elite::after {
        position: absolute;
        z-index: 0;
        right: -7px;
        bottom: -18px;
        font-size: 66px;
        font-weight: 900;
        opacity: 0.08;
        transform: rotate(-10deg);
    }

    .mobile-player-card.role-captain::after { color: #b6810d; content: "♛"; }
    .mobile-player-card.role-vice::after { color: var(--blue); content: "✦"; }
    .mobile-player-card.role-elite::after { color: #8656ad; content: "◆"; }

    .mobile-player-top,
    .mobile-player-stats {
        position: relative;
        z-index: 1;
    }

    .tech-support {
        justify-content: center;
    }

    .tech-support img {
        width: 24px;
        height: 24px;
    }

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

    .snowflake-form {
        margin-top: 20px;
    }

    .profile-hero {
        min-height: 158px;
        margin-top: 10px;
        padding: 24px 20px;
        border-radius: 23px;
    }

    .profile-hero h1 {
        margin: 7px 0;
        max-width: 230px;
        font-size: 29px;
    }

    .profile-hero p {
        max-width: 225px;
        font-size: 9px;
        line-height: 1.6;
    }

    .profile-hero-paw {
        position: absolute;
        right: 14px;
        bottom: 16px;
        width: 72px;
        height: 72px;
        border-width: 4px;
        font-size: 28px;
    }

    .profile-shell {
        min-height: 0;
        padding: 16px 0 42px;
    }

    .member-login-panel {
        min-height: 0;
        gap: 18px;
        padding: 25px 20px;
        border-radius: 21px;
        grid-template-columns: 1fr;
    }

    .member-login-copy h2 {
        font-size: 25px;
    }

    .member-login-copy > p {
        font-size: 10px;
    }

    .scan-steps {
        margin: 18px 0;
    }

    .member-qr-card,
    .member-qr-placeholder {
        min-height: 250px;
        padding: 18px;
    }

    .member-qr-frame {
        width: min(210px, 100%);
        height: auto;
        aspect-ratio: 1;
    }

    .profile-identity-card {
        gap: 11px;
        padding: 17px;
        border-radius: 21px;
        grid-template-columns: 58px minmax(0, 1fr) auto;
    }

    .profile-avatar-wrap {
        width: 58px;
        height: 58px;
        border-width: 3px;
        border-radius: 20px 20px 20px 7px;
        font-size: 20px;
    }

    .profile-identity-copy h2 {
        margin-top: 5px;
        font-size: 17px;
    }

    .snowflake-balance {
        gap: 5px;
        padding: 9px 10px;
        border-radius: 14px;
    }

    .snowflake-balance > span {
        font-size: 18px;
    }

    .snowflake-balance strong {
        font-size: 15px;
    }

    .profile-identity-card > .button {
        min-height: 34px;
        grid-column: 1 / -1;
    }

    .profile-stat-grid {
        gap: 8px;
        margin-top: 9px;
        grid-template-columns: 1fr 1fr;
    }

    .profile-stat {
        min-height: 108px;
        padding: 16px;
        border-radius: 17px;
    }

    .profile-stat strong {
        margin-top: 9px;
        font-size: 20px;
    }

    .profile-note-card {
        align-items: flex-start;
        flex-wrap: wrap;
        margin-top: 9px;
        padding: 15px;
    }

    .profile-note-card .button {
        width: 100%;
    }

    .shop-shell {
        display: flex;
        min-height: 620px;
        align-items: stretch;
        flex-direction: column;
        gap: 30px;
        margin-top: 10px;
        margin-bottom: 35px;
        padding: 42px 24px 32px;
        border-radius: 25px;
    }

    .shop-copy h1 {
        margin-top: 10px;
        font-size: 43px;
    }

    .shop-copy > p {
        font-size: 11px;
    }

    .construction-pill {
        margin: 18px 0;
    }

    .shop-construction {
        padding: 30px 20px;
        border-radius: 23px;
    }

    .shop-box {
        width: 120px;
        height: 120px;
        font-size: 38px;
    }
}

.chart-tool-hero {
    position: relative;
    display: flex;
    min-height: 250px;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    margin-top: 26px;
    padding: 46px 58px;
    overflow: hidden;
    border-radius: 34px;
    color: white;
    background:
        radial-gradient(circle at 84% 20%, rgba(114, 215, 233, 0.38), transparent 15rem),
        linear-gradient(135deg, #1a2648, #5369b0 72%, #6d86cf);
    box-shadow: 0 22px 58px rgba(37, 48, 86, 0.22);
}

.chart-tool-hero::before {
    position: absolute;
    right: 18%;
    bottom: -45px;
    width: 190px;
    height: 190px;
    border: 2px dashed rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    content: "";
    animation: chart-orbit 18s linear infinite;
}

.chart-tool-hero > div:first-child { position: relative; z-index: 1; }
.chart-tool-hero h1 { margin: 9px 0 12px; font-size: clamp(35px, 5vw, 60px); line-height: 1; }
.chart-tool-hero p { max-width: 590px; margin: 0; color: rgba(255, 255, 255, 0.79); font-size: 13px; line-height: 1.8; }

.chart-tool-mascot {
    position: relative;
    z-index: 1;
    display: grid;
    width: 130px;
    height: 130px;
    flex: 0 0 auto;
    place-items: center;
    border: 2px solid rgba(255, 255, 255, 0.28);
    border-radius: 42% 42% 42% 16%;
    background: rgba(255, 255, 255, 0.13);
    box-shadow: inset 0 0 30px rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    transform: rotate(5deg);
}

.chart-tool-mascot b { font-size: 49px; transform: rotate(-5deg); }
.chart-tool-mascot span { position: absolute; top: 12px; right: 17px; color: var(--ice); font-size: 27px; animation: chart-note 2.3s ease-in-out infinite; }
.chart-tool-shell { padding: 22px 0 50px; }

.chart-upload-card,
.chart-output-card,
.chart-time-card {
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-soft);
}

.chart-upload-card {
    display: grid;
    align-items: stretch;
    gap: 14px;
    padding: 22px;
    grid-template-columns: minmax(280px, 1fr) minmax(210px, 0.55fr) 190px;
}

.chart-file-drop {
    position: relative;
    display: grid;
    min-height: 112px;
    align-content: center;
    padding: 17px 20px 17px 76px;
    overflow: hidden;
    border: 2px dashed #bdc9e8;
    border-radius: 20px;
    background: linear-gradient(135deg, #f8faff, #eef5ff);
    cursor: pointer;
    transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.chart-file-drop:hover { border-color: var(--blue); background: #f4f7ff; transform: translateY(-1px); }
.chart-file-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.chart-file-drop strong { overflow: hidden; color: var(--night); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.chart-file-drop small { margin-top: 5px; color: var(--muted); font-size: 10px; }
.chart-file-icon { position: absolute; left: 20px; display: grid; width: 42px; height: 48px; place-items: center; border-radius: 13px 13px 13px 5px; background: white; box-shadow: 0 7px 18px rgba(50, 62, 105, 0.1); font-size: 22px; }

.chart-merge-option {
    display: flex;
    min-height: 112px;
    align-items: center;
    gap: 12px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #fff;
    cursor: pointer;
}

.chart-merge-option input { width: 20px; height: 20px; flex: 0 0 auto; accent-color: var(--blue); }
.chart-merge-option span, .chart-merge-option b, .chart-merge-option small { display: block; }
.chart-merge-option b { color: var(--night); font-size: 13px; }
.chart-merge-option small { margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.chart-upload-card > .button { align-self: stretch; min-height: 112px; border-radius: 20px; }

.chart-result { margin-top: 14px; scroll-margin-top: 92px; }
.chart-summary-grid { display: grid; gap: 10px; grid-template-columns: repeat(4, 1fr); }
.chart-summary-grid article { padding: 18px 20px; border: 1px solid var(--line); border-radius: 20px; background: white; box-shadow: 0 7px 18px rgba(50, 62, 105, 0.06); }
.chart-summary-grid small, .chart-summary-grid strong { display: block; }
.chart-summary-grid small { color: var(--muted); font-size: 9px; font-weight: 800; }
.chart-summary-grid strong { margin-top: 7px; color: var(--blue); font-size: 19px; }

.chart-output-card { margin-top: 12px; padding: 25px; }
.chart-output-card > header { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.chart-output-card h2 { margin: 5px 0 0; color: var(--night); font-size: 24px; }
.chart-ready-pill { padding: 7px 11px; border: 1px solid #bcebe2; border-radius: 999px; color: #278a74; background: #effcf8; font-size: 9px; font-weight: 900; }
.chart-output-grid { display: grid; gap: 12px; margin-top: 19px; grid-template-columns: 1fr 1fr; }
.chart-output-grid label { display: flex; min-width: 0; flex-direction: column; }
.chart-output-grid label > span { margin-bottom: 7px; color: var(--night); font-size: 11px; font-weight: 900; }
.chart-output-grid textarea { width: 100%; min-height: 250px; resize: vertical; padding: 15px; border: 1px solid var(--line); border-radius: 16px 16px 0 0; outline: none; color: #39435f; background: #f7f9fd; font: 11px/1.65 ui-monospace, SFMono-Regular, Consolas, monospace; }
.chart-output-grid textarea:focus { border-color: #aebde4; box-shadow: 0 0 0 3px rgba(83, 105, 176, 0.09); }
.chart-copy-button { min-height: 36px; border: 0; border-radius: 0 0 13px 13px; color: var(--blue); background: #eaf0ff; font-size: 9px; font-weight: 900; cursor: pointer; }
.chart-copy-button:active { background: #dce6ff; }
#chart-download-form { margin-top: 17px; }
.chart-download-note { margin: 10px 0 0; color: var(--muted); font-size: 9px; line-height: 1.6; text-align: center; }

.chart-time-card { margin-top: 12px; padding: 0 22px; overflow: hidden; }
.chart-time-card summary { padding: 18px 0; color: var(--night); font-size: 12px; font-weight: 900; cursor: pointer; }
.chart-time-card summary span { margin-left: 7px; color: var(--muted); font-size: 8px; font-weight: 700; }
.chart-time-table-wrap { padding: 0 0 20px; overflow-x: auto; }
.chart-time-card table { width: 100%; border-collapse: collapse; font-size: 10px; }
.chart-time-card th, .chart-time-card td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.chart-time-card th { color: var(--blue); background: #f2f5fc; }

@keyframes chart-note {
    0%, 100% { opacity: 0.6; transform: translateY(3px) rotate(-7deg); }
    50% { opacity: 1; transform: translateY(-6px) rotate(7deg); }
}

@keyframes chart-orbit { to { transform: rotate(360deg); } }

@media (max-width: 920px) {
    .chart-upload-card { grid-template-columns: minmax(0, 1fr) minmax(190px, 0.55fr); }
    .chart-upload-card > .button { min-height: 48px; grid-column: 1 / -1; }
}

@media (max-width: 680px) {
    .main-nav a { gap: 2px; padding-inline: 3px; font-size: 8px; }
    .main-nav a span { font-size: 11px; }
    .chart-tool-hero { min-height: 182px; margin-top: 10px; padding: 28px 21px; border-radius: 24px; }
    .chart-tool-hero h1 { margin: 7px 0 10px; font-size: 34px; }
    .chart-tool-hero p { max-width: 210px; font-size: 9px; line-height: 1.6; }
    .chart-tool-mascot { width: 72px; height: 72px; border-radius: 27px 27px 27px 10px; }
    .chart-tool-mascot b { font-size: 29px; }
    .chart-tool-mascot span { top: 5px; right: 7px; font-size: 17px; }
    .chart-tool-shell { padding-top: 12px; }
    .chart-upload-card { gap: 9px; padding: 13px; border-radius: 21px; grid-template-columns: 1fr; }
    .chart-file-drop { min-height: 92px; padding: 14px 14px 14px 65px; border-radius: 17px; }
    .chart-file-icon { left: 14px; width: 39px; height: 44px; font-size: 19px; }
    .chart-file-drop strong { font-size: 11px; }
    .chart-file-drop small { font-size: 8px; }
    .chart-merge-option { min-height: 65px; padding: 12px 14px; border-radius: 16px; }
    .chart-merge-option b { font-size: 10px; }
    .chart-merge-option small { font-size: 7px; }
    .chart-upload-card > .button { min-height: 46px; border-radius: 15px; grid-column: auto; }
    .chart-result { scroll-margin-top: 130px; }
    .chart-summary-grid { gap: 7px; grid-template-columns: 1fr 1fr; }
    .chart-summary-grid article { padding: 13px; border-radius: 16px; }
    .chart-summary-grid small { font-size: 7px; }
    .chart-summary-grid strong { margin-top: 5px; font-size: 14px; }
    .chart-output-card { padding: 16px; border-radius: 21px; }
    .chart-output-card h2 { font-size: 19px; }
    .chart-ready-pill { padding: 6px 8px; font-size: 7px; }
    .chart-output-grid { gap: 14px; margin-top: 15px; grid-template-columns: 1fr; }
    .chart-output-grid textarea { min-height: 190px; font-size: 9px; }
    .chart-time-card { padding: 0 16px; border-radius: 19px; }
    .chart-download-note { font-size: 7px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
