/* Jasskarten Studio — warm paper design, inspired by (not copied from) the
   zauberspiele product feel: cream paper, serif display, clay/rose accents,
   scattered-card hero, calm card sections, handcrafted upload + modal motion. */

/* IM Fell English (SIL OFL), self-hosted so no visitor IP goes to Google Fonts. */
@font-face { font-family: "IM Fell English"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/im-fell-english.woff2") format("woff2"); }
@font-face { font-family: "IM Fell English"; font-style: italic; font-weight: 400; font-display: swap; src: url("fonts/im-fell-english-italic.woff2") format("woff2"); }

:root {
  --paper: #f6f1e8;
  --panel: #fbf8f2;
  --ink: #2a2521;
  --muted: #6d655b;
  --clay: #c0493f;   /* red emphasis + Herz/Schelle */
  --rose: #e07a8c;   /* primary CTA */
  --rose-ink: #7a2435;
  --gold: #e3a94b;
  --moss: #3f6a4e;
  --line: #e7ddcd;
  --radius: 14px;
  --shadow-s: 0 2px 8px #2a252112;
  --shadow-m: 0 10px 30px #2a252118;
  --shadow-l: 0 26px 70px #2a25212e;
  --ease: cubic-bezier(.22, .61, .36, 1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html { overflow-x: hidden; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.6 ui-rounded, "Avenir Next", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
header, main, footer { max-width: 1240px; margin: auto; }
header {
  height: 78px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 30px; position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.brand { font-family: Georgia, "Times New Roman", serif; font-size: 25px; color: inherit; text-decoration: none; letter-spacing: -.01em; }
.brand span { color: var(--clay); font-style: italic; }
.deck-state { font-size: 13px; background: #eee6d7; padding: 8px 14px; border-radius: 99px; color: var(--muted); }

/* Buttons */
.primary, .secondary {
  border: 0; border-radius: 99px; padding: 15px 26px;
  font: 700 15px inherit; cursor: pointer; transition: transform .15s var(--ease), box-shadow .2s var(--ease), background .2s;
}
.primary { background: var(--rose); color: #fff; box-shadow: 0 8px 22px #e07a8c55; }
.primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px #e07a8c66; }
.primary:active { transform: translateY(0); }
.primary span { padding-left: 12px; }
.secondary { width: 100%; background: transparent; color: var(--rose-ink); border: 1.5px solid var(--rose); margin-top: 16px; }
.secondary:hover { background: #f6e7ea; }
.secondary:disabled { opacity: .55; cursor: wait; }
.secondary.reset { width: auto; margin: 28px 0 0 10px; color: var(--muted); border-color: #c9c1b5; }
@media (max-width: 560px) { .secondary.reset { margin: 12px 0 0; } }
.secondary.reset:hover { background: #eee6d7; color: var(--ink); }
.brush.auto .b-img { display: flex; align-items: center; justify-content: center; border-radius: 10px; background: #ece9e4; border-color: var(--line); color: rgba(192,57,43,.6); font-size: 34px; line-height: 1; }
.brush.auto b { color: var(--muted); white-space: normal; line-height: 1.15; }
.brush.auto:hover .b-img { background: #e5e1da; color: rgba(192,57,43,.85); }
.showcase { text-align: center; padding: 0 30px 80px; max-width: 1040px; margin: auto; }
.showcase .eyebrow { justify-content: center; margin-bottom: 18px; }
.showcase-frame { display: inline-block; padding: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: calc(var(--radius) + 6px); box-shadow: var(--shadow-m); }
.hero-video { display: block; width: 100%; max-width: 620px; height: auto; border-radius: var(--radius); }
.text-button { border: 0; background: transparent; color: var(--clay); font-weight: 700; cursor: pointer; padding: 6px 0; }
.text-button:hover { text-decoration: underline; }

/* Hero with scattered cards */
.hero {
  position: relative; padding: 110px 30px 120px; max-width: 760px; margin: auto; text-align: center;
}
.hero .eyebrow { justify-content: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: 11px; font-weight: 800; color: var(--moss); margin: 0 0 16px; display: flex; gap: 8px; align-items: center; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; line-height: 1.02; margin: 0; font-weight: 400; }
h1 { font-size: clamp(44px, 7.5vw, 82px); letter-spacing: -.035em; }
h1 em { color: var(--clay); font-style: italic; }
.lede { font-size: 20px; color: var(--muted); max-width: 580px; margin: 26px auto 34px; }
.fine { font-size: 12px; color: var(--muted); margin-top: 16px; }
.scatter { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: -1; }
.scatter i {
  position: absolute; width: 78px; height: 118px; border-radius: 10px; display: block;
  background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow-m);
}
.scatter i::after { content: ""; position: absolute; inset: 22% 24%; border-radius: 50%; opacity: .5;
  background: radial-gradient(circle at 40% 35%, var(--gold), transparent 70%); }
.scatter i:nth-child(1) { top: 60px; left: 6%; transform: rotate(-16deg); }
.scatter i:nth-child(2) { top: 150px; left: 15%; transform: rotate(9deg); }
.scatter i:nth-child(3) { top: 70px; right: 8%; transform: rotate(14deg); }
.scatter i:nth-child(4) { top: 170px; right: 17%; transform: rotate(-7deg); }
.scatter i:nth-child(3)::after, .scatter i:nth-child(2)::after { background: radial-gradient(circle at 40% 35%, var(--clay), transparent 70%); }

/* Studio layout */
.studio {
  display: grid; grid-template-columns: 320px 1fr; gap: 0;
  border-top: 1px solid var(--line); background: var(--panel);
}
.controls { padding: 34px 26px; border-right: 1px solid var(--line); }
label { display: block; font-size: 13px; font-weight: 700; margin: 20px 0 8px; }
textarea, select {
  display: block; width: 100%; background: #fff; border: 1px solid var(--line);
  border-radius: 10px; padding: 12px; font: 14px inherit; color: var(--ink); margin-top: 6px;
  transition: border-color .15s, box-shadow .15s;
}
textarea:focus, select:focus { outline: 0; border-color: var(--rose); box-shadow: 0 0 0 3px #e07a8c33; }
textarea { min-height: 96px; resize: vertical; }

/* Drag & drop upload */
.upload {
  display: block; border: 2px dashed color-mix(in srgb, var(--moss) 55%, var(--line));
  padding: 22px 16px; border-radius: 12px; cursor: pointer; text-align: center;
  background: #fff; transition: border-color .15s, background .15s, transform .15s var(--ease);
}
.upload:hover { border-color: var(--moss); }
.upload.dragging { border-color: var(--rose); background: #fcf0f2; transform: scale(1.01); }
.upload input { display: none; }
.upload span { display: block; color: var(--moss); font-weight: 700; }
.upload small { font-weight: 400; color: var(--muted); display: block; margin-top: 4px; }

.people { display: grid; gap: 9px; margin-top: 12px; }
.person {
  display: grid; grid-template-columns: 40px 1fr 56px; gap: 9px; align-items: center;
  padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 10px; font-size: 11px;
  animation: pop .3s var(--ease) both;
}
.person img { width: 40px; height: 40px; object-fit: cover; border-radius: 50%; }
.person input { min-width: 0; border: 0; font: 12px inherit; background: transparent; }
.person select { margin: 0; padding: 5px; font-size: 11px; border-radius: 7px; }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.96); } }

.note { font-size: 12px; padding: 14px; background: #ecefe7; border-radius: 10px; margin-top: 24px; color: #3b473d; }

/* Workbench + deck */
.workbench { padding: 34px; }
.workbench-head { display: flex; justify-content: space-between; align-items: end; margin-bottom: 26px; gap: 16px; }
.workbench h2 { font-size: 36px; letter-spacing: -.02em; }
.deck { display: block; }
.card {
  aspect-ratio: 56/100; background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 8px; position: relative; text-align: left; cursor: pointer; box-shadow: var(--shadow-s);
  overflow: hidden; transition: transform .16s var(--ease), box-shadow .2s var(--ease);
}
.card:hover { transform: translateY(-4px) rotate(-1deg); box-shadow: var(--shadow-m); }
.card::after {
  content: ""; position: absolute; inset: 26% 14%; opacity: .16; background: var(--moss);
  clip-path: polygon(50% 0, 70% 38%, 100% 50%, 70% 62%, 50% 100%, 30% 62%, 0 50%, 30% 38%);
}
.card .rank, .card .suit { position: relative; z-index: 1; font-family: Georgia, serif; font-weight: bold; font-size: 19px; }
.card .suit { font-size: 12px; display: block; opacity: .8; }
.card small {
  position: absolute; z-index: 2; bottom: 8px; left: 8px; right: 8px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; font-size: 9px; color: var(--muted);
}
.card[data-suit="Herz"], .card[data-suit="Schelle"] { color: var(--clay); }
.card.done { outline: 2.5px solid var(--gold); outline-offset: -1px; }
.card.done::after { opacity: .3; background: var(--clay); }

/* Generated card art */
.card.has-art { background: center/cover; }
.card.has-art::after { display: none; }
.card.has-art .rank, .card.has-art .suit { color: #fff; text-shadow: 0 1px 4px #000c; }
.card.has-art small { color: #fff; text-shadow: 0 1px 3px #000c; }

/* Six-step section */
.steps { padding: 80px 30px; max-width: 1040px; margin: auto; }
.steps h2 { font-size: clamp(32px, 5vw, 52px); letter-spacing: -.03em; text-align: center; margin-bottom: 48px; }
.step-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-s); }
.step b { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--clay); color: #fff; font-family: Georgia, serif; margin-bottom: 14px; }
.step h3 { margin: 0 0 6px; font-size: 18px; }
.step p { margin: 0; color: var(--muted); font-size: 14px; }

/* Editor modal */
dialog {
  border: 0; border-radius: 18px; padding: 0; max-width: 800px; width: calc(100% - 30px);
  box-shadow: var(--shadow-l); background: var(--panel); color: var(--ink);
}
dialog[open] { animation: modal-in .3s var(--ease); }
@keyframes modal-in { from { opacity: 0; transform: translateY(14px) scale(.97); } }
dialog::backdrop { background: #2a252199; backdrop-filter: blur(4px); animation: fade .25s var(--ease); }
@keyframes fade { from { opacity: 0; } }
.close { position: absolute; right: 14px; top: 10px; z-index: 3; background: transparent; border: 0; font-size: 30px; cursor: pointer; color: var(--muted); line-height: 1; }
.close:hover { color: var(--ink); }
.editor-preview {
  position: absolute; left: 44px; top: 46px; width: 252px; aspect-ratio: 56/100;
  border-radius: 12px; background: #fff center/cover; border: 8px solid #fff; box-shadow: var(--shadow-m);
}
.editor-preview::after {
  content: "Kartenlogik fix"; position: absolute; inset: 0; display: grid; place-items: center;
  font: 24px Georgia, serif; color: var(--moss); text-align: center; background: #f6f1e8cc; border-radius: 4px;
}
.editor-form { padding: 46px 44px 42px 344px; min-height: 480px; }
.editor-form h2 { font-size: 42px; letter-spacing: -.02em; }
.rule { font-size: 13px; color: var(--muted); }
.prompt-details { font-size: 12px; margin: 12px 0; }
.prompt-details summary { color: var(--moss); cursor: pointer; font-weight: 700; }
.prompt-details code {
  display: block; white-space: pre-wrap; padding: 10px; margin-top: 8px; background: #efe9de;
  border-radius: 8px; color: #5a534b; font: 11px/1.5 ui-monospace, SFMono-Regular, monospace;
}
#generate-status { min-height: 18px; }

/* Checkout */
.checkout { max-width: 620px; padding: 80px 30px; margin: auto; }
.checkout h2 { font-size: clamp(34px, 5vw, 50px); letter-spacing: -.03em; }
.order-row { display: flex; justify-content: space-between; padding: 22px 0; border-bottom: 1px solid var(--line); margin: 26px 0; font-size: 18px; }
footer { padding: 46px 30px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); }

@media (max-width: 760px) {
  .studio { grid-template-columns: 1fr; }
  .controls { border-right: 0; border-bottom: 1px solid var(--line); }
  .editor-preview { display: none; }
  .editor-form { padding: 42px 26px; min-height: 0; }
  .workbench h2 { font-size: 28px; }
  .deck { grid-template-columns: repeat(3, 1fr); }
  .step-grid { grid-template-columns: 1fr; }
  .scatter { display: none; }
}

/* Suit groups: Schelle / Herz / Laub / Eichel, ranks 6 → Ass left to right */
.suit-group { margin-bottom: 28px; }
.suit-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 2px 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.suit-head label { margin: 0; font-family: Georgia, serif; font-size: 19px; display: flex; align-items: center; gap: 8px; cursor: pointer; }
.suit-head > span { font-size: 12px; color: var(--muted); font-weight: 400; }
.suit-head .suit-pick { width: 15px; height: 15px; accent-color: var(--rose); cursor: pointer; }
.suit-glyph[data-suit="Herz"] { color: var(--clay); }
.suit-row { display: grid; grid-template-columns: repeat(9, 1fr); gap: 10px; }

/* Grey reference card (real deck scan, shaded, until designed) */
.card.ref { background: #fff; }
.card.ref::after { display: none; }
.ref-img { position: absolute; inset: 0; background: center/cover no-repeat; filter: grayscale(1) contrast(.95); opacity: .5; z-index: 0; }
.card.picked .ref-img { opacity: .7; }
.card .corner { position: absolute; display: flex; flex-direction: column; align-items: center; line-height: 1; font-family: Georgia, serif; color: var(--muted); opacity: .6; }
.card .corner.tl { top: 6px; left: 7px; }
.card .corner.br { bottom: 6px; right: 7px; transform: rotate(180deg); }
.card .corner .r { font-weight: bold; font-size: 14px; }
.card .corner .g { font-size: 11px; filter: grayscale(1); }
.ref-center { position: absolute; inset: 24% 15% 20%; display: flex; align-items: center; justify-content: center; }
.pips { display: flex; flex-wrap: wrap; gap: 2px; justify-content: center; align-items: center; filter: grayscale(1); opacity: .45; font-size: 13px; }
.court { display: flex; flex-direction: column; align-items: center; filter: grayscale(1); opacity: .55; }
.court .cg { font-size: 26px; }
.court .cr { font-family: Georgia, serif; font-weight: bold; font-size: 20px; color: var(--muted); }

/* Corner selection toggle */
.pick-wrap { position: absolute; top: 4px; right: 4px; z-index: 4; background: #ffffffcc; border-radius: 6px; padding: 1px 2px; line-height: 0; }
.pick { width: 15px; height: 15px; cursor: pointer; accent-color: var(--rose); margin: 0; }
.card.picked { box-shadow: 0 0 0 3px var(--rose), var(--shadow-m); }

/* Selection panel */
.sel-panel { margin-top: 14px; padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.sel-count { font-size: 12px; color: var(--muted); margin: 0; }
.sel-panel label { margin-top: 12px; }
.sel-actions { display: flex; gap: 10px; align-items: center; margin-top: 10px; }
.sel-actions .secondary { margin-top: 0; width: auto; flex: 1; padding: 10px 16px; }

/* Person row + crop button */
.person { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.person input { flex: 1 1 70px; }
.person select { flex: 0 0 auto; margin: 0; }
.person small { flex-basis: 100%; color: var(--muted); }
.crop-btn { border: 1px solid var(--line); background: #fff; border-radius: 7px; width: 30px; height: 30px; cursor: pointer; font-size: 14px; }
.crop-btn:hover { border-color: var(--rose); }

/* Crop dialog */
#cropper { max-width: 460px; padding: 26px; }
.crop-title { font-size: 26px; margin: 0 0 6px; }
.crop-stage { position: relative; display: inline-block; max-width: 100%; margin: 14px 0; line-height: 0; touch-action: none; }
#crop-img { max-width: 100%; max-height: 50vh; display: block; user-select: none; -webkit-user-drag: none; }
.crop-box { position: absolute; border: 2px solid var(--rose); box-shadow: 0 0 0 9999px #2a2521aa; cursor: move; touch-action: none; }
.crop-handle { position: absolute; right: -8px; bottom: -8px; width: 18px; height: 18px; background: var(--rose); border: 2px solid #fff; border-radius: 50%; cursor: nwse-resize; touch-action: none; }
.crop-actions { display: flex; justify-content: flex-end; gap: 12px; align-items: center; }

@media (max-width: 760px) {
  .suit-row { gap: 5px; }
  .card .corner .r { font-size: 11px; }
  .pips { font-size: 10px; }
}

/* ===== Card-edit bottom sheet (zauberspiele-style) ===== */
#editor.sheet { top: auto; bottom: 0; left: 0; right: 0; margin: 0 auto; max-width: 560px; width: 100%; border-radius: 22px 22px 0 0; padding: 0; max-height: 92vh; overflow: auto; }
.sheet-inner { padding: 14px 26px 30px; position: relative; animation: sheet-up .32s var(--ease); }
@keyframes sheet-up { from { transform: translateY(40px); opacity: .5; } }
.sheet-handle { display: block; width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 4px auto 14px; }
#editor.sheet h2 { font-size: 30px; margin-bottom: 4px; }
.sheet-label { font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 22px 0 10px; }

.who-row { display: flex; flex-wrap: wrap; gap: 8px; }
.who-pill { display: inline-flex; align-items: center; gap: 7px; border: 1.5px solid var(--rose); background: #fff; color: var(--rose-ink); border-radius: 99px; padding: 7px 14px; font: 700 14px inherit; cursor: pointer; }
.who-pill img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
.who-pill.active { background: var(--rose); color: #fff; }
.who-pill.add { border-style: dashed; }
.who-pill.clear { border-color: var(--line); color: var(--muted); }

.add-person { position: relative; border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-top: 12px; background: #fff; }
.np-close { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: none; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
.np-close:hover { background: #eee6d7; color: var(--ink); }
.add-person-top { display: flex; gap: 14px; align-items: center; padding-right: 30px; }
.foto-pick { flex: 0 0 auto; width: 72px; height: 72px; border-radius: 50%; border: 2px dashed var(--moss); display: grid; place-items: center; text-align: center; font-size: 11px; color: var(--moss); cursor: pointer; background-size: cover; background-position: center; overflow: hidden; }
.add-fields { flex: 1; }
.add-fields input { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px; font: 14px inherit; }
.add-fields small { color: var(--muted); display: block; margin-top: 4px; }
.species-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.species-row > span { font-size: 13px; color: var(--muted); }
.species { display: flex; flex-wrap: wrap; gap: 6px; }
.species button { border: 1.5px solid var(--line); background: #fff; border-radius: 99px; padding: 6px 12px; font: 600 13px inherit; cursor: pointer; color: var(--ink); }
.species button.active { border-color: var(--rose); background: var(--rose); color: #fff; }

.express { display: flex; flex-wrap: wrap; gap: 8px; }
.expr-pill { border: 1.5px solid var(--line); background: #fff; border-radius: 99px; padding: 8px 14px; font: 600 14px inherit; cursor: pointer; color: var(--ink); }
.expr-pill.active { border-color: var(--rose); background: var(--rose); color: #fff; }

.primary.big { width: 100%; margin-top: 20px; padding: 16px; }
.text-button.center { display: block; margin: 10px auto 0; width: 100%; }

/* Round select check on cards */
.pick-wrap { position: absolute; top: 6px; right: 6px; z-index: 5; width: 24px; height: 24px; padding: 0; background: none; }
.pick { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; z-index: 2; }
.pick-wrap .tick { position: absolute; inset: 0; border-radius: 50%; background: #fff; border: 2px solid var(--rose); display: grid; place-items: center; color: transparent; font-size: 13px; font-weight: bold; box-shadow: var(--shadow-s); }
.card.picked .pick-wrap .tick { background: var(--rose); border-color: var(--rose); color: #fff; }

/* Assignee avatar + name on a card */
.assignee { position: absolute; bottom: 6px; left: 6px; right: 6px; z-index: 3; display: flex; align-items: center; gap: 6px; background: #ffffffd9; border-radius: 99px; padding: 3px 9px 3px 3px; }
.assignee img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.assignee b { font-size: 10px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card.has-art .assignee { background: #000000a6; color: #fff; }
.card-edit { position: absolute; top: 6px; left: 50%; transform: translateX(-50%); z-index: 5; font-size: 10px; font-weight: 600; padding: 3px 9px; border-radius: 99px; border: 1px solid var(--line); background: #f6f1e8f2; color: var(--ink); cursor: pointer; opacity: 0; transition: opacity .12s var(--ease); white-space: nowrap; box-shadow: var(--shadow-s); }
.card:hover .card-edit { opacity: 1; }
.card-edit:hover { background: #fff; }
@media (hover: none) { .card-edit { opacity: 1; } }

/* ===== 3-phase flow (left panel removed) ===== */
.studio { display: block; max-width: 980px; margin: 0 auto; padding: 10px 24px 60px; background: none; border: 0; }
.phase { opacity: 0; transform: translateY(16px); transition: opacity .4s var(--ease), transform .4s var(--ease); margin: 52px 0; }
.phase.in { opacity: 1; transform: none; }
.phase-head { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.phase-num { width: 36px; height: 36px; border-radius: 50%; background: var(--clay); color: #fff; display: grid; place-items: center; font-family: Georgia, serif; font-size: 18px; flex: 0 0 auto; }
.phase-head h2 { font-size: clamp(28px, 4vw, 40px); letter-spacing: -.02em; }
.phase-sub { color: var(--muted); max-width: 620px; margin: 0 0 22px; }
.phase .primary { margin-top: 28px; }
.finish-info { margin: 28px 0 0; color: var(--ink); font-size: 15px; }
.finish-info + .primary { margin-top: 12px; }
#to-people { display: block; margin-top: 8px; }

/* People builder */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.pcard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 9px; align-items: center; box-shadow: var(--shadow-s); transition: box-shadow .2s var(--ease), transform .2s var(--ease); }
.pcard:hover { box-shadow: var(--shadow-m); transform: translateY(-2px); }
.pcard-photo { width: 84px; height: 84px; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; background-size: cover; background-position: center; overflow: hidden; }
.pcard-name { width: 100%; text-align: center; border: 1px solid var(--line); border-radius: 8px; padding: 7px; font: 600 13px inherit; }
.pcard-species { width: 100%; margin: 0; padding: 7px; font-size: 12px; border-radius: 8px; }
.pcard-actions { display: flex; gap: 8px; width: 100%; }
.pcard-actions button { flex: 1; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 6px; font: 600 11px inherit; cursor: pointer; color: var(--muted); }
.pcard-actions button:hover { border-color: var(--rose); color: var(--rose-ink); }
.pcard.add { border: 2px dashed var(--rose); justify-content: center; align-items: center; cursor: pointer; color: var(--rose-ink); font-weight: 700; text-align: center; min-height: 176px; }
.pcard.add:hover { background: #fcf0f2; }
.theme-field { margin-top: 28px; }

/* Assign tools */
.assign-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 22px; }
.assign-tools select { width: auto; min-width: 180px; margin: 0; }
.assign-tools .secondary { width: auto; margin: 0; padding: 11px 18px; }
.assign-tools .sel-count { font-size: 13px; color: var(--muted); }

/* Fine-tune preview in sheet */
.tune-preview { display: flex; gap: 18px; margin: 4px 0 10px; }
.tp-col { display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); }
.tp-img { width: 84px; height: 126px; border-radius: 8px; background: #fff center/cover no-repeat; border: 1px solid var(--line); }
.tp-img.round { width: 84px; height: 84px; border-radius: 50%; margin-top: 21px; }
.tp-img.empty { background: #efe9de; }
#card-prompt { min-height: 70px; }

/* Reveals + page load */
main { animation: page-in .3s ease-out both; }
@keyframes page-in { from { opacity: 0; } }
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .5s ease-out, transform .5s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 760px) {
  .studio { padding: 6px 16px 48px; }
  .people-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal, .phase { opacity: 1 !important; transform: none !important; }
}

/* ===== Phase 1 roster (round icons + names) ===== */
.add-photo { display: flex; align-items: center; gap: 16px; margin-top: 4px; padding: 14px 18px; border: 2px dashed var(--moss); border-radius: var(--radius); background: #fff; color: var(--moss); cursor: pointer; transition: background .2s; }
.add-photo:hover { background: #f1f5f0; }
.add-photo-ring { flex: 0 0 auto; width: 56px; height: 56px; border-radius: 50%; border: 2px dashed var(--moss); display: grid; place-items: center; font-size: 28px; line-height: 1; }
.add-photo-txt b { display: block; font-size: 16px; }
.add-photo-txt small { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; }
.crop-species { justify-content: center; margin: 0 0 16px; }
.roster-item.fresh .r-crop { border-color: var(--rose); }
.roster-item.fresh .r-name { border-bottom: 2px solid var(--rose); }
.people-roster { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 24px; }
.roster-item { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 92px; position: relative; }
.r-crop { width: 72px; height: 72px; border-radius: 50%; border: 2px solid var(--line); background: center/cover no-repeat; cursor: pointer; position: relative; }
.r-crop .r-edit { position: absolute; right: -2px; bottom: -2px; width: 24px; height: 24px; border-radius: 50%; background: var(--rose); color: #fff; font-size: 12px; display: grid; place-items: center; box-shadow: var(--shadow-s); }
.r-name { width: 100%; text-align: center; border: 0; border-bottom: 1px solid var(--line); background: transparent; font: 600 12px inherit; padding: 3px; }
.r-del { position: absolute; top: -6px; right: 2px; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--muted); cursor: pointer; font-size: 13px; line-height: 1; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); margin: 10px 0; text-align: left; line-height: 1.45; }
.consent input { width: 20px; height: 20px; margin: 1px 0 0; flex: 0 0 auto; cursor: pointer; }
.lnk { background: none; border: 0; padding: 0; color: var(--clay); text-decoration: underline; cursor: pointer; font: inherit; }
.order-warn { background: #c8102e; color: #fff; font-weight: 700; padding: 12px 16px; border-radius: 10px; margin: 0 0 16px; }
.order-warn[hidden] { display: none; }
#cf-overlay { position: fixed; inset: 0; z-index: 999; display: grid; place-items: center; background: #2a252188; backdrop-filter: blur(3px); }
#cf-overlay[hidden] { display: none; }
.cf-box { background: var(--panel); padding: 22px 26px; border-radius: 14px; box-shadow: var(--shadow-l); text-align: center; font-size: 14px; color: var(--ink); }
.r-count { font-size: 11px; font-weight: 700; color: var(--clay); background: #efe9de; border-radius: 99px; padding: 2px 7px; }
.b-count { font-size: 10px; font-weight: 600; color: var(--muted); }
.r-del:hover { border-color: var(--clay); color: var(--clay); }

/* ===== Phase 2 face brush ===== */
.brush-roster { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.brush { display: flex; flex-direction: column; align-items: center; gap: 6px; border: 2px solid transparent; border-radius: 14px; padding: 8px; background: #fff; cursor: pointer; width: 90px; transition: box-shadow .15s var(--ease), border-color .15s; }
.brush .b-img { width: 60px; height: 60px; border-radius: 50%; background: center/cover no-repeat; border: 1px solid var(--line); }
.brush b { font-size: 11px; font-weight: 700; max-width: 74px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brush.active { border-color: var(--rose); box-shadow: 0 0 0 3px #e07a8c33; }
.brush small { font-size: 10px; color: var(--muted); }
.brush-hint { flex-basis: 100%; margin: 0; color: var(--muted); font-size: 14px; }
.brush-hint b { color: var(--ink); }
.deck.brushing .card:not(.done) { cursor: copy; }

/* ===== Round face cropper ===== */
#cropper { max-width: 380px; padding: 26px; }
#crop-stage { position: relative; width: 300px; height: 300px; margin: 16px auto 12px; overflow: hidden; border-radius: 50%; background: #efe9de; touch-action: none; cursor: grab; box-shadow: 0 0 0 2px var(--rose); }
#crop-stage:active { cursor: grabbing; }
#crop-img { position: absolute; user-select: none; -webkit-user-drag: none; max-width: none; max-height: none; }
#crop-zoom { display: block; width: 300px; margin: 0 auto 16px; accent-color: var(--rose); }

/* Second start button under the guide */
.steps-cta { text-align: center; margin-top: 40px; }
.steps-cta .primary { width: auto; }
.steps-cta .cta-xl { font-size: 20px; padding: 20px 44px; box-shadow: 0 12px 30px #e07a8c66; }
@media (max-width: 760px) { .steps-cta .cta-xl { width: 100%; font-size: 19px; padding: 19px 24px; } }

/* ===== Face cropper (rectangular stage + dashed oval guide) ===== */
#cropper.sheet { max-width: 420px; }
h2.center, .rule.center { text-align: center; }
.crop-tip { background: #efe9de; color: var(--muted); border-radius: 12px; padding: 12px 16px; font-size: 13px; text-align: center; margin: 12px 0; }
#crop-stage { position: relative; width: 300px; height: 360px; margin: 6px auto 14px; overflow: hidden; border-radius: 14px; background: #efe9de; touch-action: none; cursor: grab; box-shadow: none; }
#crop-stage:active { cursor: grabbing; }
#crop-img { position: absolute; user-select: none; -webkit-user-drag: none; max-width: none; max-height: none; }
.crop-ring { position: absolute; left: 50%; top: 50%; width: 260px; height: 300px; transform: translate(-50%, -50%); border: 2px dashed #ffffffe6; border-radius: 50%; pointer-events: none; box-shadow: 0 0 0 2000px rgba(0,0,0,.18); }
#crop-zoom { display: block; width: 300px; margin: 0 auto 14px; accent-color: var(--rose); }
.crop-foot { display: flex; justify-content: space-between; margin-top: 8px; }

/* ===== Big view (double-click a done card) ===== */
#bigview { max-width: 960px; width: calc(100% - 40px); border-radius: 18px; padding: 0; background: var(--panel); box-shadow: var(--shadow-l); overflow: hidden; }
#bigview::backdrop { background: #2a252199; backdrop-filter: blur(4px); }
.big-inner { display: grid; grid-template-columns: 1fr 300px; }
.big-img { background: #fff center/contain no-repeat; min-height: 70vh; }
.big-side { padding: 28px 24px; display: flex; flex-direction: column; gap: 12px; justify-content: center; }
.big-side textarea { min-height: 90px; }
.big-side .primary, .big-side .secondary { width: 100%; margin: 0; }
.big-side .text-button { text-align: center; }
@media (max-width: 760px) { .big-inner { grid-template-columns: 1fr; } .big-img { min-height: 46vh; } }

/* ===== Parallax woven-pattern background ===== */
.bg-muster {
  position: fixed; inset: -12vh -12vw; z-index: -1;
  background: url(muster.avif) repeat; background-size: 240px auto;
  opacity: .06; pointer-events: none; will-change: transform;
  transform: translateZ(0); transform-origin: center top;
}
/* Sections emerge from the pattern with a subtle 3D lift */
.reveal { transform: perspective(1100px) translateY(26px) rotateX(5deg); transform-origin: center top; }
.phase { transform: perspective(1100px) translateY(18px) rotateX(4deg); }
@media (prefers-reduced-motion: reduce) { .bg-muster { transform: none !important; } }

/* Hero scatter cards -> example generated cards */
.scatter i::after { display: none; }
.scatter i { background: #fff center/cover no-repeat; border: 1px solid var(--line); }
.scatter i:nth-child(1) { background-image: url(examples/weihnachten.jpg); }
.scatter i:nth-child(2) { background-image: url(examples/kochen.jpg); }
.scatter i:nth-child(3) { background-image: url(examples/chefin.jpg); }
.scatter i:nth-child(4) { background-image: url(examples/goalie.jpg); }

/* Hero examples: show full card (contain), push outward off the text */
.scatter i { width: 96px; height: 160px; background-color: transparent; background-size: contain; background-position: center; background-repeat: no-repeat; border: 0; box-shadow: var(--shadow-m); }
.scatter i:nth-child(1) { top: 40px; left: 0%; transform: rotate(-13deg); }
.scatter i:nth-child(2) { top: 210px; left: 2%; transform: rotate(8deg); }
.scatter i:nth-child(3) { top: 52px; right: 0%; transform: rotate(12deg); }
.scatter i:nth-child(4) { top: 220px; right: 2%; transform: rotate(-7deg); }
@media (max-width: 900px) { .scatter { display: none; } }

/* Hero layout: bottom-fan (chosen), full-bleed so nothing is clipped */
.scatter { position: absolute; inset: 0; left: 50%; right: auto; width: 100vw; margin-left: -50vw; overflow: visible; z-index: -1; }
.scatter i { width: 120px; height: 200px; }
.scatter i:nth-child(1) { top: auto; bottom: -30px; left: 14%; transform: rotate(-15deg); }
.scatter i:nth-child(2) { top: auto; bottom: -55px; left: 33%; transform: rotate(-5deg); }
.scatter i:nth-child(3) { top: auto; bottom: -55px; right: 33%; transform: rotate(5deg); }
.scatter i:nth-child(4) { top: auto; bottom: -30px; right: 14%; transform: rotate(15deg); }

/* Checkout / order form */
.order-form { display: grid; gap: 2px; margin-top: 20px; text-align: left; }
.order-form label { margin: 12px 0 0; }
.order-form input:not([type=checkbox]) { width: 100%; }
.order-two { display: grid; grid-template-columns: 1fr 2fr; gap: 14px; }
.order-form .primary.big { width: 100%; margin-top: 22px; }

/* Keep hero examples visible (smaller) on mid widths; hide only on small phones */
@media (max-width: 900px) { .scatter { display: block; } .scatter i { width: 86px; height: 143px; } }
@media (max-width: 560px) { .scatter { display: none; } }

/* Generating spinner overlay on a card */
.card.generating { pointer-events: none; }
.card.generating::before { content: ""; position: absolute; inset: 0; background: #fbf8f2cc; z-index: 6; }
.card-spin { position: absolute; top: 50%; left: 50%; width: 30px; height: 30px; margin: -15px; border: 3px solid #e07a8c55; border-top-color: var(--rose); border-radius: 50%; z-index: 7; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Footer legal nav */
footer { display: flex; flex-direction: column; gap: 10px; align-items: center; text-align: center; }
.legal-nav { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
.legal-nav a, .legal-nav button { background: none; border: 0; color: var(--muted); font: 600 13px inherit; cursor: pointer; text-decoration: none; padding: 4px; }
.legal-nav a:hover, .legal-nav button:hover { color: var(--clay); text-decoration: underline; }
.legal-copy { font-size: 12px; color: var(--muted); }
#legal { max-width: 560px; padding: 0; border-radius: 16px; background: var(--panel); box-shadow: var(--shadow-l); }
.legal-inner { padding: 30px 28px; position: relative; }
.legal-inner h2 { font-size: 26px; margin-bottom: 12px; }
.legal-inner p { margin: 10px 0; }
.legal-page { max-width: 760px; margin: auto; padding: 60px 24px 90px; text-align: left; }
.legal-page h1 { font-size: clamp(34px, 5vw, 48px); letter-spacing: -.03em; margin: 8px 0 20px; }
.legal-page h2 { font-size: 24px; margin: 0 0 12px; letter-spacing: -.02em; }
.legal-page section { margin: 40px 0; padding-top: 28px; border-top: 1px solid var(--line); }
.legal-page p { margin: 10px 0; line-height: 1.6; color: var(--ink); }
.legal-page a { color: var(--clay); }
.legal-toc { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 14px 0; font-size: 14px; }
.legal-page h3 { font-size: 18px; margin: 26px 0 8px; scroll-margin-top: 20px; }
.legal-page h4 { font-size: 16px; margin: 18px 0 6px; }
.legal-page ul { margin: 10px 0; padding-left: 22px; line-height: 1.6; }
.legal-page li { margin: 4px 0; }
.legal-stand { color: var(--muted) !important; font-size: 14px; }
.legal-table { overflow-x: auto; }
.legal-table table { border-collapse: collapse; font-size: 14px; margin: 12px 0; }
.legal-table th, .legal-table td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.legal-draft { font-size: 13px; color: var(--muted); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }

/* ===== Rückseite (back page) designer ===== */
.back-group { margin-top: 30px; }
.backcard { position: relative; aspect-ratio: 56/100; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-s); overflow: hidden; cursor: pointer; transition: transform .16s var(--ease), box-shadow .2s var(--ease); }
.backcard:hover { transform: translateY(-4px) rotate(-1deg); box-shadow: var(--shadow-m); }
.back-frame { position: absolute; inset: 4% 7.14%; border: 2px solid #111; border-radius: 6px; overflow: hidden; }
.back-fill { position: absolute; inset: 0; }
.back-band { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: #fff; border: 1.5px solid #111; border-radius: 4px; padding: 2px 3px; text-align: center; white-space: nowrap; max-width: 86%; }
.back-name { font-family: "IM Fell English", Georgia, serif; color: #111; white-space: nowrap; line-height: 1; display: inline-block; max-width: 100%; }
.back-controls { margin-top: 16px; max-width: 420px; }
.back-colors { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 16px; }
.bc { width: 32px; height: 32px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.bc.active { box-shadow: 0 0 0 2px var(--rose); }
.bc.pat { background: #fff; display: grid; place-items: center; font-size: 17px; color: #333; }
.back-text-lbl input { width: 100%; }

/* Order review sheet */
#review { max-height: 92vh; overflow: auto; }
#review .primary.big { width: 100%; margin-top: 18px; }
.price-lines { margin: 22px 0 8px; }
.price-lines .order-row { margin: 0; padding: 10px 0; font-size: 16px; }
.price-lines .order-row:last-of-type { font-size: 18px; border-bottom: 0; }
.price-lines .delivery-note { margin-top: 6px; }

/* Suit icons (cut out of the cards) */
.suit-ico { height: 1.5em; width: auto; vertical-align: middle; display: inline-block; }
.card .suit .suit-ico { height: 16px; }
.suit-count { display: none; }

/* Crop: phones zoom with two fingers, so the slider is only for mouse users */
.only-touch { display: none; }
@media (pointer: coarse) {
  .only-touch { display: inline; }
  .only-mouse, #crop-zoom { display: none; }
}

/* Laptop too: each suit is a foldable chapter (click the head to open/close), cards stay 9 in a row */
#deck .suit-group { margin-bottom: 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden; }
#deck .suit-head { margin: 0; padding: 12px 16px; border-bottom: 0; cursor: pointer; }
#deck .suit-head label { pointer-events: none; }
#deck .suit-head .suit-count { display: inline; font-size: 14px; color: var(--muted); }
#deck .suit-head::after { content: "⌄"; font-size: 22px; line-height: 1; color: var(--muted); transition: transform .2s; }
#deck .suit-group:not(.collapsed) .suit-head::after { transform: rotate(180deg); }
#deck .suit-group:not(.collapsed) .suit-head { border-bottom: 1px solid var(--line); }
#deck .suit-row { padding: 14px; }
#deck .suit-group.collapsed .suit-row { display: none; }

/* Phones: each suit is a chapter – tap the head to open its 9 cards big (3 per row), tap again to close */
@media (max-width: 760px) {
  #deck .suit-group { margin-bottom: 10px; border: 1px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden; }
  #deck .suit-head { margin: 0; padding: 12px 14px; border-bottom: 0; cursor: pointer; }
  #deck .suit-head label { font-size: 21px; gap: 12px; pointer-events: none; }
  #deck .suit-head .suit-ico { height: 40px; }
  #deck .suit-head .suit-meaning { display: none; }
  #deck .suit-head .suit-count { display: inline; margin-left: auto; font-size: 14px; }
  #deck .suit-head::after { content: "⌄"; font-size: 22px; line-height: 1; color: var(--muted); transition: transform .2s; }
  #deck .suit-group:not(.collapsed) .suit-head::after { transform: rotate(180deg); }
  #deck .suit-group:not(.collapsed) .suit-head { border-bottom: 1px solid var(--line); }
  #deck .suit-row { grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 12px; }
  #deck .suit-group.collapsed .suit-row { display: none; }
}

/* Popups: back arrow that stays in the top-left corner while the popup scrolls */
.dlg-back { position: sticky; top: 10px; z-index: 20; display: block; width: 42px; height: 42px; margin: 10px 0 -52px 10px; padding: 0; border-radius: 50%; border: 1px solid var(--line); background: #fffffff2; color: var(--ink); font-size: 22px; line-height: 1; cursor: pointer; box-shadow: var(--shadow-s); }
.dlg-back:hover { background: #fff; }
.sheet .sheet-inner > h2:first-of-type { padding: 0 44px; }
/* Big card view: never clip its text – the popup scrolls instead (the side column used to be cut off top and bottom) */
#bigview { overflow: auto; max-height: calc(100dvh - 32px); overscroll-behavior: contain; }
.big-side { justify-content: flex-start; }
.big-side > :first-child { margin-top: auto; }
.big-side > :last-child { margin-bottom: auto; }
@media (max-width: 760px) {
  #bigview { width: calc(100% - 20px); }
  .big-img { min-height: 0; height: 52vh; }
  .big-side { padding: 18px 18px 22px; }
}

/* Order form fields: same look as the other fields (they were unstyled, 21 px high) */
.order-form input:not([type=checkbox]) { display: block; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px; font: 14px inherit; color: var(--ink); margin-top: 6px; transition: border-color .15s, box-shadow .15s; }
.order-form input:not([type=checkbox]):focus { outline: 0; border-color: var(--rose); box-shadow: 0 0 0 3px #e07a8c33; }
.order-form .consent input { width: 22px; height: 22px; flex: none; }

/* Touch screens: fields at 16 px (iOS zooms the page on smaller ones) and finger-sized tap targets */
@media (pointer: coarse) {
  input:not([type=checkbox]):not([type=range]):not([type=file]), textarea, select { font-size: 16px !important; }
  .species button { padding: 10px 16px; font-size: 15px; }
  .r-del { width: 30px; height: 30px; top: -10px; right: -4px; font-size: 18px; }
  footer a, .consent .lnk { padding: 8px 2px; display: inline-block; }
}
@media (max-width: 760px) {
  header { height: 62px; padding: 0 16px; }
  .brand { font-size: 21px; white-space: nowrap; }
  .deck-state { font-size: 12px; padding: 6px 10px; white-space: nowrap; }
}

/* Jump targets stop below the sticky header, so the heading and instructions of a step stay readable */
#studio, .phase, #checkout, #deck .suit-group, #order-form, .order-warn, #order-done { scroll-margin-top: 96px; }
@media (max-width: 760px) { #studio, .phase, #checkout, #deck .suit-group, #order-form, .order-warn, #order-done { scroll-margin-top: 76px; } }

/* Phones: the 4 example cards sit as a small fan under the hero text instead of being hidden */
@media (max-width: 560px) {
  .hero { display: flex; flex-direction: column; padding: 48px 22px 60px; }
  .hero .lede { font-size: 18px; margin: 20px auto 22px; }
  .scatter { display: flex; order: 9; position: static; width: auto; margin: 6px 0 0; justify-content: center; align-items: flex-end; overflow: visible; z-index: 0; }
  .scatter i, .scatter i:nth-child(n) { position: static; flex: none; width: 76px; height: 127px; margin: 0 -3px; }
  .scatter i:nth-child(1), .scatter i:nth-child(4) { margin-top: 14px; }
}

/* The studio only exists on the page after "Jetzt Deck gestalten" + Sicherheitsprüfung (.studio{display:block} used to override [hidden]) */
.studio[hidden] { display: none; }

/* Phones: roomier Gesamtthema field; back-design heading on one wide line with its hint underneath */
@media (max-width: 760px) {
  .theme-field { font-size: 18px; font-weight: 800; line-height: 1.25; }
  #theme { min-height: 170px; margin-top: 10px; font-weight: 400; }
  .back-group .suit-row { grid-template-columns: repeat(3, 1fr); }
  .back-group .suit-head { flex-direction: column; align-items: flex-start; gap: 6px; }
  .back-group .suit-head label { font-size: 18px; }
  .back-group .suit-head > span { font-size: 13px; line-height: 1.45; }
}

/* Back-design text field: same look as the other fields */
.back-text-lbl input { display: block; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px; font: 14px inherit; color: var(--ink); margin-top: 6px; }
.back-text-lbl input:focus { outline: 0; border-color: var(--rose); box-shadow: 0 0 0 3px #e07a8c33; }

/* ---- Gewinnspiel mit Hotel Ulli (banner, homepage teaser, /gewinnspiel) ---- */
.gw-banner { position: relative; z-index: 21; display: flex; align-items: center; gap: 16px; padding: 8px 52px 8px 20px; background: var(--panel); border-bottom: 1px solid var(--line); box-shadow: inset 0 -2px 0 #bf982155; font-size: 14px; }
.gw-banner[hidden] { display: none; }
.gw-banner-logo { flex: none; display: block; line-height: 0; }
.gw-banner-logo img { height: 34px; width: auto; }
.gw-banner-txt { flex: 1; display: flex; flex-wrap: wrap; gap: 2px 12px; align-items: baseline; min-width: 0; }
.gw-banner-txt strong { font-family: Georgia, "Times New Roman", serif; font-weight: 400; font-size: 17px; color: var(--ink); }
.gw-banner-txt span { color: var(--muted); font-size: 13px; }
.gw-banner-haus { flex: none; display: block; line-height: 0; margin: -8px 0 -9px; opacity: .85; }
.gw-banner-haus img { height: 56px; width: auto; }
.gw-banner-link { flex: none; color: var(--clay); font-weight: 700; text-decoration: none; white-space: nowrap; }
.gw-banner-link:hover { text-decoration: underline; }
.gw-banner-x { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; border-radius: 50%; background: none; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
.gw-banner-x:hover { background: #eee6d7; color: var(--ink); }
@media (max-width: 760px) {
  .gw-banner { gap: 10px; padding: 8px 44px 8px 12px; }
  .gw-banner-logo img { height: 26px; }
  .gw-banner-txt strong { font-size: 14px; line-height: 1.25; }
  .gw-banner-txt span { display: none; }
  .gw-banner-link { font-size: 13px; }
  .gw-banner-x { right: 4px; }
  .gw-banner-haus { display: none; }
}

.gw-teaser { max-width: 1040px; margin: -30px auto 0; padding: 0 30px 50px; }
.gw-teaser-card { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-s); color: inherit; text-decoration: none; transition: box-shadow .2s var(--ease), transform .2s var(--ease); }
.gw-teaser-card:hover { box-shadow: var(--shadow-m); transform: translateY(-2px); }
.gw-teaser-card img { display: block; width: 100%; height: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.gw-teaser-pics { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; align-self: stretch; background: var(--line); }
.gw-teaser-pics .main { grid-column: 1 / -1; }
.gw-teaser-pics picture { display: block; min-height: 0; }
.gw-teaser-card .gw-teaser-pics img { height: 100%; }
.gw-teaser-txt { padding: 26px 32px; }
.gw-teaser-txt .eyebrow { margin-bottom: 10px; }
.gw-teaser-txt h3 { font-family: Georgia, "Times New Roman", serif; font-weight: 400; font-size: clamp(24px, 3vw, 32px); line-height: 1.1; letter-spacing: -.02em; margin: 0 0 10px; }
.gw-teaser-txt p { margin: 0 0 16px; color: var(--muted); font-size: 15px; }
.gw-more { color: var(--clay); font-weight: 700; }
@media (max-width: 760px) { .gw-teaser { margin-top: -40px; } .gw-teaser-card { grid-template-columns: 1fr; } .gw-teaser-txt { padding: 20px 22px 24px; } }

.gw-back { color: var(--muted); font-weight: 600; font-size: 14px; text-decoration: none; }
.gw-back:hover { color: var(--clay); }
.gw-hero { text-align: center; max-width: 760px; margin: auto; padding: 56px 24px 32px; }
.gw-hero .eyebrow { justify-content: center; }
.gw-logo { display: inline-block; margin-bottom: 26px; }
.gw-logo img { width: 220px; height: auto; display: block; }
.gw-hero h1 { font-size: clamp(38px, 6.5vw, 68px); }
.gw-hero h1 em { color: var(--clay); font-style: italic; }
.gw-hero .lede { margin: 22px auto 22px; }
.gw-deadline { margin: 14px 0 0; color: var(--moss); font-weight: 700; font-size: 14px; letter-spacing: .02em; }

.gw-carousel { position: relative; max-width: 920px; margin: 10px auto 0; padding: 0 24px; }
.gw-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: var(--radius); box-shadow: var(--shadow-l); background: #2a2521; }
.gw-track::-webkit-scrollbar { display: none; }
.gw-track:focus-visible { outline: 3px solid var(--rose); outline-offset: 3px; }
.gw-slide { flex: 0 0 100%; margin: 0; scroll-snap-align: start; position: relative; }
.gw-slide img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.gw-slide figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 22px 16px; background: linear-gradient(transparent, #0008); color: #fff; font-family: Georgia, "Times New Roman", serif; font-size: 18px; }
.gw-slide figcaption small { display: block; font: 11px ui-rounded, system-ui, sans-serif; opacity: .8; }
.gw-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border: 0; border-radius: 50%; background: #fbf8f2e6; color: var(--ink); font-size: 30px; line-height: 1; cursor: pointer; box-shadow: var(--shadow-m); display: grid; place-items: center; padding-bottom: 4px; }
.gw-arrow:hover { background: #fff; }
.gw-arrow.prev { left: 40px; } .gw-arrow.next { right: 40px; }
.gw-dots { display: flex; justify-content: center; gap: 10px; margin-top: 16px; }
.gw-dots button { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 50%; background: #d6ccbc; cursor: pointer; transition: transform .2s, background .2s; }
.gw-dots button[aria-current="true"] { background: var(--clay); transform: scale(1.3); }
@media (max-width: 760px) { .gw-carousel { padding: 0; } .gw-track { border-radius: 0; } .gw-arrow { width: 38px; height: 38px; font-size: 24px; } .gw-arrow.prev { left: 10px; } .gw-arrow.next { right: 10px; } }

.gw-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin: 34px auto 0; padding: 0 24px; }
.gw-ctas a { width: auto; margin: 0; text-decoration: none; display: inline-block; }
.gw-terms { padding-top: 20px; }
.gw-terms h2 { font-size: clamp(28px, 4vw, 36px); margin-bottom: 8px; }
mark.tbd { background: #fff3d6; color: #7a5410; border-radius: 4px; padding: 0 4px; font-weight: 600; }
@media (max-width: 760px) { .gw-hero { padding-top: 36px; } }

/* Hero example cards are clickable/hoverable: they show the prompt behind them */
.scatter i { pointer-events: auto; cursor: help; transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.scatter i:hover, .scatter i:focus-visible { box-shadow: var(--shadow-l); outline: none; }
.ex-pop { position: absolute; z-index: 60; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-l); padding: 14px 16px; font-size: 14px; color: var(--ink); }
.ex-pop[hidden] { display: none; }
.ex-pop b { display: block; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--clay); margin-bottom: 6px; }
.ex-pop p { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: 16px; line-height: 1.35; }

/* "Card done" notifications: top-right on laptop, top-centre on phones */
.toasts { position: fixed; top: 14px; right: 14px; z-index: 80; display: flex; flex-direction: column; gap: 8px; width: 290px; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 12px 8px 8px; border: 1px solid var(--line); border-radius: 14px; background: #fffdf9f2; backdrop-filter: blur(8px); box-shadow: var(--shadow-m); text-align: left; cursor: pointer; font: inherit; color: var(--ink); animation: toast-in .3s var(--ease); transition: opacity .3s, transform .3s; }
.toast.out { opacity: 0; transform: translateY(-8px); }
.toast-img { flex: none; width: 30px; height: 50px; border-radius: 4px; background: #fff center/cover no-repeat; border: 1px solid var(--line); }
.toast-txt { display: flex; flex-direction: column; min-width: 0; }
.toast-txt b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toast-txt small { font-size: 12px; color: var(--muted); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
@media (max-width: 560px) { .toasts { left: 50%; right: auto; transform: translateX(-50%); width: calc(100vw - 24px); max-width: 360px; top: 10px; } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }
.hero .scatter { z-index: 0; }
.hero > :not(.scatter) { position: relative; z-index: 1; }


/* Spinner in the suit header while any of its cards is being generated */
.suit-spin { flex: none; width: 18px; height: 18px; margin: 0 0 0 -2px; border: 2.5px solid #e07a8c40; border-top-color: var(--rose); border-radius: 50%; animation: suit-spin .8s linear infinite; }
@media (max-width: 760px) { #deck .suit-head .suit-spin { margin: 0 8px 0 auto; } #deck .suit-head .suit-spin + .suit-count { margin-left: 0; } }
@keyframes suit-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .suit-spin { animation-duration: 2.4s; } }
.suit-head .suit-meaning { margin-left: auto; }

/* Theme examples above the theme box */
.theme-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 10px; font-weight: 400; }
/* Own wish under Gesicht / Kleidung chips */
.custom-in { width: 100%; margin-top: 10px; padding: 10px 14px; border: 1.5px dashed var(--line); border-radius: 12px; background: #fff; font: inherit; font-size: 15px; }
.custom-in:focus { outline: none; border-style: solid; border-color: var(--rose); }
/* Failed-card notification: same size as "fertig", red accent */
.toast.bad { border-color: #e5b3ab; }
.toast.bad .toast-img { display: grid; place-items: center; background: #f7e1dc; border-color: #e5b3ab; color: var(--clay); font: 700 20px Georgia, serif; }
.toast.bad .toast-txt b { color: var(--clay); }

/* Instagram link at the bottom of the page */
.insta { display: inline-flex; align-items: center; gap: 6px; margin: 2px auto; padding: 4px 11px; border: 1px solid var(--line); border-radius: 99px; background: #fff; color: var(--ink); font-weight: 600; font-size: 12px; text-decoration: none; transition: color .2s, border-color .2s; }
.insta:hover { color: var(--clay); border-color: var(--clay); }
.insta svg { flex: none; width: 15px; height: 15px; }

/* ---- Deck reveal: fan spin when all 36 cards are done, then a swipeable viewer (deck-reveal.js) ---- */
#deckreveal { width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; padding: 0; border: 0; background: transparent; overflow: hidden; animation: none; display: none; }
#deckreveal[open] { display: grid; place-items: center; }
#deckreveal::backdrop { background: #2a2521b8; backdrop-filter: blur(6px); animation: fade .45s var(--ease); }
.dr-stage { grid-area: 1 / 1; perspective: 1100px; display: grid; place-items: center; width: 100%; height: 100%; pointer-events: none; }
.dr-fan { position: relative; width: 130px; aspect-ratio: 56/100; transform-style: preserve-3d; will-change: transform; }
.dr-c { position: absolute; inset: 0; transform-origin: 50% 118%; transform-style: preserve-3d; transform: translateZ(var(--z)) rotate(var(--a)); }
.dr-c .f, .dr-c .b { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 9px; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 10px 30px #0006; }
.dr-c .f { object-fit: cover; background: #fff; }
.dr-c .b { background: #fff center/cover no-repeat; transform: rotateY(180deg); }
.dr-panel { grid-area: 1 / 1; width: min(720px, calc(100% - 24px)); max-height: calc(100dvh - 24px); overflow: hidden; background: var(--panel); border-radius: 22px; box-shadow: var(--shadow-l); padding: 30px 0 26px; text-align: center; position: relative; display: flex; flex-direction: column; align-items: center; }
.dr-panel[hidden] { display: none; }
.dr-panel .eyebrow { justify-content: center; margin-bottom: 8px; }
.dr-panel h2 { font-size: clamp(34px, 6vw, 50px); }
.dr-panel h2 em { color: var(--clay); font-style: italic; }
.dr-sub { color: var(--muted); margin: 8px 20px 0; font-size: 15px; }
.dr-x { position: absolute; top: 12px; right: 14px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 28px; line-height: 1; cursor: pointer; }
.dr-x:hover { background: var(--line); color: var(--ink); }
.dr-view { position: relative; width: 100%; margin-top: 14px; }
.dr-track { --sw: min(62vw, 240px, calc((100dvh - 330px) * .56)); display: flex; gap: 6px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 18px calc(50% - var(--sw) / 2); perspective: 900px; outline: none; cursor: grab; touch-action: pan-x; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.dr-track::-webkit-scrollbar { display: none; }
.dr-track.drag { scroll-snap-type: none; cursor: grabbing; }
.dr-slide { flex: 0 0 auto; width: var(--sw); aspect-ratio: 56/100; margin: 0; scroll-snap-align: center; transition: transform .12s linear, opacity .12s linear; }
.dr-slide img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; background: #fff; box-shadow: 0 12px 30px #2a252133; user-select: none; -webkit-user-drag: none; pointer-events: none; }
.dr-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: #fffc; color: var(--ink); font-size: 26px; line-height: 1; cursor: pointer; box-shadow: var(--shadow-s); }
.dr-arrow.prev { left: 14px; } .dr-arrow.next { right: 14px; }
.dr-meta { display: flex; gap: 12px; justify-content: center; align-items: baseline; margin: 4px 0 18px; }
.dr-name { font-family: Georgia, serif; font-size: 19px; }
.dr-count { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.dr-order { border: 0; cursor: pointer; font: inherit; }
@media (hover: none) { .dr-arrow { display: none; } }
@media (max-width: 560px) { .dr-fan { width: 96px; } .dr-panel { padding-top: 24px; } }

/* Phone: bigger "Karten gestalten" button in phase 1 */
@media (max-width: 560px) { #to-assign { display: block; width: 100%; padding: 19px 26px; font-size: 17px; } }
