.lcs-wrapper {
position: fixed;
inset: 0;
z-index: 1000;

width: 100%;
height: 100vh;
height: 100dvh;

overflow: hidden;

background: #071526;
color: #f4f7fb;

font-family: "Inter", sans-serif;

}

.lcs-panel {
display: grid;
grid-template-rows: auto minmax(0, 1fr) auto;

width: 100%;
max-width: 640px;

height: 100%;
min-height: 0;

margin: 0 auto;

overflow: hidden;

background: linear-gradient(
    145deg,
    #0a2a43,
    #09103f
);

border: 1px solid rgba(255, 255, 255, 0.12);
box-sizing: border-box;

}

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

/* ========================================
FIXED TOP HEADER
======================================== */

.lcs-header {
position: relative;
z-index: 2;

min-width: 0;
padding: 16px 24px 14px;

overflow: hidden;

text-align: center;

background: linear-gradient(
    145deg,
    #0a2a43,
    #09103f
);

border-bottom: 1px solid rgba(255, 255, 255, 0.1);

}

.lcs-eyebrow {
color: #8db8dc;

font-size: 0.75rem;
font-weight: 700;
letter-spacing: 0.18em;

}

.lcs-title {
margin: 7px 0;

font-family: "Sora", sans-serif;
font-size: clamp(1.2rem, 4vw, 1.8rem);
font-weight: 700;
line-height: 1.25;

overflow-wrap: anywhere;

}

.lcs-rank {
margin-top: 8px;

color: #f5ca67;

font-family: "Sora", sans-serif;
font-size: 3.2rem;
font-weight: 800;
line-height: 1;

}

.lcs-rank-title {
margin-top: 5px;

font-size: 0.95rem;
font-weight: 700;

}

.lcs-performance {
margin-top: 7px;

color: #ffd76a;

font-size: 1.5rem;
letter-spacing: 0.12em;
line-height: 1.2;

}

.lcs-empty-stars {
color: #52657d;
}

.lcs-score {
display: flex;
align-items: baseline;
justify-content: center;
flex-wrap: wrap;

gap: 5px;

margin-top: 8px;

}

.lcs-score-value {
font-family: "Sora", sans-serif;
font-size: 2rem;
font-weight: 800;
}

.lcs-score-total {
color: #9db2c9;
font-size: 0.9rem;
}

.lcs-score-label {
flex-basis: 100%;

margin-top: 1px;

color: #9db2c9;

font-size: 0.65rem;
font-weight: 700;
letter-spacing: 0.14em;

}

/* ========================================
SCROLLABLE MIDDLE CONTENT
======================================== */

.lcs-content {
position: relative;

min-width: 0;
min-height: 0;

padding: 0 24px 24px;

overflow-x: hidden;
overflow-y: auto;

-webkit-overflow-scrolling: touch;
overscroll-behavior-y: contain;

scrollbar-width: thin;
scrollbar-color: #385574 #091832;

}

.lcs-content::-webkit-scrollbar {
width: 6px;
}

.lcs-content::-webkit-scrollbar-track {
background: #091832;
}

.lcs-content::-webkit-scrollbar-thumb {
background: #385574;
border-radius: 10px;
}

.lcs-content::-webkit-scrollbar-thumb:hover {
background: #527394;
}

/* ========================================
PERFORMANCE BREAKDOWN
======================================== */

.lcs-section {
margin-top: 22px;
}

.lcs-section-title {
margin: 0 0 14px;

font-family: "Sora", sans-serif;
font-size: 1rem;
font-weight: 700;
line-height: 1.4;

}

.lcs-score-row {
margin-bottom: 15px;
}

.lcs-score-row:last-child {
margin-bottom: 0;
}

.lcs-score-row-heading {
display: flex;
align-items: center;
justify-content: space-between;

gap: 12px;

margin-bottom: 8px;

font-size: 0.82rem;
line-height: 1.4;

}

.lcs-score-row-heading span:last-child {
flex-shrink: 0;

color: #d6e5f5;
font-weight: 700;
white-space: nowrap;

}

.lcs-progress-track {
width: 100%;
height: 7px;

overflow: hidden;

background: #14233f;
border-radius: 10px;

}

.lcs-progress-fill {
height: 100%;

background: #68c9b0;
border-radius: inherit;

transition: width 0.5s ease;

}

/* ========================================
RUN STATISTICS
======================================== */

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

gap: 10px;

}

.lcs-stat {
display: flex;
flex-direction: column;
gap: 6px;

min-width: 0;
padding: 12px;

background: rgba(255, 255, 255, 0.045);

border: 1px solid rgba(255, 255, 255, 0.08);
border-radius: 12px;

}

.lcs-stat-label {
color: #9db2c9;

font-size: 0.75rem;
line-height: 1.4;

}

.lcs-stat-value {
color: #f4f7fb;

overflow-wrap: anywhere;

font-size: 0.95rem;
font-weight: 700;
line-height: 1.4;

}

/* ========================================
REWARDS EARNED
======================================== */

.lcs-rewards {
margin-top: 22px;
padding: 18px;

text-align: center;

background: rgba(245, 202, 103, 0.07);

border: 1px solid rgba(245, 202, 103, 0.2);
border-radius: 14px;

}

