:root {
    --bg: #07151d;
    --panel: #0c202a;
    --panel2: #102a35;
    --cyan: #42e8f5;
    --blue: #1688d8;
    --gold: #ffd45a;
    --green: #43d17a;
    --red: #ff5c70;
    --muted: #78909c;
    --nav-h: 78px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    min-height: 100%;
    background: var(--bg);
    color: #fff;
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}

.player-body {
    min-height: 100vh;
    padding-bottom: calc(var(--nav-h) + 16px);
    background-color: var(--bg);
    background-image:
        linear-gradient(rgba(66, 232, 245, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(66, 232, 245, 0.04) 1px, transparent 1px);
    background-size: 32px 32px;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

.player-hud {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px 8px;
}

.hud-player {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hud-avatar-link {
    display: block;
    flex-shrink: 0;
}

.hud-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--cyan);
    object-fit: cover;
    background: var(--panel2);
    display: block;
}

.hud-stats {
    min-width: 0;
    flex: 1;
}

.hud-bar-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 5px;
    margin-top: 3px;
}

.hud-energy-row {
    flex-wrap: nowrap;
}

.hud-hearts {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.hud-bar-row span {
    font-size: 8px;
    font-weight: 700;
    width: 34px;
    flex-shrink: 0;
}

.hud-bar-row img {
    width: 12px;
    height: 12px;
}

.hud-hearts img {
    display: block;
    width: 16px;
    height: 16px;
    max-width: none;
    flex: 0 0 16px;
}

.hud-hearts img.is-off {
    opacity: 0.28;
    filter: grayscale(1);
}

.hud-bar {
    width: 105px;
    height: 8px;
    border-radius: 10px;
    background: #17323d;
    border: 1px solid #27505c;
    overflow: hidden;
}

.hud-bar i {
    display: block;
    height: 100%;
    border-radius: inherit;
}

.hud-bar-xp { background: var(--cyan); }
.hud-bar-energy { background: var(--gold); }

.hud-gems {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 14px;
    background: rgba(12, 32, 42, 0.9);
    border: 1px solid rgba(66, 232, 245, 0.3);
    font-size: 12px;
    font-weight: 800;
}

.hud-gems img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.player-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    height: var(--nav-h);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: end;
    background: rgba(7, 21, 29, 0.96);
    border-top: 1px solid rgba(66, 232, 245, 0.22);
}

.player-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    opacity: 0.72;
}

.player-nav a img {
    width: 78px;
    height: 58px;
    object-fit: contain;
}

.player-nav a.is-active {
    opacity: 1;
    background: rgba(255, 212, 90, 0.12);
}

.brand-logo {
    display: block;
    margin: 0 auto;
    object-fit: contain;
    background: #fff;
    border-radius: 24px;
    padding: 8px;
}
.brand-logo-splash {
    width: min(280px, 82vw);
    height: auto;
}
.brand-logo-auth {
    width: min(220px, 70vw);
    height: auto;
    margin-bottom: 8px;
}
.brand-logo-welcome {
    width: min(200px, 64vw);
    height: auto;
    margin: 8px auto 12px;
}

.page {
    width: min(430px, 92%);
    margin: 0 auto;
}

.greet {
    text-align: center;
    padding: 18px 0 10px;
}

.greet h1 {
    margin: 0 0 14px;
    font-size: 22px;
    font-weight: 400;
    letter-spacing: 0.08em;
}

.greet p {
    margin: 0 auto;
    max-width: 320px;
    color: #e8eef2;
    font-size: 13px;
    line-height: 1.45;
    text-align: justify;
}

.stack-btns {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    margin-top: 28px;
}

.game-btn {
    width: min(100%, 300px);
    min-height: 54px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 900;
    background: #233c49;
    border: 3px solid var(--blue);
    box-shadow: 0 0 8px rgba(49, 92, 255, 0.3);
}

.game-btn.gold {
    border-color: var(--gold);
    box-shadow: 0 0 8px rgba(255, 212, 90, 0.25);
    color: var(--gold);
}

