/* =====================================================================
   Wunschzettel – maximal weihnachtlich
   ===================================================================== */
@font-face { font-family: "Mountains"; src: url("fonts/mountains-of-christmas-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("fonts/nunito-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("fonts/nunito-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("fonts/nunito-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-display: swap; }

:root {
  --night-0: #050c1f;
  --night-1: #07122b;
  --night-2: #13295a;
  --red: #d62839;
  --red-hi: #ff4d5e;
  --red-d: #a4161a;
  --green: #1a7f4b;
  --green-hi: #2fbf71;
  --green-d: #0f5132;
  --gold: #f4c95d;
  --gold-d: #c9971a;
  --snow: #f8fbff;
  --cream: #fffaf0;
  --cream-2: #f7eedb;
  --ink: #2b1d16;
  --ink-soft: #6b5a4e;
  --glass: rgba(255, 255, 255, .07);
  --glass-2: rgba(255, 255, 255, .12);
  --glass-line: rgba(255, 255, 255, .16);
  --radius: 20px;
  --shadow: 0 18px 50px -18px rgba(0, 0, 0, .65);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --font: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Mountains", "Nunito", Georgia, serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; overflow-x: clip; background: #07122b; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font);
  color: var(--snow);
  background: var(--night-1);
  background-image:
    radial-gradient(1200px 600px at 80% -10%, rgba(47, 191, 113, .18), transparent 60%),
    radial-gradient(900px 500px at 10% 0%, rgba(131, 56, 236, .16), transparent 60%),
    linear-gradient(180deg, var(--night-0) 0%, var(--night-1) 40%, var(--night-2) 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  overflow-x: clip;
}
button, input, textarea, select { font: inherit; color: inherit; }
button, a, label, input, select, textarea { touch-action: manipulation; }
button { cursor: pointer; }
a { color: inherit; }
img { max-width: 100%; }
::selection { background: var(--red); color: #fff; }

/* ---------- Himmel ---------- */
.sky { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.aurora { position: absolute; width: 70vw; height: 40vh; filter: blur(70px); opacity: .35; border-radius: 50%; mix-blend-mode: screen; animation: aurora 18s ease-in-out infinite alternate; }
.aurora.a1 { background: #2fbf71; top: -18vh; left: -10vw; }
.aurora.a2 { background: #8338ec; top: -22vh; right: -15vw; animation-duration: 24s; animation-delay: -6s; }
.aurora.a3 { background: #3a86ff; top: -10vh; left: 30vw; width: 40vw; opacity: .22; animation-duration: 30s; }
@keyframes aurora { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(8vw, 4vh) scale(1.15); } 100% { transform: translate(-6vw, 2vh) scale(.95); } }
.stars i { position: absolute; width: 2px; height: 2px; background: #fff; border-radius: 50%; opacity: .7; animation: twinkle 3s ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { opacity: .15; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.25); } }
.moon {
  position: absolute; top: 90px; right: 8vw; width: 92px; height: 92px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fffef5 0%, #fff4c9 45%, #f1dc9a 100%);
  box-shadow: 0 0 40px 10px rgba(255, 244, 201, .35), 0 0 120px 40px rgba(255, 244, 201, .12);
}
.moon::before, .moon::after { content: ""; position: absolute; border-radius: 50%; background: rgba(210, 180, 110, .35); }
.moon::before { width: 18px; height: 18px; top: 26px; left: 50px; }
.moon::after { width: 11px; height: 11px; top: 58px; left: 28px; }

#snow, #fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#snow { z-index: 1; }
#fx { z-index: 200; }

/* ---------- Schlitten ---------- */
#sleigh { position: absolute; top: 0; left: 0; z-index: 2; pointer-events: none; opacity: 0; will-change: transform; }
#sleigh.flying { opacity: 1; }
#sleigh .deer { animation: gallop .5s ease-in-out infinite alternate; transform-box: fill-box; }
#sleigh .d2 { animation-delay: -.15s; } #sleigh .d3 { animation-delay: -.3s; }
@keyframes gallop { from { transform: translateY(-2px); } to { transform: translateY(3px); } }
#sleigh .rudolph { animation: rudolph 1s ease-in-out infinite; }
@keyframes rudolph { 50% { fill: #ff8a95; filter: drop-shadow(0 0 6px #ff2a3d); } }
.sparkle { position: absolute; z-index: 2; pointer-events: none; width: 6px; height: 6px; border-radius: 50%; background: #fff6cc; box-shadow: 0 0 8px 2px #f4c95d; animation: sparkle 1.3s ease-out forwards; }
@keyframes sparkle { to { opacity: 0; transform: translateY(26px) scale(.2); } }

/* ---------- Lichterkette ---------- */
.lights { position: fixed; top: calc(var(--safe-t) - 14px); left: 0; right: 0; z-index: 60; margin: 0; padding: 0; list-style: none; display: flex; justify-content: space-between; overflow: hidden; height: 58px; pointer-events: none; }
.lights li { position: relative; flex: 0 0 auto; width: 12px; height: 26px; margin: 18px 13px 0; border-radius: 50%; background: var(--c); box-shadow: 0 6px 22px 3px var(--c); animation: flash 1.4s ease-in-out infinite alternate; animation-delay: var(--d); }
.lights li::before { content: ""; position: absolute; top: -6px; left: 2px; width: 8px; height: 8px; background: #2c3e50; border-radius: 3px; }
.lights li::after { content: ""; position: absolute; top: -16px; left: 6px; width: 40px; height: 18px; border-bottom: 2px solid #1d2b3a; border-radius: 50%; }
@keyframes flash { 0% { opacity: 1; } 100% { opacity: .35; box-shadow: 0 6px 12px 0 var(--c); } }

/* ---------- Kopfzeile ---------- */
.topbar {
  position: relative; z-index: 10;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px;
  max-width: 1440px; margin: 0 auto;
  padding: calc(var(--safe-t) + 44px) 24px 18px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-tree svg { display: block; filter: drop-shadow(0 4px 14px rgba(244, 201, 93, .35)); }
.tree-star { animation: starPulse 2.2s ease-in-out infinite; transform-origin: 32px 15px; }
@keyframes starPulse { 50% { transform: scale(1.18) rotate(8deg); filter: drop-shadow(0 0 6px #f4c95d); } }
.tb { animation: flash 1s ease-in-out infinite alternate; } .b2 { animation-delay: -.3s; } .b3 { animation-delay: -.6s; } .b4 { animation-delay: -.8s; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--display); font-size: 42px; font-weight: 700; letter-spacing: .5px; background: linear-gradient(180deg, #fff 0%, #ffe9a8 55%, #f4c95d 100%); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: 0 2px 30px rgba(244, 201, 93, .25); }
.brand-tag { font-size: 13px; opacity: .75; margin-top: 6px; letter-spacing: .3px; }

.countdown { justify-self: center; display: flex; align-items: flex-end; gap: 14px; position: relative; padding-bottom: 22px; }
.orn { position: relative; width: 78px; height: 78px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; animation: swing 3.6s ease-in-out infinite; transform-origin: 50% -40px; box-shadow: inset -8px -10px 18px rgba(0, 0, 0, .35), inset 6px 8px 14px rgba(255, 255, 255, .25), 0 10px 25px -8px rgba(0, 0, 0, .7); }
.orn::before { content: ""; position: absolute; top: -10px; left: 50%; width: 18px; height: 12px; margin-left: -9px; border-radius: 3px 3px 2px 2px; background: linear-gradient(90deg, #a87b14, #f4d47a, #a87b14); }
.orn::after { content: ""; position: absolute; top: -44px; left: 50%; width: 1.5px; height: 34px; background: linear-gradient(transparent, rgba(244, 201, 93, .8)); }
.orn.o1 { background: radial-gradient(circle at 30% 28%, #ff8f9a, var(--red) 45%, var(--red-d)); animation-delay: -.2s; }
.orn.o2 { background: radial-gradient(circle at 30% 28%, #ffe7a3, #e9b737 45%, #9c7414); animation-delay: -1.1s; }
.orn.o3 { background: radial-gradient(circle at 30% 28%, #8ff0b9, var(--green) 45%, var(--green-d)); animation-delay: -2s; }
.orn.o4 { background: radial-gradient(circle at 30% 28%, #9fc4ff, #3a86ff 45%, #1c4fa8); animation-delay: -2.8s; }
.orn b { font-size: 28px; font-weight: 800; line-height: 1; text-shadow: 0 2px 6px rgba(0, 0, 0, .35); font-variant-numeric: tabular-nums; }
.orn small { font-size: 10px; text-transform: uppercase; letter-spacing: 1.2px; font-weight: 800; opacity: .9; }
@keyframes swing { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
.cd-caption { position: absolute; bottom: 0; left: 0; right: 0; text-align: center; font-family: var(--display); font-size: 18px; color: var(--gold); white-space: nowrap; }
.countdown.xmas .orn { display: none; }
.countdown.xmas .cd-caption { position: static; font-size: 34px; animation: starPulse 2s infinite; }

.top-actions { display: flex; align-items: center; gap: 8px; justify-self: end; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 42px; min-width: 42px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--glass-line); background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); font-weight: 700; font-size: 14px; transition: background .2s, transform .15s; }
.icon-btn:active { transform: scale(.95); }
.icon-btn .lbl { display: inline; }
.me-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 14px 4px 4px; }

/* ---------- Avatare ---------- */
.av { --s: 34px; flex: 0 0 auto; position: relative; width: var(--s); height: var(--s); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: calc(var(--s) * .4); color: #fff; background: var(--c, var(--red)); box-shadow: inset 0 -3px 6px rgba(0, 0, 0, .25), 0 0 0 2px rgba(255, 255, 255, .85); text-transform: uppercase; }
.av.hat::after { content: ""; position: absolute; top: calc(var(--s) * -.36); left: calc(var(--s) * .26); width: calc(var(--s) * .62); height: calc(var(--s) * .48); background: linear-gradient(160deg, #ff4d5e, #a4161a); clip-path: polygon(0 100%, 100% 100%, 85% 0); border-bottom: 3px solid #fff; transform: rotate(14deg); filter: drop-shadow(0 1px 0 #fff); }
.av .dot { position: absolute; right: -2px; bottom: -2px; width: 11px; height: 11px; border-radius: 50%; background: var(--green-hi); border: 2px solid var(--night-1); box-shadow: 0 0 10px var(--green-hi); }

/* ---------- Layout ---------- */
.view { position: relative; z-index: 5; max-width: 1440px; margin: 0 auto; padding: 0 24px calc(160px + var(--safe-b)); }
.app { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 26px; align-items: start; }

.panel { background: var(--glass); border: 1px solid var(--glass-line); border-radius: var(--radius); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); box-shadow: var(--shadow); }

/* Seitenleiste */
.side { position: sticky; top: 18px; padding: 18px; }
.side h2 { margin: 2px 6px 14px; font-family: var(--display); font-size: 26px; color: var(--gold); }
.people { display: flex; flex-direction: column; gap: 6px; }
.person { position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 11px 12px; border-radius: 14px; border: 1px solid transparent; background: transparent; transition: background .2s, border-color .2s, transform .15s; }
.person.active { background: linear-gradient(135deg, rgba(214, 40, 57, .35), rgba(214, 40, 57, .12)); border-color: rgba(255, 77, 94, .5); box-shadow: 0 0 24px -8px var(--red); }
.person .pname { font-weight: 800; font-size: 15px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person .pmeta { display: block; font-size: 12px; opacity: .7; margin-top: 2px; }
.candy { margin-top: 6px; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.candy span { display: block; height: 100%; border-radius: 6px; background: repeating-linear-gradient(-45deg, #fff 0 6px, var(--red) 6px 12px); background-size: 17px 17px; animation: candy 1s linear infinite; transition: width .6s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes candy { to { background-position: 17px 0; } }
.watchers { display: flex; align-items: center; }
.watchers .av { --s: 22px; margin-left: -6px; box-shadow: 0 0 0 2px var(--night-1); }
.eye-count { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 800; padding: 3px 7px; border-radius: 999px; background: rgba(47, 191, 113, .2); color: #9ff3c3; animation: pulseG 2s infinite; }
@keyframes pulseG { 0%, 100% { box-shadow: 0 0 0 0 rgba(47, 191, 113, .5); } 50% { box-shadow: 0 0 0 6px rgba(47, 191, 113, 0); } }
.me-tag { font-size: 10px; text-transform: uppercase; letter-spacing: 1px; background: var(--gold); color: var(--ink); padding: 1px 6px; border-radius: 6px; margin-left: 6px; font-weight: 800; vertical-align: 2px; }

/* Listen-Kopf */
.list-head { position: relative; padding: 24px 26px 22px; margin-bottom: 22px; overflow: hidden; }
.list-head::before { content: ""; position: absolute; right: -40px; top: -40px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(244, 201, 93, .25), transparent 65%); pointer-events: none; }
.lh-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.lh-title { display: flex; align-items: center; gap: 16px; min-width: 0; }
.lh-title .av { --s: 56px; }
.lh-title h1 { margin: 0; font-family: var(--display); font-size: 44px; line-height: 1.05; text-shadow: 0 3px 0 rgba(0, 0, 0, .25); }
.lh-sub { margin-top: 4px; opacity: .8; font-size: 14px; display: flex; gap: 14px; flex-wrap: wrap; }
.lh-sub b { color: var(--gold); }
.viewers-bar { margin-top: 16px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 34px; font-size: 14px; }
.viewer { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; background: rgba(47, 191, 113, .14); border: 1px solid rgba(47, 191, 113, .35); animation: popIn .35s cubic-bezier(.2, .9, .3, 1.4); font-weight: 700; }
.viewer .av { --s: 26px; }
.viewer .live { width: 8px; height: 8px; border-radius: 50%; background: var(--green-hi); box-shadow: 0 0 8px var(--green-hi); animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .25; } }
@keyframes popIn { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.alone { opacity: .55; font-style: italic; }
.surprise-hint { margin-top: 14px; font-size: 13px; padding: 10px 14px; border-radius: 12px; background: rgba(244, 201, 93, .12); border: 1px dashed rgba(244, 201, 93, .45); color: #ffe9a8; }

/* Buttons */
.btn { --bg: var(--red); display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border: 0; border-radius: 14px; background: var(--bg); color: #fff; font-weight: 800; font-size: 15px; letter-spacing: .2px; box-shadow: 0 6px 0 rgba(0, 0, 0, .25), 0 12px 24px -10px var(--bg); transition: transform .12s, box-shadow .12s, filter .2s; white-space: nowrap; text-decoration: none; }
.btn:active { transform: translateY(3px); box-shadow: 0 3px 0 rgba(0, 0, 0, .25); }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn.green { --bg: var(--green); }
.btn.gold { --bg: var(--gold-d); color: #fff; }
.btn.ghost { background: transparent; color: inherit; box-shadow: none; border: 1.5px solid currentColor; opacity: .85; }
.btn.small { padding: 8px 12px; font-size: 13px; border-radius: 11px; box-shadow: 0 4px 0 rgba(0, 0, 0, .2); }
.btn.big { padding: 15px 26px; font-size: 17px; border-radius: 16px; }
.btn.candy-btn { background: repeating-linear-gradient(-45deg, var(--red) 0 14px, var(--red-hi) 14px 28px); background-size: 40px 40px; animation: candy 1.6s linear infinite; }
.btn .spin { width: 16px; height: 16px; border: 2.5px solid rgba(255, 255, 255, .4); border-top-color: #fff; border-radius: 50%; animation: rot .7s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }

/* ---------- Wunsch-Karten ---------- */
.wishes { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px; }
.wish { position: relative; display: flex; flex-direction: column; background: var(--cream); color: var(--ink); border-radius: 18px; box-shadow: 0 14px 30px -14px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .5) inset; overflow: hidden; transition: transform .25s, box-shadow .25s, filter .4s, opacity .4s; animation: dropIn .5s cubic-bezier(.2, .9, .3, 1.25) both; }
@keyframes dropIn { from { opacity: 0; transform: translateY(-14px) scale(.96); } }
.wish::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: repeating-linear-gradient(90deg, var(--red) 0 18px, #fff 18px 26px, var(--green) 26px 44px, #fff 44px 52px); z-index: 2; }
.wish-img { position: relative; aspect-ratio: 4 / 3; background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.wish-img img { width: 100%; height: 100%; object-fit: contain; padding: 14px; transition: transform .4s; }
.wish-img .ph { width: 46%; opacity: .9; }
.wish-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; flex: 1; border-top: 1px dashed #e8dcc4; }
.wish-shop { font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; font-weight: 800; color: var(--green); display: flex; align-items: center; gap: 6px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.wish-title { margin: 0; font-size: 16px; line-height: 1.3; font-weight: 800; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.wish-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin-top: 2px; }
.wish-price .p { font-size: 22px; font-weight: 800; color: var(--red-d); }
.wish-price .p.unknown { font-size: 14px; color: var(--ink-soft); font-weight: 700; }
.ship { font-size: 12.5px; color: var(--ink-soft); font-weight: 700; }
.ship.free { color: var(--green); }
.ship-hint { display: block; font-size: 11.5px; color: var(--ink-soft); opacity: .85; }
.wish-note { margin: 4px 0 0; font-size: 13.5px; line-height: 1.4; background: var(--cream-2); padding: 8px 10px; border-radius: 10px; border-left: 3px solid var(--gold); white-space: pre-wrap; word-break: break-word; }
.wish-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 10px; }
.wish-actions .grow { flex: 1; }
.minis { display: contents; }
.wish-actions .btn.ghost { color: var(--ink); }
.mini { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 11px; border: 1.5px solid #e2d4b8; background: #fff; color: var(--ink); font-size: 16px; transition: background .2s, transform .12s; }
.mini:active { transform: scale(.92); }

.ribbon { position: absolute; top: 14px; left: -36px; z-index: 3; transform: rotate(-45deg); width: 140px; text-align: center; padding: 5px 0; font-size: 11px; font-weight: 800; letter-spacing: .5px; color: #fff; background: linear-gradient(90deg, var(--red-d), var(--red-hi), var(--red-d)); box-shadow: 0 4px 10px rgba(0, 0, 0, .3); }

/* gekauft */
.wish.bought { filter: grayscale(.85); opacity: .78; }
.wish.bought .wish-title, .wish.bought .wish-price .p { text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: var(--red); }
.stamp { position: absolute; z-index: 4; top: 22%; left: 50%; transform: translate(-50%, -50%) rotate(-14deg); padding: 6px 16px; border: 4px double var(--red); border-radius: 10px; color: var(--red); background: rgba(255, 250, 240, .9); font-family: var(--display); font-size: 30px; line-height: 1; text-align: center; letter-spacing: 1px; box-shadow: 0 6px 20px rgba(0, 0, 0, .2); animation: stamp .45s cubic-bezier(.2, .9, .3, 1.6) both; white-space: nowrap; }
.stamp small { display: block; font-family: var(--font); font-size: 12px; font-weight: 800; letter-spacing: 0; margin-top: 3px; }
@keyframes stamp { from { transform: translate(-50%, -50%) rotate(-14deg) scale(2.4); opacity: 0; } }
.wish.bought.by-me .stamp { border-color: var(--green); color: var(--green); }
.wish.bought.by-me { filter: grayscale(.35); opacity: .9; }
.wish.bought.by-me .wish-title, .wish.bought.by-me .wish-price .p { text-decoration-color: var(--green); }
.divider { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; margin: 8px 0 -4px; font-family: var(--display); font-size: 24px; color: var(--gold); }
.divider::before, .divider::after { content: ""; flex: 1; height: 2px; background: linear-gradient(90deg, transparent, rgba(244, 201, 93, .5), transparent); }

/* Leer */
.empty { padding: 50px 24px; text-align: center; }
.empty .big-ico { font-size: 70px; line-height: 1; display: inline-block; animation: swing 3s ease-in-out infinite; }
.empty h3 { font-family: var(--display); font-size: 32px; margin: 14px 0 6px; color: var(--gold); }
.empty p { opacity: .8; margin: 0 0 18px; }

/* ---------- Login ---------- */
.auth-wrap { min-height: 62vh; display: flex; align-items: center; justify-content: center; padding: 20px 0; }
.gift-card { position: relative; width: min(440px, 100%); padding: 44px 32px 30px; border-radius: 24px; color: var(--ink); background: linear-gradient(180deg, #fffdf7, #fff4df); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8); animation: dropIn .6s cubic-bezier(.2, .9, .3, 1.25); }
.gift-card::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 34px; margin-left: -17px; background: linear-gradient(90deg, var(--red-d), var(--red-hi), var(--red-d)); opacity: .16; border-radius: 4px; pointer-events: none; z-index: 0; }
.gift-card > *:not(.bow) { position: relative; z-index: 1; }
.gift-card .bow { position: absolute; top: -38px; left: 50%; transform: translateX(-50%); font-size: 60px; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .35)); }
.gift-card h2 { position: relative; margin: 0 0 6px; text-align: center; font-family: var(--display); font-size: 38px; color: var(--red-d); }
.gift-card p.lead { position: relative; text-align: center; margin: 0 0 22px; color: var(--ink-soft); }
.field { position: relative; display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: 13px; font-weight: 800; color: var(--ink-soft); letter-spacing: .2px; }
.inp { width: 100%; padding: 13px 14px; border-radius: 13px; border: 2px solid #e8dcc4; background: #fff; color: var(--ink); font-size: 16px; outline: none; transition: border-color .2s, box-shadow .2s; }
.inp:focus { border-color: var(--red); box-shadow: 0 0 0 4px rgba(214, 40, 57, .15); }
textarea.inp { min-height: 80px; resize: vertical; }
.err { color: var(--red-d); font-weight: 700; font-size: 14px; min-height: 20px; margin: 4px 0 10px; text-align: center; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.inline { display: flex; gap: 8px; }
.inline .inp { flex: 1; min-width: 0; }

/* ---------- Modal ---------- */
.modal-bg { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(3, 8, 22, .66); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fadeIn .2s; }
@keyframes fadeIn { from { opacity: 0; } }
.modal { position: relative; width: min(620px, 100%); max-height: min(92vh, 900px); overflow: auto; -webkit-overflow-scrolling: touch; padding: 26px 26px 22px; border-radius: 24px; color: var(--ink); background: linear-gradient(180deg, #fffdf7, #fff4df); box-shadow: 0 40px 90px -20px rgba(0, 0, 0, .9); animation: dropIn .35s cubic-bezier(.2, .9, .3, 1.2); }
.modal.wide { width: min(820px, 100%); }
.modal h2 { margin: 0 0 16px; font-family: var(--display); font-size: 34px; color: var(--red-d); padding-right: 40px; }
.modal h3 { margin: 22px 0 10px; font-size: 16px; color: var(--green-d); }
.modal .x { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .06); font-size: 20px; color: var(--ink); }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 18px; }
.modal-foot .left { margin-right: auto; display: flex; gap: 8px; }
.modal .btn.ghost { color: var(--ink); }

.preview { display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: center; padding: 12px; margin: 0 0 14px; border-radius: 16px; background: #fff; border: 2px dashed #e8dcc4; min-height: 96px; }
.preview .pimg { width: 120px; height: 96px; border-radius: 10px; background: #f6f1e7 center/contain no-repeat; display: flex; align-items: center; justify-content: center; font-size: 34px; overflow: hidden; }
.preview .pimg img { width: 100%; height: 100%; object-fit: contain; }
.preview .ptxt { font-size: 14px; color: var(--ink-soft); }
.preview .ptxt b { color: var(--ink); display: block; font-size: 15px; margin-bottom: 4px; }
.preview.loading .pimg { background: linear-gradient(90deg, #f6f1e7 25%, #fff 50%, #f6f1e7 75%); background-size: 200% 100%; animation: shimmer 1.1s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.elf { display: inline-block; animation: swing 1s ease-in-out infinite; }

.toggle { display: flex; align-items: center; gap: 12px; padding: 10px 0; cursor: pointer; font-weight: 700; user-select: none; }
.toggle input { appearance: none; -webkit-appearance: none; flex: 0 0 auto; width: 50px; height: 30px; border-radius: 30px; background: #ddd0b6; position: relative; transition: background .2s; cursor: pointer; margin: 0; }
.toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, .25); transition: transform .2s; }
.toggle input:checked { background: var(--green); }
.toggle input:checked::after { transform: translateX(20px); }
.toggle small { display: block; font-weight: 400; color: var(--ink-soft); font-size: 12.5px; }

details.more { margin-top: 6px; }
details.more summary { cursor: pointer; font-weight: 800; color: var(--green-d); padding: 6px 0; font-size: 14px; }

/* Admin-Tabelle */
.users-table { display: flex; flex-direction: column; gap: 8px; }
.urow { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; background: #fff; border-radius: 14px; border: 1.5px solid #efe3cb; }
.urow .uname { font-weight: 800; }
.urow .umeta { font-size: 12.5px; color: var(--ink-soft); }
.badge { display: inline-block; font-size: 10.5px; font-weight: 800; padding: 2px 7px; border-radius: 6px; background: var(--gold); color: var(--ink); text-transform: uppercase; letter-spacing: .6px; margin-left: 6px; vertical-align: 1px; }
.uedit { grid-column: 1 / -1; padding-top: 8px; border-top: 1px dashed #e8dcc4; }
.card-box { background: #fff; border-radius: 16px; padding: 16px; border: 1.5px solid #efe3cb; }
.colors { display: flex; gap: 8px; flex-wrap: wrap; }
.colors label { width: 30px; height: 30px; border-radius: 50%; background: var(--c); cursor: pointer; box-shadow: 0 0 0 2px #fff, 0 0 0 3px #e2d4b8; }
.colors input { display: none; }
.colors input:checked + label { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--ink); }

/* ---------- Toasts ---------- */
.toasts { position: fixed; z-index: 150; left: 50%; bottom: calc(22px + var(--safe-b)); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 10px; width: min(520px, calc(100% - 28px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 16px; border-radius: 16px; color: var(--ink); background: linear-gradient(180deg, #fffdf7, #fff1d6); box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .8); border-left: 6px solid var(--green); font-weight: 700; font-size: 14.5px; animation: toastIn .4s cubic-bezier(.2, .9, .3, 1.3); max-width: 100%; }
.toast.err { border-left-color: var(--red); }
.toast.live { border-left-color: var(--gold-d); }
.toast .t-ico { font-size: 22px; }
.toast .t-msg { flex: 1; }
.toast .t-act { border: 0; background: var(--ink); color: #fff; font-weight: 800; border-radius: 10px; padding: 7px 12px; font-size: 13px; }
.toast.out { animation: toastOut .3s forwards; }
@keyframes toastIn { from { transform: translateY(30px) scale(.9); opacity: 0; } }
@keyframes toastOut { to { transform: translateY(20px); opacity: 0; } }

/* ---------- Weihnachtsmann ---------- */
#santa { position: fixed; z-index: 40; right: 18px; bottom: calc(-26px + var(--safe-b)); border: 0; background: none; padding: 0; animation: santaBob 4s ease-in-out infinite; filter: drop-shadow(0 10px 20px rgba(0, 0, 0, .5)); transform-origin: 50% 100%; }
#santa svg { display: block; }
#santa:active { transform: scale(.94); }
@keyframes santaBob { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-10px) rotate(3deg); } }
.santa-eyes { animation: blinkEyes 5s infinite; transform-origin: 60px 82px; }
@keyframes blinkEyes { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
.santa-hat { animation: hatWiggle 4s ease-in-out infinite; transform-origin: 30px 60px; }
@keyframes hatWiggle { 50% { transform: rotate(-4deg); } }
#santa.talk .santa-mouth { animation: talk .18s ease-in-out 6 alternate; transform-origin: 60px 110px; }
@keyframes talk { to { transform: scaleY(2.2); } }
.santa-bubble { position: absolute; right: 86px; top: 4px; padding: 10px 14px; border-radius: 16px 16px 4px 16px; background: #fff; color: var(--red-d); font-family: var(--display); font-size: 22px; white-space: nowrap; box-shadow: 0 10px 24px rgba(0, 0, 0, .35); opacity: 0; transform: scale(.4) translateY(20px); transform-origin: 100% 100%; transition: opacity .25s, transform .35s cubic-bezier(.2, .9, .3, 1.5); pointer-events: none; }
#santa.talk .santa-bubble { opacity: 1; transform: none; }

/* ---------- Effekte aus ---------- */
body.no-fx #sleigh, body.no-fx .aurora, body.no-fx .lights { display: none; }
body.no-fx .orn, body.no-fx #santa, body.no-fx .stars i { animation: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---------- Tablet ---------- */
@media (max-width: 1100px) {
  .topbar { grid-template-columns: 1fr auto; gap: 16px 12px; }
  .countdown { grid-column: 1 / -1; grid-row: 2; }
  .top-actions .icon-btn .lbl { display: none; }
  .moon { top: 70px; right: 5vw; width: 66px; height: 66px; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; gap: 16px; }
  .side { position: sticky; top: calc(var(--safe-t) + 4px); z-index: 20; padding: 10px; border-radius: 18px; background: rgba(7, 18, 43, .72); }
  .side h2 { display: none; }
  .people { flex-direction: row; overflow-x: auto; gap: 8px; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; padding: 2px; }
  .people::-webkit-scrollbar { display: none; }
  .person { flex: 0 0 auto; width: auto; max-width: 220px; grid-template-columns: auto auto auto; padding: 8px 12px 8px 8px; border-color: rgba(255, 255, 255, .1); scroll-snap-align: start; }
  .person .candy { display: none; }
}

@keyframes sheetUp { from { transform: translateY(100%); } }

/* ---------- Profilbilder ---------- */
.av.has-img { background: #fff; overflow: visible; }
.av img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.av.big { --s: 84px; font-size: 32px; }
.santa-bubble { white-space: normal; width: max-content; max-width: min(280px, 70vw); line-height: 1.15; text-align: left; }

/* ---------- Radio ---------- */
.icon-btn.on { background: rgba(214, 40, 57, .45); border-color: rgba(255, 77, 94, .7); box-shadow: 0 0 18px -4px var(--red); }
.radio { position: fixed; z-index: 45; left: 18px; bottom: calc(18px + var(--safe-b)); display: none; align-items: center; gap: 8px; padding: 8px 10px 8px 8px; width: min(460px, calc(100vw - 130px)); border-radius: 999px; background: linear-gradient(135deg, rgba(164, 22, 26, .92), rgba(15, 81, 50, .92)); border: 1.5px solid rgba(244, 201, 93, .55); box-shadow: 0 16px 40px -10px rgba(0, 0, 0, .8), 0 0 30px -10px var(--gold); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); animation: dropIn .4s cubic-bezier(.2, .9, .3, 1.3); }
.radio.open { display: flex; }
.r-btn { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .14); color: #fff; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; }
.r-btn:active { transform: scale(.92); }
.r-play { width: 46px; height: 46px; font-size: 18px; background: var(--gold); color: var(--ink); box-shadow: 0 0 0 3px rgba(255, 255, 255, .25); }
.r-x { width: 30px; height: 30px; font-size: 12px; background: transparent; opacity: .7; }
.r-info { position: relative; flex: 1; min-width: 0; padding-left: 26px; }
.r-name { font-weight: 800; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-sub { font-size: 11.5px; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-eq { position: absolute; left: 2px; top: 50%; transform: translateY(-50%); display: flex; align-items: flex-end; gap: 2px; height: 18px; }
.r-eq i { width: 3px; height: 4px; background: var(--gold); border-radius: 2px; }
.radio.playing .r-eq i { animation: eq .8s ease-in-out infinite alternate; }
.radio.playing .r-eq i:nth-child(2) { animation-delay: -.3s; } .radio.playing .r-eq i:nth-child(3) { animation-delay: -.5s; } .radio.playing .r-eq i:nth-child(4) { animation-delay: -.15s; }
@keyframes eq { from { height: 3px; } to { height: 18px; } }
#rVol { width: 80px; accent-color: var(--gold); }
@media (max-width: 600px), (max-height: 520px) and (pointer: coarse) {
  .radio { left: 10px; right: 96px; width: auto; bottom: calc(12px + var(--safe-b)); }
  #rVol, #rPrev { display: none; }
  .r-btn { width: 34px; height: 34px; }
  .r-play { width: 40px; height: 40px; }
}

/* Hover nur mit Maus – auf Touch löst das sonst Doppel-Tippen aus */
@media (hover: hover) and (pointer: fine) {
  .icon-btn:hover { background: var(--glass-2); }
  .person:hover { background: rgba(255, 255, 255, .06); }
  .btn:hover { filter: brightness(1.08); }
  .wish:hover { transform: translateY(-4px) rotate(-.4deg); box-shadow: 0 24px 40px -16px rgba(0, 0, 0, .8); }
  .wish:hover .wish-img img { transform: scale(1.05); }
  .mini:hover { background: var(--cream-2); }
  .wish.bought:hover { transform: none; }
}

/* =====================================================================
   iPhone / kleine Screens – komplett überarbeitet
   ===================================================================== */
@media (max-width: 600px), (max-height: 520px) and (pointer: coarse) {
  body { background-attachment: scroll; }
  /* Performance: teure Effekte runter */
  .aurora, .moon { display: none; }
  .panel, .icon-btn, .side, .modal-bg, .radio { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
  .panel { background: rgba(14, 30, 66, .88); }
  .modal-bg { background: rgba(3, 8, 22, .8); }
  .lights { position: absolute; height: 46px; top: calc(var(--safe-t) - 16px); }
  .lights li { margin: 17px 8px 0; width: 9px; height: 19px; }
  .lights li::after { width: 27px; }

  /* Kopf: kompakt */
  .topbar { grid-template-columns: 1fr auto; gap: 8px 8px; padding: calc(var(--safe-t) + 30px) 12px 6px; }
  .brand { gap: 8px; min-width: 0; }
  .brand-tree svg { width: 30px; height: 34px; }
  .brand-name { font-size: 27px; }
  .brand-tag { display: none; }
  .top-actions { gap: 6px; }
  .top-actions [data-act="sound"], .top-actions .lbl { display: none !important; }
  .icon-btn { height: 40px; min-width: 40px; padding: 0 9px; font-size: 16px; }
  .me-chip { padding: 2px; }
  .me-chip .av { --s: 34px; }
  .countdown { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; justify-content: center; gap: 8px; padding: 4px 0 20px; }
  .orn { width: 50px; height: 50px; animation: none; box-shadow: inset -5px -6px 10px rgba(0,0,0,.35), inset 4px 5px 8px rgba(255,255,255,.25); }
  .orn::after { display: none; }
  .orn::before { top: -7px; width: 13px; height: 9px; margin-left: -6.5px; }
  .orn b { font-size: 18px; }
  .orn small { font-size: 7.5px; letter-spacing: .6px; }
  .cd-caption { font-size: 14px; }

  /* Personen-Leiste */
  .view { padding: 0 10px calc(120px + var(--safe-b)); }
  .app { gap: 12px; }
  .side { top: calc(var(--safe-t) + 2px); padding: 6px; border-radius: 16px; background: rgba(7, 18, 43, .94); }
  .person { padding: 6px 10px 6px 6px; gap: 8px; min-height: 48px; }
  .person .av { --s: 32px; }
  .person .pname { font-size: 14px; }
  .person .pmeta { font-size: 11px; }
  .eye-count { padding: 2px 6px; font-size: 11px; }

  /* Listen-Kopf */
  .list-head { padding: 14px 14px 12px; margin-bottom: 12px; border-radius: 18px; }
  .list-head::before { display: none; }
  .lh-row { gap: 12px; }
  .lh-title { gap: 10px; }
  .lh-title .av { --s: 42px; }
  .lh-title h1 { font-size: 27px; }
  .lh-sub { font-size: 13px; gap: 4px 10px; }
  .lh-row > .btn { width: 100%; min-height: 48px; }
  .viewers-bar { margin-top: 10px; font-size: 13px; min-height: 0; }
  .surprise-hint { font-size: 12.5px; padding: 8px 10px; margin-top: 10px; }

  /* Karten: hochkant, große Tippflächen */
  .wishes { grid-template-columns: 1fr; gap: 12px; }
  .wish { flex-direction: column; min-height: 0; border-radius: 16px; animation-duration: .3s; }
  .wish::before { top: 0; left: 0; right: 0; bottom: auto; width: auto; height: 5px; background: repeating-linear-gradient(90deg, var(--red) 0 14px, #fff 14px 20px, var(--green) 20px 34px, #fff 34px 40px); }
  .wish-img { flex: none; aspect-ratio: auto; height: 170px; }
  .wish-img img { padding: 10px; }
  .wish-body { border-left: 0; border-top: 1px dashed #e8dcc4; padding: 12px 14px 14px; gap: 5px; }
  .wish-title { font-size: 16px; -webkit-line-clamp: 3; }
  .wish-price .p { font-size: 21px; }
  .wish-actions { gap: 8px; padding-top: 10px; }
  .wish-actions .btn.small { flex: 1 1 0; min-height: 46px; font-size: 15px; border-radius: 13px; }
  .wish-actions .minis { flex: 1 0 100%; display: flex; gap: 8px; }
  .wish-actions .mini { flex: 1; height: 44px; font-size: 17px; border-radius: 12px; }
  .ribbon { top: 14px; left: -38px; font-size: 10px; width: 140px; padding: 4px 0; }
  .stamp { top: 85px; left: 50%; font-size: 24px; padding: 5px 12px; border-width: 3px; }
  .stamp small { font-size: 11px; }
  .divider { font-size: 21px; margin: 6px 0 0; }
  .empty { padding: 30px 16px; }
  .empty h3 { font-size: 26px; }

  /* Modals als Bottom-Sheet, Speichern-Leiste klebt unten */
  .modal-bg { align-items: flex-end; padding: 0; }
  .modal { width: 100%; max-height: calc(100vh - 30px); max-height: calc(100dvh - var(--safe-t) - 12px); border-radius: 22px 22px 0 0; padding: 18px 16px 0; animation: sheetUp .3s cubic-bezier(.2, .9, .3, 1.05); overscroll-behavior: contain; }
  .modal::before { content: ""; display: block; width: 44px; height: 5px; border-radius: 5px; background: rgba(0, 0, 0, .15); margin: -6px auto 10px; }
  .modal h2 { font-size: 26px; margin-bottom: 12px; }
  .modal .x { top: 10px; right: 10px; }
  .modal-foot { position: sticky; bottom: 0; z-index: 3; margin: 14px -16px 0; padding: 12px 16px calc(12px + var(--safe-b)); background: linear-gradient(180deg, rgba(255, 244, 223, .85), #fff4df 30%); border-top: 1px solid #efe3cb; }
  .modal-foot .btn { flex: 1; min-height: 48px; }
  .modal-foot .left { width: 100%; margin: 0; }
  .modal-foot .left .btn { flex: 1; }
  .modal > :last-child:not(.modal-foot) { margin-bottom: calc(18px + var(--safe-b)); }
  .modal form:last-child { padding-bottom: 2px; }
  .inp, .modal .inp, #bmCode { font-size: 16px !important; }
  .row { grid-template-columns: 1fr 1fr; gap: 10px; }
  .preview { grid-template-columns: 84px 1fr; padding: 10px; gap: 10px; }
  .preview .pimg { width: 84px; height: 70px; }
  .urow { grid-template-columns: auto 1fr; }
  .urow > .inline { grid-column: 1 / -1; justify-content: flex-end; }
  .toggle { min-height: 44px; }

  /* Weihnachtsmann: klein, lugt vom Rand, blockiert nichts */
  #santa { right: 0; bottom: calc(-18px + var(--safe-b)); }
  #santa svg { width: 70px; height: 88px; }
  .santa-bubble { right: 58px; top: -6px; font-size: 16px; max-width: 62vw; }
  body.radio-on #santa { bottom: calc(56px + var(--safe-b)); }

  /* Radio: Leiste unten über volle Breite */
  .radio { left: 8px; right: 8px; width: auto; bottom: calc(8px + var(--safe-b)); padding: 6px 8px 6px 6px; }
  #rVol, #rPrev { display: none; }
  body.radio-on .view { padding-bottom: calc(150px + var(--safe-b)); }
  body.radio-on .toasts { bottom: calc(80px + var(--safe-b)); }
  .toasts { bottom: calc(14px + var(--safe-b)); }
  .toast { font-size: 14px; }
}
@media (max-width: 380px) {
  .orn { width: 44px; height: 44px; }
  .orn b { font-size: 16px; }
  .brand-name { font-size: 24px; }
  .wish-img { height: 140px; }
}

@media (max-width: 600px), (max-height: 520px) and (pointer: coarse) {
  .toasts, body.radio-on .toasts { top: calc(var(--safe-t) + 8px); bottom: auto; width: calc(100% - 20px); }
  .toast { padding: 9px 10px 9px 12px; font-size: 13.5px; border-radius: 14px; border-left-width: 5px; gap: 8px; }
  .toast .t-ico { font-size: 18px; }
  .toast .t-act { padding: 6px 10px; }
  @keyframes toastIn { from { transform: translateY(-24px) scale(.95); opacity: 0; } }
  @keyframes toastOut { to { transform: translateY(-16px); opacity: 0; } }
  .wish-img { height: 150px; }
}

/* Kein Element darf seitlich rausragen (iOS zoomt sonst die ganze Seite raus) */
.wish-title, .wish-note, .lh-title h1, .pname, .r-name, .toast .t-msg, .uname, .brand-name { overflow-wrap: anywhere; }
#santa { max-width: 100vw; }

/* iPhone quer */
@media (max-height: 520px) and (pointer: coarse) and (min-width: 601px) {
  .topbar { grid-template-columns: auto 1fr auto; padding: calc(var(--safe-t) + 26px) max(12px, env(safe-area-inset-right)) 6px max(12px, env(safe-area-inset-left)); }
  .countdown { grid-column: auto; grid-row: auto; padding-bottom: 18px; }
  .view { padding-left: max(10px, env(safe-area-inset-left)); padding-right: max(10px, env(safe-area-inset-right)); }
  .wishes { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
  .side { position: relative; top: 0; }
  .modal { max-width: 640px; margin: 0 auto; }
}

/* =====================================================================
   Safari-Fix: Grid-/Flex-Kinder dürfen nie breiter als der Bildschirm werden
   (Safari nimmt sonst die Breite der waagerecht scrollenden Personen-Leiste
   als Mindestbreite der ganzen Spalte -> alles rutscht rechts raus)
   ===================================================================== */
.app, .side, .content, .people, .list-head, .wishes, .wish, .wish-body, .topbar, .topbar > *, .lh-row, .lh-title, .lh-title > div { min-width: 0; }
.app > *, .wishes > *, .topbar > * { max-width: 100%; }
.side { overflow: hidden; }
.people { width: 100%; max-width: 100%; }
.topbar { grid-template-columns: auto minmax(0, 1fr) auto; }
@media (max-width: 1100px) {
  .topbar { grid-template-columns: minmax(0, 1fr) auto; }
}
@media (max-width: 900px), (max-height: 520px) and (pointer: coarse) {
  .app { grid-template-columns: minmax(0, 1fr); width: 100%; }
  .side { width: 100%; }
  .person { flex: 0 0 auto; }
}
@media (max-width: 600px), (max-height: 520px) and (pointer: coarse) {
  .topbar { grid-template-columns: minmax(0, 1fr) auto; }
  .wishes { grid-template-columns: minmax(0, 1fr); }
  .view { width: 100%; max-width: 100vw; }
}
@media (max-height: 520px) and (pointer: coarse) and (min-width: 601px) {
  .topbar { grid-template-columns: auto minmax(0, 1fr) auto; }
  .wishes { grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); }
}
.wishes { grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); }

/* Handy: kein Grid für das Grundlayout -> WebKit kann die Breite nicht mehr falsch berechnen */
@media (max-width: 900px), (max-height: 520px) and (pointer: coarse) {
  .app { display: block; width: 100%; max-width: 100%; }
  .app > .side { display: block; width: 100%; max-width: 100%; margin-bottom: 12px; box-sizing: border-box; }
  .app > .content { display: block; width: 100%; max-width: 100%; }
  .people { display: flex; flex-wrap: nowrap; width: 100%; max-width: 100%; overflow-x: auto; contain: inline-size; }
  .list-head, .wishes { width: 100%; max-width: 100%; box-sizing: border-box; }
}
