/* InnoDrone – Oberfläche */
:root { --bg: #0f1418; --panel: rgba(14, 20, 26, 0.86); --line: rgba(255, 255, 255, 0.12); --txt: #eef3f6; --mut: #9fb0bb; --acc: #31d0c4; --acc2: #ff8a2a; --bad: #ff5a5a; --good: #48e08a; --t-op: 0.55; --t-r: 62px; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--txt); font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; overflow: hidden; overscroll-behavior: none; -webkit-tap-highlight-color: transparent; }
#app { position: fixed; inset: 0; }
#c, #osd { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#osd { pointer-events: none; }
.hidden { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }

/* Ladebildschirm */
#boot { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: radial-gradient(circle at 50% 40%, #1c2a33, #0a0e11 70%); z-index: 50; }
.boot-logo, .logo { font-weight: 900; letter-spacing: 0.05em; font-size: clamp(34px, 7vw, 76px); margin: 0; }
.title-box .logo { font-size: clamp(32px, 9vw, 60px); }
.boot-logo span, .logo span { color: var(--acc); }
.boot-bar { width: min(380px, 80vw); height: 6px; background: rgba(255, 255, 255, 0.1); border-radius: 3px; overflow: hidden; margin: 18px auto 8px; }
.boot-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--acc), var(--acc2)); transition: width 0.2s; }
#boot-msg { color: var(--mut); font-size: 14px; }