.section-title {
    text-align: center;
    margin: 8px 0 6px;
}

.section-title h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 800;
    font-style: italic;
}

.section-title p {
    margin: 8px auto 0;
    max-width: 280px;
    color: var(--muted);
    font-size: 12px;
}

.tile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 16px;
}

.learn-tile {
    position: relative;
    aspect-ratio: 1;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(66, 232, 245, 0.2);
}

.learn-tile img.tile-art {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.learn-tile .tile-meta {
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 8px;
    font-size: 10px;
    font-weight: 700;
    color: #d9f7ff;
    text-shadow: 0 1px 4px #000;
}

.learn-tile.is-locked {
    filter: grayscale(0.7) brightness(0.55);
    pointer-events: none;
}

.learn-tile .lock-badge {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.25);
}

.learn-tile .lock-badge img {
    width: 42px;
    height: 42px;
}

.sign-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

.group-title {
    margin: 18px 0 2px;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gold);
}

.sign-row {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 58px;
    padding: 8px 12px;
    border-radius: 14px;
    background: linear-gradient(90deg, rgba(16, 42, 53, 0.95), rgba(12, 32, 42, 0.8));
    border: 1px solid rgba(66, 232, 245, 0.22);
}

.sign-row .sign-main {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.def-btn {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--gold);
    background: rgba(255, 212, 90, 0.16);
    color: var(--gold);
    font-weight: 900;
    font-size: 16px;
    line-height: 1;
}

.lesson-title .def-btn {
    margin-left: 8px;
    vertical-align: middle;
}

.sign-row img.sign-ico {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.sign-row .sign-name {
    flex: 1;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.sign-row .status {
    font-size: 11px;
    font-weight: 800;
}

.sign-row .status.mastered { color: var(--green); }
.sign-row .status.learn { color: var(--cyan); }
.sign-row.is-done {
    border-color: rgba(67, 209, 122, 0.55);
    background: rgba(67, 209, 122, 0.12);
}
.play-timer {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    min-width: 56px;
    min-height: 56px;
    padding: 8px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.72);
    border: 3px solid var(--gold);
    color: var(--gold);
    font-weight: 900;
    font-size: 22px;
    line-height: 40px;
    text-align: center;
}
.play-timer.is-low { color: var(--red); border-color: var(--red); }
.timer-hint {
    text-align: center;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    margin: -8px 12px 16px;
}
.ref-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding: 8px;
    border-radius: 12px;
    border: 1px solid rgba(66, 232, 245, 0.25);
    background: rgba(12, 32, 42, 0.9);
}
.ref-preview video {
    width: 120px;
    height: 84px;
    object-fit: contain;
    border-radius: 8px;
    background: #111;
}
.ref-preview span {
    font-size: 12px;
    font-weight: 800;
    color: var(--gold);
}
.journey-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}
.journey-node {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 14px;
    border: 1px solid rgba(66, 232, 245, 0.22);
    background: rgba(12, 32, 42, 0.9);
}
.journey-node .node-art {
    position: relative;
    width: 72px;
    height: 72px;
    flex-shrink: 0;
}
.journey-node img.node-img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 12px;
    flex-shrink: 0;
}
.journey-node .node-lock {
    position: absolute;
    right: -4px;
    bottom: -4px;
    width: 20px;
    height: 20px;
}
.journey-node strong { display: block; font-size: 14px; }
.journey-node span { display: block; font-size: 12px; color: var(--muted); }
.journey-node.is-locked { filter: grayscale(0.45) brightness(0.75); pointer-events: none; }

.cat-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0 4px;
}

.cat-head img {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.progress-note {
    color: var(--muted);
    font-size: 12px;
    margin: 0 0 6px 52px;
}

.lesson-frame {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    border: 2px solid rgba(66, 232, 245, 0.45);
    background: #1b1b1b;
}

.lesson-frame video,
.lesson-frame img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: contain;
    background: #111;
}

.lesson-frame .hand-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    background: transparent;
    z-index: 1;
}

