:root {
  --ink: #1a0b1f;
  --ink2: #2a1230;
  --card: rgba(255, 244, 232, .08);
  --card-b: rgba(255, 224, 138, .22);
  --text: #fff4e8;
  --muted: #cdb9c9;
  --red: #e3263a;
  --red2: #ff5a4d;
  --gold: #ffd25a;
  --gold2: #d89a22;
  --jade: #3fd08a;
  --sakura: #ff9ec4;
  --radius: 22px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35);
  --serif: 'Shippori Mincho', 'Hiragino Mincho ProN', Georgia, serif;
  --sans: 'Zen Maru Gothic', 'Hiragino Maru Gothic ProN', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; color: var(--text); font-family: var(--sans); font-size: 17px; line-height: 1.45;
  background: radial-gradient(120% 80% at 50% 0%, #4a1230 0%, var(--ink2) 45%, var(--ink) 100%) fixed;
  overflow-x: hidden;
}
button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--gold); }

/* ---------- Hintergrund ---------- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.moon {
  position: absolute; width: 220px; height: 220px; border-radius: 50%; right: -40px; top: 90px;
  background: radial-gradient(circle at 35% 35%, #fff6d8, #ffd98a 60%, #e9a94a);
  box-shadow: 0 0 80px 30px rgba(255, 210, 120, .28); opacity: .85; animation: breathe 7s ease-in-out infinite;
}
.waves {
  position: absolute; left: 0; right: 0; bottom: 0; height: 38vh; opacity: .35;
  background:
    radial-gradient(circle at 50% 100%, transparent 38%, rgba(255,210,90,.55) 39%, rgba(255,210,90,.55) 41%, transparent 42%) 0 0 / 56px 28px,
    radial-gradient(circle at 50% 100%, transparent 38%, rgba(255,210,90,.35) 39%, rgba(255,210,90,.35) 41%, transparent 42%) 28px 14px / 56px 28px;
  -webkit-mask-image: linear-gradient(transparent, #000 70%); mask-image: linear-gradient(transparent, #000 70%);
  animation: drift 24s linear infinite;
}
.bamboo { position: absolute; bottom: 0; width: 90px; height: 300px; opacity: .55; transform-origin: bottom center; animation: sway 6s ease-in-out infinite; }
.b1 { left: -10px; } .b2 { right: -14px; height: 380px; width: 110px; animation-delay: -3s; }
.petals span {
  position: absolute; top: -40px; width: var(--s); height: var(--s); left: var(--x);
  background: radial-gradient(ellipse at 30% 30%, #ffd1e3, var(--sakura)); border-radius: 80% 0 80% 0;
  opacity: .8; animation: fall var(--d) linear var(--delay) infinite;
}

/* ---------- Header ---------- */
.top { text-align: center; padding: 6px 16px 0; position: relative; }
.rope { position: relative; height: 92px; max-width: 520px; margin: 0 auto; }
.rope::before { content: ''; position: absolute; left: -16px; right: -16px; top: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--gold2), transparent); }
.lan { position: absolute; top: 0; width: 44px; height: 55px; transform-origin: 50% 0; animation: swing 4s ease-in-out infinite; filter: drop-shadow(0 6px 14px rgba(227, 38, 58, .6)); }
.l1 { left: 8%; } .l2 { left: 50%; margin-left: -26px; width: 52px; height: 65px; animation-delay: -1.3s; } .l3 { right: 8%; animation-delay: -2.4s; }
.brand { font-family: var(--serif); font-weight: 800; font-size: 30px; margin: -26px 0 6px; letter-spacing: .02em; text-shadow: 0 2px 18px rgba(255, 90, 77, .55); }
.kanji { color: var(--gold); margin-right: 6px; }
.steps { list-style: none; display: flex; justify-content: center; gap: 6px; padding: 0; margin: 4px 0 10px; font-size: 13px; color: var(--muted); }
.steps li { display: flex; align-items: center; gap: 6px; }
.steps li + li::before { content: ''; width: 18px; height: 2px; background: rgba(255,255,255,.18); border-radius: 2px; }
.steps b { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; background: rgba(255,255,255,.12); transition: .4s; }
.steps li.on { color: var(--text); } .steps li.on b { background: linear-gradient(135deg, var(--gold), var(--gold2)); color: #4a2800; transform: scale(1.18); box-shadow: 0 0 14px rgba(255, 210, 90, .7); }
.steps li.done b { background: var(--jade); color: #07311d; }
.steps span { display: none; } @media (min-width: 560px) { .steps span { display: inline; } }

/* ---------- Layout ---------- */
main { max-width: 640px; margin: 0 auto; padding: 8px 16px 130px; }
.screen.enter > * { animation: rise .6s cubic-bezier(.2, .9, .3, 1.2) both; }
.screen.enter > *:nth-child(2) { animation-delay: .06s; } .screen.enter > *:nth-child(3) { animation-delay: .12s; }
.screen.enter > *:nth-child(4) { animation-delay: .18s; } .screen.enter > *:nth-child(5) { animation-delay: .24s; }
h2 { font-family: var(--serif); font-size: 27px; margin: 14px 0 4px; line-height: 1.2; }
.lead { color: var(--muted); margin: 0 0 16px; }
.card {
  background: var(--card); border: 1px solid var(--card-b); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 14px;
  backdrop-filter: blur(8px); box-shadow: var(--shadow); position: relative;
}
.hero { text-align: center; }
.hero svg { width: 130px; height: 130px; animation: float 4s ease-in-out infinite; filter: drop-shadow(0 12px 22px rgba(0,0,0,.4)); }
.flame { transform-origin: 50% 100%; animation: flicker 1s ease-in-out infinite alternate; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 26px; border: 0; border-radius: 999px;
  font-weight: 700; font-size: 18px; color: #3d1e00; background: linear-gradient(180deg, #ffe58f, var(--gold2)); box-shadow: 0 6px 0 #9a6410, 0 12px 22px rgba(0,0,0,.35);
  transition: transform .12s, box-shadow .12s, filter .2s; position: relative; overflow: hidden;
}
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #9a6410; }
.btn.red { color: #fff; background: linear-gradient(180deg, var(--red2), #b3121f); box-shadow: 0 6px 0 #6f0a13, 0 12px 22px rgba(0,0,0,.35); }
.btn.ghost { background: transparent; color: var(--text); border: 1.5px solid var(--card-b); box-shadow: none; min-height: 44px; font-size: 15px; }
.btn.small { min-height: 40px; padding: 0 16px; font-size: 15px; box-shadow: 0 4px 0 #9a6410; }
.btn[disabled] { filter: grayscale(.8) brightness(.7); pointer-events: none; }
.btn:not([disabled]).pulse { animation: pulse 1.6s infinite; }
.btn::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%); transform: translateX(-120%); }
.btn:not([disabled]):hover::after { transform: translateX(120%); transition: transform .7s; }
.row-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 12px; }

/* ---------- Namenswahl ---------- */
.names { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.name-btn {
  display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 18px; border: 1px solid var(--card-b); background: var(--card);
  text-align: left; font-weight: 700; font-size: 18px; transition: transform .2s, box-shadow .2s, background .2s;
}
.name-btn:hover, .name-btn:focus-visible { transform: translateY(-3px) rotate(-1deg); background: rgba(255, 210, 90, .15); box-shadow: 0 8px 24px rgba(255, 210, 90, .2); outline: none; }
.name-btn:active { transform: scale(.96); }
.name-btn small { display: block; font-weight: 400; color: var(--jade); font-size: 12px; }
.avatar { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 16px; color: #2b0a1d; background: var(--c, var(--gold)); box-shadow: inset 0 -4px 0 rgba(0,0,0,.15), 0 4px 10px rgba(0,0,0,.3); position: relative; }
.avatar.sm { width: 34px; height: 34px; font-size: 12px; }
.avatar .ok { position: absolute; right: -4px; bottom: -4px; width: 18px; height: 18px; background: var(--jade); border-radius: 50%; color: #07311d; padding: 2px; border: 2px solid var(--ink2); }

/* ---------- Getränke & Stepper ---------- */
.drink-head { display: flex; align-items: center; gap: 12px; }
.ico { width: 54px; height: 54px; flex: none; filter: drop-shadow(0 6px 8px rgba(0,0,0,.35)); }
.drink-head .t { flex: 1; min-width: 0; }
.drink-head .t b { font-size: 19px; display: block; }
.drink-head .t small { color: var(--muted); }
.stepper { display: inline-flex; align-items: center; gap: 4px; background: rgba(0,0,0,.28); padding: 4px; border-radius: 999px; }
.sb { width: 44px; height: 44px; border-radius: 50%; border: 0; font-size: 26px; line-height: 1; font-weight: 700; background: rgba(255, 255, 255, .1); transition: transform .12s, background .2s; }
.sb[data-act$="inc"] { background: linear-gradient(180deg, #ffe58f, var(--gold2)); color: #3d1e00; }
.sb:active { transform: scale(.85); }
.sb[disabled] { opacity: .3; pointer-events: none; }
.stepper output { min-width: 38px; text-align: center; font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.bump { animation: bump .35s; }
.pips { display: flex; gap: 6px; margin: 12px 0 4px; flex-wrap: wrap; }
.pip { width: 18px; height: 18px; border-radius: 50%; border: 2px dashed rgba(255,255,255,.35); transition: .35s cubic-bezier(.3, 1.8, .5, 1); }
.pip.f { background: var(--gold); border: 2px solid var(--gold); transform: scale(1.1); box-shadow: 0 0 10px rgba(255, 210, 90, .7); }
.pip.me { background: var(--sakura); border-color: var(--sakura); box-shadow: 0 0 10px rgba(255, 158, 196, .7); }
.remain { font-size: 14px; color: var(--muted); }
.remain.ok { color: var(--jade); font-weight: 700; }
.guest-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid rgba(255,255,255,.07); }
.guest-row:first-of-type { margin-top: 8px; }
.guest-row .n { flex: 1; font-weight: 500; }
.guest-row.lock { opacity: .7; }
.guest-row .self { font-size: 13px; color: var(--sakura); }

.dock { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgba(26, 11, 31, .96) 40%); z-index: 20; }
.dock-in { max-width: 640px; margin: 0 auto; display: flex; align-items: center; gap: 12px; }
.bar { flex: 1; height: 12px; border-radius: 99px; background: rgba(255,255,255,.12); overflow: hidden; }
.bar i { display: block; height: 100%; width: var(--p, 0%); border-radius: 99px; background: linear-gradient(90deg, var(--red2), var(--gold)); transition: width .5s cubic-bezier(.3, 1.2, .5, 1); }

/* ---------- Warten ---------- */
.wait { text-align: center; }
.wait .big-lantern { width: 120px; height: 150px; margin: 6px auto 0; display: block; transform-origin: 50% 0; animation: swing 3.5s ease-in-out infinite; filter: drop-shadow(0 10px 26px rgba(227,38,58,.7)); }
.who { display: flex; flex-wrap: wrap; gap: 14px 10px; justify-content: center; margin-top: 10px; }
.who .p { width: 76px; font-size: 13px; opacity: .55; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.who .p.y { opacity: 1; } .who .p.y .avatar { animation: bump .6s; }

/* ---------- Ergebnis ---------- */
.podium { display: flex; justify-content: center; align-items: flex-end; gap: 10px; margin: 20px 0 10px; min-height: 250px; }
.pod { flex: 1; max-width: 150px; text-align: center; position: relative; }
.pod .avatar { margin: 0 auto 6px; width: 56px; height: 56px; font-size: 18px; }
.pod .blk { border-radius: 14px 14px 0 0; display: grid; place-items: start center; padding-top: 8px; font-family: var(--serif); font-size: 36px; font-weight: 800; transform-origin: bottom; animation: grow 1s cubic-bezier(.2, 1, .3, 1) both; animation-delay: var(--dl); }
.pod.p1 .blk { height: 150px; background: linear-gradient(180deg, #ffe58f, var(--gold2)); color: #5a3300; }
.pod.p2 .blk { height: 112px; background: linear-gradient(180deg, #e9eef5, #98a4b5); color: #2b3340; }
.pod.p3 .blk { height: 84px; background: linear-gradient(180deg, #f1b88a, #b3703a); color: #4a2400; }
.pod .nm { font-weight: 800; font-size: 17px; } .pod .pt { font-size: 13px; color: var(--muted); }
.pod .trophy { position: absolute; top: -62px; left: 50%; width: 52px; height: 52px; margin-left: -26px; animation: float 2.4s ease-in-out infinite; }
.rank { display: flex; align-items: center; gap: 12px; width: 100%; background: none; border: 0; padding: 8px 0; text-align: left; }
.rank + .detail { margin-top: 8px; }
.rank .pos { width: 26px; text-align: center; font-weight: 800; color: var(--gold); }
.rank .nm { flex: 1; font-weight: 700; }
.rank .score { font-family: var(--serif); font-size: 24px; font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; }
.rank .sub { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.rank.me .nm::after { content: ' (du)'; color: var(--sakura); font-weight: 500; }
.detail { border-top: 1px dashed rgba(255,255,255,.15); padding-top: 10px; animation: rise .4s both; }
.mini { margin-bottom: 12px; font-size: 14px; }
.mini h4 { margin: 0 0 6px; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.mini h4 svg { width: 22px; height: 22px; }
.grid { display: grid; grid-template-columns: 62px repeat(8, 1fr); gap: 3px; text-align: center; }
.grid > div { padding: 4px 0; border-radius: 6px; background: rgba(0,0,0,.2); font-variant-numeric: tabular-nums; }
.grid .h { background: none; color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: clip; white-space: nowrap; }
.grid .l { background: none; text-align: left; color: var(--muted); font-size: 12px; }
.grid .exact { background: var(--jade); color: #07311d; font-weight: 800; }
.grid .near { background: var(--gold); color: #4a2800; font-weight: 800; }
.grid .miss { background: rgba(227, 38, 58, .5); }
.grid .skip { opacity: .35; }

/* ---------- Admin ---------- */
.field { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
input[type="text"], input[type="password"], input[type="number"], select {
  font: inherit; color: var(--text); background: rgba(0,0,0,.3); border: 1px solid var(--card-b); border-radius: 12px; padding: 10px 12px; min-height: 44px; min-width: 0;
}
input:focus, select:focus { outline: 2px solid var(--gold); }
select option { color: #000; }
.field input[type="text"] { flex: 1 1 150px; } .field input[type="number"] { width: 76px; }
.adm-guest { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid rgba(255,255,255,.07); }
.adm-guest .n { flex: 1; }
.tag { font-size: 12px; padding: 2px 8px; border-radius: 99px; background: rgba(255,255,255,.12); }
.tag.ok { background: var(--jade); color: #07311d; } .tag.warn { background: var(--gold); color: #4a2800; }
.sumline { font-size: 14px; color: var(--muted); margin-top: 6px; } .sumline.ok { color: var(--jade); } .sumline.bad { color: var(--red2); }

/* ---------- Effekte ---------- */
.toast { position: fixed; left: 50%; bottom: 100px; transform: translate(-50%, 30px); background: #fff4e8; color: #2b0a1d; padding: 10px 18px; border-radius: 999px; font-weight: 700; opacity: 0; transition: .35s; z-index: 50; pointer-events: none; box-shadow: var(--shadow); max-width: 90vw; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
#fx { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
#fx i { position: absolute; top: -20px; left: var(--x); width: var(--w); height: var(--h); background: var(--c); border-radius: 2px; animation: confetti var(--d) cubic-bezier(.3, .6, .5, 1) forwards; }
#fx .burst { top: 45%; width: 70px; height: 70px; border: 4px solid var(--gold); background: none; border-radius: 50%; animation: ring 1s ease-out forwards; margin-left: -35px; }
.foot { text-align: center; padding: 0 16px 24px; font-size: 13px; color: var(--muted); display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.foot a { text-decoration: none; opacity: .8; }

/* ---------- Keyframes ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(28px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes swing { 0%, 100% { transform: rotate(5deg); } 50% { transform: rotate(-5deg); } }
@keyframes sway { 0%, 100% { transform: rotate(-1.5deg); } 50% { transform: rotate(2deg); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes drift { to { background-position: 56px 0, 84px 14px; } }
@keyframes flicker { from { transform: scale(1) rotate(-3deg); } to { transform: scale(1.15, 1.25) rotate(3deg); } }
@keyframes fall { 0% { transform: translate(0, 0) rotate(0); } 50% { transform: translate(40px, 55vh) rotate(180deg); } 100% { transform: translate(-30px, 112vh) rotate(380deg); } }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.35); color: var(--gold); } 100% { transform: scale(1); } }
@keyframes pulse { 0%, 100% { box-shadow: 0 6px 0 #9a6410, 0 0 0 0 rgba(255, 210, 90, .6), 0 12px 22px rgba(0,0,0,.35); } 50% { box-shadow: 0 6px 0 #9a6410, 0 0 0 14px rgba(255, 210, 90, 0), 0 12px 22px rgba(0,0,0,.35); } }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes confetti { to { transform: translate(var(--dx), 110vh) rotate(var(--r)); opacity: .9; } }
@keyframes ring { from { transform: scale(.2); opacity: 1; } to { transform: scale(9); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .petals, #fx { display: none; }
}
@media (max-width: 380px) { .names { grid-template-columns: 1fr; } .grid { grid-template-columns: 50px repeat(8, 1fr); } }

/* ---------- Große Schrift & große Buttons (gut lesbar ohne Brille) ---------- */
body { font-size: 21px; line-height: 1.5; }
main { max-width: 700px; padding-bottom: 160px; }
.dock-in { max-width: 700px; }
.brand { font-size: 38px; }
h2 { font-size: 34px; }
.lead { font-size: 21px; }
.card { padding: 18px 20px; }
.btn { min-height: 66px; padding: 0 32px; font-size: 24px; }
.btn.small { min-height: 56px; padding: 0 24px; font-size: 20px; }
.btn.ghost { min-height: 56px; font-size: 20px; }
.sb { width: 62px; height: 62px; font-size: 34px; }
.stepper { gap: 6px; padding: 5px; }
.stepper output { min-width: 52px; font-size: 32px; }
.ico { width: 66px; height: 66px; }
.drink-head .t b { font-size: 24px; }
.drink-head .t small { font-size: 17px; }
.name-btn { font-size: 24px; padding: 16px 14px; min-height: 84px; }
.name-btn small { font-size: 15px; }
.avatar { width: 56px; height: 56px; font-size: 20px; }
.avatar.sm { width: 44px; height: 44px; font-size: 16px; }
.avatar .ok { width: 22px; height: 22px; }
.guest-row { padding: 10px 0; gap: 14px; }
.guest-row .n { font-size: 22px; }
.guest-row .self, .remain { font-size: 18px; }
.pip { width: 24px; height: 24px; }
.steps { font-size: 16px; }
.steps b { width: 32px; height: 32px; font-size: 16px; }
.steps span { display: inline; }
.who .p { width: 90px; font-size: 16px; }
.pod .nm { font-size: 21px; } .pod .pt { font-size: 16px; }
.pod .blk { font-size: 44px; }
.rank .nm { font-size: 22px; } .rank .sub { font-size: 15px; }
.rank .score { font-size: 32px; } .rank .score small { font-size: 17px !important; }
.rank .pos { font-size: 22px; width: 32px; }
.mini { font-size: 17px; } .mini h4 { font-size: 18px; }
.grid { grid-template-columns: 64px repeat(8, 1fr); } .grid > div { padding: 7px 0; font-size: 18px; }
.grid .l, .grid .h { font-size: 15px; }
input[type="text"], input[type="password"], input[type="number"], select { font-size: 20px; min-height: 54px; }
.field input[type="number"] { width: 90px; }
.tag { font-size: 15px; padding: 3px 10px; }
.sumline { font-size: 18px; }
.adm-guest .n { font-size: 20px; }
.toast { font-size: 20px; padding: 14px 24px; }
.foot { font-size: 17px; }
.foot a { padding: 10px; display: inline-block; }
@media (max-width: 380px) {
  body { font-size: 19px; } h2 { font-size: 30px; }
  .grid { grid-template-columns: 44px repeat(8, 1fr); } .grid > div { font-size: 16px; }
  .sb { width: 54px; height: 54px; }
}

/* ---------- Ruhigere Optik ---------- */
body { background: linear-gradient(180deg, #2a1230 0%, #1a0b1f 100%) fixed; }
.moon, .waves, .bamboo, .petals { display: none; }
.lan, .hero svg, .wait .big-lantern, .pod .trophy, .flame { animation: none; filter: none; }
.rope { height: 74px; }
.lan { width: 36px; height: 45px; } .l2 { width: 42px; height: 52px; margin-left: -21px; }
.brand { text-shadow: none; margin-top: -20px; }
.card { backdrop-filter: none; box-shadow: none; background: rgba(255, 244, 232, .06); border-color: rgba(255, 224, 138, .16); }
.name-btn:hover, .name-btn:focus-visible { transform: none; box-shadow: none; }
.btn { box-shadow: 0 4px 0 #9a6410; }
.btn.red { box-shadow: 0 4px 0 #6f0a13; }
.btn::after { display: none; }
.btn:not([disabled]).pulse { animation: none; }
.steps li.on b { transform: none; box-shadow: none; }
.pip.f, .pip.me { box-shadow: none; transform: none; }
.avatar { box-shadow: none; }
.ico { filter: none; }
.screen.enter > * { animation: fadein .35s ease both; }
.bump { animation: none; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Dezente Motion Graphics ---------- */
.moon { display: block; opacity: .22; box-shadow: none; width: 200px; height: 200px; animation: breathe 12s ease-in-out infinite; }
.lan { animation: swing-soft 7s ease-in-out infinite; }
.l2 { animation-delay: -2s; } .l3 { animation-delay: -4s; }
.hero svg, .wait .big-lantern { animation: float-soft 7s ease-in-out infinite; }
.wait .big-lantern { animation-name: swing-soft; animation-duration: 8s; }
.flame { animation: flicker-soft 1.6s ease-in-out infinite alternate; }
.pod .trophy { animation: float-soft 5s ease-in-out infinite; }
.screen.enter > * { animation: rise-soft .55s cubic-bezier(.22, .8, .3, 1) both; }
.screen.enter > *:nth-child(n+2) { animation-delay: .07s; } .screen.enter > *:nth-child(n+3) { animation-delay: .14s; }
.screen.enter > *:nth-child(n+4) { animation-delay: .2s; } .screen.enter > *:nth-child(n+5) { animation-delay: .26s; }
.bump { animation: bump-soft .3s ease-out; }
.pip { transition: background .3s, transform .3s; } .pip.f { transform: scale(1.08); }
.btn { transition: transform .15s, box-shadow .15s, filter .2s; }
.btn:not([disabled]):hover { transform: translateY(-2px); }
.btn:not([disabled]).pulse { animation: glow-soft 2.8s ease-in-out infinite; }
.name-btn { transition: transform .2s, background .2s, border-color .2s; }
.name-btn:hover, .name-btn:focus-visible { transform: translateY(-2px); border-color: var(--gold); }
.who .p.y .avatar { animation: bump-soft .5s ease-out; }
@keyframes swing-soft { 0%, 100% { transform: rotate(2.5deg); } 50% { transform: rotate(-2.5deg); } }
@keyframes float-soft { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes flicker-soft { from { transform: scale(1); } to { transform: scale(1.08, 1.14); } }
@keyframes rise-soft { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes bump-soft { 0% { transform: scale(1); } 45% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes glow-soft { 0%, 100% { box-shadow: 0 4px 0 #9a6410, 0 0 0 0 rgba(255, 210, 90, .35); } 50% { box-shadow: 0 4px 0 #9a6410, 0 0 0 10px rgba(255, 210, 90, 0); } }
@media (prefers-reduced-motion: reduce) { .moon, .lan, .hero svg, .flame { animation: none; } }

/* ---------- Startbildschirm ---------- */
.hero svg.scene { width: 100%; max-width: 380px; height: auto; animation: none; margin-bottom: 4px; overflow: visible; }
.scene .ring { fill: none; stroke: var(--gold); stroke-linecap: round; transform-origin: 160px 98px; }
.scene .r1 { stroke-width: 1.5; stroke-dasharray: 3 9; opacity: .55; animation: spin 40s linear infinite; }
.scene .r2 { stroke-width: 2; stroke-dasharray: 420; stroke-dashoffset: 420; opacity: .5; animation: draw 2.2s .3s ease-out forwards; }
.scene .cake-u { animation: float-soft 6s ease-in-out infinite; }
.scene .spark { transform-box: view-box; animation: twinkle 3.6s ease-in-out infinite; opacity: 0; }
.scene .clink { transform-box: fill-box; transform-origin: 50% 100%; animation: clink-l 4.5s ease-in-out infinite; }
.scene .clink.r { animation-name: clink-r; }
.reveal span { display: inline-block; animation: word-in .6s cubic-bezier(.22, .8, .3, 1) both; animation-delay: calc(.25s + var(--i) * .12s); }
.rule { height: 3px; width: 90px; margin: 8px auto 14px; border-radius: 3px; background: linear-gradient(90deg, transparent, var(--gold), transparent); transform-origin: center; animation: rule-in .9s .8s ease-out both; }
.btn.start { overflow: hidden; }
.btn.start::after { display: block; transform: translateX(-130%); animation: sweep 4.5s 2s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes twinkle { 0%, 100% { opacity: 0; transform: scale(.3); } 50% { opacity: .95; transform: scale(1); } }
@keyframes clink-l { 0%, 55%, 100% { transform: translateX(0) rotate(-4deg); } 70% { transform: translateX(26px) rotate(12deg); } 78% { transform: translateX(22px) rotate(8deg); } }
@keyframes clink-r { 0%, 55%, 100% { transform: translateX(0) rotate(4deg); } 70% { transform: translateX(-26px) rotate(-12deg); } 78% { transform: translateX(-22px) rotate(-8deg); } }
@keyframes word-in { from { opacity: 0; transform: translateY(18px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes rule-in { from { transform: scaleX(0); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes sweep { 0%, 60% { transform: translateX(-130%); } 100% { transform: translateX(130%); } }
@media (prefers-reduced-motion: reduce) { .scene .spark { opacity: .8; } .scene .r2 { stroke-dashoffset: 0; } .reveal span, .rule { opacity: 1; } }

/* ---------- SVG-Icons statt Emojis ---------- */
.gi { width: 1.1em; height: 1.1em; flex: none; vertical-align: -.18em; }
.gi.gold { color: var(--gold); margin-right: 4px; }
h2 .gi { width: 1.05em; height: 1.05em; }
.dot { display: inline-block; width: .6em; height: .6em; border-radius: 50%; vertical-align: .05em; }
.grid .h .dot { width: 14px; height: 14px; }
.steps b .gi { width: 16px; height: 16px; vertical-align: middle; }
.remain .gi, .tag .gi, .sumline .gi { width: 1em; height: 1em; vertical-align: -.15em; }
.foot a { display: inline-flex; align-items: center; gap: 8px; }
.foot a .gi { width: 20px; height: 24px; }
.btn.ghost .gi { width: 1.3em; height: 1.3em; }
.avatar .ok { stroke: none; }

.dev-actions { display: grid; gap: 10px; margin-top: 10px; }
.dev-actions .btn { width: 100%; justify-content: flex-start; }

/* ---------- Startseite: alles ohne Scrollen im Sichtbereich ---------- */
body.welcome { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body.welcome main { flex: 1; display: flex; align-items: center; padding: 0 16px 8px; width: 100%; }
body.welcome .screen { width: 100%; }
body.welcome .steps { display: none; }
body.welcome .rope { height: clamp(52px, 9dvh, 74px); }
body.welcome .brand { font-size: clamp(28px, 4.6dvh, 38px); margin: -18px 0 0; }
body.welcome .card.hero { background: none; border: 0; padding: 0; }
body.welcome .hero svg.scene { width: auto; max-width: 100%; height: clamp(120px, 30dvh, 250px); margin: 0 auto 2dvh; display: block; }
body.welcome .hero h2 { font-size: clamp(28px, 4.8dvh, 40px); margin: 0; }
body.welcome .hero .rule { margin: 1.2dvh auto 1.6dvh; }
body.welcome .hero .lead { font-size: clamp(17px, 2.6dvh, 21px); margin: 0 auto 2dvh; max-width: 520px; line-height: 1.4; }
body.welcome .hero .row-actions { margin-top: 0; }
body.welcome .foot { padding: 0 16px 10px; }
@media (max-height: 640px) { body.welcome .hero .lead { display: none; } }

.admin-open { display: inline-flex; align-items: center; gap: 8px; margin-top: 2dvh; min-height: 48px; padding: 0 18px; background: none; border: 1.5px solid var(--card-b); border-radius: 999px; color: var(--text); font-size: 18px; opacity: .85; }
.admin-open:hover { opacity: 1; border-color: var(--gold); }
.admin-open .gi { width: 20px; height: 24px; }
body.welcome .foot { display: none; }

.mini-links { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 2dvh; }
.mini-links .admin-open { margin-top: 0; }
.howto { list-style: none; counter-reset: s; margin: 0; padding: 0; }
.howto li { counter-increment: s; position: relative; padding: 4px 0 14px 54px; }
.howto li::before { content: counter(s); position: absolute; left: 0; top: 2px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: linear-gradient(135deg, var(--gold), var(--gold2)); color: #4a2800; }
.howto li:not(:last-child)::after { content: ''; position: absolute; left: 19px; top: 46px; bottom: 4px; width: 2px; background: rgba(255, 210, 90, .3); }
.howto b { display: block; font-size: 22px; } .howto span { color: var(--muted); }
.rules { margin: 10px 0 0; padding-left: 22px; } .rules li { margin-bottom: 8px; }
.foot a + a { margin-left: 4px; }

.grid { grid-template-columns: 64px repeat(var(--n, 8), 1fr); }
@media (max-width: 380px) { .grid { grid-template-columns: 44px repeat(var(--n, 8), 1fr); } }


/* ---------- Modal „Sonstiges“ ---------- */
.modal { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px; background: rgba(12, 5, 16, .72); backdrop-filter: blur(6px); animation: fadein .25s ease both; }
.modal.out { animation: fadeout .22s ease both; } .modal.out .modal-card { animation: pop-out .22s ease both; }
.modal-card { width: 100%; max-width: 460px; max-height: 94dvh; overflow: auto; padding: 18px 22px 22px; border-radius: 28px; text-align: center; background: linear-gradient(180deg, #3b1a42, #23102a); border: 1px solid rgba(255, 210, 90, .35); box-shadow: 0 30px 80px rgba(0, 0, 0, .6); animation: pop-in .5s cubic-bezier(.2, 1.25, .35, 1) both; }
.modal-art { width: 190px; height: auto; display: block; margin: 0 auto 2px; overflow: visible; }
.modal-art .ring { fill: none; stroke: var(--gold); transform-origin: 80px 58px; }
.modal-art .r1 { stroke-width: 1.4; stroke-dasharray: 3 8; opacity: .55; animation: spin 24s linear infinite; }
.modal-art .r2 { stroke-width: 1.8; stroke-dasharray: 230; stroke-dashoffset: 230; opacity: .5; animation: draw 1.4s .2s ease-out forwards; }
.modal-art .steam path { fill: none; stroke: #fff4e8; stroke-width: 2.2; stroke-linecap: round; opacity: 0; animation: steam 3s ease-in-out infinite; }
.modal-art .steam path:nth-child(2) { animation-delay: .8s; } .modal-art .steam path:nth-child(3) { animation-delay: 1.6s; }
.modal-art .cup-u { animation: float-soft 5s ease-in-out infinite; }
.modal-art .spark { transform-box: fill-box; transform-origin: center; animation: twinkle 3s ease-in-out infinite; opacity: 0; }
.modal h3 { font-family: var(--serif); font-size: 28px; margin: 0 0 4px; }
.modal input[type="text"] { width: 100%; margin: 6px 0 14px; text-align: center; }
.mlabel { display: block; text-align: left; font-size: 16px; color: var(--muted); }
.mrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.mrow .mlabel { font-size: 18px; color: var(--text); }
.modal .row-actions { margin-top: 14px; }
.modal .row-actions .btn { flex: 1; min-width: 140px; }
.shake { animation: shake .4s; outline: 2px solid var(--red2); }
@keyframes pop-in { from { opacity: 0; transform: translateY(30px) scale(.88); } to { opacity: 1; transform: none; } }
@keyframes pop-out { to { opacity: 0; transform: translateY(16px) scale(.94); } }
@keyframes fadeout { to { opacity: 0; } }
@keyframes steam { 0% { opacity: 0; transform: translateY(8px); } 40% { opacity: .7; } 100% { opacity: 0; transform: translateY(-10px); } }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
@media (prefers-reduced-motion: reduce) { .modal-art .spark { opacity: .8; } .modal-art .r2 { stroke-dashoffset: 0; } .modal-art .steam path { opacity: .5; } }

/* ---------- Home-Button oben links ---------- */
.home-btn { position: absolute; top: 12px; left: 12px; z-index: 30; display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 16px 0 12px; border-radius: 999px; font-size: 18px; font-weight: 700; color: var(--text); background: rgba(26, 11, 31, .72); border: 1.5px solid var(--card-b); backdrop-filter: blur(6px); transition: transform .15s, border-color .2s, background .2s; }
.home-btn:hover { border-color: var(--gold); background: rgba(255, 210, 90, .16); }
.home-btn:active { transform: scale(.94); }
.home-btn .gi { width: 26px; height: 26px; color: var(--gold); }
body.welcome .home-btn { display: none; }
@media (max-width: 420px) { .home-btn span { display: none; } .home-btn { padding: 0 12px; } }

.remain.bad { color: var(--red2); font-weight: 700; }
.remain .gi { margin-right: 4px; }
input[type="datetime-local"] { font: inherit; font-size: 20px; color: var(--text); background: rgba(0,0,0,.3); border: 1px solid var(--card-b); border-radius: 12px; padding: 10px 12px; min-height: 54px; color-scheme: dark; }


/* ---------- Kategorien klar getrennt ---------- */
.cat-shot   { --cat: #3fd0a0; }   /* Bambusschnaps: Jade */
.cat-glass  { --cat: #ffb92e; }   /* Helles Bier: Bernstein */
.cat-bottle { --cat: #5aa9ff; }   /* Flaschenbier: Blau */
.cat-cup    { --cat: #ff7ab8; }   /* Sonstiges: Rosa */
.card.cat, .cat-block {
  border: 1px solid color-mix(in srgb, var(--cat) 45%, transparent);
  border-left: 8px solid var(--cat);
  background: linear-gradient(100deg, color-mix(in srgb, var(--cat) 20%, transparent), rgba(255, 244, 232, .04) 55%);
}
.card.cat { margin-bottom: 22px; }
.cat-block { border-radius: var(--radius); padding: 14px 16px; margin-top: 16px; }
.cat .drink-head .ico { width: 76px; height: 76px; padding: 10px; border-radius: 22px; background: color-mix(in srgb, var(--cat) 24%, rgba(0, 0, 0, .25)); }
.cat-tag { display: inline-block; font-size: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #20102a; background: var(--cat); border-radius: 999px; padding: 2px 12px; margin-bottom: 4px; }
.cat .drink-head .t b { font-size: 26px; }
.cat .pip.f { background: var(--cat); border-color: var(--cat); }
.cat .pip.f.me { background: #fff4e8; border-color: #fff4e8; }
.cat .guest-row { border-top-color: color-mix(in srgb, var(--cat) 25%, transparent); }
.cat .sb[data-act$="inc"] { background: linear-gradient(180deg, color-mix(in srgb, var(--cat) 70%, #fff), var(--cat)); color: #20102a; }

.dock-hint { max-width: 700px; margin: 0 auto 8px; padding: 8px 14px; text-align: center; font-size: 17px; line-height: 1.35; color: #ffe08a; background: rgba(26, 11, 31, .92); border: 1px solid rgba(255, 210, 90, .35); border-radius: 14px; }
.dock-hint[hidden] { display: none; }
main { padding-bottom: 200px; }

/* ---------- Name ändern ---------- */
.me-btn { position: absolute; top: 12px; right: 12px; z-index: 30; display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 14px 0 6px; border-radius: 999px; font-size: 17px; font-weight: 700; color: var(--text); background: rgba(26, 11, 31, .72); border: 1.5px solid var(--card-b); backdrop-filter: blur(6px); }
.me-btn[hidden] { display: none; }
.me-btn:hover { border-color: var(--gold); }
.me-btn .gi { width: 20px; height: 20px; color: var(--gold); }
.me-btn .avatar.sm { width: 38px; height: 38px; font-size: 14px; }
.whoami { margin: 1.4dvh 0 0; font-size: 17px; color: var(--muted); }
.whoami b { color: var(--text); }
.linklike { background: none; border: 0; padding: 6px 4px; color: var(--gold); font-size: 17px; text-decoration: underline; cursor: pointer; }
@media (max-width: 520px) { .me-btn span { display: none; } .me-btn { padding: 0 12px 0 6px; } }


/* ---------- Wizard ---------- */
.wiz-head { margin: 4px 0 14px; font-size: 18px; color: var(--muted); }
.wiz-head .bar { margin-top: 8px; flex: none; }
.card.wiz { text-align: center; padding: 26px 18px; }
.wiz h2 { font-size: 34px; margin: 8px 0; }
.wiz .lead { margin-bottom: 14px; }
.hl { color: var(--cat, var(--gold)); }
.wiz-icon { display: flex; justify-content: center; margin-bottom: 8px; }
.ico.big { width: 120px; height: 120px; padding: 16px; border-radius: 32px; background: color-mix(in srgb, var(--cat, #ffd25a) 24%, rgba(0, 0, 0, .25)); }
.ico.sm { width: 44px; height: 44px; }
.bigstep { display: flex; justify-content: center; margin: 14px 0 10px; }
.bigstep .stepper { gap: 12px; padding: 10px; }
.bigstep .stepper output { font-size: 64px; min-width: 110px; }
.bigstep .sb { width: 88px; height: 88px; font-size: 50px; }
.wiz .guest-row { text-align: left; }
.wiz .row-actions { margin-top: 14px; }
.sumrow { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 22px; text-align: left; }
.sumrow span { flex: 1; } .sumrow b { font-size: 24px; }
.sumblock { border-left: 6px solid var(--cat); border-radius: 14px; padding: 6px 14px 10px; margin: 12px 0; text-align: left; background: color-mix(in srgb, var(--cat) 14%, transparent); }
.sumblock .sumrow { border-top: 0; padding: 6px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: rgba(0, 0, 0, .3); font-size: 19px; }
.dock .dock-in .btn { white-space: nowrap; }
@media (max-width: 420px) { .wiz h2 { font-size: 28px; } .bigstep .sb { width: 72px; height: 72px; } .bigstep .stepper output { font-size: 52px; min-width: 80px; } }
