/* Kapitan Locik – style */
:root {
    --bg: #0b3a40;
    --app: #ffffff;
    --ink: #1d2b36;
    --ink2: #5b6b78;
    --line: #e1e8ee;
    --brand: #0e7c86;
    --brand2: #12a4b0;
    --accent: #ff7a59;
    --good: #19a974;
    --bad: #e5484d;
    --warn: #f5a524;
    --card: #f6f9fb;
    --glass: rgba(255, 255, 255, .92);
    --hud: rgba(12, 22, 30, .62);
    --hudInk: #f2f7fa;
    --shadow: 0 8px 30px rgba(10, 30, 40, .22);
    --route: #d6336c;
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --app: #141e25; --ink: #e8eef2; --ink2: #93a4b1; --line: #24323c; --card: #1a2730; --glass: rgba(20, 30, 37, .93);
        --shadow: 0 8px 30px rgba(0, 0, 0, .5);
    }
}
:root[data-theme="dark"] {
    --app: #141e25; --ink: #e8eef2; --ink2: #93a4b1; --line: #24323c; --card: #1a2730; --glass: rgba(20, 30, 37, .93);
    --shadow: 0 8px 30px rgba(0, 0, 0, .5);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--ink); font-family: Nunito, "Segoe UI", system-ui, -apple-system, sans-serif; overscroll-behavior: none; }
body { touch-action: none; user-select: none; -webkit-user-select: none; }
button { font: inherit; cursor: pointer; color: inherit; }
a { color: var(--brand2); }
.ic { display: inline-block; vertical-align: middle; flex-shrink: 0; }

#map { position: fixed; inset: 0; background: #e9e3cf; }
#fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
#whiteout { position: fixed; inset: 0; pointer-events: none; z-index: 3; background: radial-gradient(circle at 50% 60%, rgba(255, 255, 255, .55), rgba(235, 240, 245, .92)); opacity: 0; transition: opacity .6s; }
#flash { position: fixed; inset: 0; pointer-events: none; z-index: 3; background: #fff; opacity: 0; }
.maplibregl-ctrl-attrib { font-size: 10px !important; opacity: .75; }
.maplibregl-ctrl-bottom-right { z-index: 1 !important; }

