:root {
    --bg: #15161a;
    --panel: #1f2127;
    --line: #32353e;
    --text: #ececf0;
    --muted: #9a9ca8;
    --gut: #3fae6a;
    --neutral: #8a8d99;
    --schlecht: #d9534f;
    --accent: #e0b354;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif;
}

a { color: var(--accent); }

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--line);
}

header h1 { margin: 0; font-size: 18px; }
header .who { color: var(--muted); font-size: 14px; }

button, input, select {
    font: inherit;
    color: var(--text);
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 9px 14px;
}

button { cursor: pointer; }
button:hover { border-color: var(--muted); }

.error {
    background: #4a2322;
    border: 1px solid var(--schlecht);
    border-radius: 8px;
    padding: 9px 14px;
    margin: 12px 0;
}

/* Anmeldung */
.login {
    max-width: 360px;
    margin: 12vh auto;
    padding: 24px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
}

.login h1 { margin-top: 0; font-size: 22px; }
.login label { display: block; margin: 14px 0 4px; color: var(--muted); font-size: 14px; }
.login input { width: 100%; background: var(--bg); }
.login button { width: 100%; margin-top: 20px; background: var(--accent); color: #1a1a1a; border: 0; font-weight: 600; }

/* Bewerten */
.rate {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 12px 16px 20px;
}

.progress { width: 100%; max-width: 720px; }
.progress .label { display: flex; justify-content: space-between; color: var(--muted); font-size: 14px; margin-bottom: 4px; }
.progress .bar { height: 6px; background: var(--panel); border-radius: 3px; overflow: hidden; }
.progress .bar div { height: 100%; background: var(--accent); width: 0; transition: width .2s; }

.stage {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: calc(100vh - 250px);
    min-height: 240px;
}

.stage img { max-width: 100%; max-height: 100%; border-radius: 8px; }

.buttons { display: flex; gap: 10px; width: 100%; max-width: 720px; }
.buttons button { flex: 1; padding: 16px 8px; font-size: 18px; font-weight: 600; border-width: 2px; }
.buttons kbd { display: block; font: 12px system-ui, sans-serif; color: var(--muted); font-weight: 400; margin-top: 2px; }
.buttons .gut { border-color: var(--gut); }
.buttons .neutral { border-color: var(--neutral); }
.buttons .schlecht { border-color: var(--schlecht); }
.buttons .gut.active { background: var(--gut); }
.buttons .neutral.active { background: var(--neutral); }
.buttons .schlecht.active { background: var(--schlecht); }
.buttons .active kbd { color: inherit; }

.nav { display: flex; gap: 10px; }
.nav button { font-size: 14px; color: var(--muted); }

.done { text-align: center; margin: 14vh auto; padding: 0 16px; }

/* Auswertung */
.admin { padding: 16px; max-width: 1500px; margin: 0 auto; }
.admin h2 { font-size: 16px; margin: 24px 0 10px; }

.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.toolbar label { color: var(--muted); font-size: 14px; }
.toolbar input[type=number] { width: 80px; }
.toolbar a.btn { text-decoration: none; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 9px 14px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-top: 14px; }

.card { background: var(--panel); border: 2px solid var(--line); border-radius: 10px; overflow: hidden; font-size: 13px; }
.card.top { border-color: var(--accent); }
.card a.img { display: block; aspect-ratio: 1; background: #000; }
.card img { width: 100%; height: 100%; object-fit: contain; display: block; }
.card .info { padding: 8px 10px 10px; }
.card .row { display: flex; justify-content: space-between; align-items: baseline; }
.card .rank { color: var(--muted); }
.card .score { font-size: 18px; font-weight: 700; }
.card .name { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 4px; }
.card .counts { margin-top: 4px; }

.split { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--line); margin-top: 6px; }
.split .g { background: var(--gut); }
.split .n { background: var(--neutral); }
.split .s { background: var(--schlecht); }

.c-gut { color: var(--gut); }
.c-neutral { color: var(--neutral); }
.c-schlecht { color: var(--schlecht); }

table { border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 6px 16px 6px 0; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 400; }
td.num, th.num { text-align: right; }
.card .row, .card .split, .card .counts { cursor: help; }
