:root {
  --bg: #f4eee2;
  --paper: #fffdf8;
  --ink: #2b2420;
  --muted: #7a6f66;
  --line: #e4dccd;
  --red: #b3261e;
  --red-dark: #8c1d17;
  --green: #1f5f3f;
  --radius: 14px;
  --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.5 var(--sans);
}

main {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

header { text-align: center; margin-bottom: 24px; }
header .eyebrow {
  margin: 0;
  color: var(--red);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}
h1 { margin: 4px 0 0; font: 700 30px/1.2 var(--serif); }
h2 { margin: 0 0 12px; font: 700 21px/1.3 var(--serif); }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(60, 40, 20, .06), 0 8px 24px rgba(60, 40, 20, .06);
}

.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
[hidden] { display: none !important; }

.budget {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  margin-bottom: 16px;
  border-radius: 10px;
  background: #fbefe9;
  color: var(--red-dark);
  font-size: 15px;
}
.budget strong { font-size: 17px; }

/* Forms */
label { display: block; font-weight: 600; margin-bottom: 6px; }
input[type=text], input[type=number] {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}
input:focus { outline: 2px solid var(--green); outline-offset: 1px; border-color: transparent; }

.wish-row { display: flex; gap: 8px; margin-bottom: 10px; align-items: center; }
.wish-row .num {
  flex: none;
  width: 28px;
  color: var(--muted);
  font: 700 18px var(--serif);
  text-align: center;
}
.wish-row input { flex: 1; }

.row { display: flex; gap: 8px; }
.row > * { flex: 1; }

button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 18px;
  border: 0;
  border-radius: 10px;
  background: var(--red);
  color: #fff;
  font: 600 16px var(--sans);
  cursor: pointer;
  text-decoration: none;
}
button:hover { background: var(--red-dark); }
button:disabled { opacity: .5; cursor: default; }
button.block { width: 100%; }
button.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
button.ghost:hover { background: #f3ede2; }
button.icon { flex: none; width: 48px; padding: 0; font-size: 22px; }
button.small { min-height: 38px; padding: 6px 12px; font-size: 14px; }

.error {
  margin: 12px 0 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: #fde8e6;
  color: var(--red-dark);
  font-size: 15px;
}
.notice {
  padding: 12px 14px;
  margin-bottom: 16px;
  border-radius: 10px;
  background: #e7f2ec;
  color: var(--green);
  font-size: 15px;
}

/* Status list */
.status { list-style: none; margin: 0; padding: 0; }
.status li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.status li:last-child { border-bottom: 0; }
.pill {
  flex: none;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}
.pill.done { background: #e7f2ec; color: var(--green); }
.pill.open { background: #f3ede2; color: var(--muted); }

/* Gezogener Zettel */
.slip {
  position: relative;
  padding: 28px 22px 24px;
  background: var(--paper);
  border-radius: 6px;
  transform: rotate(-1deg);
  box-shadow: 0 2px 4px rgba(60, 40, 20, .08), 0 14px 32px rgba(60, 40, 20, .14);
  border-top: 6px solid var(--red);
  margin: 8px 4px 28px;
}
.slip .for { margin: 0; color: var(--muted); font-size: 15px; }
.slip .name { margin: 2px 0 16px; font: 700 34px/1.15 var(--serif); color: var(--red); word-break: break-word; }
.slip ol { margin: 0 0 16px; padding-left: 24px; font: 19px/1.45 var(--serif); }
.slip li { margin-bottom: 8px; padding-left: 4px; }
.slip .limit { margin: 0; padding-top: 12px; border-top: 1px dashed var(--line); color: var(--green); font-size: 15px; font-weight: 600; }

/* Admin */
.people { list-style: none; margin: 0; padding: 0; }
.people li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.people li:last-child { border-bottom: 0; }
.top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.name { font-weight: 600; word-break: break-word; }
.people .actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 15px;
  z-index: 10;
}
.spaced { margin-top: 16px; }
button.ghost.block { margin-top: 8px; }

.group-link { display: block; color: inherit; text-decoration: none; }
.group-link:active { transform: scale(.99); }
.group-link .top { margin-bottom: 4px; }
.back {
  display: inline-block;
  margin-bottom: 16px;
  padding: 8px 0;
  color: var(--red);
  font-weight: 600;
  text-decoration: none;
}
#error { margin: 0 0 16px; }

/* Icons */
.ico {
  flex: none;
  width: 1.15em;
  height: 1.15em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
button.icon .ico { width: 22px; height: 22px; }
.budget .emoji { flex: none; display: block; font-size: 24px; line-height: 1; }
.pill { display: inline-flex; align-items: center; gap: 4px; }
.pill .ico { width: 14px; height: 14px; stroke-width: 3; }
.back { display: inline-flex; align-items: center; gap: 6px; }
.slip .limit { display: flex; align-items: center; gap: 8px; }
.slip .limit .ico { width: 22px; height: 22px; }

/* Links in Wünschen */
.slip li, #my-wishes li { overflow-wrap: anywhere; }
.slip a, #my-wishes a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}
