:root { --ink: #eef3f7; --dim: #9fb0bf; --panel: rgba(10, 16, 24, .72); --line: rgba(255, 255, 255, .14); --acc: #ff7a2f; --hud: #7dff9a; }
* { box-sizing: border-box; } [hidden] { display: none !important; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0b1118; color: var(--ink); font: 15px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; overscroll-behavior: none; touch-action: none; }
canvas { display: block; position: fixed; inset: 0; width: 100%; height: 100%; }
#hud { pointer-events: none; }
button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; }

#load { position: fixed; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; background: radial-gradient(circle at 50% 40%, #1d2a38, #070b10 70%); z-index: 20; transition: opacity .8s; }
#load b, .logo b { font-size: clamp(34px, 8vw, 72px); letter-spacing: .32em; font-weight: 800; margin-right: -.32em; }
#load span { color: var(--dim); font-size: 14px; }
#load i { width: min(280px, 70vw); height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .12); overflow: hidden; }
#load em { display: block; height: 100%; width: 0; background: var(--acc); transition: width .3s; }
#load.gone { opacity: 0; pointer-events: none; }

.screen { position: fixed; inset: 0; z-index: 10; display: grid; padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
#title { grid-template-rows: auto 1fr auto auto; justify-items: center; background: linear-gradient(180deg, rgba(5, 8, 12, .55), transparent 35%, transparent 60%, rgba(5, 8, 12, .7)); }
#title .top { justify-self: start; }
.yzback { display: inline-block; padding: 7px 12px; border-radius: 12px; background: rgba(0, 0, 0, .35); border: 1px solid var(--line); color: var(--ink); font-weight: 600; font-size: 14px; text-decoration: none; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.logo { align-self: start; margin-top: 6vh; display: grid; justify-items: center; gap: 6px; text-shadow: 0 2px 30px rgba(0, 0, 0, .55); }
.logo span { color: #d9e4ee; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; font-size: 13px; }
.menu { display: grid; gap: 10px; width: min(300px, 80vw); margin-bottom: 4vh; }
.menu button { padding: 13px 18px; border-radius: 14px; border: 1px solid var(--line); background: rgba(10, 16, 24, .55); font-weight: 700; font-size: 16px; letter-spacing: .04em; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transition: background .15s, transform .15s; }
.menu button:hover { background: rgba(30, 40, 52, .75); transform: translateY(-1px); }
.menu .primary { background: var(--acc); border-color: transparent; color: #1a0d04; }
.menu .primary:hover { background: #ff9050; }
.hint { color: #c9d5df; font-size: 12px; text-align: center; margin: 0; opacity: .8; text-shadow: 0 1px 6px rgba(0, 0, 0, .6); }

.panel { place-items: center; background: rgba(5, 8, 12, .45); overflow: auto; }
.card { width: min(460px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 18px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.card.wide { width: min(760px, 100%); }
.card h2 { margin: 0; font-size: 22px; letter-spacing: .02em; }
.head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.back { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, .06); font-size: 20px; line-height: 1; }
.sub { color: var(--dim); margin: 4px 0 12px; } .sub.small { font-size: 12.5px; margin: 6px 0; }
.row { display: flex; flex-wrap: wrap; gap: 8px; margin: 9px 0; align-items: center; } .row > span { width: 84px; color: var(--dim); font-size: 13px; }
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.seg button { border: 0; background: transparent; padding: 8px 11px; font-weight: 600; color: var(--dim); min-height: 36px; }
.seg button.on { background: var(--acc); color: #1a0d04; }
.go { width: 100%; margin-top: 12px; padding: 13px; border: 0; border-radius: 14px; background: var(--acc); color: #1a0d04; font-weight: 800; font-size: 17px; letter-spacing: .03em; }
.stack { display: grid; gap: 8px; margin-top: 12px; } .stack button:not(.go) { padding: 11px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .06); font-weight: 700; } .stack .go { margin-top: 0; }
.mlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.mcard { text-align: left; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .05); display: grid; gap: 4px; }
.mcard:hover { background: rgba(255, 255, 255, .1); }
.mcard b { font-size: 15px; } .mcard small { color: var(--dim); font-size: 12px; } .mcard .st { color: #ffd27a; letter-spacing: 2px; font-size: 13px; }
.mcard .n { color: var(--acc); font-weight: 800; font-size: 12px; letter-spacing: .1em; }
.kicker { color: var(--acc); font-weight: 800; letter-spacing: .12em; font-size: 12px; text-transform: uppercase; margin: 0; }
.brief { font-size: 16px; line-height: 1.5; margin: 8px 0 4px; }
.stars { font-size: 34px; color: #ffd27a; letter-spacing: 6px; text-align: center; margin: 4px 0; min-height: 40px; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; } .facts div { background: rgba(255, 255, 255, .06); border-radius: 12px; padding: 8px 10px; } .facts b { display: block; font-size: 18px; } .facts small { color: var(--dim); }
.keys { margin-top: 10px; color: var(--dim); font-size: 13px; } .keys summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.kgrid { display: grid; grid-template-columns: max-content 1fr; gap: 3px 14px; margin-top: 8px; } .kgrid span:nth-child(odd) { color: var(--ink); font-weight: 700; }
html:not(.is-touch) .touch-only { display: none !important; }
html.is-touch .desk-only { display: none !important; }

/* flying */
#fly { position: fixed; inset: 0; pointer-events: none; z-index: 5; }
#fly .ib { position: absolute; top: max(10px, env(safe-area-inset-top)); width: 44px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0, 0, 0, .3); font-weight: 800; font-size: 12px; pointer-events: auto; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
#bPause { right: max(12px, env(safe-area-inset-right)); } #bCam { right: calc(max(12px, env(safe-area-inset-right)) + 52px); width: 52px !important; }
.touch-ctl { position: absolute; inset: 0; }
.thr { position: absolute; left: max(14px, env(safe-area-inset-left)); bottom: max(16px, env(safe-area-inset-bottom)); width: 54px; height: min(42vh, 200px); border-radius: 14px; border: 1px solid var(--line); background: rgba(0, 0, 0, .3); pointer-events: auto; overflow: hidden; --t: .6; }
.thr i { position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--t) * 100%); background: linear-gradient(#ffb44d, #ff7a3d); opacity: .8; }
.thr span { position: absolute; top: 6px; width: 100%; text-align: center; font-size: 10px; font-weight: 800; color: #fff; }
.thr.auto i { background: linear-gradient(#7dff9a, #2fb35a); }
.tbtns { position: absolute; right: max(14px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(2, auto); gap: 10px; pointer-events: auto; justify-items: end; align-items: end; }
.tbtns button { width: 58px; height: 58px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .35); background: rgba(0, 0, 0, .32); font-weight: 800; font-size: 12px; }
.tbtns button.big { width: 78px; height: 78px; font-size: 15px; background: rgba(255, 122, 47, .35); }
.tbtns button:active, .tbtns button.on { background: rgba(255, 122, 47, .75); }
.tstick { position: absolute; width: 140px; height: 140px; margin: -70px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .35); background: rgba(0, 0, 0, .15); pointer-events: none; }
.tstick i { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px; border-radius: 50%; background: rgba(255, 255, 255, .6); }
#turn { position: fixed; inset: 0; display: none; place-items: center; text-align: center; background: #0b1118; padding: 24px; font-size: 18px; font-weight: 700; z-index: 30; }
@media (orientation: portrait) { html.is-touch body.flying #turn { display: grid; } }
@media (max-width: 560px) { .row > span { width: 100%; } }
/* short landscape phones: a smaller logo, the menu in two columns */
@media (max-height: 520px) {
  .logo { margin-top: 0; } .logo b { font-size: clamp(28px, 7vh, 44px); } .logo span { font-size: 11px; }
  .menu { grid-template-columns: 1fr 1fr; width: min(520px, 86vw); margin-bottom: 2vh; } .menu button { padding: 10px 12px; font-size: 15px; }
  .hint { display: none; }
  .card { padding: 14px; } .row { margin: 6px 0; } .seg button { min-height: 32px; padding: 6px 9px; } .go { padding: 10px; margin-top: 8px; }
}

/* Pro: a small tag on what Skyknife Pro opens, until it's yours */
html.sk-free [data-pro]::after { content: "PRO"; margin-left: 5px; font-size: 9px; font-weight: 800; letter-spacing: .06em; padding: 1px 4px; border-radius: 5px; background: rgba(255, 122, 47, .9); color: #1a0d04; vertical-align: 1px; }
.mcard .pro { justify-self: start; font-size: 10px; font-weight: 800; letter-spacing: .06em; padding: 1px 6px; border-radius: 6px; background: rgba(255, 122, 47, .9); color: #1a0d04; }
.links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; margin-top: 10px; } .links a { color: var(--dim); font-size: 13px; text-decoration: none; padding: 12px 4px; } .links a:hover { color: var(--ink); }
html:not(.is-touch) .touch-only-b { display: none; }

/* the controls card (first flight with each control scheme, and from pause and settings) */
.help .hgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; margin: 12px 0; }
.help .hrow { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, .05); }
.help .hrow .k { flex: 0 0 auto; min-width: 74px; display: flex; flex-wrap: wrap; gap: 3px; }
.help kbd { display: inline-block; min-width: 24px; padding: 3px 6px; border-radius: 7px; border: 1px solid rgba(255, 255, 255, .28); border-bottom-width: 3px; background: rgba(255, 255, 255, .08); font: 700 12px/1.2 system-ui, sans-serif; text-align: center; color: var(--ink); }
.help .hrow span.d { color: #d9e4ee; font-size: 14px; }
.help .tips { color: var(--dim); font-size: 13px; line-height: 1.5; } .help .tips b { color: var(--acc); }
.linkbtn { background: none; border: 0; color: var(--acc); font-weight: 700; padding: 10px 0; text-decoration: underline; }
@media (max-height: 520px) { .help .hgrid { grid-template-columns: repeat(3, 1fr); gap: 5px; margin: 8px 0; } .help .hrow { padding: 5px 7px; } .help .hrow span.d { font-size: 12px; } .help kbd { font-size: 11px; padding: 2px 4px; } }

/* the hangar: a card at the bottom, the jet orbiting above it */
#hangar { align-content: end; justify-items: center; background: linear-gradient(transparent 55%, rgba(5, 8, 12, .55)); }
#hangar .card { width: min(560px, 100%); }