.lcs-rewards .lcs-section-title {
margin-bottom: 12px;
}

.lcs-shards {
display: flex;
align-items: baseline;
justify-content: center;

gap: 8px;

}

.lcs-shards-value {
color: #f5ca67;

font-family: "Sora", sans-serif;
font-size: 2rem;
font-weight: 800;

}

.lcs-shards-label {
font-size: 0.9rem;
font-weight: 700;
}

.lcs-reward-detail {
margin: 8px 0 0;

color: #9db2c9;
font-size: 0.75rem;
line-height: 1.5;

}

/* ========================================
FIXED BOTTOM ACTIONS
======================================== */

.lcs-actions {
position: relative;
z-index: 2;

display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));

gap: 10px;

min-width: 0;
margin: 0;

padding: 12px 24px;

background: #091832;

border-top: 1px solid rgba(255, 255, 255, 0.1);

padding-bottom: max(
    12px,
    env(safe-area-inset-bottom)
);

}

.lcs-button {
display: flex;
align-items: center;
justify-content: center;

width: 100%;
min-width: 0;
min-height: 44px;

padding: 10px;

border: 0;
border-radius: 10px;

font-family: inherit;
font-size: 0.85rem;
font-weight: 700;
line-height: 1.3;
text-align: center;

cursor: pointer;

transition:
    transform 0.15s ease,
    filter 0.15s ease;

}

.lcs-button:hover {
filter: brightness(1.1);
transform: translateY(-1px);
}

.lcs-button:active {
transform: translateY(0);
}

.lcs-button:focus-visible {
outline: 2px solid #ffffff;
outline-offset: 3px;
}

.lcs-retry {
background: #f5ca67;
color: #17233b;
}

.lcs-continue {
background: #68c9b0;
color: #092c32;
}

.lcs-level-select {
background: #24476b;
color: #ffffff;
}

.lcs-main-menu {
background: #18263d;
color: #e6edf7;
}

/* ========================================
MESSAGES
======================================== */

.lcs-message {
margin: 22px 0;

color: #bdcde0;
line-height: 1.6;

}

/* ========================================
MOBILE SCREENS
======================================== */

@media (max-width: 480px) {
.lcs-header {
padding: 12px 14px 10px;
}

.lcs-eyebrow {
    font-size: 0.65rem;
}

.lcs-title {
    margin: 5px 0;

    font-size: 1.2rem;
}

.lcs-rank {
    margin-top: 6px;

    font-size: 2.6rem;
}

.lcs-rank-title {
    margin-top: 4px;

    font-size: 0.85rem;
}

.lcs-performance {
    margin-top: 5px;

    font-size: 1.3rem;
}

.lcs-score {
    margin-top: 5px;
}

.lcs-score-value {
    font-size: 1.7rem;
}

.lcs-score-total {
    font-size: 0.8rem;
}

.lcs-score-label {
    font-size: 0.6rem;
}

.lcs-content {
    padding: 0 14px 20px;
}

.lcs-section {
    margin-top: 18px;
}

.lcs-section-title {
    margin-bottom: 11px;

    font-size: 0.92rem;
}

.lcs-score-row {
    margin-bottom: 13px;
}

.lcs-score-row-heading {
    gap: 8px;

    font-size: 0.75rem;
}

.lcs-stats {
    gap: 8px;
}

.lcs-stat {
    gap: 5px;
    padding: 10px;
}

.lcs-stat-label {
    font-size: 0.68rem;
}

.lcs-stat-value {
    font-size: 0.85rem;
}

.lcs-rewards {
    margin-top: 18px;
    padding: 14px;
}

.lcs-shards-value {
    font-size: 1.7rem;
}

.lcs-shards-label {
    font-size: 0.8rem;
}

.lcs-actions {
    gap: 8px;

    padding: 10px 14px;

    padding-bottom: max(
        10px,
        env(safe-area-inset-bottom)
    );
}

.lcs-button {
    min-height: 42px;
    padding: 8px 5px;

    font-size: 0.76rem;
}

}

/* ========================================
VERY SHORT VIEWPORTS
======================================== */

@media (max-height: 550px) {
.lcs-header {
padding-top: 6px;
padding-bottom: 6px;
}

.lcs-eyebrow {
    font-size: 0.6rem;
}

.lcs-title {
    margin: 3px 0;

    font-size: 1.1rem;
}

.lcs-rank {
    margin-top: 3px;

    font-size: 2rem;
}

.lcs-rank-title {
    margin-top: 2px;

    font-size: 0.78rem;
}

.lcs-performance {
    margin-top: 3px;

    font-size: 1.1rem;
}

.lcs-score {
    margin-top: 3px;
}

.lcs-score-value {
    font-size: 1.4rem;
}

.lcs-score-label {
    margin-top: 0;
}

.lcs-content {
    padding-bottom: 16px;
}

.lcs-section {
    margin-top: 14px;
}

.lcs-actions {
    gap: 6px;
    padding: 6px 12px;
}

.lcs-button {
    min-height: 36px;
    padding: 6px;

    font-size: 0.72rem;
}

}