.lesson-controls {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 8px 10px 10px;
    background: linear-gradient(transparent, rgba(7, 21, 29, 0.82));
    pointer-events: none;
}

.lesson-controls .lesson-title,
.lesson-controls .ctrl-row,
.lesson-controls .angle-row {
    pointer-events: auto;
}

.lesson-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 900;
    margin-bottom: 8px;
}

.lesson-title img { width: 28px; height: 28px; object-fit: contain; }

.ctrl-row {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 4px;
}

.overlay-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(7, 21, 29, 0.72);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 2px rgba(66, 232, 245, 0.45);
}

.overlay-icon svg {
    width: 18px;
    height: 18px;
    display: block;
}

.angle-row {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 6px;
    font-size: 12px;
    font-weight: 800;
}

.angle-row button {
    background: transparent;
    border: 0;
    color: var(--muted);
}

.angle-row button.is-on { color: #fff; }

@media (max-width: 640px) {
    .lesson-controls {
        padding: 6px 8px 8px;
    }
    .lesson-title {
        gap: 6px;
        margin-bottom: 4px;
        font-size: 13px;
    }
    .lesson-title img { width: 20px; height: 20px; }
    .ctrl-row {
        gap: 6px;
        margin-bottom: 2px;
    }
    .overlay-icon {
        width: 26px;
        height: 26px;
        box-shadow: 0 0 0 1px rgba(66, 232, 245, 0.45);
    }
    .overlay-icon svg {
        width: 13px;
        height: 13px;
    }
    .angle-row {
        gap: 6px;
        margin-top: 2px;
        font-size: 10px;
    }
}

.img-btn {
    display: block;
    margin: 16px auto 0;
    background: none;
    border: 0;
    padding: 0;
    width: min(100%, 240px);
}

.img-btn img {
    width: 100%;
    height: auto;
    display: block;
}

.img-btn:disabled {
    opacity: 0.5;
    pointer-events: none;
}

.img-btn-compact {
    width: min(100%, 200px);
}

.auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

.auth-card {
    width: min(100%, 380px);
}

.auth-card h1 {
    text-align: center;
    margin: 12px 0 4px;
}

.auth-card .sub {
    text-align: center;
    color: var(--muted);
    margin-bottom: 18px;
}

.field {
    margin-bottom: 12px;
}

.field input,
.field select {
    width: 100%;
    border-radius: 22px;
    border: 1px solid rgba(66, 232, 245, 0.28);
    background: rgba(8, 24, 32, 0.85);
    color: #fff;
    padding: 12px 16px;
    outline: none;
}

.tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 10px 0 16px;
    font-weight: 900;
}

