body { font-family: 'Quicksand', sans-serif; margin: 0; padding: 0; }
[hidden] { display: none !important; }
#beta-report-trigger { display: none !important; }

:root {
    --ln-ac: #f59e0b;
    --ln-bg: #0b0a1f;
    --ln-card: #15123a;
    --ln-line: rgba(255,255,255,.12);
    --ln-txt: #f1efff;
    --ln-mut: #a9a3d6;
}

html, body { background: var(--ln-bg); margin: 0; padding: 0; }

.ln-wrap {
    --sz: 100%;
    box-sizing: border-box;
    width: 100%; max-width: 1100px; margin: 0 auto;
    padding: 6px 10px 8px;
    display: flex; flex-direction: column; gap: 6px;
    color: var(--ln-txt);
    user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent;
}
.ln-wrap * { box-sizing: border-box; }

/* ---------------------------------------------------------------- HUD */
.ln-hud {
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px;
    padding: 2px 4px;
}
.ln-stat { display: flex; flex-direction: column; line-height: 1; }
.ln-stat b { font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: .5px; }
.ln-stat i { font-style: normal; font-size: 10px; font-weight: 800; letter-spacing: 2px; color: var(--ln-mut); margin-top: 3px; }
.ln-stat.r { align-items: flex-end; text-align: right; }
.ln-mid { display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 96px; font-weight: 800; font-size: 20px; font-variant-numeric: tabular-nums; }
.ln-hull { width: 14px; height: 14px; border-radius: 50% 50% 4px 4px; background: var(--ln-ac); box-shadow: 0 0 10px -1px var(--ln-ac); transition: transform .2s, opacity .2s; }
.ln-hull.off { background: transparent; border: 2px solid rgba(255,255,255,.25); box-shadow: none; opacity: .6; }
.ln-clock { color: #fff; }
.ln-clock.low { color: #fb7185; animation: lnPulse .6s ease-in-out infinite; }

.ln-fuelrow { display: flex; align-items: center; gap: 8px; padding: 0 4px; font-size: 10px; font-weight: 800; letter-spacing: 2px; color: var(--ln-mut); }
.ln-fuel { flex: 1; height: 10px; border-radius: 99px; background: rgba(255,255,255,.1); overflow: hidden; border: 1px solid var(--ln-line); }
.ln-fuel i { display: block; height: 100%; width: 100%; border-radius: 99px; background: linear-gradient(90deg, #f59e0b, #fde047); transition: width .08s linear; }
.ln-fuel.low i { background: linear-gradient(90deg, #ef4444, #fb7185); animation: lnPulse .5s ease-in-out infinite; }
.ln-fuel.flash i { box-shadow: 0 0 14px 2px #fde047; }
.ln-wind { font-size: 11px; letter-spacing: 1px; color: #7dd3fc; min-width: 78px; text-align: right; }

/* -------------------------------------------------------------- stage */
.ln-stage {
    position: relative; flex: 1 1 auto; min-height: 0; width: 100%;
    display: flex; align-items: center; justify-content: center;
    border-radius: 18px; overflow: hidden;
    background: #0b0a1f; border: 1px solid var(--ln-line);
    box-shadow: 0 10px 40px -12px rgba(0,0,0,.7);
}
#lnCv { display: block; touch-action: none; cursor: pointer; border-radius: 16px; }

.ln-hint {
    position: absolute; left: 0; right: 0; bottom: 14%; text-align: center; pointer-events: none;
    font-weight: 800; letter-spacing: 3px; font-size: 14px; color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.8);
}
.ln-hint small { display: block; margin-top: 6px; font-size: 11px; letter-spacing: 1.5px; color: var(--ln-mut); font-weight: 700; }
.ln-hint .ln-fingers { display: inline-block; font-size: 30px; animation: lnNudge 1.4s ease-in-out infinite; }
.ln-toast { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); pointer-events: none; z-index: 5;
    background: rgba(11,10,31,.82); border: 1px solid var(--ln-line); border-radius: 999px; padding: 6px 14px; font-weight: 800; font-size: 12px; letter-spacing: 1.5px; white-space: nowrap; }

/* ------------------------------------------------------------ overlays */
.ln-ov {
    position: absolute; inset: 0; z-index: 10;
    display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 10px;
    padding: 16px 16px 14px; overflow-y: auto; -webkit-overflow-scrolling: touch;
    background: rgba(8, 6, 26, .78); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
    text-align: center;
}
.ln-ov > * { flex-shrink: 0; }
.ln-ov > :first-child { margin-top: auto; }
.ln-ov > :last-child { margin-bottom: auto; }
.ln-ov.solid { background: #110e32; backdrop-filter: none; -webkit-backdrop-filter: none; }
.ln-logo { font-size: 38px; font-weight: 800; letter-spacing: 6px; color: var(--ln-ac); text-shadow: 0 0 26px rgba(245,158,11,.55); line-height: 1; }
.ln-tag { font-size: 13px; font-weight: 700; color: var(--ln-mut); letter-spacing: .5px; margin-top: -4px; }
.ln-h { font-size: 20px; font-weight: 800; letter-spacing: 3px; }

.ln-modes { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 360px; margin: 2px auto; }
.ln-mode {
    display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; text-align: left;
    width: 100%; padding: 10px 14px; border-radius: 16px; cursor: pointer;
    background: rgba(255,255,255,.06); border: 2px solid var(--ln-line); color: var(--ln-txt); font-family: inherit;
    transition: transform .12s, border-color .2s, background .2s;
}
.ln-mode:hover { background: rgba(255,255,255,.1); }
.ln-mode:active { transform: scale(.98); }
.ln-mode[aria-checked="true"] { border-color: var(--ln-ac); background: rgba(245,158,11,.16); box-shadow: 0 0 18px -6px var(--ln-ac); }
.ln-mode .ic { font-size: 24px; text-align: center; }
.ln-mode .nm { font-weight: 800; font-size: 15px; letter-spacing: 1.5px; }
.ln-mode .sb { font-size: 11px; font-weight: 700; color: var(--ln-mut); }
.ln-mode .bs { font-size: 11px; font-weight: 800; color: #fde047; text-align: right; white-space: nowrap; }
.ln-desc { min-height: 34px; font-size: 13px; font-weight: 700; color: #e6e3ff; max-width: 340px; margin: 0 auto; line-height: 1.4; }
.ln-btn {
    padding: 13px 22px; border-radius: 14px; border: 1px solid var(--ln-line); background: rgba(255,255,255,.08);
    color: #fff; font-family: inherit; font-weight: 800; font-size: 13px; letter-spacing: 1.5px; cursor: pointer; white-space: nowrap;
    transition: transform .12s, background .2s;
}
.ln-btn:hover { background: rgba(255,255,255,.14); }
.ln-btn:active { transform: scale(.97); }
.ln-btn.pri { background: var(--ln-ac); border-color: transparent; color: #1a1033; box-shadow: 0 8px 22px -6px var(--ln-ac); font-size: 15px; padding: 14px 34px; }
.ln-btn.pri:hover { filter: brightness(1.08); }
.ln-play { align-self: center; }

.ln-rows { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 360px; margin: 0 auto; }
.ln-row {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left;
    padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.06); border: 1px solid var(--ln-line);
    color: var(--ln-txt); font-family: inherit; font-weight: 800; font-size: 13px; letter-spacing: 1px; cursor: pointer; width: 100%;
}
.ln-row:hover { background: rgba(255,255,255,.1); }
.ln-row .v { color: var(--ln-ac); font-size: 12px; white-space: nowrap; }
.ln-row.static { cursor: default; }
.ln-sub { font-size: 11px; font-weight: 800; letter-spacing: 2px; color: var(--ln-mut); margin-top: 4px; }
#trophy-list { width: 100%; max-width: 360px; margin: 0 auto; text-align: left; max-height: 46vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.ln-skins { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.ln-skin { width: 46px; height: 46px; border-radius: 14px; border: 2px solid var(--ln-line); background: rgba(255,255,255,.06); cursor: pointer; position: relative; padding: 0; }
.ln-skin[aria-checked="true"] { border-color: var(--ln-ac); box-shadow: 0 0 14px -4px var(--ln-ac); }
.ln-skin[disabled] { opacity: .4; cursor: not-allowed; }
.ln-skin i { position: absolute; left: 50%; top: 50%; width: 16px; height: 18px; transform: translate(-50%,-50%); border-radius: 50% 50% 4px 4px; }
.ln-skin em { position: absolute; right: 2px; bottom: 0; font-size: 11px; font-style: normal; }

.ln-count { position: absolute; inset: 0; z-index: 12; display: flex; align-items: center; justify-content: center; pointer-events: none;
    font-size: 96px; font-weight: 800; color: #fff; text-shadow: 0 0 40px var(--ln-ac); background: rgba(8,6,26,.35); }

/* ---------------------------------------------------------------- bar */
.ln-bar { display: flex; gap: 8px; justify-content: center; }
.ln-bar button {
    flex: 1 1 0; max-width: 170px; padding: 10px 6px; border-radius: 12px; border: 1px solid var(--ln-line);
    background: rgba(255,255,255,.07); color: var(--ln-txt); font-family: inherit; font-weight: 800; font-size: 12px; letter-spacing: 1.2px;
    cursor: pointer; white-space: nowrap;
}
.ln-bar button:hover { background: rgba(255,255,255,.13); }
.ln-bar button:active { transform: scale(.97); }

@keyframes lnPulse { 50% { opacity: .55; } }
@keyframes lnNudge { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* --------------------------------------------------------- small / land */
.ln-wrap.tight .ln-stat b { font-size: 24px; }
.ln-wrap.tight .ln-logo { font-size: 30px; letter-spacing: 4px; }
.ln-wrap.tight .ln-mode { padding: 8px 10px; grid-template-columns: 28px 1fr auto; }
.ln-wrap.tight .ln-mode .bs { font-size: 10px; }
.ln-wrap.tight .ln-bar button { font-size: 11px; letter-spacing: .6px; padding: 9px 4px; }
.ln-wrap.compact .ln-tag, .ln-wrap.compact .ln-desc { display: none; }
.ln-wrap.compact .ln-logo { font-size: 26px; }

.ln-wrap.land { display: grid; grid-template-columns: 1fr max-content; grid-template-rows: auto auto 1fr auto; column-gap: 12px; row-gap: 8px; align-items: start; padding: 4px 10px; }
.ln-wrap.land .ln-stage { grid-column: 1; grid-row: 1 / span 4; height: 100%; }
.ln-wrap.land .ln-hud { grid-column: 2; grid-row: 1; width: 200px; grid-template-columns: 1fr 1fr; }
.ln-wrap.land .ln-mid { grid-column: 1 / span 2; grid-row: 2; justify-content: flex-start; min-width: 0; }
.ln-wrap.land .ln-fuelrow { grid-column: 2; grid-row: 2; width: 200px; }
.ln-wrap.land .ln-bar { grid-column: 2; grid-row: 4; flex-direction: column; width: 200px; align-self: end; }
.ln-wrap.land .ln-bar button { max-width: none; }
.ln-wrap.land .ln-stat b { font-size: 24px; }
.ln-wrap.land .ln-ov { padding: 10px; gap: 6px; }
.ln-wrap.land .ln-logo { font-size: 24px; }
.ln-wrap.land .ln-tag, .ln-wrap.land .ln-desc { display: none; }
.ln-wrap.land .ln-mode { padding: 6px 10px; }
.ln-wrap.land .ln-btn.pri { padding: 10px 26px; }

@media (prefers-reduced-motion: reduce) {
    .ln-clock.low, .ln-fuel.low i, .ln-hint .ln-fingers { animation: none; }
}