/* Menüs */
#ui { position: absolute; inset: 0; overflow-y: auto; z-index: 20; padding: max(16px, env(safe-area-inset-top)) 16px 24px; background: linear-gradient(180deg, rgba(8, 12, 16, 0.25), rgba(8, 12, 16, 0.72)); }
.screen { max-width: 1040px; margin: 0 auto; }
.screen.title, .screen.pause, .screen.results { min-height: 100%; display: flex; align-items: center; justify-content: center; }
.title-box, .pause-box, .end-box { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 26px 24px; text-align: center; width: min(460px, 100%); backdrop-filter: blur(6px); }
.tag { color: var(--mut); margin: 6px 0 18px; font-size: 14px; }
.menu { display: flex; flex-direction: column; gap: 8px; }
.menu .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.menu button, .foot button, .chip, .item, .card, .ac, .detail button, .screen > button { background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; text-align: left; transition: background 0.15s, border-color 0.15s, transform 0.1s; }
.menu button { text-align: center; font-weight: 600; }
.menu button.big { background: linear-gradient(90deg, var(--acc), #23a59b); color: #062421; font-size: 18px; border: none; }
.menu button small { opacity: 0.75; font-weight: 500; margin-left: 6px; }
button:hover:not(:disabled) { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.25); }
button:active:not(:disabled) { transform: scale(0.98); }
button:disabled { opacity: 0.4; cursor: default; }
.menu button.big:hover { background: linear-gradient(90deg, #45e0d4, #2ab5aa); }
h2 { margin: 6px 0 10px; font-size: 26px; }
h3 { margin: 18px 0 8px; font-size: 15px; color: var(--acc); text-transform: uppercase; letter-spacing: 0.06em; }
.muted { color: var(--mut); }
.small { font-size: 13px; }
.foot { display: flex; gap: 8px; justify-content: flex-end; margin: 22px 0 8px; flex-wrap: wrap; position: sticky; bottom: 0; padding: 10px 0; background: linear-gradient(180deg, rgba(10, 14, 18, 0), rgba(10, 14, 18, 0.9) 40%); }
.foot button { text-align: center; min-width: 110px; font-weight: 600; }
.foot .go { background: linear-gradient(90deg, var(--acc2), #ff6a1a); color: #251000; border: none; font-size: 17px; min-width: 160px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.card.map { min-height: 150px; display: flex; flex-direction: column; justify-content: flex-end; background-size: cover; background-position: center; background-color: #22303a; }
.card b { font-size: 18px; } .card span { color: var(--mut); font-size: 13px; } .card em { font-style: normal; color: #ffd24a; margin-top: 4px; }
.list { display: flex; flex-direction: column; gap: 8px; }
.item { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center; }
.item b { grid-column: 1; } .item span { grid-column: 1; color: var(--mut); font-size: 13px; } .item .stars { grid-column: 2; grid-row: 1 / span 2; }
.item .row { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; } .item .row button { padding: 6px 10px; text-align: center; }
.item.sel, .chip.sel, .ac.sel { border-color: var(--acc); background: rgba(49, 208, 196, 0.16); }
.item.locked { opacity: 0.5; } .item em { color: var(--mut); font-style: normal; font-size: 12px; }
.stars { color: #ffd24a; letter-spacing: 2px; font-size: 18px; white-space: nowrap; } .stars i { color: rgba(255, 255, 255, 0.18); font-style: normal; }
.diff { color: var(--acc2); font-size: 11px; letter-spacing: 1px; } .diff i { color: rgba(255, 255, 255, 0.2); font-style: normal; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 8px 12px; border-radius: 999px; font-size: 14px; }
.acs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.ac { display: flex; flex-direction: column; gap: 2px; align-items: center; text-align: center; padding: 8px; position: relative; }
.ac img { width: 110px; height: 110px; object-fit: contain; }
.ac b { font-size: 14px; } .ac span { font-size: 11px; color: var(--mut); } .ac em { position: absolute; top: 6px; right: 8px; font-style: normal; font-size: 12px; color: #ffd24a; }
.ac.locked img { filter: grayscale(1) brightness(0.6); }
.brief { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; }
.tip { color: #ffe08a; }
.detail { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; margin-top: 12px; }
.specs { columns: 2; font-size: 13px; color: var(--mut); padding-left: 18px; }
.rng { display: flex; align-items: center; gap: 10px; margin: 6px 0; font-size: 14px; } .rng input { flex: 1; accent-color: var(--acc); } .rng output { min-width: 56px; text-align: right; color: var(--mut); }
.txt { background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line); border-radius: 10px; color: var(--txt); padding: 10px 12px; font: inherit; text-transform: uppercase; width: min(260px, 100%); }
.link { background: none !important; border: none !important; color: var(--acc); text-decoration: underline; padding: 0 4px !important; }
.keys { border-collapse: collapse; font-size: 14px; } .keys td { padding: 3px 12px 3px 0; } .keys td:last-child { color: var(--acc); font-family: monospace; }
.sticks { display: flex; gap: 40px; justify-content: center; margin: 10px 0; }
.stickbox { text-align: center; } .stickbox .sb { width: 120px; height: 120px; border: 2px solid var(--line); border-radius: 16px; position: relative; background: rgba(0, 0, 0, 0.3); }
.stickbox .sb i { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 12px var(--acc); }
.stickbox .v { position: absolute; left: 50%; top: -2px; transform: translate(-50%, -100%); font-size: 12px; white-space: nowrap; color: var(--acc2); }
.stickbox .h { position: absolute; left: 50%; bottom: -4px; transform: translate(-50%, 100%); font-size: 12px; white-space: nowrap; color: var(--acc2); }
.stickbox b { display: block; margin-top: 24px; font-size: 13px; color: var(--mut); }
.axes div { display: flex; align-items: center; gap: 8px; margin: 4px 0; font-size: 13px; } .axes span { width: 70px; } .axes i { display: block; height: 10px; background: var(--acc); border-radius: 5px; transition: width 0.05s; }
.calstep { font-size: 18px; background: var(--panel); padding: 12px 16px; border-radius: 12px; border: 1px solid var(--acc); }
.help ul { padding-left: 20px; } .help li { margin: 4px 0; }
.ranks { padding-left: 0; list-style: none; } .ranks li { display: flex; gap: 10px; padding: 6px 10px; border-bottom: 1px solid var(--line); align-items: center; } .ranks span { margin-left: auto; font-family: monospace; color: var(--acc); } .ranks em { color: var(--mut); font-size: 12px; font-style: normal; }
.end-box h2.win { color: var(--good); font-size: 34px; } .end-box h2.lose { color: var(--bad); font-size: 30px; }
.end-box .stars { font-size: 40px; display: block; margin: 6px 0; }
.bigtime { font-size: 38px; font-weight: 800; font-family: monospace; margin: 6px 0; }
.new { color: #ffd24a; font-weight: 800; }
.online { margin: 10px 0; font-size: 14px; } .online .txt { width: 150px; padding: 6px 10px; } .online button { padding: 6px 12px; border-radius: 8px; background: var(--acc); color: #062421; border: none; font-weight: 700; }
.loading { min-height: 80vh; display: flex; flex-direction: column; justify-content: center; align-items: center; } #ld-msg { color: var(--mut); }
.toast { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%); background: var(--panel); border: 1px solid var(--acc); padding: 10px 18px; border-radius: 12px; z-index: 100; transition: opacity 0.4s; }
.toast.out { opacity: 0; }

/* HUD */
#hud { position: absolute; inset: 0; pointer-events: none; z-index: 10; font-weight: 600; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9); }
.h-left { position: absolute; left: max(14px, env(safe-area-inset-left)); top: max(12px, env(safe-area-inset-top)); max-width: min(46vw, 420px); }
.h-mission { font-size: 13px; color: var(--acc); text-transform: uppercase; letter-spacing: 0.05em; }
.h-goal { font-size: 17px; margin-top: 2px; }
.h-bar { width: 220px; height: 5px; background: rgba(255, 255, 255, 0.2); border-radius: 3px; margin-top: 6px; overflow: hidden; } .h-bar i { display: block; height: 100%; background: var(--acc); width: 0; transition: width 0.2s; }
.h-hint { font-size: 13px; color: #ffe08a; margin-top: 4px; }
.h-right { position: absolute; right: max(64px, env(safe-area-inset-right)); top: max(12px, env(safe-area-inset-top)); text-align: right; }
.h-time { font-size: 26px; font-family: ui-monospace, monospace; } .h-sub { font-size: 13px; color: var(--mut); }
.h-center { position: absolute; left: 0; right: 0; top: 22%; text-align: center; }
.h-big { font-size: clamp(40px, 9vw, 96px); font-weight: 900; opacity: 0; transform: scale(0.8); transition: opacity 0.2s, transform 0.2s; }
.h-big.show { opacity: 1; transform: scale(1); } .h-big.go { color: var(--good); } .h-big.bad { color: var(--bad); }
.h-msg { margin-top: 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.h-msg .m { background: rgba(0, 0, 0, 0.45); padding: 5px 14px; border-radius: 10px; font-size: 16px; transition: opacity 0.4s; max-width: 90vw; }
.h-msg .m.out { opacity: 0; } .h-msg .m.warn { color: #ffd24a; } .h-msg .m.bad { color: var(--bad); }
.h-tricks { position: absolute; right: 16px; top: 34%; text-align: right; font-size: 18px; } .h-tricks b { color: #ffd24a; } .h-tricks i { color: var(--acc); font-style: normal; }
.h-tutor { position: absolute; left: 50%; bottom: 16%; transform: translateX(-50%); width: min(620px, 92vw); background: rgba(10, 16, 22, 0.82); border: 1px solid var(--acc); border-radius: 14px; padding: 12px 16px; font-size: 16px; text-align: center; font-weight: 500; }
.h-tutor b { color: var(--acc2); }
.h-sticks { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; gap: 24px; }
.h-sticks .st { width: 84px; height: 84px; border: 2px solid rgba(255, 255, 255, 0.35); border-radius: 12px; position: relative; background: rgba(0, 0, 0, 0.3); }
.h-sticks i { position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px; border-radius: 50%; background: var(--acc); }
.h-sticks span { position: absolute; left: 50%; bottom: -18px; transform: translateX(-50%); font-size: 10px; white-space: nowrap; color: var(--mut); }
.h-tele { position: absolute; left: max(14px, env(safe-area-inset-left)); bottom: 14px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; background: rgba(8, 12, 16, 0.6); padding: 8px 12px; border-radius: 12px; font-size: 13px; max-width: min(92vw, 560px); }
.h-tele .mode { color: var(--acc); } .h-tele .armed { color: var(--good); } .h-tele .dis { color: var(--mut); } .h-tele .view { color: var(--mut); }
.h-tele .bat { position: relative; width: 90px; height: 14px; background: rgba(255, 255, 255, 0.15); border-radius: 4px; overflow: hidden; } .h-tele .bat i { position: absolute; inset: 0 auto 0 0; background: var(--good); }
.h-tele .bat.low i { background: var(--bad); } .h-tele .bat em { position: relative; font-style: normal; font-size: 10px; padding-left: 4px; line-height: 14px; }
.h-arrow { position: absolute; transform: translate(-50%, -50%); text-align: center; }
.h-arrow div { width: 0; height: 0; border-top: 12px solid transparent; border-bottom: 12px solid transparent; border-left: 22px solid var(--acc); filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.8)); margin: auto; }
.h-arrow span { font-size: 12px; }
.h-pause { position: absolute; right: max(12px, env(safe-area-inset-right)); top: max(10px, env(safe-area-inset-top)); width: 42px; height: 42px; border-radius: 50%; background: rgba(0, 0, 0, 0.45); border: 1px solid var(--line); pointer-events: auto; font-size: 14px; }

/* Touch */
#touch { position: absolute; inset: 0; z-index: 12; touch-action: none; user-select: none; -webkit-user-select: none; }
.t-base { position: absolute; width: calc(var(--t-r) * 2.3); height: calc(var(--t-r) * 2.3); margin: calc(var(--t-r) * -1.15) 0 0 calc(var(--t-r) * -1.15); border-radius: 50%; border: 2px solid rgba(255, 255, 255, calc(var(--t-op) * 0.8)); background: rgba(0, 0, 0, calc(var(--t-op) * 0.35)); }
.t-knob { position: absolute; left: 50%; top: 50%; width: calc(var(--t-r) * 0.9); height: calc(var(--t-r) * 0.9); margin: calc(var(--t-r) * -0.45); border-radius: 50%; background: rgba(49, 208, 196, var(--t-op)); box-shadow: 0 0 14px rgba(49, 208, 196, 0.5); }
.t-lbl { position: absolute; left: 50%; bottom: -20px; transform: translateX(-50%); font-size: 11px; color: rgba(255, 255, 255, 0.7); white-space: nowrap; }
.t-btns { position: absolute; left: 50%; bottom: max(10px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; max-width: 46vw; }
.t-btns button { min-width: 56px; padding: 9px 8px; border-radius: 12px; background: rgba(0, 0, 0, calc(var(--t-op) * 0.8)); border: 1px solid rgba(255, 255, 255, 0.3); font-size: 13px; font-weight: 600; }
.t-btns button.on { background: rgba(49, 208, 196, 0.6); }

/* Editor */
.ed-bar { position: absolute; left: 0; right: 0; top: 0; z-index: 15; display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; background: rgba(10, 14, 18, 0.85); border-bottom: 1px solid var(--line); align-items: center; }
.ed-bar button, .ed-panel button { padding: 7px 10px; border-radius: 9px; background: rgba(255, 255, 255, 0.07); border: 1px solid var(--line); font-size: 13px; }
.ed-bar button.sel, .ed-panel button.sel { border-color: var(--acc); background: rgba(49, 208, 196, 0.2); }
.ed-bar input { background: rgba(0, 0, 0, 0.4); border: 1px solid var(--line); border-radius: 8px; color: var(--txt); padding: 6px 8px; width: 160px; }
.ed-panel { position: absolute; left: 8px; top: 60px; bottom: 8px; width: 210px; overflow-y: auto; z-index: 15; background: rgba(10, 14, 18, 0.85); border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.ed-panel h4 { margin: 10px 0 4px; font-size: 12px; color: var(--acc); text-transform: uppercase; }
.ed-panel .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.ed-props { position: absolute; right: 8px; top: 60px; width: 230px; z-index: 15; background: rgba(10, 14, 18, 0.88); border: 1px solid var(--line); border-radius: 12px; padding: 10px; font-size: 13px; }
.ed-props button { padding: 6px 10px; border-radius: 8px; background: rgba(255, 255, 255, 0.08); border: 1px solid var(--line); font-size: 13px; color: var(--txt); }
.ed-props select { background: rgba(0, 0, 0, 0.4); color: var(--txt); border: 1px solid var(--line); border-radius: 6px; }
.ed-bar select { background: rgba(0, 0, 0, 0.4); color: var(--txt); border: 1px solid var(--line); border-radius: 8px; padding: 6px; }
.ed-props label { display: flex; justify-content: space-between; gap: 6px; margin: 4px 0; align-items: center; } .ed-props input { width: 90px; background: rgba(0, 0, 0, 0.4); border: 1px solid var(--line); color: var(--txt); border-radius: 6px; padding: 4px; }
.ed-help { position: absolute; right: 8px; bottom: 8px; z-index: 15; background: rgba(10, 14, 18, 0.8); border-radius: 10px; padding: 8px 12px; font-size: 12px; color: var(--mut); max-width: 340px; }
@media (max-width: 700px) { .ed-panel { width: 150px; } .ed-props { width: 180px; } .specs { columns: 1; } .h-goal { font-size: 15px; } .h-time { font-size: 20px; } }
/* Titel: auf breiten Fenstern links, damit die schwebende Drohne rechts zu sehen ist */
@media (min-width: 821px) and (min-aspect-ratio: 23/20) {
  .screen.title { justify-content: flex-start; padding-left: max(3vw, 16px); }
  #ui:has(.screen.title) { background: linear-gradient(90deg, rgba(8, 12, 16, 0.55), rgba(8, 12, 16, 0.05) 60%); }
}
