.lo-shell {
    max-width: 460px;
    margin: 0 auto;
    padding: 14px 12px 30px;
    color: var(--cg-ink);
    font-family: Inter, Arial, sans-serif;
}

.lo-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.lo-stats,
.lo-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lo-stat {
    min-width: 62px;
    padding: 8px 9px;
    border: 1px solid var(--cg-line);
    border-radius: 8px;
    background: var(--cg-panel);
    box-shadow: 0 6px 16px rgba(30, 37, 40, 0.06);
}

.lo-stat span,
.lo-hud-card span {
    display: block;
    color: var(--cg-muted);
    font-size: 10px;
    font-weight: 800;
    line-height: 1.1;
    text-transform: uppercase;
}

.lo-stat strong,
.lo-hud-card strong {
    display: block;
    margin-top: 2px;
    font-size: 18px;
    line-height: 1;
}

.lo-btn {
    padding: 9px 14px;
    border: 1px solid var(--cg-line);
    border-radius: 8px;
    background: var(--cg-panel);
    color: var(--cg-ink);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.1s ease, border-color 0.1s ease;
}

.lo-btn:hover {
    border-color: var(--cg-teal);
    transform: translateY(-1px);
}

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

.lo-icon-btn {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.lo-icon-btn svg {
    width: 20px;
    height: 20px;
}

.lo-primary {
    background: var(--cg-green);
    border-color: var(--cg-green);
    color: #fff;
}

.lo-primary:hover {
    border-color: var(--cg-green);
    filter: brightness(1.08);
}

.lo-hud {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.lo-hud-card {
    padding: 9px 11px;
    border: 1px solid var(--cg-line);
    border-radius: 8px;
    background: var(--cg-panel);
    box-shadow: 0 6px 16px rgba(30, 37, 40, 0.06);
}

.lo-board {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 9px;
    padding: 12px;
    border-radius: 14px;
    background: linear-gradient(160deg, #232c33, #16202a);
    border: 1px solid #0e161d;
    box-shadow: var(--cg-shadow);
}

.lo-cell {
    aspect-ratio: 1;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: linear-gradient(160deg, #2c363f, #202a33);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.45);
    cursor: pointer;
    padding: 0;
    transition: background 0.12s ease, box-shadow 0.12s ease, transform 0.08s ease;
}

.lo-cell:focus-visible {
    outline: 3px solid var(--cg-teal);
    outline-offset: 2px;
}

.lo-cell:active {
    transform: scale(0.94);
}

.lo-cell.lo-on {
    background: radial-gradient(circle at 35% 30%, #ffe89a, #f4b942 62%, #d98f1c);
    border-color: rgba(255, 224, 138, 0.8);
    box-shadow: 0 0 14px rgba(244, 185, 66, 0.55), 0 0 30px rgba(244, 185, 66, 0.25), inset 0 -3px 8px rgba(160, 90, 0, 0.4);
}

.lo-cell.lo-solved {
    cursor: default;
}

.lo-cell.lo-pop {
    animation: lo-pop 0.18s ease;
}

@keyframes lo-pop {
    50% { transform: scale(0.9); }
}

.lo-status {
    min-height: 22px;
    margin: 12px 2px 10px;
    color: var(--cg-muted);
    font-size: 0.92rem;
    font-weight: 600;
}

.lo-controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.lo-controls .lo-btn {
    flex: 1;
    min-width: 90px;
}

.lo-result {
    margin-top: 14px;
    padding: 16px;
    border: 1px solid var(--cg-line);
    border-radius: 12px;
    background: var(--cg-panel);
    box-shadow: var(--cg-shadow);
    text-align: center;
    animation: lo-rise 0.25s ease;
}

@keyframes lo-rise {
    from { opacity: 0; transform: translateY(8px); }
}

.lo-result-kicker {
    display: block;
    color: var(--cg-teal);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.lo-result strong {
    display: block;
    margin: 4px 0 2px;
    font-size: 1.35rem;
}

.lo-result p {
    margin: 0 0 12px;
    color: var(--cg-muted);
    font-size: 0.9rem;
}

.lo-result-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.lo-modal {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(20, 26, 30, 0.55);
}

.lo-modal-card {
    position: relative;
    max-width: 420px;
    width: 100%;
    padding: 20px 22px;
    border-radius: 12px;
    background: var(--cg-panel);
    border: 1px solid var(--cg-line);
    box-shadow: var(--cg-shadow);
}

.lo-modal-card h2 {
    margin: 0 0 10px;
    font-size: 1.15rem;
}

.lo-modal-card p {
    margin: 0 0 10px;
    color: var(--cg-muted);
    font-size: 0.92rem;
    line-height: 1.45;
}

.lo-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--cg-muted);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.lo-close:hover {
    color: var(--cg-ink);
    background: var(--cg-bg);
}

@media (max-width: 640px) {
    .lo-shell {
        padding: 8px 4px 22px;
    }

    .lo-stat {
        min-width: 56px;
        padding: 7px 8px;
    }

    .lo-stat strong,
    .lo-hud-card strong {
        font-size: 16px;
    }

    .lo-board {
        gap: 7px;
        padding: 10px;
    }

    .lo-btn {
        padding: 9px 10px;
        font-size: 0.84rem;
    }
}
