:root {
  --night: #1a1320;
  --night-2: #241a2c;
  --film: #0e0a12;
  --cream: #f1e6d0;
  --muted: #a8999b;
  --ochre: #d9a35b;
  --rust: #a8512f;
  --storm: #c2402d;
  --line: rgba(241, 230, 208, 0.14);
  --display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(120% 80% at 85% -10%, #3d2530 0%, transparent 55%),
    var(--night);
  color: var(--cream);
  font: 400 1.0625rem/1.6 var(--body);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 1040px;
  margin: 0 auto;
  padding: clamp(28px, 6vw, 72px) clamp(20px, 5vw, 48px) 56px;
}

h1 {
  margin: 0;
  font: 800 clamp(2.4rem, 6vw, 4.25rem) / 1 var(--display);
  letter-spacing: 0.01em;
}

h2 {
  margin: 0 0 6px;
  font: 700 1rem / 1.4 var(--body);
  color: var(--muted);
}

/* ---------- Prozentanzeige ---------- */

.pct {
  display: flex;
  align-items: baseline;
  gap: 0.06em;
  margin: clamp(32px, 6vw, 64px) 0 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(7rem, 26vw, 15rem);
  line-height: 0.82;
  font-variant-numeric: tabular-nums;
}

.pct .sign {
  font-size: 0.38em;
  font-weight: 700;
  color: var(--ochre);
}

.pct-label {
  margin: 14px 0 28px;
  color: var(--muted);
  font-size: 1.125rem;
}

/* ---------- Filmstreifen-Balken ---------- */

.strip {
  position: relative;
  background: var(--film);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.strip::before,
.strip::after {
  content: "";
  display: block;
  height: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='14'%3E%3Crect x='8' y='3' width='12' height='8' rx='2.5' fill='%23f1e6d0' fill-opacity='.18'/%3E%3C/svg%3E") repeat-x 0 50%;
}

.window {
  position: relative;
  height: clamp(64px, 12vw, 96px);
  margin: 2px 26px;
  background: #150f1a;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px var(--line);
}

.strip.small .window { height: 56px; }

.fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  transition: width 1.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.bands {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 4px 0 0 4px;
  background:
    radial-gradient(ellipse 130px 12px at 28% 36%, rgba(255, 244, 220, 0.28), transparent) 0 0 / 320px 100% repeat-x,
    radial-gradient(ellipse 170px 9px at 72% 64%, rgba(80, 26, 18, 0.38), transparent) 0 0 / 320px 100% repeat-x,
    linear-gradient(to bottom,
      #e8d3ad 0 10%, #c98c4f 10% 22%, #f0dfbf 22% 30%, #a8512f 30% 46%,
      #e2b57c 46% 58%, #8f4329 58% 70%, #ecd6aa 70% 82%, #b9703f 82% 100%);
}

.bands::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.32), transparent 32%, transparent 68%, rgba(0, 0, 0, 0.42));
}

.spot {
  position: absolute;
  right: 0;
  top: 50%;
  width: 46px;
  height: 32px;
  transform: translate(50%, -50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at 40% 38%, #ea7a5e 0, var(--storm) 46%, #7d1f18 100%);
  box-shadow: 0 0 0 3px rgba(194, 64, 45, 0.28), 0 0 34px 6px rgba(194, 64, 45, 0.55);
  transition: opacity 0.4s;
}

.fill[data-empty] .spot { opacity: 0; }

.legend {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  color: var(--muted);
}

.legend b { color: var(--cream); font-weight: 700; }

/* ---------- Aktuell / Als Nächstes ---------- */

.tasks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 5vw, 64px);
  margin-top: clamp(40px, 7vw, 72px);
}

.task {
  position: relative;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.task::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 0;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--ochre);
  box-shadow: 0 0 0 4px rgba(217, 163, 91, 0.2);
}

.task.next::before {
  background: var(--night);
  border: 2px solid var(--muted);
  box-shadow: none;
}

.task p {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 500;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.task.done {
  grid-column: 1 / -1;
}

.task.done::before {
  background: var(--rust);
  box-shadow: none;
}

.done-list {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: clamp(24px, 5vw, 64px);
}

.done-list li {
  position: relative;
  break-inside: avoid;
  padding: 0 0 12px 30px;
  font-size: 1.15rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.done-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  width: 17px;
  height: 17px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='8' fill='%23d9a35b'/%3E%3Cpath d='M4.5 8.4l2.4 2.3 4.6-4.9' fill='none' stroke='%2324160c' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.done-empty { margin: 0; color: var(--muted); }

textarea { resize: vertical; min-height: 140px; line-height: 1.5; }

.page-foot {
  margin-top: 56px;
  color: var(--muted);
  font-size: 0.9rem;
}

.error-note {
  margin-top: 12px;
  color: #e9907d;
  font-size: 0.95rem;
}

/* ---------- Admin ---------- */

.card {
  background: var(--night-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: clamp(20px, 4vw, 36px);
}

.narrow { max-width: 460px; margin: clamp(24px, 10vh, 120px) auto 0; }

.admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.admin-head h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }

.links { display: flex; gap: 10px; flex-wrap: wrap; }

.readout {
  font: 800 clamp(3.5rem, 12vw, 5.5rem) / 1 var(--display);
  margin: 24px 0 18px;
}

.readout .sign { font-size: 0.45em; color: var(--ochre); margin-left: 4px; }

.field { margin-top: 22px; }

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  font-size: 0.95rem;
}

.hint { margin: 6px 0 0; color: var(--muted); font-size: 0.875rem; }

input[type="text"],
input[type="password"],
input[type="number"],
textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--film);
  color: var(--cream);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

input:focus-visible,
textarea:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--ochre);
  outline-offset: 3px;
}

.row { display: flex; gap: 10px; align-items: center; }
.row input[type="number"] { width: 96px; flex: none; }

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 28px;
  background: transparent;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 3px;
  background: var(--line);
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  margin-top: -9px;
  border-radius: 50%;
  background: var(--ochre);
  border: 3px solid var(--night-2);
  box-shadow: 0 0 0 1px var(--ochre);
}

input[type="range"]::-moz-range-track {
  height: 6px;
  border-radius: 3px;
  background: var(--line);
}

input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ochre);
  border: 3px solid var(--night-2);
}

.btn {
  display: inline-block;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: 8px;
  font: 700 1rem var(--body);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s, border-color 0.15s;
}

.btn.primary { background: var(--ochre); color: #24160c; }
.btn.primary:hover { background: #e5b370; }
.btn.primary:disabled { opacity: 0.6; cursor: progress; }
.btn.ghost { border-color: var(--line); background: transparent; }
.btn.ghost:hover { border-color: var(--muted); }
.btn.step { padding: 11px 14px; min-width: 52px; }

.actions { margin-top: 30px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }

.msg { margin: 14px 0 0; color: #e9907d; min-height: 1.4em; font-size: 0.95rem; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 16px);
  padding: 12px 20px;
  background: var(--cream);
  color: #24160c;
  border-radius: 8px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }

[hidden] { display: none !important; }

@media (max-width: 640px) {
  .tasks { grid-template-columns: 1fr; }
  .done-list { columns: 1; }
  .window { margin: 2px 22px; }
  .spot { width: 38px; height: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  .fill, .toast, .spot { transition: none; }
}
