/*
 * apps.nbskyview.com
 * Gestaltung nach unslop von Damir Sokolovsky (＠heydamir), CC BY 4.0
 * Graphit, Haarlinien, drei Textstufen, ein Akzent. Keine Verläufe, kein Leuchten, 4-px-Raster.
 */
:root {
  --bg: #141415;
  --bg-2: #101011;
  --surface: #19191b;
  --surface-2: #232325;
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .14);
  --text: #ededed;
  --muted: #a1a1a6;
  --faint: #85858b;
  --accent: #4aa8d8;
  --primary: #ededed;
  --primary-ink: #141415;
  --ok: #5fbf8f;
  --warn: #d9a441;
  --bad: #e5675f;
  --radius: 12px;
  --radius-s: 8px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}
/* Jede App behält ihre Farbe, als flache Marke ohne Verlauf und Leuchten */
.accent-green   { --accent: #4cc38a; }
.accent-magenta { --accent: #e5609d; }
.accent-amber   { --accent: #e0a23a; }
.accent-blue    { --accent: #4aa8d8; }
.accent-violet  { --accent: #9b87e8; }
.accent-red     { --accent: #e5675f; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.5 var(--font); min-height: 100vh; display: flex; flex-direction: column; -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
main { flex: 1; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 8px; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: clamp(28px, 4vw, 36px); }
h2 { font-size: 20px; }
p { margin: 0 0 16px; }
a { color: inherit; }
img { max-width: 100%; display: block; }
code, pre { font-family: var(--mono); }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(440px, 100% - 32px); }
.center { text-align: center; }
.pad { padding-block: clamp(40px, 8vw, 80px); }
.pad-top { padding-top: clamp(32px, 6vw, 56px); }
.muted { color: var(--muted); }
.lead { color: var(--muted); font-size: 18px; }
.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 50; background: var(--text); color: var(--bg); padding: 8px 12px; border-radius: var(--radius-s); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* Kopf */
.top { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 600; text-decoration: none; min-width: 0; }
.brand img { border-radius: 6px; flex: none; }
.brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 16px; font-size: 15px; flex: none; }
.nav a:not(.btn) { color: var(--muted); text-decoration: none; }
.nav a:not(.btn):hover { color: var(--text); }
.nav form { margin: 0; }
@media (max-width: 560px) {
  .brand span { display: none; }
  .nav { gap: 12px; }
}

/* Knöpfe */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 20px; border: 1px solid transparent; border-radius: var(--radius-s); background: var(--primary); color: var(--primary-ink); font: 500 15px var(--font); text-decoration: none; cursor: pointer; transition: background-color .15s ease, border-color .15s ease; }
.btn:hover { background: #ffffff; }
.btn-small { min-height: 36px; padding: 4px 12px; font-size: 14px; }
.btn-big { min-height: 48px; padding: 12px 24px; font-size: 16px; }
.btn-wide { width: 100%; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: transparent; color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
.btn-danger:hover { background: color-mix(in srgb, var(--bad) 12%, transparent); }
.linkbtn { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.linkbtn:hover { color: var(--text); }

/* Kopfbereich der Seiten: ruhig, ohne Lichtkegel */
.hero, .app-hero { position: relative; }
.hero { padding-block: clamp(56px, 10vw, 112px) clamp(40px, 7vw, 72px); }
.hero h1 { font-size: clamp(36px, 6vw, 56px); font-weight: 600; max-width: 16em; letter-spacing: -.02em; line-height: 1.08; margin-bottom: 16px; }
.hero .lead { max-width: 34em; }
.eyebrow { display: flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 500; font-size: 14px; margin-bottom: 16px; }
.eyebrow::before { content: ""; width: 24px; height: 3px; border-radius: 2px; background: #e0a23a; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.beams { display: none; }

/* Karten */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 248px), 1fr)); gap: 16px; }
.card { position: relative; display: flex; flex-direction: column; padding: 20px; min-height: 240px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; transition: border-color .15s ease, background-color .15s ease; }
.card::before { content: ""; position: absolute; top: -1px; left: 20px; width: 32px; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
.card:hover { border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: var(--surface-2); }
.card h2 { margin-top: 16px; margin-bottom: 4px; font-size: 20px; }
.card p { color: var(--muted); margin-bottom: 16px; }
.card-more { margin-top: auto; color: var(--accent); font-size: 14px; font-weight: 500; }
.card-soon .icon { opacity: .6; }
.card-soon h2 { color: var(--muted); }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.icon { width: 64px; height: 64px; border-radius: 16px; flex: none; object-fit: cover; }
.icon-letter { display: inline-grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); font-size: 28px; font-weight: 600; }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; background: transparent; border: 1px solid var(--line-strong); color: var(--muted); font-size: 12px; font-weight: 500; white-space: nowrap; }
.pill-on { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.pill-lock { color: #e0a23a; border-color: color-mix(in srgb, #e0a23a 35%, transparent); }

/* Schritte */
.steps-sec { padding-block: clamp(48px, 8vw, 88px) 24px; }
.sec-title { font-size: clamp(24px, 3vw, 28px); }
.steps { list-style: none; counter-reset: s; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 24px; }
.steps li { counter-increment: s; display: grid; gap: 4px; padding-top: 16px; border-top: 1px solid var(--line); }
.steps li::before { content: counter(s); color: #e0a23a; font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.steps b { font-weight: 600; }
.steps span { color: var(--muted); }

/* App-Seite */
.app-hero { padding-block: 24px 40px; }
.back { display: inline-block; margin-bottom: 24px; color: var(--muted); text-decoration: none; font-size: 15px; }
.back:hover { color: var(--text); }
.app-title { display: flex; align-items: center; gap: 20px; }
.app-title .icon { width: 88px; height: 88px; border-radius: 20px; }
.app-title h1 { margin-bottom: 4px; }
.app-title .lead { margin: 0; }
.app-body { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; padding-bottom: 64px; }
.prose { font-size: 17px; max-width: 40em; color: var(--text); }
.notes { color: var(--muted); font-size: 16px; }
.sub { margin-top: 40px; font-size: 18px; }
.features { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 8px; }
.features li { position: relative; padding-left: 20px; color: var(--text); }
.features li::before { content: ""; position: absolute; left: 2px; top: .6em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.shots { display: grid; gap: 16px; margin: 24px 0; }
.shots figure { margin: 0; }
.shots img { border-radius: var(--radius); border: 1px solid var(--line); width: 100%; }
.shots figcaption { margin-top: 8px; color: var(--muted); font-size: 14px; }
.panel { position: sticky; top: 80px; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-top: 2px solid var(--accent); border-radius: var(--radius); }
.panel h2 { margin-bottom: 4px; }
.lock-mark { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 12px; border-radius: var(--radius-s); background: color-mix(in srgb, var(--accent) 14%, var(--surface-2)); color: var(--accent); }
.dl-list { display: grid; gap: 8px; margin: 16px 0; }
.dl { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface-2); text-decoration: none; transition: border-color .15s ease; }
.dl:hover { border-color: var(--line-strong); }
.dl span { display: grid; }
.dl small { color: var(--muted); }
.dl.is-best { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.dl.is-best small { color: inherit; opacity: .7; }
.hint { color: var(--faint); font-size: 14px; }
.hashes summary { color: var(--muted); font-size: 14px; cursor: pointer; }
.hashes p { margin: 8px 0 0; }
.hashes small { display: block; color: var(--muted); }
.hashes code { font-size: 12px; word-break: break-all; color: var(--muted); }
@media (max-width: 860px) {
  .app-body { grid-template-columns: 1fr; gap: 28px; }
  .panel { position: static; order: -1; }
}
@media (max-width: 480px) {
  .app-title { flex-direction: column; align-items: flex-start; }
}

/* Formulare */
label { display: block; margin: 0 0 4px; font-size: 14px; color: var(--muted); }
input, select, textarea { width: 100%; min-height: 44px; padding: 8px 12px; color: var(--text); background: var(--bg-2); border: 1px solid var(--line-strong); border-radius: var(--radius-s); font: inherit; }
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
input[type=checkbox], input[type=radio] { width: 16px; height: 16px; min-height: 0; flex: none; margin: 4px 0 0; accent-color: var(--accent); }
input[type=file] { padding: 8px; }
.form { display: grid; gap: 8px; }
.form > .btn, .form > .check, .form > fieldset, .form > .form-grid { margin-top: 8px; }
.form > .btn:not(.btn-wide) { justify-self: start; }
.form input + label, .form textarea + label, .form select + label { margin-top: 8px; }
.check { display: flex; gap: 8px; align-items: flex-start; color: var(--text); font-size: 15px; }
.check a { color: var(--accent); }
.trap { position: absolute; left: -9999px; height: 0; overflow: hidden; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 12px 16px; margin: 0; display: grid; gap: 8px; }
legend { padding: 0 4px; color: var(--muted); font-size: 14px; }
.checks { display: grid; gap: 4px; padding-left: 24px; }
.short { padding-left: 24px; max-width: 168px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(188px, 1fr)); gap: 12px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(188px, 1fr)); gap: 12px; align-items: end; }
.inline-form { display: flex; gap: 8px; margin-bottom: 16px; }
.box .inline-form { margin-bottom: 0; }
.code-form label { margin-top: 12px; }
.code-row { display: flex; gap: 8px; flex-wrap: wrap; }
.code-row input { flex: 1 1 188px; font-family: var(--mono); text-transform: uppercase; }
.code-row input::placeholder { text-transform: none; color: var(--faint); }
.auth { padding: clamp(24px, 5vw, 32px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.auth h1 { font-size: 28px; }
.alt { margin: 12px 0 0; color: var(--muted); font-size: 15px; text-align: center; }
.alt a { color: var(--accent); }
.prose-page h2 { margin-top: 28px; }
.prose-page a { color: var(--accent); }
.prose-page { width: min(680px, 100% - 32px); }

/* Meldungen */
.flashes { padding-top: 16px; }
.flash { padding: 8px 12px; border-radius: var(--radius-s); border: 1px solid var(--line-strong); background: var(--surface); margin-bottom: 8px; }
.flash a { color: inherit; }
.flash-ok { border-color: color-mix(in srgb, var(--ok) 40%, transparent); color: var(--ok); }
.flash-error { border-color: color-mix(in srgb, var(--bad) 45%, transparent); color: var(--bad); }
.flash-warn { border-color: color-mix(in srgb, var(--warn) 40%, transparent); color: var(--warn); }

/* Konto und Admin */
.two-col { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 16px; align-items: start; padding-block: 16px 64px; }
.box { padding: 20px; margin-bottom: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.box summary { font-weight: 500; cursor: pointer; }
details.box[open] summary { margin-bottom: 12px; }
.danger summary { color: var(--bad); }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.rows li:first-child { border-top: 0; }
.rows form { margin: 0; }
.row-app { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.row-app b { font-weight: 500; }
.rows li[class*="accent-"] .row-app { border-left: 2px solid var(--accent); padding-left: 10px; }
.row-app .icon { width: 40px; height: 40px; border-radius: 10px; }
.row-app .icon-letter { font-size: 16px; }
.admin-shell { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 32px; padding-block: 32px 64px; }
.admin-nav { display: grid; gap: 4px; align-content: start; position: sticky; top: 80px; }
.admin-nav a { padding: 8px 12px; border-radius: var(--radius-s); color: var(--muted); text-decoration: none; }
.admin-nav a:hover { color: var(--text); background: var(--surface); }
.admin-nav a[aria-current] { color: var(--text); background: var(--surface-2); }
.admin-main h1 { font-size: 28px; overflow-wrap: anywhere; margin-bottom: 20px; }
.admin-main h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
@media (max-width: 760px) {
  .admin-shell { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .admin-nav { position: static; display: flex; overflow-x: auto; }
  .admin-nav a { white-space: nowrap; }
}
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { padding: 16px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.stat b { display: block; font-size: 28px; font-weight: 600; line-height: 1.2; }
.stat span { color: var(--muted); font-size: 14px; }
.tbl { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { text-align: left; color: var(--faint); font-weight: 500; white-space: nowrap; }
th, td { padding: 8px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td a { color: var(--accent); }
td form { margin: 0; }
.num { text-align: right; white-space: nowrap; }
tr.off { opacity: .5; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.actions form { margin: 0; }
.publish { display: grid; gap: 12px; margin-top: 12px; justify-items: start; }
.once { padding: 16px 20px; margin-bottom: 16px; border: 1px solid color-mix(in srgb, var(--ok) 40%, transparent); border-radius: var(--radius); background: var(--surface); }
.once pre { margin: 0 0 12px; padding: 12px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-s); overflow-x: auto; font-size: 15px; line-height: 1.7; user-select: all; }
.once p { margin-bottom: 8px; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 12px; margin-bottom: 16px; }
.thumbs figure { margin: 0; }
.thumbs img { border-radius: var(--radius-s); border: 1px solid var(--line); margin-bottom: 4px; }

/* Fuß */
.foot { border-top: 1px solid var(--line); margin-top: 48px; color: var(--faint); font-size: 14px; }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; padding-block: 24px; }
.foot nav { display: flex; gap: 20px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--text); }

.portal-link { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }

/* Frei verfügbare App: ruhig hervorgehoben, ohne Lichtrand */
.card-free { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.card-free .card-more { color: var(--text); }

/* Apps außer der Toolbox: nur Info, kein Download auf der Webseite */
.dl-info, .dl-info:hover { border-color: var(--line); cursor: default; }
.dl-info svg { color: var(--ok); }
.toolbox-note { margin-top: 8px; }
.toolbox-note .pill { margin-bottom: 4px; }

/* Rechtstexte */
.legal { width: min(760px, 100% - 32px); }
.legal h1 { font-size: clamp(28px, 4vw, 36px); }
.legal h2 { font-size: 18px; margin-top: 32px; }
.legal p, .legal li { color: var(--muted); overflow-wrap: anywhere; }
.legal strong { color: var(--text); font-weight: 600; }
.legal ul { padding-left: 20px; margin: 0 0 16px; }
.legal li { margin-bottom: 8px; }
.legal code { font-size: .9em; background: var(--surface-2); padding: 0 4px; border-radius: 4px; }
.legal-tbl { margin: 0 0 16px; border: 1px solid var(--line); border-radius: var(--radius); }
.legal-tbl td, .legal-tbl th { vertical-align: top; }
.legal-tbl td:first-child { color: var(--text); min-width: 11em; }

@media (prefers-reduced-motion: reduce) {
  .btn, .card, .dl { transition: none; }
}
