:root {
  --c: #0E5A6B; --c2: #0A4452; --light: #E3F1F3; --acc: #F2A541; --ok: #1E7B3A; --bad: #B3261E;
  --bg: #F6F9FA; --fg: #14232A; --muted: #4B5D64; --card: #FFFFFF; --line: #C9D7DB;
  --r: 14px; font-size: 17px;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0E1A1E; --fg: #E8F0F2; --muted: #A9BCC2; --card: #16262B; --line: #2C4249; --light: #1C3238; --c: #5FB3C5; --c2: #8ACFDD; --ok: #6FCF8A; --bad: #FF8A80; }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; background: var(--bg); color: var(--fg); line-height: 1.5; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--c); }
:focus-visible { outline: 3px solid var(--acc); outline-offset: 2px; }
[hidden] { display: none !important; }

/* Hintergrund nur auf Start- und Sperrseite */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: linear-gradient(135deg, #0E5A6B 0%, #134E5E 45%, #1B6F7F 100%); opacity: 0; transition: opacity .4s; }
body.hero-on .bg { opacity: 1; }
.blob { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(70px); opacity: .55; animation: drift 22s ease-in-out infinite alternate; }
.b1 { background: #F2A541; left: -20vmax; top: -25vmax; }
.b2 { background: #3FA7B9; right: -25vmax; top: 10vmax; animation-duration: 28s; }
.b3 { background: #E3F1F3; left: 10vmax; bottom: -35vmax; opacity: .35; animation-duration: 34s; }
@keyframes drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(8vmax, 6vmax) scale(1.15); } }
@media (prefers-reduced-motion: reduce) { .blob { animation: none; } * { transition: none !important; } }

.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; padding: .7rem 1rem; background: var(--card); border-bottom: 1px solid var(--line); }
body.hero-on .top { background: transparent; border-color: transparent; }
.logo { display: flex; align-items: baseline; gap: .6rem; text-decoration: none; color: inherit; }
.metal { font-weight: 900; font-size: 1.6rem; letter-spacing: .02em; background: linear-gradient(100deg, #8FA3A9 0%, #FFFFFF 30%, #7C9096 50%, #F4F7F8 70%, #9AAEB3 100%); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 6s linear infinite; }
body:not(.hero-on) .metal { background: none; color: var(--c); animation: none; }
@keyframes shine { to { background-position: -200% 0; } }
.logo-sub { font-size: .85rem; color: var(--muted); }
body.hero-on .logo-sub { color: #E3F1F3; }
.nav { display: flex; flex-wrap: wrap; gap: .3rem; }
.nav a { padding: .45rem .7rem; border-radius: 999px; text-decoration: none; color: var(--fg); font-size: .95rem; }
.nav a.on { background: var(--c); color: #fff; }
body.hero-on .nav a { color: #fff; }

main:focus, main:focus-visible { outline: none; }
main { flex: 1; width: 100%; max-width: 980px; margin: 0 auto; padding: 1rem; outline: none; }
.hero { min-height: 70vh; display: grid; place-items: center; }
.glass { background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.35); border-radius: 22px; backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%); box-shadow: 0 10px 40px rgba(0,0,0,.18); color: #fff; padding: 1.5rem; }
.lockbox { max-width: 460px; width: 100%; }
.lockbox h1 { margin-top: 0; font-size: 1.6rem; }
.lockbox label { display: block; font-weight: 600; margin: .6rem 0 .3rem; }
.lockbox input { width: 100%; font-size: 1.2rem; padding: .7rem .8rem; border-radius: 10px; border: 1px solid rgba(255,255,255,.6); background: rgba(255,255,255,.92); color: #14232A; letter-spacing: .06em; }
.lockbox .btn { margin-top: .8rem; width: 100%; }
.msg { min-height: 1.5em; font-weight: 600; }
.small { font-size: .88rem; opacity: .9; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 46px; padding: .55rem 1.1rem; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--fg); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn.primary { background: var(--acc); border-color: var(--acc); color: #1B1300; }
.btn.alt { background: var(--c); border-color: var(--c); color: #fff; }
@media (prefers-color-scheme: dark) { .btn.alt { color: #0E1A1E; } }
.btn:disabled { opacity: .5; cursor: default; }
.row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }

h1 { font-size: 1.7rem; line-height: 1.25; }
h2 { font-size: 1.3rem; margin-top: 1.6rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem 1.1rem; margin: .8rem 0; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .9rem; margin-top: 1rem; }
.tile { display: block; text-decoration: none; color: #fff; min-height: 120px; }
.tile h2 { margin: 0 0 .3rem; font-size: 1.15rem; }
.tile p { margin: 0; font-size: .93rem; }
.count { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin: 1rem 0; }
.count div { text-align: center; }
.count b { display: block; font-size: 1.8rem; }
.homehead { color: #fff; }
.homehead h1 { margin-bottom: .2rem; }

.pill { display: inline-block; padding: .1rem .55rem; border-radius: 999px; background: var(--light); font-size: .82rem; font-weight: 600; }
.ok { color: var(--ok); } .bad { color: var(--bad); }
.fb { margin-top: .8rem; padding: .8rem; border-radius: 10px; background: var(--light); }
.fb.ok { border-left: 0; }
.q { font-size: 1.15rem; font-weight: 600; margin: .4rem 0 .8rem; }
.answer { display: flex; gap: .5rem; flex-wrap: wrap; }
.answer input { flex: 1 1 180px; min-height: 46px; font-size: 1.1rem; padding: .5rem .7rem; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); }
.unit { align-self: center; color: var(--muted); }
.opts { display: grid; gap: .5rem; }
.opts .btn { justify-content: flex-start; text-align: left; }
.opts .btn.sel-ok { background: #DDF3E3; border-color: var(--ok); color: #0B3B19; }
.opts .btn.sel-bad { background: #FBE0DE; border-color: var(--bad); color: #5C0F0A; }
.grid200 { display: grid; grid-template-columns: repeat(auto-fill, minmax(30px, 1fr)); gap: 4px; margin-top: .6rem; }
.grid200 button { min-height: 30px; border-radius: 6px; border: 1px solid var(--line); background: var(--card); color: var(--muted); font-size: .7rem; cursor: pointer; padding: 0; }
.grid200 .r { background: #CDEBD6; color: #0B3B19; border-color: #8CCB9F; }
.grid200 .f { background: #F6CFCB; color: #5C0F0A; border-color: #E59A93; }
select, .field input { min-height: 44px; font: inherit; padding: .35rem .5rem; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--fg); }
.field { display: flex; flex-direction: column; gap: .2rem; margin: .4rem 0; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; }

.flash { min-height: 190px; display: grid; place-items: center; text-align: center; font-size: 1.25rem; cursor: pointer; user-select: none; }
.flash .back { font-size: 1.05rem; color: var(--muted); margin-top: .7rem; }
.bar { height: 10px; background: var(--light); border-radius: 999px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--c); width: 0; }

table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { border: 1px solid var(--line); padding: .45rem .5rem; text-align: left; vertical-align: top; }
th { background: var(--light); }
.plan td label { display: flex; gap: .45rem; align-items: flex-start; cursor: pointer; }
.plan input[type=checkbox] { width: 20px; height: 20px; margin-top: .15rem; flex: none; }
.tablewrap { overflow-x: auto; }

.track { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem; }
.track h3 { margin: 0; font-size: 1.02rem; }
.track .meta { color: var(--muted); font-size: .88rem; }
.player { margin-top: .7rem; }
.player audio { width: 100%; }
.status { font-weight: 600; margin: .5rem 0; }

.foot { text-align: center; font-size: .85rem; color: var(--muted); padding: 1rem; }
body.hero-on .foot { color: #E3F1F3; }
body.hero-on .foot a { color: #fff; }
.noscript { text-align: center; padding: 1rem; }
.doc { max-width: 720px; }
@media (max-width: 520px) {
  table { font-size: .86rem; } th, td { padding: .35rem .3rem; }
  :root { font-size: 16px; }
  .count b { font-size: 1.4rem; }
  .nav a { padding: .4rem .55rem; font-size: .9rem; }
}