/* ============ Ekrany UI ============ */
#ui { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
#ui > * { pointer-events: auto; }
.screen { position: absolute; inset: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; touch-action: pan-y; padding: max(14px, env(safe-area-inset-top)) 14px calc(90px + env(safe-area-inset-bottom)); }
.screen.dim { background: linear-gradient(180deg, rgba(8, 40, 45, .55), rgba(8, 40, 45, .15) 40%, rgba(8, 40, 45, .6)); }
.wrap { max-width: 560px; margin: 0 auto; }
.panel { background: var(--glass); border-radius: 20px; box-shadow: var(--shadow); padding: 14px; margin: 10px 0; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.panel h3 { margin: 2px 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .6px; color: var(--brand2); font-weight: 900; display: flex; align-items: center; gap: 6px; }
.muted { color: var(--ink2); }
.small { font-size: 13px; }
.row { display: flex; align-items: center; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; }

.topbar { display: flex; align-items: center; gap: 10px; color: #fff; padding: 2px 2px 6px; }
.topbar .logo { flex-shrink: 0; filter: drop-shadow(0 3px 8px rgba(0, 0, 0, .3)); }
.topbar .title { font-weight: 900; font-size: 21px; line-height: 1.05; text-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
.topbar .title small { display: block; font-size: 12px; font-weight: 700; opacity: .9; }
.pill { display: inline-flex; align-items: center; gap: 5px; background: rgba(0, 0, 0, .35); color: #fff; border-radius: 999px; padding: 6px 10px; font-weight: 900; font-size: 14px; white-space: nowrap; }
.pill.gold { background: linear-gradient(135deg, #f5b300, #ff9f1c); }
.pill.fire { background: linear-gradient(135deg, #ff7a59, #e5484d); }

.pilotCard .rank { font-weight: 900; font-size: 17px; }
.xpbar { height: 10px; border-radius: 6px; background: var(--line); overflow: hidden; margin-top: 6px; }
.xpbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand2), #6ee7b7); border-radius: 6px; transition: width .8s ease; }
.where { display: flex; align-items: center; gap: 10px; }
.where .code { font-weight: 900; font-size: 26px; color: var(--brand); letter-spacing: .5px; }
.where b { display: block; font-size: 16px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 14px; padding: 13px 18px; font-weight: 900; font-size: 16px; background: var(--brand); color: #fff; box-shadow: 0 4px 14px rgba(14, 124, 134, .35); text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn.big { width: 100%; padding: 16px; font-size: 18px; border-radius: 16px; }
.btn.alt { background: var(--accent); box-shadow: 0 4px 14px rgba(255, 122, 89, .35); }
.btn.ghost { background: var(--card); color: var(--ink); box-shadow: none; border: 1px solid var(--line); }
.btn.gold { background: linear-gradient(135deg, #f5b300, #ff9f1c); box-shadow: 0 4px 14px rgba(245, 179, 0, .4); color: #2b1d00; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }

/* karta zlecenia */
.job { display: flex; gap: 12px; align-items: center; padding: 11px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); margin: 8px 0; text-align: left; width: 100%; color: var(--ink); }
.job:active { transform: scale(.985); }
.job .jic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; color: #fff; flex-shrink: 0; background: var(--brand2); }
.job .jtx { flex: 1; min-width: 0; }
.job .jtx b { display: block; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.job .jtx small { display: block; color: var(--ink2); font-size: 12.5px; }
.job .pay { text-align: right; font-weight: 900; color: var(--good); font-size: 16px; white-space: nowrap; }
.job .pay small { display: block; color: var(--ink2); font-weight: 700; font-size: 11.5px; }
.job.premium { border: 2px solid #f5b300; background: linear-gradient(135deg, rgba(245, 179, 0, .14), transparent 60%), var(--card); }
.job.sponsor-kokpit { border-color: #bcd3fb; background: linear-gradient(135deg, rgba(31, 111, 235, .1), transparent 60%), var(--card); }
.job.sponsor-travio { border-color: #bfe8cc; background: linear-gradient(135deg, rgba(22, 163, 74, .1), transparent 60%), var(--card); }
.job.locked { opacity: .55; }
.tag { display: inline-block; font-size: 10.5px; font-weight: 900; text-transform: uppercase; letter-spacing: .4px; padding: 2px 7px; border-radius: 999px; background: var(--line); color: var(--ink2); margin-right: 4px; vertical-align: middle; }
.tag.gold { background: #f5b300; color: #2b1d00; }
.tag.blue { background: #1f6feb; color: #fff; }
.tag.green { background: #16a34a; color: #fff; }
.tag.red { background: var(--bad); color: #fff; }

.daily { background: linear-gradient(135deg, #ff7a59, #f5b300); color: #fff; border-radius: 20px; padding: 14px; box-shadow: var(--shadow); margin: 10px 0; display: flex; gap: 12px; align-items: center; width: 100%; border: 0; text-align: left; }
.daily b { display: block; font-size: 18px; }
.daily small { display: block; font-size: 13px; opacity: .95; }
.daily .go { background: rgba(255, 255, 255, .25); border-radius: 12px; padding: 8px 12px; font-weight: 900; white-space: nowrap; }
.daily.done { background: linear-gradient(135deg, #19a974, #0e7c86); }
.challenge { background: linear-gradient(135deg, #8338ec, #3a86ff); }

.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 12; display: flex; justify-content: center; gap: 6px; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); pointer-events: auto; }
.nav button { flex: 1; max-width: 120px; display: flex; flex-direction: column; align-items: center; gap: 3px; border: 0; border-radius: 16px; padding: 8px 4px; font-size: 12px; font-weight: 900; background: var(--glass); color: var(--ink); box-shadow: var(--shadow); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); position: relative; }
.nav button .dot { position: absolute; top: 6px; right: 22%; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }

/* ============ Arkusz (bottom sheet) i modal ============ */
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; max-height: 88vh; overflow-y: auto; -webkit-overflow-scrolling: touch; touch-action: pan-y; background: var(--app); border-radius: 22px 22px 0 0; box-shadow: 0 -10px 40px rgba(0, 0, 0, .3); transform: translateY(105%); transition: transform .3s ease; padding: 8px 16px calc(20px + env(safe-area-inset-bottom)); }
.sheet.open { transform: none; }
.sheet .grab { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 4px auto 10px; }
.sheet h2 { margin: 4px 0 12px; font-size: 21px; display: flex; align-items: center; gap: 8px; }
.sheet h3 { margin: 16px 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .6px; color: var(--brand2); }
.sheet .x { position: absolute; top: 12px; right: 12px; border: 0; background: var(--card); border-radius: 50%; width: 36px; height: 36px; display: grid; place-items: center; }
.scrim { position: fixed; inset: 0; z-index: 29; background: rgba(0, 0, 0, .35); opacity: 0; pointer-events: none; transition: opacity .3s; }
.scrim.open { opacity: 1; pointer-events: auto; }
.modal { position: fixed; inset: 0; z-index: 40; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(5, 15, 20, .55); }
.modal.open { display: flex; }
.modal .box { background: var(--app); border-radius: 22px; box-shadow: var(--shadow); max-width: 440px; width: 100%; max-height: 92vh; overflow-y: auto; padding: 18px; text-align: center; animation: pop .25s ease; touch-action: pan-y; }
.modal .box h2 { margin: 6px 0 6px; font-size: 22px; }
.modal .box p { margin: 8px 0; }
.modal .box .opts { display: grid; gap: 8px; margin-top: 14px; }
@keyframes pop { from { transform: scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }

.toast { position: fixed; left: 50%; top: calc(86px + env(safe-area-inset-top)); transform: translate(-50%, -20px); z-index: 60; background: #1d2b36; color: #fff; padding: 10px 16px; border-radius: 14px; font-weight: 800; font-size: 14px; opacity: 0; pointer-events: none; transition: all .25s ease; max-width: calc(100% - 32px); text-align: center; box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* flota */
.plane { display: flex; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); margin: 8px 0; }
.plane .pimg { width: 84px; height: 84px; flex-shrink: 0; background: radial-gradient(circle, #cfe3d0, #9fbf9e); border-radius: 14px; display: grid; place-items: center; }
.plane .pimg svg { width: 82px; height: 82px; }
.plane.sel { border: 2px solid var(--brand2); }
.plane .specs { font-size: 12px; color: var(--ink2); }
.plane .specs span { display: inline-block; margin-right: 8px; }
.livs { display: flex; gap: 8px; flex-wrap: wrap; }
.liv { border: 2px solid var(--line); border-radius: 14px; padding: 6px; background: var(--card); width: 86px; text-align: center; font-size: 11px; font-weight: 800; }
.liv svg { width: 70px; height: 70px; display: block; margin: 0 auto; }
.liv.sel { border-color: var(--brand2); }
.liv.lock { opacity: .45; }

/* paszport / statystyki */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 8px; text-align: center; }
.stat b { display: block; font-size: 20px; }
.stat span { font-size: 11.5px; color: var(--ink2); font-weight: 700; }
.logrow { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.logrow .sc { font-weight: 900; min-width: 46px; text-align: right; }
.stamps { display: flex; flex-wrap: wrap; gap: 6px; }
.stamp { border: 2px dashed var(--brand2); color: var(--brand); border-radius: 10px; padding: 4px 8px; font-weight: 900; font-size: 12px; transform: rotate(-3deg); }
.stamp:nth-child(2n) { transform: rotate(2deg); border-color: var(--accent); color: var(--accent); }
.ach { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; margin: 6px 0; background: var(--card); color: var(--ink2); }
.ach.on { color: var(--ink); border-color: #f5d37a; background: linear-gradient(135deg, rgba(245, 179, 0, .12), transparent), var(--card); }
.ach .aic { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--line); color: var(--ink2); flex-shrink: 0; }
.ach.on .aic { background: #f5b300; color: #fff; }
.ach b { display: block; }
.ach small { font-size: 12.5px; }

/* ============ Odprawa ============ */
.brief .route { display: flex; align-items: center; gap: 8px; font-weight: 900; }
.brief .route .ap { flex: 1; min-width: 0; }
.brief .route .ap b { font-size: 26px; color: var(--brand); display: block; }
.brief .route .ap small { display: block; font-size: 12.5px; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brief .route .mid { text-align: center; color: var(--ink2); font-size: 12px; }
.kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.kv div { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 8px; text-align: center; }
.kv b { display: block; font-size: 15px; }
.kv span { font-size: 11px; color: var(--ink2); font-weight: 800; text-transform: uppercase; }
.rule { background: rgba(245, 165, 36, .14); border-radius: 12px; padding: 8px 10px; font-size: 13.5px; margin: 8px 0; }
.choosePlane { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.choosePlane button { flex-shrink: 0; border: 2px solid var(--line); background: var(--card); border-radius: 14px; padding: 6px 10px; text-align: center; min-width: 108px; }
.choosePlane button.sel { border-color: var(--brand2); background: rgba(18, 164, 176, .1); }
.choosePlane button b { display: block; font-size: 13px; }
.choosePlane button small { display: block; font-size: 12px; color: var(--good); font-weight: 900; }
.choosePlane svg { width: 54px; height: 54px; }

/* ============ HUD ============ */
#hud { position: fixed; inset: 0; z-index: 5; pointer-events: none; display: none; color: var(--hudInk); }
#hud.on { display: block; }
#hud .box { background: var(--hud); border-radius: 14px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); box-shadow: 0 4px 16px rgba(0, 0, 0, .25); }
.hTop { position: absolute; top: max(8px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); width: min(420px, calc(100% - 120px)); }
.compass { height: 34px; overflow: hidden; position: relative; padding: 0; }
.compass .tape { position: absolute; top: 0; left: 50%; height: 100%; white-space: nowrap; }
.compass .tape span { position: absolute; top: 5px; transform: translateX(-50%); font-weight: 900; font-size: 13px; }
.compass .tape i { position: absolute; bottom: 0; width: 2px; height: 7px; background: rgba(255, 255, 255, .55); transform: translateX(-1px); }
.compass .tape i.l { height: 12px; background: #fff; }
.compass .needle { position: absolute; left: 50%; top: 0; width: 0; height: 0; border-left: 7px solid transparent; border-right: 7px solid transparent; border-top: 8px solid #ffd23f; transform: translateX(-7px); z-index: 2; }
.compass .bug { position: absolute; top: 0; width: 12px; height: 34px; margin-left: -6px; background: linear-gradient(180deg, rgba(214, 51, 108, .9), rgba(214, 51, 108, .2)); border-radius: 4px; z-index: 1; }
.hInfo { display: flex; justify-content: space-between; gap: 6px; margin-top: 6px; font-size: 13px; font-weight: 800; }
.hInfo > div { padding: 5px 9px; }
.hInfo b { font-size: 15px; }
.atc { margin-top: 6px; padding: 8px 10px; font-size: 13.5px; font-weight: 700; line-height: 1.3; display: none; border-left: 4px solid #6ee7b7; }
.atc.on { display: block; animation: pop .25s ease; }
.atc em { font-style: normal; color: #6ee7b7; font-weight: 900; }
.tapes { position: absolute; top: 56%; transform: translateY(-50%); left: 8px; right: 8px; display: flex; justify-content: space-between; }
.tape2 { width: 82px; padding: 8px 6px; text-align: center; }
.tape2 small { display: block; font-size: 10.5px; font-weight: 900; opacity: .75; letter-spacing: .5px; }
.tape2 b { display: block; font-size: 26px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.tape2 .sub { font-size: 12px; font-weight: 800; opacity: .9; font-variant-numeric: tabular-nums; }
.tape2.warn b { color: #ff6b6b; }
.tape2 .bar { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .2); margin-top: 5px; overflow: hidden; }
.tape2 .bar i { display: block; height: 100%; background: #6ee7b7; }
.vsT { color: #ffd23f; }
.warnings { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 6px; }
.warnings:empty { display: none; }
.warnings div { background: #e5484d; color: #fff; font-weight: 900; font-size: 13.5px; padding: 5px 12px; border-radius: 10px; letter-spacing: .6px; animation: blink 1s infinite; box-shadow: 0 4px 16px rgba(229, 72, 77, .5); }
.warnings div.amber { background: #f5a524; color: #2b1d00; box-shadow: 0 4px 16px rgba(245, 165, 36, .5); }
.warnings div.info { background: #0e7c86; animation: none; }
@keyframes blink { 50% { opacity: .55; } }
.ils { width: 220px; margin: 6px auto 0; padding: 7px 9px; display: none; }
.ils.on { display: block; }
.ils .lbl { font-size: 10.5px; font-weight: 900; opacity: .8; display: flex; justify-content: space-between; }
.ils .scale { position: relative; height: 16px; margin: 3px 0 6px; }
.ils .scale::before { content: ''; position: absolute; left: 0; right: 0; top: 7px; height: 2px; background: rgba(255, 255, 255, .35); }
.ils .scale span { position: absolute; top: 4px; width: 8px; height: 8px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .7); transform: translateX(-50%); }
.ils .scale .mid { width: 2px; height: 16px; top: 0; border: 0; border-radius: 0; background: #fff; }
.ils .dia { position: absolute; top: 1px; width: 14px; height: 14px; background: #d946ef; transform: translateX(-50%) rotate(45deg); border-radius: 2px; box-shadow: 0 0 8px rgba(217, 70, 239, .8); transition: left .1s linear; }
.ils .dia.g { background: #22d3ee; box-shadow: 0 0 8px rgba(34, 211, 238, .8); }
.ils .hint { font-size: 12px; font-weight: 800; text-align: center; }

.hBottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 8px calc(10px + env(safe-area-inset-bottom)); display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.ctrlL, .ctrlR { pointer-events: auto; display: flex; align-items: flex-end; gap: 8px; }
.thr { width: 64px; height: 190px; position: relative; padding: 8px; touch-action: none; }
.thr .track { position: absolute; left: 50%; top: 26px; bottom: 12px; width: 10px; transform: translateX(-50%); background: rgba(255, 255, 255, .2); border-radius: 6px; }
.thr .fill { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 6px; background: linear-gradient(0deg, #6ee7b7, #ffd23f); }
.thr .knob { position: absolute; left: 50%; width: 46px; height: 22px; transform: translate(-50%, 50%); background: #fff; color: #1d2b36; border-radius: 8px; font-size: 11px; font-weight: 900; display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0, 0, 0, .4); }
.thr small { position: absolute; top: 6px; left: 0; right: 0; text-align: center; font-size: 10.5px; font-weight: 900; opacity: .8; }
.keys { display: grid; grid-auto-flow: column; grid-template-rows: 1fr 1fr; gap: 6px; }
.kbtn { pointer-events: auto; border: 0; border-radius: 12px; padding: 7px 6px; min-width: 62px; font-size: 11px; font-weight: 900; color: #fff; background: var(--hud); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; flex-direction: column; align-items: center; gap: 1px; box-shadow: 0 4px 16px rgba(0, 0, 0, .25); }
.kbtn b { font-size: 14px; }
.kbtn.on { background: rgba(14, 124, 134, .92); }
.kbtn.hot { background: rgba(245, 165, 36, .95); color: #2b1d00; animation: blink 1s infinite; }
.kbtn kbd { font-family: inherit; font-size: 9.5px; opacity: .7; }
.stick { width: 150px; height: 150px; border-radius: 50%; position: relative; touch-action: none; }
.stick .base { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .08), rgba(255, 255, 255, .02)); border: 2px solid rgba(255, 255, 255, .3); }
.stick .base::before, .stick .base::after { content: ''; position: absolute; background: rgba(255, 255, 255, .2); }
.stick .base::before { left: 50%; top: 12%; bottom: 12%; width: 2px; }
.stick .base::after { top: 50%; left: 12%; right: 12%; height: 2px; }
.stick .nub { position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #fff, #cfd8de); box-shadow: 0 4px 14px rgba(0, 0, 0, .4); }
.stick .lab { position: absolute; font-size: 10px; font-weight: 900; opacity: .7; }
.hTL { position: absolute; top: max(8px, env(safe-area-inset-top)); left: 8px; display: flex; flex-direction: column; gap: 6px; pointer-events: auto; }
.hTR { position: absolute; top: max(8px, env(safe-area-inset-top)); right: 8px; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.ibtn { pointer-events: auto; width: 44px; height: 44px; border: 0; border-radius: 12px; background: var(--hud); color: #fff; display: grid; place-items: center; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.mini { padding: 6px 8px; font-size: 11.5px; font-weight: 800; min-width: 92px; }
.mini .mb { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .2); margin: 3px 0 5px; overflow: hidden; }
.mini .mb i { display: block; height: 100%; background: #6ee7b7; }
.mini .mb i.lo { background: #ff6b6b; }
.tip { margin-top: 6px; background: rgba(255, 255, 255, .96); color: #1d2b36; border-radius: 16px; padding: 8px 12px; font-weight: 800; font-size: 13.5px; line-height: 1.35; box-shadow: var(--shadow); display: none; text-align: center; border: 3px solid #ffd23f; }
.tip.on { display: block; animation: pop .25s ease; }
.tip kbd { background: #1d2b36; color: #fff; border-radius: 6px; padding: 1px 6px; font-family: inherit; font-size: 12.5px; }
.kbdHelp { position: absolute; right: 8px; bottom: calc(10px + env(safe-area-inset-bottom)); font-size: 11.5px; font-weight: 800; line-height: 1.55; padding: 8px 10px; }
.kbdHelp kbd { background: rgba(255, 255, 255, .2); border-radius: 5px; padding: 0 5px; font-family: inherit; }
.touch .kbdHelp { display: none; }
.notouch .stick { display: none; }

/* ============ Wynik lotu ============ */
.result .big { font-size: 58px; font-weight: 900; line-height: 1; margin: 6px 0 2px; }
.result .rate { font-size: 22px; font-weight: 900; }
.stars { font-size: 30px; letter-spacing: 4px; margin: 4px 0; }
.stars .off { opacity: .2; filter: grayscale(1); }
.parts { text-align: left; margin: 10px 0; }
.parts .pr { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.parts .pr small { color: var(--ink2); grid-column: 1; }
.parts .pr b { grid-row: 1 / span 2; grid-column: 2; align-self: center; }
.parts .pb { grid-column: 1 / -1; height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; }
.parts .pb i { display: block; height: 100%; background: linear-gradient(90deg, #ff7a59, #f5b300, #19a974); }
.money { text-align: left; font-size: 14.5px; }
.money div { display: flex; justify-content: space-between; padding: 4px 0; }
.money .tot { border-top: 2px solid var(--line); font-weight: 900; font-size: 17px; margin-top: 4px; padding-top: 8px; }
.plus { color: var(--good); font-weight: 900; }
.minus { color: var(--bad); font-weight: 900; }
.unlock { background: linear-gradient(135deg, rgba(18, 164, 176, .14), transparent), var(--card); border: 2px solid var(--brand2); border-radius: 16px; padding: 10px; margin: 10px 0; text-align: left; display: flex; gap: 10px; align-items: center; }

/* ============ Start ============ */
.hero { text-align: center; color: #fff; padding: 10px 0 0; }
.hero h1 { margin: 8px 0 2px; font-size: 34px; font-weight: 900; text-shadow: 0 3px 12px rgba(0, 0, 0, .4); }
.hero p { margin: 0 0 8px; font-weight: 700; text-shadow: 0 2px 8px rgba(0, 0, 0, .4); }
.inp { width: 100%; padding: 13px 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-weight: 800; font-size: 17px; margin: 6px 0; }
.bases { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; max-height: 240px; overflow-y: auto; }
.bases button { border: 2px solid var(--line); background: var(--card); border-radius: 12px; padding: 8px; text-align: left; font-weight: 800; font-size: 13.5px; }
.bases button b { display: block; color: var(--brand); }
.bases button.sel { border-color: var(--brand2); background: rgba(18, 164, 176, .12); }
.loading { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: linear-gradient(135deg, #0b5f68, #12a4b0); color: #fff; font-weight: 900; transition: opacity .5s; }
.loading.hide { opacity: 0; pointer-events: none; }
.loading .ld { text-align: center; }
.loading .bar { width: 180px; height: 6px; background: rgba(255, 255, 255, .25); border-radius: 3px; margin: 14px auto 0; overflow: hidden; }
.loading .bar i { display: block; height: 100%; width: 40%; background: #fff; border-radius: 3px; animation: ld 1.1s infinite ease-in-out; }
@keyframes ld { from { transform: translateX(-100%); } to { transform: translateX(260%); } }

/* reklamy i udostępnianie (jak w Globtroterze) */
.adCard { display: flex; gap: 12px; align-items: flex-start; text-decoration: none; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px; margin: 8px 0; text-align: left; }
.adCard:active { transform: scale(.985); }
.ad-kokpit { border-color: #bcd3fb; background: linear-gradient(135deg, rgba(31, 111, 235, .08), transparent 60%), var(--card); }
.ad-travio { border-color: #bfe8cc; background: linear-gradient(135deg, rgba(22, 163, 74, .08), transparent 60%), var(--card); }
.adIc { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; }
.adTx { flex: 1; min-width: 0; }
.adTx em { display: block; font-style: normal; font-size: 11px; font-weight: 800; color: var(--ink2); text-transform: uppercase; letter-spacing: .4px; }
.adTx b { display: block; font-size: 15px; margin: 1px 0 2px; }
.adTx small { display: block; color: var(--ink2); font-size: 12.5px; }
.adCta { display: inline-block; margin-top: 6px; font-weight: 900; font-size: 13.5px; }
.adLink { display: inline-block; font-weight: 800; font-size: 13.5px; color: var(--brand2); }
.shareBox { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0; }
.shBtn { display: flex; flex-direction: column; align-items: center; gap: 4px; justify-content: center; border: 0; border-radius: 14px; padding: 10px 4px; font-weight: 800; font-size: 12.5px; color: #fff; }
.shBtn:active { transform: scale(.96); }
.shBtn.native { background: linear-gradient(135deg, #ff7a59, #ffb347); }
.shBtn.fb { background: #1877f2; }
.shBtn.ms { background: linear-gradient(135deg, #0695ff, #a334fa); }
.shBtn.wa { background: #25d366; }
.shBtn.x { background: #111; }
.shBtn.img { background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af); }
.shBtn.cp { background: var(--card); color: var(--ink); border: 1px solid var(--line); }

.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 45; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 9px; height: 14px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

@media (max-width: 699px) {
    .ils, .ils.on { display: none; }
}
@media (max-width: 420px) {
    .tape2 { width: 72px; }
    .tape2 b { font-size: 22px; }
    .stick { width: 132px; height: 132px; }
    .thr { height: 170px; width: 58px; }
    .kbtn { min-width: 54px; padding: 6px 3px; font-size: 10px; }
    .kbtn b { font-size: 13px; }
    .hTop { width: calc(100% - 112px); }
}
@media (max-height: 560px) {
    .tapes { transform: translateY(-50%); }
    .thr { height: 140px; }
    .stick { width: 120px; height: 120px; }
}