.tabs a.is-on { color: var(--gold); }
.tabs a { color: #cfd8dc; }

.hearing {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0;
}

.hearing label {
    flex: 1;
    text-align: center;
    border: 1px solid rgba(66, 232, 245, 0.35);
    border-radius: 18px;
    padding: 10px 8px;
    font-weight: 800;
}

.hearing input { display: none; }
.hearing input:checked + span,
.hearing label:has(input:checked) {
    background: rgba(66, 232, 245, 0.12);
    color: var(--cyan);
}

.submit-pill {
    width: 100%;
    border: 0;
    border-radius: 22px;
    padding: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    background: #d9eef3;
    color: #16313c;
}

.alert {
    background: rgba(255, 92, 112, 0.12);
    border: 1px solid rgba(255, 92, 112, 0.35);
    color: #ff8a97;
    padding: 10px 12px;
    border-radius: 12px;
    margin-bottom: 12px;
    font-size: 13px;
}

.pw-wrap { position: relative; }
.pw-wrap button {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: 0;
    padding: 0;
}
.pw-wrap button img { width: 22px; height: 22px; }

.map-wrap {
    position: relative;
    min-height: 560px;
    margin-top: 8px;
}

.map-title {
    text-align: center;
}

.map-title h1 {
    margin: 0;
    font-style: italic;
    font-size: 28px;
}

.map-title p {
    margin: 4px 0 12px;
    color: var(--muted);
    font-size: 12px;
}

.map-node {
    position: absolute;
    width: 118px;
    text-align: center;
}

.map-node img.node-img {
    width: 118px;
    height: 118px;
    object-fit: contain;
}

.map-node .label {
    font-size: 10px;
    font-weight: 800;
    margin-top: 2px;
}

.map-node.is-locked { filter: grayscale(0.4) brightness(0.7); }

.node-home { left: 8%; top: 20px; }
.node-work { left: 52%; top: 70px; }
.node-screen { right: 2%; top: 200px; }
.node-net { left: 4%; top: 210px; }
.node-dev { left: 38%; top: 310px; }
.node-trouble { left: 8%; top: 400px; }
.node-cyber { left: 48%; top: 430px; }

.desk-scene {
    margin: 12px auto;
    width: min(100%, 320px);
    aspect-ratio: 1;
    border-radius: 18px;
    border: 2px solid rgba(66, 232, 245, 0.35);
    background:
        radial-gradient(circle at 30% 10%, rgba(255,255,255,0.08), transparent 40%),
        linear-gradient(180deg, #2a1c12, #1a120c);
    position: relative;
    overflow: hidden;
}

.desk-top {
    position: absolute;
    left: 8%;
    right: 8%;
    top: 38%;
    height: 18%;
    background: #8b5a2b;
    border-radius: 6px;
}

.desk-item {
    position: absolute;
    width: 54px;
    opacity: 0.18;
    filter: grayscale(1);
}

.desk-item.is-on {
    opacity: 1;
    filter: none;
}

.desk-item img { width: 100%; }

.di-monitor { left: 38%; top: 18%; width: 90px; }
.di-chassis { right: 8%; top: 22%; width: 70px; }
.di-keyboard { left: 28%; top: 48%; width: 110px; }
.di-mouse { right: 22%; top: 52%; width: 48px; }
.di-printer { left: 8%; top: 20%; width: 70px; }
.di-speaker { right: 6%; top: 48%; width: 48px; }
.di-headphone { left: 10%; top: 58%; width: 58px; }
.di-usb { left: 46%; top: 62%; width: 42px; }

.start-btn {
    display: block;
    width: min(100%, 240px);
    margin: 18px auto;
    text-align: center;
    padding: 12px;
    border-radius: 14px;
    border: 2px solid var(--cyan);
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 0.12em;
}
.start-btn:disabled {
    opacity: 0.45;
}

.status-guide {
    padding: 10px 12px 0 !important;
    font-weight: 800;
    color: var(--cyan);
}

.shop-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid rgba(66, 232, 245, 0.22);
    background: rgba(12, 32, 42, 0.9);
}
.shop-card strong,
.shop-card span {
    display: block;
}
.shop-card .start-btn {
    width: auto;
    margin: 0;
    padding: 8px 16px;
    font-size: 16px;
}

.lead-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding: 4px 0 12px;
}
.lead-tabs a {
    flex-shrink: 0;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(66, 232, 245, 0.25);
    font-size: 12px;
    font-weight: 800;
}
.lead-tabs a.is-on {
    background: var(--cyan);
    color: #07151D;
}

