/* ==========================================================================
   Fibonakel – das Orakel der Story Points
   Farbrollen: Gold = Handlung & Wert, Pergament = Karten, Samtviolett = Flächen,
   Zinnober = Warnung/Chaos, Grünspan = gelegt/bereit.
   Leistung: keine Überblendmodi, kein backdrop-filter, keine Endlos-Animationen
   auf großen Flächen. Bewegt wird nur kurz und nur per transform/opacity.
   ========================================================================== */

:root {
  --night: #0c0918;
  --night-2: #120d22;
  --velvet: #1d1433;
  --velvet-2: #2a1d48;
  --plum: #3b2458;

  --gold: #d9b45a;
  --gold-hi: #f3dc9b;
  --gold-lo: #8a6a2a;
  --gold-grad: linear-gradient(170deg, #fff1c4 0%, #ecc978 30%, #b88a37 55%, #f3d78e 78%, #a97d32 100%);
  --line: rgb(var(--acc) / .24);
  --line-strong: rgb(var(--acc) / .5);

  --text: #ece2c9;
  --text-dim: #a99cbf;
  --text-faint: #75698e;

  --vermilion: #e0643f;
  --verdigris: #6cc2ad;
  --amber: #f0a64a;

  --f-display: 'Cormorant Garamond', 'Cormorant', Garamond, Georgia, serif;
  --f-caps: 'Cinzel', 'Trajan Pro', 'Times New Roman', serif;
  --f-body: 'Spectral', Georgia, serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --acc: 217 180 90;
  --acc-hi: 243 220 155;
  --shade: 10 6 20;
  --warn: 224 100 63;
  --ital: italic;
  --f-prose: var(--f-display);
  --plate-1: rgba(40, 28, 70, .96);
  --plate-2: rgba(22, 15, 40, .97);
  --panel-1: rgba(22, 14, 42, .94);
  --panel-2: rgba(10, 6, 20, .97);
  --placeholder: rgba(236, 226, 201, .3);
  --on-acc: #26180a;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-spring: cubic-bezier(.3, 1.35, .45, 1);

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-variant-numeric: lining-nums;
  overflow-x: hidden;
}
.cs text { font-variant-numeric: lining-nums; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: not-allowed; }
a { color: var(--gold-hi); }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; }
::selection { background: rgb(var(--acc) / .35); color: #fff; }

.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ---------- Himmel ---------- */
.sky {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 55% at 50% 115%, rgba(118, 46, 138, .38), transparent 70%),
    radial-gradient(ellipse 55% 45% at -5% -5%, rgba(38, 70, 150, .32), transparent 70%),
    radial-gradient(ellipse 45% 40% at 105% 5%, rgba(150, 60, 60, .2), transparent 70%),
    var(--stars, none) 0 0 / 700px 700px,
    linear-gradient(180deg, #0b0816 0%, #110b22 55%, #190f2e 100%);
}
.sky::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grain, none) 0 0 / 160px 160px;
}

/* ---------- Symbole ---------- */
.ic {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -.18em;
}
.cup-inline { width: .95em; height: .95em; vertical-align: -.08em; color: currentColor; }

/* ---------- Grundbausteine ---------- */
.plate {
  position: relative;
  background:
    var(--grain, none) 0 0 / 160px,
    linear-gradient(180deg, var(--plate-1), var(--plate-2));
  border: 1px solid var(--line);
  border-radius: 3px;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8), inset 0 1px 0 rgb(var(--acc-hi) / .08);
}
.plate::before {
  content: '';
  position: absolute;
  inset: 5px;
  border: 1px solid rgb(var(--acc) / .1);
  pointer-events: none;
}
/* goldene Eckwinkel */
.plate::after {
  content: '';
  position: absolute;
  inset: -1px;
  pointer-events: none;
  --c: var(--gold);
  background:
    linear-gradient(var(--c), var(--c)) top left / 16px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) top left / 1px 16px no-repeat,
    linear-gradient(var(--c), var(--c)) top right / 16px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) top right / 1px 16px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom left / 16px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom left / 1px 16px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / 16px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) bottom right / 1px 16px no-repeat;
}

.btn-gold, .btn-ghost {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55em;
  min-height: 42px;
  padding: .7em 1.5em;
  font-family: var(--f-caps);
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: filter .2s, transform .15s var(--ease-out), background-color .2s, border-color .2s, color .2s;
}
.btn-gold {
  color: var(--on-acc);
  background: linear-gradient(180deg, #fdeebf 0%, #e7c46e 42%, #b98a3a 100%);
  clip-path: polygon(12px 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 12px 100%, 0 50%);
  padding-inline: 1.9em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), inset 0 -2px 0 rgba(90, 60, 10, .45);
  overflow: hidden;
}
.btn-gold::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .55) 50%, transparent 65%);
  transform: translateX(-110%);
  transition: transform .8s var(--ease-out);
}
.btn-gold:hover:not(:disabled) { filter: brightness(1.08) drop-shadow(0 0 14px rgba(240, 200, 110, .45)); }
.btn-gold:hover:not(:disabled)::after { transform: translateX(110%); }
.btn-gold:active:not(:disabled) { transform: translateY(1px) scale(.99); }
.btn-gold:disabled { filter: grayscale(.8) brightness(.55); }
.btn-gold.big { min-height: 54px; font-size: .9rem; padding-inline: 2.4em; }

.btn-ghost {
  color: var(--gold-hi);
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: rgb(var(--acc) / .04);
}
.btn-ghost:hover:not(:disabled) { background: rgb(var(--acc) / .12); border-color: var(--gold); }
.btn-ghost:disabled { opacity: .4; }
.btn-ghost.icon-only { padding: 0; width: 42px; }
/* Unwiderrufliches (alle Tickets entfernen): in jeder Welt in deren Warnfarbe */
html .btn-ghost.danger { color: var(--vermilion); }
html .btn-ghost.danger:hover:not(:disabled) { color: var(--vermilion); border-color: var(--vermilion); background: rgb(var(--warn) / .12); }
html .btn-gold.danger { color: #fff; background: var(--vermilion); text-shadow: none; }
/* Während der Wartezeit: blasser statt dunkel, die Zahl bleibt lesbar */
html .btn-gold.danger:disabled { filter: saturate(.45); opacity: .62; }
/* Die Zahl behält ihren Platz, damit der Knopf nach dem Countdown nicht springt */
.clear-count { font-variant-numeric: tabular-nums; }
.clear-count.done { visibility: hidden; }
.btn-ghost.icon-only .ic { width: 1.3em; height: 1.3em; }

.icon-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--gold-hi);
  border: 1px solid var(--line);
  transition: background-color .2s, border-color .2s;
}
.icon-btn:hover { background: rgb(var(--acc) / .1); border-color: var(--line-strong); }
.icon-btn .ic { width: 20px; height: 20px; }
.icon-btn.small { width: 32px; height: 32px; }
.icon-btn.small .ic { width: 16px; height: 16px; }
.icon-btn.off { color: var(--text-faint); }

