:root {
  --bg: #08090d;
  --bg-2: #0e1017;
  --surface: #141721;
  --surface-2: #1b1f2c;
  --line: #262b3a;
  --text: #f1f3f8;
  --muted: #9aa2b5;
  --accent: #ffb02e;
  --accent-ink: #1a1200;
  --ok: #3fdc9a;
  --warn: #ffc857;
  --bad: #ff6b6b;
  --radius: 16px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.accent-green   { --accent: #3fdc9a; --accent-ink: #00241a; }
.accent-magenta { --accent: #ff4fa3; --accent-ink: #2b0016; }
.accent-amber   { --accent: #ffb02e; --accent-ink: #1a1200; }
.accent-blue    { --accent: #58a6ff; --accent-ink: #001c3a; }
.accent-violet  { --accent: #a78bfa; --accent-ink: #160a3a; }
.accent-red     { --accent: #ff6b6b; --accent-ink: #2b0000; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); min-height: 100vh; display: flex; flex-direction: column; -webkit-font-smoothing: antialiased; }
main { flex: 1; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 750; }
h2 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0 0 1em; }
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(460px, 100% - 32px); }
.center { text-align: center; }
.pad { padding-block: clamp(40px, 8vw, 88px); }
.pad-top { padding-top: clamp(32px, 6vw, 56px); }
.muted { color: var(--muted); }
.lead { color: var(--muted); font-size: clamp(1.05rem, 2.2vw, 1.25rem); }
.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: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* Kopf */
.top { position: sticky; top: 0; z-index: 20; background: rgba(8, 9, 13, .78); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid rgba(255, 255, 255, .06); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; letter-spacing: -.01em; min-width: 0; }
.brand img { border-radius: 7px; flex: none; }
.brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 16px; font-size: .95rem; 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: 10px 20px; border: 1px solid transparent; border-radius: 12px; background: var(--accent); color: var(--accent-ink); font: 600 1rem var(--font); text-decoration: none; cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 26px -8px var(--accent); }
.btn:active { transform: none; }
.btn-small { min-height: 36px; padding: 6px 14px; font-size: .9rem; border-radius: 10px; }
.btn-big { min-height: 52px; padding: 12px 26px; font-size: 1.05rem; }
.btn-wide { width: 100%; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); box-shadow: none; }
.btn-danger { background: var(--bad); color: #2b0000; }
.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); }

/* Bühne */
.hero, .app-hero { position: relative; overflow: hidden; isolation: isolate; }
.hero { padding-block: clamp(72px, 13vw, 150px) clamp(56px, 9vw, 100px); }
.hero-in { position: relative; }
.hero h1 { font-size: clamp(2.4rem, 7vw, 4.6rem); font-weight: 800; max-width: 15em; letter-spacing: -.035em; line-height: 1.04; }
.hero .lead { max-width: 34em; }
.eyebrow { color: var(--accent); font-weight: 700; font-size: .85rem; letter-spacing: .14em; text-transform: uppercase; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.beams { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.beams::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 55%, var(--bg)); }
.beams i { position: absolute; top: -30%; left: var(--x); width: 34vw; min-width: 260px; height: 150%; transform-origin: 50% 0; transform: rotate(var(--r)); background: linear-gradient(to bottom, var(--c), transparent 72%); clip-path: polygon(46% 0, 54% 0, 100% 100%, 0 100%); filter: blur(22px); opacity: .34; mix-blend-mode: screen; animation: sway var(--t) ease-in-out infinite alternate; }
.beams i:nth-child(1) { --x: -6%; --r: -16deg; --c: #ff4fa3; --t: 11s; }
.beams i:nth-child(2) { --x: 24%; --r: 9deg; --c: #ffb02e; --t: 14s; }
.beams i:nth-child(3) { --x: 52%; --r: -8deg; --c: #58a6ff; --t: 12s; }
.beams i:nth-child(4) { --x: 76%; --r: 14deg; --c: #3fdc9a; --t: 16s; }
.beams-soft i { opacity: .3; }
.beams-soft i:nth-child(1) { --x: 8%; --c: var(--accent); }
.beams-soft i:nth-child(2) { --x: 58%; --c: var(--accent); }
@keyframes sway { from { transform: rotate(calc(var(--r) - 7deg)); } to { transform: rotate(calc(var(--r) + 7deg)); } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .beams i { animation: none; }
  .btn, .card { transition: none; }
}

/* Karten */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 16px; }
.card { position: relative; display: flex; flex-direction: column; padding: 22px; min-height: 248px; background: linear-gradient(170deg, var(--surface-2), var(--surface) 60%); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; overflow: hidden; transition: transform .2s ease, border-color .2s ease; }
.card::before { content: ""; position: absolute; inset: -40% -20% auto; height: 70%; background: radial-gradient(closest-side, var(--accent), transparent); opacity: 0; transition: opacity .3s ease; pointer-events: none; }
.card:hover { transform: translateY(-4px); border-color: var(--accent); }
.card:hover::before { opacity: .2; }
.card > * { position: relative; }
.card h2 { margin-top: 18px; margin-bottom: 6px; font-size: 1.3rem; }
.card p { color: var(--muted); margin-bottom: 18px; }
.card-more { margin-top: auto; color: var(--accent); font-size: .9rem; font-weight: 600; }
.card-soon .icon { filter: grayscale(.5); opacity: .75; }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.icon { width: 72px; height: 72px; border-radius: 18px; flex: none; object-fit: cover; }
.icon-letter { display: inline-grid; place-items: center; background: linear-gradient(145deg, var(--accent), var(--surface-2)); color: var(--bg); font-size: 2rem; font-weight: 800; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); font-size: .78rem; font-weight: 600; white-space: nowrap; }
.pill-on { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.pill-lock { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }

/* Schritte */
.steps-sec { padding-block: clamp(56px, 9vw, 96px) 24px; }
.sec-title { font-size: clamp(1.5rem, 3.5vw, 2rem); }
.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; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 8px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line); color: var(--accent); font-weight: 700; }
.steps span { color: var(--muted); }

/* App-Seite */
.app-hero { padding-block: 28px 44px; }
.back { display: inline-block; margin-bottom: 26px; color: var(--muted); text-decoration: none; font-size: .95rem; }
.back:hover { color: var(--text); }
.app-title { display: flex; align-items: center; gap: 20px; }
.app-title .icon { width: 96px; height: 96px; border-radius: 22px; box-shadow: 0 18px 50px -18px var(--accent); }
.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: 1.08rem; max-width: 40em; }
.notes { color: var(--muted); font-size: 1rem; }
.sub { margin-top: 36px; }
.features { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 10px; }
.features li { position: relative; padding-left: 26px; }
.features li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.shots { display: grid; gap: 14px; margin: 24px 0; }
.shots figure { margin: 0; }
.shots img { border-radius: 12px; border: 1px solid var(--line); width: 100%; }
.shots figcaption { margin-top: 6px; color: var(--muted); font-size: .9rem; }
.panel { position: sticky; top: 80px; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.panel h2 { margin-bottom: 6px; }
.panel .btn-wide { margin-bottom: 0; }
.lock-mark { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 12px; border-radius: 13px; background: var(--surface-2); color: var(--warn); }
.dl-list { display: grid; gap: 10px; margin: 14px 0; }
.dl { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); text-decoration: none; transition: border-color .2s ease; }
.dl:hover { border-color: var(--accent); }
.dl span { display: grid; }
.dl small { color: var(--muted); }
.dl.is-best { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.dl.is-best small { color: inherit; opacity: .75; }
.hint { color: var(--muted); font-size: .86rem; }
.hashes summary { color: var(--muted); font-size: .88rem; cursor: pointer; }
.hashes p { margin: 8px 0 0; }
.hashes small { display: block; color: var(--muted); }
.hashes code { font-size: .72rem; word-break: break-all; }
@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: .9rem; color: var(--muted); }
input, select, textarea { width: 100%; min-height: 44px; padding: 10px 12px; color: var(--text); background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; 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: 18px; height: 18px; min-height: 0; flex: none; margin: 2px 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: 10px; align-items: flex-start; color: var(--text); font-size: .95rem; }
.check a { color: var(--accent); }
.trap { position: absolute; left: -9999px; height: 0; overflow: hidden; }
fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 0; display: grid; gap: 8px; }
legend { padding: 0 6px; color: var(--muted); font-size: .88rem; }
.checks { display: grid; gap: 6px; padding-left: 28px; }
.short { padding-left: 28px; max-width: 170px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 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 190px; font-family: var(--mono); letter-spacing: .04em; text-transform: uppercase; }
.code-row input::placeholder { text-transform: none; color: #5d6577; }
.auth { padding: clamp(24px, 5vw, 36px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.auth h1 { font-size: 1.8rem; }
.alt { margin: 14px 0 0; color: var(--muted); font-size: .95rem; 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: 10px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); margin-bottom: 10px; }
.flash a { color: inherit; }
.flash-ok { border-color: color-mix(in srgb, var(--ok) 45%, transparent); color: var(--ok); }
.flash-error { border-color: color-mix(in srgb, var(--bad) 50%, transparent); color: var(--bad); }
.flash-warn { border-color: color-mix(in srgb, var(--warn) 45%, 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: 600; 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: 10px 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 .icon { width: 40px; height: 40px; border-radius: 10px; }
.row-app .icon-letter { font-size: 1.1rem; }
.admin-shell { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 32px; padding-block: 32px 64px; }
.admin-nav { display: grid; gap: 2px; align-content: start; position: sticky; top: 80px; }
.admin-nav a { padding: 8px 12px; border-radius: 9px; 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: 1.9rem; overflow-wrap: anywhere; }
.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(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.stat b { display: block; font-size: 2rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: .9rem; }
.tbl { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th { text-align: left; color: var(--muted); font-weight: 600; white-space: nowrap; }
th, td { padding: 9px 10px; 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; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.off { opacity: .5; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.actions form { margin: 0; }
.publish { display: grid; gap: 10px; margin-top: 12px; justify-items: start; }
.once { padding: 18px 20px; margin-bottom: 16px; border: 1px solid var(--ok); border-radius: var(--radius); background: color-mix(in srgb, var(--ok) 8%, var(--surface)); }
.once pre { margin: 0 0 10px; padding: 12px; background: var(--bg-2); border-radius: 10px; overflow-x: auto; font-size: .98rem; line-height: 1.7; user-select: all; }
.once p { margin-bottom: 8px; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 16px; }
.thumbs figure { margin: 0; }
.thumbs img { border-radius: 8px; border: 1px solid var(--line); margin-bottom: 4px; }

/* Fuß */
.foot { border-top: 1px solid rgba(255, 255, 255, .06); margin-top: 48px; color: var(--muted); font-size: .9rem; }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; padding-block: 22px; }
.foot nav { display: flex; gap: 18px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--text); }
