/* Shuffle – gemeinsames Design für alle Apps */

:root {
  --bg: #f7f2ea;
  --bg-deep: #efe6d8;
  --surface: #fffdf9;
  --surface-2: #f8f3ec;
  --ink: #1e2622;
  --ink-soft: #5b625d;
  --ink-faint: #8b8f89;
  --line: #e4dbcd;
  --accent: #c2372b;
  --accent-ink: #ffffff;
  --accent-soft: #f8e1dc;
  --green: #8c5f0f;
  --green-soft: #f6e6c4;
  --festive: #edb94c;
  --festive-ink: #2a1b02;
  --gold: #c8932e;
  --gold-soft: #f6e9cf;
  --warn: #9a5b00;
  --warn-soft: #fbedd5;
  --shadow: 0 1px 2px rgb(40 30 20 / 6%), 0 8px 24px rgb(40 30 20 / 7%);
  --radius: 18px;
  --radius-sm: 12px;
  --font: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141917;
    --bg-deep: #0f1312;
    --surface: #1c2320;
    --surface-2: #222a27;
    --ink: #eef0ec;
    --ink-soft: #b3b9b3;
    --ink-faint: #858c86;
    --line: #2f3833;
    --accent: #e0574a;
    --accent-soft: #3a2220;
    --green: #f0c25e;
    --green-soft: #3a2f18;
    --festive: #f0c25e;
    --festive-ink: #241803;
    --gold: #e2b25a;
    --gold-soft: #3a3020;
    --warn: #f0b45a;
    --warn-soft: #3a2d18;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 25%);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141917;
  --bg-deep: #0f1312;
  --surface: #1c2320;
  --surface-2: #222a27;
  --ink: #eef0ec;
  --ink-soft: #b3b9b3;
  --ink-faint: #858c86;
  --line: #2f3833;
  --accent: #e0574a;
  --accent-soft: #3a2220;
  --green: #f0c25e;
  --green-soft: #3a2f18;
  --festive: #f0c25e;
  --festive-ink: #241803;
  --gold: #e2b25a;
  --gold-soft: #3a3020;
  --warn: #f0b45a;
  --warn-soft: #3a2d18;
  --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 25%);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

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

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

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0 18px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  font-size: 18px;
}
.brand svg { width: 26px; height: 26px; }
.brand small { font-weight: 600; color: var(--ink-faint); font-size: 14px; }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 8px; }
h1 { font-size: clamp(28px, 7vw, 40px); font-weight: 800; }
h2 { font-size: 22px; font-weight: 800; }
h3 { font-size: 17px; font-weight: 700; }
p { margin: 0 0 12px; }
.lead { font-size: 19px; color: var(--ink-soft); }
.muted { color: var(--ink-soft); }
.faint { color: var(--ink-faint); font-size: 14px; }
.center { text-align: center; }

/* ---------- Karten ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin: 0 0 16px;
  box-shadow: var(--shadow);
}
.card.flat { box-shadow: none; background: var(--surface-2); }
.card > :last-child { margin-bottom: 0; }

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.notice {
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin: 0 0 16px;
  background: var(--gold-soft);
  border: 1px solid color-mix(in srgb, var(--gold) 35%, transparent);
}
.notice.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.notice.ok { background: var(--green-soft); border-color: color-mix(in srgb, var(--green) 30%, transparent); }
.notice.error { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.notice > :last-child { margin-bottom: 0; }

/* ---------- Formulare ---------- */

label { display: block; font-weight: 700; font-size: 15px; margin: 0 0 6px; }
.field { margin: 0 0 14px; }
.hint { font-size: 14px; color: var(--ink-faint); margin-top: 4px; }

input[type="text"], input[type="url"], textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 84px; resize: vertical; }
input:focus, textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 18%, transparent);
}
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row > * { flex: 1 1 180px; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  text-decoration: none;
  transition: transform .08s, background .15s, border-color .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { border-color: var(--ink-faint); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.05); }
.btn.green { background: var(--festive); border-color: var(--festive); color: var(--festive-ink); }
.btn.green:hover { filter: brightness(1.05); }
.btn.big { font-size: 19px; padding: 16px 26px; }
.btn.small { font-size: 14px; padding: 8px 13px; }
.btn.block { width: 100%; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-soft); }
.btn.ghost:hover { color: var(--ink); background: var(--surface-2); }
.btn.danger { color: var(--accent); }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

.icon-btn {
  border: 0;
  background: transparent;
  color: var(--ink-faint);
  font: inherit;
  font-size: 20px;
  line-height: 1;
  padding: 6px 8px;
  border-radius: 8px;
  cursor: pointer;
}
.icon-btn:hover { color: var(--accent); background: var(--surface-2); }

/* ---------- Chips & Listen ---------- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink-soft);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.chip.ok { background: var(--green-soft); color: var(--green); border-color: transparent; }
.chip.gold { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.chip.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }

.list { list-style: none; margin: 0; padding: 0; }
.list > li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.list > li:first-child { border-top: 0; padding-top: 0; }
.list > li:last-child { padding-bottom: 0; }
.list .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }

.empty {
  text-align: center;
  color: var(--ink-faint);
  padding: 14px 8px;
  font-size: 15px;
}

details > summary {
  cursor: pointer;
  font-weight: 800;
  font-size: 18px;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
details > summary::-webkit-details-marker { display: none; }
details > summary::after { content: "＋"; color: var(--ink-faint); font-weight: 400; }
details[open] > summary::after { content: "－"; }
details[open] > summary { margin-bottom: 14px; }

.steps { display: grid; gap: 12px; counter-reset: step; margin: 0; padding: 0; list-style: none; }
.steps li { display: flex; gap: 12px; align-items: flex-start; }
.steps li::before {
  counter-increment: step;
  content: counter(step);
  flex: 0 0 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
  display: grid;
  place-items: center;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: var(--bg);
  padding: 11px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 50;
  max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.spinner {
  width: 28px; height: 28px;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  margin: 60px auto;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.footer { text-align: center; color: var(--ink-faint); font-size: 13px; margin-top: 36px; }

/* ---------- Startseite Shuffle ---------- */

.hero { text-align: center; padding: 28px 0 24px; }
.hero .logo { width: 72px; height: 72px; margin-bottom: 12px; }
.apps { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.app-card {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform .15s;
}
.app-card:hover { transform: translateY(-2px); }
.app-card .emoji { font-size: 34px; line-height: 1; margin-bottom: 10px; display: block; }
.app-card.soon { opacity: .6; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.pre { white-space: pre-wrap; }
.spaced { margin-top: 12px; }
.sr { position: fixed; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; }
[hidden] { display: none !important; }