.profile-hero {
    text-align: center;
    padding-top: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.profile-hero .avatar-stage {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 10px;
}
.profile-hero .avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid var(--cyan);
    object-fit: cover;
    display: block;
}
.avatar-stage .edit-badge,
.avatar-stage .hearing-badge {
    position: absolute;
    bottom: 2px;
    min-height: 32px;
    border-radius: 999px;
    background: var(--cyan);
    color: #07151D;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.1;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}
.avatar-stage .edit-badge {
    right: -2px;
    width: 32px;
    height: 32px;
    padding: 0;
}
.avatar-stage .hearing-badge {
    left: -8px;
    max-width: 78px;
    padding: 4px 8px;
}
.avatar-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin: 12px 0 16px;
}
.avatar-option {
    position: relative;
    display: block;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid transparent;
    cursor: pointer;
}
.avatar-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.avatar-option img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
    background: var(--panel2);
}
.avatar-option:has(input:checked) {
    border-color: var(--cyan);
    box-shadow: 0 0 0 2px rgba(66, 232, 245, 0.35);
}
.file-field {
    display: block;
    margin: 8px 0 16px;
    font-size: 13px;
    color: var(--muted);
}
.file-field input { margin-top: 8px; width: 100%; }
.hearing-chip {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    border: 1px solid var(--gold);
    color: var(--gold);
    border-radius: 16px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 800;
}
.level-chip {
    display: inline-block;
    margin-top: 8px;
    background: #152830;
    border-radius: 16px;
    padding: 6px 14px;
    font-weight: 800;
}
.stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 16px;
}
.stat-card {
    background: rgba(12, 32, 42, 0.9);
    border: 1px solid rgba(66, 232, 245, 0.2);
    border-radius: 14px;
    padding: 12px;
}
.stat-card.wide { grid-column: 1 / -1; }
.stat-card h3 {
    margin: 0 0 8px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.stat-card h3 img { width: 18px; height: 18px; }
.stat-card strong { font-size: 18px; }
.badge-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.badge-row span {
    font-size: 11px;
    border: 1px solid rgba(255, 212, 90, 0.35);
    border-radius: 999px;
    padding: 4px 8px;
    color: var(--gold);
}
.badge-gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.badge-tile {
    margin: 0;
    text-align: center;
}
.badge-tile img {
    width: 72px;
    height: 72px;
    object-fit: contain;
    display: block;
    margin: 0 auto 6px;
}
.badge-tile.is-locked img {
    filter: grayscale(1) brightness(0.55);
    opacity: 0.55;
}
.badge-tile figcaption strong,
.badge-tile figcaption span {
    display: block;
}
.badge-tile figcaption strong {
    font-size: 11px;
    color: var(--gold);
}
.badge-tile.is-locked figcaption strong { color: #9bb3bc; }
.badge-tile figcaption span {
    font-size: 10px;
    font-weight: 600;
    color: #c5d5dc;
    line-height: 1.25;
    margin-top: 2px;
}
.earned-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 10px 0 4px;
}
.earned-badges[hidden] { display: none; }
.earned-badges figure {
    margin: 0;
    width: 88px;
}
.earned-badges img {
    width: 64px;
    height: 64px;
    object-fit: contain;
}
.earned-badges figcaption {
    font-size: 11px;
    font-weight: 800;
    margin-top: 4px;
}
.profile-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}
.profile-actions a {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.12);
    font-weight: 800;
    font-size: 13px;
}
.profile-actions img { width: 16px; height: 16px; }
.profile-actions .danger { color: var(--red); border-color: rgba(255, 92, 112, 0.4); }
.lead-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 16px 0 8px;
    padding: 12px;
    border-radius: 14px;
    border: 2px solid var(--gold);
    font-weight: 900;
}
.lead-btn img { width: 20px; height: 20px; }

.popup {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 60;
    padding: 20px;
}
.popup.is-open { display: flex; }
.popup-card {
    width: min(100%, 320px);
    background: #8f8f8f;
    border-radius: 16px;
    padding: 18px;
    text-align: center;
    color: #16313c;
}
.popup-card h2 {
    margin: 8px 0;
    font-style: italic;
    color: #1ec9c4;
}
.popup-card.perfect h2 { color: #3aa0ff; }

.camera-box {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    border: 3px solid var(--gold);
    background: #111;
}
.camera-box video {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    background: #111;
    transform: scaleX(-1);
}
.camera-box canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    pointer-events: none;
    transform: scaleX(-1);
}

.leader-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--panel);
    border: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 8px;
}
.leader-row.is-me { border-color: var(--gold); }
.rank { width: 28px; font-weight: 900; color: var(--gold); }

.empty {
    text-align: center;
    color: var(--muted);
    padding: 28px 12px;
}

.splash {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
}

.spinner {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 3px solid #31464f;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }
