:root {
  --green: #0f3b2e;
  --green-deep: #082a20;
  --green-soft: #1c5140;
  --cream: #f4ecd8;
  --cream-dim: #d9cfb6;
  --brass: #d4a73a;
  --ink: #17201c;
  --line: rgba(244,236,216,.14);
  --danger: #c0392b;
  --radius: 10px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--green-deep);
  color: var(--cream);
  font-family: "Georgia", "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.4;
  min-height: 100dvh;
}
a { color: var(--brass); }

.wrap { max-width: 720px; margin: 0 auto; padding: 0 14px 40px; }

/* Kopf */
.masthead {
  text-align: center;
  padding: 26px 0 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}
.masthead .goose {
  font-size: 13px; letter-spacing: .08em; color: var(--brass);
}
.masthead h1 {
  margin: 4px 0 0;
  font-size: clamp(30px, 8vw, 44px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.01em;
}
.masthead .sub { margin: 8px 0 0; color: var(--cream-dim); font-size: 14px; }

/* Rangliste */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--green);
}
table.ranking { border-collapse: separate; border-spacing: 0; width: 100%; min-width: max-content; }
.ranking th, .ranking td {
  padding: 12px 10px;
  text-align: right;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.ranking th { font-weight: 400; color: var(--cream-dim); font-size: 13px; }
.ranking tr:last-child td { border-bottom: 0; }
.ranking .c-rank { width: 44px; text-align: center; color: var(--cream-dim); }
.ranking .c-team { text-align: left; font-weight: 700; min-width: 140px; }
.ranking .c-total { font-weight: 700; color: var(--brass); font-size: 18px; border-right: 1px solid var(--line); }
.ranking .c-month { color: var(--cream-dim); min-width: 58px; }
.ranking td.c-month.has { color: var(--cream); }
.ranking .empty { color: rgba(244,236,216,.3); }

/* Erste Spalten kleben beim Scrollen */
.ranking .c-rank, .ranking .c-team, .ranking .c-total { position: sticky; background: var(--green); z-index: 1; }
.ranking .c-rank { left: 0; }
.ranking .c-team { left: 44px; }
.ranking .c-total { left: auto; position: static; }
@media (min-width: 560px) {
  .ranking .c-total { position: sticky; left: 184px; }
}

/* Podium-Betonung */
.ranking tr.r1 .c-rank { color: var(--brass); font-weight: 700; }
.ranking tr.r1 .c-team { color: var(--brass); }

.note { color: var(--cream-dim); font-size: 13px; margin: 14px 2px 0; }
.footer { margin-top: 30px; text-align: center; font-size: 13px; color: var(--cream-dim); }

/* Admin */
.admin-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); margin-bottom: 18px; font-size: 14px; }
.admin-bar strong { font-size: 17px; }
h2 { font-size: 20px; margin: 26px 0 10px; }
h2:first-of-type { margin-top: 6px; }
.card { background: var(--green); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 14px; }

label { display: block; font-size: 14px; color: var(--cream-dim); margin-bottom: 4px; }
input[type=text], input[type=password], input[type=number], input[type=month], select {
  width: 100%;
  font: inherit;
  font-size: 17px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--green-deep);
  color: var(--cream);
}
input:focus, select:focus, button:focus-visible { outline: 2px solid var(--brass); outline-offset: 1px; }
input[type=number] { text-align: right; -moz-appearance: textfield; }
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; }

.btn {
  display: inline-block;
  font: inherit; font-size: 16px; font-weight: 700;
  padding: 12px 18px;
  border: 0; border-radius: 8px;
  background: var(--brass); color: var(--ink);
  cursor: pointer; text-decoration: none;
  min-height: 44px;
}
.btn.block { display: block; width: 100%; text-align: center; margin-top: 12px; }
.btn.quiet { background: transparent; color: var(--cream-dim); border: 1px solid var(--line); font-weight: 400; padding: 8px 12px; min-height: 36px; font-size: 14px; }
.btn.danger { color: #ff9f94; }

.row { display: flex; gap: 8px; align-items: flex-end; }
.row > * { flex: 1; }
.row > .btn { flex: 0 0 auto; }

.msg { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-size: 15px; }
.msg.ok { background: rgba(212,167,58,.16); border: 1px solid rgba(212,167,58,.5); }
.msg.err { background: rgba(192,57,43,.2); border: 1px solid rgba(192,57,43,.6); }

/* Punkte-Erfassung */
.points-list { list-style: none; margin: 0; padding: 0; }
.points-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.points-list li:last-child { border-bottom: 0; }
.points-list .name { flex: 1; font-weight: 700; }
.points-list input { width: 90px; flex: 0 0 90px; text-align: right; }

/* Teamliste */
.team-list { list-style: none; margin: 0; padding: 0; }
.team-list li { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.team-list li:last-child { border-bottom: 0; }
.team-list form { display: contents; }
.team-list input[type=text] { flex: 1; font-size: 15px; padding: 9px 10px; }

.months-list { display: flex; flex-wrap: wrap; gap: 8px; }
.months-list .btn.quiet.active { border-color: var(--brass); color: var(--brass); }

.login { max-width: 360px; margin: 40px auto 0; }