.field { display: grid; gap: .4rem; }
.field > span {
  font-family: var(--f-caps);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
}
.field > span em { font-style: normal; color: var(--text-faint); letter-spacing: .1em; text-transform: none; font-family: var(--f-body); font-size: .8rem; }
input, textarea {
  width: 100%;
  background: rgb(var(--shade) / .6);
  border: 1px solid rgb(var(--acc) / .26);
  border-radius: 2px;
  color: var(--text);
  padding: .72rem .9rem;
  font: 1.02rem/1.4 var(--f-body);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
textarea { resize: vertical; font-family: var(--f-mono); font-size: .88rem; line-height: 1.6; }
input:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgb(var(--acc) / .14), 0 0 26px rgb(var(--acc) / .1); }
::placeholder { color: var(--placeholder); font-style: var(--ital); }
textarea::placeholder { font-style: normal; }

.check { display: grid; grid-template-columns: auto 1fr; gap: .75rem; align-items: start; cursor: pointer; color: var(--text-dim); font-size: .95rem; }
.check b { color: var(--text); font-weight: 600; }
.check input {
  appearance: none;
  width: 20px;
  height: 20px;
  margin: .15rem 0 0;
  padding: 0;
  border: 1px solid var(--line-strong);
  transform: rotate(45deg) scale(.82);
  background: transparent;
  cursor: pointer;
  transition: background-color .2s, box-shadow .2s;
}
.check input:checked { background: var(--gold); box-shadow: 0 0 12px rgb(var(--acc) / .6), inset 0 0 0 3px #1b1230; }

.eyebrow-s {
  font-family: var(--f-caps);
  font-size: .68rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ==========================================================================
   Karten
   ========================================================================== */
.card {
  --w: 110px;
  position: relative;
  display: block;
  width: var(--w);
  aspect-ratio: 7 / 12;
  border-radius: calc(var(--w) * .075);
  flex: none;
}
.face {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.face.front {
  background:
    var(--grain, none) 0 0 / 120px,
    radial-gradient(ellipse 90% 70% at 50% 35%, #faf2df 0%, #eee0c1 60%, #dcc79c 100%);
  box-shadow: 0 0 0 1px rgba(90, 62, 22, .55), 0 12px 26px -10px rgba(0, 0, 0, .75);
}
.face.back {
  background:
    radial-gradient(ellipse 80% 60% at 50% 48%, #2d1f55 0%, #170f2e 65%, #0f0a20 100%);
  box-shadow: 0 0 0 1px rgba(201, 162, 76, .6), 0 12px 26px -10px rgba(0, 0, 0, .75);
}
.face svg, .face .full, .face .mini { display: block; width: 100%; height: 100%; }

/* SVG-Kunst: Vorderseite */
.cs .fr { fill: none; stroke: #9a7630; stroke-width: 1.1; }
.cs .fr2 { fill: none; stroke: #9a7630; stroke-width: .55; }
.cs .ix { font-family: var(--f-display); font-weight: 700; fill: #2a1a0b; }
.cs .ixp { fill: #8a6424; }
.cs .ixs { fill: none; stroke: #8a6424; stroke-width: 1.4; stroke-linecap: round; }
.cs .rn { font-family: var(--f-caps); font-weight: 700; font-size: 9.5px; letter-spacing: .6px; fill: #8a6424; }
.cs .nm { font-family: var(--f-caps); font-weight: 700; font-size: 8px; letter-spacing: .9px; fill: #2a1a0b; }
.cs .nm.sm { font-size: 13px; letter-spacing: 2px; fill: #8a6424; }
.cs .nm-rule { fill: none; stroke: #9a7630; stroke-width: .6; }
.cs .win { fill: none; stroke: #6f511b; stroke-width: 1.8; }
.cs .win2 { fill: none; stroke: #f0d48a; stroke-width: .5; opacity: .55; }
.cs .tile { fill: none; stroke: #f0d48a; stroke-opacity: .2; stroke-width: .6; }
.cs .tile-hi { fill: #f0d48a; fill-opacity: .05; stroke-opacity: .38; }
.cs .spi { fill: none; stroke: #f0d48a; stroke-opacity: .5; stroke-width: .9; }
.cs .faint .tile { stroke-opacity: .12; }
.cs .faint .spi { stroke-opacity: .3; }
.cs .tn { font-family: var(--f-display); font-weight: 600; fill: #f0d48a; fill-opacity: .32; }
.cs .st { fill: #fff4d6; }
.cs .sg { fill: none; stroke: #f5dd9c; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.cs .sg.b { stroke-width: 2.8; }
.cs .sg.thin { stroke-width: .8; }
.cs .sg.dash { stroke-width: 1; stroke-dasharray: 1.4 3; }
.cs .sf { fill: #f5dd9c; }
.cs .sd { fill: #140d24; stroke: #f5dd9c; stroke-width: 1.3; stroke-linejoin: round; }
.cs .sd.cof { fill: #4a2912; }
.cs .sh { fill: none; stroke: #f5dd9c; stroke-opacity: .28; stroke-width: .8; }
.cs .sl { font-family: var(--f-caps); font-weight: 700; font-size: 9px; fill: #f5dd9c; }
.cs .big { font-family: var(--f-display); font-weight: 600; fill: #f8e6ad; stroke: rgba(10, 5, 20, .45); stroke-width: 3px; paint-order: stroke; }

/* SVG-Kunst: Rückseite */
.cs .bk-fr { fill: none; stroke: #c9a24c; stroke-width: 1.2; }
.cs .bk-fr2 { fill: none; stroke: #c9a24c; stroke-width: .5; opacity: .7; }
.cs .bk-ray { stroke: #c9a24c; stroke-opacity: .35; stroke-width: .6; }
.cs .bk-ray.b { stroke-opacity: .6; stroke-width: .9; }
.cs .bk-disc { fill: #120b24; stroke: #d9b45a; stroke-width: 1.4; }
.cs .bk-ring { fill: none; stroke: #d9b45a; stroke-width: .6; stroke-dasharray: 1 2.2; }
.cs .bk-tile .tile { stroke: #d9b45a; stroke-opacity: .3; }
.cs .bk-tile .tile-hi { fill: none; }
.cs .bk-tile .spi { stroke: #f3dc9b; stroke-opacity: .75; stroke-width: 1; }
.cs .bk-eye { fill: rgba(16, 10, 34, .88); stroke: #f3dc9b; stroke-width: 1.4; }
.cs .bk-iris { fill: #d9b45a; }
.cs .bk-pupil { fill: #120b24; }
.cs .bk-star { fill: #e8c979; }

/* ==========================================================================
   Startseite
   ========================================================================== */
.landing { position: relative; }

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: 3vw;
  padding: 7vh 6vw 9vh;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  top: -8%;
  bottom: -8%;
  left: 34%;
  right: -12%;
  pointer-events: none;
  opacity: .75;
}
.hero-spiral { width: 100%; height: 100%; display: block; }
.hero-spiral .bs-tiles rect {
  fill: none;
  stroke: #d9b45a;
  stroke-opacity: .13;
  stroke-width: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 1.6s var(--ease-out) forwards;
}
.hero-spiral .bs-spiral {
  fill: none;
  stroke: #e7c575;
  stroke-opacity: .5;
  stroke-width: 1.6;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw 3.4s .5s ease-in-out forwards;
}
.hero-spiral .bs-nums text {
  font-family: var(--f-display);
  font-style: var(--ital);
  fill: #d9b45a;
  fill-opacity: 0;
  animation: fade-in 1.5s 1.8s forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade-in { to { fill-opacity: .16; } }

.hero-copy { position: relative; z-index: 2; max-width: 620px; }
.eyebrow {
  display: flex;
  align-items: center;
  gap: .9rem;
  margin: 0 0 1.2rem;
  font-family: var(--f-caps);
  font-size: .72rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--gold);
}
.eyebrow i { width: 5px; height: 5px; background: var(--gold); transform: rotate(45deg); opacity: .7; }
.wordmark {
  position: relative;
  margin: 0;
  font-family: var(--f-display);
  font-style: var(--ital);
  font-weight: 600;
  font-size: clamp(4rem, 9.4vw, 10rem);
  line-height: .92;
  letter-spacing: -.015em;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 34px rgb(var(--acc) / .22));
  width: max-content;
  max-width: 100%;
  padding: .36em .1em 0 0;
}
.wordmark-logo {
  position: absolute;
  top: 0;
  left: .06em;
  width: .42em;
}
.wordmark-logo svg { width: 100%; display: block; }
.tagline {
  margin: .35rem 0 1rem;
  font-family: var(--f-display);
  font-style: var(--ital);
  font-size: clamp(1.4rem, 2.3vw, 2.1rem);
  color: var(--gold-hi);
}
.lede { margin: 0 0 2rem; max-width: 34em; color: var(--text-dim); font-size: 1.06rem; }

.rite { padding: 1.6rem 1.7rem 1.5rem; display: grid; gap: 1.1rem; max-width: 480px; }
.rite .btn-gold { justify-self: start; }
.or {
  display: flex;
  align-items: center;
  gap: .8rem;
  font-family: var(--f-prose);
  font-style: var(--ital);
  color: var(--text-faint);
  font-size: 1.02rem;
}
.or::before, .or::after { content: ''; height: 1px; flex: 1; background: linear-gradient(90deg, transparent, var(--line)); }
.or::after { background: linear-gradient(90deg, var(--line), transparent); }
.join-row { display: grid; grid-template-columns: 1fr auto; gap: .6rem; }
.code-input {
  font-family: var(--f-mono);
  letter-spacing: .4em;
  text-transform: uppercase;
  text-align: center;
  font-size: 1.05rem;
}
.code-input::placeholder { letter-spacing: .4em; font-style: normal; }

.hero-cards {
  position: relative;
  height: min(72vh, 640px);
  --w: clamp(130px, 12.5vw, 220px);
  transform: perspective(1400px) rotateY(calc(var(--px, 0) * 7deg)) rotateX(calc(var(--py, 0) * -6deg));
  transition: transform .6s var(--ease-out);
  z-index: 1;
}
.hero-cards .card {
  position: absolute;
  left: 50%;
  top: 50%;
  --w: inherit;
  transform: translate(-50%, -50%) translate(var(--x), var(--y)) rotate(var(--r));
  transition: transform .5s var(--ease-out);
  animation: deal 1s var(--ease-out) backwards;
  animation-delay: var(--delay);
  z-index: var(--z);
}
.hero-cards .card:hover {
  transform: translate(-50%, -50%) translate(var(--x), calc(var(--y) - var(--w) * .18)) rotate(calc(var(--r) * .6)) scale(1.05);
  z-index: 9;
}
.hero-cards .card .face.front { box-shadow: 0 0 0 1px rgba(90, 62, 22, .55), 0 30px 60px -18px rgba(0, 0, 0, .85), 0 0 60px -10px rgb(var(--acc) / .25); }
@keyframes deal {
  from { transform: translate(-50%, 30%) rotate(0deg) scale(.7); opacity: 0; }
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 2.4vh;
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: .4rem;
  color: var(--gold);
  text-decoration: none;
  font-family: var(--f-caps);
  font-size: .64rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  opacity: .75;
}
.scroll-cue i { width: 1px; height: 34px; background: linear-gradient(var(--gold), transparent); }

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3rem;
  padding: 5rem 6vw;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(20, 13, 38, .6), rgba(20, 13, 38, .2));
}
.step b {
  display: block;
  font-family: var(--f-caps);
  font-size: 2.4rem;
  line-height: 1;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.step h3 { margin: .7rem 0 .4rem; font-family: var(--f-display); font-size: 1.7rem; font-weight: 600; font-style: var(--ital); color: var(--gold-hi); }
.step p { margin: 0; color: var(--text-dim); }

.deck-gallery { padding: 6rem 6vw 5rem; text-align: center; }
.section-title {
  margin: 0;
  font-family: var(--f-display);
  font-style: var(--ital);
  font-weight: 600;
  font-size: clamp(2.6rem, 5vw, 4.2rem);
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.section-sub { margin: .4rem auto 3.5rem; color: var(--text-dim); max-width: 36em; }
.gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3rem 1.8rem;
  max-width: 1400px;
  margin: 0 auto;
}
.gallery figure { margin: 0; display: grid; justify-items: center; align-content: start; gap: .9rem; width: 180px; }
.gallery .card { --w: 158px; transition: transform .45s var(--ease-out); }
.gallery figure:hover .card { transform: translateY(-10px) rotate(-2.5deg) scale(1.03); }
.gallery figure:nth-child(even):hover .card { transform: translateY(-10px) rotate(2.5deg) scale(1.03); }
.gallery figcaption { display: grid; gap: .2rem; max-width: 190px; }
.gallery figcaption b { font-family: var(--f-caps); font-size: .78rem; letter-spacing: .14em; color: var(--gold-hi); text-transform: uppercase; }
.gallery figcaption span { font-family: var(--f-prose); font-style: var(--ital); font-size: 1.08rem; line-height: 1.3; color: var(--text-dim); }

.foot {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  padding: 2.4rem 6vw 3rem;
  color: var(--text-faint);
  font-family: var(--f-prose);
  font-style: var(--ital);
  font-size: 1.05rem;
  border-top: 1px solid var(--line);
  text-align: center;
  flex-wrap: wrap;
}
.foot span:first-child { font-family: var(--f-caps); font-style: normal; font-size: .75rem; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); }
.foot i { width: 5px; height: 5px; background: var(--gold); transform: rotate(45deg); opacity: .6; }

/* ==========================================================================
   Zirkel
   ========================================================================== */
.room {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  overflow: clip; /* clip statt hidden: Fokus auf eine Handkarte darf nichts verschieben */
}
.room > .stage { flex: 1; }

.topbar {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: .65rem 1.2rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgb(var(--shade) / .95), rgb(var(--shade) / .82));
}
.topbar::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -4px;
  width: 7px;
  height: 7px;
  background: var(--night);
  border: 1px solid var(--gold);
  transform: translateX(-50%) rotate(45deg);
}
.brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; flex: none; }
.brand .logo { width: 38px; height: 38px; }
.brand-name {
  font-family: var(--f-display);
  font-style: var(--ital);
  font-weight: 700;
  font-size: 1.6rem;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.logo .lg-ray { stroke: var(--gold); stroke-width: 2.6; stroke-linecap: round; fill: none; }
.logo .lg-eye { fill: rgba(19, 12, 38, .8); stroke: var(--gold-hi); stroke-width: 3; stroke-linejoin: round; }
.logo .lg-iris { fill: var(--gold); }
.logo .lg-spiral { fill: none; stroke: #140c26; stroke-width: 2.2; stroke-linecap: round; }

.session { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 1rem; }
.session-title {
  margin: 0;
  min-width: 0;
  font-family: var(--f-display);
  font-style: var(--ital);
  font-weight: 600;
  font-size: 1.45rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.session-title.editable { cursor: pointer; }
.session-title.editable:hover { color: var(--gold-hi); }
.code-chip {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .38rem .8rem;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  font-family: var(--f-mono);
  font-weight: 600;
  letter-spacing: .22em;
  color: var(--gold-hi);
  background: rgb(var(--acc) / .05);
  transition: background-color .2s;
  flex: none;
}
.code-chip:hover { background: rgb(var(--acc) / .14); }
.code-label { font-family: var(--f-caps); font-size: .6rem; letter-spacing: .2em; color: var(--text-dim); text-transform: uppercase; }
.top-actions { display: flex; align-items: center; gap: .5rem; flex: none; }
.me-chip {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .25rem .9rem .25rem .25rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  max-width: 220px;
  transition: border-color .2s, background-color .2s;
}
.me-chip:hover { border-color: var(--line-strong); background: rgb(var(--acc) / .06); }
.me-chip .avatar { --s: 32px; }
.me-chip .me-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .95rem; }
.drawer-btn, .drawer-close { display: none; }
.badge {
  position: absolute;
  top: -5px;
  right: -8px;
  padding: 0 .35rem;
  min-width: 18px;
  font-family: var(--f-mono);
  font-size: .62rem;
  line-height: 18px;
  border-radius: 9px;
  color: var(--on-acc);
  background: var(--gold);
}
.badge:empty { display: none; }

.conn {
  position: relative;
  z-index: 15;
  padding: .45rem 1rem;
  text-align: center;
  font-family: var(--f-prose);
  font-style: var(--ital);
  font-size: 1.05rem;
  color: #ffe0d2;
  background: linear-gradient(90deg, transparent, rgb(var(--warn) / .35), transparent);
  border-bottom: 1px solid rgb(var(--warn) / .45);
}

.stage { display: grid; grid-template-columns: minmax(0, 1fr) 370px; min-height: 0; }
.arena { position: relative; display: grid; grid-template-rows: minmax(0, 1fr) auto; min-height: 0; overflow: hidden; overflow: clip; }
.table-wrap { position: relative; min-height: 0; }

/* ---------- Avatare ---------- */
.avatar {
  --s: 48px;
  position: relative;
  display: inline-grid;
  place-items: center;
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  flex: none;
  font-family: var(--f-caps);
  font-weight: 700;
  font-size: calc(var(--s) * .32);
  letter-spacing: .04em;
  color: #fff6dc;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
  background: radial-gradient(circle at 34% 28%, hsl(var(--hue) 62% 60%), hsl(var(--hue) 55% 30%) 55%, hsl(var(--hue) 60% 14%));
  box-shadow: 0 0 0 2px #150e27, 0 0 0 3.5px #a9813a, 0 8px 18px rgba(0, 0, 0, .55);
}

/* ---------- Der Tisch ---------- */
.table { position: absolute; inset: max(15%, 88px) 12% 7%; }
.table::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    var(--grain, none) 0 0 / 160px,
    radial-gradient(ellipse 70% 65% at 50% 42%, #3d2866 0%, #2a1b4b 42%, #1a1030 78%, #120a24 100%);
  box-shadow:
    0 0 0 2px #7a5c24,
    0 0 0 7px #1a1128,
    0 0 0 8px rgb(var(--acc) / .55),
    0 0 0 16px rgba(26, 17, 40, .6),
    0 50px 110px -30px rgba(0, 0, 0, .9),
    0 0 140px -20px rgba(120, 70, 170, .35),
    inset 0 0 90px rgba(0, 0, 0, .55),
    inset 0 0 0 1px rgb(var(--acc-hi) / .15);
}
.table-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  height: 94%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%) rotate(var(--rot, 0deg));
  transition: transform 2.2s cubic-bezier(.25, .1, .15, 1);
  pointer-events: none;
}
.table-ring svg { width: 100%; height: 100%; display: block; overflow: visible; }
.table-ring .r1 { fill: none; stroke: var(--gold); stroke-opacity: .32; stroke-width: .4; }
.table-ring .r2 { fill: none; stroke: var(--gold); stroke-opacity: .22; stroke-width: .3; }
.table-ring .r3 { fill: none; stroke: var(--gold); stroke-opacity: .12; stroke-width: .3; stroke-dasharray: .8 1.6; }
.table-ring .r-tick { stroke: var(--gold); stroke-opacity: .28; stroke-width: .25; }
.table-ring .r-lab text { font-family: var(--f-caps); font-weight: 700; font-size: 4.4px; fill: var(--gold); fill-opacity: .45; }
.table-ring .r-lab path { fill: var(--gold); fill-opacity: .45; }
.table-ring .r-spi .tile { fill: none; stroke: var(--gold); stroke-opacity: .07; stroke-width: .6; }
.table-ring .r-spi .tile-hi { fill: none; }
.table-ring .r-spi .spi { fill: none; stroke: var(--gold); stroke-opacity: .16; stroke-width: 1; }
.table.revealed .table-ring .r-spi .spi { stroke-opacity: .3; }

/* ---------- Plätze ---------- */
.seats { position: absolute; inset: 0; }
.place { display: contents; }
.seat {
  position: absolute;
  left: var(--ax);
  top: var(--ay);
  z-index: 4;
  display: grid;
  justify-items: center;
  gap: 5px;
  width: 120px;
  transform: translate(-50%, -50%);
  transition: left .7s var(--ease-out), top .7s var(--ease-out), opacity .3s;
  text-align: center;
}
.seat .name {
  max-width: 120px;
  padding: 0 .5rem;
  font-size: .86rem;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
  background: rgb(var(--shade) / .72);
  border-radius: 999px;
}
.seat.you .name { color: var(--gold-hi); }
.seat.you { display: none; }
.seat.voted .avatar { box-shadow: 0 0 0 2px #150e27, 0 0 0 3.5px var(--gold-hi), 0 0 22px rgb(var(--acc-hi) / .55); }
.seat.offline { opacity: .42; }
.seat.offline .avatar { filter: grayscale(.7); }
.seat .host-mark {
  position: absolute;
  top: -8px;
  left: calc(50% + 12px);
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: var(--on-acc);
  background: var(--gold);
  box-shadow: 0 0 0 2px #150e27;
}
.seat .host-mark .ic { width: 14px; height: 14px; stroke-width: 2; }
.seat .tick {
  position: absolute;
  top: 30px;
  left: calc(50% + 14px);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #0f1f1a;
  background: var(--verdigris);
  box-shadow: 0 0 0 2px #150e27;
  transform: scale(0);
  transition: transform .3s var(--ease-spring);
}
.seat .tick .ic { width: 12px; height: 12px; stroke-width: 2.6; }
.seat.voted .tick { transform: scale(1); }
.table.revealed .seat .tick { transform: scale(0); }

.slot {
  --w: clamp(40px, 4.3vw, 70px);
  position: absolute;
  left: var(--cx);
  top: var(--cy);
  z-index: 3;
  width: var(--w);
  aspect-ratio: 7 / 12;
  border-radius: calc(var(--w) * .075);
  transform: translate(-50%, -50%) rotate(var(--tilt, 0deg));
  perspective: 700px;
}
.slot::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px dashed rgb(var(--acc) / .28);
  background: rgb(var(--shade) / .25);
  transition: opacity .3s;
}
.slot.down::before, .slot.up::before { opacity: 0; }
.slot .flip {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  transform-style: preserve-3d;
  transition: transform .8s var(--ease-spring) var(--d, 0ms);
}
.slot .face.front { transform: rotateY(180deg); }
.slot.empty .flip { opacity: 0; transition: none; }
.slot.down .flip { animation: land .5s var(--ease-spring); }
.slot.up .flip { transform: rotateY(180deg); }
.slot.up.winner .face.front { box-shadow: 0 0 0 1px rgba(90, 62, 22, .55), 0 0 0 3px var(--gold-hi), 0 0 26px rgb(var(--acc-hi) / .6); }
.slot.instant .flip { transition: none; animation: none; }
@keyframes land {
  from { transform: translateY(-46px) rotate(-14deg) scale(1.18); opacity: 0; }
}
.slot .mine {
  position: absolute;
  right: -7px;
  bottom: -7px;
  min-width: 24px;
  height: 24px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  color: var(--on-acc);
  background: var(--gold-hi);
  box-shadow: 0 0 0 2px #150e27;
  transform: rotate(calc(var(--tilt, 0deg) * -1));
}
.slot .mine:empty { display: none; }

/* ---------- Tischmitte ---------- */
.center {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 5;
  width: min(54%, 600px);
  transform: translate(-50%, -50%);
  display: grid;
  justify-items: center;
  gap: .7rem;
  text-align: center;
}
.ticket-head { display: flex; gap: .6rem; align-items: center; justify-content: center; min-height: 1.6rem; }
.ticket-key {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .18em .65em;
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: .82rem;
  letter-spacing: .08em;
  color: var(--gold-hi);
  text-decoration: none;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: rgb(var(--shade) / .4);
}
a.ticket-key:hover { background: rgb(var(--acc) / .14); }
.ticket-key .ic { width: .95em; height: .95em; }
.ticket-title {
  margin: 0;
  max-width: 22em;
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(1.25rem, 1.9vw, 2.05rem);
  line-height: 1.12;
  color: #f6ecd4;
  text-shadow: 0 2px 16px rgba(0, 0, 0, .6);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-wrap: balance;
}
.ticket-title.dim { color: var(--text-dim); font-style: var(--ital); font-weight: 500; }
.progress { display: grid; justify-items: center; gap: .45rem; }
.progress span {
  font-family: var(--f-caps);
  font-size: .66rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.pips { display: flex; gap: 7px; flex-wrap: wrap; justify-content: center; max-width: 320px; }
.pip { width: 9px; height: 9px; border: 1px solid var(--gold); transform: rotate(45deg); opacity: .6; transition: background-color .3s, box-shadow .3s, opacity .3s; }
.pip.on { background: var(--gold-hi); box-shadow: 0 0 10px var(--gold); opacity: 1; }
.actions { display: flex; gap: .6rem; flex-wrap: wrap; justify-content: center; align-items: center; }
.hint { margin: 0; font-family: var(--f-prose); font-style: var(--ital); font-size: 1.02rem; color: var(--text-dim); }
.hint kbd, .hand-hint kbd { font-family: var(--f-mono); font-style: normal; font-size: .78em; padding: .05em .4em; border: 1px solid var(--line); border-radius: 3px; color: var(--gold-hi); }
.timer {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .2rem .8rem;
  font-family: var(--f-mono);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: .06em;
  color: var(--gold-hi);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgb(var(--shade) / .5);
}
.timer.urgent { color: #ffd7c8; border-color: var(--vermilion); background: rgb(var(--warn) / .2); animation: pulse .5s ease-in-out infinite alternate; }
@keyframes pulse { to { transform: scale(1.06); } }

/* Die Prophezeiung */
.prophecy {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.3rem;
  align-items: center;
  text-align: left;
  width: 100%;
}
.prophecy.rise { animation: rise .8s var(--ease-out) var(--delay, 0ms) backwards; }
.prophecy.rise .verdict-card { animation: verdict 1.1s var(--ease-spring) var(--delay, 0ms) backwards; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes verdict { from { opacity: 0; transform: translateY(30px) rotate(-10deg) scale(.7); } }
.verdict-card { --w: clamp(72px, 6.2vw, 112px); }
.center .btn-gold, .center .btn-ghost { min-height: 38px; font-size: .72rem; padding-inline: 1.1em; }
.center .btn-gold { padding-inline: 1.6em; }
.center .btn-ghost.icon-only { width: 38px; padding: 0; }
.verdict-card .face.front { box-shadow: 0 0 0 1px rgba(90, 62, 22, .55), 0 0 0 4px rgb(var(--acc-hi) / .25), 0 0 50px rgb(var(--acc-hi) / .35), 0 20px 40px -10px rgba(0, 0, 0, .8); }
.verdict-body { display: grid; gap: .35rem; min-width: 0; }
.verdict-label { font-family: var(--f-caps); font-size: .66rem; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); }
.verdict {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1;
  color: var(--gold-hi);
  text-shadow: 0 0 30px rgb(var(--acc-hi) / .35);
}
.verdict span { font-style: var(--ital); font-weight: 500; font-size: .55em; color: var(--text); text-shadow: none; }
.omen { font-family: var(--f-prose); font-style: var(--ital); font-size: 1.12rem; line-height: 1.25; color: var(--text-dim); }
.stats { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; margin-top: .2rem; font-size: .9rem; color: var(--text-dim); }
.stat b { font-family: var(--f-display); font-size: 1.3rem; color: var(--text); margin-left: .15em; }
.agree {
  padding: .12rem .6rem;
  font-family: var(--f-caps);
  font-weight: 700;
  font-size: .64rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  border: 1px solid currentColor;
  border-radius: 2px;
}
.a-uni { color: var(--gold-hi); background: rgb(var(--acc-hi) / .12); box-shadow: 0 0 16px rgb(var(--acc-hi) / .35); }
.a-close { color: var(--verdigris); }
.a-split { color: var(--amber); }
.a-chaos { color: var(--vermilion); background: rgb(var(--warn) / .1); }
.a-none { color: var(--text-dim); }
.dist { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .15rem; }
.chip {
  display: inline-flex;
  align-items: baseline;
  gap: .25rem;
  padding: .05rem .55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgb(var(--shade) / .45);
  cursor: default;
}
.chip b { font-family: var(--f-display); font-weight: 700; font-size: 1.05rem; color: var(--text); }
.chip small { font-size: .74rem; color: var(--text-dim); }
.chip.hi { border-color: var(--gold); background: rgb(var(--acc) / .14); }
.chip.hi b { color: var(--gold-hi); }
.outliers { margin: .15rem 0 0; font-size: .88rem; color: var(--text-dim); }
.outliers b { color: var(--amber); font-weight: 600; }

/* ---------- Geister (Zuschauende) ---------- */
.ghosts {
  position: absolute;
  top: .9rem;
  left: 1.1rem;
  z-index: 6;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .4rem;
  max-width: 40%;
}
.ghosts-label { display: inline-flex; align-items: center; gap: .35rem; font-family: var(--f-caps); font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; color: var(--text-faint); }
.ghost { display: inline-flex; align-items: center; gap: .35rem; padding: .15rem .6rem .15rem .15rem; border-radius: 999px; border: 1px dashed rgba(169, 156, 191, .35); color: var(--text-dim); font-size: .8rem; }
.ghost .avatar { --s: 24px; opacity: .75; }
.ghost.offline { opacity: .45; }

/* ---------- Die Hand ---------- */
.hand-wrap {
  --hw: clamp(70px, 6.4vw, 118px);
  position: relative;
  z-index: 8;
  height: calc(var(--hw) * 12 / 7 * .66);
}
.hand-hint {
  display: none;
  margin: 0;
  line-height: 1.35;
  font-family: var(--f-prose);
  font-style: var(--ital);
  font-size: 1.02rem;
  color: var(--text-dim);
  pointer-events: none;
  transition: opacity .3s;
}
.hand {
  position: absolute;
  left: 50%;
  bottom: 0;
  display: flex;
  transform: translateX(-50%);
}
.hand-card {
  --w: var(--hw);
  --base: 36%;
  margin: 0 calc(var(--hw) * -.17);
  transform-origin: 50% 120%;
  transform: translateY(calc(var(--base) + var(--arc))) rotate(var(--rot));
  transition: transform .32s var(--ease-out), filter .3s;
  cursor: pointer;
}
.hand-card .mini { display: none; }
.hand-card:hover, .hand-card:focus-visible { --base: 2%; z-index: 20; outline: none; }
.hand-card:focus-visible .face.front { box-shadow: 0 0 0 2px var(--gold-hi), 0 12px 26px -10px rgba(0, 0, 0, .75); }
.hand-card.picked { --base: 8%; z-index: 19; }
.hand-card.picked:hover { --base: 2%; }
.hand-card.picked .face.front {
  box-shadow: 0 0 0 1px rgba(90, 62, 22, .55), 0 0 0 3px var(--gold-hi), 0 0 36px rgb(var(--acc-hi) / .7), 0 20px 30px -10px rgba(0, 0, 0, .8);
}
.hand.has-pick .hand-card:not(.picked):not(:hover) { filter: brightness(.8) saturate(.85); }
.hand.locked .hand-card { cursor: default; filter: brightness(.45) saturate(.3); }
.hand.locked .hand-card:hover { --base: 30%; }
.hand.choosing .hand-card.muted { filter: brightness(.4) saturate(.3); cursor: default; }
.hand.choosing .hand-card.muted:hover { --base: 36%; }
.hand.shake { animation: shake .6s cubic-bezier(.36, .07, .19, .97); }
@keyframes shake {
  10%, 90% { transform: translateX(calc(-50% - 2px)); }
  20%, 80% { transform: translateX(calc(-50% + 4px)); }
  30%, 50%, 70% { transform: translateX(calc(-50% - 8px)); }
  40%, 60% { transform: translateX(calc(-50% + 8px)); }
}

/* ---------- Schriftrollen ---------- */
.scrolls {
  position: relative;
  z-index: 12;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
  border-left: 1px solid var(--line);
  background:
    var(--grain, none) 0 0 / 160px,
    linear-gradient(180deg, var(--panel-1), var(--panel-2));
}
.scrolls-head { padding: 1.2rem 1.3rem .7rem; border-bottom: 1px solid var(--line); }
.scrolls-title { display: flex; align-items: center; justify-content: space-between; }
.scrolls-title h2 {
  margin: 0;
  font-family: var(--f-display);
  font-style: var(--ital);
  font-weight: 600;
  font-size: 1.85rem;
  line-height: 1.1;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.scrolls-meta { margin: .2rem 0 0; font-size: .88rem; color: var(--text-dim); }
.scrolls-meta b { color: var(--gold-hi); font-family: var(--f-display); font-size: 1.15rem; }
.ticket-list { list-style: none; margin: 0; padding: .5rem .6rem 1.2rem; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgb(var(--acc) / .3) transparent; }
.ticket {
  position: relative;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: .7rem;
  align-items: center;
  padding: .6rem .6rem .6rem .5rem;
  border: 1px solid transparent;
  border-radius: 3px;
  transition: background-color .2s, border-color .2s;
}
.ticket[data-act] { cursor: pointer; }
.ticket[data-act]:hover { background: rgb(var(--acc) / .06); }
.ticket.current {
  border-color: rgb(var(--acc) / .45);
  background: linear-gradient(90deg, rgb(var(--acc) / .17), rgb(var(--acc) / .03));
}
.ticket.current::before {
  content: '';
  position: absolute;
  left: -.6rem;
  top: 18%;
  bottom: 18%;
  width: 3px;
  background: var(--gold-hi);
  box-shadow: 0 0 12px var(--gold);
}
.t-mark { display: grid; place-items: center; width: 36px; height: 36px; }
.t-num { font-family: var(--f-display); font-size: 1.1rem; color: var(--text-faint); }
.t-eye { color: var(--gold-hi); }
.t-eye .ic { width: 24px; height: 24px; }
.seal {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: #ffe9b8;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .4);
  background: radial-gradient(circle at 35% 30%, #d14a36, #9c2419 55%, #5e120c);
  border-radius: 46% 54% 50% 50% / 52% 46% 54% 48%;
  box-shadow: 0 0 0 2px rgba(120, 25, 15, .5), inset 0 0 0 3px rgba(255, 180, 150, .12), inset 0 -3px 6px rgba(0, 0, 0, .35), 0 3px 8px rgba(0, 0, 0, .5);
}
.seal.stamped { animation: stamp .6s var(--ease-spring); }
@keyframes stamp { from { transform: scale(2.4) rotate(-25deg); opacity: 0; } }
.t-body { display: grid; min-width: 0; }
.t-key { font-family: var(--f-mono); font-weight: 600; font-size: .74rem; letter-spacing: .06em; color: var(--gold); }
.t-title { font-size: .95rem; line-height: 1.3; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ticket.done .t-title { color: var(--text-dim); }
.t-tools { display: flex; gap: .15rem; opacity: 0; transition: opacity .2s; }
.ticket:hover .t-tools, .ticket:focus-within .t-tools { opacity: 1; }
.t-tool { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: var(--text-dim); }
.t-tool:hover { color: var(--gold-hi); background: rgb(var(--acc) / .12); }
.t-tool .ic { width: 16px; height: 16px; }
.scrolls-empty { padding: 2rem 1.4rem; text-align: center; color: var(--text-dim); }
.scrolls-empty p { margin: 0 0 1rem; font-family: var(--f-prose); font-style: var(--ital); font-size: 1.15rem; }
.scrolls-foot { display: flex; flex-wrap: wrap; gap: .5rem; padding: .9rem 1.1rem 1.1rem; border-top: 1px solid var(--line); }
.scrolls-foot .btn-gold { flex: 1 1 100%; }
.scrolls-foot .btn-ghost { flex: 1; padding-inline: .8rem; }

/* ---------- Überlagerungen ---------- */
.pop {
  position: fixed;
  z-index: 60;
  min-width: 220px;
  padding: .5rem;
  display: grid;
  gap: 2px;
  animation: pop-in .18s var(--ease-out);
}
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.pop-head { display: flex; align-items: center; gap: .6rem; padding: .5rem .6rem .7rem; margin-bottom: .2rem; border-bottom: 1px solid var(--line); }
.pop-head .avatar { --s: 34px; }
.pop-head b { display: block; font-weight: 600; }
.pop-head small { color: var(--text-dim); font-size: .8rem; }
.pop-item {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: .7rem;
  width: 100%;
  padding: .55rem .7rem;
  border-radius: 2px;
  text-align: left;
  font-size: .95rem;
  color: var(--text);
}
.pop-item:hover { background: rgb(var(--acc) / .12); color: var(--gold-hi); }
.pop-item .ic { color: var(--gold); }
.pop-item.danger { color: #f3a58c; }
.pop-item.danger .ic { color: var(--vermilion); }
.pop-item.active { color: var(--gold-hi); }
.pop-sep { height: 1px; margin: .25rem .4rem; background: var(--line); }
.pop-note { padding: .4rem .7rem .5rem; font-size: .82rem; color: var(--text-dim); max-width: 260px; }

dialog {
  width: min(520px, calc(100vw - 32px));
  max-width: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  overflow: visible;
}
dialog:has(.wide) { width: min(640px, calc(100vw - 32px)); }
dialog[open] { animation: dlg-in .35s var(--ease-out); }
dialog::backdrop { background: rgb(var(--shade) / .78); }
@keyframes dlg-in { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.dlg { padding: 1.8rem 1.8rem 1.5rem; display: grid; gap: 1.1rem; }
.dlg h2 {
  margin: -.6rem 0 .2rem;
  font-family: var(--f-display);
  font-style: var(--ital);
  font-weight: 600;
  font-size: 2.1rem;
  line-height: 1.1;
  color: var(--gold-hi);
}
.dlg-eyebrow { margin: 0; font-family: var(--f-caps); font-size: .66rem; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); }
.dlg-actions { display: flex; justify-content: flex-end; gap: .7rem; margin-top: .3rem; flex-wrap: wrap; }
.fine { margin: 0; font-size: .85rem; color: var(--text-faint); }
.code-field { font-family: var(--f-mono); text-transform: uppercase; letter-spacing: .12em; }
.code-field::placeholder { text-transform: none; letter-spacing: normal; }
.code-preview b { color: var(--text); font-family: var(--f-mono); font-weight: 600; letter-spacing: .04em; }
.code-preview.bad { color: var(--vermilion); }
.clear-text { margin: 0; color: var(--text-dim); line-height: 1.5; }
.clear-text b { color: var(--text); }
.clear-export { display: flex; flex-wrap: wrap; gap: .5rem; }
/* Läuft in 5 Sekunden voll; erst dann gibt der Dialog das Löschen frei */
.clear-wait { height: 4px; border-radius: 2px; background: rgb(var(--acc) / .14); overflow: hidden; }
.clear-wait i { display: block; height: 100%; background: var(--vermilion); transform-origin: left; }
#dlg-clear.armed .clear-wait i { animation: clear-wait 5s linear both; }
@keyframes clear-wait { from { transform: scaleX(0); } }
.preview { display: grid; gap: .25rem; font-size: .88rem; color: var(--text-dim); min-height: 1.4em; }
.preview b { color: var(--gold-hi); font-family: var(--f-display); font-size: 1.15rem; }
.preview ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .15rem; max-height: 8.5em; overflow: auto; }
.preview li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.preview code { font-family: var(--f-mono); font-size: .8rem; color: var(--gold); margin-right: .5rem; }

.toasts {
  position: fixed;
  top: 76px;
  left: 50%;
  z-index: 80;
  display: grid;
  gap: .5rem;
  justify-items: center;
  transform: translateX(-50%);
  pointer-events: none;
  width: min(560px, calc(100vw - 32px));
}
.toast {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .7rem 1.2rem;
  font-family: var(--f-prose);
  font-size: 1.12rem;
  font-style: var(--ital);
  color: var(--text);
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: linear-gradient(180deg, var(--plate-1), var(--plate-2));
  box-shadow: 0 16px 40px -10px rgba(0, 0, 0, .8), 0 0 30px -8px rgb(var(--acc) / .3);
  animation: toast-in .4s var(--ease-spring);
  transition: opacity .5s, transform .5s;
}
.toast .ic { color: var(--gold-hi); width: 1.2em; height: 1.2em; }
.toast.warn { border-color: rgb(var(--warn) / .6); }
.toast.warn .ic { color: var(--vermilion); }
.toast.out { opacity: 0; transform: translateY(-10px); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-14px) scale(.96); } }

.fx-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 70; pointer-events: none; }

.scrim { display: none; }

/* ---------- Welten ---------- */
/* Schriftklassen der Karten gelten überall, damit Vorschauen fremder Welten stimmen */
.sv-t { font-family: 'Oswald', 'Arial Narrow', sans-serif; font-weight: 500; }
.sv-t.b { font-weight: 700; }
.ro-t { font-family: 'Cinzel', serif; font-weight: 600; }
.ro-t.b { font-weight: 700; }
.ar-vt { font-family: 'VT323', monospace; }
.ar-px { font-family: 'Pixelify Sans', monospace; font-weight: 700; }
.sb-hand { font-family: 'Caveat', 'Comic Sans MS', cursive; font-weight: 600; }
.sb-hand.b { font-weight: 700; }
.sb-arial { font-family: 'Arimo', Arial, Helvetica, sans-serif; font-weight: 400; }
.sb-arial.b { font-weight: 700; }

.worlds {
  position: absolute;
  top: 1.8rem;
  right: 2.5vw;
  z-index: 6;
  display: grid;
  justify-items: end;
  gap: .6rem;
  padding: .8rem 1rem .7rem;
  background: rgb(var(--shade) / .72);
  border: 1px solid var(--line);
}
.worlds-label {
  margin: 0;
  font-family: var(--f-caps);
  font-size: .66rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
}
.worlds-row { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .8rem; }
.world {
  display: grid;
  justify-items: center;
  gap: .4rem;
  width: 78px;
  color: var(--text-dim);
  transition: transform .25s var(--ease-out), color .2s;
}
.world:hover { transform: translateY(-4px); color: var(--text); }
.world-card { --w: 50px; transition: box-shadow .25s; }
.world-card .face { box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .7); }
.world.active { color: var(--gold-hi); }
.world.active .world-card { box-shadow: 0 0 0 2px var(--gold-hi), 0 0 22px rgb(var(--acc-hi) / .5); }
.world-name { font-family: var(--f-caps); font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; text-align: center; line-height: 1.2; }
.worlds-hint { margin: 0; max-width: 20rem; text-align: right; font-size: .82rem; color: var(--text-faint); }

.pop-world { display: grid; grid-template-columns: 34px 1fr; gap: .8rem; align-items: center; width: 100%; padding: .5rem .6rem; text-align: left; color: var(--text); }
.pop-world:hover { background: rgb(var(--acc) / .1); }
.pop-world .card { --w: 34px; }
.pop-world b { display: block; font-family: var(--f-caps); font-size: .82rem; letter-spacing: .06em; }
.pop-world small { color: var(--text-dim); font-size: .82rem; }
.pop-world.active b { color: var(--gold-hi); }
.pop-world.active .card { box-shadow: 0 0 0 2px var(--gold-hi); }

/* Stempel auf der Entscheidung (Welten mit stamps) */
.verdict-card { position: relative; }
.stamp {
  --r: -16deg;
  position: absolute;
  left: 50%;
  top: 60%;
  z-index: 2;
  padding: .12em .32em;
  font-family: var(--f-caps);
  font-weight: 700;
  font-size: calc(var(--w) * .23);
  line-height: 1;
  letter-spacing: .04em;
  white-space: nowrap;
  color: var(--stamp-ok, #5d8a3a);
  border: 4px solid currentColor;
  background: rgb(255 255 255 / .12);
  transform: translate(-50%, -50%) rotate(var(--r));
  pointer-events: none;
  opacity: .93;
}
.stamp.no { --r: 11deg; color: var(--stamp-no, #b8412f); }
.stamp.slam { animation: slam .55s cubic-bezier(.3, 1.5, .5, 1) calc(var(--delay, 0ms) + 450ms) backwards; }
@keyframes slam { from { transform: translate(-50%, -50%) rotate(var(--r)) scale(2.8); opacity: 0; } }

/* Wechsel der Welt: kurz überblenden */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .45s; }

/* ==========================================================================
   Kleinere Bildschirme
   ========================================================================== */
@media (max-width: 1180px) {
  .stage { grid-template-columns: minmax(0, 1fr) 310px; }
  .brand-name { display: none; }
  .table { inset: max(15%, 88px) 11% 7%; }
}

@media (max-width: 1000px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding-top: 5vh; }
  .worlds-row { justify-content: center; }
  .hero-cards { height: 360px; order: -1; --w: clamp(110px, 20vw, 170px); }
  .worlds { position: static; justify-items: center; order: -2; }
  .worlds-hint { text-align: center; }
  .hero-bg { left: 0; right: 0; opacity: .5; }
  .steps { grid-template-columns: 1fr; gap: 2rem; }
  .scroll-cue { display: none; }
}

@media (max-width: 760px), (max-height: 520px) and (orientation: landscape) {
  body { font-size: 15px; }
  .topbar { gap: .6rem; padding: .5rem .7rem; }
  .brand .logo { width: 32px; height: 32px; }
  .session { justify-content: flex-start; gap: .5rem; }
  .session-title { font-size: 1.1rem; }
  .code-label, .code-chip .ic { display: none; }
  .code-chip { padding: .3rem .5rem; letter-spacing: .12em; font-size: .8rem; }
  .me-chip { padding: 2px; }
  .me-chip .me-name { display: none; }
  .me-chip .avatar { --s: 30px; }
  .top-actions { gap: .3rem; }
  .icon-btn { width: 34px; height: 34px; }
  .icon-btn .ic { width: 17px; height: 17px; }
  .drawer-btn, .drawer-close { display: inline-grid; }

  .stage { grid-template-columns: 1fr; }
  .arena { grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden auto; }
  .ghosts { position: static; max-width: none; padding: .6rem .8rem 0; }
  .table-wrap { padding: .8rem .8rem 1.2rem; }
  .table { position: relative; inset: auto; display: grid; gap: 1.1rem; padding: 1.2rem .8rem 1.4rem; }
  .table::before { border-radius: 28px; }
  .table-ring { height: auto; width: 110%; opacity: .6; }
  .seats { position: relative; inset: auto; display: flex; flex-wrap: wrap; justify-content: center; gap: .9rem .5rem; }
  .place { display: grid; justify-items: center; gap: 6px; width: 70px; }
  .slot, .seat { position: relative; left: auto; top: auto; transform: none; }
  .slot { --w: 42px; }
  .slot .mine { transform: none; }
  .seat { width: 70px; gap: 3px; }
  .seat .avatar { --s: 30px; }
  .seat .name { max-width: 70px; font-size: .74rem; padding: 0 .3rem; }
  .seat .host-mark { top: -6px; left: calc(50% + 8px); width: 17px; height: 17px; }
  .seat .host-mark .ic { width: 11px; height: 11px; }
  .seat .tick { top: 18px; left: calc(50% + 8px); width: 15px; height: 15px; }
  .center { position: relative; left: auto; top: auto; transform: none; width: auto; }
  .ticket-title { font-size: 1.35rem; }
  .prophecy { gap: .9rem; align-items: start; }
  .seat.you { display: grid; }
  .verdict-card { --w: 74px; }
  .verdict { font-size: 1.9rem; }

  .hand-wrap {
    --hw: auto;
    height: auto;
    padding: .5rem .5rem calc(.6rem + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgb(var(--shade) / .92), rgb(var(--shade) / .98));
  }
  .hand-hint { display: block; text-align: center; font-size: .9rem; margin-bottom: .4rem; }
  .hand-tip { display: none; }
  .hand { position: static; transform: none; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; max-width: 480px; margin: 0 auto; }
  .hand.shake { animation: shake-m .6s; }
  .hand-card { --w: 100%; margin: 0; transform: none; transition: transform .2s var(--ease-out), filter .2s; }
  .hand-card .full { display: none; }
  .hand-card .mini { display: block; }
  .hand-card:hover, .hand-card:focus-visible { transform: none; }
  .hand-card.picked { transform: translateY(-5px); }
  .hand.locked .hand-card:hover, .hand.choosing .hand-card.muted:hover { transform: none; }

  .scrolls {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    width: min(92vw, 380px);
    transform: translateX(105%);
    transition: transform .35s var(--ease-out);
    box-shadow: -30px 0 60px rgba(0, 0, 0, .6);
  }
  .room.drawer-open .scrolls { transform: none; }
  .scrim { display: block; position: fixed; inset: 0; z-index: 45; background: rgb(var(--shade) / .6); opacity: 0; pointer-events: none; transition: opacity .3s; }
  .room.drawer-open .scrim { opacity: 1; pointer-events: auto; }
  .t-tools { opacity: 1; }

  .hero { padding: 3vh 1rem 4rem; gap: 1rem; }
  .worlds { position: static; justify-items: center; order: -2; }
  .worlds-hint { text-align: center; }
  .worlds-row { gap: .6rem .25rem; }
  .world { width: 58px; }
  .world-card { --w: 40px; }
  .world-name { font-size: .56rem; }
  .hero-cards { height: 260px; --w: 108px; }
  .wordmark { font-size: clamp(3.4rem, 17vw, 5rem); }
  .rite { padding: 1.3rem 1.1rem 1.2rem; }
  .rite .btn-gold { justify-self: stretch; }
  .eyebrow { font-size: .62rem; gap: .6rem; letter-spacing: .22em; }
  .steps, .deck-gallery { padding-inline: 1rem; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 1rem; }
  .gallery .card { --w: min(140px, 38vw); }
  .dlg { padding: 1.4rem 1.2rem 1.2rem; }
  .dlg h2 { font-size: 1.7rem; }
  .toasts { top: 60px; }
}
@keyframes shake-m {
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; transition-delay: 0ms !important; }
  /* Der Balken zeigt die Wartezeit an, ein voller Balken bei gesperrtem Knopf führt in die Irre */
  #dlg-clear.armed .clear-wait i { animation-duration: 5s !important; }
}
