/* Wichtelbox – Stylesheet */
:root {
  --pine: #14532d;
  --pine-soft: #1d6b3c;
  --berry: #9f1d3f;
  --ink: #14201a;
  --ink-soft: #4b5a52;
  --line: #d9ded7;
  --paper: #fbf9f4;
  --card: #ffffff;
  --gold: #b5872f;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(20, 32, 26, .05), 0 12px 32px -12px rgba(20, 32, 26, .18);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 50% -10%, #eef3ea 0%, rgba(238, 243, 234, 0) 60%),
    var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 40px 20px 64px;
}

/* Kopf */
.head { text-align: center; margin-bottom: 26px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--pine); }
.mark { width: 34px; height: 34px; flex: none; }
h1 {
  font-size: 28px;
  line-height: 1.2;
  margin: 0;
  letter-spacing: -.015em;
  font-weight: 650;
  color: var(--pine);
}
.sub {
  margin: 10px auto 0;
  max-width: 40ch;
  color: var(--ink-soft);
  font-size: 14.5px;
}

/* Karte */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 24px 24px;
}

.lbl {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .01em;
  margin: 0 0 7px;
  color: var(--ink);
}
.lbl + .lbl, input + .lbl, .selectwrap + .lbl { margin-top: 18px; }
.muted { font-weight: 400; color: var(--ink-soft); }

.selectwrap { position: relative; }
.selectwrap::after {
  content: "";
  position: absolute;
  right: 14px; top: 50%;
  width: 8px; height: 8px;
  border-right: 2px solid var(--ink-soft);
  border-bottom: 2px solid var(--ink-soft);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

select, input[type=password], input[type=text], textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 13px;
  appearance: none;
  transition: border-color .15s, box-shadow .15s;
}
select { padding-right: 36px; cursor: pointer; }
textarea { resize: vertical; min-height: 96px; line-height: 1.45; }

select:focus, input:focus, textarea:focus {
  outline: none;
  border-color: var(--pine-soft);
  box-shadow: 0 0 0 3px rgba(29, 107, 60, .14);
}
input::placeholder, textarea::placeholder { color: #9aa79f; }

button {
  font: inherit;
  font-weight: 600;
  border-radius: 10px;
  border: 1px solid transparent;
  padding: 12px 18px;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .06s, opacity .15s;
}
button:active { transform: translateY(1px); }
button:disabled { opacity: .45; cursor: not-allowed; }

.primary {
  width: 100%;
  margin-top: 20px;
  background: var(--pine);
  color: #fff;
  font-size: 16px;
  padding: 14px 18px;
}
.primary:hover:not(:disabled) { background: var(--pine-soft); }

.ghost {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
}
.ghost:hover { border-color: #b9c4bc; }
.ghost.danger { color: var(--berry); border-color: #eccdd5; }
.ghost.danger:hover { background: #fdf3f5; }

.note {
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-soft);
}
.note strong { color: var(--ink); }

.err {
  margin: 12px 0 0;
  font-size: 13.5px;
  color: var(--berry);
  min-height: 0;
}
.err:empty { display: none; }

/* Ergebnis */
#step-result { text-align: center; animation: rise .35s ease-out; }
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.kicker {
  margin: 4px 0 0;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.target {
  margin: 8px 0 0;
  font-size: clamp(30px, 9vw, 44px);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--pine);
  overflow-wrap: anywhere;
}
.hintline {
  display: inline-block;
  margin: 16px 0 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: #fdf6e7;
  border: 1px solid #f0dfb6;
  color: #7a5a15;
  font-size: 13.5px;
  font-weight: 600;
}
.msg {
  margin: 16px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
  white-space: pre-wrap;
}
.actions { display: flex; gap: 10px; justify-content: center; margin-top: 22px; }

/* Fuß */
.foot {
  margin-top: 22px;
  text-align: center;
  font-size: 12.5px;
  color: #90a096;
}
.foot a { color: #90a096; text-decoration: none; border-bottom: 1px solid #dfe6e0; }
.foot a:hover { color: var(--pine); }
.dot { margin: 0 6px; }

/* Admin */
.wrap.admin { max-width: 720px; }
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 22px 20px;
  margin-bottom: 16px;
}
.panel h2 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: .01em;
}
.panel .note { margin-top: 4px; }
.row { display: flex; gap: 10px; align-items: center; }
.row > * { flex: 1; }
.row.tight { justify-content: flex-end; }
.row.tight > * { flex: none; }

.plist { list-style: none; margin: 14px 0 0; padding: 0; }
.plist li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid #eef1ec;
  font-size: 14.5px;
}
.plist li:first-child { border-top: none; }
.plist .nm { font-weight: 550; }
.badge {
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef4ef;
  color: var(--pine);
  white-space: nowrap;
}
.badge.wait { background: #f4f1ea; color: #8a7a58; }
.plist .spacer { flex: 1; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--ink-soft);
}
.pill b { color: var(--ink); }

.warn {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fdf3f5;
  border: 1px solid #f0cdd6;
  color: #88213c;
  font-size: 13.5px;
}
.ok {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: #eff6f0;
  border: 1px solid #cfe4d5;
  color: #1c5c37;
  font-size: 13.5px;
}
.gate { max-width: 380px; margin: 60px auto 0; }

.excl { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.excl select { flex: 1; }
.excl button { padding: 10px 12px; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  background: #f4f6f2;
  padding: 2px 6px;
  border-radius: 5px;
  overflow-wrap: anywhere;
}
.copyline { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.copyline code { flex: 1; }

@media (max-width: 480px) {
  .wrap { padding: 26px 14px 48px; }
  .card, .panel { padding: 20px 16px; }
  h1 { font-size: 24px; }
}
