:root {
  --navy: #1b2a4a;
  --navy-2: #24365e;
  --cream: #f7f2e8;
  --paper: #fffdf8;
  --ink: #23232b;
  --muted: #6b6a72;
  --line: #e4ddcf;
  --gold: #c99a3b;
  --gold-soft: #f3e5c4;
  --wine: #8a2335;
  --ok: #2f7a4b;
  --radius: 10px;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

h1, h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 700; line-height: 1.15; }

.eyebrow {
  margin: 0 0 .25rem;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
}

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Anmeldung */

body.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 16px;
  background: var(--navy);
}
.login-box {
  width: 100%;
  max-width: 440px;
  background: var(--paper);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.login-box h1 { margin: .2rem 0 1rem; font-size: 1.8rem; color: var(--navy); }
.login-box h1 span { display: block; color: var(--wine); font-size: 1.25rem; margin-top: .2rem; }
.login-box p { color: var(--muted); }
.login-box form { display: grid; gap: .5rem; margin-top: 1.25rem; }
.login-box label { font-weight: 600; font-size: .9rem; }
input[type=email], textarea {
  width: 100%;
  font: inherit;
  padding: .65rem .75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}
input[type=email]:focus, textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--gold); }
button[type=submit]:not(.link) {
  font: inherit;
  font-weight: 600;
  padding: .7rem 1rem;
  border: 0;
  border-radius: 8px;
  background: var(--navy);
  color: #fff;
  cursor: pointer;
  margin-top: .5rem;
}
button[type=submit]:not(.link):hover { background: var(--navy-2); }
.error {
  background: #fbe9ec;
  color: var(--wine);
  border-left: 3px solid var(--wine);
  padding: .6rem .8rem;
  border-radius: 4px;
}

/* ---------- Kopf */

.top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--navy);
  color: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,.15);
}
.top-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: .9rem 16px .5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: .5rem 1.5rem;
}
.top h1 { margin: 0; font-size: 1.35rem; }
.top h1 span { color: var(--gold-soft); font-weight: 400; }
.who { display: flex; gap: .75rem; align-items: center; font-size: .9rem; color: #d8deea; }
.who form { margin: 0; }
button.link {
  font: inherit;
  background: none;
  border: 0;
  color: var(--gold-soft);
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}
.progress-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px .75rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: .85rem;
  color: #d8deea;
}
.progress { flex: 1; height: 6px; border-radius: 3px; background: rgba(255,255,255,.15); overflow: hidden; }
.bar { height: 100%; width: 0; background: var(--gold); transition: width .3s; }

/* ---------- Inhalt */

main { max-width: 1200px; margin: 0 auto; padding: 1.25rem 16px 2rem; }
.intro { max-width: 760px; color: #44434c; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.card.rated { border-color: #d9c79b; }

.thumb { display: block; background: #e9e3d6; cursor: zoom-in; }
.thumb img { display: block; width: 100%; height: auto; }

.body { padding: .9rem 1rem 1rem; display: flex; flex-direction: column; gap: .4rem; }
.card h2 { margin: 0; font-size: 1.2rem; color: var(--navy); display: flex; align-items: baseline; gap: .5rem; }
.num {
  font-family: system-ui, sans-serif;
  font-size: .75rem;
  font-weight: 700;
  min-width: 1.6rem;
  height: 1.6rem;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  transform: translateY(-2px);
}
.tech { margin: 0; color: var(--muted); font-size: .85rem; }

/* Sterne: Radios in umgekehrter Reihenfolge (5..1), damit ~ die linken Sterne füllt */
.stars { border: 0; padding: 0; margin: .3rem 0 0; display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.stars legend { font-weight: 600; font-size: .9rem; padding: 0; margin-bottom: .2rem; float: left; width: 100%; }
.star-row { display: inline-flex; flex-direction: row-reverse; }
.star-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-row label {
  width: 2.1rem;
  height: 2.1rem;
  cursor: pointer;
  background: no-repeat center / 1.75rem url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.8l2.8 5.9 6.4.8-4.7 4.4 1.2 6.4L12 17.1l-5.7 3.2 1.2-6.4L2.8 9.5l6.4-.8z' fill='none' stroke='%23b9ad95' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.star-row input:checked ~ label,
.star-row label:hover,
.star-row label:hover ~ label {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2.8l2.8 5.9 6.4.8-4.7 4.4 1.2 6.4L12 17.1l-5.7 3.2 1.2-6.4L2.8 9.5l6.4-.8z' fill='%23c99a3b' stroke='%23a87d27' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.star-row:hover input:checked ~ label:not(:hover):not(:hover ~ label) { opacity: .45; }
.star-row input:focus-visible + label { outline: 2px solid var(--navy); outline-offset: -2px; border-radius: 4px; }
.star-hint { font-size: .85rem; color: var(--muted); }

.cmt-label { font-weight: 600; font-size: .9rem; margin-top: .4rem; }
.cmt-label span { font-weight: 400; color: var(--muted); }
textarea { resize: vertical; min-height: 4.5rem; font-size: .95rem; }

.status { margin: 0; min-height: 1.3em; font-size: .8rem; color: var(--muted); }
.status.ok { color: var(--ok); }
.status.err { color: var(--wine); font-weight: 600; }

.foot { text-align: center; color: var(--muted); font-size: .85rem; padding: 0 16px 2rem; }

/* ---------- Großansicht */

dialog#zoom {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: 96vw;
  max-height: 96vh;
}
dialog#zoom::backdrop { background: rgba(10,14,26,.85); }
dialog#zoom img { display: block; max-width: 96vw; max-height: 94vh; width: auto; height: auto; border-radius: 4px; cursor: zoom-out; }
dialog#zoom form { position: absolute; top: .4rem; right: .4rem; margin: 0; }
.close {
  font: 700 1.5rem/1 system-ui, sans-serif;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  border: 0;
  background: rgba(0,0,0,.6);
  color: #fff;
  cursor: pointer;
}

@media (max-width: 560px) {
  .top h1 { font-size: 1.1rem; }
  .top h1 span { display: block; }
  .eyebrow { font-size: .65rem; }
}
